From b5321b8d1e8ff4fd32ea4a142c6ce5d9412ec38c Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sun, 11 Mar 2018 14:49:53 -0400 Subject: [PATCH] Coleco: Finalize Turbo Controller (fixes burn rubber) --- .../Consoles/Coleco/ColecoControllers.cs | 51 ++----------------- .../Consoles/Coleco/ColecoVision.IEmulator.cs | 7 +-- 2 files changed, 7 insertions(+), 51 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs index 3543c1a040..28f00263bd 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoControllers.cs @@ -154,10 +154,11 @@ namespace BizHawk.Emulation.Cores.ColecoVision { if (leftMode) { - byte retval = 0x4B; + + byte retval = 0x4F; if (c.IsPressed(Definition.BoolButtons[0])) retval &= 0x3F; - + int x = (int)c.GetFloat(Definition.FloatControls[0]); int y = (int)c.GetFloat(Definition.FloatControls[1]); @@ -198,55 +199,13 @@ namespace BizHawk.Emulation.Cores.ColecoVision retval |= temp2; - + return retval; } else { - byte retval = 0x4B; - if (c.IsPressed(Definition.BoolButtons[0])) retval &= 0x3F; + byte retval = 0x7F; - int x = (int)c.GetFloat(Definition.FloatControls[0]); - int y = (int)c.GetFloat(Definition.FloatControls[1]); - - float angle; - - if (updateWheel) - { - angle = wheelAngle; - } - else - { - angle = CalcDirection(x, y); - } - - byte temp2 = 0; - - int temp1 = (int)Math.Floor(angle / 1.25); - temp1 = temp1 % 4; - - if (temp1 == 0) - { - temp2 = 0x10; - } - - if (temp1 == 1) - { - temp2 = 0x30; - } - if (temp1 == 2) - { - temp2 = 0x20; - } - - if (temp1 == 3) - { - temp2 = 0x00; - } - - - retval |= temp2; - return retval; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs index 838035d487..a82f635c43 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.IEmulator.cs @@ -139,11 +139,8 @@ namespace BizHawk.Emulation.Cores.ColecoVision _cpu.FlagI = false; if (intPending) { - if (_vdp.EnableInterrupts) - { - _cpu.FlagI = true; - intPending = false; - } + _cpu.FlagI = true; + intPending = false; } temp_1_prev = tempRet1.Bit(4);