GB Memory: Fix starting HDMAs during mode 0

This commit is contained in:
Jeffrey Pfau 2016-11-03 13:26:33 -07:00
parent 8c76d0c7f9
commit d68a21fc26
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ Bugfixes:
- GBA Memory: Fix VCOUNT being writable
- GBA Memory: Improve initial skipped BIOS state
- Qt: Only reset window dimensions when first shown
- GB Memory: Fix starting HDMAs during mode 0
Misc:
- SDL: Remove scancode key input
- GBA Video: Clean up unused timers

View File

@ -394,7 +394,7 @@ void GBMemoryWriteHDMA5(struct GB* gb, uint8_t value) {
gb->memory.hdmaDest |= 0x8000;
bool wasHdma = gb->memory.isHdma;
gb->memory.isHdma = value & 0x80;
if (!wasHdma && !gb->memory.isHdma) {
if ((!wasHdma && !gb->memory.isHdma) || gb->video.mode == 0) {
gb->memory.hdmaRemaining = ((value & 0x7F) + 1) * 0x10;
gb->memory.hdmaNext = gb->cpu->cycles;
gb->cpu->nextEvent = gb->cpu->cycles;