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...
This commit is contained in:
goyuken 2012-09-15 02:36:19 +00:00
parent feaa652986
commit 27b5d29f0c
1 changed files with 4 additions and 1 deletions

View File

@ -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