all repos — mgba @ 3f066f1ab68d16e3350ab15140f3f01204929ef3

mGBA Game Boy Advance Emulator

DS Memory: Fix up LDM I/O
Vicki Pfau vi@endrift.com
Tue, 31 Jan 2017 23:39:19 -0800
commit

3f066f1ab68d16e3350ab15140f3f01204929ef3

parent

5373e7004a3b505482a685588553ded0a0d1d3d8

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/ds/memory.csrc/ds/memory.c

@@ -531,7 +531,7 @@ mLOG(DS_MEM, STUB, "Unimplemented DS7 LDM: %08X", address);

}); break; case DS_REGION_IO: - LDM_LOOP(value = DS7IORead(ds, address & 0x00FFFFFC) | (DS7IORead(ds, (address & 0x00FFFFFC) | 2) << 16)); + LDM_LOOP(value = DS7IORead32(ds, address)); break; default: mLOG(DS_MEM, STUB, "Unimplemented DS7 LDM: %08X", address);

@@ -970,6 +970,9 @@ LOAD_32(value, address & (DS_SIZE_RAM - 1), memory->ram);

} else { mLOG(DS_MEM, STUB, "Unimplemented DS9 LDM: %08X", address); }); + break; + case DS_REGION_IO: + LDM_LOOP(value = DS9IORead32(ds, address)); break; default: LDM_LOOP(if ((address & ~(DS9_SIZE_DTCM - 1)) == memory->dtcmBase) {