Skip to content

Commit

Permalink
Add R4Ultra NDS file...
Browse files Browse the repository at this point in the history
* R4 Ultra Bootloader added to default stage2 NDS files.
  • Loading branch information
ApacheThunder committed May 16, 2024
1 parent 54734ae commit 5a337c0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
Binary file added CartFiles/NTR_Launcher/R4DS_Ultra.nds
Binary file not shown.
33 changes: 16 additions & 17 deletions arm7/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
}

2 changes: 2 additions & 0 deletions arm9/hbmenu/hbmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};

Expand All @@ -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"
};

Expand Down

0 comments on commit 5a337c0

Please sign in to comment.