diff --git a/CartFiles/NTR_Launcher/R4DS_Ultra.nds b/CartFiles/NTR_Launcher/R4DS_Ultra.nds new file mode 100644 index 0000000..22c5b33 Binary files /dev/null and b/CartFiles/NTR_Launcher/R4DS_Ultra.nds differ diff --git a/arm7/source/main.c b/arm7/source/main.c index 28282b6..906f756 100755 --- a/arm7/source/main.c +++ b/arm7/source/main.c @@ -183,7 +183,21 @@ static void NDSTouchscreenMode() { void VcountHandler() { inputGetAndSend(); } -void VblankHandler(void) { } +void VblankHandler(void) { + if (!touchScreenCheck) { + if(fifoCheckValue32(FIFO_USER_01)) { + if (cdcReadReg(CDC_SOUND, 0x22) == 0xF0) { + // Switch touch mode to NTR + *(u16*)0x4004700 = 0x800F; + NDSTouchscreenMode(); + *(u16*)0x4000500 = 0x807F; + } + REG_GPIO_WIFI |= BIT(8); // Old NDS-Wifi mode + fifoSendValue32(FIFO_USER_02, 1); + touchScreenCheck = true; + } + } +} int main(void) { // read User Settings from firmware @@ -209,21 +223,6 @@ int main(void) { i2cWriteRegister(0x4A, 0x12, 0x00); // Press power-button for auto-reset i2cWriteRegister(0x4A, 0x70, 0x01); // Bootflag = Warmboot/SkipHealthSafety - while (1) { - if (!touchScreenCheck) { - if(fifoCheckValue32(FIFO_USER_01)) { - if (cdcReadReg(CDC_SOUND, 0x22) == 0xF0) { - // Switch touch mode to NTR - *(u16*)0x4004700 = 0x800F; - NDSTouchscreenMode(); - *(u16*)0x4000500 = 0x807F; - } - REG_GPIO_WIFI |= BIT(8); // Old NDS-Wifi mode - fifoSendValue32(FIFO_USER_02, 1); - touchScreenCheck = true; - } - } - swiWaitForVBlank(); - } + while (1)swiWaitForVBlank(); } diff --git a/arm9/hbmenu/hbmenu.cpp b/arm9/hbmenu/hbmenu.cpp index 222dc1e..138e469 100644 --- a/arm9/hbmenu/hbmenu.cpp +++ b/arm9/hbmenu/hbmenu.cpp @@ -57,6 +57,7 @@ static const char* NitroSourceFileList[7] = { "nitro:/NTR_Launcher/EZFlashV.nds", "nitro:/NTR_Launcher/R4iGold_Launcher.nds", "nitro:/NTR_Launcher/R4iSDHC_Demon.nds", + "nitro:/NTR_Launcher/R4DS_Ultra.nds", "nitro:/NTR_Launcher/TTDS.nds" }; @@ -67,6 +68,7 @@ static const char* NitroDestFileList[7] = { "sd:/NTR_Launcher/EZFlashV.nds", "sd:/NTR_Launcher/R4iGold_Launcher.nds", "sd:/NTR_Launcher/R4iSDHC_Demon.nds", + "sd:/NTR_Launcher/R4DS_Ultra.nds", "sd:/NTR_Launcher/TTDS.nds" };