X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fmemory.c;h=82984d95ce37f38ee5ed1b9dde81476454ad9516;hb=5aec752dacff131607d2986ce25762c91c079a23;hp=7104cef6d32d88fdc5dcdaf757b06b1f50c23dff;hpb=e05b81fc5b3f640496795ced5d893ece4cc51c2d;p=picodrive.git diff --git a/pico/32x/memory.c b/pico/32x/memory.c index 7104cef..82984d9 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -341,6 +341,9 @@ static void p32x_vdp_write8(u32 a, u32 d) Pico32x.dirty_pal = 1; r[0] = (r[0] & P32XV_nPAL) | (d & 0xff); break; + case 0x03: // shift (for pp mode) + r[2 / 2] = d & 1; + break; case 0x05: // fill len r[4 / 2] = d & 0xff; break; @@ -1050,8 +1053,9 @@ static int REGPARM(3) sh2_write8_cs0(u32 a, u32 d, int id) return sh2_write8_unmapped(a, d, id); } +/* quirk: in both normal and overwrite areas only nonzero values go through */ #define sh2_write8_dramN(n) \ - if (!(a & 0x20000) || d) { \ + if ((d & 0xff) != 0) { \ u8 *dram = (u8 *)Pico32xMem->dram[n]; \ dram[(a & 0x1ffff) ^ 1] = d; \ } \ @@ -1419,7 +1423,7 @@ void PicoMemSetup32x(void) unsigned int rs; int i; - Pico32xMem = calloc(1, sizeof(*Pico32xMem)); + Pico32xMem = plat_mmap(0x06000000, sizeof(*Pico32xMem)); if (Pico32xMem == NULL) { elprintf(EL_STATUS, "OOM"); return;