GBA Memory: More DMA register cleanup

This commit is contained in:
Jeffrey Pfau 2015-11-11 23:33:46 -08:00
parent 2547216972
commit 4783e2eef6
1 changed files with 5 additions and 1 deletions

View File

@ -1371,7 +1371,11 @@ uint16_t GBAMemoryWriteDMACNT_HI(struct GBA* gba, int dma, uint16_t control) {
struct GBAMemory* memory = &gba->memory; struct GBAMemory* memory = &gba->memory;
struct GBADMA* currentDma = &memory->dma[dma]; struct GBADMA* currentDma = &memory->dma[dma];
int wasEnabled = GBADMARegisterIsEnable(currentDma->reg); int wasEnabled = GBADMARegisterIsEnable(currentDma->reg);
if (dma < 3) {
control &= 0xF7E0;
} else {
control &= 0xFFE0; control &= 0xFFE0;
}
currentDma->reg = control; currentDma->reg = control;
if (GBADMARegisterIsDRQ(currentDma->reg)) { if (GBADMARegisterIsDRQ(currentDma->reg)) {