Skip to content

Commit e4ae42b

Browse files
committed
tidy output & tell no card plugged
1 parent 06297f5 commit e4ae42b

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/main.c

+14-9
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ int main(int argc, char** argv) {
7777
sio_puts("> mechaemu update binder\n> BuilDate: "__DATE__ " " __TIME__ "\n");
7878
while (!SifIopRebootBuffer(ioprp, size_ioprp)) {}; // we need homebrew FILEIO
7979
sio_puts("> Waiting for SifIopSync()");
80+
memset(ROMVER, 0, sizeof(ROMVER));
8081
while (!SifIopSync()) {}; // wait for IOP to reboot
8182
sio_puts("> startup services");
8283
SifInitIopHeap(); // Initialize SIF services for loading modules and files.
@@ -87,7 +88,6 @@ int main(int argc, char** argv) {
8788
scr_setCursor(0);
8889
sleep(2);
8990
sio_puts("> pull romver");
90-
memset(ROMVER, 0, sizeof(ROMVER));
9191
GetRomName(ROMVER);
9292
//scr_printf("\tConsole model: %s\n", ModelNameGet());
9393
//scr_printf("\tConsole ID: 0x%x\n", getConsoleID());
@@ -103,7 +103,11 @@ LOADMODULE(ppctty_irx, NULL);
103103
LOADMODULE(ps2dev9_irx, NULL);
104104
LOADMODULE(udptty_standalone_irx, NULL);
105105
#endif
106-
scr_printf(".\n\t ============ OG Card Tester ============\n");
106+
const char* title = " OG Card Tester ";
107+
scr_printf(".\n");
108+
for (int x=0; x<(80-strlen(title))/2;x++) scr_printf("=");
109+
scr_printf("%s", title);
110+
for (int x=0; x<(80-strlen(title))/2;x++) scr_printf("=");
107111
scr_printf("\tCoded by El_isra\n");
108112
//scr_printf("\thttps://github.com/israpps/system2x6-dongle-dumper\n");
109113
scr_printf("\tConsole ROMVER: %s\n", ROMVER);
@@ -200,37 +204,38 @@ int loadmodulemc() {
200204
mcInit(MC_TYPE_XMC);
201205
for (int i = 0; i < 2; i++)
202206
{
207+
scr_setfontcolor(0xFFFFFF);
203208
scr_printf("\n\n\tmc%d: ", i );
204209
int a = 1;
205210
int mcformatted= MC_UNFORMATTED, mctype = sceMcTypeNoCard, mcfreeSpace = 0, ret;
206211
mcGetInfo(i, 0, &mctype, &mcfreeSpace, &mcformatted);
207212
mcSync(0, NULL, &ret);
208-
scr_setfontcolor(0xFFFFFF);
209213

210214

211215
if (mctype != sceMcTypePS2 ) {scr_setfontcolor(0x0000CC); a=0;}
212216
usleep(rand()%600000);
213-
scr_printf("CardType:%d ", mctype );
217+
scr_printf("CardType:%d ", mctype);
214218
scr_setfontcolor(0xFFFFFF);
215219
usleep(rand()%600000);
216220
scr_printf("FreeSpace:%04d ", mcfreeSpace );
217-
if (mcformatted != MC_FORMATTED ) {scr_setfontcolor(0x0000CC); a=0;}
218-
usleep(rand()%600000);
219-
scr_printf("Formatted:%d\n", mcformatted);
221+
if (mcformatted != MC_FORMATTED) {scr_setfontcolor(0x0000CC); a=0;}
220222
usleep(rand()%600000);
223+
scr_printf("Formatted:%d ", mcformatted);
224+
scr_printf("McSync:%d\n", ret);
221225
if (a) {
222226
scr_setfontcolor(0x00FF00);
223227
scr_printf("\t\tThe card was successfully authenticated with developer magicgate\n");
224228
} else {
225229
scr_setfontcolor(0x0000CC);
226-
scr_printf("\t\tCannot auth card with dev keys.\n\t\t\tCard is bootleg or maybe arcade/prototype card\n");
230+
if (ret == -11) scr_printf("\t\tNo memory card connected?\n");
231+
else
232+
scr_printf("\t\tCould not auth card with developer magicgate. card might not be OG\n");
227233
}
228234

229235
}
230236

231237
return 0;
232238
nocard:
233-
scr_printf("\tCannot auth card with dev keys\n\tCard is bootleg...\n\tOr maybe arcade/prototype card\n");
234239
scr_setfontcolor(0xFFFFFF);
235240
return -1;
236241
}

0 commit comments

Comments
 (0)