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 misaligned RLUnCompReadNormalWrite*
|
||||
- Qt: Fix race condition with setting sample rate
|
||||
- GBA Memory: Fix timing of DMAs
|
||||
Misc:
|
||||
- Qt: Window size command line options are now supported
|
||||
- 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;
|
||||
int32_t cycles = 2;
|
||||
|
||||
if (source == info->source) {
|
||||
// TODO: support 4 cycles for ROM access
|
||||
cycles += 2;
|
||||
if (source == info->source && dest == info->dest && wordsRemaining == info->count) {
|
||||
if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) {
|
||||
cycles += 2;
|
||||
}
|
||||
if (width == 4) {
|
||||
cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion];
|
||||
source &= 0xFFFFFFFC;
|
||||
|
|
Loading…
Reference in New Issue