summaryrefslogtreecommitdiffstats
path: root/oncology/dpfhack_display/src/p_start_blue.s
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-08-20 23:21:48 +0200
committermakefu <github@syntax-fehler.de>2011-08-20 23:21:48 +0200
commit37e09437c2f20ac269f8d2b7f9c7f7cd325f0585 (patch)
treee1ea709db90614f48c7d7b2a2162236b8ef69889 /oncology/dpfhack_display/src/p_start_blue.s
parent9bbf4fa73c2d48864e58d624629bd4bac7a69673 (diff)
oncology: initial commit
oncology will analyse the current krebs status
Diffstat (limited to 'oncology/dpfhack_display/src/p_start_blue.s')
-rw-r--r--oncology/dpfhack_display/src/p_start_blue.s34
1 files changed, 34 insertions, 0 deletions
diff --git a/oncology/dpfhack_display/src/p_start_blue.s b/oncology/dpfhack_display/src/p_start_blue.s
new file mode 100644
index 00000000..1098c0f1
--- /dev/null
+++ b/oncology/dpfhack_display/src/p_start_blue.s
@@ -0,0 +1,34 @@
+; Patch for startup (mod41 on DX_blue)
+ .include 'dpf.inc'
+ .include 'dpf_int.inc'
+ .include 'hack.inc'
+
+ .area HOME (CODE)
+ .area BANK0 (CODE, ABS)
+
+ .org 0x1418
+ lcall 0x13ac
+ orl wdtcon,#0x20
+ mov a,i_G_f
+ jbc acc.3, usbact ; If this bit is 1, USB is plugged in.
+ sjmp continue
+usbact:
+ ljmp hack
+
+continue:
+ ljmp tramp_return
+
+hack:
+ clr ea ; No IRQ
+ mov dptr, #(0x196a - 0x800)
+ mov a, #cloned_jumptable_offset >> 16
+ movx @dptr, a
+
+ pop acc ; Fixup stack, as we did a jsr
+ pop acc ; ..and a bank jsr
+
+ ; Jump into our firmware
+ mov a,#(50 - 1)
+ mov dptr,#entry_addr
+ ljmp tramp_jmp
+