initial commit

This commit is contained in:
Charlotte 🦝 Delenk 2022-07-25 20:08:26 +01:00
commit 0e3447d877
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
15 changed files with 1428596 additions and 0 deletions

3900
asm/bss.s Normal file

File diff suppressed because it is too large Load diff

193
asm/ctors.s Normal file
View file

@ -0,0 +1,193 @@
.include "macros.s"
.section .ctors, "wa" # 0x80406260 - 0x80406540 ; 0x000002E0
.global lbl_80406260
lbl_80406260:
# ROM: 0x402360
.4byte lbl_800079FC
.4byte lbl_80014EC4
.4byte lbl_800A4C20
.4byte lbl_800B2530
.4byte lbl_800B3060
.4byte lbl_800B4B50
.4byte lbl_800BAAC0
.4byte lbl_800DFE00
.4byte lbl_800F3AE0
.4byte lbl_800F5330
.4byte lbl_800F6AA0
.4byte lbl_800F9040
.4byte lbl_800F9110
.4byte lbl_80100F90
.4byte lbl_80106B70
.4byte lbl_8010DF00
.4byte lbl_80114C90
.4byte lbl_80119110
.4byte lbl_8011E700
.4byte lbl_80120650
.4byte lbl_80120760
.4byte lbl_80120E90
.4byte lbl_80121280
.4byte lbl_80121450
.4byte lbl_80126C50
.4byte lbl_80135C60
.4byte lbl_8013BB30
.4byte lbl_8013C080
.4byte lbl_8013D4D0
.4byte lbl_8013FB00
.4byte lbl_80147E00
.4byte lbl_8017A9D4
.4byte lbl_8018E9A4
.4byte lbl_8018EB04
.4byte lbl_80195848
.4byte lbl_8019AC60
.4byte lbl_8019AC8C
.4byte lbl_8019AD2C
.4byte lbl_8019ADB8
.4byte lbl_8019ADE0
.4byte lbl_8019AE84
.4byte lbl_8019AF3C
.4byte lbl_8019AF60
.4byte lbl_8019AFD0
.4byte lbl_8019C354
.4byte lbl_8019D88C
.4byte lbl_8019E454
.4byte lbl_8019EC6C
.4byte lbl_8019F4B0
.4byte lbl_8019FCBC
.4byte lbl_801A3808
.4byte lbl_801B931C
.4byte lbl_801BB2B8
.4byte lbl_801BEE48
.4byte lbl_801BF734
.4byte lbl_801CE598
.4byte lbl_801CED30
.4byte lbl_801D13FC
.4byte lbl_801EA0B8
.4byte lbl_801EC444
.4byte lbl_80203844
.4byte lbl_80207284
.4byte lbl_80209BD4
.4byte lbl_8020DFFC
.4byte lbl_8020F2A4
.4byte lbl_80210A5C
.4byte lbl_80219E54
.4byte lbl_8021A024
.4byte lbl_802329CC
.4byte lbl_80232B24
.4byte lbl_8023DB80
.4byte lbl_802416BC
.4byte lbl_80247D14
.4byte lbl_802488FC
.4byte lbl_80249E00
.4byte lbl_8024B7E8
.4byte lbl_8025C8DC
.4byte lbl_80266298
.4byte lbl_802662BC
.4byte lbl_8026FD78
.4byte lbl_8026FDC8
.4byte lbl_8026FE88
.4byte lbl_80270684
.4byte lbl_802706AC
.4byte lbl_802706D4
.4byte lbl_80277634
.4byte lbl_80288B18
.4byte lbl_8028ADD4
.4byte lbl_802966DC
.4byte lbl_802975A8
.4byte lbl_80299448
.4byte lbl_8029D284
.4byte lbl_8029E8F0
.4byte lbl_8029F4C4
.4byte lbl_802A0F98
.4byte lbl_802A2E54
.4byte lbl_802A3DC4
.4byte lbl_802A5630
.4byte lbl_802A6394
.4byte lbl_802A7520
.4byte lbl_802AD3F4
.4byte lbl_802AE2FC
.4byte lbl_802AEF8C
.4byte lbl_802AFCF0
.4byte lbl_802B2388
.4byte lbl_802B4A78
.4byte lbl_802B625C
.4byte lbl_802B78C8
.4byte lbl_802B9108
.4byte lbl_802BA71C
.4byte lbl_802BB850
.4byte lbl_802BCE78
.4byte lbl_802BFC34
.4byte lbl_802C2238
.4byte lbl_802C3614
.4byte lbl_802C50B0
.4byte lbl_802C62B4
.4byte lbl_802C73DC
.4byte lbl_802C7EB0
.4byte lbl_802C9FC8
.4byte lbl_802CB1B4
.4byte lbl_802CFBEC
.4byte lbl_802D1FC0
.4byte lbl_802D33C8
.4byte lbl_802D3B38
.4byte lbl_802D678C
.4byte lbl_802D9238
.4byte lbl_802D9E2C
.4byte lbl_802DBEA0
.4byte lbl_802DD9A8
.4byte lbl_802E07F0
.4byte lbl_802E1794
.4byte lbl_802E2BA4
.4byte lbl_802E38F0
.4byte lbl_802E5480
.4byte lbl_802E6F28
.4byte lbl_802E8CF4
.4byte lbl_802EB0AC
.4byte lbl_802ED91C
.4byte lbl_802EFBEC
.4byte lbl_802F026C
.4byte lbl_802F08B4
.4byte lbl_802F1160
.4byte lbl_802FDDB0
.4byte lbl_80302E30
.4byte lbl_803040A4
.4byte lbl_8030B068
.4byte lbl_8030FB84
.4byte lbl_80313D40
.4byte lbl_80319804
.4byte lbl_8031F7BC
.4byte lbl_80342C60
.4byte lbl_8034B68C
.4byte lbl_8034B6B0
.4byte lbl_803832F8
.4byte lbl_80383CC0
.4byte lbl_80392DD4
.4byte lbl_803A9310
.4byte lbl_803CABB4
.4byte lbl_803CDCD4
.4byte lbl_803CDCFC
.4byte lbl_803D30B4
.4byte lbl_803DB2C0
.4byte lbl_803DCBB4
.4byte lbl_803DD290
.4byte lbl_803DE5B8
.4byte lbl_803E2B18
.4byte lbl_803E3774
.4byte lbl_803E4070
.4byte lbl_803E5C00
.4byte lbl_803E7900
.4byte lbl_803E85B0
.4byte lbl_803E99D4
.4byte lbl_803EADB8
.4byte lbl_803ED094
.4byte lbl_803EF6F8
.4byte lbl_803F9B74
.4byte lbl_80402A64
.4byte lbl_8040566C
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0

