Merge pull request #2547 from sidneycadot/fix-jmp-ind
Fixed the behavior of JMP (ind) in sim65 when it runs with the 6502X CPU type.
This commit is contained in:
@@ -1964,9 +1964,7 @@ static void OPC_6502_6C (void)
|
|||||||
PC = Regs.PC;
|
PC = Regs.PC;
|
||||||
Lo = MemReadWord (PC+1);
|
Lo = MemReadWord (PC+1);
|
||||||
|
|
||||||
if (CPU == CPU_6502)
|
/* Emulate the buggy 6502 behavior */
|
||||||
{
|
|
||||||
/* Emulate the 6502 bug */
|
|
||||||
Cycles = 5;
|
Cycles = 5;
|
||||||
Regs.PC = MemReadByte (Lo);
|
Regs.PC = MemReadByte (Lo);
|
||||||
Hi = (Lo & 0xFF00) | ((Lo + 1) & 0xFF);
|
Hi = (Lo & 0xFF00) | ((Lo + 1) & 0xFF);
|
||||||
@@ -1978,12 +1976,6 @@ static void OPC_6502_6C (void)
|
|||||||
Warning ("6502 indirect jump bug triggered at $%04X, ind addr = $%04X",
|
Warning ("6502 indirect jump bug triggered at $%04X, ind addr = $%04X",
|
||||||
PC, Lo);
|
PC, Lo);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Cycles = 6;
|
|
||||||
Regs.PC = MemReadWord(Lo);
|
|
||||||
}
|
|
||||||
|
|
||||||
ParaVirtHooks (&Regs);
|
ParaVirtHooks (&Regs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user