// loader2 by abu http://sunkone.cjb.net/psp/ // load and jump to 0x08556000 start: slt $4,$0,$29 // $4 = 1 sll $4,$4,5 // $4 = 32 neg $4,$4 // $4 = -32 add $4,$4,$29 // $4 = sp - 32 = filename slt $5,$0,$29 // $5 = 1 = open flags syscall 0x208f // open nop addu $4,$0,$2 // fd slt $5,$0,$29 // $5 = 1 add $6,$0,$5 // $6 = 1 sll $6,$6,2 // $6 = 4 add $6,$6,$5 // $6 = 5 sll $5,$5,7 // $5 = 0x80 add $5,$5,$6 // $5 = 0x85 sll $5,$5,4 // $5 = 0x850 add $5,$5,$6 // $5 = 0x855 sll $5,$5,4 // $5 = 0x8550 slt $6,$0,$29 // $6 = 1 add $6,$6,$6 // $6 = 2 add $5,$5,$6 // $5 = 0x8552 add $5,$5,$6 // $5 = 0x8554 add $5,$5,$6 // $5 = 0x8556 sll $5,$5,12 // $5 = 0x08556000 slt $6,$0,$29 // $6 = 1 sll $6,$6,16 // 0x10000 = 64k syscall 0x2091 // read nop syscall 0x20c7 // sceKernelDcacheWritebackInvalidateAll nop // are these necessary? syscall 0x20cc // sceKernelIcacheInvalidateAll nop // this calculation is tedious but there aren't regs to save it? slt $5,$0,$29 // $5 = 1 add $6,$0,$5 // $6 = 1 sll $6,$6,2 // $6 = 4 add $6,$6,$5 // $6 = 5 sll $5,$5,7 // $5 = 0x80 add $5,$5,$6 // $5 = 0x85 sll $5,$5,4 // $5 = 0x850 add $5,$5,$6 // $5 = 0x855 sll $5,$5,4 // $5 = 0x8550 slt $6,$0,$29 // $6 = 1 add $6,$6,$6 // $6 = 2 add $5,$5,$6 // $5 = 0x8552 add $5,$5,$6 // $5 = 0x8554 add $5,$5,$6 // $5 = 0x8556 sll $5,$5,12 // $5 = 0x08556000 jr $5 nop