119097
asm/data.s Normal file

File diff suppressed because it is too large Load diff

17
asm/dtors.s Normal file
View file

@ -0,0 +1,17 @@
.include "macros.s"
.section .dtors, "wa" # 0x80406540 - 0x80406560 ; 0x00000020
.global lbl_80406540
lbl_80406540:
# ROM: 0x402640
.4byte lbl_80006B88
.4byte lbl_80007A38
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0

203
asm/extab_.s Normal file
View file

@ -0,0 +1,203 @@
.include "macros.s"
.section extab_, "wa" # 0x80006740 - 0x800068E0 ; 0x000001A0
.global lbl_80006740
lbl_80006740:
# ROM: 0x4020A0
.4byte 0x08080000
.4byte 0
.global lbl_80006748
lbl_80006748:
# ROM: 0x4020A8
.4byte 0x28080000
.4byte 0x00000070
.4byte 0x00000010
.4byte 0
.4byte 0x82000008
.4byte lbl_80006F68
.global lbl_80006760
lbl_80006760:
# ROM: 0x4020C0
.4byte 0x18080000
.4byte 0
.global lbl_80006768
lbl_80006768:
# ROM: 0x4020C8
.4byte 0x20080000
.4byte 0x0000005C
.4byte 0x00000010
.4byte 0
.4byte 0x82000008
.4byte lbl_80006F68
.global lbl_80006780
lbl_80006780:
# ROM: 0x4020E0
.4byte 0x20080000
.4byte 0
.global lbl_80006788
lbl_80006788:
# ROM: 0x4020E8
.4byte 0x10080000
.4byte 0
.global lbl_80006790
lbl_80006790:
# ROM: 0x4020F0
.4byte 0x10080000
.4byte 0
.global lbl_80006798
lbl_80006798:
# ROM: 0x4020F8
.4byte 0x280A0000
.4byte 0
.global lbl_800067A0
lbl_800067A0:
# ROM: 0x402100
.4byte 0x50080000
.4byte 0x00000054
.4byte 0x01250010
.4byte 0
.4byte 0x8E000000
.global lbl_800067B4
lbl_800067B4:
# ROM: 0x402114
.4byte 0x28180000
.4byte 0x00000020
.4byte 0x00000018
.4byte 0x00000044
.4byte 0x004F0028
.4byte 0
.4byte 0x90000000
.4byte 0
.4byte 0x00000024
.4byte 0x00000020
.4byte 0x8D000020
.global lbl_800067E0
lbl_800067E0:
# ROM: 0x402140
.4byte 0x28080000
.4byte 0x00000274
.4byte 0x000F0010
.4byte 0
.4byte 0x8E000000
.global lbl_800067F4
lbl_800067F4:
# ROM: 0x402154
.4byte 0x08080000
.4byte 0
.global lbl_800067FC
lbl_800067FC:
# ROM: 0x40215C
.4byte 0x10080000
.4byte 0
.global lbl_80006804
lbl_80006804:
# ROM: 0x402164
.4byte 0x18180000
.4byte 0x00000048
.4byte 0x00000018
.4byte 0x00000054
.4byte 0x00000024
.4byte 0
.4byte 0x8F000000
.4byte 0x0000004C
.4byte 0x00000008
.4byte 0x8D000008
.global lbl_8000682C
lbl_8000682C:
# ROM: 0x40218C
.4byte 0x10080000
.4byte 0
.global lbl_80006834
lbl_80006834:
# ROM: 0x402194
.4byte 0x68080000
.4byte 0x00000094
.4byte 0x00000038
.4byte 0x000000B0
.4byte 0x00000030
.4byte 0x0000019C
.4byte 0x0000004C
.4byte 0x000001B8
.4byte 0x00000044
.4byte 0x0000035C
.4byte 0x00000058
.4byte 0
.4byte 0x02000028
.4byte lbl_800148E0
.4byte 0x8680001D
.4byte 0
.4byte func_80006BD0
.4byte 0x02000020
.4byte lbl_800148E0
.4byte 0x8680001E
.4byte 0
.4byte func_80006BD0
.4byte 0x82000030
.4byte func_800149D8
.global lbl_80006894
lbl_80006894:
# ROM: 0x4021F4
.4byte 0x18180000
.4byte 0x0000004C
.4byte 0x00000018
.4byte 0x00000058
.4byte 0x00000024
.4byte 0
.4byte 0x8F000000
.4byte 0x00000050
.4byte 0x00000008
.4byte 0x8D000008
.global lbl_800068BC
lbl_800068BC:
# ROM: 0x40221C
.4byte 0x08080000
.4byte 0
.global lbl_800068C4
lbl_800068C4:
# ROM: 0x402224
.4byte 0x10080000
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0

