DS Memory: Stub out Slot-2 loading for now

This commit is contained in:
Vicki Pfau 2017-03-17 08:35:13 -07:00
parent 632bd566c3
commit cb1b04f1b6
1 changed files with 30 additions and 0 deletions

View File

@ -314,6 +314,11 @@ uint32_t DS7Load32(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
case DS_REGION_IO: case DS_REGION_IO:
value = DS7IORead32(ds, address & 0x00FFFFFC); value = DS7IORead32(ds, address & 0x00FFFFFC);
break; break;
case DS_REGION_SLOT2:
case DS_REGION_SLOT2_EX:
case DS_REGION_SLOT2_SRAM:
value = 0xFFFFFFFF;
break;
case DS_REGION_VRAM: case DS_REGION_VRAM:
if (address < 0x06040000 && memory->vram7[(address & 0x3FFFF) >> 17]) { if (address < 0x06040000 && memory->vram7[(address & 0x3FFFF) >> 17]) {
LOAD_32(value, address & 0x1FFFC, memory->vram7[(address & 0x3FFFF) >> 17]); LOAD_32(value, address & 0x1FFFC, memory->vram7[(address & 0x3FFFF) >> 17]);
@ -360,6 +365,11 @@ uint32_t DS7Load16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
case DS_REGION_IO: case DS_REGION_IO:
value = DS7IORead(ds, address & DS_OFFSET_MASK); value = DS7IORead(ds, address & DS_OFFSET_MASK);
break; break;
case DS_REGION_SLOT2:
case DS_REGION_SLOT2_EX:
case DS_REGION_SLOT2_SRAM:
value = 0xFFFF;
break;
case DS_REGION_VRAM: case DS_REGION_VRAM:
if (address < 0x06040000 && memory->vram7[(address & 0x3FFFF) >> 17]) { if (address < 0x06040000 && memory->vram7[(address & 0x3FFFF) >> 17]) {
LOAD_16(value, address & 0x1FFFE, memory->vram7[(address & 0x3FFFF) >> 17]); LOAD_16(value, address & 0x1FFFE, memory->vram7[(address & 0x3FFFF) >> 17]);
@ -407,6 +417,11 @@ uint32_t DS7Load8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
case DS_REGION_IO: case DS_REGION_IO:
value = (DS7IORead(ds, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF; value = (DS7IORead(ds, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF;
break; break;
case DS_REGION_SLOT2:
case DS_REGION_SLOT2_EX:
case DS_REGION_SLOT2_SRAM:
value = 0xFF;
break;
default: default:
mLOG(DS_MEM, STUB, "Unimplemented DS7 Load8: %08X", address); mLOG(DS_MEM, STUB, "Unimplemented DS7 Load8: %08X", address);
break; break;
@ -839,6 +854,11 @@ uint32_t DS9Load32(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
case DS9_REGION_OAM: case DS9_REGION_OAM:
LOAD_32(value, address & (DS9_SIZE_OAM - 4), ds->video.oam.raw); LOAD_32(value, address & (DS9_SIZE_OAM - 4), ds->video.oam.raw);
break; break;
case DS_REGION_SLOT2:
case DS_REGION_SLOT2_EX:
case DS_REGION_SLOT2_SRAM:
value = 0xFFFFFFFF;
break;
case DS9_REGION_BIOS: case DS9_REGION_BIOS:
// TODO: Fix undersized BIOS // TODO: Fix undersized BIOS
// TODO: Fix masking // TODO: Fix masking
@ -915,6 +935,11 @@ uint32_t DS9Load16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
case DS9_REGION_OAM: case DS9_REGION_OAM:
LOAD_16(value, address & (DS9_SIZE_OAM - 2), ds->video.oam.raw); LOAD_16(value, address & (DS9_SIZE_OAM - 2), ds->video.oam.raw);
break; break;
case DS_REGION_SLOT2:
case DS_REGION_SLOT2_EX:
case DS_REGION_SLOT2_SRAM:
value = 0xFFFF;
break;
case DS9_REGION_BIOS: case DS9_REGION_BIOS:
// TODO: Fix undersized BIOS // TODO: Fix undersized BIOS
// TODO: Fix masking // TODO: Fix masking
@ -983,6 +1008,11 @@ uint32_t DS9Load8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
} }
break; break;
} }
case DS_REGION_SLOT2:
case DS_REGION_SLOT2_EX:
case DS_REGION_SLOT2_SRAM:
value = 0xFF;
break;
case DS9_REGION_BIOS: case DS9_REGION_BIOS:
// TODO: Fix undersized BIOS // TODO: Fix undersized BIOS
// TODO: Fix masking // TODO: Fix masking