mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix timing of DMAs
This commit is contained in:
parent
21d51964e8
commit
3d321bc0b9
1
CHANGES
1
CHANGES
|
@ -32,6 +32,7 @@ Bugfixes:
|
||||||
- GBA BIOS: Fix Sqrt sign
|
- GBA BIOS: Fix Sqrt sign
|
||||||
- GBA BIOS: Fix misaligned RLUnCompReadNormalWrite*
|
- GBA BIOS: Fix misaligned RLUnCompReadNormalWrite*
|
||||||
- Qt: Fix race condition with setting sample rate
|
- Qt: Fix race condition with setting sample rate
|
||||||
|
- GBA Memory: Fix timing of DMAs
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Window size command line options are now supported
|
- Qt: Window size command line options are now supported
|
||||||
- Qt: Increase usability of key mapper
|
- Qt: Increase usability of key mapper
|
||||||
|
|
|
@ -1611,9 +1611,10 @@ void GBAMemoryServiceDMA(struct GBA* gba, int number, struct GBADMA* info) {
|
||||||
uint32_t destRegion = dest >> BASE_OFFSET;
|
uint32_t destRegion = dest >> BASE_OFFSET;
|
||||||
int32_t cycles = 2;
|
int32_t cycles = 2;
|
||||||
|
|
||||||
if (source == info->source) {
|
if (source == info->source && dest == info->dest && wordsRemaining == info->count) {
|
||||||
// TODO: support 4 cycles for ROM access
|
if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) {
|
||||||
cycles += 2;
|
cycles += 2;
|
||||||
|
}
|
||||||
if (width == 4) {
|
if (width == 4) {
|
||||||
cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion];
|
cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion];
|
||||||
source &= 0xFFFFFFFC;
|
source &= 0xFFFFFFFC;
|
||||||
|
|
Loading…
Reference in New Issue