From 38772dcd89aa83b57a7d8e77c4804ad0cbed8337 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Tue, 2 Jul 2019 20:33:43 -0400 Subject: [PATCH] Vectrex: fix dumb cpu copy paste, fixes scramble and probably others --- BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs b/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs index 5236b52a25..bf407ab55c 100644 --- a/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs +++ b/BizHawk.Emulation.Cores/CPUs/MC6809/Operations.cs @@ -167,7 +167,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 Reg16_d += (Regs[src] & 0xF); FlagH = Reg16_d.Bit(4); - FlagV = (Regs[dest].Bit(7) != Regs[src].Bit(7)) && (Regs[dest].Bit(7) != ans.Bit(7)); + FlagV = (Regs[dest].Bit(7) == Regs[src].Bit(7)) && (Regs[dest].Bit(7) != ans.Bit(7)); FlagN = ans > 127; Regs[dest] = ans; @@ -400,7 +400,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 Reg16_d += ((Regs[src] & 0xF) + c); FlagH = Reg16_d.Bit(4); - FlagV = (Regs[dest].Bit(7) != Regs[src].Bit(7)) && (Regs[dest].Bit(7) != ans.Bit(7)); + FlagV = (Regs[dest].Bit(7) == Regs[src].Bit(7)) && (Regs[dest].Bit(7) != ans.Bit(7)); FlagN = false; Regs[dest] = ans; @@ -486,7 +486,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809 ushort ans = (ushort)(Reg16_d & 0xFFFF); FlagN = ans > 0x7FFF; - FlagV = (D.Bit(15) != Regs[src].Bit(15)) && (D.Bit(15) != ans.Bit(15)); + FlagV = (D.Bit(15) == Regs[src].Bit(15)) && (D.Bit(15) != ans.Bit(15)); D = ans; }