From 40c8855a5eeabdbf96d404a8785c8e807f137cc6 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 19 Jun 2021 20:47:28 -0500 Subject: [PATCH] Renamed unknown_071730 to memory. Also documented some of the memory pool functions --- .../allocate_from_memory_pool.s} | 8 +- .../allocate_memory_pool_slot.s} | 6 +- .../func_80070EF8.s | 10 +- .../func_80071198.s | 0 .../func_80071278.s | 12 +- .../func_80071478.s | 4 +- .../func_80071538.s | 4 +- .../func_800715EC.s | 8 +- .../func_8007164C.s | 8 +- .../func_80071850.s | 8 +- .../func_80071A24.s | 16 +- .../func_80071D30.s | 0 .../func_80071E58.s | 0 .../func_80071F80.s | 0 .../func_800720DC.s | 0 .../new_memory_pool.s} | 10 +- asm/non_matchings/menu/func_8007FFEC.s | 2 +- asm/non_matchings/menu/func_80081218.s | 4 +- asm/non_matchings/menu/func_8008AD44.s | 2 +- .../menu/menu_track_select_init.s | 2 +- .../unknown_003260/audioNewThread.s | 2 +- .../unknown_005740/func_80004B40.s | 4 +- .../unknown_005740/func_80008040.s | 6 +- .../unknown_00BC20/func_8000B020.s | 2 +- .../unknown_00BC20/func_8000C718.s | 2 +- .../unknown_00BC20/func_8000C8F8.s | 2 +- .../unknown_00BC20/func_8000CC7C.s | 2 +- .../unknown_00BC20/func_8000EA54.s | 2 +- .../unknown_00BC20/func_8000FD54.s | 2 +- .../unknown_0255E0/func_800249F0.s | 6 +- .../unknown_0255E0/func_80025510.s | 4 +- .../unknown_0255E0/func_8002C0C4.s | 6 +- .../unknown_032760/func_80031BB8.s | 2 +- .../unknown_043920/func_80059A68.s | 4 +- .../unknown_05F690/func_8005F850.s | 6 +- .../unknown_05F690/func_8005F99C.s | 2 +- .../unknown_05F690/func_8005FCD0.s | 6 +- .../unknown_05F690/func_8006017C.s | 4 +- .../unknown_05F690/func_80060EA8.s | 8 +- .../unknown_05F690/func_80061A00.s | 4 +- asm/non_matchings/unknown_064830/alFxNew.s | 12 +- .../unknown_066AA0/func_8006A6B0.s | 10 +- .../unknown_066AA0/func_8006BFC8.s | 2 +- .../unknown_066AA0/func_8006C3E0.s | 2 +- .../unknown_066AA0/func_8006E3BC.s | 2 +- .../unknown_066AA0/func_8006EFDC.s | 4 +- asm/non_matchings/unknown_066AA0/load_level.s | 4 +- .../unknown_072E50/func_80073E1C.s | 2 +- .../unknown_072E50/func_80073F5C.s | 2 +- .../unknown_072E50/func_80074018.s | 2 +- .../unknown_072E50/func_80074148.s | 2 +- .../unknown_072E50/func_80074204.s | 2 +- .../unknown_072E50/func_8007431C.s | 2 +- .../unknown_072E50/func_800744DC.s | 2 +- .../unknown_072E50/func_800745D0.s | 2 +- .../unknown_072E50/func_800746F0.s | 2 +- .../unknown_072E50/func_80074B34.s | 4 +- .../unknown_072E50/func_80074EB8.s | 2 +- .../unknown_072E50/func_80075000.s | 4 +- .../unknown_072E50/func_800753D8.s | 4 +- .../unknown_072E50/func_800756D4.s | 2 +- .../unknown_072E50/func_80075E60.s | 2 +- .../unknown_072E50/func_80076388.s | 2 +- .../unknown_072E50/func_80076C58.s | 6 +- .../unknown_07AF10/func_8007A7E8.s | 8 +- .../unknown_07B870/func_8007AC70.s | 10 +- .../unknown_07B870/func_8007AE74.s | 4 +- .../unknown_07B870/func_8007C12C.s | 2 +- .../unknown_07B870/func_8007C57C.s | 2 +- .../unknown_09F8F0/func_8009ECF0.s | 4 +- .../unknown_09F8F0/func_800AB4A8.s | 12 +- .../unknown_0AEE70/func_800AE728.s | 16 +- .../unknown_0AEE70/func_800AF29C.s | 2 +- .../unknown_0B8920/func_800B7EB4.s | 16 +- .../unknown_0B8920/func_800BBF78.s | 4 +- .../unknown_0B8920/func_800BCC70.s | 8 +- .../unknown_0B8920/func_800BE654.s | 2 +- .../unknown_0B8920/func_800C0B00.s | 2 +- .../unknown_0B8920/func_800C15D4.s | 2 +- .../unknown_0B8920/func_800C29F0.s | 2 +- .../unknown_0B8920/func_800C3048.s | 2 +- .../unknown_0B8920/func_800C3C00.s | 2 +- src/audio.c | 18 +- src/memory.c | 397 ++++++++++++++++++ src/{unknown_071730.h => memory.h} | 0 src/menu.c | 10 +- src/unknown_003260.c | 2 +- src/unknown_00BC20.c | 36 +- src/unknown_0255E0.c | 6 +- src/unknown_043920.c | 2 +- src/unknown_06B2B0.c | 18 +- src/unknown_071730.c | 285 ------------- src/unknown_072E50.c | 2 +- src/unknown_0777A0.c | 10 +- src/unknown_080240.c | 2 +- src/unknown_0B8920.c | 2 +- src/unknown_0C4800.c | 4 +- 97 files changed, 633 insertions(+), 521 deletions(-) rename asm/non_matchings/{unknown_071730/func_80070D3C.s => memory/allocate_from_memory_pool.s} (94%) rename asm/non_matchings/{unknown_071730/func_8007178C.s => memory/allocate_memory_pool_slot.s} (92%) rename asm/non_matchings/{unknown_071730 => memory}/func_80070EF8.s (93%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071198.s (100%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071278.s (92%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071478.s (94%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071538.s (93%) rename asm/non_matchings/{unknown_071730 => memory}/func_800715EC.s (76%) rename asm/non_matchings/{unknown_071730 => memory}/func_8007164C.s (92%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071850.s (95%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071A24.s (95%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071D30.s (100%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071E58.s (100%) rename asm/non_matchings/{unknown_071730 => memory}/func_80071F80.s (100%) rename asm/non_matchings/{unknown_071730 => memory}/func_800720DC.s (100%) rename asm/non_matchings/{unknown_071730/func_80070BE4.s => memory/new_memory_pool.s} (85%) create mode 100644 src/memory.c rename src/{unknown_071730.h => memory.h} (100%) delete mode 100644 src/unknown_071730.c diff --git a/asm/non_matchings/unknown_071730/func_80070D3C.s b/asm/non_matchings/memory/allocate_from_memory_pool.s similarity index 94% rename from asm/non_matchings/unknown_071730/func_80070D3C.s rename to asm/non_matchings/memory/allocate_from_memory_pool.s index 14a9881b..4596f6fc 100644 --- a/asm/non_matchings/unknown_071730/func_80070D3C.s +++ b/asm/non_matchings/memory/allocate_from_memory_pool.s @@ -1,4 +1,4 @@ -glabel func_80070D3C +glabel allocate_from_memory_pool /* 07193C 80070D3C 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 071940 80070D40 AFBF0024 */ sw $ra, 0x24($sp) /* 071944 80070D44 AFB10020 */ sw $s1, 0x20($sp) @@ -8,9 +8,9 @@ glabel func_80070D3C /* 071954 80070D54 0C01BD44 */ jal func_8006F510 /* 071958 80070D58 AFA60048 */ sw $a2, 0x48($sp) /* 07195C 80070D5C 8FAE0040 */ lw $t6, 0x40($sp) -/* 071960 80070D60 3C188012 */ lui $t8, %hi(D_80123580) # $t8, 0x8012 +/* 071960 80070D60 3C188012 */ lui $t8, %hi(gMemoryPools) # $t8, 0x8012 /* 071964 80070D64 AFA20028 */ sw $v0, 0x28($sp) -/* 071968 80070D68 27183580 */ addiu $t8, %lo(D_80123580) # addiu $t8, $t8, 0x3580 +/* 071968 80070D68 27183580 */ addiu $t8, %lo(gMemoryPools) # addiu $t8, $t8, 0x3580 /* 07196C 80070D6C 000E7900 */ sll $t7, $t6, 4 /* 071970 80070D70 01F81021 */ addu $v0, $t7, $t8 /* 071974 80070D74 8C590004 */ lw $t9, 4($v0) @@ -66,7 +66,7 @@ glabel func_80070D3C /* 071A2C 80070E2C 24070001 */ li $a3, 1 /* 071A30 80070E30 AFA00010 */ sw $zero, 0x10($sp) /* 071A34 80070E34 AFA9002C */ sw $t1, 0x2c($sp) -/* 071A38 80070E38 0C01C5E3 */ jal func_8007178C +/* 071A38 80070E38 0C01C5E3 */ jal allocate_memory_pool_slot /* 071A3C 80070E3C AFB80014 */ sw $t8, 0x14($sp) /* 071A40 80070E40 8FA40028 */ lw $a0, 0x28($sp) /* 071A44 80070E44 0C01BD4F */ jal func_8006F53C diff --git a/asm/non_matchings/unknown_071730/func_8007178C.s b/asm/non_matchings/memory/allocate_memory_pool_slot.s similarity index 92% rename from asm/non_matchings/unknown_071730/func_8007178C.s rename to asm/non_matchings/memory/allocate_memory_pool_slot.s index 7e1ab2d3..4f78edeb 100644 --- a/asm/non_matchings/unknown_071730/func_8007178C.s +++ b/asm/non_matchings/memory/allocate_memory_pool_slot.s @@ -1,8 +1,8 @@ -glabel func_8007178C +glabel allocate_memory_pool_slot /* 07238C 8007178C 240B0014 */ li $t3, 20 /* 072390 80071790 00AB0019 */ multu $a1, $t3 -/* 072394 80071794 3C0F8012 */ lui $t7, %hi(D_80123580) # $t7, 0x8012 -/* 072398 80071798 25EF3580 */ addiu $t7, %lo(D_80123580) # addiu $t7, $t7, 0x3580 +/* 072394 80071794 3C0F8012 */ lui $t7, %hi(gMemoryPools) # $t7, 0x8012 +/* 072398 80071798 25EF3580 */ addiu $t7, %lo(gMemoryPools) # addiu $t7, $t7, 0x3580 /* 07239C 8007179C 00047100 */ sll $t6, $a0, 4 /* 0723A0 800717A0 01CF1821 */ addu $v1, $t6, $t7 /* 0723A4 800717A4 8C620008 */ lw $v0, 8($v1) diff --git a/asm/non_matchings/unknown_071730/func_80070EF8.s b/asm/non_matchings/memory/func_80070EF8.s similarity index 93% rename from asm/non_matchings/unknown_071730/func_80070EF8.s rename to asm/non_matchings/memory/func_80070EF8.s index e3d981f6..33ee097a 100644 --- a/asm/non_matchings/unknown_071730/func_80070EF8.s +++ b/asm/non_matchings/memory/func_80070EF8.s @@ -9,8 +9,8 @@ glabel func_80070EF8 /* 071B14 80070F14 0C01BD44 */ jal func_8006F510 /* 071B18 80070F18 AFA60050 */ sw $a2, 0x50($sp) /* 071B1C 80070F1C AFA20038 */ sw $v0, 0x38($sp) -/* 071B20 80070F20 3C028012 */ lui $v0, %hi(D_80123580) # $v0, 0x8012 -/* 071B24 80070F24 24423580 */ addiu $v0, %lo(D_80123580) # addiu $v0, $v0, 0x3580 +/* 071B20 80070F20 3C028012 */ lui $v0, %hi(gMemoryPools) # $v0, 0x8012 +/* 071B24 80070F24 24423580 */ addiu $v0, %lo(gMemoryPools) # addiu $v0, $v0, 0x3580 /* 071B28 80070F28 8C4E0004 */ lw $t6, 4($v0) /* 071B2C 80070F2C 8C580000 */ lw $t8, ($v0) /* 071B30 80070F30 25CF0001 */ addiu $t7, $t6, 1 @@ -59,7 +59,7 @@ glabel func_80070EF8 /* 071BD0 80070FD0 24070001 */ li $a3, 1 /* 071BD4 80070FD4 AFA00010 */ sw $zero, 0x10($sp) /* 071BD8 80070FD8 AFA30034 */ sw $v1, 0x34($sp) -/* 071BDC 80070FDC 0C01C5E3 */ jal func_8007178C +/* 071BDC 80070FDC 0C01C5E3 */ jal allocate_memory_pool_slot /* 071BE0 80070FE0 AFB80014 */ sw $t8, 0x14($sp) /* 071BE4 80070FE4 8FA40038 */ lw $a0, 0x38($sp) /* 071BE8 80070FE8 0C01BD4F */ jal func_8006F53C @@ -77,7 +77,7 @@ glabel func_80070EF8 /* 071C14 80071014 02223023 */ subu $a2, $s1, $v0 /* 071C18 80071018 00003825 */ move $a3, $zero /* 071C1C 8007101C AFA9003C */ sw $t1, 0x3c($sp) -/* 071C20 80071020 0C01C5E3 */ jal func_8007178C +/* 071C20 80071020 0C01C5E3 */ jal allocate_memory_pool_slot /* 071C24 80071024 AFAA0014 */ sw $t2, 0x14($sp) /* 071C28 80071028 8FAB0050 */ lw $t3, 0x50($sp) /* 071C2C 8007102C 00408025 */ move $s0, $v0 @@ -86,7 +86,7 @@ glabel func_80070EF8 /* 071C38 80071038 02403025 */ move $a2, $s2 /* 071C3C 8007103C 24070001 */ li $a3, 1 /* 071C40 80071040 AFA00010 */ sw $zero, 0x10($sp) -/* 071C44 80071044 0C01C5E3 */ jal func_8007178C +/* 071C44 80071044 0C01C5E3 */ jal allocate_memory_pool_slot /* 071C48 80071048 AFAB0014 */ sw $t3, 0x14($sp) /* 071C4C 8007104C 8FA40038 */ lw $a0, 0x38($sp) /* 071C50 80071050 0C01BD4F */ jal func_8006F53C diff --git a/asm/non_matchings/unknown_071730/func_80071198.s b/asm/non_matchings/memory/func_80071198.s similarity index 100% rename from asm/non_matchings/unknown_071730/func_80071198.s rename to asm/non_matchings/memory/func_80071198.s diff --git a/asm/non_matchings/unknown_071730/func_80071278.s b/asm/non_matchings/memory/func_80071278.s similarity index 92% rename from asm/non_matchings/unknown_071730/func_80071278.s rename to asm/non_matchings/memory/func_80071278.s index 33867484..c5bccb0d 100644 --- a/asm/non_matchings/unknown_071730/func_80071278.s +++ b/asm/non_matchings/memory/func_80071278.s @@ -4,10 +4,10 @@ glabel func_80071278 /* 071E80 80071280 0C01C57B */ jal func_800715EC /* 071E84 80071284 AFA40020 */ sw $a0, 0x20($sp) /* 071E88 80071288 00027100 */ sll $t6, $v0, 4 -/* 071E8C 8007128C 3C038012 */ lui $v1, %hi(D_80123580+8) # $v1, 0x8012 +/* 071E8C 8007128C 3C038012 */ lui $v1, %hi(gMemoryPools+8) # $v1, 0x8012 /* 071E90 80071290 006E1821 */ addu $v1, $v1, $t6 /* 071E94 80071294 8FA40020 */ lw $a0, 0x20($sp) -/* 071E98 80071298 8C633588 */ lw $v1, %lo(D_80123580+8)($v1) +/* 071E98 80071298 8C633588 */ lw $v1, %lo(gMemoryPools+8)($v1) /* 071E9C 8007129C AFA20018 */ sw $v0, 0x18($sp) /* 071EA0 800712A0 00002825 */ move $a1, $zero /* 071EA4 800712A4 2407FFFF */ li $a3, -1 @@ -55,13 +55,13 @@ glabel func_80071278 /* 071F38 80071338 AFB1001C */ sw $s1, 0x1c($sp) /* 071F3C 8007133C 0C01BD44 */ jal func_8006F510 /* 071F40 80071340 AFB00018 */ sw $s0, 0x18($sp) -/* 071F44 80071344 3C128012 */ lui $s2, %hi(D_801235C0) # $s2, 0x8012 -/* 071F48 80071348 8E5235C0 */ lw $s2, %lo(D_801235C0)($s2) +/* 071F44 80071344 3C128012 */ lui $s2, %hi(gNumberOfMemoryPools) # $s2, 0x8012 +/* 071F48 80071348 8E5235C0 */ lw $s2, %lo(gNumberOfMemoryPools)($s2) /* 071F4C 8007134C 2416FFFF */ li $s6, -1 /* 071F50 80071350 1256002C */ beq $s2, $s6, .L80071404 /* 071F54 80071354 AFA20040 */ sw $v0, 0x40($sp) -/* 071F58 80071358 3C0F8012 */ lui $t7, %hi(D_80123580) # $t7, 0x8012 -/* 071F5C 8007135C 25EF3580 */ addiu $t7, %lo(D_80123580) # addiu $t7, $t7, 0x3580 +/* 071F58 80071358 3C0F8012 */ lui $t7, %hi(gMemoryPools) # $t7, 0x8012 +/* 071F5C 8007135C 25EF3580 */ addiu $t7, %lo(gMemoryPools) # addiu $t7, $t7, 0x3580 /* 071F60 80071360 00127100 */ sll $t6, $s2, 4 /* 071F64 80071364 01CFA821 */ addu $s5, $t6, $t7 /* 071F68 80071368 241E0004 */ li $fp, 4 diff --git a/asm/non_matchings/unknown_071730/func_80071478.s b/asm/non_matchings/memory/func_80071478.s similarity index 94% rename from asm/non_matchings/unknown_071730/func_80071478.s rename to asm/non_matchings/memory/func_80071478.s index db6fb9ea..574bc704 100644 --- a/asm/non_matchings/unknown_071730/func_80071478.s +++ b/asm/non_matchings/memory/func_80071478.s @@ -8,9 +8,9 @@ glabel func_80071478 /* 072090 80071490 0C01C57B */ jal func_800715EC /* 072094 80071494 02002025 */ move $a0, $s0 /* 072098 80071498 00027100 */ sll $t6, $v0, 4 -/* 07209C 8007149C 3C048012 */ lui $a0, %hi(D_80123580+8) # $a0, 0x8012 +/* 07209C 8007149C 3C048012 */ lui $a0, %hi(gMemoryPools+8) # $a0, 0x8012 /* 0720A0 800714A0 008E2021 */ addu $a0, $a0, $t6 -/* 0720A4 800714A4 8C843588 */ lw $a0, %lo(D_80123580+8)($a0) +/* 0720A4 800714A4 8C843588 */ lw $a0, %lo(gMemoryPools+8)($a0) /* 0720A8 800714A8 00001825 */ move $v1, $zero /* 0720AC 800714AC 2409FFFF */ li $t1, -1 /* 0720B0 800714B0 24080004 */ li $t0, 4 diff --git a/asm/non_matchings/unknown_071730/func_80071538.s b/asm/non_matchings/memory/func_80071538.s similarity index 93% rename from asm/non_matchings/unknown_071730/func_80071538.s rename to asm/non_matchings/memory/func_80071538.s index ac75cf2b..b16ec814 100644 --- a/asm/non_matchings/unknown_071730/func_80071538.s +++ b/asm/non_matchings/memory/func_80071538.s @@ -7,10 +7,10 @@ glabel func_80071538 /* 07214C 8007154C 0C01C57B */ jal func_800715EC /* 072150 80071550 AFA20018 */ sw $v0, 0x18($sp) /* 072154 80071554 00027100 */ sll $t6, $v0, 4 -/* 072158 80071558 3C048012 */ lui $a0, %hi(D_80123580+8) # $a0, 0x8012 +/* 072158 80071558 3C048012 */ lui $a0, %hi(gMemoryPools+8) # $a0, 0x8012 /* 07215C 8007155C 008E2021 */ addu $a0, $a0, $t6 /* 072160 80071560 8FA70028 */ lw $a3, 0x28($sp) -/* 072164 80071564 8C843588 */ lw $a0, %lo(D_80123580+8)($a0) +/* 072164 80071564 8C843588 */ lw $a0, %lo(gMemoryPools+8)($a0) /* 072168 80071568 00001825 */ move $v1, $zero /* 07216C 8007156C 2406FFFF */ li $a2, -1 /* 072170 80071570 24050014 */ li $a1, 20 diff --git a/asm/non_matchings/unknown_071730/func_800715EC.s b/asm/non_matchings/memory/func_800715EC.s similarity index 76% rename from asm/non_matchings/unknown_071730/func_800715EC.s rename to asm/non_matchings/memory/func_800715EC.s index 35cc453e..2fb01e1a 100644 --- a/asm/non_matchings/unknown_071730/func_800715EC.s +++ b/asm/non_matchings/memory/func_800715EC.s @@ -1,11 +1,11 @@ glabel func_800715EC -/* 0721EC 800715EC 3C038012 */ lui $v1, %hi(D_801235C0) # $v1, 0x8012 -/* 0721F0 800715F0 8C6335C0 */ lw $v1, %lo(D_801235C0)($v1) +/* 0721EC 800715EC 3C038012 */ lui $v1, %hi(gNumberOfMemoryPools) # $v1, 0x8012 +/* 0721F0 800715F0 8C6335C0 */ lw $v1, %lo(gNumberOfMemoryPools)($v1) /* 0721F4 800715F4 00802825 */ move $a1, $a0 /* 0721F8 800715F8 18600012 */ blez $v1, .L80071644 /* 0721FC 800715FC 00037100 */ sll $t6, $v1, 4 -/* 072200 80071600 3C0F8012 */ lui $t7, %hi(D_80123580) # $t7, 0x8012 -/* 072204 80071604 25EF3580 */ addiu $t7, %lo(D_80123580) # addiu $t7, $t7, 0x3580 +/* 072200 80071600 3C0F8012 */ lui $t7, %hi(gMemoryPools) # $t7, 0x8012 +/* 072204 80071604 25EF3580 */ addiu $t7, %lo(gMemoryPools) # addiu $t7, $t7, 0x3580 /* 072208 80071608 01CF1021 */ addu $v0, $t6, $t7 .L8007160C: /* 07220C 8007160C 8C440008 */ lw $a0, 8($v0) diff --git a/asm/non_matchings/unknown_071730/func_8007164C.s b/asm/non_matchings/memory/func_8007164C.s similarity index 92% rename from asm/non_matchings/unknown_071730/func_8007164C.s rename to asm/non_matchings/memory/func_8007164C.s index 30aa83a6..117f29d0 100644 --- a/asm/non_matchings/unknown_071730/func_8007164C.s +++ b/asm/non_matchings/memory/func_8007164C.s @@ -1,8 +1,8 @@ glabel func_8007164C /* 07224C 8007164C 240A0014 */ li $t2, 20 /* 072250 80071650 00AA0019 */ multu $a1, $t2 -/* 072254 80071654 3C0F8012 */ lui $t7, %hi(D_80123580) # $t7, 0x8012 -/* 072258 80071658 25EF3580 */ addiu $t7, %lo(D_80123580) # addiu $t7, $t7, 0x3580 +/* 072254 80071654 3C0F8012 */ lui $t7, %hi(gMemoryPools) # $t7, 0x8012 +/* 072258 80071658 25EF3580 */ addiu $t7, %lo(gMemoryPools) # addiu $t7, $t7, 0x3580 /* 07225C 8007165C 00047100 */ sll $t6, $a0, 4 /* 072260 80071660 01CF1821 */ addu $v1, $t6, $t7 /* 072264 80071664 8C620008 */ lw $v0, 8($v1) @@ -79,9 +79,9 @@ glabel func_8007164C /* 072370 80071770 00000000 */ nop /* 072374 80071774 00047100 */ sll $t6, $a0, 4 -/* 072378 80071778 3C028012 */ lui $v0, %hi(D_80123580+8) # $v0, 0x8012 +/* 072378 80071778 3C028012 */ lui $v0, %hi(gMemoryPools+8) # $v0, 0x8012 /* 07237C 8007177C 004E1021 */ addu $v0, $v0, $t6 -/* 072380 80071780 8C423588 */ lw $v0, %lo(D_80123580+8)($v0) +/* 072380 80071780 8C423588 */ lw $v0, %lo(gMemoryPools+8)($v0) /* 072384 80071784 03E00008 */ jr $ra /* 072388 80071788 00000000 */ nop diff --git a/asm/non_matchings/unknown_071730/func_80071850.s b/asm/non_matchings/memory/func_80071850.s similarity index 95% rename from asm/non_matchings/unknown_071730/func_80071850.s rename to asm/non_matchings/memory/func_80071850.s index 24625541..5d27da02 100644 --- a/asm/non_matchings/unknown_071730/func_80071850.s +++ b/asm/non_matchings/memory/func_80071850.s @@ -44,11 +44,11 @@ glabel func_80071850 /* 0724DC 800718DC AC80FFF0 */ sw $zero, -0x10($a0) /* 0724E0 800718E0 14A3FFF6 */ bne $a1, $v1, .L800718BC /* 0724E4 800718E4 ACA0FFF0 */ sw $zero, -0x10($a1) -/* 0724E8 800718E8 3C048012 */ lui $a0, %hi(D_801235C0) # $a0, 0x8012 -/* 0724EC 800718EC 8C8435C0 */ lw $a0, %lo(D_801235C0)($a0) -/* 0724F0 800718F0 3C0E8012 */ lui $t6, %hi(D_80123580) # $t6, 0x8012 +/* 0724E8 800718E8 3C048012 */ lui $a0, %hi(gNumberOfMemoryPools) # $a0, 0x8012 +/* 0724EC 800718EC 8C8435C0 */ lw $a0, %lo(gNumberOfMemoryPools)($a0) +/* 0724F0 800718F0 3C0E8012 */ lui $t6, %hi(gMemoryPools) # $t6, 0x8012 /* 0724F4 800718F4 1880003B */ blez $a0, .L800719E4 -/* 0724F8 800718F8 25C53580 */ addiu $a1, $t6, %lo(D_80123580) +/* 0724F8 800718F8 25C53580 */ addiu $a1, $t6, %lo(gMemoryPools) /* 0724FC 800718FC 00047900 */ sll $t7, $a0, 4 /* 072500 80071900 01E55021 */ addu $t2, $t7, $a1 /* 072504 80071904 24100014 */ li $s0, 20 diff --git a/asm/non_matchings/unknown_071730/func_80071A24.s b/asm/non_matchings/memory/func_80071A24.s similarity index 95% rename from asm/non_matchings/unknown_071730/func_80071A24.s rename to asm/non_matchings/memory/func_80071A24.s index e03583c2..190df96d 100644 --- a/asm/non_matchings/unknown_071730/func_80071A24.s +++ b/asm/non_matchings/memory/func_80071A24.s @@ -26,8 +26,8 @@ glabel D_800E7584 .text glabel func_80071A24 -/* 072624 80071A24 3C028012 */ lui $v0, %hi(D_80123580+8) # $v0, 0x8012 -/* 072628 80071A28 8C423588 */ lw $v0, %lo(D_80123580+8)($v0) +/* 072624 80071A24 3C028012 */ lui $v0, %hi(gMemoryPools+8) # $v0, 0x8012 +/* 072628 80071A28 8C423588 */ lw $v0, %lo(gMemoryPools+8)($v0) /* 07262C 80071A2C 00001825 */ move $v1, $zero /* 072630 80071A30 00002825 */ move $a1, $zero /* 072634 80071A34 24060640 */ li $a2, 1600 @@ -182,11 +182,11 @@ glabel func_80071A24 /* 07286C 80071C6C 03E00008 */ jr $ra /* 072870 80071C70 00000000 */ nop -/* 072874 80071C74 3C038012 */ lui $v1, %hi(D_801235C0) # $v1, 0x8012 -/* 072878 80071C78 8C6335C0 */ lw $v1, %lo(D_801235C0)($v1) -/* 07287C 80071C7C 3C0E8012 */ lui $t6, %hi(D_80123580) # $t6, 0x8012 +/* 072874 80071C74 3C038012 */ lui $v1, %hi(gNumberOfMemoryPools) # $v1, 0x8012 +/* 072878 80071C78 8C6335C0 */ lw $v1, %lo(gNumberOfMemoryPools)($v1) +/* 07287C 80071C7C 3C0E8012 */ lui $t6, %hi(gMemoryPools) # $t6, 0x8012 /* 072880 80071C80 04600017 */ bltz $v1, .L80071CE0 -/* 072884 80071C84 25C43580 */ addiu $a0, $t6, %lo(D_80123580) +/* 072884 80071C84 25C43580 */ addiu $a0, $t6, %lo(gMemoryPools) /* 072888 80071C88 00037900 */ sll $t7, $v1, 4 /* 07288C 80071C8C 01E44021 */ addu $t0, $t7, $a0 /* 072890 80071C90 240C0014 */ li $t4, 20 @@ -217,8 +217,8 @@ glabel func_80071A24 /* 0728E0 80071CE0 03E00008 */ jr $ra /* 0728E4 80071CE4 00000000 */ nop -/* 0728E8 80071CE8 3C028012 */ lui $v0, %hi(D_801235C0) # $v0, 0x8012 -/* 0728EC 80071CEC 8C4235C0 */ lw $v0, %lo(D_801235C0)($v0) +/* 0728E8 80071CE8 3C028012 */ lui $v0, %hi(gNumberOfMemoryPools) # $v0, 0x8012 +/* 0728EC 80071CEC 8C4235C0 */ lw $v0, %lo(gNumberOfMemoryPools)($v0) /* 0728F0 80071CF0 2405FFFF */ li $a1, -1 /* 0728F4 80071CF4 1045000C */ beq $v0, $a1, .L80071D28 /* 0728F8 80071CF8 24440001 */ addiu $a0, $v0, 1 diff --git a/asm/non_matchings/unknown_071730/func_80071D30.s b/asm/non_matchings/memory/func_80071D30.s similarity index 100% rename from asm/non_matchings/unknown_071730/func_80071D30.s rename to asm/non_matchings/memory/func_80071D30.s diff --git a/asm/non_matchings/unknown_071730/func_80071E58.s b/asm/non_matchings/memory/func_80071E58.s similarity index 100% rename from asm/non_matchings/unknown_071730/func_80071E58.s rename to asm/non_matchings/memory/func_80071E58.s diff --git a/asm/non_matchings/unknown_071730/func_80071F80.s b/asm/non_matchings/memory/func_80071F80.s similarity index 100% rename from asm/non_matchings/unknown_071730/func_80071F80.s rename to asm/non_matchings/memory/func_80071F80.s diff --git a/asm/non_matchings/unknown_071730/func_800720DC.s b/asm/non_matchings/memory/func_800720DC.s similarity index 100% rename from asm/non_matchings/unknown_071730/func_800720DC.s rename to asm/non_matchings/memory/func_800720DC.s diff --git a/asm/non_matchings/unknown_071730/func_80070BE4.s b/asm/non_matchings/memory/new_memory_pool.s similarity index 85% rename from asm/non_matchings/unknown_071730/func_80070BE4.s rename to asm/non_matchings/memory/new_memory_pool.s index 041f9aff..e61ff9ab 100644 --- a/asm/non_matchings/unknown_071730/func_80070BE4.s +++ b/asm/non_matchings/memory/new_memory_pool.s @@ -1,11 +1,11 @@ -glabel func_80070BE4 -/* 0717E4 80070BE4 3C098012 */ lui $t1, %hi(D_801235C0) # $t1, 0x8012 -/* 0717E8 80070BE8 252935C0 */ addiu $t1, %lo(D_801235C0) # addiu $t1, $t1, 0x35c0 +glabel new_memory_pool +/* 0717E4 80070BE4 3C098012 */ lui $t1, %hi(gNumberOfMemoryPools) # $t1, 0x8012 +/* 0717E8 80070BE8 252935C0 */ addiu $t1, %lo(gNumberOfMemoryPools) # addiu $t1, $t1, 0x35c0 /* 0717EC 80070BEC 8D2E0000 */ lw $t6, ($t1) -/* 0717F0 80070BF0 3C198012 */ lui $t9, %hi(D_80123580) # $t9, 0x8012 +/* 0717F0 80070BF0 3C198012 */ lui $t9, %hi(gMemoryPools) # $t9, 0x8012 /* 0717F4 80070BF4 25CF0001 */ addiu $t7, $t6, 1 /* 0717F8 80070BF8 000FC100 */ sll $t8, $t7, 4 -/* 0717FC 80070BFC 27393580 */ addiu $t9, %lo(D_80123580) # addiu $t9, $t9, 0x3580 +/* 0717FC 80070BFC 27393580 */ addiu $t9, %lo(gMemoryPools) # addiu $t9, $t9, 0x3580 /* 071800 80070C00 03193821 */ addu $a3, $t8, $t9 /* 071804 80070C04 AD2F0000 */ sw $t7, ($t1) /* 071808 80070C08 ACE60000 */ sw $a2, ($a3) diff --git a/asm/non_matchings/menu/func_8007FFEC.s b/asm/non_matchings/menu/func_8007FFEC.s index 533cb222..42f71767 100644 --- a/asm/non_matchings/menu/func_8007FFEC.s +++ b/asm/non_matchings/menu/func_8007FFEC.s @@ -33,7 +33,7 @@ glabel func_8007FFEC /* 080C64 80080064 AFB80020 */ sw $t8, 0x20($sp) /* 080C68 80080068 AFAC0028 */ sw $t4, 0x28($sp) /* 080C6C 8008006C AFAD0024 */ sw $t5, 0x24($sp) -/* 080C70 80080070 0C01C327 */ jal func_80070C9C +/* 080C70 80080070 0C01C327 */ jal allocate_from_main_pool_safe /* 080C74 80080074 2405FFFF */ li $a1, -1 /* 080C78 80080078 8FA30020 */ lw $v1, 0x20($sp) /* 080C7C 8008007C 3C07800E */ lui $a3, %hi(D_800E1DAC) # $a3, 0x800e diff --git a/asm/non_matchings/menu/func_80081218.s b/asm/non_matchings/menu/func_80081218.s index 672a7f10..cf4ed12f 100644 --- a/asm/non_matchings/menu/func_80081218.s +++ b/asm/non_matchings/menu/func_80081218.s @@ -15,7 +15,7 @@ glabel func_80081218 /* 081E4C 8008124C 00192080 */ sll $a0, $t9, 2 /* 081E50 80081250 AFB90020 */ sw $t9, 0x20($sp) /* 081E54 80081254 AFAE0028 */ sw $t6, 0x28($sp) -/* 081E58 80081258 0C01C327 */ jal func_80070C9C +/* 081E58 80081258 0C01C327 */ jal allocate_from_main_pool_safe /* 081E5C 8008125C 2405FFFF */ li $a1, -1 /* 081E60 80081260 3C048012 */ lui $a0, %hi(D_80126530) # $a0, 0x8012 /* 081E64 80081264 24846530 */ addiu $a0, %lo(D_80126530) # addiu $a0, $a0, 0x6530 @@ -85,7 +85,7 @@ glabel func_80081218 /* 081F64 80081364 3C018012 */ lui $at, %hi(D_80126C38) # $at, 0x8012 /* 081F68 80081368 24041000 */ li $a0, 4096 /* 081F6C 8008136C 2405FFFF */ li $a1, -1 -/* 081F70 80081370 0C01C327 */ jal func_80070C9C +/* 081F70 80081370 0C01C327 */ jal allocate_from_main_pool_safe /* 081F74 80081374 AC386C38 */ sw $t8, %lo(D_80126C38)($at) /* 081F78 80081378 3C01800E */ lui $at, %hi(D_800DF4A0) # $at, 0x800e /* 081F7C 8008137C AC22F4A0 */ sw $v0, %lo(D_800DF4A0)($at) diff --git a/asm/non_matchings/menu/func_8008AD44.s b/asm/non_matchings/menu/func_8008AD44.s index fc1c0c93..5e7a3246 100644 --- a/asm/non_matchings/menu/func_8008AD44.s +++ b/asm/non_matchings/menu/func_8008AD44.s @@ -15,7 +15,7 @@ glabel func_8008AD44 /* 08B978 8008AD78 24131000 */ li $s3, 4096 /* 08B97C 8008AD7C 02009025 */ move $s2, $s0 /* 08B980 8008AD80 24045000 */ li $a0, 20480 -/* 08B984 8008AD84 0C01C327 */ jal func_80070C9C +/* 08B984 8008AD84 0C01C327 */ jal allocate_from_main_pool_safe /* 08B988 8008AD88 240500FF */ li $a1, 255 /* 08B98C 8008AD8C 1200002C */ beqz $s0, .L8008AE40 /* 08B990 8008AD90 0040A025 */ move $s4, $v0 diff --git a/asm/non_matchings/menu/menu_track_select_init.s b/asm/non_matchings/menu/menu_track_select_init.s index 5058a3e2..6ea2e186 100644 --- a/asm/non_matchings/menu/menu_track_select_init.s +++ b/asm/non_matchings/menu/menu_track_select_init.s @@ -147,7 +147,7 @@ glabel menu_track_select_init /* 08F5CC 8008E9CC 26310006 */ addiu $s1, $s1, 6 /* 08F5D0 8008E9D0 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 08F5D4 8008E9D4 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 08F5D8 8008E9D8 0C01C327 */ jal func_80070C9C +/* 08F5D8 8008E9D8 0C01C327 */ jal allocate_from_main_pool_safe /* 08F5DC 8008E9DC 24040B40 */ li $a0, 2880 /* 08F5E0 8008E9E0 3C05800E */ lui $a1, %hi(D_800E0970) # $a1, 0x800e /* 08F5E4 8008E9E4 24A50970 */ addiu $a1, %lo(D_800E0970) # addiu $a1, $a1, 0x970 diff --git a/asm/non_matchings/unknown_003260/audioNewThread.s b/asm/non_matchings/unknown_003260/audioNewThread.s index d66d5b25..80ec1e15 100644 --- a/asm/non_matchings/unknown_003260/audioNewThread.s +++ b/asm/non_matchings/unknown_003260/audioNewThread.s @@ -82,7 +82,7 @@ glabel audioNewThread /* 003394 80002794 03298023 */ subu $s0, $t9, $t1 /* 003398 80002798 00409025 */ move $s2, $v0 /* 00339C 8000279C 02002025 */ move $a0, $s0 -/* 0033A0 800027A0 0C01C327 */ jal func_80070C9C +/* 0033A0 800027A0 0C01C327 */ jal allocate_from_main_pool_safe /* 0033A4 800027A4 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 0033A8 800027A8 8E460020 */ lw $a2, 0x20($s2) /* 0033AC 800027AC 00408825 */ move $s1, $v0 diff --git a/asm/non_matchings/unknown_005740/func_80004B40.s b/asm/non_matchings/unknown_005740/func_80004B40.s index f7ab0305..3e2ca7b4 100644 --- a/asm/non_matchings/unknown_005740/func_80004B40.s +++ b/asm/non_matchings/unknown_005740/func_80004B40.s @@ -51,7 +51,7 @@ glabel func_80004B40 /* 0057E4 80004BE4 0019C880 */ sll $t9, $t9, 2 /* 0057E8 80004BE8 02402825 */ move $a1, $s2 /* 0057EC 80004BEC 2404004C */ li $a0, 76 -/* 0057F0 80004BF0 0C01C327 */ jal func_80070C9C +/* 0057F0 80004BF0 0C01C327 */ jal allocate_from_main_pool_safe /* 0057F4 80004BF4 01F98821 */ addu $s1, $t7, $t9 /* 0057F8 80004BF8 0040A825 */ move $s5, $v0 /* 0057FC 80004BFC 24040027 */ li $a0, 39 @@ -60,7 +60,7 @@ glabel func_80004B40 /* 005808 80004C08 0C01DB9A */ jal func_80076E68 /* 00580C 80004C0C 2407004C */ li $a3, 76 /* 005810 80004C10 240400E0 */ li $a0, 224 -/* 005814 80004C14 0C01C327 */ jal func_80070C9C +/* 005814 80004C14 0C01C327 */ jal allocate_from_main_pool_safe /* 005818 80004C18 02402825 */ move $a1, $s2 /* 00581C 80004C1C AFA20044 */ sw $v0, 0x44($sp) /* 005820 80004C20 00401825 */ move $v1, $v0 diff --git a/asm/non_matchings/unknown_005740/func_80008040.s b/asm/non_matchings/unknown_005740/func_80008040.s index 0fa50579..438ad666 100644 --- a/asm/non_matchings/unknown_005740/func_80008040.s +++ b/asm/non_matchings/unknown_005740/func_80008040.s @@ -8,20 +8,20 @@ glabel func_80008040 /* 008C58 80008058 00003025 */ move $a2, $zero /* 008C5C 8000805C 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff /* 008C60 80008060 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 008C64 80008064 0C01C327 */ jal func_80070C9C +/* 008C64 80008064 0C01C327 */ jal allocate_from_main_pool_safe /* 008C68 80008068 240405A0 */ li $a0, 1440 /* 008C6C 8000806C 3C068012 */ lui $a2, %hi(D_80119C48) # $a2, 0x8012 /* 008C70 80008070 24C69C48 */ addiu $a2, %lo(D_80119C48) # addiu $a2, $a2, -0x63b8 /* 008C74 80008074 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff /* 008C78 80008078 ACC20000 */ sw $v0, ($a2) /* 008C7C 8000807C 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 008C80 80008080 0C01C327 */ jal func_80070C9C +/* 008C80 80008080 0C01C327 */ jal allocate_from_main_pool_safe /* 008C84 80008084 240400A0 */ li $a0, 160 /* 008C88 80008088 3C018012 */ lui $at, %hi(D_80119C50) # $at, 0x8012 /* 008C8C 8000808C 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff /* 008C90 80008090 AC229C50 */ sw $v0, %lo(D_80119C50)($at) /* 008C94 80008094 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 008C98 80008098 0C01C327 */ jal func_80070C9C +/* 008C98 80008098 0C01C327 */ jal allocate_from_main_pool_safe /* 008C9C 8000809C 240400A0 */ li $a0, 160 /* 008CA0 800080A0 3C018012 */ lui $at, %hi(D_80119C44) # $at, 0x8012 /* 008CA4 800080A4 AC229C44 */ sw $v0, %lo(D_80119C44)($at) diff --git a/asm/non_matchings/unknown_00BC20/func_8000B020.s b/asm/non_matchings/unknown_00BC20/func_8000B020.s index 9965a3fe..1c787a98 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000B020.s +++ b/asm/non_matchings/unknown_00BC20/func_8000B020.s @@ -20,7 +20,7 @@ glabel func_8000B020 /* 00BC68 8000B068 E7B50010 */ swc1 $f21, 0x10($sp) /* 00BC6C 8000B06C E7B40014 */ swc1 $f20, 0x14($sp) /* 00BC70 8000B070 01C02025 */ move $a0, $t6 -/* 00BC74 8000B074 0C01C327 */ jal func_80070C9C +/* 00BC74 8000B074 0C01C327 */ jal allocate_from_main_pool_safe /* 00BC78 8000B078 3405FFFF */ li $a1, 65535 /* 00BC7C 8000B07C 3C03800E */ lui $v1, %hi(D_800DC754) # $v1, 0x800e /* 00BC80 8000B080 3C05800E */ lui $a1, %hi(D_800DC74C) # $a1, 0x800e diff --git a/asm/non_matchings/unknown_00BC20/func_8000C718.s b/asm/non_matchings/unknown_00BC20/func_8000C718.s index 6b3a0632..72e0ce2a 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000C718.s +++ b/asm/non_matchings/unknown_00BC20/func_8000C718.s @@ -30,7 +30,7 @@ glabel func_8000C718 /* 00D384 8000C784 01A62823 */ subu $a1, $t5, $a2 /* 00D388 8000C788 AFA50020 */ sw $a1, 0x20($sp) /* 00D38C 8000C78C AFAB0018 */ sw $t3, 0x18($sp) -/* 00D390 8000C790 0C01C3A4 */ jal func_80070E90 +/* 00D390 8000C790 0C01C3A4 */ jal allocate_from_pool_containing_slots /* 00D394 8000C794 AFA60024 */ sw $a2, 0x24($sp) /* 00D398 8000C798 8FA60024 */ lw $a2, 0x24($sp) /* 00D39C 8000C79C 8FA70020 */ lw $a3, 0x20($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_8000C8F8.s b/asm/non_matchings/unknown_00BC20/func_8000C8F8.s index 82cc32bd..5c1c59fc 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000C8F8.s +++ b/asm/non_matchings/unknown_00BC20/func_8000C8F8.s @@ -52,7 +52,7 @@ glabel func_8000C8F8 .L8000C9B4: /* 00D5B4 8000C9B4 A020AD3E */ sb $zero, %lo(D_8011AD3E)($at) /* 00D5B8 8000C9B8 24043000 */ li $a0, 12288 -/* 00D5BC 8000C9BC 0C01C327 */ jal func_80070C9C +/* 00D5BC 8000C9BC 0C01C327 */ jal allocate_from_main_pool_safe /* 00D5C0 8000C9C0 3405FFFF */ li $a1, 65535 /* 00D5C4 8000C9C4 8FA3005C */ lw $v1, 0x5c($sp) /* 00D5C8 8000C9C8 3C0B8012 */ lui $t3, %hi(D_8011AEB0) # $t3, 0x8012 diff --git a/asm/non_matchings/unknown_00BC20/func_8000CC7C.s b/asm/non_matchings/unknown_00BC20/func_8000CC7C.s index e0026d40..ac414f9b 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000CC7C.s +++ b/asm/non_matchings/unknown_00BC20/func_8000CC7C.s @@ -534,7 +534,7 @@ glabel func_8000CC7C /* 00DFCC 8000D3CC 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 00DFD0 8000D3D0 24150018 */ li $s5, 24 /* 00DFD4 8000D3D4 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 00DFD8 8000D3D8 0C01C327 */ jal func_80070C9C +/* 00DFD8 8000D3D8 0C01C327 */ jal allocate_from_main_pool_safe /* 00DFDC 8000D3DC 24040010 */ li $a0, 16 /* 00DFE0 8000D3E0 A440000C */ sh $zero, 0xc($v0) /* 00DFE4 8000D3E4 A440000A */ sh $zero, 0xa($v0) diff --git a/asm/non_matchings/unknown_00BC20/func_8000EA54.s b/asm/non_matchings/unknown_00BC20/func_8000EA54.s index 967e7a0c..7a7fbc0f 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000EA54.s +++ b/asm/non_matchings/unknown_00BC20/func_8000EA54.s @@ -594,7 +594,7 @@ glabel L8000EDE0 .L8000F2C8: /* 00FEC8 8000F2C8 8C84AE68 */ lw $a0, %lo(D_8011AE68)($a0) /* 00FECC 8000F2CC 00A08825 */ move $s1, $a1 -/* 00FED0 8000F2D0 0C01C3A4 */ jal func_80070E90 +/* 00FED0 8000F2D0 0C01C3A4 */ jal allocate_from_pool_containing_slots /* 00FED4 8000F2D4 02408025 */ move $s0, $s2 /* 00FED8 8000F2D8 14400018 */ bnez $v0, .L8000F33C /* 00FEDC 8000F2DC 00409025 */ move $s2, $v0 diff --git a/asm/non_matchings/unknown_00BC20/func_8000FD54.s b/asm/non_matchings/unknown_00BC20/func_8000FD54.s index ec4ca02a..37bbbe9b 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000FD54.s +++ b/asm/non_matchings/unknown_00BC20/func_8000FD54.s @@ -23,7 +23,7 @@ glabel func_8000FD54 /* 0109A0 8000FDA0 3405FFFF */ li $a1, 65535 /* 0109A4 8000FDA4 00107880 */ sll $t7, $s0, 2 /* 0109A8 8000FDA8 25F00080 */ addiu $s0, $t7, 0x80 -/* 0109AC 8000FDAC 0C01C344 */ jal func_80070D10 +/* 0109AC 8000FDAC 0C01C344 */ jal allocate_from_main_pool /* 0109B0 8000FDB0 02002025 */ move $a0, $s0 /* 0109B4 8000FDB4 14400006 */ bnez $v0, .L8000FDD0 /* 0109B8 8000FDB8 00409025 */ move $s2, $v0 diff --git a/asm/non_matchings/unknown_0255E0/func_800249F0.s b/asm/non_matchings/unknown_0255E0/func_800249F0.s index e9f29df6..61e7962f 100644 --- a/asm/non_matchings/unknown_0255E0/func_800249F0.s +++ b/asm/non_matchings/unknown_0255E0/func_800249F0.s @@ -165,15 +165,15 @@ glabel func_800249F0 /* 02584C 80024C4C AFA90030 */ sw $t1, 0x30($sp) .L80024C50: /* 025850 80024C50 24040C80 */ li $a0, 3200 -/* 025854 80024C54 0C01C327 */ jal func_80070C9C +/* 025854 80024C54 0C01C327 */ jal allocate_from_main_pool_safe /* 025858 80024C58 02602825 */ move $a1, $s3 /* 02585C 80024C5C AE220000 */ sw $v0, ($s1) /* 025860 80024C60 24043200 */ li $a0, 12800 -/* 025864 80024C64 0C01C327 */ jal func_80070C9C +/* 025864 80024C64 0C01C327 */ jal allocate_from_main_pool_safe /* 025868 80024C68 02602825 */ move $a1, $s3 /* 02586C 80024C6C AE420000 */ sw $v0, ($s2) /* 025870 80024C70 24044E20 */ li $a0, 20000 -/* 025874 80024C74 0C01C327 */ jal func_80070C9C +/* 025874 80024C74 0C01C327 */ jal allocate_from_main_pool_safe /* 025878 80024C78 02602825 */ move $a1, $s3 /* 02587C 80024C7C 3C0A8012 */ lui $t2, %hi(D_8011D348) # $t2, 0x8012 /* 025880 80024C80 254AD348 */ addiu $t2, %lo(D_8011D348) # addiu $t2, $t2, -0x2cb8 diff --git a/asm/non_matchings/unknown_0255E0/func_80025510.s b/asm/non_matchings/unknown_0255E0/func_80025510.s index 6150ca79..d0d367f2 100644 --- a/asm/non_matchings/unknown_0255E0/func_80025510.s +++ b/asm/non_matchings/unknown_0255E0/func_80025510.s @@ -36,7 +36,7 @@ glabel func_80025510 /* 026194 80025594 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 026198 80025598 AFA80024 */ sw $t0, 0x24($sp) /* 02619C 8002559C AFA70028 */ sw $a3, 0x28($sp) -/* 0261A0 800255A0 0C01C327 */ jal func_80070C9C +/* 0261A0 800255A0 0C01C327 */ jal allocate_from_main_pool_safe /* 0261A4 800255A4 00102100 */ sll $a0, $s0, 4 /* 0261A8 800255A8 8FA70028 */ lw $a3, 0x28($sp) /* 0261AC 800255AC 8FA80024 */ lw $t0, 0x24($sp) @@ -53,7 +53,7 @@ glabel func_80025510 /* 0261D8 800255D8 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 0261DC 800255DC 00006012 */ mflo $t4 /* 0261E0 800255E0 032C2021 */ addu $a0, $t9, $t4 -/* 0261E4 800255E4 0C01C327 */ jal func_80070C9C +/* 0261E4 800255E4 0C01C327 */ jal allocate_from_main_pool_safe /* 0261E8 800255E8 00000000 */ nop /* 0261EC 800255EC 3C04800E */ lui $a0, %hi(D_800DC924) # $a0, 0x800e /* 0261F0 800255F0 2484C924 */ addiu $a0, %lo(D_800DC924) # addiu $a0, $a0, -0x36dc diff --git a/asm/non_matchings/unknown_0255E0/func_8002C0C4.s b/asm/non_matchings/unknown_0255E0/func_8002C0C4.s index bbc62e62..d54a8ff7 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002C0C4.s +++ b/asm/non_matchings/unknown_0255E0/func_8002C0C4.s @@ -21,7 +21,7 @@ glabel func_8002C0C4 /* 02CCF8 8002C0F8 36B52A00 */ ori $s5, (0x00082A00 & 0xFFFF) # ori $s5, $s5, 0x2a00 /* 02CCFC 8002C0FC 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 02CD00 8002C100 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 02CD04 8002C104 0C01C327 */ jal func_80070C9C +/* 02CD04 8002C104 0C01C327 */ jal allocate_from_main_pool_safe /* 02CD08 8002C108 02A02025 */ move $a0, $s5 /* 02CD0C 8002C10C 3C038012 */ lui $v1, %hi(D_8011D30C) # $v1, 0x8012 /* 02CD10 8002C110 3C11800E */ lui $s1, %hi(D_800DC918) # $s1, 0x800e @@ -31,13 +31,13 @@ glabel func_8002C0C4 /* 02CD20 8002C120 AC620000 */ sw $v0, ($v1) /* 02CD24 8002C124 AE220000 */ sw $v0, ($s1) /* 02CD28 8002C128 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 02CD2C 8002C12C 0C01C327 */ jal func_80070C9C +/* 02CD2C 8002C12C 0C01C327 */ jal allocate_from_main_pool_safe /* 02CD30 8002C130 240407D0 */ li $a0, 2000 /* 02CD34 8002C134 3C018012 */ lui $at, %hi(D_8011D370) # $at, 0x8012 /* 02CD38 8002C138 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 02CD3C 8002C13C AC22D370 */ sw $v0, %lo(D_8011D370)($at) /* 02CD40 8002C140 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 02CD44 8002C144 0C01C327 */ jal func_80070C9C +/* 02CD44 8002C144 0C01C327 */ jal allocate_from_main_pool_safe /* 02CD48 8002C148 240401F4 */ li $a0, 500 /* 02CD4C 8002C14C 3C018012 */ lui $at, %hi(D_8011D374) # $at, 0x8012 /* 02CD50 8002C150 AC22D374 */ sw $v0, %lo(D_8011D374)($at) diff --git a/asm/non_matchings/unknown_032760/func_80031BB8.s b/asm/non_matchings/unknown_032760/func_80031BB8.s index 9d9c6d9f..31a4379b 100644 --- a/asm/non_matchings/unknown_032760/func_80031BB8.s +++ b/asm/non_matchings/unknown_032760/func_80031BB8.s @@ -15,7 +15,7 @@ glabel func_80031BB8 /* 0327EC 80031BEC 01EE7823 */ subu $t7, $t7, $t6 /* 0327F0 80031BF0 000F2080 */ sll $a0, $t7, 2 /* 0327F4 80031BF4 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 0327F8 80031BF8 0C01C327 */ jal func_80070C9C +/* 0327F8 80031BF8 0C01C327 */ jal allocate_from_main_pool_safe /* 0327FC 80031BFC ACCE0000 */ sw $t6, ($a2) /* 032800 80031C00 3C06800E */ lui $a2, %hi(D_800DC958) # $a2, 0x800e /* 032804 80031C04 24C6C958 */ addiu $a2, %lo(D_800DC958) # addiu $a2, $a2, -0x36a8 diff --git a/asm/non_matchings/unknown_043920/func_80059A68.s b/asm/non_matchings/unknown_043920/func_80059A68.s index aec7b275..92c5a39f 100644 --- a/asm/non_matchings/unknown_043920/func_80059A68.s +++ b/asm/non_matchings/unknown_043920/func_80059A68.s @@ -7,7 +7,7 @@ glabel func_80059A68 /* 05A67C 80059A7C 3C05FF00 */ lui $a1, (0xFF0000FF >> 16) # lui $a1, 0xff00 /* 05A680 80059A80 AFB00018 */ sw $s0, 0x18($sp) /* 05A684 80059A84 AFA60030 */ sw $a2, 0x30($sp) -/* 05A688 80059A88 0C01C327 */ jal func_80070C9C +/* 05A688 80059A88 0C01C327 */ jal allocate_from_main_pool_safe /* 05A68C 80059A8C 34A500FF */ ori $a1, (0xFF0000FF & 0xFFFF) # ori $a1, $a1, 0xff /* 05A690 80059A90 10400029 */ beqz $v0, .L80059B38 /* 05A694 80059A94 00408025 */ move $s0, $v0 @@ -29,7 +29,7 @@ glabel func_80059A68 /* 05A6D0 80059AD0 2405FFFF */ li $a1, -1 /* 05A6D4 80059AD4 24C6FFF8 */ addiu $a2, $a2, -8 /* 05A6D8 80059AD8 00C02025 */ move $a0, $a2 -/* 05A6DC 80059ADC 0C01C327 */ jal func_80070C9C +/* 05A6DC 80059ADC 0C01C327 */ jal allocate_from_main_pool_safe /* 05A6E0 80059AE0 AFA60020 */ sw $a2, 0x20($sp) /* 05A6E4 80059AE4 3C038012 */ lui $v1, %hi(D_8011D590) # $v1, 0x8012 /* 05A6E8 80059AE8 2463D590 */ addiu $v1, %lo(D_8011D590) # addiu $v1, $v1, -0x2a70 diff --git a/asm/non_matchings/unknown_05F690/func_8005F850.s b/asm/non_matchings/unknown_05F690/func_8005F850.s index 789a6921..3508edb0 100644 --- a/asm/non_matchings/unknown_05F690/func_8005F850.s +++ b/asm/non_matchings/unknown_05F690/func_8005F850.s @@ -3,13 +3,13 @@ glabel func_8005F850 /* 060454 8005F854 AFBF0014 */ sw $ra, 0x14($sp) /* 060458 8005F858 3C0500FF */ lui $a1, (0x00FF00FF >> 16) # lui $a1, 0xff /* 06045C 8005F85C 34A500FF */ ori $a1, (0x00FF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 060460 8005F860 0C01C327 */ jal func_80070C9C +/* 060460 8005F860 0C01C327 */ jal allocate_from_main_pool_safe /* 060464 8005F864 24040230 */ li $a0, 560 /* 060468 8005F868 3C018012 */ lui $at, %hi(D_8011D624) # $at, 0x8012 /* 06046C 8005F86C 3C0500FF */ lui $a1, (0x00FF00FF >> 16) # lui $a1, 0xff /* 060470 8005F870 AC22D624 */ sw $v0, %lo(D_8011D624)($at) /* 060474 8005F874 34A500FF */ ori $a1, (0x00FF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 060478 8005F878 0C01C327 */ jal func_80070C9C +/* 060478 8005F878 0C01C327 */ jal allocate_from_main_pool_safe /* 06047C 8005F87C 24040190 */ li $a0, 400 /* 060480 8005F880 3C018012 */ lui $at, %hi(D_8011D628) # $at, 0x8012 /* 060484 8005F884 AC22D628 */ sw $v0, %lo(D_8011D628)($at) @@ -54,7 +54,7 @@ glabel func_8005F850 /* 060518 8005F918 3C0500FF */ lui $a1, (0x00FF00FF >> 16) # lui $a1, 0xff /* 06051C 8005F91C AC22D63C */ sw $v0, %lo(D_8011D63C)($at) /* 060520 8005F920 34A500FF */ ori $a1, (0x00FF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 060524 8005F924 0C01C327 */ jal func_80070C9C +/* 060524 8005F924 0C01C327 */ jal allocate_from_main_pool_safe /* 060528 8005F928 24040C00 */ li $a0, 3072 /* 06052C 8005F92C 3C018012 */ lui $at, %hi(D_8011D644) # $at, 0x8012 /* 060530 8005F930 3C05800E */ lui $a1, %hi(D_800DCEA4) # $a1, 0x800e diff --git a/asm/non_matchings/unknown_05F690/func_8005F99C.s b/asm/non_matchings/unknown_05F690/func_8005F99C.s index 4df9acc1..8b75f5a2 100644 --- a/asm/non_matchings/unknown_05F690/func_8005F99C.s +++ b/asm/non_matchings/unknown_05F690/func_8005F99C.s @@ -77,7 +77,7 @@ glabel func_8005F99C /* 0606AC 8005FAAC 24440080 */ addiu $a0, $v0, 0x80 /* 0606B0 8005FAB0 3C05FF00 */ lui $a1, (0xFF0000FF >> 16) # lui $a1, 0xff00 /* 0606B4 8005FAB4 AFA40034 */ sw $a0, 0x34($sp) -/* 0606B8 8005FAB8 0C01C344 */ jal func_80070D10 +/* 0606B8 8005FAB8 0C01C344 */ jal allocate_from_main_pool /* 0606BC 8005FABC 34A500FF */ ori $a1, (0xFF0000FF & 0xFFFF) # ori $a1, $a1, 0xff /* 0606C0 8005FAC0 14400003 */ bnez $v0, .L8005FAD0 /* 0606C4 8005FAC4 00409025 */ move $s2, $v0 diff --git a/asm/non_matchings/unknown_05F690/func_8005FCD0.s b/asm/non_matchings/unknown_05F690/func_8005FCD0.s index 4501a8b4..72f36acb 100644 --- a/asm/non_matchings/unknown_05F690/func_8005FCD0.s +++ b/asm/non_matchings/unknown_05F690/func_8005FCD0.s @@ -20,7 +20,7 @@ glabel func_8005FCD0 /* 060918 8005FD18 01262021 */ addu $a0, $t1, $a2 /* 06091C 8005FD1C AFA6001C */ sw $a2, 0x1c($sp) /* 060920 8005FD20 AFA70020 */ sw $a3, 0x20($sp) -/* 060924 8005FD24 0C01C344 */ jal func_80070D10 +/* 060924 8005FD24 0C01C344 */ jal allocate_from_main_pool /* 060928 8005FD28 3405FFFF */ li $a1, 65535 /* 06092C 8005FD2C 8FA6001C */ lw $a2, 0x1c($sp) /* 060930 8005FD30 8FA70020 */ lw $a3, 0x20($sp) @@ -55,7 +55,7 @@ glabel func_8005FCD0 /* 06099C 8005FD9C 00064880 */ sll $t1, $a2, 2 /* 0609A0 8005FDA0 01264821 */ addu $t1, $t1, $a2 /* 0609A4 8005FDA4 00094840 */ sll $t1, $t1, 1 -/* 0609A8 8005FDA8 0C01C344 */ jal func_80070D10 +/* 0609A8 8005FDA8 0C01C344 */ jal allocate_from_main_pool /* 0609AC 8005FDAC 25240024 */ addiu $a0, $t1, 0x24 /* 0609B0 8005FDB0 8FA70020 */ lw $a3, 0x20($sp) /* 0609B4 8005FDB4 14400003 */ bnez $v0, .L8005FDC4 @@ -72,7 +72,7 @@ glabel func_8005FCD0 /* 0609DC 8005FDDC A04A001E */ sb $t2, 0x1e($v0) .L8005FDE0: /* 0609E0 8005FDE0 3405FFFF */ li $a1, 65535 -/* 0609E4 8005FDE4 0C01C344 */ jal func_80070D10 +/* 0609E4 8005FDE4 0C01C344 */ jal allocate_from_main_pool /* 0609E8 8005FDE8 AFA70020 */ sw $a3, 0x20($sp) /* 0609EC 8005FDEC 8FA70020 */ lw $a3, 0x20($sp) /* 0609F0 8005FDF0 14400003 */ bnez $v0, .L8005FE00 diff --git a/asm/non_matchings/unknown_05F690/func_8006017C.s b/asm/non_matchings/unknown_05F690/func_8006017C.s index 7f340501..ef89a0a2 100644 --- a/asm/non_matchings/unknown_05F690/func_8006017C.s +++ b/asm/non_matchings/unknown_05F690/func_8006017C.s @@ -50,12 +50,12 @@ glabel func_8006017C /* 060E34 80060234 2442000C */ addiu $v0, $v0, 0xc .L80060238: /* 060E38 80060238 001420C0 */ sll $a0, $s4, 3 -/* 060E3C 8006023C 0C01C344 */ jal func_80070D10 +/* 060E3C 8006023C 0C01C344 */ jal allocate_from_main_pool /* 060E40 80060240 02002825 */ move $a1, $s0 /* 060E44 80060244 1040019A */ beqz $v0, .L800608B0 /* 060E48 80060248 AE42000C */ sw $v0, 0xc($s2) /* 060E4C 8006024C 00142180 */ sll $a0, $s4, 6 -/* 060E50 80060250 0C01C344 */ jal func_80070D10 +/* 060E50 80060250 0C01C344 */ jal allocate_from_main_pool /* 060E54 80060254 02002825 */ move $a1, $s0 /* 060E58 80060258 14400006 */ bnez $v0, .L80060274 /* 060E5C 8006025C AE420010 */ sw $v0, 0x10($s2) diff --git a/asm/non_matchings/unknown_05F690/func_80060EA8.s b/asm/non_matchings/unknown_05F690/func_80060EA8.s index 951c8721..13c8c7ce 100644 --- a/asm/non_matchings/unknown_05F690/func_80060EA8.s +++ b/asm/non_matchings/unknown_05F690/func_80060EA8.s @@ -61,7 +61,7 @@ glabel func_80060EA8 /* 061B84 80060F84 0004C080 */ sll $t8, $a0, 2 /* 061B88 80060F88 0304C023 */ subu $t8, $t8, $a0 /* 061B8C 80060F8C 00182080 */ sll $a0, $t8, 2 -/* 061B90 80060F90 0C01C344 */ jal func_80070D10 +/* 061B90 80060F90 0C01C344 */ jal allocate_from_main_pool /* 061B94 80060F94 A7A70098 */ sh $a3, 0x98($sp) /* 061B98 80060F98 87A70098 */ lh $a3, 0x98($sp) /* 061B9C 80060F9C 8FBF00A4 */ lw $ra, 0xa4($sp) @@ -75,7 +75,7 @@ glabel func_80060EA8 /* 061BB8 80060FB8 3C05FF7F */ lui $a1, (0xFF7F7FFF >> 16) # lui $a1, 0xff7f /* 061BBC 80060FBC AFBF00A4 */ sw $ra, 0xa4($sp) /* 061BC0 80060FC0 34A57FFF */ ori $a1, (0xFF7F7FFF & 0xFFFF) # ori $a1, $a1, 0x7fff -/* 061BC4 80060FC4 0C01C344 */ jal func_80070D10 +/* 061BC4 80060FC4 0C01C344 */ jal allocate_from_main_pool /* 061BC8 80060FC8 00042040 */ sll $a0, $a0, 1 /* 061BCC 80060FCC 8FBF00A4 */ lw $ra, 0xa4($sp) /* 061BD0 80060FD0 240D000C */ li $t5, 12 @@ -245,7 +245,7 @@ glabel func_80060EA8 /* 061E44 80061244 0004C840 */ sll $t9, $a0, 1 /* 061E48 80061248 2412000A */ li $s2, 10 /* 061E4C 8006124C 03202025 */ move $a0, $t9 -/* 061E50 80061250 0C01C344 */ jal func_80070D10 +/* 061E50 80061250 0C01C344 */ jal allocate_from_main_pool /* 061E54 80061254 34A57FFF */ ori $a1, (0xFF7F7FFF & 0xFFFF) # ori $a1, $a1, 0x7fff /* 061E58 80061258 8FBF00A4 */ lw $ra, 0xa4($sp) /* 061E5C 8006125C 240D000C */ li $t5, 12 @@ -528,7 +528,7 @@ glabel func_80060EA8 /* 06223C 8006163C 3C05FF7F */ lui $a1, (0xFF7F7FFF >> 16) # lui $a1, 0xff7f /* 062240 80061640 AFBF00A4 */ sw $ra, 0xa4($sp) /* 062244 80061644 34A57FFF */ ori $a1, (0xFF7F7FFF & 0xFFFF) # ori $a1, $a1, 0x7fff -/* 062248 80061648 0C01C344 */ jal func_80070D10 +/* 062248 80061648 0C01C344 */ jal allocate_from_main_pool /* 06224C 8006164C 00042080 */ sll $a0, $a0, 2 /* 062250 80061650 8FBF00A4 */ lw $ra, 0xa4($sp) /* 062254 80061654 240D000C */ li $t5, 12 diff --git a/asm/non_matchings/unknown_05F690/func_80061A00.s b/asm/non_matchings/unknown_05F690/func_80061A00.s index c817ad66..adaebaf3 100644 --- a/asm/non_matchings/unknown_05F690/func_80061A00.s +++ b/asm/non_matchings/unknown_05F690/func_80061A00.s @@ -39,7 +39,7 @@ glabel func_80061A00 /* 062688 80061A88 86A40048 */ lh $a0, 0x48($s5) /* 06268C 80061A8C AFA30040 */ sw $v1, 0x40($sp) /* 062690 80061A90 0004C8C0 */ sll $t9, $a0, 3 -/* 062694 80061A94 0C01C344 */ jal func_80070D10 +/* 062694 80061A94 0C01C344 */ jal allocate_from_main_pool /* 062698 80061A98 03202025 */ move $a0, $t9 /* 06269C 80061A9C 14400003 */ bnez $v0, .L80061AAC /* 0626A0 80061AA0 AEA20044 */ sw $v0, 0x44($s5) @@ -62,7 +62,7 @@ glabel func_80061A00 /* 0626DC 80061ADC 24440080 */ addiu $a0, $v0, 0x80 /* 0626E0 80061AE0 3C05FF00 */ lui $a1, (0xFF0000FF >> 16) # lui $a1, 0xff00 /* 0626E4 80061AE4 0080B025 */ move $s6, $a0 -/* 0626E8 80061AE8 0C01C344 */ jal func_80070D10 +/* 0626E8 80061AE8 0C01C344 */ jal allocate_from_main_pool /* 0626EC 80061AEC 34A500FF */ ori $a1, (0xFF0000FF & 0xFFFF) # ori $a1, $a1, 0xff /* 0626F0 80061AF0 8EAA0044 */ lw $t2, 0x44($s5) /* 0626F4 80061AF4 02403025 */ move $a2, $s2 diff --git a/asm/non_matchings/unknown_064830/alFxNew.s b/asm/non_matchings/unknown_064830/alFxNew.s index 08554ead..6f9b7480 100644 --- a/asm/non_matchings/unknown_064830/alFxNew.s +++ b/asm/non_matchings/unknown_064830/alFxNew.s @@ -100,13 +100,13 @@ glabel L80064B14 /* 06574C 80064B4C 02A02825 */ move $a1, $s5 /* 065750 80064B50 AECD001C */ sw $t5, 0x1c($s6) /* 065754 80064B54 00002012 */ mflo $a0 -/* 065758 80064B58 0C01C327 */ jal func_80070C9C +/* 065758 80064B58 0C01C327 */ jal allocate_from_main_pool_safe /* 06575C 80064B5C 00000000 */ nop /* 065760 80064B60 8EC4001C */ lw $a0, 0x1c($s6) /* 065764 80064B64 AEC20020 */ sw $v0, 0x20($s6) /* 065768 80064B68 00047840 */ sll $t7, $a0, 1 /* 06576C 80064B6C 01E02025 */ move $a0, $t7 -/* 065770 80064B70 0C01C327 */ jal func_80070C9C +/* 065770 80064B70 0C01C327 */ jal allocate_from_main_pool_safe /* 065774 80064B74 02A02825 */ move $a1, $s5 /* 065778 80064B78 8ED8001C */ lw $t8, 0x1c($s6) /* 06577C 80064B7C AEC20014 */ sw $v0, 0x14($s6) @@ -222,11 +222,11 @@ glabel L80064B14 /* 065924 80064D24 02A02825 */ move $a1, $s5 /* 065928 80064D28 46304282 */ mul.d $f10, $f8, $f16 /* 06592C 80064D2C 462054A0 */ cvt.s.d $f18, $f10 -/* 065930 80064D30 0C01C327 */ jal func_80070C9C +/* 065930 80064D30 0C01C327 */ jal allocate_from_main_pool_safe /* 065934 80064D34 E612001C */ swc1 $f18, 0x1c($s0) /* 065938 80064D38 AE020024 */ sw $v0, 0x24($s0) /* 06593C 80064D3C 24040020 */ li $a0, 32 -/* 065940 80064D40 0C01C327 */ jal func_80070C9C +/* 065940 80064D40 0C01C327 */ jal allocate_from_main_pool_safe /* 065944 80064D44 02A02825 */ move $a1, $s5 /* 065948 80064D48 8E190024 */ lw $t9, 0x24($s0) /* 06594C 80064D4C 00000000 */ nop @@ -249,11 +249,11 @@ glabel L80064B14 /* 065988 80064D88 24040030 */ li $a0, 48 /* 06598C 80064D8C 11A00013 */ beqz $t5, .L80064DDC /* 065990 80064D90 00000000 */ nop -/* 065994 80064D94 0C01C327 */ jal func_80070C9C +/* 065994 80064D94 0C01C327 */ jal allocate_from_main_pool_safe /* 065998 80064D98 02A02825 */ move $a1, $s5 /* 06599C 80064D9C AE020020 */ sw $v0, 0x20($s0) /* 0659A0 80064DA0 24040008 */ li $a0, 8 -/* 0659A4 80064DA4 0C01C327 */ jal func_80070C9C +/* 0659A4 80064DA4 0C01C327 */ jal allocate_from_main_pool_safe /* 0659A8 80064DA8 02A02825 */ move $a1, $s5 /* 0659AC 80064DAC 8E0E0020 */ lw $t6, 0x20($s0) /* 0659B0 80064DB0 26310001 */ addiu $s1, $s1, 1 diff --git a/asm/non_matchings/unknown_066AA0/func_8006A6B0.s b/asm/non_matchings/unknown_066AA0/func_8006A6B0.s index 61ca82df..e97dfecd 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006A6B0.s +++ b/asm/non_matchings/unknown_066AA0/func_8006A6B0.s @@ -7,7 +7,7 @@ glabel func_8006A6B0 /* 06B2C4 8006A6C4 AFB10018 */ sw $s1, 0x18($sp) /* 06B2C8 8006A6C8 AFB00014 */ sw $s0, 0x14($sp) /* 06B2CC 8006A6CC 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 06B2D0 8006A6D0 0C01C327 */ jal func_80070C9C +/* 06B2D0 8006A6D0 0C01C327 */ jal allocate_from_main_pool_safe /* 06B2D4 8006A6D4 240400C4 */ li $a0, 196 /* 06B2D8 8006A6D8 AFA20044 */ sw $v0, 0x44($sp) /* 06B2DC 8006A6DC 0C01DB16 */ jal func_80076C58 @@ -52,7 +52,7 @@ glabel func_8006A6B0 /* 06B36C 8006A76C 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 06B370 8006A770 AD4F0000 */ sw $t7, ($t2) /* 06B374 8006A774 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 06B378 8006A778 0C01C327 */ jal func_80070C9C +/* 06B378 8006A778 0C01C327 */ jal allocate_from_main_pool_safe /* 06B37C 8006A77C 00182040 */ sll $a0, $t8, 1 /* 06B380 8006A780 3C0A8012 */ lui $t2, %hi(D_80121170) # $t2, 0x8012 /* 06B384 8006A784 254A1170 */ addiu $t2, %lo(D_80121170) # addiu $t2, $t2, 0x1170 @@ -152,7 +152,7 @@ glabel func_8006A6B0 /* 06B4EC 8006A8EC 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 06B4F0 8006A8F0 25840001 */ addiu $a0, $t4, 1 /* 06B4F4 8006A8F4 AD240000 */ sw $a0, ($t1) -/* 06B4F8 8006A8F8 0C01C327 */ jal func_80070C9C +/* 06B4F8 8006A8F8 0C01C327 */ jal allocate_from_main_pool_safe /* 06B4FC 8006A8FC 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff /* 06B500 8006A900 3C098012 */ lui $t1, %hi(D_80121174) # $t1, 0x8012 /* 06B504 8006A904 25291174 */ addiu $t1, %lo(D_80121174) # addiu $t1, $t1, 0x1174 @@ -231,14 +231,14 @@ glabel func_8006A6B0 /* 06B60C 8006AA0C 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 06B610 8006AA10 03063823 */ subu $a3, $t8, $a2 /* 06B614 8006AA14 AFA70050 */ sw $a3, 0x50($sp) -/* 06B618 8006AA18 0C01C327 */ jal func_80070C9C +/* 06B618 8006AA18 0C01C327 */ jal allocate_from_main_pool_safe /* 06B61C 8006AA1C 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff /* 06B620 8006AA20 3C038012 */ lui $v1, %hi(D_8012116C) # $v1, 0x8012 /* 06B624 8006AA24 2463116C */ addiu $v1, %lo(D_8012116C) # addiu $v1, $v1, 0x116c /* 06B628 8006AA28 8FA40050 */ lw $a0, 0x50($sp) /* 06B62C 8006AA2C 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 06B630 8006AA30 AC620000 */ sw $v0, ($v1) -/* 06B634 8006AA34 0C01C327 */ jal func_80070C9C +/* 06B634 8006AA34 0C01C327 */ jal allocate_from_main_pool_safe /* 06B638 8006AA38 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff /* 06B63C 8006AA3C 3C10800E */ lui $s0, %hi(D_800DD310) # $s0, 0x800e /* 06B640 8006AA40 2610D310 */ addiu $s0, %lo(D_800DD310) # addiu $s0, $s0, -0x2cf0 diff --git a/asm/non_matchings/unknown_066AA0/func_8006BFC8.s b/asm/non_matchings/unknown_066AA0/func_8006BFC8.s index ca7e1f2f..27da0a08 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006BFC8.s +++ b/asm/non_matchings/unknown_066AA0/func_8006BFC8.s @@ -94,7 +94,7 @@ glabel func_8006BFC8 /* 06CD10 8006C110 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff /* 06CD14 8006C114 03032023 */ subu $a0, $t8, $v1 /* 06CD18 8006C118 AFA40024 */ sw $a0, 0x24($sp) -/* 06CD1C 8006C11C 0C01C327 */ jal func_80070C9C +/* 06CD1C 8006C11C 0C01C327 */ jal allocate_from_main_pool_safe /* 06CD20 8006C120 AFA30020 */ sw $v1, 0x20($sp) /* 06CD24 8006C124 3C038012 */ lui $v1, %hi(D_801211C0) # $v1, 0x8012 /* 06CD28 8006C128 246311C0 */ addiu $v1, %lo(D_801211C0) # addiu $v1, $v1, 0x11c0 diff --git a/asm/non_matchings/unknown_066AA0/func_8006C3E0.s b/asm/non_matchings/unknown_066AA0/func_8006C3E0.s index 107837a1..2e3c48aa 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006C3E0.s +++ b/asm/non_matchings/unknown_066AA0/func_8006C3E0.s @@ -1,7 +1,7 @@ glabel func_8006C3E0 /* 06CFE0 8006C3E0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 06CFE4 8006C3E4 AFBF001C */ sw $ra, 0x1c($sp) -/* 06CFE8 8006C3E8 0C01C2CC */ jal func_80070B30 +/* 06CFE8 8006C3E8 0C01C2CC */ jal init_main_memory_pool /* 06CFEC 8006C3EC 00000000 */ nop /* 06CFF0 8006C3F0 0C03185C */ jal func_800C6170 /* 06CFF4 8006C3F4 00000000 */ nop diff --git a/asm/non_matchings/unknown_066AA0/func_8006E3BC.s b/asm/non_matchings/unknown_066AA0/func_8006E3BC.s index 9c7258cd..10f53bfc 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006E3BC.s +++ b/asm/non_matchings/unknown_066AA0/func_8006E3BC.s @@ -43,7 +43,7 @@ glabel func_8006E3BC /* 06F060 8006E460 AFA80028 */ sw $t0, 0x28($sp) /* 06F064 8006E464 AFA60024 */ sw $a2, 0x24($sp) /* 06F068 8006E468 AFA30020 */ sw $v1, 0x20($sp) -/* 06F06C 8006E46C 0C01C327 */ jal func_80070C9C +/* 06F06C 8006E46C 0C01C327 */ jal allocate_from_main_pool_safe /* 06F070 8006E470 2405FFFF */ li $a1, -1 /* 06F074 8006E474 8FB80020 */ lw $t8, 0x20($sp) /* 06F078 8006E478 3C048012 */ lui $a0, %hi(gSettingsPtr) # $a0, 0x8012 diff --git a/asm/non_matchings/unknown_066AA0/func_8006EFDC.s b/asm/non_matchings/unknown_066AA0/func_8006EFDC.s index 70e7c0b6..e7c1d916 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006EFDC.s +++ b/asm/non_matchings/unknown_066AA0/func_8006EFDC.s @@ -23,7 +23,7 @@ glabel func_8006EFDC /* 06FC30 8006F030 018E2021 */ addu $a0, $t4, $t6 /* 06FC34 8006F034 3C05FF00 */ lui $a1, (0xFF0000FF >> 16) # lui $a1, 0xff00 /* 06FC38 8006F038 34A500FF */ ori $a1, (0xFF0000FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 06FC3C 8006F03C 0C01C327 */ jal func_80070C9C +/* 06FC3C 8006F03C 0C01C327 */ jal allocate_from_main_pool_safe /* 06FC40 8006F040 AFA40018 */ sw $a0, 0x18($sp) /* 06FC44 8006F044 3C038012 */ lui $v1, %hi(D_801211F0) # $v1, 0x8012 /* 06FC48 8006F048 246311F0 */ addiu $v1, %lo(D_801211F0) # addiu $v1, $v1, 0x11f0 @@ -50,7 +50,7 @@ glabel func_8006EFDC /* 06FC9C 8006F09C 3C018012 */ lui $at, %hi(D_80121220) # $at, 0x8012 /* 06FCA0 8006F0A0 3C05FFFF */ lui $a1, (0xFFFF00FF >> 16) # lui $a1, 0xffff /* 06FCA4 8006F0A4 AC2E1220 */ sw $t6, %lo(D_80121220)($at) -/* 06FCA8 8006F0A8 0C01C327 */ jal func_80070C9C +/* 06FCA8 8006F0A8 0C01C327 */ jal allocate_from_main_pool_safe /* 06FCAC 8006F0AC 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff /* 06FCB0 8006F0B0 3C04800E */ lui $a0, %hi(D_800DD3BC) # $a0, 0x800e /* 06FCB4 8006F0B4 8C84D3BC */ lw $a0, %lo(D_800DD3BC)($a0) diff --git a/asm/non_matchings/unknown_066AA0/load_level.s b/asm/non_matchings/unknown_066AA0/load_level.s index e390d94b..cd329d1b 100644 --- a/asm/non_matchings/unknown_066AA0/load_level.s +++ b/asm/non_matchings/unknown_066AA0/load_level.s @@ -79,7 +79,7 @@ glabel load_level /* 06BF60 8006B360 8C4F0004 */ lw $t7, 4($v0) /* 06BF64 8006B364 AFAE0034 */ sw $t6, 0x34($sp) /* 06BF68 8006B368 01F02023 */ subu $a0, $t7, $s0 -/* 06BF6C 8006B36C 0C01C327 */ jal func_80070C9C +/* 06BF6C 8006B36C 0C01C327 */ jal allocate_from_main_pool_safe /* 06BF70 8006B370 AFA40054 */ sw $a0, 0x54($sp) /* 06BF74 8006B374 3C118012 */ lui $s1, %hi(gCurrentLevelHeader) # $s1, 0x8012 /* 06BF78 8006B378 26311168 */ addiu $s1, %lo(gCurrentLevelHeader) # addiu $s1, $s1, 0x1168 @@ -288,7 +288,7 @@ glabel load_level /* 06C26C 8006B66C 8C4A0004 */ lw $t2, 4($v0) /* 06C270 8006B670 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff /* 06C274 8006B674 01502023 */ subu $a0, $t2, $s0 -/* 06C278 8006B678 0C01C327 */ jal func_80070C9C +/* 06C278 8006B678 0C01C327 */ jal allocate_from_main_pool_safe /* 06C27C 8006B67C AFA40054 */ sw $a0, 0x54($sp) /* 06C280 8006B680 8FA70054 */ lw $a3, 0x54($sp) /* 06C284 8006B684 AE220000 */ sw $v0, ($s1) diff --git a/asm/non_matchings/unknown_072E50/func_80073E1C.s b/asm/non_matchings/unknown_072E50/func_80073E1C.s index ae69dee0..4f344e58 100644 --- a/asm/non_matchings/unknown_072E50/func_80073E1C.s +++ b/asm/non_matchings/unknown_072E50/func_80073E1C.s @@ -35,7 +35,7 @@ glabel func_80073E1C .L80073E9C: /* 074A9C 80073E9C 14600022 */ bnez $v1, .L80073F28 /* 074AA0 80073EA0 00000000 */ nop -/* 074AA4 80073EA4 0C01C327 */ jal func_80070C9C +/* 074AA4 80073EA4 0C01C327 */ jal allocate_from_main_pool_safe /* 074AA8 80073EA8 240500FF */ li $a1, 255 /* 074AAC 80073EAC 8FA50024 */ lw $a1, 0x24($sp) /* 074AB0 80073EB0 8FA70020 */ lw $a3, 0x20($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80073F5C.s b/asm/non_matchings/unknown_072E50/func_80073F5C.s index 4c59ed06..5d1c91dd 100644 --- a/asm/non_matchings/unknown_072E50/func_80073F5C.s +++ b/asm/non_matchings/unknown_072E50/func_80073F5C.s @@ -6,7 +6,7 @@ glabel func_80073F5C /* 074B6C 80073F6C AFA5003C */ sw $a1, 0x3c($sp) /* 074B70 80073F70 AFA20024 */ sw $v0, 0x24($sp) /* 074B74 80073F74 00402025 */ move $a0, $v0 -/* 074B78 80073F78 0C01C327 */ jal func_80070C9C +/* 074B78 80073F78 0C01C327 */ jal allocate_from_main_pool_safe /* 074B7C 80073F7C 2405FFFF */ li $a1, -1 /* 074B80 80073F80 3C0E4741 */ lui $t6, (0x47414D44 >> 16) # lui $t6, 0x4741 /* 074B84 80073F84 AFA2002C */ sw $v0, 0x2c($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80074018.s b/asm/non_matchings/unknown_072E50/func_80074018.s index 3b176561..7d3afc38 100644 --- a/asm/non_matchings/unknown_072E50/func_80074018.s +++ b/asm/non_matchings/unknown_072E50/func_80074018.s @@ -35,7 +35,7 @@ glabel func_80074018 .L80074098: /* 074C98 80074098 1460001E */ bnez $v1, .L80074114 /* 074C9C 8007409C 00000000 */ nop -/* 074CA0 800740A0 0C01C327 */ jal func_80070C9C +/* 074CA0 800740A0 0C01C327 */ jal allocate_from_main_pool_safe /* 074CA4 800740A4 240500FF */ li $a1, 255 /* 074CA8 800740A8 8FA50024 */ lw $a1, 0x24($sp) /* 074CAC 800740AC 8FA70020 */ lw $a3, 0x20($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80074148.s b/asm/non_matchings/unknown_072E50/func_80074148.s index 5656738e..4719917e 100644 --- a/asm/non_matchings/unknown_072E50/func_80074148.s +++ b/asm/non_matchings/unknown_072E50/func_80074148.s @@ -6,7 +6,7 @@ glabel func_80074148 /* 074D58 80074158 AFA5003C */ sw $a1, 0x3c($sp) /* 074D5C 8007415C AFA2002C */ sw $v0, 0x2c($sp) /* 074D60 80074160 00402025 */ move $a0, $v0 -/* 074D64 80074164 0C01C327 */ jal func_80070C9C +/* 074D64 80074164 0C01C327 */ jal allocate_from_main_pool_safe /* 074D68 80074168 2405FFFF */ li $a1, -1 /* 074D6C 8007416C 3C0E5449 */ lui $t6, (0x54494D44 >> 16) # lui $t6, 0x5449 /* 074D70 80074170 AFA20034 */ sw $v0, 0x34($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80074204.s b/asm/non_matchings/unknown_072E50/func_80074204.s index 4addeb61..ce5eaef4 100644 --- a/asm/non_matchings/unknown_072E50/func_80074204.s +++ b/asm/non_matchings/unknown_072E50/func_80074204.s @@ -33,7 +33,7 @@ glabel func_80074204 /* 074E74 80074274 10000001 */ b .L8007427C /* 074E78 80074278 24030005 */ li $v1, 5 .L8007427C: -/* 074E7C 8007427C 0C01C327 */ jal func_80070C9C +/* 074E7C 8007427C 0C01C327 */ jal allocate_from_main_pool_safe /* 074E80 80074280 AFA3002C */ sw $v1, 0x2c($sp) /* 074E84 80074284 8FB1002C */ lw $s1, 0x2c($sp) /* 074E88 80074288 00409025 */ move $s2, $v0 diff --git a/asm/non_matchings/unknown_072E50/func_8007431C.s b/asm/non_matchings/unknown_072E50/func_8007431C.s index a0863b92..1b3e2b46 100644 --- a/asm/non_matchings/unknown_072E50/func_8007431C.s +++ b/asm/non_matchings/unknown_072E50/func_8007431C.s @@ -69,7 +69,7 @@ glabel func_8007431C /* 075010 80074410 24060005 */ li $a2, 5 .L80074414: /* 075014 80074414 24120005 */ li $s2, 5 -/* 075018 80074418 0C01C327 */ jal func_80070C9C +/* 075018 80074418 0C01C327 */ jal allocate_from_main_pool_safe /* 07501C 8007441C AFA60054 */ sw $a2, 0x54($sp) /* 075020 80074420 8FA60054 */ lw $a2, 0x54($sp) /* 075024 80074424 1000000A */ b .L80074450 diff --git a/asm/non_matchings/unknown_072E50/func_800744DC.s b/asm/non_matchings/unknown_072E50/func_800744DC.s index 45273051..9b23fc19 100644 --- a/asm/non_matchings/unknown_072E50/func_800744DC.s +++ b/asm/non_matchings/unknown_072E50/func_800744DC.s @@ -32,7 +32,7 @@ glabel func_800744DC /* 075148 80074548 24030005 */ li $v1, 5 .L8007454C: /* 07514C 8007454C 2405FFFF */ li $a1, -1 -/* 075150 80074550 0C01C327 */ jal func_80070C9C +/* 075150 80074550 0C01C327 */ jal allocate_from_main_pool_safe /* 075154 80074554 AFA3002C */ sw $v1, 0x2c($sp) /* 075158 80074558 00409825 */ move $s3, $v0 /* 07515C 8007455C 02202025 */ move $a0, $s1 diff --git a/asm/non_matchings/unknown_072E50/func_800745D0.s b/asm/non_matchings/unknown_072E50/func_800745D0.s index fdf48c68..5f70acf5 100644 --- a/asm/non_matchings/unknown_072E50/func_800745D0.s +++ b/asm/non_matchings/unknown_072E50/func_800745D0.s @@ -15,7 +15,7 @@ glabel func_800745D0 /* 075204 80074604 10000034 */ b .L800746D8 /* 075208 80074608 2402FFFF */ li $v0, -1 .L8007460C: -/* 07520C 8007460C 0C01C327 */ jal func_80070C9C +/* 07520C 8007460C 0C01C327 */ jal allocate_from_main_pool_safe /* 075210 80074610 2405FFFF */ li $a1, -1 /* 075214 80074614 320F0001 */ andi $t7, $s0, 1 /* 075218 80074618 00409025 */ move $s2, $v0 diff --git a/asm/non_matchings/unknown_072E50/func_800746F0.s b/asm/non_matchings/unknown_072E50/func_800746F0.s index 9575f5de..752bb245 100644 --- a/asm/non_matchings/unknown_072E50/func_800746F0.s +++ b/asm/non_matchings/unknown_072E50/func_800746F0.s @@ -15,7 +15,7 @@ glabel func_800746F0 /* 075324 80074724 10000033 */ b .L800747F4 /* 075328 80074728 2402FFFF */ li $v0, -1 .L8007472C: -/* 07532C 8007472C 0C01C327 */ jal func_80070C9C +/* 07532C 8007472C 0C01C327 */ jal allocate_from_main_pool_safe /* 075330 80074730 2405FFFF */ li $a1, -1 /* 075334 80074734 00409025 */ move $s2, $v0 /* 075338 80074738 02002025 */ move $a0, $s0 diff --git a/asm/non_matchings/unknown_072E50/func_80074B34.s b/asm/non_matchings/unknown_072E50/func_80074B34.s index 040b0d2a..431a7a31 100644 --- a/asm/non_matchings/unknown_072E50/func_80074B34.s +++ b/asm/non_matchings/unknown_072E50/func_80074B34.s @@ -33,7 +33,7 @@ glabel func_80074B34 /* 0757A8 80074BA8 144000A1 */ bnez $v0, .L80074E30 /* 0757AC 80074BAC 00403825 */ move $a3, $v0 /* 0757B0 80074BB0 24040100 */ li $a0, 256 -/* 0757B4 80074BB4 0C01C327 */ jal func_80070C9C +/* 0757B4 80074BB4 0C01C327 */ jal allocate_from_main_pool_safe /* 0757B8 80074BB8 240500FF */ li $a1, 255 /* 0757BC 80074BBC 8FB90058 */ lw $t9, 0x58($sp) /* 0757C0 80074BC0 3C0B8012 */ lui $t3, %hi(D_80124018) # $t3, 0x8012 @@ -148,7 +148,7 @@ glabel func_80074B34 /* 075944 80074D44 8FA4003C */ lw $a0, 0x3c($sp) /* 075948 80074D48 11E00032 */ beqz $t7, .L80074E14 /* 07594C 80074D4C 24840100 */ addiu $a0, $a0, 0x100 -/* 075950 80074D50 0C01C327 */ jal func_80070C9C +/* 075950 80074D50 0C01C327 */ jal allocate_from_main_pool_safe /* 075954 80074D54 240500FF */ li $a1, 255 /* 075958 80074D58 8FB8003C */ lw $t8, 0x3c($sp) /* 07595C 80074D5C 8FA40030 */ lw $a0, 0x30($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80074EB8.s b/asm/non_matchings/unknown_072E50/func_80074EB8.s index 642c0b0d..d9fcc58d 100644 --- a/asm/non_matchings/unknown_072E50/func_80074EB8.s +++ b/asm/non_matchings/unknown_072E50/func_80074EB8.s @@ -19,7 +19,7 @@ glabel func_80074EB8 /* 075AE0 80074EE0 24440200 */ addiu $a0, $v0, 0x200 /* 075AE4 80074EE4 AFA20024 */ sw $v0, 0x24($sp) /* 075AE8 80074EE8 240500FF */ li $a1, 255 -/* 075AEC 80074EEC 0C01C327 */ jal func_80070C9C +/* 075AEC 80074EEC 0C01C327 */ jal allocate_from_main_pool_safe /* 075AF0 80074EF0 AFA60030 */ sw $a2, 0x30($sp) /* 075AF4 80074EF4 3C0E4748 */ lui $t6, (0x47485353 >> 16) # lui $t6, 0x4748 /* 075AF8 80074EF8 8FA60030 */ lw $a2, 0x30($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80075000.s b/asm/non_matchings/unknown_072E50/func_80075000.s index f42f161d..bca530df 100644 --- a/asm/non_matchings/unknown_072E50/func_80075000.s +++ b/asm/non_matchings/unknown_072E50/func_80075000.s @@ -78,7 +78,7 @@ glabel func_80075000 .L800750F8: /* 075CF8 800750F8 8FA40054 */ lw $a0, 0x54($sp) /* 075CFC 800750FC 240500FF */ li $a1, 255 -/* 075D00 80075100 0C01C327 */ jal func_80070C9C +/* 075D00 80075100 0C01C327 */ jal allocate_from_main_pool_safe /* 075D04 80075104 24840100 */ addiu $a0, $a0, 0x100 /* 075D08 80075108 8FA40078 */ lw $a0, 0x78($sp) /* 075D0C 8007510C 8FA5004C */ lw $a1, 0x4c($sp) @@ -178,7 +178,7 @@ glabel func_80075000 /* 075E5C 8007525C AFA00060 */ sw $zero, 0x60($sp) /* 075E60 80075260 240500FF */ li $a1, 255 /* 075E64 80075264 00001825 */ move $v1, $zero -/* 075E68 80075268 0C01C327 */ jal func_80070C9C +/* 075E68 80075268 0C01C327 */ jal allocate_from_main_pool_safe /* 075E6C 8007526C 24840100 */ addiu $a0, $a0, 0x100 /* 075E70 80075270 3C194748 */ lui $t9, (0x47485353 >> 16) # lui $t9, 0x4748 /* 075E74 80075274 8FB00048 */ lw $s0, 0x48($sp) diff --git a/asm/non_matchings/unknown_072E50/func_800753D8.s b/asm/non_matchings/unknown_072E50/func_800753D8.s index 60f637b7..80aac262 100644 --- a/asm/non_matchings/unknown_072E50/func_800753D8.s +++ b/asm/non_matchings/unknown_072E50/func_800753D8.s @@ -46,7 +46,7 @@ glabel func_800753D8 /* 076058 80075458 8FBF001C */ lw $ra, 0x1c($sp) .L8007545C: /* 07605C 8007545C 8FA40030 */ lw $a0, 0x30($sp) -/* 076060 80075460 0C01C327 */ jal func_80070C9C +/* 076060 80075460 0C01C327 */ jal allocate_from_main_pool_safe /* 076064 80075464 24840100 */ addiu $a0, $a0, 0x100 /* 076068 80075468 8FA40050 */ lw $a0, 0x50($sp) /* 07606C 8007546C 8FA50034 */ lw $a1, 0x34($sp) @@ -75,7 +75,7 @@ glabel func_800753D8 /* 0760C8 800754C8 032A3823 */ subu $a3, $t9, $t2 /* 0760CC 800754CC AFA70038 */ sw $a3, 0x38($sp) /* 0760D0 800754D0 240500FF */ li $a1, 255 -/* 0760D4 800754D4 0C01C327 */ jal func_80070C9C +/* 0760D4 800754D4 0C01C327 */ jal allocate_from_main_pool_safe /* 0760D8 800754D8 24840100 */ addiu $a0, $a0, 0x100 /* 0760DC 800754DC 8FA40048 */ lw $a0, 0x48($sp) /* 0760E0 800754E0 8FA80024 */ lw $t0, 0x24($sp) diff --git a/asm/non_matchings/unknown_072E50/func_800756D4.s b/asm/non_matchings/unknown_072E50/func_800756D4.s index 160caded..ecd413f1 100644 --- a/asm/non_matchings/unknown_072E50/func_800756D4.s +++ b/asm/non_matchings/unknown_072E50/func_800756D4.s @@ -68,7 +68,7 @@ glabel func_800756D4 /* 0763B8 800757B8 AFA20064 */ sw $v0, 0x64($sp) /* 0763BC 800757BC 8FA40058 */ lw $a0, 0x58($sp) /* 0763C0 800757C0 240500FF */ li $a1, 255 -/* 0763C4 800757C4 0C01C327 */ jal func_80070C9C +/* 0763C4 800757C4 0C01C327 */ jal allocate_from_main_pool_safe /* 0763C8 800757C8 24840100 */ addiu $a0, $a0, 0x100 /* 0763CC 800757CC 8FA40070 */ lw $a0, 0x70($sp) /* 0763D0 800757D0 8FA5005C */ lw $a1, 0x5c($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80075E60.s b/asm/non_matchings/unknown_072E50/func_80075E60.s index c56637b6..3244dedf 100644 --- a/asm/non_matchings/unknown_072E50/func_80075E60.s +++ b/asm/non_matchings/unknown_072E50/func_80075E60.s @@ -79,7 +79,7 @@ glabel func_80075E60 /* 076B7C 80075F7C 00065080 */ sll $t2, $a2, 2 /* 076B80 80075F80 01465023 */ subu $t2, $t2, $a2 /* 076B84 80075F84 000A20C0 */ sll $a0, $t2, 3 -/* 076B88 80075F88 0C01C327 */ jal func_80070C9C +/* 076B88 80075F88 0C01C327 */ jal allocate_from_main_pool_safe /* 076B8C 80075F8C AFA40064 */ sw $a0, 0x64($sp) /* 076B90 80075F90 8FA50064 */ lw $a1, 0x64($sp) /* 076B94 80075F94 AE020000 */ sw $v0, ($s0) diff --git a/asm/non_matchings/unknown_072E50/func_80076388.s b/asm/non_matchings/unknown_072E50/func_80076388.s index af487aac..57bb1ce1 100644 --- a/asm/non_matchings/unknown_072E50/func_80076388.s +++ b/asm/non_matchings/unknown_072E50/func_80076388.s @@ -36,7 +36,7 @@ glabel func_80076388 /* 07700C 8007640C 03201025 */ move $v0, $t9 /* 077010 80076410 8FA40034 */ lw $a0, 0x34($sp) .L80076414: -/* 077014 80076414 0C01C327 */ jal func_80070C9C +/* 077014 80076414 0C01C327 */ jal allocate_from_main_pool_safe /* 077018 80076418 240500FF */ li $a1, 255 /* 07701C 8007641C 8FA50074 */ lw $a1, 0x74($sp) /* 077020 80076420 8FA70034 */ lw $a3, 0x34($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80076C58.s b/asm/non_matchings/unknown_072E50/func_80076C58.s index f6b8ce96..e748775d 100644 --- a/asm/non_matchings/unknown_072E50/func_80076C58.s +++ b/asm/non_matchings/unknown_072E50/func_80076C58.s @@ -19,7 +19,7 @@ glabel func_80076C58 /* 077898 80076C98 03072023 */ subu $a0, $t8, $a3 /* 07789C 80076C9C AFA4001C */ sw $a0, 0x1c($sp) /* 0778A0 80076CA0 34A57FFF */ ori $a1, (0x7F7F7FFF & 0xFFFF) # ori $a1, $a1, 0x7fff -/* 0778A4 80076CA4 0C01C327 */ jal func_80070C9C +/* 0778A4 80076CA4 0C01C327 */ jal allocate_from_main_pool_safe /* 0778A8 80076CA8 AFA70018 */ sw $a3, 0x18($sp) /* 0778AC 80076CAC 8FA70018 */ lw $a3, 0x18($sp) /* 0778B0 80076CB0 14400003 */ bnez $v0, .L80076CC0 @@ -62,7 +62,7 @@ glabel func_80076C58 /* 077934 80076D34 0303C823 */ subu $t9, $t8, $v1 /* 077938 80076D38 AFB90034 */ sw $t9, 0x34($sp) /* 07793C 80076D3C 2405FFFF */ li $a1, -1 -/* 077940 80076D40 0C01C327 */ jal func_80070C9C +/* 077940 80076D40 0C01C327 */ jal allocate_from_main_pool_safe /* 077944 80076D44 AFA30030 */ sw $v1, 0x30($sp) /* 077948 80076D48 8FA30030 */ lw $v1, 0x30($sp) /* 07794C 80076D4C 3C08000F */ lui $t0, %hi(__ASSETS_LUT_END) # $t0, 0xf @@ -85,7 +85,7 @@ glabel func_80076C58 /* 077990 80076D90 8FAC003C */ lw $t4, 0x3c($sp) /* 077994 80076D94 3C057F7F */ lui $a1, (0x7F7F7FFF >> 16) # lui $a1, 0x7f7f /* 077998 80076D98 34A57FFF */ ori $a1, (0x7F7F7FFF & 0xFFFF) # ori $a1, $a1, 0x7fff -/* 07799C 80076D9C 0C01C327 */ jal func_80070C9C +/* 07799C 80076D9C 0C01C327 */ jal allocate_from_main_pool_safe /* 0779A0 80076DA0 016C2021 */ addu $a0, $t3, $t4 /* 0779A4 80076DA4 14400003 */ bnez $v0, .L80076DB4 /* 0779A8 80076DA8 00403825 */ move $a3, $v0 diff --git a/asm/non_matchings/unknown_07AF10/func_8007A7E8.s b/asm/non_matchings/unknown_07AF10/func_8007A7E8.s index 58ef8249..e164bbac 100644 --- a/asm/non_matchings/unknown_07AF10/func_8007A7E8.s +++ b/asm/non_matchings/unknown_07AF10/func_8007A7E8.s @@ -38,7 +38,7 @@ glabel func_8007A7E8 /* 07B474 8007A874 ACEB0000 */ sw $t3, ($a3) /* 07B478 8007A878 3C040009 */ lui $a0, (0x00096030 >> 16) # lui $a0, 9 /* 07B47C 8007A87C 34846030 */ ori $a0, (0x00096030 & 0xFFFF) # ori $a0, $a0, 0x6030 -/* 07B480 8007A880 0C01C327 */ jal func_80070C9C +/* 07B480 8007A880 0C01C327 */ jal allocate_from_main_pool_safe /* 07B484 8007A884 2405FFFF */ li $a1, -1 /* 07B488 8007A888 3C03800E */ lui $v1, %hi(D_800DE770) # $v1, 0x800e /* 07B48C 8007A88C 2463E770 */ addiu $v1, %lo(D_800DE770) # addiu $v1, $v1, -0x1890 @@ -50,7 +50,7 @@ glabel func_8007A7E8 /* 07B4A4 8007A8A4 AE0D0000 */ sw $t5, ($s0) /* 07B4A8 8007A8A8 3C040009 */ lui $a0, (0x00096030 >> 16) # lui $a0, 9 /* 07B4AC 8007A8AC 34846030 */ ori $a0, (0x00096030 & 0xFFFF) # ori $a0, $a0, 0x6030 -/* 07B4B0 8007A8B0 0C01C327 */ jal func_80070C9C +/* 07B4B0 8007A8B0 0C01C327 */ jal allocate_from_main_pool_safe /* 07B4B4 8007A8B4 2405FFFF */ li $a1, -1 /* 07B4B8 8007A8B8 3C03800E */ lui $v1, %hi(D_800DE770) # $v1, 0x800e /* 07B4BC 8007A8BC 2463E770 */ addiu $v1, %lo(D_800DE770) # addiu $v1, $v1, -0x1890 @@ -69,7 +69,7 @@ glabel func_8007A7E8 /* 07B4EC 8007A8EC AFA70020 */ sw $a3, 0x20($sp) /* 07B4F0 8007A8F0 00002012 */ mflo $a0 /* 07B4F4 8007A8F4 00045040 */ sll $t2, $a0, 1 -/* 07B4F8 8007A8F8 0C01C327 */ jal func_80070C9C +/* 07B4F8 8007A8F8 0C01C327 */ jal allocate_from_main_pool_safe /* 07B4FC 8007A8FC 25440030 */ addiu $a0, $t2, 0x30 /* 07B500 8007A900 3C03800E */ lui $v1, %hi(D_800DE770) # $v1, 0x800e /* 07B504 8007A904 2463E770 */ addiu $v1, %lo(D_800DE770) # addiu $v1, $v1, -0x1890 @@ -87,7 +87,7 @@ glabel func_8007A7E8 /* 07B534 8007A934 01CF0019 */ multu $t6, $t7 /* 07B538 8007A938 00002012 */ mflo $a0 /* 07B53C 8007A93C 0004C040 */ sll $t8, $a0, 1 -/* 07B540 8007A940 0C01C327 */ jal func_80070C9C +/* 07B540 8007A940 0C01C327 */ jal allocate_from_main_pool_safe /* 07B544 8007A944 27040030 */ addiu $a0, $t8, 0x30 /* 07B548 8007A948 3C03800E */ lui $v1, %hi(D_800DE770) # $v1, 0x800e /* 07B54C 8007A94C 2463E770 */ addiu $v1, %lo(D_800DE770) # addiu $v1, $v1, -0x1890 diff --git a/asm/non_matchings/unknown_07B870/func_8007AC70.s b/asm/non_matchings/unknown_07B870/func_8007AC70.s index d4b7dbde..3281e335 100644 --- a/asm/non_matchings/unknown_07B870/func_8007AC70.s +++ b/asm/non_matchings/unknown_07B870/func_8007AC70.s @@ -3,13 +3,13 @@ glabel func_8007AC70 /* 07B874 8007AC74 AFBF0014 */ sw $ra, 0x14($sp) /* 07B878 8007AC78 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 /* 07B87C 8007AC7C 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 07B880 8007AC80 0C01C327 */ jal func_80070C9C +/* 07B880 8007AC80 0C01C327 */ jal allocate_from_main_pool_safe /* 07B884 8007AC84 240415E0 */ li $a0, 5600 /* 07B888 8007AC88 3C018012 */ lui $at, %hi(D_80126328) # $at, 0x8012 /* 07B88C 8007AC8C 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 /* 07B890 8007AC90 AC226328 */ sw $v0, %lo(D_80126328)($at) /* 07B894 8007AC94 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 07B898 8007AC98 0C01C327 */ jal func_80070C9C +/* 07B898 8007AC98 0C01C327 */ jal allocate_from_main_pool_safe /* 07B89C 8007AC9C 24040280 */ li $a0, 640 /* 07B8A0 8007ACA0 3C018012 */ lui $at, %hi(D_8012632C) # $at, 0x8012 /* 07B8A4 8007ACA4 AC22632C */ sw $v0, %lo(D_8012632C)($at) @@ -58,13 +58,13 @@ glabel func_8007AC70 /* 07B940 8007AD40 2463FFFF */ addiu $v1, $v1, -1 /* 07B944 8007AD44 ACC30004 */ sw $v1, 4($a2) /* 07B948 8007AD48 24040320 */ li $a0, 800 -/* 07B94C 8007AD4C 0C01C327 */ jal func_80070C9C +/* 07B94C 8007AD4C 0C01C327 */ jal allocate_from_main_pool_safe /* 07B950 8007AD50 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 07B954 8007AD54 3C018012 */ lui $at, %hi(D_8012634C) # $at, 0x8012 /* 07B958 8007AD58 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 /* 07B95C 8007AD5C AC22634C */ sw $v0, %lo(D_8012634C)($at) /* 07B960 8007AD60 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 07B964 8007AD64 0C01C327 */ jal func_80070C9C +/* 07B964 8007AD64 0C01C327 */ jal allocate_from_main_pool_safe /* 07B968 8007AD68 24040200 */ li $a0, 512 /* 07B96C 8007AD6C 3C018012 */ lui $at, %hi(D_80126350) # $at, 0x8012 /* 07B970 8007AD70 AC226350 */ sw $v0, %lo(D_80126350)($at) @@ -99,7 +99,7 @@ glabel func_8007AC70 /* 07B9DC 8007ADDC 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 /* 07B9E0 8007ADE0 ACCF0000 */ sw $t7, ($a2) /* 07B9E4 8007ADE4 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 07B9E8 8007ADE8 0C01C327 */ jal func_80070C9C +/* 07B9E8 8007ADE8 0C01C327 */ jal allocate_from_main_pool_safe /* 07B9EC 8007ADEC 24040028 */ li $a0, 40 /* 07B9F0 8007ADF0 3C018012 */ lui $at, %hi(D_8012636C) # $at, 0x8012 /* 07B9F4 8007ADF4 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_07B870/func_8007AE74.s b/asm/non_matchings/unknown_07B870/func_8007AE74.s index 56d1502b..8ef83c12 100644 --- a/asm/non_matchings/unknown_07B870/func_8007AE74.s +++ b/asm/non_matchings/unknown_07B870/func_8007AE74.s @@ -84,7 +84,7 @@ glabel func_8007AE74 /* 07BBA4 8007AFA4 8CA5E7C0 */ lw $a1, %lo(D_800DE7C0)($a1) /* 07BBA8 8007AFA8 000D6940 */ sll $t5, $t5, 5 /* 07BBAC 8007AFAC 01AE2021 */ addu $a0, $t5, $t6 -/* 07BBB0 8007AFB0 0C01C344 */ jal func_80070D10 +/* 07BBB0 8007AFB0 0C01C344 */ jal allocate_from_main_pool /* 07BBB4 8007AFB4 0160A025 */ move $s4, $t3 /* 07BBB8 8007AFB8 14400003 */ bnez $v0, .L8007AFC8 /* 07BBBC 8007AFBC 00409825 */ move $s3, $v0 @@ -111,7 +111,7 @@ glabel func_8007AE74 /* 07BC08 8007B008 03022021 */ addu $a0, $t8, $v0 /* 07BC0C 8007B00C AFAF003C */ sw $t7, 0x3c($sp) /* 07BC10 8007B010 24840020 */ addiu $a0, $a0, 0x20 -/* 07BC14 8007B014 0C01C344 */ jal func_80070D10 +/* 07BC14 8007B014 0C01C344 */ jal allocate_from_main_pool /* 07BC18 8007B018 0220A025 */ move $s4, $s1 /* 07BC1C 8007B01C 14400003 */ bnez $v0, .L8007B02C /* 07BC20 8007B020 00409825 */ move $s3, $v0 diff --git a/asm/non_matchings/unknown_07B870/func_8007C12C.s b/asm/non_matchings/unknown_07B870/func_8007C12C.s index a36c423b..80f74f1d 100644 --- a/asm/non_matchings/unknown_07B870/func_8007C12C.s +++ b/asm/non_matchings/unknown_07B870/func_8007C12C.s @@ -111,7 +111,7 @@ glabel func_8007C12C /* 07CEBC 8007C2BC 01C02025 */ move $a0, $t6 /* 07CEC0 8007C2C0 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 /* 07CEC4 8007C2C4 02022021 */ addu $a0, $s0, $v0 -/* 07CEC8 8007C2C8 0C01C344 */ jal func_80070D10 +/* 07CEC8 8007C2C8 0C01C344 */ jal allocate_from_main_pool /* 07CECC 8007C2CC 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 07CED0 8007C2D0 1440000B */ bnez $v0, .L8007C300 /* 07CED4 8007C2D4 00409825 */ move $s3, $v0 diff --git a/asm/non_matchings/unknown_07B870/func_8007C57C.s b/asm/non_matchings/unknown_07B870/func_8007C57C.s index b6a5062d..0edd32a6 100644 --- a/asm/non_matchings/unknown_07B870/func_8007C57C.s +++ b/asm/non_matchings/unknown_07B870/func_8007C57C.s @@ -87,7 +87,7 @@ glabel func_8007C57C /* 07D2B4 8007C6B4 26106338 */ addiu $s0, %lo(D_80126338) # addiu $s0, $s0, 0x6338 /* 07D2B8 8007C6B8 8E040000 */ lw $a0, ($s0) /* 07D2BC 8007C6BC 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 -/* 07D2C0 8007C6C0 0C01C327 */ jal func_80070C9C +/* 07D2C0 8007C6C0 0C01C327 */ jal allocate_from_main_pool_safe /* 07D2C4 8007C6C4 34A5FFFF */ ori $a1, (0xFF00FFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 07D2C8 8007C6C8 8E190000 */ lw $t9, ($s0) /* 07D2CC 8007C6CC AE620000 */ sw $v0, ($s3) diff --git a/asm/non_matchings/unknown_09F8F0/func_8009ECF0.s b/asm/non_matchings/unknown_09F8F0/func_8009ECF0.s index 9c798be2..71c3bd8f 100644 --- a/asm/non_matchings/unknown_09F8F0/func_8009ECF0.s +++ b/asm/non_matchings/unknown_09F8F0/func_8009ECF0.s @@ -46,7 +46,7 @@ glabel func_8009ECF0 .L8009ED9C: /* 09F99C 8009ED9C 00102080 */ sll $a0, $s0, 2 /* 09F9A0 8009EDA0 00902021 */ addu $a0, $a0, $s0 -/* 09F9A4 8009EDA4 0C01C327 */ jal func_80070C9C +/* 09F9A4 8009EDA4 0C01C327 */ jal allocate_from_main_pool_safe /* 09F9A8 8009EDA8 3405FFFF */ li $a1, 65535 /* 09F9AC 8009EDAC 3C068012 */ lui $a2, %hi(D_80126CF8) # $a2, 0x8012 /* 09F9B0 8009EDB0 24C66CF8 */ addiu $a2, %lo(D_80126CF8) # addiu $a2, $a2, 0x6cf8 @@ -138,7 +138,7 @@ glabel func_8009ECF0 /* 09FAF8 8009EEF8 00822023 */ subu $a0, $a0, $v0 /* 09FAFC 8009EEFC 00042080 */ sll $a0, $a0, 2 /* 09FB00 8009EF00 00822023 */ subu $a0, $a0, $v0 -/* 09FB04 8009EF04 0C01C327 */ jal func_80070C9C +/* 09FB04 8009EF04 0C01C327 */ jal allocate_from_main_pool_safe /* 09FB08 8009EF08 00042140 */ sll $a0, $a0, 5 /* 09FB0C 8009EF0C 3C038012 */ lui $v1, %hi(D_80126CE0) # $v1, 0x8012 /* 09FB10 8009EF10 24636CE0 */ addiu $v1, %lo(D_80126CE0) # addiu $v1, $v1, 0x6ce0 diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB4A8.s b/asm/non_matchings/unknown_09F8F0/func_800AB4A8.s index 01ccdc0e..616a921f 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800AB4A8.s +++ b/asm/non_matchings/unknown_09F8F0/func_800AB4A8.s @@ -61,7 +61,7 @@ glabel func_800AB4A8 /* 0AC18C 800AB58C 0004C880 */ sll $t9, $a0, 2 /* 0AC190 800AB590 0324C823 */ subu $t9, $t9, $a0 /* 0AC194 800AB594 00192080 */ sll $a0, $t9, 2 -/* 0AC198 800AB598 0C01C327 */ jal func_80070C9C +/* 0AC198 800AB598 0C01C327 */ jal allocate_from_main_pool_safe /* 0AC19C 800AB59C 02C02825 */ move $a1, $s6 /* 0AC1A0 800AB5A0 3C15800E */ lui $s5, %hi(D_800E28D8) # $s5, 0x800e /* 0AC1A4 800AB5A4 26B528D8 */ addiu $s5, %lo(D_800E28D8) # addiu $s5, $s5, 0x28d8 @@ -99,12 +99,12 @@ glabel func_800AB4A8 /* 0AC220 800AB620 26737BB0 */ addiu $s3, %lo(D_80127BB0) # addiu $s3, $s3, 0x7bb0 /* 0AC224 800AB624 AE740000 */ sw $s4, ($s3) /* 0AC228 800AB628 00142040 */ sll $a0, $s4, 1 -/* 0AC22C 800AB62C 0C01C327 */ jal func_80070C9C +/* 0AC22C 800AB62C 0C01C327 */ jal allocate_from_main_pool_safe /* 0AC230 800AB630 02C02825 */ move $a1, $s6 /* 0AC234 800AB634 3C01800E */ lui $at, %hi(D_800E2910) # $at, 0x800e /* 0AC238 800AB638 AC222910 */ sw $v0, %lo(D_800E2910)($at) /* 0AC23C 800AB63C 00142100 */ sll $a0, $s4, 4 -/* 0AC240 800AB640 0C01C327 */ jal func_80070C9C +/* 0AC240 800AB640 0C01C327 */ jal allocate_from_main_pool_safe /* 0AC244 800AB644 02C02825 */ move $a1, $s6 /* 0AC248 800AB648 8E6E0000 */ lw $t6, ($s3) /* 0AC24C 800AB64C 3C12800E */ lui $s2, %hi(D_800E28D4) # $s2, 0x800e @@ -181,13 +181,13 @@ glabel func_800AB4A8 /* 0AC360 800AB760 02509021 */ addu $s2, $s2, $s0 /* 0AC364 800AB764 00129040 */ sll $s2, $s2, 1 /* 0AC368 800AB768 02402025 */ move $a0, $s2 -/* 0AC36C 800AB76C 0C01C327 */ jal func_80070C9C +/* 0AC36C 800AB76C 0C01C327 */ jal allocate_from_main_pool_safe /* 0AC370 800AB770 02C02825 */ move $a1, $s6 /* 0AC374 800AB774 3C13800E */ lui $s3, %hi(D_800E2914) # $s3, 0x800e /* 0AC378 800AB778 26732914 */ addiu $s3, %lo(D_800E2914) # addiu $s3, $s3, 0x2914 /* 0AC37C 800AB77C AE620000 */ sw $v0, ($s3) /* 0AC380 800AB780 02402025 */ move $a0, $s2 -/* 0AC384 800AB784 0C01C327 */ jal func_80070C9C +/* 0AC384 800AB784 0C01C327 */ jal allocate_from_main_pool_safe /* 0AC388 800AB788 02C02825 */ move $a1, $s6 /* 0AC38C 800AB78C 3C07800E */ lui $a3, %hi(D_800E2914) # $a3, 0x800e /* 0AC390 800AB790 3C08800E */ lui $t0, %hi(D_800E291C) # $t0, 0x800e @@ -324,7 +324,7 @@ glabel func_800AB4A8 /* 0AC584 800AB984 00199403 */ sra $s2, $t9, 0x10 /* 0AC588 800AB988 000D9C03 */ sra $s3, $t5, 0x10 /* 0AC58C 800AB98C 01802025 */ move $a0, $t4 -/* 0AC590 800AB990 0C01C327 */ jal func_80070C9C +/* 0AC590 800AB990 0C01C327 */ jal allocate_from_main_pool_safe /* 0AC594 800AB994 02C02825 */ move $a1, $s6 /* 0AC598 800AB998 8E980000 */ lw $t8, ($s4) /* 0AC59C 800AB99C 3C03800E */ lui $v1, %hi(D_800E290C) # $v1, 0x800e diff --git a/asm/non_matchings/unknown_0AEE70/func_800AE728.s b/asm/non_matchings/unknown_0AEE70/func_800AE728.s index f0208df7..28ae152c 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800AE728.s +++ b/asm/non_matchings/unknown_0AEE70/func_800AE728.s @@ -72,7 +72,7 @@ glabel func_800AE728 /* 0AF42C 800AE82C 01846021 */ addu $t4, $t4, $a0 /* 0AF430 800AE830 000C2040 */ sll $a0, $t4, 1 /* 0AF434 800AE834 02402825 */ move $a1, $s2 -/* 0AF438 800AE838 0C01C327 */ jal func_80070C9C +/* 0AF438 800AE838 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF43C 800AE83C 00008025 */ move $s0, $zero /* 0AF440 800AE840 00136840 */ sll $t5, $s3, 1 /* 0AF444 800AE844 022D7021 */ addu $t6, $s1, $t5 @@ -81,7 +81,7 @@ glabel func_800AE728 /* 0AF450 800AE850 00047900 */ sll $t7, $a0, 4 /* 0AF454 800AE854 AC222CE0 */ sw $v0, %lo(D_800E2CE0)($at) /* 0AF458 800AE858 01E02025 */ move $a0, $t7 -/* 0AF45C 800AE85C 0C01C327 */ jal func_80070C9C +/* 0AF45C 800AE85C 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF460 800AE860 02402825 */ move $a1, $s2 /* 0AF464 800AE864 3C10800E */ lui $s0, %hi(D_800E2CE4) # $s0, 0x800e /* 0AF468 800AE868 26102CE4 */ addiu $s0, %lo(D_800E2CE4) # addiu $s0, $s0, 0x2ce4 @@ -96,7 +96,7 @@ glabel func_800AE728 /* 0AF48C 800AE88C 3C01800E */ lui $at, %hi(D_800E2CA0) # $at, 0x800e /* 0AF490 800AE890 AC202CA0 */ sw $zero, %lo(D_800E2CA0)($at) /* 0AF494 800AE894 001121C0 */ sll $a0, $s1, 7 -/* 0AF498 800AE898 0C01C327 */ jal func_80070C9C +/* 0AF498 800AE898 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF49C 800AE89C 02402825 */ move $a1, $s2 /* 0AF4A0 800AE8A0 3C15800E */ lui $s5, %hi(D_800E2CA8) # $s5, 0x800e /* 0AF4A4 800AE8A4 26B52CA8 */ addiu $s5, %lo(D_800E2CA8) # addiu $s5, $s5, 0x2ca8 @@ -110,7 +110,7 @@ glabel func_800AE728 /* 0AF4C0 800AE8C0 3C01800E */ lui $at, %hi(D_800E2CAC) # $at, 0x800e /* 0AF4C4 800AE8C4 AC202CAC */ sw $zero, %lo(D_800E2CAC)($at) /* 0AF4C8 800AE8C8 001321C0 */ sll $a0, $s3, 7 -/* 0AF4CC 800AE8CC 0C01C327 */ jal func_80070C9C +/* 0AF4CC 800AE8CC 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF4D0 800AE8D0 02402825 */ move $a1, $s2 /* 0AF4D4 800AE8D4 3C16800E */ lui $s6, %hi(D_800E2CB4) # $s6, 0x800e /* 0AF4D8 800AE8D8 26D62CB4 */ addiu $s6, %lo(D_800E2CB4) # addiu $s6, $s6, 0x2cb4 @@ -126,7 +126,7 @@ glabel func_800AE728 /* 0AF4FC 800AE8FC 00972023 */ subu $a0, $a0, $s7 /* 0AF500 800AE900 AC202CB8 */ sw $zero, %lo(D_800E2CB8)($at) /* 0AF504 800AE904 00042100 */ sll $a0, $a0, 4 -/* 0AF508 800AE908 0C01C327 */ jal func_80070C9C +/* 0AF508 800AE908 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF50C 800AE90C 02402825 */ move $a1, $s2 /* 0AF510 800AE910 3C01800E */ lui $at, %hi(D_800E2CC0) # $at, 0x800e /* 0AF514 800AE914 AC222CC0 */ sw $v0, %lo(D_800E2CC0)($at) @@ -138,7 +138,7 @@ glabel func_800AE728 /* 0AF528 800AE928 3C01800E */ lui $at, %hi(D_800E2CC4) # $at, 0x800e /* 0AF52C 800AE92C AC202CC4 */ sw $zero, %lo(D_800E2CC4)($at) /* 0AF530 800AE930 001421C0 */ sll $a0, $s4, 7 -/* 0AF534 800AE934 0C01C327 */ jal func_80070C9C +/* 0AF534 800AE934 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF538 800AE938 02402825 */ move $a1, $s2 /* 0AF53C 800AE93C 3C17800E */ lui $s7, %hi(D_800E2CCC) # $s7, 0x800e /* 0AF540 800AE940 26F72CCC */ addiu $s7, %lo(D_800E2CCC) # addiu $s7, $s7, 0x2ccc @@ -154,7 +154,7 @@ glabel func_800AE728 /* 0AF564 800AE964 009E2021 */ addu $a0, $a0, $fp /* 0AF568 800AE968 AC202CD0 */ sw $zero, %lo(D_800E2CD0)($at) /* 0AF56C 800AE96C 000420C0 */ sll $a0, $a0, 3 -/* 0AF570 800AE970 0C01C327 */ jal func_80070C9C +/* 0AF570 800AE970 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF574 800AE974 02402825 */ move $a1, $s2 /* 0AF578 800AE978 3C1E800E */ lui $fp, %hi(D_800E2CD8) # $fp, 0x800e /* 0AF57C 800AE97C 27DE2CD8 */ addiu $fp, %lo(D_800E2CD8) # addiu $fp, $fp, 0x2cd8 @@ -431,7 +431,7 @@ glabel func_800AE728 /* 0AF968 800AED68 24790001 */ addiu $t9, $v1, 1 .L800AED6C: /* 0AF96C 800AED6C 00032080 */ sll $a0, $v1, 2 -/* 0AF970 800AED70 0C01C327 */ jal func_80070C9C +/* 0AF970 800AED70 0C01C327 */ jal allocate_from_main_pool_safe /* 0AF974 800AED74 3405FFFF */ li $a1, 65535 /* 0AF978 800AED78 3C06800E */ lui $a2, %hi(D_800E2E64) # $a2, 0x800e /* 0AF97C 800AED7C 24C62E64 */ addiu $a2, %lo(D_800E2E64) # addiu $a2, $a2, 0x2e64 diff --git a/asm/non_matchings/unknown_0AEE70/func_800AF29C.s b/asm/non_matchings/unknown_0AEE70/func_800AF29C.s index 7b00fdd5..ce4d0102 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800AF29C.s +++ b/asm/non_matchings/unknown_0AEE70/func_800AF29C.s @@ -53,7 +53,7 @@ glabel func_800AF29C /* 0AFF5C 800AF35C 92040007 */ lbu $a0, 7($s0) /* 0AFF60 800AF360 AFA30024 */ sw $v1, 0x24($sp) /* 0AFF64 800AF364 00045080 */ sll $t2, $a0, 2 -/* 0AFF68 800AF368 0C01C327 */ jal func_80070C9C +/* 0AFF68 800AF368 0C01C327 */ jal allocate_from_main_pool_safe /* 0AFF6C 800AF36C 01402025 */ move $a0, $t2 /* 0AFF70 800AF370 8FA30024 */ lw $v1, 0x24($sp) /* 0AFF74 800AF374 AE02000C */ sw $v0, 0xc($s0) diff --git a/asm/non_matchings/unknown_0B8920/func_800B7EB4.s b/asm/non_matchings/unknown_0B8920/func_800B7EB4.s index c4985a26..4c5b0b85 100644 --- a/asm/non_matchings/unknown_0B8920/func_800B7EB4.s +++ b/asm/non_matchings/unknown_0B8920/func_800B7EB4.s @@ -12,7 +12,7 @@ glabel func_800B7EB4 /* 0B8ADC 800B7EDC 3631FFFF */ ori $s1, (0x00FFFFFF & 0xFFFF) # ori $s1, $s1, 0xffff /* 0B8AE0 800B7EE0 00047080 */ sll $t6, $a0, 2 /* 0B8AE4 800B7EE4 01C02025 */ move $a0, $t6 -/* 0B8AE8 800B7EE8 0C01C327 */ jal func_80070C9C +/* 0B8AE8 800B7EE8 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8AEC 800B7EEC 02202825 */ move $a1, $s1 /* 0B8AF0 800B7EF0 3C01800E */ lui $at, %hi(D_800E3040) # $at, 0x800e /* 0B8AF4 800B7EF4 AC223040 */ sw $v0, %lo(D_800E3040)($at) @@ -21,7 +21,7 @@ glabel func_800B7EB4 /* 0B8B00 800B7F00 00037880 */ sll $t7, $v1, 2 /* 0B8B04 800B7F04 01E30019 */ multu $t7, $v1 /* 0B8B08 800B7F08 00002012 */ mflo $a0 -/* 0B8B0C 800B7F0C 0C01C327 */ jal func_80070C9C +/* 0B8B0C 800B7F0C 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8B10 800B7F10 00000000 */ nop /* 0B8B14 800B7F14 3C01800E */ lui $at, %hi(D_800E3044) # $at, 0x800e /* 0B8B18 800B7F18 AC223044 */ sw $v0, %lo(D_800E3044)($at) @@ -31,7 +31,7 @@ glabel func_800B7EB4 /* 0B8B28 800B7F28 0003C080 */ sll $t8, $v1, 2 /* 0B8B2C 800B7F2C 03030019 */ multu $t8, $v1 /* 0B8B30 800B7F30 00002012 */ mflo $a0 -/* 0B8B34 800B7F34 0C01C327 */ jal func_80070C9C +/* 0B8B34 800B7F34 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8B38 800B7F38 00000000 */ nop /* 0B8B3C 800B7F3C 3C01800E */ lui $at, %hi(D_800E3048) # $at, 0x800e /* 0B8B40 800B7F40 AC223048 */ sw $v0, %lo(D_800E3048)($at) @@ -46,7 +46,7 @@ glabel func_800B7EB4 /* 0B8B64 800B7F64 00000000 */ nop /* 0B8B68 800B7F68 021F0019 */ multu $s0, $ra /* 0B8B6C 800B7F6C 00002012 */ mflo $a0 -/* 0B8B70 800B7F70 0C01C327 */ jal func_80070C9C +/* 0B8B70 800B7F70 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8B74 800B7F74 00000000 */ nop /* 0B8B78 800B7F78 3C04800E */ lui $a0, %hi(D_800E304C) # $a0, 0x800e /* 0B8B7C 800B7F7C 2484304C */ addiu $a0, %lo(D_800E304C) # addiu $a0, $a0, 0x304c @@ -99,7 +99,7 @@ glabel func_800B7EB4 /* 0B8C34 800B8034 00102040 */ sll $a0, $s0, 1 /* 0B8C38 800B8038 11E10009 */ beq $t7, $at, .L800B8060 /* 0B8C3C 800B803C 00000000 */ nop -/* 0B8C40 800B8040 0C01C327 */ jal func_80070C9C +/* 0B8C40 800B8040 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8C44 800B8044 02202825 */ move $a1, $s1 /* 0B8C48 800B8048 3C03800E */ lui $v1, %hi(D_800E3070) # $v1, 0x800e /* 0B8C4C 800B804C 24633070 */ addiu $v1, %lo(D_800E3070) # addiu $v1, $v1, 0x3070 @@ -109,7 +109,7 @@ glabel func_800B7EB4 /* 0B8C5C 800B805C AC790004 */ sw $t9, 4($v1) .L800B8060: /* 0B8C60 800B8060 00102080 */ sll $a0, $s0, 2 -/* 0B8C64 800B8064 0C01C327 */ jal func_80070C9C +/* 0B8C64 800B8064 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8C68 800B8068 02202825 */ move $a1, $s1 /* 0B8C6C 800B806C 3C03800E */ lui $v1, %hi(D_800E3070) # $v1, 0x800e /* 0B8C70 800B8070 24633070 */ addiu $v1, %lo(D_800E3070) # addiu $v1, $v1, 0x3070 @@ -131,7 +131,7 @@ glabel func_800B7EB4 /* 0B8CAC 800B80AC 00102040 */ sll $a0, $s0, 1 /* 0B8CB0 800B80B0 13210009 */ beq $t9, $at, .L800B80D8 /* 0B8CB4 800B80B4 00000000 */ nop -/* 0B8CB8 800B80B8 0C01C327 */ jal func_80070C9C +/* 0B8CB8 800B80B8 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8CBC 800B80BC 02202825 */ move $a1, $s1 /* 0B8CC0 800B80C0 3C03800E */ lui $v1, %hi(D_800E3080) # $v1, 0x800e /* 0B8CC4 800B80C4 24633080 */ addiu $v1, %lo(D_800E3080) # addiu $v1, $v1, 0x3080 @@ -141,7 +141,7 @@ glabel func_800B7EB4 /* 0B8CD4 800B80D4 AC6F0004 */ sw $t7, 4($v1) .L800B80D8: /* 0B8CD8 800B80D8 00102080 */ sll $a0, $s0, 2 -/* 0B8CDC 800B80DC 0C01C327 */ jal func_80070C9C +/* 0B8CDC 800B80DC 0C01C327 */ jal allocate_from_main_pool_safe /* 0B8CE0 800B80E0 02202825 */ move $a1, $s1 /* 0B8CE4 800B80E4 3C03800E */ lui $v1, %hi(D_800E3080) # $v1, 0x800e /* 0B8CE8 800B80E8 24633080 */ addiu $v1, %lo(D_800E3080) # addiu $v1, $v1, 0x3080 diff --git a/asm/non_matchings/unknown_0B8920/func_800BBF78.s b/asm/non_matchings/unknown_0B8920/func_800BBF78.s index fc1260cf..8ef71035 100644 --- a/asm/non_matchings/unknown_0B8920/func_800BBF78.s +++ b/asm/non_matchings/unknown_0B8920/func_800BBF78.s @@ -188,7 +188,7 @@ glabel func_800BBF78 /* 0BCE20 800BC220 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 0BCE24 800BC224 00002012 */ mflo $a0 /* 0BCE28 800BC228 00047880 */ sll $t7, $a0, 2 -/* 0BCE2C 800BC22C 0C01C327 */ jal func_80070C9C +/* 0BCE2C 800BC22C 0C01C327 */ jal allocate_from_main_pool_safe /* 0BCE30 800BC230 01E02025 */ move $a0, $t7 /* 0BCE34 800BC234 AE420000 */ sw $v0, ($s2) /* 0BCE38 800BC238 3C04800E */ lui $a0, %hi(D_800E30D8) # $a0, 0x800e @@ -208,7 +208,7 @@ glabel func_800BBF78 /* 0BCE6C 800BC26C 01CF2021 */ addu $a0, $t6, $t7 /* 0BCE70 800BC270 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff /* 0BCE74 800BC274 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 0BCE78 800BC278 0C01C327 */ jal func_80070C9C +/* 0BCE78 800BC278 0C01C327 */ jal allocate_from_main_pool_safe /* 0BCE7C 800BC27C 24840880 */ addiu $a0, $a0, 0x880 /* 0BCE80 800BC280 3C01800E */ lui $at, %hi(D_800E30D8) # $at, 0x800e /* 0BCE84 800BC284 AC2230D8 */ sw $v0, %lo(D_800E30D8)($at) diff --git a/asm/non_matchings/unknown_0B8920/func_800BCC70.s b/asm/non_matchings/unknown_0B8920/func_800BCC70.s index 5d648808..df67d97e 100644 --- a/asm/non_matchings/unknown_0B8920/func_800BCC70.s +++ b/asm/non_matchings/unknown_0B8920/func_800BCC70.s @@ -53,14 +53,14 @@ glabel func_800BCC70 /* 0BD934 800BCD34 3610FFFF */ ori $s0, (0x00FFFFFF & 0xFFFF) # ori $s0, $s0, 0xffff /* 0BD938 800BCD38 02002825 */ move $a1, $s0 /* 0BD93C 800BCD3C 00002012 */ mflo $a0 -/* 0BD940 800BCD40 0C01C327 */ jal func_80070C9C +/* 0BD940 800BCD40 0C01C327 */ jal allocate_from_main_pool_safe /* 0BD944 800BCD44 00000000 */ nop /* 0BD948 800BCD48 8FAE0190 */ lw $t6, 0x190($sp) /* 0BD94C 800BCD4C AE220000 */ sw $v0, ($s1) /* 0BD950 800BCD50 85C4001A */ lh $a0, 0x1a($t6) /* 0BD954 800BCD54 02002825 */ move $a1, $s0 /* 0BD958 800BCD58 00047880 */ sll $t7, $a0, 2 -/* 0BD95C 800BCD5C 0C01C327 */ jal func_80070C9C +/* 0BD95C 800BCD5C 0C01C327 */ jal allocate_from_main_pool_safe /* 0BD960 800BCD60 01E02025 */ move $a0, $t7 /* 0BD964 800BCD64 3C188013 */ lui $t8, %hi(D_8012A0D8) # $t8, 0x8013 /* 0BD968 800BCD68 3C198013 */ lui $t9, %hi(D_8012A0DC) # $t9, 0x8013 @@ -71,12 +71,12 @@ glabel func_800BCC70 /* 0BD97C 800BCD7C 02002825 */ move $a1, $s0 /* 0BD980 800BCD80 00002012 */ mflo $a0 /* 0BD984 800BCD84 000470C0 */ sll $t6, $a0, 3 -/* 0BD988 800BCD88 0C01C327 */ jal func_80070C9C +/* 0BD988 800BCD88 0C01C327 */ jal allocate_from_main_pool_safe /* 0BD98C 800BCD8C 01C02025 */ move $a0, $t6 /* 0BD990 800BCD90 00142080 */ sll $a0, $s4, 2 /* 0BD994 800BCD94 AFA200A4 */ sw $v0, 0xa4($sp) /* 0BD998 800BCD98 24840004 */ addiu $a0, $a0, 4 -/* 0BD99C 800BCD9C 0C01C327 */ jal func_80070C9C +/* 0BD99C 800BCD9C 0C01C327 */ jal allocate_from_main_pool_safe /* 0BD9A0 800BCDA0 02002825 */ move $a1, $s0 /* 0BD9A4 800BCDA4 3C0F8013 */ lui $t7, %hi(D_8012A0D8) # $t7, 0x8013 /* 0BD9A8 800BCDA8 3C188013 */ lui $t8, %hi(D_8012A0DC) # $t8, 0x8013 diff --git a/asm/non_matchings/unknown_0B8920/func_800BE654.s b/asm/non_matchings/unknown_0B8920/func_800BE654.s index 7a86d7bf..57604421 100644 --- a/asm/non_matchings/unknown_0B8920/func_800BE654.s +++ b/asm/non_matchings/unknown_0B8920/func_800BE654.s @@ -28,7 +28,7 @@ glabel func_800BE654 /* 0BF2BC 800BE6BC 0004C043 */ sra $t8, $a0, 1 /* 0BF2C0 800BE6C0 2704000E */ addiu $a0, $t8, 0xe /* 0BF2C4 800BE6C4 AFA600E8 */ sw $a2, 0xe8($sp) -/* 0BF2C8 800BE6C8 0C01C327 */ jal func_80070C9C +/* 0BF2C8 800BE6C8 0C01C327 */ jal allocate_from_main_pool_safe /* 0BF2CC 800BE6CC A7A800A6 */ sh $t0, 0xa6($sp) /* 0BF2D0 800BE6D0 8FBF00E8 */ lw $ra, 0xe8($sp) /* 0BF2D4 800BE6D4 3C0D800E */ lui $t5, %hi(D_800E30D8) # $t5, 0x800e diff --git a/asm/non_matchings/unknown_0B8920/func_800C0B00.s b/asm/non_matchings/unknown_0B8920/func_800C0B00.s index a33980b0..43282602 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C0B00.s +++ b/asm/non_matchings/unknown_0B8920/func_800C0B00.s @@ -24,7 +24,7 @@ glabel func_800C0B00 /* 0C1758 800C0B58 01F82021 */ addu $a0, $t7, $t8 /* 0C175C 800C0B5C AFA8002C */ sw $t0, 0x2c($sp) /* 0C1760 800C0B60 AFA90028 */ sw $t1, 0x28($sp) -/* 0C1764 800C0B64 0C01C327 */ jal func_80070C9C +/* 0C1764 800C0B64 0C01C327 */ jal allocate_from_main_pool_safe /* 0C1768 800C0B68 AFA30030 */ sw $v1, 0x30($sp) /* 0C176C 800C0B6C 8FA30030 */ lw $v1, 0x30($sp) /* 0C1770 800C0B70 3C04800E */ lui $a0, %hi(D_800E31C0) # $a0, 0x800e diff --git a/asm/non_matchings/unknown_0B8920/func_800C15D4.s b/asm/non_matchings/unknown_0B8920/func_800C15D4.s index 6c84de4a..543bf6df 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C15D4.s +++ b/asm/non_matchings/unknown_0B8920/func_800C15D4.s @@ -12,7 +12,7 @@ glabel func_800C15D4 /* 0C21FC 800C15FC E7B50010 */ swc1 $f21, 0x10($sp) /* 0C2200 800C1600 E7B40014 */ swc1 $f20, 0x14($sp) /* 0C2204 800C1604 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 0C2208 800C1608 0C01C327 */ jal func_80070C9C +/* 0C2208 800C1608 0C01C327 */ jal allocate_from_main_pool_safe /* 0C220C 800C160C 24040DA0 */ li $a0, 3488 /* 0C2210 800C1610 3C04800E */ lui $a0, %hi(D_800E31C0) # $a0, 0x800e /* 0C2214 800C1614 3C05800E */ lui $a1, %hi(D_800E31C8) # $a1, 0x800e diff --git a/asm/non_matchings/unknown_0B8920/func_800C29F0.s b/asm/non_matchings/unknown_0B8920/func_800C29F0.s index e7a61e5e..e9fed6b3 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C29F0.s +++ b/asm/non_matchings/unknown_0B8920/func_800C29F0.s @@ -3,7 +3,7 @@ glabel func_800C29F0 /* 0C35F4 800C29F4 AFBF0014 */ sw $ra, 0x14($sp) /* 0C35F8 800C29F8 3C0500FF */ lui $a1, (0x00FF00FF >> 16) # lui $a1, 0xff /* 0C35FC 800C29FC 34A500FF */ ori $a1, (0x00FF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 0C3600 800C2A00 0C01C327 */ jal func_80070C9C +/* 0C3600 800C2A00 0C01C327 */ jal allocate_from_main_pool_safe /* 0C3604 800C2A04 24040780 */ li $a0, 1920 /* 0C3608 800C2A08 3C038013 */ lui $v1, %hi(D_8012A7C8) # $v1, 0x8013 /* 0C360C 800C2A0C 2463A7C8 */ addiu $v1, %lo(D_8012A7C8) # addiu $v1, $v1, -0x5838 diff --git a/asm/non_matchings/unknown_0B8920/func_800C3048.s b/asm/non_matchings/unknown_0B8920/func_800C3048.s index 93c826e1..0c31c710 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C3048.s +++ b/asm/non_matchings/unknown_0B8920/func_800C3048.s @@ -6,7 +6,7 @@ glabel func_800C3048 /* 0C3C58 800C3058 3C0500FF */ lui $a1, (0x00FF00FF >> 16) # lui $a1, 0xff /* 0C3C5C 800C305C A42EA78C */ sh $t6, %lo(D_8012A78C)($at) /* 0C3C60 800C3060 34A500FF */ ori $a1, (0x00FF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 0C3C64 800C3064 0C01C327 */ jal func_80070C9C +/* 0C3C64 800C3064 0C01C327 */ jal allocate_from_main_pool_safe /* 0C3C68 800C3068 24040800 */ li $a0, 2048 /* 0C3C6C 800C306C 3C038013 */ lui $v1, %hi(D_8012A798) # $v1, 0x8013 /* 0C3C70 800C3070 2463A798 */ addiu $v1, %lo(D_8012A798) # addiu $v1, $v1, -0x5868 diff --git a/asm/non_matchings/unknown_0B8920/func_800C3C00.s b/asm/non_matchings/unknown_0B8920/func_800C3C00.s index d62f7168..17ccbefc 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C3C00.s +++ b/asm/non_matchings/unknown_0B8920/func_800C3C00.s @@ -28,7 +28,7 @@ glabel func_800C3C00 .L800C3C64: /* 0C4864 800C3C64 3C05FFFF */ lui $a1, %hi(0xFFFF0028) # $a1, 0xffff /* 0C4868 800C3C68 34A500FF */ ori $a1, (0xFFFF00FF & 0xFFFF) # ori $a1, $a1, 0xff -/* 0C486C 800C3C6C 0C01C327 */ jal func_80070C9C +/* 0C486C 800C3C6C 0C01C327 */ jal allocate_from_main_pool_safe /* 0C4870 800C3C70 24040940 */ li $a0, 2368 /* 0C4874 800C3C74 3C068013 */ lui $a2, %hi(D_8012A7E8) # $a2, 0x8013 /* 0C4878 800C3C78 24C6A7E8 */ addiu $a2, %lo(D_8012A7E8) # addiu $a2, $a2, -0x5818 diff --git a/src/audio.c b/src/audio.c index a8a1fb2f..e7e20294 100644 --- a/src/audio.c +++ b/src/audio.c @@ -123,7 +123,7 @@ typedef struct audioMgrConfig_s{ void func_80000968(s32 arg0); ALCSPlayer* func_80002224(s32, s32); void func_8000B010(ALCSPlayer*, u8); -void *func_80070C9C(u32, u32); +void *allocate_from_main_pool_safe(u32, u32); void *func_80076C58(u32); void *alHeapDBAlloc(u8 *file, s32 line, ALHeap *hp, s32 num, s32 size); @@ -143,31 +143,31 @@ void audio_init(u32 arg0){ alHeapInit(&gALHeap, gBssSectionStart, AUDIO_HEAP_SIZE); reg_s2 = func_80076C58(38); - ALBankFile_80115D14 = (ALBankFile*) func_80070C9C(reg_s2[2] - reg_s2[1], 0x00FFFFFF); + ALBankFile_80115D14 = (ALBankFile*) allocate_from_main_pool_safe(reg_s2[2] - reg_s2[1], 0x00FFFFFF); func_80076E68(39, ALBankFile_80115D14, reg_s2[1], reg_s2[2] - reg_s2[1]); alBnkfNew(ALBankFile_80115D14, func_80076EE8(39, reg_s2[2])); D_80115D28 = reg_s2[7] - reg_s2[6]; - D_80115D18 = (unk80115D18 *) func_80070C9C(D_80115D28, 0x00FFFFFF); + D_80115D18 = (unk80115D18 *) allocate_from_main_pool_safe(D_80115D28, 0x00FFFFFF); func_80076E68(39, D_80115D18, reg_s2[6], D_80115D28); D_80115D20 = D_80115D28/10; D_80115D2C = reg_s2[6]-reg_s2[5]; - D_80115D1C = (unk80115D1C *) func_80070C9C(D_80115D2C, 0x00FFFFFF); + D_80115D1C = (unk80115D1C *) allocate_from_main_pool_safe(D_80115D2C, 0x00FFFFFF); func_80076E68(39, D_80115D1C, reg_s2[5], D_80115D2C); D_80115D24 = D_80115D2C/3; - ALBankFile_80115D10 = (ALBankFile *)func_80070C9C(reg_s2[0], 0x00FFFFFF); + ALBankFile_80115D10 = (ALBankFile *)allocate_from_main_pool_safe(reg_s2[0], 0x00FFFFFF); func_80076E68(39, ALBankFile_80115D10, 0, reg_s2[0]); alBnkfNew(ALBankFile_80115D10, func_80076EE8(39, reg_s2[0])); ALSeqFile_80115CF8 = (ALSeqFile *) alHeapDBAlloc(0,0,&gALHeap,1,4); func_80076E68(39, ALSeqFile_80115CF8, reg_s2[4], 4); seqfSize = (ALSeqFile_80115CF8->seqCount)*8 + 4; - ALSeqFile_80115CF8 = func_80070C9C(seqfSize, 0x00FFFFFF); + ALSeqFile_80115CF8 = allocate_from_main_pool_safe(seqfSize, 0x00FFFFFF); func_80076E68(39, ALSeqFile_80115CF8, reg_s2[4], seqfSize); alSeqFileNew(ALSeqFile_80115CF8, func_80076EE8(39, reg_s2[4])); - D_80115D0C = (u32 *)func_80070C9C( (ALSeqFile_80115CF8->seqCount)*4, 0x00FFFFFF); + D_80115D0C = (u32 *)allocate_from_main_pool_safe( (ALSeqFile_80115CF8->seqCount)*4, 0x00FFFFFF); for(iCnt = 0; iCnt < ALSeqFile_80115CF8->seqCount; iCnt++){ @@ -194,8 +194,8 @@ void audio_init(u32 arg0){ gMusicPlayer = func_80002224(24, 120); func_8000B010(gMusicPlayer, 18); gSndFxPlayer = func_80002224(16, 50); - D_80115CFC = func_80070C9C( seq_max_len, 0x00FFFFFF); - D_80115D00 = func_80070C9C( seq_max_len, 0x00FFFFFF); + D_80115CFC = allocate_from_main_pool_safe( seq_max_len, 0x00FFFFFF); + D_80115D00 = allocate_from_main_pool_safe( seq_max_len, 0x00FFFFFF); audConfig.unk04 = 150; audConfig.unk00 = 32; audConfig.maxChannels = 16; diff --git a/src/memory.c b/src/memory.c new file mode 100644 index 00000000..5973c9a3 --- /dev/null +++ b/src/memory.c @@ -0,0 +1,397 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80070B30 */ + +#include "memory.h" + +#include "structs.h" +#include "types.h" +#include "macros.h" + +#define RAM_END 0x80400000 +#define MAIN_POOL_SLOT_COUNT 1600 + +/************ .rodata ************/ + +const char D_800E7210[] = "*** mmAlloc: size = 0 ***\n"; +const char D_800E722C[] = "*** mm Error *** ---> No more slots available.\n"; +const char D_800E725C[] = "\n*** mm Error *** ---> No suitble block found for allocation.\n"; +const char D_800E729C[] = "*** mmAllocAtAddr: size = 0 ***\n"; +const char D_800E72C0[] = "\n*** mm Error *** ---> No more slots available.\n"; +const char D_800E72F4[] = "\n*** mm Error *** ---> Can't allocate memory at desired address.\n"; +const char D_800E7338[] = "\n*** mm Error *** ---> Can't free ram at this location: %x\n"; +const char D_800E7374[] = "\n*** mm Error *** ---> No match found for mmFree.\n"; +const char D_800E73A8[] = "*** Slots still in use in region ***\n"; +const char D_800E73D0[] = "\n*** mm Error *** ---> stbf stack too deep!\n"; +const char D_800E7400[] = "\n*** mm Error *** ---> Can't fix the specified block.\n"; +const char D_800E7438[] = "\n*** mm Error *** ---> Can't unfix the specified block.\n"; +const char D_800E7474[] = "Colour %x >> %d\n"; +const char D_800E7488[] = "Unable to record %d slots, colours overflowed table.\n"; +const char D_800E74C0[] = "RED %d\n"; +const char D_800E74C8[] = "GREEN %d\n"; +const char D_800E74D4[] = "BLUE %d\n"; +const char D_800E74E0[] = "YELLOW %d\n"; +const char D_800E74EC[] = "MAGENTA %d\n"; +const char D_800E74F8[] = "CYAN %d\n"; +const char D_800E7504[] = "WHITE %d\n"; +const char D_800E7510[] = "GREY %d\n"; +const char D_800E751C[] = "ORANGE %d\n\n"; + +/*********************************/ + +/************ .bss ************/ + +/* Size: 0x8 bytes */ +typedef struct unk80070BE4_8_0 { + s16 unk0; + s16 unk2; + s32 unk4; +} unk80070BE4_8_0; + +/* Size: 0x14 bytes */ +typedef struct MemoryPoolSlot { +/* 0x00 */ unk80070BE4_8_0 *unk0; +/* 0x04 */ s32 size; +/* 0x08 */ s16 isTaken; +/* 0x0A */ s16 prevIndex; +/* 0x0C */ s16 nextIndex; +/* 0x0E */ s16 index; +/* 0x10 */ s32 unk10; +} MemoryPoolSlot; + +/* Size: 0x10 bytes */ +typedef struct MemoryPool { +/* 0x00 */ s32 maxNumSlots; +/* 0x04 */ s32 curNumSlots; +/* 0x08 */ MemoryPoolSlot *slots; +/* 0x0C */ s32 size; +} MemoryPool; + +MemoryPool gMemoryPools[4]; + +#ifndef _ALIGN16 + #define _ALIGN16(val) ((val) & 0xFFFFFFF0) + 0x10 +#endif + +s32 gNumberOfMemoryPools; +s32 D_801235C4; + +/* Size: 0x8 bytes */ +typedef struct unk801235C8 { + u32 unk0; + s8 unk4; + u8 pad5[3]; +} unk801235C8; + +unk801235C8 D_801235C8[256]; + +s32 D_80123DC8; +s32 D_80123DCC; +s32 D_80123DD0[64]; +s32 D_80123ED0[64]; +s32 D_80123FD0[8]; +s32 D_80123FF0[8]; + +extern MemoryPoolSlot D_8012D3F0; + +/******************************/ + +/* Unknown size */ +typedef struct unk800B7D10 { + u8 pad0[0x14]; + s32 unk14; +} unk800B7D10; + +unk800B7D10 *get_stack_pointer(void); +MemoryPoolSlot *allocate_from_memory_pool(s32, s32, s32); + +MemoryPoolSlot *new_memory_pool(MemoryPoolSlot *arg0, s32 size, s32 arg2); +void func_800710B0(s32); +void* allocate_from_main_pool_safe(s32, s32); +s32 *func_8006F510(void); +void func_8006F53C(s32*); + +void func_80071440(TextureHeader *texHeader); + +/** + * Creates the main memory pool. + * Starts at 0x8012D3F0. Ends at 0x80400000. Contains 1600 allocation slots. + */ +void init_main_memory_pool(void) { + gNumberOfMemoryPools = -1; + if(1) { + // Create the main memory pool. + new_memory_pool(&D_8012D3F0, RAM_END - (s32)(&D_8012D3F0), MAIN_POOL_SLOT_COUNT); + } + func_800710B0(2); + D_80123DC8 = 0; +} + +/** + * Creates a new memory pool that is sectioned off the main one. + */ +MemoryPoolSlot *new_sub_memory_pool(s32 poolDataSize, s32 numSlots) { + s32 size; + MemoryPoolSlot *slots; + s32 unused_2; + s32 *temp = func_8006F510(); + MemoryPoolSlot *newPool; + + size = poolDataSize + (numSlots * sizeof(MemoryPoolSlot)); + slots = (MemoryPoolSlot *)allocate_from_main_pool_safe(size, 0xFFFFFFFF); + newPool = new_memory_pool(slots, size, numSlots); + func_8006F53C(temp); + return newPool; +} + +#ifdef NON_MATCHING + +MemoryPoolSlot *new_memory_pool(MemoryPoolSlot *slots, s32 poolSize, s32 numSlots) { + s32 i; + MemoryPool *pool; + MemoryPoolSlot *firstSlot; + unk80070BE4_8_0 *temp3; + + pool = &gMemoryPools[++gNumberOfMemoryPools]; + pool->maxNumSlots = numSlots; + pool->curNumSlots = 0; + pool->slots = slots; + pool->size = poolSize; + + for(i = 0; i < pool->maxNumSlots; i++) { + slots[i].index = i; + } + + firstSlot = pool->slots; + temp3 = (unk80070BE4_8_0 *)&slots[numSlots]; + if((s32)temp3 & 0xF) { + firstSlot->unk0 = (unk80070BE4_8_0 *)_ALIGN16((s32)temp3); + } else { + firstSlot->unk0 = temp3; + } + firstSlot->size = poolSize - (numSlots * sizeof(MemoryPoolSlot)); + firstSlot->isTaken = 0; + firstSlot->prevIndex = -1; + firstSlot->nextIndex = -1; + + pool->curNumSlots++; + + return pool->slots; +} +#else +GLOBAL_ASM("asm/non_matchings/memory/new_memory_pool.s") +#endif + +void *allocate_from_main_pool_safe(s32 size, s32 mask) { + void *temp_v0; + if (size == 0) { + func_800B7460(*(s32 *)((u8 *)get_stack_pointer() + 0x14), size, mask); + } + temp_v0 = allocate_from_memory_pool(0, size, mask); + if (temp_v0 == (void *)NULL) { + func_800B7460(*(s32 *)((u8 *)get_stack_pointer() + 0x14), size, mask); + } + return temp_v0; +} + +MemoryPoolSlot *allocate_from_main_pool(s32 size, s32 arg1) { + return allocate_from_memory_pool(0, size, arg1); +} + +#ifdef NON_MATCHING +MemoryPoolSlot *allocate_from_memory_pool(s32 memoryPoolIndex, s32 size, s32 arg2) { + MemoryPool *pool; + MemoryPoolSlot *curSlot; + MemoryPoolSlot *slots; + s32 phi_a0; + s32 phi_a2; + s32 phi_s0; + s32 *sp28; + + sp28 = func_8006F510(); + pool = &gMemoryPools[memoryPoolIndex]; + if (pool->curNumSlots + 1 == pool->maxNumSlots) { + func_8006F53C(sp28); + } else { + if (size & 0xF) { + size = _ALIGN16(size); // The size of the pool should be 16-byte aligned + } + phi_a0 = 0; + phi_a2 = 0x7FFFFFFF; // INT_MAX + phi_s0 = -1; + while(phi_a0 != -1) { + curSlot = &pool->slots[phi_a0]; + if (!curSlot->isTaken && curSlot->size >= size && curSlot->size < phi_a2) { + phi_s0 = phi_a0; + phi_a2 = curSlot->size; + } + phi_a0 = curSlot->nextIndex; + } + if (phi_s0 != -1) { + allocate_memory_pool_slot(memoryPoolIndex, phi_s0, size, TRUE, FALSE, arg2); + func_8006F53C(sp28); + return pool->slots[phi_s0].unk0; + } + func_8006F53C(sp28); + } + return (MemoryPoolSlot *)NULL; +} +#else +GLOBAL_ASM("asm/non_matchings/memory/allocate_from_memory_pool.s") +#endif + +void *allocate_from_pool_containing_slots(MemoryPoolSlot *slots, s32 size) { + s32 i; + for(i = gNumberOfMemoryPools; i != 0; i--) { + if (slots == gMemoryPools[i].slots) { + return allocate_from_memory_pool(i, size, 0); + } + } + return (void *)NULL; +} + +GLOBAL_ASM("asm/non_matchings/memory/func_80070EF8.s") + +void func_800710B0(s32 arg0) { + s32 *sp2C = func_8006F510(); + D_80123DCC = arg0; + if (arg0 == 0) { + while (D_80123DC8 > 0) { + func_80071278(D_801235C8[--D_80123DC8].unk0); + } + } + func_8006F53C(sp2C); +} + +// This function seems to take in both TextureHeader and LevelHeader. +void func_80071140(void *data) { + s32 *sp1C = func_8006F510(); + if (D_80123DCC == 0) { + func_80071278(data); + } else { + func_80071440(data); + } + func_8006F53C(sp1C); +} + +GLOBAL_ASM("asm/non_matchings/memory/func_80071198.s") +GLOBAL_ASM("asm/non_matchings/memory/func_80071278.s") + +void func_80071440(TextureHeader *texHeader) { + D_801235C8[D_80123DC8].unk0 = texHeader; + D_801235C8[D_80123DC8].unk4 = D_80123DCC; + D_80123DC8++; +} + +GLOBAL_ASM("asm/non_matchings/memory/func_80071478.s") +GLOBAL_ASM("asm/non_matchings/memory/func_80071538.s") +GLOBAL_ASM("asm/non_matchings/memory/func_800715EC.s") +GLOBAL_ASM("asm/non_matchings/memory/func_8007164C.s") + +#ifdef NON_MATCHING +s32 allocate_memory_pool_slot(s32 memoryPoolIndex, s32 slotIndex, s32 size, s32 slotIsTaken, s32 newSlotIsTaken, s32 arg5) { + s32 slotSize; + s32 newIndex; + s32 futureIndex; + MemoryPoolSlot *slot; + MemoryPoolSlot *newSlot; + MemoryPool *pool; + + pool = &gMemoryPools[memoryPoolIndex]; + slot = &pool->slots[slotIndex]; + slotSize = slot->size; + slot->isTaken = slotIsTaken; + slot->size = size; + slot->unk10 = arg5; + if (size < slotSize) { + newIndex = pool->slots[pool->curNumSlots].index; + pool->curNumSlots++; + newSlot = &pool->slots[newIndex]; + newSlot->unk0 = ((u8*)slot->unk0) + size; + newSlot->size = slotSize - size; + newSlot->isTaken = newSlotIsTaken; + futureIndex = slot->nextIndex; + newSlot->prevIndex = slotIndex; + newSlot->nextIndex = futureIndex; + slot->nextIndex = newIndex; + if (futureIndex != -1) { + pool->slots[futureIndex].prevIndex = newIndex; + } + return newIndex; + } + return slotIndex; +} +#else +GLOBAL_ASM("asm/non_matchings/memory/allocate_memory_pool_slot.s") +#endif + + +GLOBAL_ASM("asm/non_matchings/memory/func_80071850.s") +GLOBAL_ASM("asm/non_matchings/memory/func_80071A24.s") + +#if 1 +GLOBAL_ASM("asm/non_matchings/memory/func_80071D30.s") +#else +void func_8007164C(s32 arg0, s16 arg1) { + s16 temp_a2; + s16 temp_t0; + s16 temp_t1; + s16 temp_t1_2; + s32 temp_lo; + s32 temp_lo_2; + s32 temp_t5; + s32 temp_t5_2; + s32 temp_v0; + void *temp_a0; + void *temp_a0_2; + void *temp_a3; + void *temp_v1; + + temp_v1 = (arg0 * 0x10) + &gMemoryPools; + temp_v0 = temp_v1->unk8; + temp_a3 = (arg1 * 0x14) + temp_v0; + temp_a2 = temp_a3->unkC; + temp_t0 = temp_a3->unkA; + temp_a3->unk8 = (u16)0; + if (temp_a2 != -1) { + temp_a0 = (temp_a2 * 0x14) + temp_v0; + if (temp_a0->unk8 == 0) { + temp_a3->unk4 = (s32) (temp_a3->unk4 + temp_a0->unk4); + temp_t1 = temp_a0->unkC; + temp_a3->unkC = temp_t1; + if (temp_t1 != -1) { + (temp_v0 + (temp_t1 * 0x14))->unkA = arg1; + } + temp_t5 = temp_v1->unk4 - 1; + temp_lo = temp_t5 * 0x14; + temp_v1->unk4 = temp_t5; + (temp_v0 + temp_lo)->unkE = temp_a2; + } + } + if (temp_t0 != -1) { + temp_a0_2 = (temp_t0 * 0x14) + temp_v0; + if (temp_a0_2->unk8 == 0) { + temp_a0_2->unk4 = (s32) (temp_a0_2->unk4 + temp_a3->unk4); + temp_t1_2 = temp_a3->unkC; + temp_a0_2->unkC = temp_t1_2; + if (temp_t1_2 != -1) { + (temp_v0 + (temp_t1_2 * 0x14))->unkA = temp_t0; + } + temp_t5_2 = temp_v1->unk4 - 1; + temp_lo_2 = temp_t5_2 * 0x14; + temp_v1->unk4 = temp_t5_2; + (temp_v0 + temp_lo_2)->unkE = arg1; + } + } +} +#endif + +GLOBAL_ASM("asm/non_matchings/memory/func_80071E58.s") +GLOBAL_ASM("asm/non_matchings/memory/func_80071F80.s") +GLOBAL_ASM("asm/non_matchings/memory/func_800720DC.s") + + + + + + + diff --git a/src/unknown_071730.h b/src/memory.h similarity index 100% rename from src/unknown_071730.h rename to src/memory.h diff --git a/src/menu.c b/src/menu.c index df467a7a..af4d7233 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1520,7 +1520,7 @@ s8 *func_8001E29C(s32 arg0); void func_80001D04(s32, s32*); void func_800660EC(f32 arg0); void func_8009C508(s32 arg0); -void *func_80070C9C(s32, u32); +void *allocate_from_main_pool_safe(s32, u32); void func_800C4170(s32 arg0); void play_music(s32 arg0); @@ -2305,8 +2305,8 @@ void menu_save_options_init(void) { gMenuDelay = 0; D_801263E0 = 1; D_801263D8 = 0; - D_80126A64 = (s32)func_80070C9C(0x800, 0xFFFFFFFF); - D_80126A0C = (s32)func_80070C9C(0xA00, 0xFFFFFFFF); + D_80126A64 = (s32)allocate_from_main_pool_safe(0x800, 0xFFFFFFFF); + D_80126A0C = (s32)allocate_from_main_pool_safe(0xA00, 0xFFFFFFFF); D_80126A04 = (s32)(D_80126A0C + 0x500); D_80126A08 = 0; D_80126BD4 = 0; @@ -2582,7 +2582,7 @@ void func_800887E8(void) { s32 i; // Starting point - D_80126AA0[0] = func_80070C9C(0x200, 0xFFFFFFFF); + D_80126AA0[0] = allocate_from_main_pool_safe(0x200, 0xFFFFFFFF); // Fills in the table. for(i = 1; i < 16; i++) { @@ -4369,7 +4369,7 @@ void func_8009C8A4(s16 *arg0) { s32 get_random_number_from_range(s32, s32); void func_8009C904(s32 arg0) { if (D_800DF75C == NULL) { - D_800DF75C = func_80070C9C(sizeof(unk800DF510) * 18, 0xFF0000FF); + D_800DF75C = allocate_from_main_pool_safe(sizeof(unk800DF510) * 18, 0xFF0000FF); } D_800DF75C[arg0].unk0 = D_800DF510[arg0].unk0; diff --git a/src/unknown_003260.c b/src/unknown_003260.c index 2f924e78..1ef04f7e 100644 --- a/src/unknown_003260.c +++ b/src/unknown_003260.c @@ -113,7 +113,7 @@ void audioNewThread(ALSynConfig* c, OSPri p, s32 arg2){ if(c->fxType == AL_FX_CUSTOM){ reg_v0 = func_80076C58(38); tmp_size = reg_v0[9]-reg_v0[8]; - reg_s0 = func_80070C9C(tmp_size, 0x00FFFFFF, reg_v0[8]); + reg_s0 = allocate_from_main_pool_safe(tmp_size, 0x00FFFFFF, reg_v0[8]); func_80076E68(39,reg_s0, reg_v0[8],tmp_size); c->params = reg_s0; c[1].maxVVoices = 0; diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index beee0851..01012854 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -280,8 +280,8 @@ extern s32 osTvType; void func_8000C460(void); -void *func_80070B78(s32, u32); -void *func_80070C9C(s32, u32); +void *new_sub_memory_pool(s32, u32); +void *allocate_from_main_pool_safe(s32, u32); s32 *func_80076C58(s32); void particlePtrList_addObject(Player *); void particlePtrList_flush(void); @@ -349,32 +349,32 @@ void func_8000BF8C(void) { s32 i; func_8001D258(0.67f, 0.33f, 0, -0x2000, 0); - D_8011AE68 = (s32*)func_80070B78(0x15800, 0x200); - particlePtrList = (Player **)func_80070C9C(0x320, 0xFFFF); - D_8011AE6C = (s32*)func_80070C9C(0x50, 0xFFFF); - D_8011AE74 = (s32*)func_80070C9C(0x200, 0xFFFF); - D_8011AECC = (unknown8011AECC*)func_80070C9C(0xE10, 0xFFFF); - D_8011AEDC = (s32*)func_80070C9C(0x50, 0xFFFF); - playerStructArray_Ptr = (s32*)func_80070C9C(0x28, 0xFFFF); - D_8011AEEC = (s32*)func_80070C9C(0x28, 0xFFFF); - D_8011AEE8 = (s32*)func_80070C9C(0x28, 0xFFFF); - D_8011AF04 = (s32*)func_80070C9C(0x200, 0xFFFF); - D_8011ADCC = (s32*)func_80070C9C(8, 0xFFFF); - D_8011AFF4 = (s32*)func_80070C9C(0x400, 0xFFFF); + D_8011AE68 = (s32*)new_sub_memory_pool(0x15800, 0x200); + particlePtrList = (Player **)allocate_from_main_pool_safe(0x320, 0xFFFF); + D_8011AE6C = (s32*)allocate_from_main_pool_safe(0x50, 0xFFFF); + D_8011AE74 = (s32*)allocate_from_main_pool_safe(0x200, 0xFFFF); + D_8011AECC = (unknown8011AECC*)allocate_from_main_pool_safe(0xE10, 0xFFFF); + D_8011AEDC = (s32*)allocate_from_main_pool_safe(0x50, 0xFFFF); + playerStructArray_Ptr = (s32*)allocate_from_main_pool_safe(0x28, 0xFFFF); + D_8011AEEC = (s32*)allocate_from_main_pool_safe(0x28, 0xFFFF); + D_8011AEE8 = (s32*)allocate_from_main_pool_safe(0x28, 0xFFFF); + D_8011AF04 = (s32*)allocate_from_main_pool_safe(0x200, 0xFFFF); + D_8011ADCC = (s32*)allocate_from_main_pool_safe(8, 0xFFFF); + D_8011AFF4 = (s32*)allocate_from_main_pool_safe(0x400, 0xFFFF); D_8011AEB8 = (s32*)func_80076C58(0x23); D_8011AEBC = (func_80076F30(0x23) >> 1) - 1; while (D_8011AEB8[D_8011AEBC] == 0) { D_8011AEBC--; } - D_8011AD58 = (s32*)func_80070C9C(0x800, 0xFFFF); + D_8011AD58 = (s32*)allocate_from_main_pool_safe(0x800, 0xFFFF); D_8011AD64 = func_80076C58(0x21); D_8011AD68 = 0; while (-1 != D_8011AD64[D_8011AD68]) { D_8011AD68++; } D_8011AD68--; - D_8011AE48 = (s32*)func_80070C9C(D_8011AD68 << 2, 0xFFFFFFFF); - D_8011AE4C = (s32*)func_80070C9C(D_8011AD68, 0xFFFFFFFF); + D_8011AE48 = (s32*)allocate_from_main_pool_safe(D_8011AD68 << 2, 0xFFFFFFFF); + D_8011AE4C = (s32*)allocate_from_main_pool_safe(D_8011AD68, 0xFFFFFFFF); for (i = 0; i < D_8011AD68; i++) { (*D_8011AE4C)[i] = 0; @@ -387,7 +387,7 @@ void func_8000BF8C(void) { D_8011ADA0++; } func_8000C2D8(&D_8011AD6C[D_8011AD70[65]], (D_8011AD70[66] - D_8011AD70[65]) * 4); - objPtrList = (Player**)func_80070C9C(0x800, 0xFFFF); + objPtrList = (Player**)allocate_from_main_pool_safe(0x800, 0xFFFF); D_8011ADC4 = 0; gTimeTrialEnabled = 0; D_8011AEF5 = 0; diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 6d7ae166..3fa3bf60 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -288,9 +288,9 @@ void func_800249F0(u32 arg0, u32 arg1, s32 arg2, u32 arg3, u32 arg4, u32 arg5, u D_8011B0FC = 0; i = 0; do{ - D_8011D350[i] = func_80070C9C(3200, 0xFFFF00FF); - D_8011D320[i] = func_80070C9C(12800, 0xFFFF00FF); - D_8011D338[i] = func_80070C9C(20000, 0xFFFF00FF); + D_8011D350[i] = allocate_from_main_pool_safe(3200, 0xFFFF00FF); + D_8011D320[i] = allocate_from_main_pool_safe(12800, 0xFFFF00FF); + D_8011D338[i] = allocate_from_main_pool_safe(20000, 0xFFFF00FF); }while(&D_8011D338[++i] != &D_8011D348); D_8011B0C8 = 0; diff --git a/src/unknown_043920.c b/src/unknown_043920.c index 0a25f612..60abe1c8 100644 --- a/src/unknown_043920.c +++ b/src/unknown_043920.c @@ -517,7 +517,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059208.s") GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059790.s") void func_800598D0(void) { - D_8011D590[0] = func_80070C9C(0x21C0, 0xFF0000FF); + D_8011D590[0] = allocate_from_main_pool_safe(0x21C0, 0xFF0000FF); D_8011D590[1] = D_8011D590[0] + 0x10E0; D_8011D590[2] = 0; D_8011D5A0[0] = 0; diff --git a/src/unknown_06B2B0.c b/src/unknown_06B2B0.c index 0573ea68..6062d2a6 100644 --- a/src/unknown_06B2B0.c +++ b/src/unknown_06B2B0.c @@ -203,7 +203,7 @@ void load_level_3(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); void func_800813C0(); void func_80004A60(s32, s32); void menu_init(s32); - +void render(void); GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A6B0.s") @@ -265,7 +265,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_066AA0/load_level.s") Settings *get_settings(void); s32 *func_80076C58(s32); -LevelHeader *func_80070C9C(s32, s32); +LevelHeader *allocate_from_main_pool_safe(s32, s32); void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3); void func_8006C2E4(void); s16 func_8006C2F0(void); @@ -324,7 +324,7 @@ void load_level(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { } temp2 = D_80121160[arg0]; temp = D_80121160[arg0 + 1] - temp2; - gCurrentLevelHeader = func_80070C9C(temp, 0xFFFF00FF); + gCurrentLevelHeader = allocate_from_main_pool_safe(temp, 0xFFFF00FF); func_80076E68(0x17, gCurrentLevelHeader, temp2, temp); D_800DD330 = 0; sp44 = arg0; @@ -392,7 +392,7 @@ void load_level(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { func_80071140(gCurrentLevelHeader); temp2 = D_80121160[arg0]; temp = D_80121160[arg0 + 1] - temp2; - gCurrentLevelHeader = func_80070C9C(temp, 0xFFFF00FF); + gCurrentLevelHeader = allocate_from_main_pool_safe(temp, 0xFFFF00FF); func_80076E68(0x17, gCurrentLevelHeader, temp2, temp); } func_80071140(D_80121160); @@ -626,7 +626,7 @@ void func_8006BFC8(s8 *arg0) { } temp2 = D_80121160[phi_s0]; temp = D_80121160[phi_s0 + 1] - temp2; - D_801211C0[0] = func_80070C9C(temp, 0xFFFF00FF); + D_801211C0[0] = allocate_from_main_pool_safe(temp, 0xFFFF00FF); func_80076E68(0, D_801211C0[0], temp2, temp); func_80071140(D_80121160); } @@ -727,7 +727,7 @@ void osScAddClient(u16*, u8*, s32**, s32); void func_8006C3E0(void) { s32 sp24; - func_80070B30(); + init_main_memory_pool(); func_800C6170(); D_800DD374 = 1; if (func_8006F4EC() != 0) { @@ -1303,7 +1303,7 @@ extern unk80121200 *D_80121200[3]; extern unk80121210 *D_80121210[3]; extern unk80121220 *D_80121220[3]; -void *func_80070C9C(s32, s32); // Allocates memory? +void *allocate_from_main_pool_safe(s32, s32); // Allocates memory? void func_8006EFDC(void) { s32 size; @@ -1316,7 +1316,7 @@ void func_8006EFDC(void) { (D_800DD3DC * sizeof(unk80121200)) + (D_800DD3CC * sizeof(unk80121210)); - current = (s8*)func_80070C9C(size, 0xFF0000FF); + current = (s8*)allocate_from_main_pool_safe(size, 0xFF0000FF); D_801211F0[0] = (Gfx*)current; current += (D_800DD3BC * sizeof(Gfx)); D_80121200[0] = (unk80121200*)current; @@ -1325,7 +1325,7 @@ void func_8006EFDC(void) { current += (D_800DD3CC * sizeof(unk80121210)); D_80121220[0] = (unk80121220*)current; - current = (s8*)func_80070C9C(size, 0xFFFF00FF); + current = (s8*)allocate_from_main_pool_safe(size, 0xFFFF00FF); D_801211F0[1] = (Gfx*)current; current += (D_800DD3BC * sizeof(Gfx)); D_80121200[1] = (unk80121200*)current; diff --git a/src/unknown_071730.c b/src/unknown_071730.c deleted file mode 100644 index 4d7c82a6..00000000 --- a/src/unknown_071730.c +++ /dev/null @@ -1,285 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80070B30 */ - -#include "unknown_071730.h" - -#include "structs.h" -#include "types.h" -#include "macros.h" - -/************ .rodata ************/ - -const char D_800E7210[] = "*** mmAlloc: size = 0 ***\n"; -const char D_800E722C[] = "*** mm Error *** ---> No more slots available.\n"; -const char D_800E725C[] = "\n*** mm Error *** ---> No suitble block found for allocation.\n"; -const char D_800E729C[] = "*** mmAllocAtAddr: size = 0 ***\n"; -const char D_800E72C0[] = "\n*** mm Error *** ---> No more slots available.\n"; -const char D_800E72F4[] = "\n*** mm Error *** ---> Can't allocate memory at desired address.\n"; -const char D_800E7338[] = "\n*** mm Error *** ---> Can't free ram at this location: %x\n"; -const char D_800E7374[] = "\n*** mm Error *** ---> No match found for mmFree.\n"; -const char D_800E73A8[] = "*** Slots still in use in region ***\n"; -const char D_800E73D0[] = "\n*** mm Error *** ---> stbf stack too deep!\n"; -const char D_800E7400[] = "\n*** mm Error *** ---> Can't fix the specified block.\n"; -const char D_800E7438[] = "\n*** mm Error *** ---> Can't unfix the specified block.\n"; -const char D_800E7474[] = "Colour %x >> %d\n"; -const char D_800E7488[] = "Unable to record %d slots, colours overflowed table.\n"; -const char D_800E74C0[] = "RED %d\n"; -const char D_800E74C8[] = "GREEN %d\n"; -const char D_800E74D4[] = "BLUE %d\n"; -const char D_800E74E0[] = "YELLOW %d\n"; -const char D_800E74EC[] = "MAGENTA %d\n"; -const char D_800E74F8[] = "CYAN %d\n"; -const char D_800E7504[] = "WHITE %d\n"; -const char D_800E7510[] = "GREY %d\n"; -const char D_800E751C[] = "ORANGE %d\n\n"; - -/*********************************/ - -/************ .bss ************/ - -/* Size: 0x8 bytes */ -typedef struct unk80070BE4_8_0 { - s16 unk0; - s16 unk2; - s32 unk4; -} unk80070BE4_8_0; - -/* Size: 0x14 bytes */ -typedef struct unk80070BE4_8 { - unk80070BE4_8_0 *unk0; - s32 unk4; - s16 unk8; - s16 unkA; - s16 unkC; - s16 unkE; - u8 pad10[0x4]; -} unk80070BE4_8; - -/* Size: 0x10 bytes */ -typedef struct unk80070BE4 { - s32 unk0; - s32 unk4; - unk80070BE4_8 *unk8; - s32 size; -} unk80070BE4; - -unk80070BE4 D_80123580[4]; - -#ifndef _ALIGN16 - #define _ALIGN16(val) ((val) & 0xFFFFFFF0) + 0x10 -#endif - -s32 D_801235C0; -s32 D_801235C4; - -/* Size: 0x8 bytes */ -typedef struct unk801235C8 { - u32 unk0; - s8 unk4; - u8 pad5[3]; -} unk801235C8; - -unk801235C8 D_801235C8[256]; - -s32 D_80123DC8; -s32 D_80123DCC; -s32 D_80123DD0[64]; -s32 D_80123ED0[64]; -s32 D_80123FD0[8]; -s32 D_80123FF0[8]; - -extern unk80070BE4_8 D_8012D3F0; - -/******************************/ - -/* Unknown size */ -typedef struct unk800B7D10 { - u8 pad0[0x14]; - s32 unk14; -} unk800B7D10; - -unk800B7D10 *get_stack_pointer(void); -void *func_80070D3C(s32, s32, s32); - -unk80070BE4_8 *func_80070BE4(unk80070BE4_8 *arg0, s32 size, s32 arg2); -void func_800710B0(s32); -void* func_80070C9C(s32, s32); -s32 *func_8006F510(void); -void func_8006F53C(s32*); - -void func_80071440(TextureHeader *texHeader); - -void func_80070B30(void) { - s32 tmp = -1; - D_801235C0 = tmp; - if(1){ - func_80070BE4(&D_8012D3F0, 0x80400000 - (s32)(&D_8012D3F0), 1600); - } - func_800710B0(2); - D_80123DC8 = 0; -} - -s32 *func_80070B78(s32 arg0, s32 arg1) { - s32 temp3; - unk80070BE4_8 * temp4; - s32 unused_2; - s32 *temp = func_8006F510(); - s32 *temp2; - - temp3 = arg0 + (arg1 * sizeof(unk80070BE4_8)); - temp4 = (unk80070BE4_8 *)func_80070C9C(temp3, -1); - temp2 = func_80070BE4(temp4, temp3, arg1); - func_8006F53C(temp); - return temp2; -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80070BE4.s") -#else -unk80070BE4_8 *func_80070BE4(unk80070BE4_8 *arg0, s32 size, s32 arg2) { - s32 i; - unk80070BE4 *temp; - unk80070BE4_8 *temp2; - unk80070BE4_8_0 *temp3; - s32 tmp = ++D_801235C0; - //s32 tmp2; - - temp = D_80123580 + tmp; - temp->unk0 = arg2; - temp->unk4 = 0; - temp->unk8 = arg0; - temp->size = size; - - - for(i = 0; i < temp->unk0; i++) { - arg0[i].unkE = i; - } - - temp2 = temp->unk8; - temp3 = (unk80070BE4_8_0 *)&arg0[arg2]; - if((s32)temp3 & 0xF) { - temp2->unk0 = (unk80070BE4_8_0 *)_ALIGN16((s32)temp3); - } else { - temp2->unk0 = temp3; - } - - temp2->unk4 = size - (arg2 * sizeof(unk80070BE4_8)); - temp2->unk8 = 0; - temp2->unkA = -1; - temp2->unkC = -1; - temp->unk4++; - - return temp->unk8; -} -#endif - -void *func_80070C9C(s32 size, s32 mask) { - void *temp_v0; - if (size == 0) { - func_800B7460(*(s32 *)((u8 *)get_stack_pointer() + 0x14), size, mask); - } - temp_v0 = func_80070D3C(0, size, mask); - if (temp_v0 == (void *)NULL) { - func_800B7460(*(s32 *)((u8 *)get_stack_pointer() + 0x14), size, mask); - } - return temp_v0; -} - -void func_80070D10(s32 arg0, s32 arg1) { - func_80070D3C(0, arg0, arg1); -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80070D3C.s") -#else - -void *func_80070D3C(s32 arg0, s32 arg1, s32 arg2) { - unk80070BE4 *temp; - unk80070BE4_8 *temp2; - s32 phi_a0; - s32 phi_a2; - s32 phi_s0; - s32 *sp28; - - temp = &D_80123580[arg0]; - if ((temp->unk4 + 1) == temp->unk0) { - func_8006F53C(sp28); - } else { - if (arg1 & 0xF) { - arg1 = _ALIGN16(arg1); //(arg1 & -0x10) + 0x10; - } - phi_a0 = 0; - phi_a2 = 0x7FFFFFFF; - phi_s0 = -1; - while(phi_a0 != -1) { - temp2 = &temp->unk8[phi_a0]; - if (temp2->unk8 == 0 && temp2->unk4 >= arg1 && temp2->unk4 < phi_a2) { - phi_s0 = phi_a0; - phi_a2 = temp2->unk4; - } - phi_a0 = temp2->unkC; - } - if (phi_s0 != -1) { - func_8007178C(arg0, phi_s0, arg1, 1, 0, arg2); - func_8006F53C(sp28); - return (void *)(&temp->unk8[phi_s0]); - } - func_8006F53C(sp28); - } - return (void *)NULL; -} -#endif - -void *func_80070E90(unk80070BE4_8 *arg0, s32 arg1) { - s32 i; - for(i = D_801235C0; i != 0; i--) { - if (arg0 == D_80123580[i].unk8) { - return func_80070D3C(i, arg1, 0); - } - } - return (void *)NULL; -} - -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80070EF8.s") - -void func_800710B0(s32 arg0) { - s32 *sp2C = func_8006F510(); - D_80123DCC = arg0; - if (arg0 == 0) { - while (D_80123DC8 > 0) { - func_80071278(D_801235C8[--D_80123DC8].unk0); - } - } - func_8006F53C(sp2C); -} - -void func_80071140(TextureHeader *texHeader) { - s32 *sp1C = func_8006F510(); - if (D_80123DCC == 0) { - func_80071278(texHeader); - } else { - func_80071440(texHeader); - } - func_8006F53C(sp1C); -} - -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071198.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071278.s") - -void func_80071440(TextureHeader *texHeader) { - D_801235C8[D_80123DC8].unk0 = texHeader; - D_801235C8[D_80123DC8].unk4 = D_80123DCC; - D_80123DC8++; -} - -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071478.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071538.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_800715EC.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_8007164C.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_8007178C.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071850.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071A24.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071D30.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071E58.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_80071F80.s") -GLOBAL_ASM("asm/non_matchings/unknown_071730/func_800720DC.s") diff --git a/src/unknown_072E50.c b/src/unknown_072E50.c index ff4e2601..98166ecf 100644 --- a/src/unknown_072E50.c +++ b/src/unknown_072E50.c @@ -153,7 +153,7 @@ s32 func_80076AF4(s32 arg0, s32 arg1) { s32 ret; ret = 6; - temp = func_80070C9C(0x100, 0xFF); + temp = allocate_from_main_pool_safe(0x100, 0xFF); if (func_80076610(arg0, arg1, temp, 0x100) == 0) { switch(*temp) { case 0x47414D44: // GAMD diff --git a/src/unknown_0777A0.c b/src/unknown_0777A0.c index 3bd12be7..1dec65a3 100644 --- a/src/unknown_0777A0.c +++ b/src/unknown_0777A0.c @@ -22,7 +22,7 @@ s32 *D_80124290; // These are both defined in the generated dkr.ld file. extern u8 __ASSETS_LUT_START, __ASSETS_LUT_END; // __ASSETS_LUT_START = 0xECB60, _END = 0xECC30 -void *func_80070C9C(s32, s32); +void *allocate_from_main_pool_safe(s32, s32); s32 func_80071478(s32*); void dmacopy(u32 romOffset, u8 *ramAddress, s32 numBytes); @@ -32,7 +32,7 @@ void func_80076BA0(void) { osCreateMesgQueue(&D_80124220, &D_80124218, 1); osCreatePiManager(0x96, &D_80124278, &D_80124238, 0x10); size = &__ASSETS_LUT_END - &__ASSETS_LUT_START; - D_80124290 = (s32*)func_80070C9C(size, 0x7F7F7FFF); + D_80124290 = (s32*)allocate_from_main_pool_safe(size, 0x7F7F7FFF); func_80071478(D_80124290); dmacopy(&__ASSETS_LUT_START, D_80124290, size); } @@ -54,7 +54,7 @@ s32 *func_80076C58(u32 arg0) { temp = arg0 + D_80124290; start = *temp; size = *(temp + 1) - start; - temp2 = (s32*)func_80070C9C(size, 0x7F7F7FFF); + temp2 = (s32*)allocate_from_main_pool_safe(size, 0x7F7F7FFF); if (temp2 == NULL) { return NULL; } @@ -83,13 +83,13 @@ u8 *func_80076CF0(u32 arg0, s32 arg1) { start = *temp; size = *(temp + 1) - start; - temp_v0_2 = (u8*)func_80070C9C(8, 0xFFFFFFFF); + temp_v0_2 = (u8*)allocate_from_main_pool_safe(8, 0xFFFFFFFF); temp_a0 = start + &__ASSETS_LUT_END; dmacopy(temp_a0, temp_v0_2, 8); sp2C = byteswap32(temp_v0_2) + arg1; func_80071140(temp_v0_2); - temp_v0_3 = (u8*)func_80070C9C(sp2C + arg1, 0x7F7F7FFF); + temp_v0_3 = (u8*)allocate_from_main_pool_safe(sp2C + arg1, 0x7F7F7FFF); if (temp_v0_3 == NULL) { return NULL; diff --git a/src/unknown_080240.c b/src/unknown_080240.c index be422797..59e63cb3 100644 --- a/src/unknown_080240.c +++ b/src/unknown_080240.c @@ -43,7 +43,7 @@ u32 func_8007F640(s32 arg0) { start = lut[arg0]; size = lut[arg0 + 1] - start; - someAddr = func_80070C9C(size, 0xFFFF); + someAddr = allocate_from_main_pool_safe(size, 0xFFFF); func_80076E68(10, someAddr, start, size); func_80071140(lut); diff --git a/src/unknown_0B8920.c b/src/unknown_0B8920.c index 155b07b4..0129a87a 100644 --- a/src/unknown_0B8920.c +++ b/src/unknown_0B8920.c @@ -121,7 +121,7 @@ extern s32 D_8012A0DC; /*****************************/ -u8* func_80070C9C(s32 arg0, s32 arg1); +u8* allocate_from_main_pool_safe(s32 arg0, s32 arg1); void func_80071140(s32* arg0); void func_8007B2BC(s32* arg0); void func_800C5494(s32 arg0); diff --git a/src/unknown_0C4800.c b/src/unknown_0C4800.c index bea95c22..6606103f 100644 --- a/src/unknown_0C4800.c +++ b/src/unknown_0C4800.c @@ -603,8 +603,8 @@ void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgC void func_800C6170(void) { - D_800E3760 = func_80070C9C(0x2800, 0xFF); - D_800E3764 = func_80070C9C(0x10, 0xFF); + D_800E3760 = allocate_from_main_pool_safe(0x2800, 0xFF); + D_800E3764 = allocate_from_main_pool_safe(0x10, 0xFF); } // Returns the little-endian value from a byte array.