diff --git a/source/menu.cpp b/source/menu.cpp index c7fdcc79..1ac93f72 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -1409,7 +1409,7 @@ int MenuDiscList() { altdoldefault = false; } if (altdoldefault) { - int autodol = autoSelectDol((char*)header->id); + int autodol = autoSelectDol((char*)header->id, true); if (autodol>0) { alternatedol = 2; alternatedoloffset = autodol; diff --git a/source/patches/fst.c b/source/patches/fst.c index 4fd76839..dd2b8f54 100644 --- a/source/patches/fst.c +++ b/source/patches/fst.c @@ -64,6 +64,13 @@ u32 do_sd_code(char *filename) fseek(fp, 0, SEEK_END); filesize = ftell(fp); + if(filesize <= 16){ + fclose(fp); + sleep(2); + USBDevice_deInit(); + SDCard_deInit(); + return 0; + } fseek(fp, 0, SEEK_SET); filebuff = (u8*) malloc (filesize); diff --git a/source/prompts/DiscBrowser.cpp b/source/prompts/DiscBrowser.cpp index 004903ac..36960061 100644 --- a/source/prompts/DiscBrowser.cpp +++ b/source/prompts/DiscBrowser.cpp @@ -231,8 +231,9 @@ int DiscBrowse(struct discHdr * header) { } -int autoSelectDol(const char *id) { - //////////ID6///////////////// +int autoSelectDol(const char *id, bool force) { + +// games that always need alt dol, can be forced //Boogie if (strcmp(id,"RBOP69") == 0) return 657;//from isostar @@ -247,29 +248,12 @@ int autoSelectDol(const char *id) { if (strcmp(id,"R5TP69") == 0) return 1493;//from isostar if (strcmp(id,"R5TE69") == 0) return 1493;//starstremr - //Indiana Jones and the Staff of Kings (Fate of Atlantis) - if (strcmp(id,"RJ8P64") == 0) return 8;//from isostar - if (strcmp(id,"RJ8E64") == 0) return 8;//starstremr - //Madden NFL07 if (strcmp(id,"RMDP69") == 0) return 39;//from isostar //Madden NFL08 if (strcmp(id,"RNFP69") == 0) return 1079;//from isostar - //Medal of Honor Heroes - if (strcmp(id,"RMZX69") == 0) return 492;//from isostar - if (strcmp(id,"RMZP69") == 0) return 492;//from isostar - if (strcmp(id,"RMZE69") == 0) return 492;//starstremr - - //Medal of Honor: Heroes 2 - if (strcmp(id,"RM2X69") == 0)return 601;//dj_skual - if (strcmp(id,"RM2P69") == 0)return 517;//MZottel - if (strcmp(id,"RM2E69") == 0) return 492;//Old8oy - - //Metal Slug Anthology - if (strcmp(id,"RMLP7U") == 0) return 56;//from isostar - //Mortal Kombat if (strcmp(id,"RKMP5D") == 0) return 290;//from isostar if (strcmp(id,"RKME5D") == 0) return 290;//starstremr @@ -288,10 +272,6 @@ int autoSelectDol(const char *id) { if (strcmp(id,"RSXP69") == 0) return 377;//previous value was 337 if (strcmp(id,"RSXE69") == 0) return 377;//previous value was 337 - //The House Of The Dead 2 & 3 Return - if (strcmp(id,"RHDP8P") == 0) return 149;//from isostar - if (strcmp(id,"RHDE8P") == 0) return 149;//starstremr - //Tiger Woods 10 if (strcmp(id,"R9OP69") == 0) return 1991;//from isostar if (strcmp(id,"R9OE69") == 0) return 1973;//starstremr @@ -300,12 +280,36 @@ int autoSelectDol(const char *id) { if (strcmp(id,"RVUP8P") == 0) return 16426;//from isostar if (strcmp(id,"RVUE8P") == 0) return 16405;//from isostar - //Wii Sports Resort - if (strcmp(id,"RZTP01") == 0) return 952;//from isostar - if (strcmp(id,"RZTE01") == 0) return 674;//from starstremr - - //if (strcmp(id,"") == 0) return ; //blank line for more dols + + // for games that can't be forced, when the alt dol is not always needed + if (!force) { + + //Indiana Jones and the Staff of Kings (Fate of Atlantis) + if (strcmp(id,"RJ8P64") == 0) return 8;//from isostar + if (strcmp(id,"RJ8E64") == 0) return 8;//starstremr + + //Medal of Honor Heroes + if (strcmp(id,"RMZX69") == 0) return 492;//from isostar + if (strcmp(id,"RMZP69") == 0) return 492;//from isostar + if (strcmp(id,"RMZE69") == 0) return 492;//starstremr + //Medal of Honor: Heroes 2 + if (strcmp(id,"RM2X69") == 0)return 601;//dj_skual + if (strcmp(id,"RM2P69") == 0)return 517;//MZottel + if (strcmp(id,"RM2E69") == 0) return 492;//Old8oy + + //Metal Slug Anthology + if (strcmp(id,"RMLP7U") == 0) return 56;//from isostar + + //The House Of The Dead 2 & 3 Return + if (strcmp(id,"RHDP8P") == 0) return 149;//from isostar + if (strcmp(id,"RHDE8P") == 0) return 149;//starstremr + + //Wii Sports Resort + if (strcmp(id,"RZTP01") == 0) return 952;//from isostar + if (strcmp(id,"RZTE01") == 0) return 674;//from starstremr + } + return -1; } diff --git a/source/prompts/DiscBrowser.h b/source/prompts/DiscBrowser.h index f7cee89d..0efac715 100644 --- a/source/prompts/DiscBrowser.h +++ b/source/prompts/DiscBrowser.h @@ -9,7 +9,7 @@ #define _DISCBROWSER_H_ int DiscBrowse(struct discHdr * header); -int autoSelectDol(const char *id); +int autoSelectDol(const char *id, bool force); int autoSelectDolMenu(const char *id); #endif diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index a1bcc6e9..3281917b 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -2192,7 +2192,7 @@ int GameSettings(struct discHdr * header) { snprintf(alternatedname, sizeof(alternatedname), "%s <%i>", tr("AUTO"),autodol); } else if (autodol!=0) { //check to see if we already know the offset of the correct dol - int autodol = autoSelectDol(filename); + int autodol = autoSelectDol(filename, false); //if we do know that offset ask if they want to use it if (autodol>0) { dolchoice = WindowPrompt(0,tr("Do you want to use the alt dol that is known to be correct?"),tr("Yes"),tr("Pick from a list"));