mirror of https://github.com/mgba-emu/mgba.git
GBA DMA: Fix DMA start/end timing
This commit is contained in:
parent
6aa5647fc4
commit
ef2b6c78ff
1
CHANGES
1
CHANGES
|
@ -20,6 +20,7 @@ Bugfixes:
|
||||||
- Python: Fix crash when deleting files owned by library
|
- Python: Fix crash when deleting files owned by library
|
||||||
- Python: Make sure GB link object isn't GC'd before GB object
|
- Python: Make sure GB link object isn't GC'd before GB object
|
||||||
- GBA DMA: Fix Display Start DMAs
|
- GBA DMA: Fix Display Start DMAs
|
||||||
|
- GBA DMA: Fix DMA start/end timing
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Savedata: EEPROM performance fixes
|
- GBA Savedata: EEPROM performance fixes
|
||||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||||
|
|
|
@ -237,9 +237,6 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) {
|
||||||
|
|
||||||
gba->cpuBlocked = true;
|
gba->cpuBlocked = true;
|
||||||
if (info->count == info->nextCount) {
|
if (info->count == info->nextCount) {
|
||||||
if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) {
|
|
||||||
cycles += 2;
|
|
||||||
}
|
|
||||||
if (width == 4) {
|
if (width == 4) {
|
||||||
cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion];
|
cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion];
|
||||||
} else {
|
} else {
|
||||||
|
@ -302,6 +299,9 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) {
|
||||||
info->nextDest = dest;
|
info->nextDest = dest;
|
||||||
if (!wordsRemaining) {
|
if (!wordsRemaining) {
|
||||||
info->nextCount |= 0x80000000;
|
info->nextCount |= 0x80000000;
|
||||||
|
if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) {
|
||||||
|
info->when += 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
GBADMAUpdate(gba);
|
GBADMAUpdate(gba);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue