GB: Properly clear KEY1 bit 0 when switching speeds

This commit is contained in:
Jeffrey Pfau 2016-09-27 01:42:09 -07:00
parent 06ee3340f9
commit 3a0b8af70a
2 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ Bugfixes:
- 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

View File

@ -572,7 +572,7 @@ void GBStop(struct LR35902Core* cpu) {
}
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]) {