move const data to memory.s

This commit is contained in:
DizzyEggg 2024-12-02 13:16:40 +01:00
parent 235a453f1d
commit ad09542cea
5 changed files with 733 additions and 761 deletions

View File

@ -1017,740 +1017,3 @@ gVectorDirections: @ 80B7E3C
@ ???
.string "pksdir0\0"
@ memory.s
.string "pksdir0\0"
gUnknown_80B7E8C:
.string "../system/memory_locate.c\0"
.align 2, 0
gUnknown_80B7EA8:
.string "_LocateSetFront\0"
.align 2, 0
.global gUnknown_80B7EB8
gUnknown_80B7EB8: @ 80B7EB8
.4byte gUnknown_80B7E8C, 581, gUnknown_80B7EA8
.global gUnknown_80B7EC4
gUnknown_80B7EC4: @ 80B7EC4
.string "Memory Locate sprit max over [%3d/%3d]\0"
.align 2,0
LocateSetBackText:
.string "_LocateSetBack\0"
.align 2,0
.global gUnknown_80B7EFC
gUnknown_80B7EFC: @ 80B7EFC
.4byte gUnknown_80B7E8C, 673, LocateSetBackText
LocateSetText:
.string "_LocateSet\0"
.align 2,0
.global gUnknown_80B7F14
gUnknown_80B7F14: @ 80B7F14
.4byte gUnknown_80B7E8C, 812, LocateSetText
.global gLocateSetErrorMessage
gLocateSetErrorMessage: @ 80B7F20
.ascii "Memroy LocateSet [%p] buffer %8x size can't locate\n"
.asciz " atb %02x grp %3d \0"
.align 2,0
MemoryLocate_LocalCreateText:
.string "MemoryLocate_LocalCreate\0"
.align 2,0
.global gUnknown_80B7F88
gUnknown_80B7F88: @ 80B7F88
.4byte gUnknown_80B7E8C, 1109, MemoryLocate_LocalCreateText
.global gLocalCreateErrorMessage
gLocalCreateErrorMessage: @ 80B7F94
.asciz "Memroy LocalCreate buffer %08x size can't locate\0" @ Spelling error is intentional
.align 2,0
@ code_80035F0
.string "pksdir0\0"
@ other_random
.string "pksdir0\0"
@ util
.string "pksdir0\0"
@ bg_palette_buffer
.string "pksdir0\0"
@ input
.string "pksdir0\0"
@ code_8004AA0
.string "pksdir0\0"
@ sprite
.string "pksdir0\0"
@ code_800558C.c
.string "pksdir0\0"
.global gUnknown_80B8008
gUnknown_80B8008: @ 80B8008
.2byte 16, 12, 9, 7, 6, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0
.global gUnknown_80B802A
gUnknown_80B802A: @ 80B802A
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x846C
.2byte 0x8967
.2byte 0x8C64
.2byte 0x8E62
.2byte 0x9060
.2byte 0x915F
.2byte 0x935D
.2byte 0x945C
.2byte 0x955B
.2byte 0x965A
.2byte 0x965A
.2byte 0x9759
.2byte 0x9858
.2byte 0x9858
.2byte 0x9957
.2byte 0x9957
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9C55
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9957
.2byte 0x9957
.2byte 0x9858
.2byte 0x9858
.2byte 0x9759
.2byte 0x965A
.2byte 0x965A
.2byte 0x955B
.2byte 0x945C
.2byte 0x935D
.2byte 0x915F
.2byte 0x9060
.2byte 0x8E62
.2byte 0x8C64
.2byte 0x8967
.2byte 0x846C
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.global gUnknown_80B816A
gUnknown_80B816A: @ 80B816A
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x8071
.2byte 0x866B
.2byte 0x8A67
.2byte 0x8D64
.2byte 0x8F62
.2byte 0x9160
.2byte 0x935E
.2byte 0x955C
.2byte 0x975A
.2byte 0x9958
.2byte 0x9A57
.2byte 0x9B56
.2byte 0x9D54
.2byte 0x9E53
.2byte 0xA051
.2byte 0xA051
.2byte 0xA150
.2byte 0xA24F
.2byte 0xA44D
.2byte 0xA54C
.2byte 0xA54C
.2byte 0xA64B
.2byte 0xA74A
.2byte 0xA849
.2byte 0xA948
.2byte 0xA948
.2byte 0xAA47
.2byte 0xAA47
.2byte 0xAB46
.2byte 0xAC45
.2byte 0xAC45
.2byte 0xAD44
.2byte 0xAD44
.2byte 0xAE43
.2byte 0xAE43
.2byte 0xAF42
.2byte 0xAF42
.2byte 0xB041
.2byte 0xB041
.2byte 0xB140
.2byte 0xB140
.2byte 0xB140
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB140
.2byte 0xB140
.2byte 0xB140
.2byte 0xB041
.2byte 0xB041
.2byte 0xAF42
.2byte 0xAF42
.2byte 0xAE43
.2byte 0xAE43
.2byte 0xAD44
.2byte 0xAD44
.2byte 0xAC45
.2byte 0xAC45
.2byte 0xAB46
.2byte 0xAA47
.2byte 0xAA47
.2byte 0xA948
.2byte 0xA948
.2byte 0xA849
.2byte 0xA74A
.2byte 0xA64B
.2byte 0xA54C
.2byte 0xA54C
.2byte 0xA44D
.2byte 0xA24F
.2byte 0xA150
.2byte 0xA051
.2byte 0xA051
.2byte 0x9E53
.2byte 0x9D54
.2byte 0x9B56
.2byte 0x9A57
.2byte 0x9958
.2byte 0x975A
.2byte 0x955C
.2byte 0x935E
.2byte 0x9160
.2byte 0x8F62
.2byte 0x8D64
.2byte 0x8A67
.2byte 0x866B
.2byte 0x8071
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.global gUnknown_80B82AA
gUnknown_80B82AA: @ 80B82AA
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x9392
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.global gUnknown_80B83EA
gUnknown_80B83EA: @ 80B83EA
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.align 2, 0

