some poor timing improvement attempts
[picodrive.git] / pico / memory.c
index 34ef99d..3900208 100644 (file)
@@ -1195,6 +1195,8 @@ void PicoWrite16_32x(u32 a, u32 d) {}
 \r
 static unsigned char z80_md_vdp_read(unsigned short a)\r
 {\r
+  z80_subCLeft(2);\r
+\r
   if ((a & 0x00f0) == 0x0000) {\r
     switch (a & 0x0d)\r
     {\r
@@ -1218,8 +1220,10 @@ static unsigned char z80_md_bank_read(unsigned short a)
   unsigned int addr68k;\r
   unsigned char ret;\r
 \r
-  addr68k = Pico.m.z80_bank68k<<15;\r
-  addr68k += a & 0x7fff;\r
+  z80_subCLeft(3);\r
+\r
+  addr68k = Pico.m.z80_bank68k << 15;\r
+  addr68k |= a & 0x7fff;\r
 \r
   ret = m68k_read8(addr68k);\r
 \r