32x: fix FM handling

maybe unmap dram too?
This commit is contained in:
notaz 2013-07-28 02:04:22 +03:00
parent 41946d7023
commit 5609d343e3

View file

@ -831,6 +831,7 @@ static void PicoWrite8_32x_on(u32 a, u32 d)
return;
}
if (!(Pico32x.regs[0] & P32XS_FM)) {
if ((a & 0xfff0) == 0x5180) { // a15180
p32x_vdp_write8(a, d);
return;
@ -843,6 +844,7 @@ static void PicoWrite8_32x_on(u32 a, u32 d)
Pico32x.dirty_pal = 1;
return;
}
}
elprintf(EL_UIO, "m68k unmapped w8 [%06x] %02x @%06x", a, d & 0xff, SekPc);
}
@ -862,6 +864,7 @@ static void PicoWrite16_32x_on(u32 a, u32 d)
return;
}
if (!(Pico32x.regs[0] & P32XS_FM)) {
if ((a & 0xfff0) == 0x5180) { // a15180
p32x_vdp_write16(a, d, NULL); // FIXME?
return;
@ -872,6 +875,7 @@ static void PicoWrite16_32x_on(u32 a, u32 d)
Pico32x.dirty_pal = 1;
return;
}
}
elprintf(EL_UIO, "m68k unmapped w16 [%06x] %04x @%06x", a, d & 0xffff, SekPc);
}
@ -1147,11 +1151,13 @@ static int REGPARM(3) sh2_write8_cs0(u32 a, u32 d, int id)
elprintf(EL_32X, "%csh2 w8 [%08x] %02x @%06x",
id ? 's' : 'm', a, d & 0xff, sh2_pc(id));
if (Pico32x.regs[0] & P32XS_FM) {
if ((a & 0x3ff00) == 0x4100) {
sh2s[id].poll_addr = 0;
p32x_vdp_write8(a, d);
return 0;
}
}
if ((a & 0x3ff00) == 0x4000) {
p32x_sh2reg_write8(a, d, id);
@ -1217,6 +1223,7 @@ static int REGPARM(3) sh2_write16_cs0(u32 a, u32 d, int id)
elprintf(EL_32X, "%csh2 w16 [%08x] %04x @%06x",
id ? 's' : 'm', a, d & 0xffff, sh2_pc(id));
if (Pico32x.regs[0] & P32XS_FM) {
if ((a & 0x3ff00) == 0x4100) {
sh2s[id].poll_addr = 0;
p32x_vdp_write16(a, d, &sh2s[id]);
@ -1228,6 +1235,7 @@ static int REGPARM(3) sh2_write16_cs0(u32 a, u32 d, int id)
Pico32x.dirty_pal = 1;
return 0;
}
}
if ((a & 0x3ff00) == 0x4000) {
p32x_sh2reg_write16(a, d, id);