Skip to content

Commit f5f6d64

Browse files
committed
Replace "Lock ARM9 SCFG_EXT" option with LED option
1 parent bbe72bd commit f5f6d64

3 files changed

Lines changed: 37 additions & 15 deletions

File tree

7zfile/_nds/bootstrap.nds

0 Bytes
Binary file not shown.

7zfile/_nds/nds-bootstrap.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SAV_PATH = sd:/nds/savfile.nds
44
ARM7_DONOR_PATH =
55
USE_ARM7_DONOR = 1
66
BOOTSTRAP_PATH = sd:/_nds/bootstrap.nds
7-
NTR_MODE_SWITCH = 0
7+
ROMREAD_LED = 1
88
BOOST_CPU = 0
99
BOOST_VRAM = 0
1010
BOOTSPLASH = 0

titleandsettings/arm9/source/main.cpp

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const char* bootstrapinipath = "sd:/_nds/nds-bootstrap.ini";
4545
bool showlogo = true;
4646
bool gotosettings = false;
4747

48+
const char* romreadled_valuetext;
49+
4850
bool bstrap_useArm7Donor;
4951

5052
bool autorun = false;
@@ -54,7 +56,8 @@ int subtheme = 0;
5456
bool bstrap_boostcpu = false;
5557
bool bstrap_boostvram = false;
5658
bool bstrap_debug = false;
57-
bool bstrap_lockARM9scfgext = false;
59+
int bstrap_romreadled = 0;
60+
// bool bstrap_lockARM9scfgext = false;
5861

5962
void LoadSettings(void) {
6063
// GUI
@@ -75,7 +78,8 @@ void LoadSettings(void) {
7578
bstrap_boostcpu = bootstrapini.GetInt("NDS-BOOTSTRAP", "BOOST_CPU", 0);
7679
bstrap_boostvram = bootstrapini.GetInt("NDS-BOOTSTRAP", "BOOST_VRAM", 0);
7780
bstrap_debug = bootstrapini.GetInt("NDS-BOOTSTRAP", "DEBUG", 0);
78-
bstrap_lockARM9scfgext = bootstrapini.GetInt("NDS-BOOTSTRAP", "LOCK_ARM9_SCFG_EXT", 0);
81+
bstrap_romreadled = bootstrapini.GetInt("NDS-BOOTSTRAP", "ROMREAD_LED", 1);
82+
// bstrap_lockARM9scfgext = bootstrapini.GetInt("NDS-BOOTSTRAP", "LOCK_ARM9_SCFG_EXT", 0);
7983
}
8084

8185
void SaveSettings(void) {
@@ -98,7 +102,8 @@ void SaveSettings(void) {
98102
bootstrapini.SetInt("NDS-BOOTSTRAP", "BOOST_CPU", bstrap_boostcpu);
99103
bootstrapini.SetInt("NDS-BOOTSTRAP", "BOOST_VRAM", bstrap_boostvram);
100104
bootstrapini.SetInt("NDS-BOOTSTRAP", "DEBUG", bstrap_debug);
101-
bootstrapini.SetInt("NDS-BOOTSTRAP", "LOCK_ARM9_SCFG_EXT", bstrap_lockARM9scfgext);
105+
bootstrapini.SetInt("NDS-BOOTSTRAP", "ROMREAD_LED", bstrap_romreadled);
106+
// bootstrapini.SetInt("NDS-BOOTSTRAP", "LOCK_ARM9_SCFG_EXT", bstrap_lockARM9scfgext);
102107
bootstrapini.SaveIniFile(bootstrapinipath);
103108
}
104109

@@ -199,7 +204,7 @@ int main(int argc, char **argv) {
199204

200205
char vertext[12];
201206
// snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); // Doesn't work :(
202-
snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 2, 2);
207+
snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 3, 0);
203208

204209
if (showlogo) {
205210
graphicsInit();
@@ -443,12 +448,21 @@ int main(int argc, char **argv) {
443448
else
444449
printSmall(false, 224, 104, "Off");
445450

446-
printSmall(false, 12, 112, "Lock ARM9 SCFG_EXT");
447-
if(bstrap_lockARM9scfgext)
448-
printSmall(false, 224, 112, "On");
449-
else
450-
printSmall(false, 224, 112, "Off");
451-
451+
printSmall(false, 12, 112, "ROM read LED");
452+
switch(bstrap_romreadled) {
453+
case 0:
454+
default:
455+
romreadled_valuetext = "None";
456+
break;
457+
case 1:
458+
romreadled_valuetext = "WiFi";
459+
break;
460+
case 2:
461+
romreadled_valuetext = "Power";
462+
break;
463+
}
464+
printSmall(false, 208, 112, romreadled_valuetext);
465+
452466
printSmall(false, 12, 120, "Use donor ROM");
453467
if(bstrap_useArm7Donor)
454468
printSmall(false, 224, 120, "On");
@@ -478,9 +492,10 @@ int main(int argc, char **argv) {
478492
printSmall(false, 4, 156, "Displays some text before");
479493
printSmall(false, 4, 164, "launched game.");
480494
} else if (settingscursor == 6) {
481-
printSmall(false, 4, 156, "Locks the ARM9 SCFG_EXT,");
482-
printSmall(false, 4, 164, "avoiding conflict with");
483-
printSmall(false, 4, 172, "recent libnds.");
495+
// printSmall(false, 4, 156, "Locks the ARM9 SCFG_EXT,");
496+
// printSmall(false, 4, 164, "avoiding conflict with");
497+
// printSmall(false, 4, 172, "recent libnds.");
498+
printSmall(false, 4, 156, "Sets LED as ROM read indicator.");
484499
} else if (settingscursor == 7) {
485500
printSmall(false, 4, 156, "Enable or disable use of");
486501
printSmall(false, 4, 164, "donor ROM.");
@@ -546,7 +561,14 @@ int main(int argc, char **argv) {
546561
menuprinted = false;
547562
break;
548563
case 6:
549-
bstrap_lockARM9scfgext = !bstrap_lockARM9scfgext;
564+
// bstrap_lockARM9scfgext = !bstrap_lockARM9scfgext;
565+
if (pressed & KEY_LEFT) {
566+
bstrap_romreadled -= 1;
567+
if (bstrap_romreadled < 0) bstrap_romreadled = 2;
568+
} else if ((pressed & KEY_RIGHT) || (pressed & KEY_A)) {
569+
bstrap_romreadled += 1;
570+
if (bstrap_romreadled > 2) bstrap_romreadled = 0;
571+
}
550572
menuprinted = false;
551573
break;
552574
case 7:

0 commit comments

Comments
 (0)