687
data/data1.s Normal file
View File

@ -0,0 +1,687 @@
.section .rodata
@ code_80035F0
.string "pksdir0\0"
@ other_random
.string "pksdir0\0"
@ util
.string "pksdir0\0"
@ bg_palette_buffer
.string "pksdir0\0"
@ input
.string "pksdir0\0"
@ code_8004AA0
.string "pksdir0\0"
@ sprite
.string "pksdir0\0"
@ code_800558C.c
.string "pksdir0\0"
.global gUnknown_80B8008
gUnknown_80B8008: @ 80B8008
.2byte 16, 12, 9, 7, 6, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0
.global gUnknown_80B802A
gUnknown_80B802A: @ 80B802A
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x846C
.2byte 0x8967
.2byte 0x8C64
.2byte 0x8E62
.2byte 0x9060
.2byte 0x915F
.2byte 0x935D
.2byte 0x945C
.2byte 0x955B
.2byte 0x965A
.2byte 0x965A
.2byte 0x9759
.2byte 0x9858
.2byte 0x9858
.2byte 0x9957
.2byte 0x9957
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9C55
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9C54
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9B55
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9A56
.2byte 0x9957
.2byte 0x9957
.2byte 0x9858
.2byte 0x9858
.2byte 0x9759
.2byte 0x965A
.2byte 0x965A
.2byte 0x955B
.2byte 0x945C
.2byte 0x935D
.2byte 0x915F
.2byte 0x9060
.2byte 0x8E62
.2byte 0x8C64
.2byte 0x8967
.2byte 0x846C
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.global gUnknown_80B816A
gUnknown_80B816A: @ 80B816A
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x8071
.2byte 0x866B
.2byte 0x8A67
.2byte 0x8D64
.2byte 0x8F62
.2byte 0x9160
.2byte 0x935E
.2byte 0x955C
.2byte 0x975A
.2byte 0x9958
.2byte 0x9A57
.2byte 0x9B56
.2byte 0x9D54
.2byte 0x9E53
.2byte 0xA051
.2byte 0xA051
.2byte 0xA150
.2byte 0xA24F
.2byte 0xA44D
.2byte 0xA54C
.2byte 0xA54C
.2byte 0xA64B
.2byte 0xA74A
.2byte 0xA849
.2byte 0xA948
.2byte 0xA948
.2byte 0xAA47
.2byte 0xAA47
.2byte 0xAB46
.2byte 0xAC45
.2byte 0xAC45
.2byte 0xAD44
.2byte 0xAD44
.2byte 0xAE43
.2byte 0xAE43
.2byte 0xAF42
.2byte 0xAF42
.2byte 0xB041
.2byte 0xB041
.2byte 0xB140
.2byte 0xB140
.2byte 0xB140
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB43D
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB33E
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB23F
.2byte 0xB140
.2byte 0xB140
.2byte 0xB140
.2byte 0xB041
.2byte 0xB041
.2byte 0xAF42
.2byte 0xAF42
.2byte 0xAE43
.2byte 0xAE43
.2byte 0xAD44
.2byte 0xAD44
.2byte 0xAC45
.2byte 0xAC45
.2byte 0xAB46
.2byte 0xAA47
.2byte 0xAA47
.2byte 0xA948
.2byte 0xA948
.2byte 0xA849
.2byte 0xA74A
.2byte 0xA64B
.2byte 0xA54C
.2byte 0xA54C
.2byte 0xA44D
.2byte 0xA24F
.2byte 0xA150
.2byte 0xA051
.2byte 0xA051
.2byte 0x9E53
.2byte 0x9D54
.2byte 0x9B56
.2byte 0x9A57
.2byte 0x9958
.2byte 0x975A
.2byte 0x955C
.2byte 0x935E
.2byte 0x9160
.2byte 0x8F62
.2byte 0x8D64
.2byte 0x8A67
.2byte 0x866B
.2byte 0x8071
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.global gUnknown_80B82AA
gUnknown_80B82AA: @ 80B82AA
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x9392
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.2byte 0x0100
.global gUnknown_80B83EA
gUnknown_80B83EA: @ 80B83EA
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.2byte 0x0000
.align 2, 0

