diff --git a/Makefile b/Makefile index 0eed612a..84ca9d31 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ export DEPSDIR := $(CURDIR)/$(BUILD) #--------------------------------------------------------------------------------- # automatically build a list of object files for our project #--------------------------------------------------------------------------------- -SVNREV := $(shell sh ./svnrev.sh) +SVNREV := $(shell bash ./svnrev.sh) export CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) export CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) diff --git a/source/main.cpp b/source/main.cpp index 475d320b..e9511955 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -59,7 +59,7 @@ static void BootUpProblems() bootimage.SetPosition(320-1.2*bootimage.GetWidth()/2, 240-1.2*bootimage.GetHeight()/2); bootimage.SetScale(1.2); - u8 i = 10; + u8 i = 30; while (i > 0) { ret2 = IOS_ReloadIOS(249); @@ -145,15 +145,23 @@ main(int argc, char *argv[]) { if (ret < 0) { ret = IOS_ReloadIOS(222); load_ehc_module(); - if(ret <0) { - ret = WBFS_Init(WBFS_DEVICE_USB); - if(ret < 0) { - InitVideo(); // Initialise video - Menu_Render(); - BootUpProblems(); - startupproblem = true; - ret = 1; - } + + if(ret < 0) { + InitVideo(); // Initialise video + Menu_Render(); + BootUpProblems(); + startupproblem = true; + ret = 1; + } + + ret = WBFS_Init(WBFS_DEVICE_USB); + + if(ret < 0) { + InitVideo(); // Initialise video + Menu_Render(); + BootUpProblems(); + startupproblem = true; + ret = 1; } } diff --git a/source/usbloader/disc.c b/source/usbloader/disc.c index b56cb0c3..f3490897 100644 --- a/source/usbloader/disc.c +++ b/source/usbloader/disc.c @@ -19,7 +19,6 @@ /* Disc pointers */ static u32 *buffer = (u32 *)0x93000000; static u8 *diskid = (u8 *)0x80000000; -static char gameid[8]; void __Disc_SetLowMem(void) { @@ -38,10 +37,12 @@ void __Disc_SetLowMem(void) { *(vu32 *)0x800000F0 = 0x01800000; // Simulated Memory Size //If the game is sam & max: season 1 put this shit in - char tempTxt[10]; - snprintf (tempTxt,sizeof(tempTxt),"%c%c%c%c%c%c", gameid[0], gameid[1], gameid[2], gameid[3], gameid[4], gameid[5]); - if ((strcmp(tempTxt,"R3XE6U")==0)|| - (strcmp(tempTxt,"R3XP6V")==0))/*&& + char gameid[8]; + memset(gameid, 0, 8); + memcpy(gameid, (char*)0x80000000, 6); + + if ((strcmp(gameid,"R3XE6U")==0)|| + (strcmp(gameid,"R3XP6V")==0))/*&& (IOS_GetVersion()==249)&& ((IOS_GetRevision()==10)||(IOS_GetRevision()==13)) I left out the ios check to see if works with other ios versions.*/ { @@ -277,7 +278,8 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa /* Set time */ __Disc_SetTime(); - if (cheat == 1) { + if (cheat == 1) { + char gameid[8]; /* OCARINA STUFF - FISHEARS*/ memset(gameid, 0, 8); memcpy(gameid, (char*)0x80000000, 6); diff --git a/svnrev.sh b/svnrev.sh index 2fc05e31..0407a519 100644 --- a/svnrev.sh +++ b/svnrev.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # rev_new_raw=$(svnversion -n . 2>/dev/null | tr '\n' ' ' | tr -d '\r') [ -n "$rev_new_raw" ] || rev_new_raw=$(SubWCRev . 2>/dev/null | tr '\n' ' ' | tr -d '\r')