aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-04-24 01:30:30 +0200
committerStapleButter <thetotalworm@gmail.com>2017-04-24 01:30:30 +0200
commit8fd11241172cc3f4b118b1b1940b3c0503d1d0aa (patch)
tree20a7c2b4f10015a1eb40ebb6ecd178a0a2f1883f
parentbdac2467e700d3a932a227642d87e12db7b39f3c (diff)
implement 8bit reads to the joypad ports
-rw-r--r--src/NDS.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 98eda41..629c347 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -1284,6 +1284,9 @@ u8 ARM9IORead8(u32 addr)
{
switch (addr)
{
+ case 0x04000130: return KeyInput & 0xFF;
+ case 0x04000131: return (KeyInput >> 8) & 0xFF;
+
case 0x040001A2: return NDSCart::ReadSPIData();
case 0x040001A8: return NDSCart::ROMCommand[0];
@@ -1883,6 +1886,11 @@ u8 ARM7IORead8(u32 addr)
{
switch (addr)
{
+ case 0x04000130: return KeyInput & 0xFF;
+ case 0x04000131: return (KeyInput >> 8) & 0xFF;
+ case 0x04000136: return (KeyInput >> 16) & 0xFF;
+ case 0x04000137: return KeyInput >> 24;
+
case 0x04000138: return RTC::Read() & 0xFF;
case 0x040001A2: return NDSCart::ReadSPIData();