brad-lin / FreePSXBoot

Exploit to allow loading arbitrary code on the PSX using only a memory card (no game needed)
MIT License
605 stars 46 forks source link

Fix no-return bootstrap #7

Closed socram8888 closed 3 years ago

socram8888 commented 3 years ago

First commit is a fix for #5. Using a "jal" there overwrites the $ra where the program's entry point was stored.

Second commit modifies the load routine to load backwards, which shaves one instruction (4 bytes) of precious storage.

Third commit fixes and improves the setGP logic, default to not setting it if it's zero in the header, meaning it's not used.