X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fmemory.c;h=3900208bf6475619df0e89b8f665251cf7ee8e53;hb=d1b8bcc63466f6982685df518db8fef399f9cf91;hp=34ef99d6a0eea26e1aee16023cdd6b9cc6209adb;hpb=75b84e4b7c446cf42a2838834b5d50a4059709fe;p=picodrive.git diff --git a/pico/memory.c b/pico/memory.c index 34ef99d..3900208 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -1195,6 +1195,8 @@ void PicoWrite16_32x(u32 a, u32 d) {} static unsigned char z80_md_vdp_read(unsigned short a) { + z80_subCLeft(2); + if ((a & 0x00f0) == 0x0000) { switch (a & 0x0d) { @@ -1218,8 +1220,10 @@ static unsigned char z80_md_bank_read(unsigned short a) unsigned int addr68k; unsigned char ret; - addr68k = Pico.m.z80_bank68k<<15; - addr68k += a & 0x7fff; + z80_subCLeft(3); + + addr68k = Pico.m.z80_bank68k << 15; + addr68k |= a & 0x7fff; ret = m68k_read8(addr68k);