From 6bc1befc5b55ab45c54e4a4c3d8f047d77d31bbe Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Wed, 26 Jul 2017 09:26:37 -0400 Subject: [PATCH] A7800Hawk: Add Light Gun Support -Needs testing --- .../Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs index 1a9b012e4b..ecea589bc5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/TIA.cs @@ -154,7 +154,14 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk if (!Core.p1_is_2button) { - return Core.p1_fire; + if (!Core.p1_is_lightgun) + { + return Core.p1_fire; + } + else + { + return Core.getLightGunState(1); + } } else if ((Core.m6532._outputB & 0x04) != 0 || (Core.m6532._ddRb & 0x04) != 0x04) { @@ -169,10 +176,16 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk if (maskedAddr == 0x0D) // INPT5 { Core._islag = false; - if (!Core.p2_is_2button) { - return Core.p2_fire; + if (!Core.p2_is_lightgun) + { + return Core.p2_fire; + } + else + { + return Core.getLightGunState(2); + } } else if ((Core.m6532._outputB & 0x10) != 0 || (Core.m6532._ddRb & 0x10) != 0x10) {