86
asm/extabindex_.s Normal file
View file

@ -0,0 +1,86 @@
.include "macros.s"
.section extabindex_, "wa" # 0x800068E0 - 0x80006A00 ; 0x00000120
.global lbl_800068E0
lbl_800068E0:
# ROM: 0x402240
.4byte func_80006BD0
.4byte 0x00000040
.4byte lbl_80006740
.4byte func_80006E64
.4byte 0x00000104
.4byte lbl_80006748
.4byte lbl_80006F68
.4byte 0x000000BC
.4byte lbl_80006760
.4byte func_80007024
.4byte 0x000000F8
.4byte lbl_80006768
.4byte func_8000711C
.4byte 0x00000078
.4byte lbl_80006780
.4byte func_80007B78
.4byte 0x000001B0
.4byte lbl_80006788
.4byte func_80007D28
.4byte 0x000001B0
.4byte lbl_80006790
.4byte func_80007ED8
.4byte 0x00000554
.4byte lbl_80006798
.4byte func_8000842C
.4byte 0x0000050C
.4byte lbl_800067A0
.4byte func_80008938
.4byte 0x000001B8
.4byte lbl_800067B4
.4byte func_80008BF8
.4byte 0x00000408
.4byte lbl_800067E0
.4byte lbl_8001488C
.4byte 0x0000004C
.4byte lbl_800067F4
.4byte lbl_800148E0
.4byte 0x00000060
.4byte lbl_800067FC
.4byte lbl_80014948
.4byte 0x00000090
.4byte lbl_80006804
.4byte func_800149D8
.4byte 0x00000064
.4byte lbl_8000682C
.4byte func_80014A3C
.4byte 0x000003F0
.4byte lbl_80006834
.4byte func_80014E2C
.4byte 0x00000094
.4byte lbl_80006894
.4byte func_80014F18
.4byte 0x00000078
.4byte lbl_800068BC
.4byte func_80014F90
.4byte 0x000000A0
.4byte lbl_800068C4
.global lbl_800069C4
lbl_800069C4:
# ROM: 0x402324
.4byte lbl_800068E0
.4byte lbl_800069C4
.4byte func_80006BD0
.4byte 0x0000E460
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0
.4byte 0

2623
asm/init.s Normal file

File diff suppressed because it is too large Load diff

30135
asm/rodata.s Normal file

File diff suppressed because it is too large Load diff

4484
asm/sbss.s Normal file

File diff suppressed because it is too large Load diff

44
asm/sbss2.s Normal file
View file

