Browse Source

68k, allow cyclone execution from address 0 and mcd, fix pulldowns only there if cd attached

root 2 years ago
parent
commit
365f1ee5d6
2 changed files with 4 additions and 3 deletions
  1. 2 1
      pico/m68kif_cyclone.s
  2. 2 2
      pico/memory.c

+ 2 - 1
pico/m68kif_cyclone.s

@@ -27,7 +27,8 @@ cyclone_checkpc:
     and     r3, r0, #0xff000000
     bic     r0, r0, #1
     bics    r2, r0, #0xff000000
-    beq     crashed
+    @ ouf, some Codemasters titles actually start at address 0
+    @ beq     crashed
 
     ldr     r1, [r7, #0x6c]  @ read16 map
     mov     r2, r2, lsr #M68K_MEM_SHIFT

+ 2 - 2
pico/memory.c

@@ -116,13 +116,13 @@ void cpu68k_map_all_ram(int start_addr, int end_addr, void *ptr, int is_sub)
 static u32 m68k_unmapped_read8(u32 a)
 {
   elprintf(EL_UIO, "m68k unmapped r8  [%06x] @%06x", a, SekPc);
-  return 0; // assume pulldown, as if MegaCD2 was attached
+  return (PicoIn.AHW & PAHW_MCD) ? 0x00 : 0xff; // pulldown if MegaCD2 attached
 }
 
 static u32 m68k_unmapped_read16(u32 a)
 {
   elprintf(EL_UIO, "m68k unmapped r16 [%06x] @%06x", a, SekPc);
-  return 0;
+  return (PicoIn.AHW & PAHW_MCD) ? 0x00 : 0xffff;
 }
 
 static void m68k_unmapped_write8(u32 a, u32 d)