mirror of
https://github.com/zeldaret/ph
synced 2026-05-28 00:15:57 -04:00
Export ARM9 program footer in LCF
This commit is contained in:
+24
-32
@@ -44,11 +44,11 @@ _02000808:
|
||||
ldr r1, _02000924 ; =0x07000000
|
||||
mov r2, #0x400
|
||||
bl func_0200093c
|
||||
ldr r1, _02000928 ; =data_02000b64
|
||||
ldr r1, _02000928 ; =spAutoloadBlockInfosStart
|
||||
ldr r0, [r1, #0x14]
|
||||
bl func_02000950
|
||||
bl func_020009fc
|
||||
ldr r0, _02000928 ; =data_02000b64
|
||||
ldr r0, _02000928 ; =spAutoloadBlockInfosStart
|
||||
ldr r1, [r0, #0xc]
|
||||
ldr r2, [r0, #0x10]
|
||||
mov r3, r1
|
||||
@@ -86,7 +86,7 @@ _02000918: .word data_027e0000
|
||||
_0200091c: .word 0x00000500
|
||||
_02000920: .word 0x05000000
|
||||
_02000924: .word 0x07000000
|
||||
_02000928: .word data_02000b64
|
||||
_02000928: .word spAutoloadBlockInfosStart
|
||||
_0200092c: .word 0x027fff9c
|
||||
_02000930: .word func_01ffa48c
|
||||
_02000934: .word func_02000c30
|
||||
@@ -162,7 +162,7 @@ _020009f8:
|
||||
.global func_020009fc
|
||||
arm_func_start func_020009fc
|
||||
func_020009fc: ; 0x020009fc
|
||||
ldr r0, _02000a70 ; =data_02000b64
|
||||
ldr r0, _02000a70 ; =spAutoloadBlockInfosStart
|
||||
ldr r1, [r0]
|
||||
ldr r2, [r0, #4]
|
||||
ldr r3, [r0, #8]
|
||||
@@ -198,7 +198,7 @@ _02000a6c:
|
||||
b func_02000a74
|
||||
.align 2, 0
|
||||
arm_func_end func_020009fc
|
||||
_02000a70: .word data_02000b64
|
||||
_02000a70: .word spAutoloadBlockInfosStart
|
||||
|
||||
.global func_02000a74
|
||||
arm_func_start func_02000a74
|
||||
@@ -275,33 +275,25 @@ _02000b5c: .word 0x0005707d
|
||||
func_02000b60: ; 0x02000b60
|
||||
bx lr
|
||||
arm_func_end func_02000b60
|
||||
.global data_02000b64
|
||||
data_02000b64: ; 0x02000b64
|
||||
.byte 0xc0, 0x0f, 0x06, 0x02
|
||||
.global data_02000b68
|
||||
data_02000b68: ; 0x02000b68
|
||||
.byte 0xd8, 0x0f, 0x06, 0x02
|
||||
.global data_02000b6c
|
||||
data_02000b6c: ; 0x02000b6c
|
||||
.byte 0x20, 0x8e, 0x05, 0x02
|
||||
.global data_02000b70
|
||||
data_02000b70: ; 0x02000b70
|
||||
.byte 0x20, 0x8e, 0x05, 0x02
|
||||
.global data_02000b74
|
||||
data_02000b74: ; 0x02000b74
|
||||
.byte 0xc0, 0x73, 0x07, 0x02
|
||||
.global data_02000b78
|
||||
data_02000b78: ; 0x02000b78
|
||||
.byte 0x64, 0x1a, 0x04, 0x02
|
||||
.global data_02000b7c
|
||||
data_02000b7c: ; 0x02000b7c
|
||||
.byte 0x30, 0x75, 0x00, 0x04
|
||||
.global data_02000b80
|
||||
data_02000b80: ; 0x02000b80
|
||||
.byte 0x21, 0x06, 0xc0, 0xde
|
||||
.global data_02000b84
|
||||
data_02000b84: ; 0x02000b84
|
||||
.byte 0xde, 0xc0, 0x06, 0x21
|
||||
|
||||
.global spAutoloadBlockInfosStart
|
||||
spAutoloadBlockInfosStart: ; 0x02000b64
|
||||
.word 0x02060fc0
|
||||
spAutoloadBlockInfosEnd: ; 0x02000b68
|
||||
.word 0x02060fd8
|
||||
spAutoloadCode: ; 0x02000b6c
|
||||
.word 0x02058e20
|
||||
spBssStart: ; 0x02000b70
|
||||
.word 0x02058e20
|
||||
spBssEnd: ; 0x02000b74
|
||||
.word 0x020773c0
|
||||
sCompressedCodeEnd: ; 0x02000b78
|
||||
.word 0x02041a64
|
||||
sSdkVersion: ; 0x02000b7c
|
||||
.word 0x04007530
|
||||
.word 0xdec00621 ; nitrocode
|
||||
.word 0x2106c0de
|
||||
|
||||
.global data_02000b88
|
||||
data_02000b88: ; 0x02000b88
|
||||
.ascii "[SDK+NINTENDO:BACKUP]"
|
||||
|
||||
@@ -224,6 +224,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
|
||||
file.write(' ITCM : ORIGIN = 0x1ff8000 >> arm9.bin\n')
|
||||
file.write(' DTCM : ORIGIN = 0x27e0000 >> arm9.bin\n')
|
||||
file.write(' AUTOLOADS : ORIGIN = 0 >> arm9.bin\n')
|
||||
file.write(' FOOTER : ORIGIN = 0 > arm9_footer.bin\n')
|
||||
file.write('\n')
|
||||
file.write(' OV_TABLE : ORIGIN = 0 > arm9_ovt.bin\n')
|
||||
file.write('\n')
|
||||
@@ -272,6 +273,12 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
|
||||
file.write(' WRITEW ADDR(DTCM); WRITEW dtcm_size; WRITEW 0xec0;\n')
|
||||
file.write(' } > AUTOLOADS\n')
|
||||
file.write('\n')
|
||||
file.write(' .footer : {\n')
|
||||
file.write(' WRITEW 0xdec00621;\n')
|
||||
file.write(' WRITEW spAutoloadBlockInfosStart - ADDR(ARM9);\n')
|
||||
file.write(' WRITEW 0;\n')
|
||||
file.write(' } > FOOTER\n')
|
||||
file.write('\n')
|
||||
for ov in OVERLAYS:
|
||||
file.write(f' .{ov.name} : ' + '{\n')
|
||||
file.write(f' {ov.name}_start = .;\n')
|
||||
|
||||
Reference in New Issue
Block a user