mirror of https://github.com/mgba-emu/mgba.git
GBA DMA: Fix invalid DMA handling (fixes #1301)
This commit is contained in:
parent
f9f105a852
commit
cce4b0fcd4
1
CHANGES
1
CHANGES
|
@ -27,6 +27,7 @@ Bugfixes:
|
|||
- Qt: Fix quick load recent accidentally saving (fixes mgba.io/i/1309)
|
||||
- GBA: Fix video timing when skipping BIOS (fixes mgba.io/i/1318)
|
||||
- 3DS: Work around menu freezing (fixes mgba.io/i/1294)
|
||||
- GBA DMA: Fix invalid DMA handling (fixes mgba.io/i/1301)
|
||||
Misc:
|
||||
- GBA Savedata: EEPROM performance fixes
|
||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||
|
|
|
@ -260,15 +260,13 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) {
|
|||
}
|
||||
gba->bus = memory->dmaTransferRegister;
|
||||
cpu->memory.store32(cpu, dest, memory->dmaTransferRegister, 0);
|
||||
memory->dmaTransferRegister &= 0xFFFF0000;
|
||||
memory->dmaTransferRegister |= memory->dmaTransferRegister >> 16;
|
||||
} else {
|
||||
if (sourceRegion == REGION_CART2_EX && (memory->savedata.type == SAVEDATA_EEPROM || memory->savedata.type == SAVEDATA_EEPROM512)) {
|
||||
memory->dmaTransferRegister = GBASavedataReadEEPROM(&memory->savedata);
|
||||
} else {
|
||||
if (source) {
|
||||
memory->dmaTransferRegister = cpu->memory.load16(cpu, source, 0);
|
||||
}
|
||||
memory->dmaTransferRegister |= memory->dmaTransferRegister << 16;
|
||||
} else if (source) {
|
||||
memory->dmaTransferRegister = cpu->memory.load16(cpu, source, 0);
|
||||
memory->dmaTransferRegister |= memory->dmaTransferRegister << 16;
|
||||
}
|
||||
if (destRegion == REGION_CART2_EX) {
|
||||
if (memory->savedata.type == SAVEDATA_AUTODETECT) {
|
||||
|
@ -282,7 +280,6 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) {
|
|||
cpu->memory.store16(cpu, dest, memory->dmaTransferRegister, 0);
|
||||
|
||||
}
|
||||
memory->dmaTransferRegister |= memory->dmaTransferRegister << 16;
|
||||
gba->bus = memory->dmaTransferRegister;
|
||||
}
|
||||
int sourceOffset = DMA_OFFSET[GBADMARegisterGetSrcControl(info->reg)] * width;
|
||||
|
|
Loading…
Reference in New Issue