Some notes regarding IOPBTCONF/IOPBTCON2, dvdplayer.irx, osdmain.irx
When OSDSYS and DVD player supporting booting from memory card detect that the argv[0] is from memory card, the behavior regarding IOP reboot with image changes.
Instead of rebooting normally
Code:
for OSDSYS: argument="rom0:UDNL rom0:OSDCNF", flag=0
for DVD player (in EELOAD moduleload2): argument="rom1:UDNL rom1:DVDCNF", flag=0
when booting from memory card
Code:
for OSDSYS (relative to arg0 path, example used): argument="mc0:/BIEXEC-SYSTEM/osdmain.irx", flag=0x100
for DVD player: argument="mc0:/BIEXEC-DVDPLAYER/dvdplayer.irx", flag=0x100
The flag indicates that the module to be loaded is an encrypted (KELF) executable.
The DVD player update's dvdplayer.irx file is a self contained UDNL module that has embedded compressed/scrambled data.
The process basically goes like this:
* Reboot with argument from EE sends a SIF command
* REBOOT module on IRX receives the command, then calls ReBootStart in MODLOAD
* Modules are terminated
* Flags get set to 1 (soft reboot, search IOPBTCON1)
* If command is not empty string, it gets copied to 0x480, and flags gets set to ((eeflags & 0xFF00) | 2) (update reboot, search IOPBTCON2)
* Find and call IOPBOOT from ROM, argument 1 is RAM size in MB, argument 2 is flags, argument 3 is pointer to command, argument 4 is unused (set to zero)
* If passed RAM size is lower than 2MB, then it is set to 2MB
* Reboot data structure is created at 0x20000 and command copied to 0x20020
* ROMDIR structure is searched at 0xBFC00000. Fail -> infinite write 0x80000000 = 0
* IOPBTCONX is searched for, where X is the character representation of (argument2 & 0xFF). e.g. (argument2 & 0xFF) == 2 then IOPBTCON2 is searched for
* If above not found, IOPBTCONF is searched for. Fail -> infinite write 0x80000000 = 1
* Rest of the proceeds basically the same way that UDNL does it, then calls into LOADCORE.
* LOADCORE sets bootmodes 4 and 5 regarding reboot string info, then initializes modules
* MODLOAD post reboot callback then executes the module in the reboot string (e.g. UDNL)
* UDNL reboots (with self contained code, not calling into IOPBOOT), now with the specified modules
IOPBTCON2 contains a reduced set of modules, but includes some modules to allow more update sources.
It excludes:
* EECONF
* SIFCMD
* REBOOT
* LOADFILE
* CDVDFSV
* SIFINIT
* FILEIO
* EESYNC
It includes:
* ADDDRV
* SIO2MAN
* MCMAN