also add writes while we're at it, we know Gericom's gonna abuse them someday :P
This commit is contained in:
parent
f4c8202b1a
commit
7897bd387b
52
src/NDS.cpp
52
src/NDS.cpp
|
@ -3182,6 +3182,23 @@ void NDS::ARM9IOWrite8(u32 addr, u8 val)
|
|||
NDSCartSlot.WriteSPIData(val);
|
||||
return;
|
||||
|
||||
case 0x040001A4:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFFFFFF00) | val);
|
||||
return;
|
||||
case 0x040001A5:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFFFF00FF) | (val << 8));
|
||||
return;
|
||||
case 0x040001A6:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFF00FFFF) | (val << 16));
|
||||
return;
|
||||
case 0x040001A7:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0x00FFFFFF) | (val << 24));
|
||||
return;
|
||||
|
||||
case 0x040001A8: if (!(ExMemCnt[0] & (1<<11))) NDSCartSlot.SetROMCommand(0, val); return;
|
||||
case 0x040001A9: if (!(ExMemCnt[0] & (1<<11))) NDSCartSlot.SetROMCommand(1, val); return;
|
||||
case 0x040001AA: if (!(ExMemCnt[0] & (1<<11))) NDSCartSlot.SetROMCommand(2, val); return;
|
||||
|
@ -3311,6 +3328,15 @@ void NDS::ARM9IOWrite16(u32 addr, u16 val)
|
|||
NDSCartSlot.WriteSPIData(val & 0xFF);
|
||||
return;
|
||||
|
||||
case 0x040001A4:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFFFF0000) | val);
|
||||
return;
|
||||
case 0x040001A6:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0x0000FFFF) | (val << 16));
|
||||
return;
|
||||
|
||||
case 0x040001A8:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
{
|
||||
|
@ -3954,6 +3980,23 @@ void NDS::ARM7IOWrite8(u32 addr, u8 val)
|
|||
NDSCartSlot.WriteSPIData(val);
|
||||
return;
|
||||
|
||||
case 0x040001A4:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFFFFFF00) | val);
|
||||
return;
|
||||
case 0x040001A5:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFFFF00FF) | (val << 8));
|
||||
return;
|
||||
case 0x040001A6:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFF00FFFF) | (val << 16));
|
||||
return;
|
||||
case 0x040001A7:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0x00FFFFFF) | (val << 24));
|
||||
return;
|
||||
|
||||
case 0x040001A8: if (ExMemCnt[0] & (1<<11)) NDSCartSlot.SetROMCommand(0, val); return;
|
||||
case 0x040001A9: if (ExMemCnt[0] & (1<<11)) NDSCartSlot.SetROMCommand(1, val); return;
|
||||
case 0x040001AA: if (ExMemCnt[0] & (1<<11)) NDSCartSlot.SetROMCommand(2, val); return;
|
||||
|
@ -4059,6 +4102,15 @@ void NDS::ARM7IOWrite16(u32 addr, u16 val)
|
|||
NDSCartSlot.WriteSPIData(val & 0xFF);
|
||||
return;
|
||||
|
||||
case 0x040001A4:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFFFFFF00) | val);
|
||||
return;
|
||||
case 0x040001A6:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
NDSCartSlot.WriteROMCnt((NDSCartSlot.GetROMCnt() & 0xFF00FFFF) | (val << 16));
|
||||
return;
|
||||
|
||||
case 0x040001A8:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue