2023-11-06 01:56:09 -05:00
|
|
|
// This is the entry point of the ROM.
|
|
|
|
// It is limited to 32-bit MIPS-I code,
|
|
|
|
// because it runs on both the EE and the IOP.
|
|
|
|
//
|
|
|
|
// The task of this relatively short bit of code
|
|
|
|
// is to start the approiate part of the ROM
|
|
|
|
// on the correct processor.
|
|
|
|
//
|
|
|
|
// It's a bit creative, but also a bit annoying.
|
|
|
|
.org 0
|
|
|
|
.set noat
|
|
|
|
|
2023-11-06 06:36:49 -05:00
|
|
|
// externs from each piece of the code
|
2023-11-06 01:56:09 -05:00
|
|
|
.extern _ee_start
|
2023-11-06 06:36:49 -05:00
|
|
|
.extern _iop_start
|
2023-11-06 01:56:09 -05:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
mfc0 $at, $15 // load the PRID
|
|
|
|
sltiu $at, 0x59 // Check for EE PRID
|
|
|
|
bne $15, 0, __iop // Branch if not EE
|
|
|
|
nop
|
|
|
|
j _ee_start // Call EE start routine
|
|
|
|
nop
|
2023-11-06 06:36:49 -05:00
|
|
|
__iop:
|
2023-11-06 01:56:09 -05:00
|
|
|
j __iop
|
2023-11-06 06:36:49 -05:00
|
|
|
//j _iop_start // Call IOP start routine
|
|
|
|
//nop
|