32x: initial code (security code passes)
[picodrive.git] / pico / memory.c
index da73961..d2dced3 100644 (file)
@@ -501,6 +501,11 @@ u32 PicoRead8_io(u32 a)
     goto end;\r
   }\r
 \r
+  if (!(PicoOpt & POPT_DIS_32X)) {\r
+    d = PicoRead8_32x(a);\r
+    goto end;\r
+  }\r
+\r
   d = m68k_unmapped_read8(a);\r
 end:\r
   return d;\r
@@ -529,6 +534,11 @@ u32 PicoRead16_io(u32 a)
     goto end;\r
   }\r
 \r
+  if (!(PicoOpt & POPT_DIS_32X)) {\r
+    d = PicoRead16_32x(a);\r
+    goto end;\r
+  }\r
+\r
   d = m68k_unmapped_read16(a);\r
 end:\r
   return d;\r
@@ -554,6 +564,11 @@ void PicoWrite8_io(u32 a, u32 d)
     Pico.m.sram_reg |= (u8)(d & 3);\r
     return;\r
   }\r
+  if (!(PicoOpt & POPT_DIS_32X)) {\r
+    PicoWrite8_32x(a, d);\r
+    return;\r
+  }\r
+\r
   m68k_unmapped_write8(a, d);\r
 }\r
 \r
@@ -577,6 +592,10 @@ void PicoWrite16_io(u32 a, u32 d)
     Pico.m.sram_reg |= (u8)(d & 3);\r
     return;\r
   }\r
+  if (!(PicoOpt & POPT_DIS_32X)) {\r
+    PicoWrite16_32x(a, d);\r
+    return;\r
+  }\r
   m68k_unmapped_write16(a, d);\r
 }\r
 \r