-Now reports if you are using vIOS by checking the wifi driver date. Thanks to megazig for the idea.

Note: AHB access is needed to check IOS type.
This commit is contained in:
Joostinonline 2014-08-22 17:55:55 +00:00
parent edf4b4ccbb
commit 62e4b77c4a
4 changed files with 34 additions and 14 deletions

View File

@ -79,6 +79,7 @@ typedef struct {
bool infoBoot2Access;
bool infoUSB2;
bool infoVersionPatch;
bool infovIOS;
s32 baseIOS;
s32 mloadVersion;
char info[64];
@ -134,6 +135,7 @@ u32 GetSysMenuVersion(void);
float GetSysMenuNintendoVersion(u32 sysVersion);
u32 GetBoot2Version(void);
u32 GetDeviceID(void);
bool CheckIOSType(u32 start_address);
bool CheckFakeSignature(void);
bool CheckESIdentify(void);
bool CheckFlashAccess(void);

View File

@ -60,7 +60,7 @@ int initLanguages(struct tm today)
TXT_NrOfTitles = "Es wurden %d Titel gefunden.";
TXT_NrOfIOS = "Es wurden %d IOS gefunden, von denen %d funktionslos (Stub) sind.";
TXT_AppTitle = "SysCheck %s von JoostinOnline, Double_A, R2-D2199, und Nano";
TXT_AppIOS = "...laeuft auf dem IOS%d (rev %d).";
TXT_AppIOS = "...laeuft auf dem %sIOS%d (rev %d).";
ERR_AllocateMemory = "Speicher fuer %d Titel konnte nicht zugewiesen werden.";
ERR_OpenFile = "Zugriff auf die Speicherdatei des Berichts fehlgeschlagen!";
MSG_SelectIOS = "Diese IOS werden getestet (Bitte waehlen):";
@ -136,7 +136,7 @@ int initLanguages(struct tm today)
TXT_NrOfTitles = "%d titres trouves.";
TXT_NrOfIOS = "%d IOS trouves sur cette console. %d sont des stubs.";
TXT_AppTitle = "SysCheck %s par JoostinOnline, Double_A, R2-D2199, et Nano";
TXT_AppIOS = "...tourne sous l'IOS%d (rev %d).";
TXT_AppIOS = "...tourne sous l'%sIOS%d (rev %d).";
ERR_AllocateMemory = "Imposible d'allouer la memoire pour %d titres.";
ERR_OpenFile = "Impossible d'ouvrir le fichier.";
MSG_SelectIOS = "Cet IOS sera teste (Choisissez):";
@ -212,7 +212,7 @@ int initLanguages(struct tm today)
TXT_NrOfTitles = "Trovati %d giochi.";
TXT_NrOfIOS = "Trovati %d IOS in questa console. %d di questi sono stub.";
TXT_AppTitle = "SysCheck %s by JoostinOnline, Double_A, R2-D2199, and Nano";
TXT_AppIOS = "...appoggiato all'IOS%d (v. %d).";
TXT_AppIOS = "...appoggiato all'%sIOS%d (v. %d).";
ERR_AllocateMemory = "Impossibile allocare la memoria per %d giochi.";
ERR_OpenFile = "Impossibile aprire il file!";
MSG_SelectIOS = "Verranno testati questi IOS:";
@ -288,7 +288,7 @@ int initLanguages(struct tm today)
TXT_NrOfTitles = "Encontrados %d titulos.";
TXT_NrOfIOS = "Se encontraron %d IOS en esta consola. %d de ellos son stubs.";
TXT_AppTitle = "SysCheck %s por JoostinOnline, Double_A, R2-D2199, y Nano";
TXT_AppIOS = "...corre en IOS%d (rev %d).";
TXT_AppIOS = "...corre en %sIOS%d (rev %d).";
ERR_AllocateMemory = "Imposible asignar memoria para %d titulos.";
ERR_OpenFile = "Imposible abrir el archivo!";
MSG_SelectIOS = "Este IOS sera analizado (Selecciona):";
@ -364,7 +364,7 @@ int initLanguages(struct tm today)
TXT_NrOfTitles = "Found %d titles.";
TXT_NrOfIOS = "Found %d IOS on this console. %d of them are stub.";
TXT_AppTitle = "SysCheck %s by JoostinOnline, Double_A, R2-D2199, and Nano";
TXT_AppIOS = "...runs on IOS%d (rev %d).";
TXT_AppIOS = "...runs on %sIOS%d (rev %d).";
ERR_AllocateMemory = "Unable to allocate the memory for %d titles.";
ERR_OpenFile = "Unable to open the file!";
MSG_SelectIOS = "This IOS will be tested (Please select):";

View File

@ -325,6 +325,15 @@ inline s32 RemoveBogusTMD(void)
}
inline bool CheckIOSType(u32 start_address) {
const char WL_String[] = {0x57, 0x4C, 0x3A, 0x20, 0x30, 0x32, 0x2F, 0x30, 0x32, 0x2F, 0x31, 0x32};
u32 i;
for(i = start_address; i < 0x94000000 - sizeof(WL_String); i++) {
if (memcmp((char*)i, WL_String, sizeof(WL_String)) == 0) return true;
}
return false;
}
// Check fake signatures (aka Trucha Bug)
inline bool CheckFakeSignature(void)
{

View File

@ -322,6 +322,7 @@ int main(int argc, char **argv)
ios[i].infoBoot2Access = false;
ios[i].infoUSB2 = false;
ios[i].infoVersionPatch = false;
ios[i].infovIOS = false;
}
//MountSD();
@ -607,13 +608,20 @@ int main(int argc, char **argv)
ios[i].infoNANDAccess = false;
ios[i].infoBoot2Access = false;
ios[i].infoUSB2 = false;
if (ios[i].titleID == TID_NAND || ios[i].titleID == TID_WFS) ios[i].infovIOS = true;
}
else
{
// Reload IOS
gprintf("// IOS_ReloadIOS(%d)\n", ios[i].titleID);
logfile("// IOS_ReloadIOS(%d)\r\n", ios[i].titleID);
IOS_ReloadIOS(ios[i].titleID);
IosPatch_FULL(false, false, false, false, ios[i].titleID);
// Test IOS type
gprintf("// Test IOS type\n");
logfile("// Test IOS type\r\n");
ios[i].infovIOS = CheckIOSType(*((vu32*)0x80003134));
// Test fake signature
gprintf("// Test fake signature\n");
@ -676,10 +684,11 @@ int main(int argc, char **argv)
// Reload the running IOS
IOS_ReloadIOS(runningIOS);
sprintf(MSG_Buffer, MSG_ReloadIOS, runningIOS, runningIOSRevision);
printLoading(MSG_Buffer);
usleep(1000);
IosPatch_FULL(false, false, false, false, runningIOS);
ios[runningIOS].infovIOS = CheckIOSType(*((vu32*)0x80003134));
CheckTime(current_time, 500);
//--Generate Report--
UpdateTime();
@ -695,7 +704,7 @@ int main(int argc, char **argv)
// Display Title
sprintf(ReportBuffer[APP_TITLE], TXT_AppTitle, TXT_AppVersion);
sprintf(ReportBuffer[APP_IOS], TXT_AppIOS, runningIOS, IOS_GetRevision());
sprintf(ReportBuffer[APP_IOS], TXT_AppIOS, ios[runningIOS].infovIOS ? "v" : "", runningIOS, runningIOSRevision);
SystemInfo.validregion = SystemInfo.systemRegion >= CONF_REGION_JP && SystemInfo.systemRegion <= CONF_REGION_CN;
// Display the console region
@ -907,15 +916,15 @@ int main(int argc, char **argv)
v = 4;
s = 0;
}
sprintf(ReportBuffer[lineOffset], "IOS%d[%d] (rev %d, Info: hermes-v%d.%d):", ios[i].titleID, ios[i].baseIOS, ios[i].revision, v, s);
sprintf(ReportBuffer[lineOffset], "%sIOS%d[%d] (rev %d, Info: hermes-v%d.%d):", ios[i].infovIOS ? "v" : "", ios[i].titleID, ios[i].baseIOS, ios[i].revision, v, s);
} else if(ios[i].baseIOS > 0) {
sprintf(ReportBuffer[lineOffset], "IOS%d[%d] (rev %d, Info: %s):", ios[i].titleID, ios[i].baseIOS, ios[i].revision, ios[i].info);
sprintf(ReportBuffer[lineOffset], "%sIOS%d[%d] (rev %d, Info: %s):", ios[i].infovIOS ? "v" : "", ios[i].titleID, ios[i].baseIOS, ios[i].revision, ios[i].info);
} else if (strcmp(ios[i].info, "NULL") != 0 && !ios[i].isStub) {
sprintf(ReportBuffer[lineOffset], "IOS%d (rev %d, Info: %s):", ios[i].titleID, ios[i].revision, ios[i].info);
sprintf(ReportBuffer[lineOffset], "%sIOS%d (rev %d, Info: %s):", ios[i].infovIOS ? "v" : "", ios[i].titleID, ios[i].revision, ios[i].info);
} else if (ios[i].titleID == 249 && ios[i].revision > 11 && ios[i].revision < 18) {
sprintf(ReportBuffer[lineOffset], "IOS%d[38] (rev %d):", ios[i].titleID, ios[i].revision);
sprintf(ReportBuffer[lineOffset], "%sIOS%d[38] (rev %d):", ios[i].infovIOS ? "v" : "", ios[i].titleID, ios[i].revision);
} else {
sprintf(ReportBuffer[lineOffset], "IOS%d (rev %d):", ios[i].titleID, ios[i].revision);
sprintf(ReportBuffer[lineOffset], "%sIOS%d (rev %d):", ios[i].infovIOS ? "v" : "", ios[i].titleID, ios[i].revision);
}
}