This bug, h.bin will remain open.
Look at loader.s code.
Code: Select all
move $a0, $v0 /* set the return value of the function for arg0 of the next function */
lui $a1, 0x08D2
lui $a2, 1
jal 0x08A88578 /* sceIoRead */
nop
jal 0x08A88590 /* sceIoClose <-- a0 has lost ! */
nop
But $a0 value has been already lost when call sceIoRead .
sceIoClose can not close h.bin!
So I suggest to edit code like this.
Code: Select all
move $a0, $v0 /* set the return value of the function for arg0 of the next function */
lui $a1, 0x08D2
lui $a2, 1
jal 0x08A88578 /* sceIoRead */
move $s0, $a0 /*Backup $a0 value*/
jal 0x08A88590 /* sceIoClose */
move $a0, $s0 /*Restore $a0 value*/


