Skip to content

Commit 96e6eea

Browse files
committed
Add soft-reset into bootstrap
1 parent f5f6d64 commit 96e6eea

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

7zfile/_nds/bootstrap.nds

2 KB
Binary file not shown.

7zfile/_nds/nds-bootstrap.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ARM7_DONOR_PATH =
55
USE_ARM7_DONOR = 1
66
BOOTSTRAP_PATH = sd:/_nds/bootstrap.nds
77
ROMREAD_LED = 1
8+
SOFT_RESET = 0
89
BOOST_CPU = 0
910
BOOST_VRAM = 0
1011
BOOTSPLASH = 0

titleandsettings/arm9/source/main.cpp

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ bool bstrap_boostcpu = false;
5757
bool bstrap_boostvram = false;
5858
bool bstrap_debug = false;
5959
int bstrap_romreadled = 0;
60+
bool bstrap_softReset = false;
6061
// bool bstrap_lockARM9scfgext = false;
6162

6263
void LoadSettings(void) {
@@ -79,6 +80,7 @@ void LoadSettings(void) {
7980
bstrap_boostvram = bootstrapini.GetInt("NDS-BOOTSTRAP", "BOOST_VRAM", 0);
8081
bstrap_debug = bootstrapini.GetInt("NDS-BOOTSTRAP", "DEBUG", 0);
8182
bstrap_romreadled = bootstrapini.GetInt("NDS-BOOTSTRAP", "ROMREAD_LED", 1);
83+
bstrap_softReset = bootstrapini.GetInt("NDS-BOOTSTRAP", "SOFT_RESET", 0);
8284
// bstrap_lockARM9scfgext = bootstrapini.GetInt("NDS-BOOTSTRAP", "LOCK_ARM9_SCFG_EXT", 0);
8385
}
8486

@@ -103,6 +105,7 @@ void SaveSettings(void) {
103105
bootstrapini.SetInt("NDS-BOOTSTRAP", "BOOST_VRAM", bstrap_boostvram);
104106
bootstrapini.SetInt("NDS-BOOTSTRAP", "DEBUG", bstrap_debug);
105107
bootstrapini.SetInt("NDS-BOOTSTRAP", "ROMREAD_LED", bstrap_romreadled);
108+
bootstrapini.SetInt("NDS-BOOTSTRAP", "SOFT_RESET", bstrap_softReset);
106109
// bootstrapini.SetInt("NDS-BOOTSTRAP", "LOCK_ARM9_SCFG_EXT", bstrap_lockARM9scfgext);
107110
bootstrapini.SaveIniFile(bootstrapinipath);
108111
}
@@ -204,7 +207,7 @@ int main(int argc, char **argv) {
204207

205208
char vertext[12];
206209
// snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); // Doesn't work :(
207-
snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 3, 0);
210+
snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 4, 0);
208211

209212
if (showlogo) {
210213
graphicsInit();
@@ -405,6 +408,9 @@ int main(int argc, char **argv) {
405408
case 7:
406409
yPos = 120;
407410
break;
411+
case 8:
412+
yPos = 128;
413+
break;
408414
}
409415

410416
printSmall(false, 4, yPos, ">");
@@ -468,6 +474,12 @@ int main(int argc, char **argv) {
468474
printSmall(false, 224, 120, "On");
469475
else
470476
printSmall(false, 224, 120, "Off");
477+
478+
printSmall(false, 12, 128, "Return with POWER button");
479+
if(bstrap_softReset)
480+
printSmall(false, 224, 128, "On");
481+
else
482+
printSmall(false, 224, 128, "Off");
471483

472484

473485
if (settingscursor == 0) {
@@ -499,8 +511,15 @@ int main(int argc, char **argv) {
499511
} else if (settingscursor == 7) {
500512
printSmall(false, 4, 156, "Enable or disable use of");
501513
printSmall(false, 4, 164, "donor ROM.");
514+
} else if (settingscursor == 8) {
515+
printSmall(false, 4, 148, "If you have Zelda Four Swords");
516+
printSmall(false, 4, 156, "with 4swordshax installed,");
517+
printSmall(false, 4, 164, "press POWER while playing a ROM");
518+
printSmall(false, 4, 172, "to return to the SRLoader menu.");
502519
}
503520

521+
522+
504523
menuprinted = true;
505524
}
506525

@@ -575,6 +594,10 @@ int main(int argc, char **argv) {
575594
bstrap_useArm7Donor = !bstrap_useArm7Donor;
576595
menuprinted = false;
577596
break;
597+
case 8:
598+
bstrap_softReset = !bstrap_softReset;
599+
menuprinted = false;
600+
break;
578601
}
579602
}
580603

@@ -595,8 +618,8 @@ int main(int argc, char **argv) {
595618
break;
596619
}
597620

598-
if (settingscursor > 7) settingscursor = 0;
599-
else if (settingscursor < 0) settingscursor = 7;
621+
if (settingscursor > 8) settingscursor = 0;
622+
else if (settingscursor < 0) settingscursor = 8;
600623
}
601624

602625
} else {

0 commit comments

Comments
 (0)