diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-06-21 11:02:42 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-06-21 11:02:42 +0200 |
commit | e43a216ab55f72a6ba1a98046abc3770a4217eb4 (patch) | |
tree | 0aa5621d7f1620ab147f882690b31ba49dc471a6 /src | |
parent | 7132e11bd4cf9edfe5e15506e649cd655945f291 (diff) |
take care of some minor details
Diffstat (limited to 'src')
-rw-r--r-- | src/SPI.cpp | 34 | ||||
-rw-r--r-- | src/Wifi.cpp | 2 |
2 files changed, 21 insertions, 15 deletions
diff --git a/src/SPI.cpp b/src/SPI.cpp index ac40707..eff0a05 100644 --- a/src/SPI.cpp +++ b/src/SPI.cpp @@ -162,22 +162,26 @@ void Reset() UserSettings = userdata; - // fix touchscreen coords - #if 0 - *(u16*)&Firmware[userdata+0x58] = 0; - *(u16*)&Firmware[userdata+0x5A] = 0; - Firmware[userdata+0x5C] = 0; - Firmware[userdata+0x5D] = 0; - *(u16*)&Firmware[userdata+0x5E] = 255<<4; - *(u16*)&Firmware[userdata+0x60] = 191<<4; - Firmware[userdata+0x62] = 255; - Firmware[userdata+0x63] = 191; - - // disable autoboot - //Firmware[userdata+0x64] &= 0xBF; - - *(u16*)&Firmware[userdata+0x72] = CRC16(&Firmware[userdata], 0x70, 0xFFFF); + // TODO evetually: do this in DSi mode + if (NDS::ConsoleType == 0) + { + // fix touchscreen coords + *(u16*)&Firmware[userdata+0x58] = 0; + *(u16*)&Firmware[userdata+0x5A] = 0; + Firmware[userdata+0x5C] = 0; + Firmware[userdata+0x5D] = 0; + *(u16*)&Firmware[userdata+0x5E] = 255<<4; + *(u16*)&Firmware[userdata+0x60] = 191<<4; + Firmware[userdata+0x62] = 255; + Firmware[userdata+0x63] = 191; + + // disable autoboot + //Firmware[userdata+0x64] &= 0xBF; + + *(u16*)&Firmware[userdata+0x72] = CRC16(&Firmware[userdata], 0x70, 0xFFFF); + } +#if 0 // replace MAC address with random address // TODO: make optional? Firmware[0x36] = 0x00; diff --git a/src/Wifi.cpp b/src/Wifi.cpp index ab82724..8188151 100644 --- a/src/Wifi.cpp +++ b/src/Wifi.cpp @@ -188,6 +188,8 @@ void Reset() IOPORT(0x000) = 0x1440; else if (console == 0x20) IOPORT(0x000) = 0xC340; + else if (NDS::ConsoleType == 1 && console == 0x57) + IOPORT(0x000) = 0xC340; // DSi has the modern DS-wifi variant else { printf("wifi: unknown console type %02X\n", console); |