fix boot disassembly to match original file

This commit is contained in:
Connor Olding 2018-09-01 05:38:14 +02:00
parent 19fd014e88
commit c020ccdb10
4 changed files with 10 additions and 9 deletions

View File

@ -179,7 +179,10 @@ fill 0xD0
origin 0x0000
base 0x1000
j label_1054
// quirk with the addressing used in the boot file:
constant BOOT_IMEM_ADDR(0xA4000000) // doesn't affect functionality
j label_1054 | BOOT_IMEM_ADDR
addi at, r0, TASK_START
label_1008:
@ -195,7 +198,7 @@ label_1020:
mfc0 a0, DMA_BUSY // wait until it finishes
bnez a0,-
nop
jal func_103C // check error status
jal func_103C | BOOT_IMEM_ADDR // check error status
nop
jr a3 // jump to the new code we just loaded
mtc0 r0, SEMAPHORE
@ -219,7 +222,7 @@ label_1054:
andi v0, v0, 2 // check flag 1
beqz v0,+
nop
jal func_103C
jal func_103C | BOOT_IMEM_ADDR
nop
mfc0 v0, RDP_STATUS
@ -243,9 +246,9 @@ label_1080:
mfc0 a0, DMA_BUSY // wait until it finishes
bnez a0,-
nop
jal func_103C // check error status
jal func_103C | BOOT_IMEM_ADDR // check error status
nop
j label_1008
j label_1008 | BOOT_IMEM_ADDR
nop
nop

1
bin/.gitignore vendored
View File

@ -3,4 +3,3 @@
# files without disassemblies yet:
!6102.bin
!F3DZEX.data.bin
!common.boot.bin

Binary file not shown.

View File

@ -65,8 +65,7 @@ PushRSPTask:
LoadRSPBoot:
la t2, UCODE_BOOT & ADDR_MASK
li t3, UCODE_BOOT.size
subiu t3, t3, 1 // DMA quirk
li t3, UCODE_BOOT.size - 1 // DMA quirk
SP_DMA_WAIT() // clobbers t0, a0
la t1, 0xA4001000
sw t1, SP_MEM_ADDR(a0)
@ -75,6 +74,6 @@ LoadRSPBoot:
jr ra
nop
align(16); insert UCODE_BOOT, "bin/common.boot.bin"
align(16); insert UCODE_BOOT, "bin/F3DZEX2.boot.bin"
align(16); insert F3DZEX_IMEM, "bin/F3DZEX2.bin"
align(16); insert F3DZEX_DMEM, "bin/F3DZEX2.data.bin"