void PicoStateLoadedMS(void)
{
u8 mapper = Pico.ms.mapper;
+ u8 zram_dff0[16]; // TODO xwrite also writes to zram :-/
+
+ memcpy(zram_dff0, PicoMem.zram+0x1ff0, 16);
if (mapper == PMS_MAP_8KBRAM || mapper == PMS_MAP_32KBRAM) {
u16 a = Pico.ms.carthw[0] << 12;
xwrite(a, *(unsigned char *)(PicoMem.vram+0x4000));
xwrite(0xfffe, Pico.ms.carthw[0x0e]);
xwrite(0xffff, Pico.ms.carthw[0x0f]);
}
+ memcpy(PicoMem.zram+0x1ff0, zram_dff0, 16);
}
void PicoFrameMS(void)
switch (is_pal ? -lines_vis : lines_vis) {
case 192: if (y > 218) pv->v_counter = y - (lines-256); break;
case 224: if (y > 234) pv->v_counter = y - (lines-256); break;
+/* case 240: if (y > 252) pv->v_counter = y - (lines-256); break; ? */
case -192: if (y > 242) pv->v_counter = y - (lines-256); break;
case -224: if (y > 258) pv->v_counter = y - (lines-256); break;
case -240: if (y > 266) pv->v_counter = y - (lines-256); break;
Pico32xStateLoaded(0);\r
if (PicoIn.AHW & PAHW_MCD)\r
pcd_state_loaded();\r
+ if (!(PicoIn.AHW & PAHW_SMS)) {\r
+ Pico.video.status &= ~(SR_VB | SR_F);\r
+ Pico.video.status |= ((Pico.video.reg[1] >> 3) ^ SR_VB) & SR_VB;\r
+ Pico.video.status |= (Pico.video.pending_ints << 2) & SR_F;\r
+ }\r
\r
Pico.m.dirtyPal = 1;\r
- Pico.video.status &= ~(SR_VB | SR_F);\r
- Pico.video.status |= ((Pico.video.reg[1] >> 3) ^ SR_VB) & SR_VB;\r
- Pico.video.status |= (Pico.video.pending_ints << 2) & SR_F;\r
-\r
retval = 0;\r
\r
out:\r
s->iff1 = !!zIFF1;
s->iff2 = !!zIFF2;
s->im = zIM;
- s->irq_pending = (Cz80_Get_Reg(&CZ80, CZ80_IRQ) == HOLD_LINE);
+ s->irq_pending = (Cz80_Get_Reg(&CZ80, CZ80_IRQ) != CLEAR_LINE);
s->irq_vector[0] = 0xff;
}
#endif
Cz80_Set_Reg(&CZ80, CZ80_IFF1, s->iff1);
Cz80_Set_Reg(&CZ80, CZ80_IFF2, s->iff2);
zIM = s->im;
- Cz80_Set_Reg(&CZ80, CZ80_IRQ, s->irq_pending ? HOLD_LINE : CLEAR_LINE);
+ Cz80_Set_Reg(&CZ80, CZ80_IRQ, s->irq_pending ? ASSERT_LINE : CLEAR_LINE);
+ Cz80_Set_IRQ(&CZ80, 0, Cz80_Get_Reg(&CZ80, CZ80_IRQ));
return 0;
}
#else