Skip to content

Commit

Permalink
slot1launch: Do not show Insert a DS game. if already inserted
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed May 16, 2019
1 parent a5786bc commit af169e7
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions slot1launch/arm9/source/main.cpp
Expand Up @@ -44,6 +44,7 @@ bool consoleOn = false;

int main() {

bool consoleInited = false;
bool TWLMODE = false;
bool TWLCLK = false; // false == NTR, true == TWL
bool TWLVRAM = false;
Expand Down Expand Up @@ -123,8 +124,9 @@ int main() {
} else {
sysSetCardOwner (BUS_OWNER_ARM9);

consoleDemoInit();
if (*(u32*)((u8*)io_dldi_data+0x64) & FEATURE_SLOT_NDS) {
consoleDemoInit();
consoleInited = true;
printf ("Please remove your flashcard.\n");
do {
swiWaitForVBlank();
Expand All @@ -135,11 +137,21 @@ int main() {
}
}

printf ("Insert a DS game.\n");
do {
swiWaitForVBlank();
getHeader (ndsHeader);
} while (ndsHeader[0] == 0xffffffff);
getHeader (ndsHeader);

if (ndsHeader[0] == 0xffffffff) {
if (!consoleInited) {
consoleDemoInit();
consoleInited = true;
} else {
consoleClear();
}
printf ("Insert a DS game.\n");
do {
swiWaitForVBlank();
getHeader (ndsHeader);
} while (ndsHeader[0] == 0xffffffff);
}

// Delay half a second for the DS card to stabilise
for (int i = 0; i < 30; i++) {
Expand Down

0 comments on commit af169e7

Please sign in to comment.