mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Ensure changing the timing of a DMA reschedules it
This commit is contained in:
parent
7ed38b0a6d
commit
3c5db2b7a1
1
CHANGES
1
CHANGES
|
@ -6,6 +6,7 @@ Bugfixes:
|
||||||
- Qt: Fix .deb dependencies
|
- Qt: Fix .deb dependencies
|
||||||
- GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio
|
- GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio
|
||||||
- Qt: Fix "QOpenGLContext::swapBuffers() called with non-exposed window" warning
|
- Qt: Fix "QOpenGLContext::swapBuffers() called with non-exposed window" warning
|
||||||
|
- GBA Memory: Ensure changing the timing of a DMA reschedules it
|
||||||
|
|
||||||
0.2.0: (2015-04-03)
|
0.2.0: (2015-04-03)
|
||||||
Features:
|
Features:
|
||||||
|
|
|
@ -1252,6 +1252,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);
|
||||||
|
int oldTiming = GBADMARegisterGetTiming(currentDma->reg);
|
||||||
|
int newTiming = GBADMARegisterGetTiming(control);
|
||||||
|
if (oldTiming && oldTiming != newTiming) {
|
||||||
|
wasEnabled = false;
|
||||||
|
}
|
||||||
currentDma->reg = control;
|
currentDma->reg = control;
|
||||||
|
|
||||||
if (GBADMARegisterIsDRQ(currentDma->reg)) {
|
if (GBADMARegisterIsDRQ(currentDma->reg)) {
|
||||||
|
|
Loading…
Reference in New Issue