Skip to content
Snippets Groups Projects
Commit fd3f2c31 authored by Geo Ster's avatar Geo Ster
Browse files

Set correct processor prid

* As this very useful document describes [1]
the BIOS first checks the prid of COP0 to decide
whether to execute the IOP or EE boot sequence.
Without this the BIOS doesn't execute the code we want.
The code sequence that determines this is added below as
suedo assembly

MFC0: GPR[26] = COP0_REG[15] /* Load cop0 prid to GPR 26 */
SLTI: GPR[1] = GPR[26] < 89 /* Check if its value is less than 0x59 and store the bool in GPR 1 */
BNE: if GPR[0] != GPR[1] then pc += 20 /* If the comparison is true then jump +20 to IOP */

[1] https://rust-console.github.io/ps2-bios-book/print.html
[2] https://psi-rockin.github.io/ps2tek/#biosbootprocess
parent ebf1986d
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,9 @@ void EmotionEngine::reset_state() ...@@ -28,6 +28,9 @@ void EmotionEngine::reset_state()
/* Set this to zero */ /* Set this to zero */
gpr[0].quadword = 0; gpr[0].quadword = 0;
/* Set EE pRId */
cop0.prid = 0x00002E20;
} }
void EmotionEngine::fetch_instruction() void EmotionEngine::fetch_instruction()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment