-fixed wad installation and missing fonts in the default theme when using older cIOS versions

-hide automatic mios installation
-updated german.ini
This commit is contained in:
fix94.1 2013-08-22 16:39:38 +00:00
parent ffd6e6745a
commit e5336404f4
6 changed files with 42 additions and 23 deletions

View File

@ -43,16 +43,19 @@ static const u8 hash_patch[] = { 0x20, 0x00, 0x23, 0xA2 };
static const u8 new_hash_old[] = { 0x20, 0x07, 0x4B, 0x0B }; static const u8 new_hash_old[] = { 0x20, 0x07, 0x4B, 0x0B };
static const u8 new_hash_patch[] = { 0x20, 0x00, 0x4B, 0x0B }; static const u8 new_hash_patch[] = { 0x20, 0x00, 0x4B, 0x0B };
void PatchIOS(void) void PatchIOS(bool patch_all)
{ {
__ES_Close(); __ES_Close();
write16(MEM_PROT, 0); write16(MEM_PROT, 0);
/* Do Patching */ /* Do Patching */
apply_patch("isfs_permissions", isfs_perm_old, isfs_perm_patch, sizeof(isfs_perm_patch)); apply_patch("isfs_permissions", isfs_perm_old, isfs_perm_patch, sizeof(isfs_perm_patch));
if(patch_all)
{
apply_patch("es_setuid", setuid_old, setuid_patch, sizeof(setuid_patch)); apply_patch("es_setuid", setuid_old, setuid_patch, sizeof(setuid_patch));
apply_patch("es_identify", es_identify_old, es_identify_patch, sizeof(es_identify_patch)); apply_patch("es_identify", es_identify_old, es_identify_patch, sizeof(es_identify_patch));
apply_patch("hash_check", hash_old, hash_patch, sizeof(hash_patch)); apply_patch("hash_check", hash_old, hash_patch, sizeof(hash_patch));
apply_patch("new_hash_check", new_hash_old, new_hash_patch, sizeof(new_hash_patch)); apply_patch("new_hash_check", new_hash_old, new_hash_patch, sizeof(new_hash_patch));
}
/* Reinit */ /* Reinit */
write16(MEM_PROT, 1); write16(MEM_PROT, 1);
__ES_Init(); __ES_Init();

View File

@ -6,7 +6,7 @@ extern "C"
#ifndef _PATCHER_H_ #ifndef _PATCHER_H_
#define _PATCHER_H_ #define _PATCHER_H_
void PatchIOS(void); void PatchIOS(bool patch_all);
#endif #endif

View File

@ -1023,8 +1023,7 @@ void Nand::Init_ISFS()
{ {
if(isfs_inited) if(isfs_inited)
return; return;
if(IOS_GetVersion() < 222) PatchIOS(IOS_GetVersion() < 222);
PatchIOS();
usleep(1000); usleep(1000);
gprintf("Init ISFS\n"); gprintf("Init ISFS\n");
ISFS_Initialize(); ISFS_Initialize();

View File

@ -816,9 +816,9 @@ void CMenu::_launch(const dir_discHdr *hdr)
#define QFIDN 6 #define QFIDN 6
static const char *qfid[QFIDN] = { static const char *qfid[QFIDN] = {
"GGPE01", //Mario Kart Arcade GP "GGPE01", //Mario Kart Arcade GP
"GGPE02", //Mario Kart Arcade GP "GGPE02", //Mario Kart Arcade GP 2
"GFZJ8P", //F-Zero AX "GFZJ8P", //F-Zero AX
"GVSJ8P", // VirtuaStriker4 "GVSJ8P", // Virtua Striker 4
"GVS46E", // Virtua Striker 4 Ver.2006 "GVS46E", // Virtua Striker 4 Ver.2006
"GVS46J", // Virtua Striker 4 Ver.2006 "GVS46J", // Virtua Striker 4 Ver.2006
}; };
@ -871,6 +871,8 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
if(loader == 0) //auto selected if(loader == 0) //auto selected
{ {
gprintf("Auto installing MIOS\n");
_showWaitMessage();
for(u8 i = 0; i < QFIDN; i++) for(u8 i = 0; i < QFIDN; i++)
{ {
if(strncmp(id, qfid[i], strlen(qfid[i])) == 0) if(strncmp(id, qfid[i], strlen(qfid[i])) == 0)
@ -1223,7 +1225,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
setLanguage(language); setLanguage(language);
ocarina_load_code(cheatFile, cheatSize); ocarina_load_code(cheatFile, cheatSize);
NandHandle.Patch_AHB(); /* Identify may takes it */ NandHandle.Patch_AHB(); /* Identify may takes it */
PatchIOS(); /* Patch for everything */ PatchIOS(true); /* Patch for everything */
Identify(gameTitle); Identify(gameTitle);
ExternalBooter_ChannelSetup(gameTitle, use_dol); ExternalBooter_ChannelSetup(gameTitle, use_dol);
WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, 0, TYPE_CHANNEL, use_led); WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, 0, TYPE_CHANNEL, use_led);

View File

@ -53,11 +53,12 @@ void skip_align(FILE *f, u32 size)
int isfs_WriteFile(const char *app_name, const void *content, u32 size) int isfs_WriteFile(const char *app_name, const void *content, u32 size)
{ {
s32 fd = -1;
memset(&ISFS_Path, 0, ISFS_MAXPATH); memset(&ISFS_Path, 0, ISFS_MAXPATH);
strcpy(ISFS_Path, app_name); strcpy(ISFS_Path, app_name);
ISFS_Delete(ISFS_Path); ISFS_Delete(ISFS_Path);
ISFS_CreateFile(ISFS_Path, 0, 3, 3, 3); if(ISFS_CreateFile(ISFS_Path, 0, ISFS_OPEN_RW, ISFS_OPEN_RW, ISFS_OPEN_RW) == 0)
s32 fd = ISFS_Open(ISFS_Path, ISFS_OPEN_WRITE); fd = ISFS_Open(ISFS_Path, ISFS_OPEN_RW);
if(fd < 0) if(fd < 0)
return fd; return fd;
s32 ret = ISFS_Write(fd, content, size); s32 ret = ISFS_Write(fd, content, size);
@ -188,8 +189,8 @@ int installWad(const char *path)
(u32)(tid>>32), (u32)tid&0xFFFFFFFF, content->cid); (u32)(tid>>32), (u32)tid&0xFFFFFFFF, content->cid);
strcpy(ISFS_Path, app_name); strcpy(ISFS_Path, app_name);
ISFS_Delete(ISFS_Path); ISFS_Delete(ISFS_Path);
ISFS_CreateFile(ISFS_Path, 0, 3, 3, 3); if(ISFS_CreateFile(ISFS_Path, 0, ISFS_OPEN_RW, ISFS_OPEN_RW, ISFS_OPEN_RW) == 0)
fd = ISFS_Open(ISFS_Path, ISFS_OPEN_WRITE); fd = ISFS_Open(ISFS_Path, ISFS_OPEN_RW);
if(fd >= 0) if(fd >= 0)
gprintf("Writing Real NAND File %s\n", ISFS_Path); gprintf("Writing Real NAND File %s\n", ISFS_Path);
} }
@ -437,6 +438,13 @@ void CMenu::_Wad(const char *wad_path, bool autoInstall)
return; return;
} }
} }
if(autoInstall)
{
if(mios == true)
installWad(wad_path);
MIOSisDML();
return;
}
u8 part = currentPartition; u8 part = currentPartition;
m_btnMgr.setText(m_wadLblDialog, wfmt(_fmt("wad3", L"Selected %s, after the installation you return to the explorer."), (strrchr(wad_path, '/')+1))); m_btnMgr.setText(m_wadLblDialog, wfmt(_fmt("wad3", L"Selected %s, after the installation you return to the explorer."), (strrchr(wad_path, '/')+1)));
@ -448,9 +456,9 @@ void CMenu::_Wad(const char *wad_path, bool autoInstall)
_mainLoopCommon(); _mainLoopCommon();
if(BTN_HOME_PRESSED || BTN_B_PRESSED) if(BTN_HOME_PRESSED || BTN_B_PRESSED)
break; break;
else if(BTN_A_PRESSED || autoInstall) else if(BTN_A_PRESSED)
{ {
if(m_btnMgr.selected(m_wadBtnInstall) || autoInstall) if(m_btnMgr.selected(m_wadBtnInstall))
{ {
_hideWad(true); _hideWad(true);
m_btnMgr.setProgress(m_wbfsPBar, 0.f); m_btnMgr.setProgress(m_wbfsPBar, 0.f);
@ -473,11 +481,7 @@ void CMenu::_Wad(const char *wad_path, bool autoInstall)
if(result < 0) if(result < 0)
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wad5", L"Installation error %i!"), result)); m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wad5", L"Installation error %i!"), result));
else else
{
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wad6", L"Installation finished with %i hash fails."), result)); m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wad6", L"Installation finished with %i hash fails."), result));
if(autoInstall)
break;
}
} }
else if((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM))) else if((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM)))
{ {

View File

@ -44,10 +44,11 @@ cfga3=Installieren
cfga6=Sprache cfga6=Sprache
cfga7=Thema cfga7=Thema
cfgb1=Ocarina cfgb1=Ocarina
cfgb2=Standard GC Loader
cfgb3=Standard Videomodus cfgb3=Standard Videomodus
cfgb4=Standard Sprache für Spiele cfgb4=Standard Sprache für Spiele
cfgb5=Standard DML Videomodus cfgb5=Standard GC Videomodus
cfgb6=Standard DML Sprache cfgb6=Standard GC Sprache
cfgbnr1=Cover herunterladen cfgbnr1=Cover herunterladen
cfgbnr2=Cover löschen cfgbnr2=Cover löschen
cfgbnr3=Erstellte Banner herunterladen cfgbnr3=Erstellte Banner herunterladen
@ -58,6 +59,7 @@ cfgbt1=Starteinstellungen
cfgbt2=Erzwinge Laden vom cIOS cfgbt2=Erzwinge Laden vom cIOS
cfgbt3=Erzwinge cIOS Version cfgbt3=Erzwinge cIOS Version
cfgbt4=USB Anschluss cfgbt4=USB Anschluss
cfgbt5=Zeige Quellenmenu beim Start
cfgc1=Zurück zu... cfgc1=Zurück zu...
cfgc2=TV-Breite anpassen cfgc2=TV-Breite anpassen
cfgc3=TV-Höhe anpassen cfgc3=TV-Höhe anpassen
@ -67,6 +69,7 @@ cfgc6=Horizontaler Bildversatz
cfgc7=Vertikaler Bildversatz cfgc7=Vertikaler Bildversatz
cfgc8=Starteinstellungen cfgc8=Starteinstellungen
cfgc9=Verwalte Sprachen cfgc9=Verwalte Sprachen
cfgd4=Verzeichnisse Verwalten
cfgd5=Favoritenmodus merken cfgd5=Favoritenmodus merken
cfgd7=Kategorien beim Start anzeigen cfgd7=Kategorien beim Start anzeigen
cfgg1=Einstellungen cfgg1=Einstellungen
@ -145,7 +148,14 @@ cfgne34=Setzen
cfgne35=Zurück cfgne35=Zurück
cfgne36=Pfad = cfgne36=Pfad =
cfgp1=Spielpartition cfgp1=Spielpartition
cfgp2=2D Cover
cfgp3=Netzwerk beim Start initialisieren cfgp3=Netzwerk beim Start initialisieren
cfgp4=Banner Cache
cfgp5=Wii Spiele
cfgp6=GC Spiele
cfgp7=Musik
cfgp8=3D Cover
cfgp9=Erstellte Banner
cfgpl1=Plugins auswählen cfgpl1=Plugins auswählen
cfgs1=Lautstärke Hintergrundmusik cfgs1=Lautstärke Hintergrundmusik
cfgs2=Lautstärke Tasten cfgs2=Lautstärke Tasten
@ -241,6 +251,7 @@ gametdb_code=DE
GC_Def=Standard GC_Def=Standard
GC_DM=DIOS-MIOS GC_DM=DIOS-MIOS
GC_Devo=Devolution GC_Devo=Devolution
GC_Auto=AUTO
genesis=Sega Genesis genesis=Sega Genesis
gm1=Spielen gm1=Spielen
gm2=Zurück gm2=Zurück