GB: Properly clear KEY1 bit 0 when switching speeds
Jeffrey Pfau jeffrey@endrift.com
Tue, 27 Sep 2016 01:42:09 -0700
2 files changed,
2 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -21,6 +21,7 @@ - SDL: Attach rumble in SDL frontend
- GBA Hardware: Improve Game Boy Player rumble behavior - GB: Initialize audio properly - GB MBC: Fix RTC access when no save file is loaded + - GB: Properly clear KEY1 bit 0 when switching speeds Misc: - All: Only update version info if needed - FFmpeg: Encoding cleanup
M
src/gb/gb.c
→
src/gb/gb.c
@@ -572,7 +572,7 @@ mLOG(GB, GAME_ERROR, "Hit illegal stop at address %04X:%02X\n", cpu->pc, cpu->bus);
} if (gb->memory.io[REG_KEY1] & 1) { gb->doubleSpeed ^= 1; - gb->memory.io[REG_KEY1] &= 1; + gb->memory.io[REG_KEY1] = 0; gb->memory.io[REG_KEY1] |= gb->doubleSpeed << 7; } else if (cpu->bus) { if (cpu->components && cpu->components[CPU_COMPONENT_DEBUGGER]) {