From 0d2daa24d5d5edd918ee484b97fd2925729c4605 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Fri, 17 Apr 2020 22:09:23 -0400 Subject: [PATCH] O2Hawk: fix DJNZ, fixes kill the attacking aliens --- BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs b/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs index 9d82b1fd22..38becc6b0b 100644 --- a/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs +++ b/BizHawk.Emulation.Cores/CPUs/Intel8048/OP_Tables.cs @@ -398,11 +398,13 @@ namespace BizHawk.Emulation.Cores.Components.I8048 } else { + // NOTE: no PC increment here, jump is relative to last 256 address block before increment. + // so for a DJNZ starting at 0xFE does not overflow to 0x100 before the jump PopulateCURINSTR(IDLE, IDLE, DEC8, (ushort)(reg + RB), RD, ALU, PC, - INC11, PC, + IDLE, IDLE, IDLE, IDLE,