Load File
Jump to navigation
Jump to search
# ROUTINE: LOAD FILE (0x13bc14) # Seems to load a file into RAM. # Async function. # Parameters: # r4 = (fileIndex) File ID/index to load into RAM # 0x0c = ETC.OUT 8013bc14: 3c028016 lui r2,0x8016 8013bc18: 8c426004 lw r2,0x6004(r2) # *0x80166004 8013bc1c: 27bdffe8 addiu r29,r29,-0x0018 8013bc20: afb00010 sw r16,0x0010(r29) 8013bc24: 00808021 addu r16,r4,r0 # fileIndex 8013bc28: 0804ef10 j 0x8013bc40 8013bc2c: afbf0014 sw r31,0x0014(r29) # while ((*0x80166004 != 0) or (*0x80166008 != 0)) { 8013bc30: 0c0532a0 jal 0x8014ca80 # Switch To Next Thread (); 8013bc34: 00000000 nop 8013bc38: 3c028016 lui r2,0x8016 8013bc3c: 8c426004 lw r2,0x6004(r2) # *0x80166004 8013bc40: 00000000 nop 8013bc44: 1440fffa bne r2,r0,0x8013bc30 8013bc48: 00000000 nop # 8013bc4c: 3c028016 lui r2,0x8016 8013bc50: 8c426008 lw r2,0x6008(r2) # *0x80166008 8013bc54: 00000000 nop 8013bc58: 1440fff5 bne r2,r0,0x8013bc30 8013bc5c: 00000000 nop # } 8013bc60: 3c018016 lui r1,0x8016 8013bc64: ac306004 sw r16,0x6004(r1) # *0x80166004 = fileIndex 8013bc68: 12000008 beq r16,r0,0x8013bc8c # while (*0x80166004 != 0) { 8013bc6c: 00000000 nop # 8013bc70: 0c0532a0 jal 0x8014ca80 # Switch To Next Thread (); 8013bc74: 00000000 nop 8013bc78: 3c028016 lui r2,0x8016 8013bc7c: 8c426004 lw r2,0x6004(r2) # *0x80166004 8013bc80: 00000000 nop 8013bc84: 1440fffa bne r2,r0,0x8013bc70 8013bc88: 00000000 nop # } 8013bc8c: 3c038017 lui r3,0x8017 8013bc90: 94633c80 lhu r3,0x3c80(r3) # *0x80173c80 8013bc94: 34020001 ori r2,r0,0x0001 # 1 8013bc98: 14620003 bne r3,r2,0x8013bca8 # if (*0x80173c80 == 1) { 8013bc9c: 00000000 nop 8013bca0: 0c053256 jal 0x8014c958 # Stop Current Thread (); 8013bca4: 00000000 nop 8013bca8: 8fbf0014 lw r31,0x0014(r29) # } 8013bcac: 8fb00010 lw r16,0x0010(r29) 8013bcb0: 27bd0018 addiu r29,r29,0x0018 8013bcb4: 03e00008 jr r31 8013bcb8: 00000000 nop