X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fm68kif_cyclone.s;h=a0a508cd4b3aa3713323be70242f23bb825f008f;hb=fda2f31020bf0d6cf7b5dd70ec01cf390b7e1483;hp=ea5daa687e89956d28f340bfd89f8505506bc0ad;hpb=5e89f0f5aebedc086888415e063b9883fc4a9e92;p=picodrive.git diff --git a/pico/m68kif_cyclone.s b/pico/m68kif_cyclone.s index ea5daa6..a0a508c 100644 --- a/pico/m68kif_cyclone.s +++ b/pico/m68kif_cyclone.s @@ -1,4 +1,10 @@ -@ vim:filetype=armasm +/* + * PicoDrive + * (C) notaz, 2009 + * + * This work is licensed under the terms of MAME license. + * See COPYING file in the top-level directory. + */ .equ M68K_MEM_SHIFT, 16 @@ -18,16 +24,18 @@ cyclone_checkpc: ldr r1, [r7, #0x60] @ membase sub r0, r0, r1 - bic r0, r0, #0xff000000 - bics r0, r0, #1 + and r3, r0, #0xff000000 + bic r0, r0, #1 + bics r2, r0, #0xff000000 beq crashed ldr r1, [r7, #0x6c] @ read16 map - mov r2, r0, lsr #M68K_MEM_SHIFT + mov r2, r2, lsr #M68K_MEM_SHIFT ldr r1, [r1, r2, lsl #2] movs r1, r1, lsl #1 bcs crashed + sub r1, r1, r3 str r1, [r7, #0x60] @ membase add r0, r0, r1 bx lr @@ -138,3 +146,4 @@ cyclone_write32: @ u32 a, u32 d add r0, r0, #2 bx r2 +@ vim:filetype=armasm