Skip to content

Commit

Permalink
Reboot the IOP with compatible modules when not loading from HDD
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Jun 22, 2021
1 parent 9c68085 commit 8ab82b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void RunLoaderElf(char *filename, char *party)
sprintf(bootpath, "%s:%s", party, filename);
}

// Fresh IOP reset will be done in LOADER.ELF
argv[0] = filename;
argv[1] = bootpath;
} else {
Expand Down
2 changes: 2 additions & 0 deletions lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ lang(0, Net_Config, "Net Config")
//---------------------------------------------------------------------------
// New status message for HDD information read, when there are too many partitions.
lang(326, HDD_Information_Read_Overflow, "HDD Information Read (truncated)")
// New status message for rebooting the IOP in compatibility mode
lang(327, Rebooting_IOP_Compatible, "Rebooting the IOP in compatibility mode...")
//---------------------------------------------------------------------------
//End of file: lang.h
//---------------------------------------------------------------------------
5 changes: 5 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1999,6 +1999,11 @@ static void Execute(char *pathin)
if ((t = checkELFheader(fullpath)) <= 0)
goto ELFnotFound;
ELFchecked:
if ((strncmp(party, "hdd0:", 5)) || (strncmp(fullpath, "pfs0:", 5))) {
drawMsg(LNG(Rebooting_IOP_Compatible));
// Reset the IOP so that it is compatible with old software that does not reset the IOP
Reset(1, 1);
}
CleanUp();
RunLoaderElf(fullpath, party);
} else { //Invalid path
Expand Down

0 comments on commit 8ab82b1

Please sign in to comment.