diff --git a/Languages/danish.lang b/Languages/danish.lang index c3c1652c..ef8fac9e 100644 --- a/Languages/danish.lang +++ b/Languages/danish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Værktøjtips" msgid "USB Device not found" msgstr "" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX er beskyttet" diff --git a/Languages/dutch.lang b/Languages/dutch.lang index 7a557572..31044af3 100644 --- a/Languages/dutch.lang +++ b/Languages/dutch.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Hulptekstbalonnen" msgid "USB Device not found" msgstr "USB Apparaat niet gevonden!" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX is vergrendeld" diff --git a/Languages/english.lang b/Languages/english.lang index 49950f11..2a7f6a6a 100644 --- a/Languages/english.lang +++ b/Languages/english.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "" msgid "USB Device not found" msgstr "" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "" diff --git a/Languages/finnish.lang b/Languages/finnish.lang index 0b44171b..b9ebdf3d 100644 --- a/Languages/finnish.lang +++ b/Languages/finnish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "vinkit" msgid "USB Device not found" msgstr "USB-laitetta ei löytynyt" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX on suojattu." diff --git a/Languages/french.lang b/Languages/french.lang index 200542ac..05d2e4fd 100644 --- a/Languages/french.lang +++ b/Languages/french.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Info-bulles" msgid "USB Device not found" msgstr "Périphérique USB introuvable" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX est verrouillé" diff --git a/Languages/german.lang b/Languages/german.lang index c3f704ff..ab15b398 100644 --- a/Languages/german.lang +++ b/Languages/german.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "ToolTips" msgid "USB Device not found" msgstr "USB Gerät nicht gefunden" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX ist geschützt" diff --git a/Languages/italian.lang b/Languages/italian.lang index 4386ae11..c0da667b 100644 --- a/Languages/italian.lang +++ b/Languages/italian.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Suggerimenti" msgid "USB Device not found" msgstr "Dispositivo USB non Trovato" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX è Protetto" diff --git a/Languages/japanese.lang b/Languages/japanese.lang index 0d654751..cd96f6d4 100644 --- a/Languages/japanese.lang +++ b/Languages/japanese.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "ツールヒント" msgid "USB Device not found" msgstr "USBデバイスを検出できませんでした" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loaderは保護されています" diff --git a/Languages/korean.lang b/Languages/korean.lang index 5efdbb7d..b5e0a165 100644 --- a/Languages/korean.lang +++ b/Languages/korean.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Tooltips" msgid "USB Device not found" msgstr "USB 장치가 없습니다." +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB 로더 GX 잠김 상태" diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang index 78c532c8..775eec08 100644 --- a/Languages/norwegian.lang +++ b/Languages/norwegian.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Verktøystips" msgid "USB Device not found" msgstr "USB enhet ikke funnet" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX er beskyttet" diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang index 7edc977b..6090611f 100644 --- a/Languages/portuguese_br.lang +++ b/Languages/portuguese_br.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Dicas" msgid "USB Device not found" msgstr "Dispositivo USB não encontrado" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX está bloqueado" diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang index bbf79ae2..37b318e5 100644 --- a/Languages/portuguese_pt.lang +++ b/Languages/portuguese_pt.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Dicas" msgid "USB Device not found" msgstr "Dispositivo USB não encontrado" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "O USB Loader GX está bloqueado" diff --git a/Languages/russian.lang b/Languages/russian.lang index cd1b7a4a..8a74d9c6 100644 --- a/Languages/russian.lang +++ b/Languages/russian.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Подсказки" msgid "USB Device not found" msgstr "USB устройство не найдено" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX заблокирован" diff --git a/Languages/schinese.lang b/Languages/schinese.lang index 02134925..a11d6c7b 100644 --- a/Languages/schinese.lang +++ b/Languages/schinese.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "工具提示" msgid "USB Device not found" msgstr "找不到 USB 设备" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX 被锁定" diff --git a/Languages/spanish.lang b/Languages/spanish.lang index 4ec81219..00d77e9b 100644 --- a/Languages/spanish.lang +++ b/Languages/spanish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "InfoBurbujas" msgid "USB Device not found" msgstr "USB no encontrado" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX está protegido" diff --git a/Languages/swedish.lang b/Languages/swedish.lang index 8136c1e3..d888b616 100644 --- a/Languages/swedish.lang +++ b/Languages/swedish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Verktygstips" msgid "USB Device not found" msgstr "USB-enhet ej hittad" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX är skyddad" diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang index 8e32fae6..c2135327 100644 --- a/Languages/tchinese.lang +++ b/Languages/tchinese.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "工具提示" msgid "USB Device not found" msgstr "找不到 USB 裝置" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX 被鎖定" diff --git a/Languages/turkish.lang b/Languages/turkish.lang index 63814639..03174eba 100644 --- a/Languages/turkish.lang +++ b/Languages/turkish.lang @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: USB Loader GX\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-05 08:32+0200\n" +"POT-Creation-Date: 2009-07-06 00:43+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -651,6 +651,9 @@ msgstr "Yardimlar" msgid "USB Device not found" msgstr "USB Aygiti bulunamadi" +msgid "USB FAT Partition" +msgstr "" + msgid "USB Loader GX is protected" msgstr "USB Loader GX koruma altinda" diff --git a/source/fatmounter.c b/source/fatmounter.c index 4c8788e5..db0bb8d3 100644 --- a/source/fatmounter.c +++ b/source/fatmounter.c @@ -7,6 +7,9 @@ #include #include "usbloader/usbstorage.h" +#include "settings/cfg.h" + +extern struct SSettings Settings; //these are the only stable and speed is good #define CACHE 8 @@ -14,6 +17,8 @@ int USBDevice_Init() { + if(!Settings.usbfatsupport) + return 1; //closing all open Files write back the cache and then shutdown em! fatUnmount("USB:/"); //right now mounts first FAT-partition @@ -29,6 +34,8 @@ int USBDevice_Init() void USBDevice_deInit() { + if(!Settings.usbfatsupport) + return; //closing all open Files write back the cache and then shutdown em! fatUnmount("USB:/"); } diff --git a/source/main.cpp b/source/main.cpp index a5ad8b1e..53b6b4e0 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -33,8 +33,6 @@ #include "wpad.h" #include "fat.h" -//#define SPECIAL_FOR_ARDI // Fix Problem with Trekstor Classic 250GB - /* Constants */ #define CONSOLE_XCOORD 260 #define CONSOLE_YCOORD 115 @@ -48,22 +46,7 @@ int main(int argc, char *argv[]) { s32 ret2; - u8 preloaded_ios = 0; -#ifdef SPECIAL_FOR_ARDI - if( (ret2 = IOS_ReloadIOS(249)) >=0 ) - preloaded_ios = 249; - else - { - if( (ret2 = IOS_ReloadIOS(222)) >=0 ) - { - load_ehc_module(); - preloaded_ios = 222; - } - } -#endif - SDCard_Init(); // mount SD for loading cfg's - USBDevice_Init(); // and mount USB:/ bool bootDevice_found=false; if(argc >= 1) { @@ -83,33 +66,49 @@ main(int argc, char *argv[]) strcpy(bootDevice, "USB:"); } + ret2 = IOS_ReloadIOS(249); + if(ret2 < 0) { + ret2 = IOS_ReloadIOS(222); + load_ehc_module(); + } + + SDCard_Init(); // mount SD for loading cfg's + USBDevice_Init(); // and mount USB:/ + gettextCleanUp(); - //lang_default(); CFG_Load(); - SDCard_deInit();// unmount SD for reloading IOS - USBDevice_deInit();// unmount USB for reloading IOS - /* Load Custom IOS */ - if(Settings.cios == ios222 && preloaded_ios != 222) { + if(Settings.cios == ios222 && IOS_GetVersion() != 222) { + SDCard_deInit();// unmount SD for reloading IOS + USBDevice_deInit();// unmount USB for reloading IOS ret2 = IOS_ReloadIOS(222); load_ehc_module(); if (ret2 < 0) { Settings.cios = ios249; ret2 = IOS_ReloadIOS(249); } - } else if(preloaded_ios != 249) { + SDCard_Init(); // now mount SD:/ + USBDevice_Init(); // and mount USB:/ + } else if(Settings.cios == ios249 && IOS_GetVersion() != 249) { + SDCard_deInit();// unmount SD for reloading IOS + USBDevice_deInit();// unmount USB for reloading IOS ret2 = IOS_ReloadIOS(249); + if(ret2 < 0) { + Settings.cios = ios222; + ret2 = IOS_ReloadIOS(222); + load_ehc_module(); + } + SDCard_Init(); // now mount SD:/ + USBDevice_Init(); // and mount USB:/ } if (ret2 < 0) { printf("ERROR: cIOS could not be loaded!"); + sleep(5); SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); } - SDCard_Init(); // now mount SD:/ - USBDevice_Init(); // and mount USB:/ - Sys_Init(); /** PAD_Init has to be before InitVideo don't move that **/ @@ -138,3 +137,4 @@ main(int argc, char *argv[]) MainMenu(MENU_CHECK); return 0; } + diff --git a/source/menu.cpp b/source/menu.cpp index e6f78d94..883efdf3 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -1613,8 +1613,6 @@ static int MenuCheck() if(wbfsinit < 0) { sleep(1); - USBDevice_Init(); - SDCard_Init(); } //Spieleliste laden @@ -1623,6 +1621,13 @@ static int MenuCheck() if(menu == MENU_NONE) menu = MENU_DISCLIST; + //for HDDs with issues + if(wbfsinit < 0) { + sleep(1); + USBDevice_Init(); + SDCard_Init(); + } + return menu; } diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index 5ae2992c..465fe874 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -13,7 +13,7 @@ #include "menu.h" #include "filelist.h" #include "sys.h" -#define MAXOPTIONS 12 +#define MAXOPTIONS 13 /*** Extern functions ***/ extern void ResumeGui(); @@ -480,6 +480,7 @@ int MenuSettings() options2.SetName(8, "%s",tr("Rumble")); options2.SetName(10, "%s",tr("Titles from XML")); options2.SetName(11, "%s",tr("Screensaver")); + options2.SetName(12, "%s",tr("USB FAT Partition")); for(int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL); optionBrowser2.SetScrollbar(1); w.Append(&optionBrowser2); @@ -524,6 +525,8 @@ int MenuSettings() options2.SetValue(0, "%s", tr("Default")); else options2.SetValue(0, "%s", languagefile); + if(Settings.usbfatsupport >= settings_off_on_max) + Settings.usbfatsupport = 0; //RUMBLE if (Settings.sinfo == GameID) options2.SetValue(1,"%s",tr("Game ID")); else if (Settings.sinfo == GameRegion) options2.SetValue(1,"%s",tr("Game Region")); @@ -569,6 +572,9 @@ int MenuSettings() else if (Settings.screensaver == 5) options2.SetValue(11,"30 min"); else if (Settings.screensaver == 6) options2.SetValue(11,"1 hour"); + if (Settings.usbfatsupport == on) options2.SetValue(12,"Support ON"); + else if (Settings.usbfatsupport == off) options2.SetValue(12,"Support OFF"); + if(backBtn.GetState() == STATE_CLICKED) { backBtn.ResetState(); @@ -679,7 +685,9 @@ int MenuSettings() case 11: Settings.screensaver++; break; - + case 12: + Settings.usbfatsupport++; + break; } } optionBrowser2.SetEffect(EFFECT_FADE, -20); diff --git a/source/settings/cfg.c b/source/settings/cfg.c index 04075909..c4f826a7 100644 --- a/source/settings/cfg.c +++ b/source/settings/cfg.c @@ -326,6 +326,7 @@ void Global_Default(void) Settings.volume = 80; Settings.sfxvolume = 80; Settings.tooltips = TooltipsOn; + Settings.usbfatsupport = 1; char * empty = ""; snprintf(Settings.unlockCode, sizeof(Settings.unlockCode), empty); Settings.godmode = 1; @@ -988,6 +989,13 @@ void global_cfg_set(char *name, char *val) } return; } + else if (strcmp(name, "usbfatsupport") == 0) { + int i; + if (sscanf(val, "%d", &i) == 1) { + Settings.usbfatsupport = i; + } + return; + } else if (strcmp(name, "titlesOverride") == 0) { int i; if (sscanf(val, "%d", &i) == 1) { @@ -1257,6 +1265,7 @@ bool cfg_save_global()// save global settings fprintf(f, "patchcountrystrings = %d\n ", Settings.patchcountrystrings); fprintf(f, "screensaver = %d\n ", Settings.screensaver); fprintf(f, "error002 = %d\n ", Settings.error002); + fprintf(f, "usbfatsupport = %d\n ", Settings.usbfatsupport); fclose(f); return true; } diff --git a/source/settings/cfg.h b/source/settings/cfg.h index 425ffe33..0d617d81 100644 --- a/source/settings/cfg.h +++ b/source/settings/cfg.h @@ -233,7 +233,7 @@ enum { enum { anti=2, }; - + enum { GameID, @@ -354,6 +354,7 @@ struct SSettings { char Cheatcodespath[100]; char TxtCheatcodespath[100]; short error002; + short usbfatsupport; int titlesOverride; // db_titles char db_url[200]; char db_language[100];