Z80 fixes by "Marshmellow" in emails dated 3/8/2009 to Aaron and verified by Juergen.

Changes cycle counts in cc_xy[0x100] from 9 to 11 for:

0xDD2E 0xFD2E - LD IYL/IXL,n
0xDD26 0xFD26 - LD IYH/IXH,n

Also changes interrupt handling default case from:

z80->icount -= z80->cc_op[z80->PCD] + z80->cc_ex[z80->PCD];

to:

z80->icount -= z80->cc_op[z80->0xff] + z80->cc_ex[z80->0xff];
This commit is contained in:
Brian Troha 2009-06-07 15:49:22 +00:00
parent ccab02cf1a
commit 03945be4d0

View File

@ -330,7 +330,7 @@ static const UINT8 cc_ed[0x100] = {
static const UINT8 cc_xy[0x100] = {
4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4,15, 4, 4, 4, 4, 4, 4,
4,14,20,10, 9, 9, 9, 4, 4,15,20,10, 9, 9, 9, 4,
4,14,20,10, 9, 9,11, 4, 4,15,20,10, 9, 9,11, 4,
4, 4, 4, 4,23,23,19, 4, 4,15, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
4, 4, 4, 4, 9, 9,19, 4, 4, 4, 4, 4, 9, 9,19, 4,
@ -3324,7 +3324,7 @@ static void take_interrupt(z80_state *z80)
PUSH(z80, pc);
z80->PCD = irq_vector & 0x0038;
/* RST $xx + 2 cycles */
z80->icount -= z80->cc_op[z80->PCD] + z80->cc_ex[z80->PCD];
z80->icount -= z80->cc_op[z80->0xff] + z80->cc_ex[z80->0xff];
break;
}
}