From 27b5d29f0cfbaa91dee869f74c6a65cfff7a5da3 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sat, 15 Sep 2012 02:36:19 +0000 Subject: [PATCH] Gambatte: soft resets (all 3 lines of code!) Internally, Gambatte implements this as a full hard reset of everything except saveram. There are comments in the code to suggest that this is appropriate real console behavior... --- BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs index 1284660e86..99d84013e4 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Consoles.GB Name = "Gameboy Controller", BoolButtons = { - "Up", "Down", "Left", "Right", "A", "B", "Select", "Start" + "Up", "Down", "Left", "Right", "A", "B", "Select", "Start", "Reset" } }; @@ -107,6 +107,9 @@ namespace BizHawk.Emulation.Consoles.GB foreach (var r in MemoryRefreshers) r.RefreshWrite(); + if (Controller["Reset"]) + LibGambatte.gambatte_reset(GambatteState); + LibGambatte.gambatte_runfor(GambatteState, VideoBuffer, 160, soundbuff, ref nsamp); // upload any modified data to the memory domains