1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-22 12:30:41 +00:00

Fixed wrong clearing of D-flag on interrupts for sim65 with 6502X CPU type.

The 65C02 clears the D flag on interrupts while the 6502 does not.

The old code cleared the D flag also for the 6502X CPU type, which
was incorrect.
This commit is contained in:
Sidney Cadot 2024-12-01 09:59:10 +01:00
parent 05a653d3f9
commit e26c17fd50

View File

@ -4104,7 +4104,7 @@ unsigned ExecuteInsn (void)
PUSH (PCL);
PUSH (Regs.SR & ~BF);
SET_IF (1);
if (CPU != CPU_6502)
if (CPU == CPU_65C02)
{
SET_DF (0);
}
@ -4118,7 +4118,7 @@ unsigned ExecuteInsn (void)
PUSH (PCL);
PUSH (Regs.SR & ~BF);
SET_IF (1);
if (CPU != CPU_6502)
if (CPU == CPU_65C02)
{
SET_DF (0);
}