View File

@ -6,9 +6,9 @@
// size: 0xC
typedef struct DebugLocation
{
/* 0x0 */ u8 *file;
/* 0x0 */ const u8 *file;
/* 0x4 */ u32 line;
/* 0x8 */ u8 *func;
/* 0x8 */ const u8 *func;
} DebugLocation;
void Log(u8 num, const u8 *text, ...);

View File

@ -420,6 +420,8 @@ SECTIONS {
{
data/data_code_2.o(.rodata);
data/data.o(.rodata);
src/memory.o(.rodata);
data/data1.o(.rodata);
src/random.o(.rodata);
src/text.o(.rodata);
data/data2.o(.rodata);

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "memory.h"
#include "cpu.h"
#include "debug.h"
@ -63,14 +64,6 @@ UNUSED static EWRAM_DATA u32 sUnused2 = {0}; // 2000ECC
extern struct HeapFreeListElement gMainHeapFreeList[32]; // 2000ED0 (CAPACITY OR STRUCT SIZE IS WRONG)
extern u8 gMainHeap[HEAP_SIZE]; // 20011D0
extern const char gUnknown_80B7EC4[];
extern const DebugLocation gUnknown_80B7EB8;
extern const DebugLocation gUnknown_80B7EFC;
extern const DebugLocation gUnknown_80B7F14;
extern const DebugLocation gUnknown_80B7F88;
extern const char gLocateSetErrorMessage[];
extern const char gLocalCreateErrorMessage[];
static void DoFree(struct HeapDescriptor *, void *);
static void *DoAlloc(struct HeapDescriptor *, s32, u32);
static void DoInitHeap(struct HeapDescriptor *, struct HeapSettings *, struct HeapFreeListElement *, u32);
@ -79,6 +72,8 @@ static struct HeapDescriptor *DoCreateSubHeap(struct unkMemoryStruct *a, u32 b);
static void *DoAlloc(struct HeapDescriptor *heap, s32 size, u32 a2);
static void InitHeapInternal(void);
ALIGNED(4) static const char sFileNameText[] = "../system/memory_locate.c";
void InitHeap(void)
{
InitHeapInternal();
@ -334,6 +329,14 @@ static s32 MemorySearchFromBack(struct HeapDescriptor *heap, s32 atb, s32 size)
return -1;
}
ALIGNED(4) static const char sText_LocateSetFront[] = "_LocateSetFront";
static const DebugLocation sLocateSetFrontDebugLocation =
{
.file = sFileNameText,
.line = 581,
.func = sText_LocateSetFront
};
static struct HeapFreeListElement * _LocateSetFront(struct HeapDescriptor *heap, s32 index, s32 atb, s32 size, s32 group)
{
s32 i;
@ -353,9 +356,7 @@ static struct HeapFreeListElement * _LocateSetFront(struct HeapDescriptor *heap,
heap->freeCount++;
if (heap->freeCount > heap->freeListLength) {
// ../system/memory_locate.c
// Memory Locate sprit max over [%3d/%3d]
FatalError(&gUnknown_80B7EB8, gUnknown_80B7EC4, heap->freeCount, heap->freeListLength);
FatalError(&sLocateSetFrontDebugLocation, "Memory Locate sprit max over [%3d/%3d]", heap->freeCount, heap->freeListLength);
}
block = &heap->freeList[index + 1];
@ -372,6 +373,14 @@ static struct HeapFreeListElement * _LocateSetFront(struct HeapDescriptor *heap,
return curr;
}
ALIGNED(4) static const char sText_LocateSetBack[] = "_LocateSetBack";
static const DebugLocation sLocateSetBackDebugLocation =
{
.file = sFileNameText,
.line = 673,
.func = sText_LocateSetBack
};
static struct HeapFreeListElement * _LocateSetBack(struct HeapDescriptor *heap, s32 index, s32 atb, s32 size, s32 group)
{
s32 i;
@ -392,12 +401,9 @@ static struct HeapFreeListElement * _LocateSetBack(struct HeapDescriptor *heap,
heap->freeCount++;
if (heap->freeCount > heap->freeListLength) {
// ../system/memory_locate.c
// Memory Locate sprit max over [%3d/%3d]
FatalError(&gUnknown_80B7EFC, gUnknown_80B7EC4, heap->freeCount, heap->freeListLength);
FatalError(&sLocateSetBackDebugLocation, "Memory Locate sprit max over [%3d/%3d]", heap->freeCount, heap->freeListLength);
}
curr->block.size -= sizeAligned;
newBlockStart = curr->block.size + curr->block.start;
@ -413,6 +419,14 @@ static struct HeapFreeListElement * _LocateSetBack(struct HeapDescriptor *heap,
return curr;
}
ALIGNED(4) static const char sText_LocateSet[] = "_LocateSet";
static const DebugLocation sLocateSetDebugLocation =
{
.file = sFileNameText,
.line = 812,
.func = sText_LocateSet
};
static void * _LocateSet(struct HeapDescriptor *heap, s32 size, s32 group)
{
s32 index;
@ -443,10 +457,8 @@ static void * _LocateSet(struct HeapDescriptor *heap, s32 size, s32 group)
}
error:
// LocateSet [%p] buffer %8x size can't locate
// atb %02x grp %3d
FatalError(&gUnknown_80B7F14,
gLocateSetErrorMessage,
FatalError(&sLocateSetDebugLocation,
"Memroy LocateSet [%p] buffer %8x size can't locate\n atb %02x grp %3d ", // Spelling error is intentional
heap,size,atb,group);
}
@ -460,6 +472,8 @@ void MemoryFree(void *a)
DoFree(&sMainHeapDescriptor, a);
}
ALIGNED(4) static const char sText_MemoryLocate_LocalCreate[] = "MemoryLocate_LocalCreate";
UNUSED static struct HeapDescriptor *MemoryLocate_LocalCreate(struct HeapDescriptor *parentHeap,u32 size,u32 param_3,u32 group)
{
int index;
@ -472,9 +486,15 @@ UNUSED static struct HeapDescriptor *MemoryLocate_LocalCreate(struct HeapDescrip
}
index = MemorySearchFromBack(parentHeap,9,size);
if (index < 0)
// Memroy LocalCreate buffer %08x size can't locate
FatalError(&gUnknown_80B7F88,gLocalCreateErrorMessage,size);
if (index < 0) {
static const DebugLocation debugInfo = {
.file = sFileNameText,
.line = 1109,
.func = sText_MemoryLocate_LocalCreate
};
FatalError(&debugInfo,"Memroy LocalCreate buffer %08x size can't locate",size); // Spelling error is intentional
}
foundSet = _LocateSetBack(parentHeap,index,9,size,group);
local_1c.unk0 = (void *) foundSet->block.start;