From 9cbc78778fdeeb5332064b5676ab01c658e9bdc9 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Fri, 5 Jul 2019 20:25:03 -0400 Subject: [PATCH] Vectrex: interrupt fixes --- BizHawk.Emulation.Cores/CPUs/MC6809/Interrupts.cs | 6 +++--- BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs | 4 ++++ BizHawk.Emulation.Cores/CPUs/MC6809/OP_Tables.cs | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/CPUs/MC6809/Interrupts.cs b/BizHawk.Emulation.Cores/CPUs/MC6809/Interrupts.cs index 1f352e05fd..4c9e84a74a 100644 --- a/BizHawk.Emulation.Cores/CPUs/MC6809/Interrupts.cs +++ b/BizHawk.Emulation.Cores/CPUs/MC6809/Interrupts.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 { Regs[ADDR] = 0xFFF8; PopulateCURINSTR(IDLE, - IDLE, + SET_E, DEC16, SP, WR_DEC_LO, SP, PC, WR_DEC_HI, SP, PC, @@ -34,7 +34,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 { Regs[ADDR] = 0xFFF6; PopulateCURINSTR(IDLE, - IDLE, + CLR_E, DEC16, SP, WR_DEC_LO, SP, PC, WR_DEC_HI, SP, PC, @@ -51,7 +51,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 { Regs[ADDR] = 0xFFFC; PopulateCURINSTR(IDLE, - IDLE, + SET_E, DEC16, SP, WR_DEC_LO, SP, PC, WR_DEC_HI, SP, PC, diff --git a/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs b/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs index 93d91d6279..352c0eded9 100644 --- a/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs +++ b/BizHawk.Emulation.Cores/CPUs/MC6809/MC6809.cs @@ -78,6 +78,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 public const ushort LD_8 = 67; public const ushort LD_16 = 68; public const ushort LEA = 69; + public const ushort CLR_E = 70; public MC6809() { @@ -360,6 +361,9 @@ namespace BizHawk.Emulation.Common.Components.MC6809 case SET_E: FlagE = true; break; + case CLR_E: + FlagE = false; + break; case ANDCC: Regs[CC] &= Regs[instr_pntr++]; break; diff --git a/BizHawk.Emulation.Cores/CPUs/MC6809/OP_Tables.cs b/BizHawk.Emulation.Cores/CPUs/MC6809/OP_Tables.cs index 45db75e8ab..e5950a074b 100644 --- a/BizHawk.Emulation.Cores/CPUs/MC6809/OP_Tables.cs +++ b/BizHawk.Emulation.Cores/CPUs/MC6809/OP_Tables.cs @@ -472,8 +472,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 RD_INC, ALU, SP, RD_INC_OP, ALU2, SP, SET_ADDR, US, ALU, ALU2, RD_INC, ALU, SP, - RD_INC_OP, ALU2, SP, - SET_ADDR, PC, ALU, ALU2); + RD_INC_OP, ALU2, SP, SET_ADDR, PC, ALU, ALU2); IRQS = 14; }