ps2rom/rom/iop/iop_start.c

25 lines
512 B
C
Raw Permalink Normal View History

#include "shared/attributes.h"
#include "shared/sio.h"
__noreturn void _iop_start() {
// setup iop
*(char*)0xbf802070 = 9;
// Poke around with the cache control registers
//
*(int*)0xfffe0130 = 0xcc4;
*(int*)0xfffe0130 = 0xcc0;
// it seems like if bit 8 is set here,
// then the cache control is set nearly
// exactly like the PS1 kernel did
if((*(int*)0xbf801450) & 8)
*(int*)0xfffe0130 = 0x1e988;
else
*(int*)0xfffe0130 = 0x1edd8;
SIO_puts("IOP: Hello World from Lily~\n");
while(1)
;
}