X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hexed%2Fhexed.s;h=99d1c084e39c9e66d3e453546c15246a453d3198;hb=f0e0673602899ee26c6dec3964199e266881241c;hp=418ca5c4069ab4a9a387c5e8b17c85c122bc49fb;hpb=4e6ba16d44cf7d8f4c84712c1dc59738f0a2048d;p=megadrive.git diff --git a/hexed/hexed.s b/hexed/hexed.s index 418ca5c..99d1c08 100644 --- a/hexed/hexed.s +++ b/hexed/hexed.s @@ -275,6 +275,33 @@ main: tst.w (0xc00004).l no_tmss: + /* want to do early PC transfer (with RAM/VRAM intact and such)? + * also give time PC to see start condition */ + move.l #0x2000,d0 +0: dbra d0,0b + + move.l #0xa10005,a0 + btst.b #5,(a0) + bne no_early_transfer +move.b #1,(0) + move.b #0x40,(0xa1000b).l /* port 2 ctrl */ + move.b #0x00,(a0) /* port 2 data - start with TH low */ + move.l #0x2000,d0 +0: + btst.b #4,(a0) + beq do_early_transfer + dbra d0,0b + +move.b #2,(0) + move.b #0,(0xa1000b).l + bra no_early_transfer /* timeout */ + +do_early_transfer: +move.b #9,(0) + bsr do_transfer + +no_early_transfer: + .if COPY_TO_EXP /* copy to expansion device if magic number is set */ move.l #0x400000,a1 @@ -1327,7 +1354,8 @@ wait_tl_low0: bne wait_tl_low0 menu_text txt_working, 13, 13, 0 - bra do_transfer + bsr do_transfer + bra return_to_main # go back to main mode return_to_main: