add missing 8/16-bit reads to ROMCnt and ROM SPICnt
This commit is contained in:
parent
740305cc25
commit
f4c8202b1a
70
src/NDS.cpp
70
src/NDS.cpp
|
@ -2728,11 +2728,37 @@ u8 NDS::ARM9IORead8(u32 addr)
|
|||
case 0x04000132: return KeyCnt[0] & 0xFF;
|
||||
case 0x04000133: return KeyCnt[0] >> 8;
|
||||
|
||||
case 0x040001A0:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetSPICnt() & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A1:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetSPICnt() >> 8;
|
||||
return 0;
|
||||
|
||||
case 0x040001A2:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.ReadSPIData();
|
||||
return 0;
|
||||
|
||||
case 0x040001A4:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetROMCnt() & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A5:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return (NDSCartSlot.GetROMCnt() >> 8) & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A6:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return (NDSCartSlot.GetROMCnt() >> 16) & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A7:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetROMCnt() >> 24;
|
||||
return 0;
|
||||
|
||||
case 0x040001A8:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetROMCommand(0);
|
||||
|
@ -2884,6 +2910,15 @@ u16 NDS::ARM9IORead16(u32 addr)
|
|||
return NDSCartSlot.ReadSPIData();
|
||||
return 0;
|
||||
|
||||
case 0x040001A4:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetROMCnt() & 0xFFFF;
|
||||
return 0;
|
||||
case 0x040001A6:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetROMCnt() >> 16;
|
||||
return 0;
|
||||
|
||||
case 0x040001A8:
|
||||
if (!(ExMemCnt[0] & (1<<11)))
|
||||
return NDSCartSlot.GetROMCommand(0) |
|
||||
|
@ -3592,11 +3627,37 @@ u8 NDS::ARM7IORead8(u32 addr)
|
|||
|
||||
case 0x04000138: return RTC.Read() & 0xFF;
|
||||
|
||||
case 0x040001A0:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetSPICnt() & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A1:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetSPICnt() >> 8;
|
||||
return 0;
|
||||
|
||||
case 0x040001A2:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.ReadSPIData();
|
||||
return 0;
|
||||
|
||||
case 0x040001A4:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetROMCnt() & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A5:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return (NDSCartSlot.GetROMCnt() >> 8) & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A6:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return (NDSCartSlot.GetROMCnt() >> 16) & 0xFF;
|
||||
return 0;
|
||||
case 0x040001A7:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetROMCnt() >> 24;
|
||||
return 0;
|
||||
|
||||
case 0x040001A8:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetROMCommand(0);
|
||||
|
@ -3697,6 +3758,15 @@ u16 NDS::ARM7IORead16(u32 addr)
|
|||
case 0x040001A0: if (ExMemCnt[0] & (1<<11)) return NDSCartSlot.GetSPICnt(); return 0;
|
||||
case 0x040001A2: if (ExMemCnt[0] & (1<<11)) return NDSCartSlot.ReadSPIData(); return 0;
|
||||
|
||||
case 0x040001A4:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetROMCnt() & 0xFFFF;
|
||||
return 0;
|
||||
case 0x040001A6:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetROMCnt() >> 16;
|
||||
return 0;
|
||||
|
||||
case 0x040001A8:
|
||||
if (ExMemCnt[0] & (1<<11))
|
||||
return NDSCartSlot.GetROMCommand(0) |
|
||||
|
|
Loading…
Reference in New Issue