@ -0,0 +1,44 @@
.include "macros.s"
.section .sbss2, "", @nobits # 0x805643C0 - 0x805643FC ; 0x0000003C
.global lbl_805643C0
lbl_805643C0:
.skip 0x8
.global lbl_805643C8
lbl_805643C8:
.skip 0x8
.global lbl_805643D0
lbl_805643D0:
.skip 0x8
.global lbl_805643D8
lbl_805643D8:
.skip 0x8
.global lbl_805643E0
lbl_805643E0:
.skip 0x4
.global lbl_805643E4
lbl_805643E4:
.skip 0x4
.global lbl_805643E8
lbl_805643E8:
.skip 0x4
.global lbl_805643EC
lbl_805643EC:
.skip 0x4
.global lbl_805643F0
lbl_805643F0:
.skip 0x8
.global lbl_805643F8
lbl_805643F8:
.skip 0x4

22780
asm/sdata.s Normal file

File diff suppressed because it is too large Load diff

31652
asm/sdata2.s Normal file

File diff suppressed because it is too large Load diff

1213255
asm/text.s Normal file

File diff suppressed because it is too large Load diff

95
include/macros.s Normal file
View file

@ -0,0 +1,95 @@
/*
Sections:
.init 0x00000100 0x80004000 0x80006740 0x00002740
extab_ 0x004020A0 0x80006740 0x800068E0 0x000001A0
extabindex_ 0x00402240 0x800068E0 0x80006A00 0x00000120
.text 0x00002840 0x80006A00 0x80406260 0x003FF860
.ctors 0x00402360 0x80406260 0x80406540 0x000002E0
.dtors 0x00402640 0x80406540 0x80406560 0x00000020
.rodata 0x00402660 0x80406560 0x80421040 0x0001AAE0
.data 0x0041D140 0x80421040 0x80496700 0x000756C0
.bss 0x00000000 0x80496700 0x80556420 0x000BFD20
.sdata 0x00492800 0x80556420 0x8055C6E0 0x000062C0
.sbss 0x00000000 0x8055C6E0 0x8055DF80 0x000018A0
.sdata2 0x00498AC0 0x8055DF80 0x805643C0 0x00006440
.sbss2 0x00000000 0x805643C0 0x805643FC 0x0000003C
Entry Point: 0x80006310
*/
# PowerPC Register Constants
.set r0, 0
.set r1, 1
.set r2, 2
.set r3, 3
.set r4, 4
.set r5, 5
.set r6, 6
.set r7, 7
.set r8, 8
.set r9, 9
.set r10, 10
.set r11, 11
.set r12, 12
.set r13, 13
.set r14, 14
.set r15, 15
.set r16, 16
.set r17, 17
.set r18, 18
.set r19, 19
.set r20, 20
.set r21, 21
.set r22, 22
.set r23, 23
.set r24, 24
.set r25, 25
.set r26, 26
.set r27, 27
.set r28, 28
.set r29, 29
.set r30, 30
.set r31, 31
.set f0, 0
.set f1, 1
.set f2, 2
.set f3, 3
.set f4, 4
.set f5, 5
.set f6, 6
.set f7, 7
.set f8, 8
.set f9, 9
.set f10, 10
.set f11, 11
.set f12, 12
.set f13, 13
.set f14, 14
.set f15, 15
.set f16, 16
.set f17, 17
.set f18, 18
.set f19, 19
.set f20, 20
.set f21, 21
.set f22, 22
.set f23, 23
.set f24, 24
.set f25, 25
.set f26, 26
.set f27, 27
.set f28, 28
.set f29, 29
.set f30, 30
.set f31, 31
.set qr0, 0
.set qr1, 1
.set qr2, 2
.set qr3, 3
.set qr4, 4
.set qr5, 5
.set qr6, 6
.set qr7, 7
# Small Data Area (read/write) Base
.set _SDA_BASE_, 0x8055E420
# Small Data Area (read only) Base
.set _SDA2_BASE_, 0x80565F80

32
ldscript.lcf Normal file
View file

@ -0,0 +1,32 @@
MEMORY
{
text : origin = 0x80004000
}
SECTIONS
{
GROUP:
{
.init ALIGN(0x20) : {}
extab_ ALIGN(0x20) : {}
extabindex_ ALIGN(0x20) : {}
.text ALIGN(0x20) : {}
.ctors ALIGN(0x20) : {}
.dtors ALIGN(0x20) : {}
.rodata ALIGN(0x20) : {}
.data ALIGN(0x20) : {}
.bss ALIGN(0x20) : {}
.sdata ALIGN(0x20) : {}
.sbss ALIGN(0x20) : {}
.sdata2 ALIGN(0x20) : {}
.sbss2 ALIGN(0x20) : {}
.stack ALIGN(0x100) : {}
} > text
_stack_addr = (_f_sbss2 + SIZEOF(.sbss2) + 65536 + 0x7) & ~0x7;
_stack_end = _f_sbss2 + SIZEOF(.sbss2);
_db_stack_addr = (_stack_addr + 0x2000);
_db_stack_end = _stack_addr;
__ArenaLo = (_db_stack_addr + 0x1f) & ~0x1f;
__ArenaHi = 0x81700000;
}