GBA Memory: Fix initial DMA state

This commit is contained in:
Jeffrey Pfau 2015-01-14 00:28:49 -08:00
parent 3c09508101
commit b7698ae962
2 changed files with 3 additions and 1 deletions

View File

@ -31,6 +31,7 @@ Bugfixes:
- GBA BIOS: Fix HuffUnComp to work when games pass an invalid bit length - GBA BIOS: Fix HuffUnComp to work when games pass an invalid bit length
- GBA BIOS: Fix GetBiosChecksum to return the value of a real GBA, regardless of used BIOS - GBA BIOS: Fix GetBiosChecksum to return the value of a real GBA, regardless of used BIOS
- GBA Memory: Properly bounds-check VRAM accesses - GBA Memory: Properly bounds-check VRAM accesses
- GBA Memory: Fix initial DMA state
Misc: Misc:
- Qt: Disable sync to video by default - Qt: Disable sync to video by default
- GBA: Exit cleanly on FATAL if the port supports it - GBA: Exit cleanly on FATAL if the port supports it

View File

@ -102,9 +102,10 @@ void GBAMemoryReset(struct GBA* gba) {
memset(gba->memory.dma, 0, sizeof(gba->memory.dma)); memset(gba->memory.dma, 0, sizeof(gba->memory.dma));
int i; int i;
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
gba->memory.dma[i].count = 0x10000; gba->memory.dma[i].count = 0x4000;
gba->memory.dma[i].nextEvent = INT_MAX; gba->memory.dma[i].nextEvent = INT_MAX;
} }
gba->memory.dma[3].count = 0x10000;
gba->memory.activeDMA = -1; gba->memory.activeDMA = -1;
gba->memory.nextDMA = INT_MAX; gba->memory.nextDMA = INT_MAX;
gba->memory.eventDiff = 0; gba->memory.eventDiff = 0;