From 4fa3e8e3fb2eca5c06050669580d33e0bb9cad49 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 18:29:03 -0500 Subject: [PATCH 01/66] Moved .rodata in unknown_005740 from asm to C. --- data/unknown_005740.rodata.s | 234 ----------------------------------- src/unknown_005740.c | 62 ++++++++++ 2 files changed, 62 insertions(+), 234 deletions(-) delete mode 100644 data/unknown_005740.rodata.s diff --git a/data/unknown_005740.rodata.s b/data/unknown_005740.rodata.s deleted file mode 100644 index c54f28c9..00000000 --- a/data/unknown_005740.rodata.s +++ /dev/null @@ -1,234 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E4BF0 -.word 0x461C4000 -.word 0x00000000 - -glabel D_800E4BF8 -.word 0x3FD99999 - -glabel D_800E4BFC -.word 0x9999999A - -glabel D_800E4C00 -.word 0x461C4000 -.word 0x00000000 - -glabel D_800E4C08 -.word 0x3FA99999 - -glabel D_800E4C0C -.word 0x9999999A - -glabel D_800E4C10 -.word 0x3FEE6666 - -glabel D_800E4C14 -.word 0x66666666 - -glabel D_800E4C18 -.word 0x3FC0A3D7 - -glabel D_800E4C1C -.word 0x0A3D70A4 - -glabel D_800E4C20 -.word 0x3FD33333 - -glabel D_800E4C24 -.word 0x33333333 - -glabel D_800E4C28 -.word 0x3F947AE1 - -glabel D_800E4C2C -.word 0x47AE147B - -glabel D_800E4C30 -.word 0x3F847AE1 - -glabel D_800E4C34 -.word 0x47AE147B - -glabel D_800E4C38 -.word 0x3ECCCCCD -.word 0x00000000 - -glabel D_800E4C40 -.word 0x3F747AE1 - -glabel D_800E4C44 -.word 0x47AE147B - -glabel D_800E4C48 -.word 0xBFB99999 - -glabel D_800E4C4C -.word 0x9999999A - -glabel D_800E4C50 -.word 0x3FA99999 - -glabel D_800E4C54 -.word 0x9999999A - -glabel D_800E4C58 -.word 0x3FEE6666 - -glabel D_800E4C5C -.word 0x66666666 - -glabel D_800E4C60 -.word 0x3FD33333 - -glabel D_800E4C64 -.word 0x33333333 - -glabel D_800E4C68 -.word 0x401A36AE - -glabel D_800E4C6C -.word 0x7D566CF4 - -glabel D_800E4C70 -.word 0x40D1B574 - -glabel D_800E4C74 -.word 0x461C4000 - -glabel D_800E4C78 -.word 0x461C4000 -.word 0x00000000 - -glabel D_800E4C80 -.word 0x3FA99999 - -glabel D_800E4C84 -.word 0x9999999A - -glabel D_800E4C88 -.word 0x3FEE6666 - -glabel D_800E4C8C -.word 0x66666666 - -glabel D_800E4C90 -.word 0x401A36AE - -glabel D_800E4C94 -.word 0x7D566CF4 - -glabel D_800E4C98 -.word 0x40D1B574 -.word 0x00000000 - -glabel D_800E4CA0 -.word 0x409B0CEF - -glabel D_800E4CA4 -.word 0xA82E87D3 - -glabel D_800E4CA8 -.word 0x3FE99999 - -glabel D_800E4CAC -.word 0x9999999A - -glabel D_800E4CB0 -.word 0x3F4CCCCD -.word 0x00000000 - -glabel D_800E4CB8 -.word 0xBFE99999 - -glabel D_800E4CBC -.word 0x9999999A - -glabel D_800E4CC0 -.word 0xBF4CCCCD - -glabel D_800E4CC4 -.word 0x4A095440 - -glabel D_800E4CC8 -.word 0x3FA99999 - -glabel D_800E4CCC -.word 0x9999999A - -glabel D_800E4CD0 -.word 0x44BB8000 - -glabel D_800E4CD4 -.word 0x3D4CCCCD - -glabel D_800E4CD8 -.word 0x3FA99999 - -glabel D_800E4CDC -.word 0x9999999A - -glabel D_800E4CE0 -.word 0x4A095440 -.word 0x00000000 - -glabel D_800E4CE8 -.word 0x3FE99999 - -glabel D_800E4CEC -.word 0x9999999A - -glabel D_800E4CF0 -.word 0x44BB8000 - -glabel D_800E4CF4 -.word 0x3D4CCCCD - -glabel D_800E4CF8 -.word 0x3F50624D - -glabel D_800E4CFC -.word 0xD2F1A9FC - -.aligned_text "OUT OF AUDIO POINTS\n" -.aligned_text "amAudioLineAddVertex: Exceeded maximum number of lines (%d)\n" -.aligned_text "amAudioLineAddVertex: Exceeded maximum number of line vertices (%d)\n" -.aligned_text "amReverbLineAddVertex: Exceeded maximum number of lines (%d)\n" -.aligned_text "amReverbLineAddVertex: Exceeded maximum number of line vertices (%d)\n" -.aligned_text "Audio line definition error (less than 2 vertices on line %d)\n" -.aligned_text "Audio line definition error (line=%d, vertex=%d)\n" -.aligned_text "Reverb line definition error (less than 2 vertices on line %d)\n" -.aligned_text "Reverb line definition error (line=%d, vertex=%d)\n" - -glabel D_800E4F10 -.word 0xC7C35000 - -glabel D_800E4F14 -.word 0x497423F0 - -glabel D_800E4F18 -.word 0xC0F86A00 - -glabel D_800E4F1C -.word 0x00000000 - -glabel D_800E4F20 -.word 0xC0F86A00 - -glabel D_800E4F24 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 - -.aligned_text "Exceeded voice limit of %d (%d)\n" - -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_005740.c b/src/unknown_005740.c index 94aecce3..d9026334 100644 --- a/src/unknown_005740.c +++ b/src/unknown_005740.c @@ -14,6 +14,68 @@ s32 D_800DC6E0 = 0; // Currently unknown, might be a different type. /*******************************/ +/************ .rodata ************/ + +const FloatLiteral D_800E4BF0 = { 10000.0f }; +const DoubleLiteral D_800E4BF8 = { 0.4 }; +const FloatLiteral D_800E4C00 = { 10000.0f }; +const DoubleLiteral D_800E4C08 = { 0.05 }; +const DoubleLiteral D_800E4C10 = { 0.95 }; +const DoubleLiteral D_800E4C18 = { 0.13 }; +const DoubleLiteral D_800E4C20 = { 0.3 }; +const DoubleLiteral D_800E4C28 = { 0.02 }; +const DoubleLiteral D_800E4C30 = { 0.01 }; +const FloatLiteral D_800E4C38 = { 0.4f }; +const DoubleLiteral D_800E4C40 = { 0.005 }; +const DoubleLiteral D_800E4C48 = { -0.1 }; +const DoubleLiteral D_800E4C50 = { 0.05 }; +const DoubleLiteral D_800E4C58 = { 0.95 }; +const DoubleLiteral D_800E4C60 = { 0.3 }; +const DoubleLiteral D_800E4C68 = { 6.5534 }; +const FloatLiteral D_800E4C70 = { 6.5534f }; +const FloatLiteral D_800E4C74 = { 10000.0f }; +const FloatLiteral D_800E4C78 = { 10000.0f }; +const DoubleLiteral D_800E4C80 = { 0.05 }; +const DoubleLiteral D_800E4C88 = { 0.95 }; +const DoubleLiteral D_800E4C90 = { 6.5534 }; +const FloatLiteral D_800E4C98 = { 6.5534f }; +const DoubleLiteral D_800E4CA0 = { 1731.23404 }; +const DoubleLiteral D_800E4CA8 = { 0.8 }; +const FloatLiteral D_800E4CB0 = { 0.8f }; +const DoubleLiteral D_800E4CB8 = { -0.8 }; +const FloatLiteral D_800E4CC0 = { -0.8f }; +const FloatLiteral D_800E4CC4 = { 2250000.0f }; +const DoubleLiteral D_800E4CC8 = { 0.05 }; +const FloatLiteral D_800E4CD0 = { 1500.0f }; +const FloatLiteral D_800E4CD4 = { 0.05f }; +const DoubleLiteral D_800E4CD8 = { 0.05 }; +const FloatLiteral D_800E4CE0 = { 2250000.0f }; +const DoubleLiteral D_800E4CE8 = { 0.8 }; +const FloatLiteral D_800E4CF0 = { 1500.0f }; +const FloatLiteral D_800E4CF4 = { 0.05f }; +const DoubleLiteral D_800E4CF8 = { 0.001 }; + +const char D_800E4D00[] = "OUT OF AUDIO POINTS\n"; +const char D_800E4D18[] = "amAudioLineAddVertex: Exceeded maximum number of lines (%d)\n"; +const char D_800E4D58[] = "amAudioLineAddVertex: Exceeded maximum number of line vertices (%d)\n"; +const char D_800E4DA0[] = "amReverbLineAddVertex: Exceeded maximum number of lines (%d)\n"; +const char D_800E4DE0[] = "amReverbLineAddVertex: Exceeded maximum number of line vertices (%d)\n"; +const char D_800E4E28[] = "Audio line definition error (less than 2 vertices on line %d)\n"; +const char D_800E4E68[] = "Audio line definition error (line=%d, vertex=%d)\n"; +const char D_800E4E9C[] = "Reverb line definition error (less than 2 vertices on line %d)\n"; +const char D_800E4EDC[] = "Reverb line definition error (line=%d, vertex=%d)\n"; + +const FloatLiteral D_800E4F10 = { -100000.0f }; +const FloatLiteral D_800E4F14 = { 999999.0f }; +const DoubleLiteral D_800E4F18 = { -100000.0 }; +const DoubleLiteral D_800E4F20 = { -100000.0 }; + +const u32 filePadding[2] = { 0, 0 }; // unknown_005740 needs to be split. + +const char D_800E4F30[] = "Exceeded voice limit of %d (%d)\n"; + +/*******************************/ + /************ .bss ************/ extern s8 D_8011AC18; From 9e9019e21a40db8f8831899aa31eb3738f542849 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 20:41:43 -0500 Subject: [PATCH 02/66] Moved .rodata in unknown_00BC20 from asm to C. --- data/unknown_00BC20.rodata.s | 1028 ---------------------------------- src/unknown_00BC20.c | 307 +++++++++- 2 files changed, 304 insertions(+), 1031 deletions(-) delete mode 100644 data/unknown_00BC20.rodata.s diff --git a/data/unknown_00BC20.rodata.s b/data/unknown_00BC20.rodata.s deleted file mode 100644 index f5350d75..00000000 --- a/data/unknown_00BC20.rodata.s +++ /dev/null @@ -1,1028 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "Objects out of ram(1) !!\n" -.aligned_text "Door numbering error %d!!\n" -.aligned_text "objGetScope: Unknown scope for object %d\n" -.aligned_text "ObjList (Part) Overflow %d!!!\n" -.aligned_text "ObjSetupObject(1) Memory fail!!\n" -.aligned_text "ObjSetupObject(2) Memory fail!!\n" -.aligned_text "ObjSetupObject(5) Memory fail!!\n" -.aligned_text "ObjSetupObject(6) Memory fail!!\n" -.aligned_text "ObjSetupObject(3) Memory fail!!\n" -.aligned_text "ObjList Overflow %d!!!\n" -.aligned_text "ObjSetupObject(4) Memory fail!!\n" - -glabel D_800E50D4 -.aligned_text "Error: Multiple checkpoint no: %d !!\n" -.aligned_text "ERROR Channel %d\n" -.aligned_text "RO error %d!!\n" -.aligned_text "ARGHHHHHHHHH\n" - -glabel D_800E5130 -.word 0x3F8B851F - -glabel D_800E5134 -.word 0x3F970A3D - -glabel D_800E5138 -.word 0x3F99999A - -glabel D_800E513C -.word 0x4019999A - -glabel D_800E5140 -.word 0x4099999A - -glabel D_800E5144 -.word 0x3D4CCCCD - -glabel D_800E5148 -.word 0x3DCCCCCD - -glabel D_800E514C -.word 0x3F2B851F - -glabel D_800E5150 -.word 0x3EA8F5C3 - -glabel D_800E5154 -.word 0x8000D974 -.word 0x8000D974 -.word 0x8000D974 -.word 0x8000D974 -.word 0x8000D974 -.word 0x8000D98C -.word 0x8000D974 -.word 0x8000D974 -.word 0x8000D974 - -glabel D_800E5178 -.word 0x3C23D70A - -glabel D_800E517C -.word 0x3C23D70A - -glabel D_800E5180 -.word 0x3FB33333 - -glabel D_800E5184 -.word 0x3F36C8B4 - -glabel D_800E5188 -.word 0x8000E104 -.word 0x8000E0E4 -.word 0x8000E0F4 -.word 0x8000E0F4 -.word 0x8000E0FC -.word 0x8000E104 -.word 0x8000E0FC -.word 0x8000E0EC -.word 0x8000E104 - -glabel D_800E51AC -.word 0x3FB33333 - -glabel D_800E51B0 -.word 0x3F36C8B4 - -glabel D_800E51B4 -.word 0x8000ECD8 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000ED98 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000ECF4 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000ED10 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000ED40 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000EDE0 -.word 0x8000ED54 - -glabel D_800E5250 -.word 0x80010374 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x80010400 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x80010400 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800104C0 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105A8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105D0 -.word 0x800105E4 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800104D8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800104AC -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105A8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x80010508 -.word 0x800105F8 -.word 0x80010374 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x8001047C -.word 0x8001047C -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x8001047C -.word 0x8001047C -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x800105F8 -.word 0x8001044C - -glabel D_800E5420 -.word 0x8001063C -.word 0x8001063C -.word 0x80010664 -.word 0x8001063C -.word 0x8001063C -.word 0x80010664 -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C -.word 0x80010664 -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C -.word 0x8001063C -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C -.word 0x8001063C -.word 0x8001063C -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C -.word 0x80010664 -.word 0x8001063C -.word 0x80010664 -.word 0x80010664 -.word 0x80010664 -.word 0x8001063C - -glabel D_800E5538 -.word 0x408F4000 - -glabel D_800E553C -.word 0x00000000 - -glabel D_800E5540 -.word 0x40A77000 - -glabel D_800E5544 -.word 0x00000000 - -glabel D_800E5548 -.word 0x407F4000 - -glabel D_800E554C -.word 0x00000000 - -glabel D_800E5550 -.word 0x3C23D70A - -glabel D_800E5554 -.word 0x3E4CCCCD - -glabel D_800E5558 -.word 0x3D4CCCCD - -glabel D_800E555C -.word 0x455AC000 - -glabel D_800E5560 -.word 0x4528C000 - -glabel D_800E5564 -.word 0x3F19999A - -glabel D_800E5568 -.word 0x3F933333 - -glabel D_800E556C -.word 0x3D4CCCCD - -glabel D_800E5570 -.word 0x3F733333 -.word 0x00000000 - -glabel D_800E5578 -.word 0x3FB99999 - -glabel D_800E557C -.word 0x9999999A - -glabel D_800E5580 -.word 0x3CA3D70A - -glabel D_800E5584 -.word 0x3F7AE148 - -glabel D_800E5588 -.word 0x80014B80 -.word 0x80014CCC -.word 0x80014E18 -.word 0x80015340 -.word 0x80015340 -.word 0x80015340 -.word 0x80015340 -.word 0x80015340 -.word 0x80014F64 -.word 0x800150B0 -.word 0x800151FC -.word 0x00000000 - -glabel D_800E55B8 -.word 0x3FD33333 - -glabel D_800E55BC -.word 0x33333333 - -glabel D_800E55C0 -.word 0x3FD33333 - -glabel D_800E55C4 -.word 0x33333333 - -glabel D_800E55C8 -.word 0x3FE99999 - -glabel D_800E55CC -.word 0x9999999A - -glabel D_800E55D0 -.word 0x3FB99999 - -glabel D_800E55D4 -.word 0x9999999A - -glabel D_800E55D8 -.word 0x3FB99999 - -glabel D_800E55DC -.word 0x9999999A - -glabel D_800E55E0 -.word 0x3FD33333 - -glabel D_800E55E4 -.word 0x33333333 - -glabel D_800E55E8 -.word 0x3FD33333 - -glabel D_800E55EC -.word 0x33333333 - -glabel D_800E55F0 -.word 0x3FB99999 - -glabel D_800E55F4 -.word 0x9999999A - -glabel D_800E55F8 -.word 0x3FD33333 - -glabel D_800E55FC -.word 0x33333333 - -glabel D_800E5600 -.word 0x3FB99999 - -glabel D_800E5604 -.word 0x9999999A - -glabel D_800E5608 -.word 0xBFB99999 - -glabel D_800E560C -.word 0x9999999A - -glabel D_800E5610 -.word 0xBFB99999 - -glabel D_800E5614 -.word 0x9999999A - -glabel D_800E5618 -.word 0x3FE69FBE - -glabel D_800E561C -.word 0x76C8B439 - -glabel D_800E5620 -.word 0xBFD33333 - -glabel D_800E5624 -.word 0x33333333 - -glabel D_800E5628 -.word 0x3FF4CCCC - -glabel D_800E562C -.word 0xCCCCCCCD - -glabel D_800E5630 -.word 0x407F4000 - -glabel D_800E5634 -.word 0x00000000 - -glabel D_800E5638 -.word 0xC69C4000 - -glabel D_800E563C -.word 0xC61C4000 - -glabel D_800E5640 -.word 0xC69C4000 - -glabel D_800E5644 -.word 0x47435000 - -glabel D_800E5648 -.word 0x3FF33333 - -glabel D_800E564C -.word 0x33333333 - -glabel D_800E5650 -.word 0x3C23D70A -.word 0x00000000 - -glabel D_800E5658 -.word 0x406FE000 - -glabel D_800E565C -.word 0x00000000 - -glabel D_800E5660 -.word 0x3FFEB852 -.word 0x00000000 - -glabel D_800E5668 -.word 0x3FB99999 - -glabel D_800E566C -.word 0x9999999A - -glabel D_800E5670 -.word 0x3FF33333 - -glabel D_800E5674 -.word 0x33333333 - -glabel D_800E5678 -.word 0x3C23D70A -.word 0x00000000 - -glabel D_800E5680 -.word 0x3FB99999 - -glabel D_800E5684 -.word 0x9999999A - -glabel D_800E5688 -.word 0x80023614 -.word 0x800238A8 -.word 0x80023808 -.word 0x80023650 -.word 0x800236DC -.word 0x800238A8 -.word 0x8002363C -.word 0x80023664 -.word 0x80023678 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023790 -.word 0x800238A8 -.word 0x80023628 -.word 0x800238A8 -.word 0x8002368C -.word 0x800236F0 -.word 0x800236DC -.word 0x80023678 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800236B4 -.word 0x800238A8 -.word 0x800236C8 -.word 0x800236A0 -.word 0x80023754 -.word 0x80023704 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023718 -.word 0x800238A8 -.word 0x8002372C -.word 0x800236A0 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023740 -.word 0x800238A8 -.word 0x80023830 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023790 -.word 0x80023790 -.word 0x800238A8 -.word 0x80023790 -.word 0x80023790 -.word 0x800236A0 -.word 0x80023790 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800237E0 -.word 0x80023754 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023790 -.word 0x800237A4 -.word 0x80023790 -.word 0x800238A8 -.word 0x8002386C -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023754 -.word 0x800238A8 -.word 0x80023768 -.word 0x80023790 -.word 0x80023790 -.word 0x800238A8 -.word 0x8002377C -.word 0x80023790 -.word 0x80023790 -.word 0x80023790 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023858 -.word 0x800238A8 -.word 0x80023790 -.word 0x80023790 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023790 -.word 0x80023790 -.word 0x80023790 -.word 0x80023790 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x800238A8 -.word 0x80023880 -.word 0x800238A8 -.word 0x80023628 -.word 0x800237B8 -.word 0x80023790 -.word 0x800238A8 -.word 0x80023790 -.word 0x80023894 -.word 0x800238A8 -.word 0x800237CC -.word 0x80023790 - -glabel D_800E5864 -.word 0x80023908 -.word 0x80023918 -.word 0x80023928 -.word 0x80023938 -.word 0x80023A78 -.word 0x80023948 -.word 0x80023978 -.word 0x80023988 -.word 0x80023998 -.word 0x800239B8 -.word 0x800239C8 -.word 0x800239D8 -.word 0x800239E8 -.word 0x80023A18 -.word 0x80023A38 -.word 0x80023A48 -.word 0x80023A58 -.word 0x80023A78 -.word 0x80023998 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023968 -.word 0x80023A68 -.word 0x80023E20 -.word 0x80023958 -.word 0x80023A88 -.word 0x800239A8 -.word 0x80023A98 -.word 0x80023AA8 -.word 0x800239F8 -.word 0x80023AB8 -.word 0x80023AC8 -.word 0x80023AD8 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023AE8 -.word 0x80023B08 -.word 0x80023B18 -.word 0x80023B28 -.word 0x80023B38 -.word 0x80023A08 -.word 0x80023E20 -.word 0x80023B48 -.word 0x80023B58 -.word 0x80023B68 -.word 0x80023B78 -.word 0x80023B88 -.word 0x80023E20 -.word 0x80023B98 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023BA8 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023BB8 -.word 0x80023E20 -.word 0x80023BC8 -.word 0x80023BD8 -.word 0x80023BE8 -.word 0x80023E20 -.word 0x80023BF8 -.word 0x80023C08 -.word 0x80023E20 -.word 0x80023C18 -.word 0x80023C28 -.word 0x80023C38 -.word 0x80023AF8 -.word 0x80023C48 -.word 0x80023C58 -.word 0x80023C68 -.word 0x80023CA8 -.word 0x80023C78 -.word 0x80023CD8 -.word 0x80023CE8 -.word 0x80023CF8 -.word 0x80023D08 -.word 0x80023D18 -.word 0x80023D28 -.word 0x80023D38 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023D48 -.word 0x80023D58 -.word 0x80023D68 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023D88 -.word 0x80023D78 -.word 0x80023D98 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023BC8 -.word 0x80023DA8 -.word 0x80023C78 -.word 0x80023C88 -.word 0x80023C98 -.word 0x80023DB8 -.word 0x80023DC8 -.word 0x80023DC8 -.word 0x80023C88 -.word 0x80023C98 -.word 0x80023C68 -.word 0x80023C78 -.word 0x80023DD8 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023DE8 -.word 0x80023DF8 -.word 0x80023E08 -.word 0x80023A28 -.word 0x80023CB8 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023E20 -.word 0x80023DE8 -.word 0x80023E18 -.word 0x80023CC8 - -glabel D_800E5A3C -.word 0x80023E5C -.word 0x80023E64 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023E6C -.word 0x80023F40 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023E74 -.word 0x80023F14 -.word 0x80023E7C -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023E84 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023E9C -.word 0x80023F40 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F14 -.word 0x80023EA4 -.word 0x80023EAC -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023EBC -.word 0x80023EC4 -.word 0x80023ECC -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023ED4 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023EDC -.word 0x80023F24 -.word 0x80023EEC -.word 0x80023F24 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023EF4 -.word 0x80023F14 -.word 0x80023EEC -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F24 -.word 0x80023F2C -.word 0x80023EE4 -.word 0x80023EAC -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023EB4 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023E8C -.word 0x80023F40 -.word 0x80023E8C -.word 0x80023F40 -.word 0x80023EFC -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023E84 -.word 0x80023F14 -.word 0x80023F14 -.word 0x80023EEC -.word 0x80023F0C -.word 0x80023F1C -.word 0x80023F40 -.word 0x80023EEC -.word 0x80023F40 -.word 0x80023EEC -.word 0x80023F40 -.word 0x80023EAC -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F04 -.word 0x80023F40 -.word 0x80023F14 -.word 0x80023F40 -.word 0x80023EFC -.word 0x80023E8C -.word 0x80023E8C -.word 0x80023F14 -.word 0x80023EFC -.word 0x80023EFC -.word 0x80023E94 -.word 0x80023E94 -.word 0x80023E94 -.word 0x80023E94 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F14 -.word 0x80023F34 -.word 0x80023EAC -.word 0x80023E7C -.word 0x80023F40 -.word 0x80023F40 -.word 0x80023F3C -.word 0x80023EEC -.word 0x80023F14 - -glabel D_800E5C0C -.word 0x80023FA4 -.word 0x80023FB8 -.word 0x80023FCC -.word 0x80024108 -.word 0x80023FE0 -.word 0x8002401C -.word 0x80024570 -.word 0x80024570 -.word 0x80024030 -.word 0x80024044 -.word 0x80024058 -.word 0x8002406C -.word 0x800240A8 -.word 0x800240BC -.word 0x800240CC -.word 0x800240E0 -.word 0x80024108 -.word 0x80024570 -.word 0x80024570 -.word 0x80024570 -.word 0x80024008 -.word 0x800240F4 -.word 0x80024570 -.word 0x80023FF4 -.word 0x8002411C -.word 0x80024570 -.word 0x80024130 -.word 0x80024144 -.word 0x80024080 -.word 0x80024158 -.word 0x8002416C -.word 0x80024570 -.word 0x80024570 -.word 0x80024570 -.word 0x80024180 -.word 0x800241A8 -.word 0x800241BC -.word 0x800241D0 -.word 0x800241E4 -.word 0x80024094 -.word 0x80024570 -.word 0x80024570 -.word 0x80024570 -.word 0x800241F8 -.word 0x8002420C -.word 0x80024220 -.word 0x80024570 -.word 0x80024570 -.word 0x80024234 -.word 0x8002425C -.word 0x80024270 -.word 0x80024284 -.word 0x80024298 -.word 0x800242AC -.word 0x800242C0 -.word 0x800242D4 -.word 0x800242E8 -.word 0x80024570 -.word 0x800242FC -.word 0x8002430C -.word 0x80024320 -.word 0x80024570 -.word 0x80024334 -.word 0x80024348 -.word 0x8002435C -.word 0x80024194 -.word 0x80024370 -.word 0x80024384 -.word 0x80024398 -.word 0x80024570 -.word 0x80024398 -.word 0x800243C0 -.word 0x800243D4 -.word 0x800243E8 -.word 0x800243FC -.word 0x80024410 -.word 0x80024424 -.word 0x80024438 -.word 0x8002444C -.word 0x80024234 -.word 0x80024460 -.word 0x80024570 -.word 0x80024474 -.word 0x80024234 -.word 0x80024234 -.word 0x80024570 -.word 0x80024488 -.word 0x80024570 -.word 0x8002449C -.word 0x80024570 -.word 0x80024570 -.word 0x800242D4 -.word 0x800244B0 -.word 0x80024570 -.word 0x800243AC -.word 0x800243AC -.word 0x800244C4 -.word 0x80024570 -.word 0x800244EC -.word 0x800243AC -.word 0x800243AC -.word 0x80024398 -.word 0x80024398 -.word 0x800244D8 -.word 0x80024570 -.word 0x80024570 -.word 0x80024500 -.word 0x80024514 -.word 0x80024488 -.word 0x80024528 -.word 0x80024570 -.word 0x8002453C -.word 0x80024570 -.word 0x80024550 -.word 0x80024500 -.word 0x80024564 -.word 0x80024570 -.word 0x80024248 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index 71c775ed..4322bf11 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -101,8 +101,309 @@ u16 D_800DC864 = 0x0028; /************ .rodata ************/ -extern f32 D_800E514C; -extern f32 D_800E5150; +const char D_800E4F60[] = "Objects out of ram(1) !!\n"; +const char D_800E4F7C[] = "Door numbering error %d!!\n"; +const char D_800E4F98[] = "objGetScope: Unknown scope for object %d\n"; +const char D_800E4FC4[] = "ObjList (Part) Overflow %d!!!\n"; +const char D_800E4FE4[] = "ObjSetupObject(1) Memory fail!!\n"; +const char D_800E5008[] = "ObjSetupObject(2) Memory fail!!\n"; +const char D_800E502C[] = "ObjSetupObject(5) Memory fail!!\n"; +const char D_800E5050[] = "ObjSetupObject(6) Memory fail!!\n"; +const char D_800E5074[] = "ObjSetupObject(3) Memory fail!!\n"; +const char D_800E5098[] = "ObjList Overflow %d!!!\n"; +const char D_800E50B0[] = "ObjSetupObject(4) Memory fail!!\n"; +const char D_800E50D4[] = "Error: Multiple checkpoint no: %d !!\n"; +const char D_800E50FC[] = "ERROR Channel %d\n"; +const char D_800E5110[] = "RO error %d!!\n"; +const char D_800E5120[] = "ARGHHHHHHHHH\n"; + +const FloatLiteral D_800E5130 = { 1.09f }; +const FloatLiteral D_800E5134 = { 1.18f }; +const FloatLiteral D_800E5138 = { 1.2f }; +const FloatLiteral D_800E513C = { 2.4f }; +const FloatLiteral D_800E5140 = { 4.8f }; +const FloatLiteral D_800E5144 = { 0.05f }; +const FloatLiteral D_800E5148 = { 0.1f }; +const FloatLiteral D_800E514C = { 0.67f }; +const FloatLiteral D_800E5150 = { 0.33f }; + +// Jump table in func_8000CC7C +const u32 D_800E5154[] = { + 0x8000D974, 0x8000D974, 0x8000D974, 0x8000D974, + 0x8000D974, 0x8000D98C, 0x8000D974, 0x8000D974, + 0x8000D974 +}; + +const FloatLiteral D_800E5178 = { 0.0099999999f }; +const FloatLiteral D_800E517C = { 0.0099999999f }; +const FloatLiteral D_800E5180 = { 1.4f }; +const FloatLiteral D_800E5184 = { 0.714f }; + +// Jump table in func_8000E0B0 +const u32 D_800E5188[] = { + 0x8000E104, 0x8000E0E4, 0x8000E0F4, 0x8000E0F4, + 0x8000E0FC, 0x8000E104, 0x8000E0FC, 0x8000E0EC, + 0x8000E104 +}; + +const FloatLiteral D_800E51AC = { 1.4f }; +const FloatLiteral D_800E51B0 = { 0.714f }; + +// Jump table in func_8000EA54 +const u32 D_800E51B4[] = { + 0x8000ECD8, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000ED98, + 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, + 0x8000ECF4, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000ED10, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000ED40, 0x8000EDE0, 0x8000EDE0, + 0x8000EDE0, 0x8000EDE0, 0x8000ED54 +}; + +// Jump table in func_800101AC +const u32 D_800E5250[] = { + 0x80010374, 0x800105F8, 0x800105F8, 0x800105F8, + 0x80010400, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x80010400, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800104C0, 0x800105F8, 0x800105F8, 0x800105A8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105D0, 0x800105E4, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800104D8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800104AC, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105A8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x80010508, 0x800105F8, + 0x80010374, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x8001047C, + 0x8001047C, 0x800105F8, 0x800105F8, 0x800105F8, + 0x8001047C, 0x8001047C, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, + 0x800105F8, 0x800105F8, 0x800105F8, 0x8001044C +}; + +// Jump table in func_800101AC +const u32 D_800E5420[] = { + 0x8001063C, 0x8001063C, 0x80010664, 0x8001063C, + 0x8001063C, 0x80010664, 0x8001063C, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x80010664, + 0x8001063C, 0x80010664, 0x8001063C, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x80010664, + 0x80010664, 0x80010664, 0x8001063C, 0x8001063C, + 0x80010664, 0x80010664, 0x8001063C, 0x8001063C, + 0x8001063C, 0x80010664, 0x80010664, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x80010664, + 0x80010664, 0x80010664, 0x8001063C, 0x8001063C, + 0x80010664, 0x80010664, 0x80010664, 0x8001063C, + 0x8001063C, 0x8001063C, 0x8001063C, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x80010664, + 0x80010664, 0x80010664, 0x80010664, 0x8001063C, + 0x80010664, 0x8001063C, 0x80010664, 0x80010664, + 0x80010664, 0x8001063C +}; + +const DoubleLiteral D_800E5538 = { 1000.0 }; +const DoubleLiteral D_800E5540 = { 3000.0 }; +const DoubleLiteral D_800E5548 = { 500.0 }; +const FloatLiteral D_800E5550 = { 0.01f }; +const FloatLiteral D_800E5554 = { 0.2f }; +const FloatLiteral D_800E5558 = { 0.05f }; +const FloatLiteral D_800E555C = { 3500.0f }; +const FloatLiteral D_800E5560 = { 2700.0f }; +const FloatLiteral D_800E5564 = { 0.6f }; +const FloatLiteral D_800E5568 = { 1.15f }; +const FloatLiteral D_800E556C = { 0.05f }; +const FloatLiteral D_800E5570 = { 0.95f }; +const DoubleLiteral D_800E5578 = { 0.1 }; +const FloatLiteral D_800E5580 = { 0.02f }; +const FloatLiteral D_800E5584 = { 0.98f }; + +// Jump table in func_80014B50 +const u32 D_800E5588[] = { + 0x80014B80, 0x80014CCC, 0x80014E18, 0x80015340, + 0x80015340, 0x80015340, 0x80015340, 0x80015340, + 0x80014F64, 0x800150B0, 0x800151FC +}; + +const DoubleLiteral D_800E55B8 = { 0.3 }; +const DoubleLiteral D_800E55C0 = { 0.3 }; +const DoubleLiteral D_800E55C8 = { 0.8 }; +const DoubleLiteral D_800E55D0 = { 0.1 }; +const DoubleLiteral D_800E55D8 = { 0.1 }; +const DoubleLiteral D_800E55E0 = { 0.3 }; +const DoubleLiteral D_800E55E8 = { 0.3 }; +const DoubleLiteral D_800E55F0 = { 0.1 }; +const DoubleLiteral D_800E55F8 = { 0.3 }; +const DoubleLiteral D_800E5600 = { 0.1 }; +const DoubleLiteral D_800E5608 = { -0.1 }; +const DoubleLiteral D_800E5610 = { -0.1 }; +const DoubleLiteral D_800E5618 = { 0.707 }; +const DoubleLiteral D_800E5620 = { -0.3 }; +const DoubleLiteral D_800E5628 = { 1.3 }; +const DoubleLiteral D_800E5630 = { 500.0 }; +const FloatLiteral D_800E5638 = { -20000.0f }; +const FloatLiteral D_800E563C = { -10000.0f }; +const FloatLiteral D_800E5644 = { -20000.0f }; +const FloatLiteral D_800E5648 = { 50000.0f }; +const DoubleLiteral D_800E564C = { 1.2 }; +const FloatLiteral D_800E5650 = { 0.01f }; +const DoubleLiteral D_800E5658 = { 255.0 }; +const FloatLiteral D_800E5660 = { 1.99f }; +const DoubleLiteral D_800E5668 = { 0.1 }; +const DoubleLiteral D_800E5670 = { 1.2 }; +const FloatLiteral D_800E5678 = { 0.01f }; +const DoubleLiteral D_800E5680 = { 0.1 }; + +// Jump table in func_800235DC +const u32 D_800E5688[] = { + 0x80023614, 0x800238A8, 0x80023808, 0x80023650, + 0x800236DC, 0x800238A8, 0x8002363C, 0x80023664, + 0x80023678, 0x800238A8, 0x800238A8, 0x80023790, + 0x800238A8, 0x80023628, 0x800238A8, 0x8002368C, + 0x800236F0, 0x800236DC, 0x80023678, 0x800238A8, + 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, + 0x800238A8, 0x800238A8, 0x800236B4, 0x800238A8, + 0x800236C8, 0x800236A0, 0x80023754, 0x80023704, + 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, + 0x800238A8, 0x80023718, 0x800238A8, 0x8002372C, + 0x800236A0, 0x800238A8, 0x800238A8, 0x800238A8, + 0x80023740, 0x800238A8, 0x80023830, 0x800238A8, + 0x800238A8, 0x80023790, 0x80023790, 0x800238A8, + 0x80023790, 0x80023790, 0x800236A0, 0x80023790, + 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, + 0x800237E0, 0x80023754, 0x800238A8, 0x800238A8, + 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, + 0x800238A8, 0x80023790, 0x800237A4, 0x80023790, + 0x800238A8, 0x8002386C, 0x800238A8, 0x800238A8, + 0x80023754, 0x800238A8, 0x80023768, 0x80023790, + 0x80023790, 0x800238A8, 0x8002377C, 0x80023790, + 0x80023790, 0x80023790, 0x800238A8, 0x800238A8, + 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, + 0x800238A8, 0x80023858, 0x800238A8, 0x80023790, + 0x80023790, 0x800238A8, 0x800238A8, 0x800238A8, + 0x80023790, 0x80023790, 0x80023790, 0x80023790, + 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, + 0x80023880, 0x800238A8, 0x80023628, 0x800237B8, + 0x80023790, 0x800238A8, 0x80023790, 0x80023894, + 0x800238A8, 0x800237CC, 0x80023790 +}; + +// Jump table in func_800238BC +const u32 D_800E5864[] = { + 0x80023908, 0x80023918, 0x80023928, 0x80023938, + 0x80023A78, 0x80023948, 0x80023978, 0x80023988, + 0x80023998, 0x800239B8, 0x800239C8, 0x800239D8, + 0x800239E8, 0x80023A18, 0x80023A38, 0x80023A48, + 0x80023A58, 0x80023A78, 0x80023998, 0x80023E20, + 0x80023E20, 0x80023968, 0x80023A68, 0x80023E20, + 0x80023958, 0x80023A88, 0x800239A8, 0x80023A98, + 0x80023AA8, 0x800239F8, 0x80023AB8, 0x80023AC8, + 0x80023AD8, 0x80023E20, 0x80023E20, 0x80023AE8, + 0x80023B08, 0x80023B18, 0x80023B28, 0x80023B38, + 0x80023A08, 0x80023E20, 0x80023B48, 0x80023B58, + 0x80023B68, 0x80023B78, 0x80023B88, 0x80023E20, + 0x80023B98, 0x80023E20, 0x80023E20, 0x80023BA8, + 0x80023E20, 0x80023E20, 0x80023BB8, 0x80023E20, + 0x80023BC8, 0x80023BD8, 0x80023BE8, 0x80023E20, + 0x80023BF8, 0x80023C08, 0x80023E20, 0x80023C18, + 0x80023C28, 0x80023C38, 0x80023AF8, 0x80023C48, + 0x80023C58, 0x80023C68, 0x80023CA8, 0x80023C78, + 0x80023CD8, 0x80023CE8, 0x80023CF8, 0x80023D08, + 0x80023D18, 0x80023D28, 0x80023D38, 0x80023E20, + 0x80023E20, 0x80023D48, 0x80023D58, 0x80023D68, + 0x80023E20, 0x80023E20, 0x80023E20, 0x80023D88, + 0x80023D78, 0x80023D98, 0x80023E20, 0x80023E20, + 0x80023BC8, 0x80023DA8, 0x80023C78, 0x80023C88, + 0x80023C98, 0x80023DB8, 0x80023DC8, 0x80023DC8, + 0x80023C88, 0x80023C98, 0x80023C68, 0x80023C78, + 0x80023DD8, 0x80023E20, 0x80023E20, 0x80023DE8, + 0x80023DF8, 0x80023E08, 0x80023A28, 0x80023CB8, + 0x80023E20, 0x80023E20, 0x80023E20, 0x80023DE8, + 0x80023E18, 0x80023CC8 +}; + +// Jump table in func_80023E30 +const u32 D_800E5A3C[] = { + 0x80023E5C, 0x80023E64, 0x80023F40, 0x80023F40, + 0x80023E6C, 0x80023F40, 0x80023F14, 0x80023F40, + 0x80023F40, 0x80023F40, 0x80023F40, 0x80023E74, + 0x80023F14, 0x80023E7C, 0x80023F40, 0x80023F40, + 0x80023E84, 0x80023F14, 0x80023F40, 0x80023F40, + 0x80023F40, 0x80023F40, 0x80023F40, 0x80023E9C, + 0x80023F40, 0x80023F14, 0x80023F40, 0x80023F40, + 0x80023F40, 0x80023F14, 0x80023EA4, 0x80023EAC, + 0x80023F40, 0x80023F40, 0x80023F40, 0x80023F14, + 0x80023F40, 0x80023EBC, 0x80023EC4, 0x80023ECC, + 0x80023F14, 0x80023F40, 0x80023F40, 0x80023F40, + 0x80023ED4, 0x80023F40, 0x80023F40, 0x80023EDC, + 0x80023F24, 0x80023EEC, 0x80023F24, 0x80023F14, + 0x80023F40, 0x80023EF4, 0x80023F14, 0x80023EEC, + 0x80023F14, 0x80023F40, 0x80023F40, 0x80023F40, + 0x80023F24, 0x80023F2C, 0x80023EE4, 0x80023EAC, + 0x80023F40, 0x80023F40, 0x80023EB4, 0x80023F14, + 0x80023F40, 0x80023E8C, 0x80023F40, 0x80023E8C, + 0x80023F40, 0x80023EFC, 0x80023F40, 0x80023F40, + 0x80023E84, 0x80023F14, 0x80023F14, 0x80023EEC, + 0x80023F0C, 0x80023F1C, 0x80023F40, 0x80023EEC, + 0x80023F40, 0x80023EEC, 0x80023F40, 0x80023EAC, + 0x80023F40, 0x80023F40, 0x80023F04, 0x80023F40, + 0x80023F14, 0x80023F40, 0x80023EFC, 0x80023E8C, + 0x80023E8C, 0x80023F14, 0x80023EFC, 0x80023EFC, + 0x80023E94, 0x80023E94, 0x80023E94, 0x80023E94, + 0x80023F40, 0x80023F40, 0x80023F40, 0x80023F14, + 0x80023F34, 0x80023EAC, 0x80023E7C, 0x80023F40, + 0x80023F40, 0x80023F3C, 0x80023EEC, 0x80023F14 +}; + +// Jump table in func_80023F48 +const u32 D_800E5C0C[] = { + 0x80023FA4, 0x80023FB8, 0x80023FCC, 0x80024108, + 0x80023FE0, 0x8002401C, 0x80024570, 0x80024570, + 0x80024030, 0x80024044, 0x80024058, 0x8002406C, + 0x800240A8, 0x800240BC, 0x800240CC, 0x800240E0, + 0x80024108, 0x80024570, 0x80024570, 0x80024570, + 0x80024008, 0x800240F4, 0x80024570, 0x80023FF4, + 0x8002411C, 0x80024570, 0x80024130, 0x80024144, + 0x80024080, 0x80024158, 0x8002416C, 0x80024570, + 0x80024570, 0x80024570, 0x80024180, 0x800241A8, + 0x800241BC, 0x800241D0, 0x800241E4, 0x80024094, + 0x80024570, 0x80024570, 0x80024570, 0x800241F8, + 0x8002420C, 0x80024220, 0x80024570, 0x80024570, + 0x80024234, 0x8002425C, 0x80024270, 0x80024284, + 0x80024298, 0x800242AC, 0x800242C0, 0x800242D4, + 0x800242E8, 0x80024570, 0x800242FC, 0x8002430C, + 0x80024320, 0x80024570, 0x80024334, 0x80024348, + 0x8002435C, 0x80024194, 0x80024370, 0x80024384, + 0x80024398, 0x80024570, 0x80024398, 0x800243C0, + 0x800243D4, 0x800243E8, 0x800243FC, 0x80024410, + 0x80024424, 0x80024438, 0x8002444C, 0x80024234, + 0x80024460, 0x80024570, 0x80024474, 0x80024234, + 0x80024234, 0x80024570, 0x80024488, 0x80024570, + 0x8002449C, 0x80024570, 0x80024570, 0x800242D4, + 0x800244B0, 0x80024570, 0x800243AC, 0x800243AC, + 0x800244C4, 0x80024570, 0x800244EC, 0x800243AC, + 0x800243AC, 0x80024398, 0x80024398, 0x800244D8, + 0x80024570, 0x80024570, 0x80024500, 0x80024514, + 0x80024488, 0x80024528, 0x80024570, 0x8002453C, + 0x80024570, 0x80024550, 0x80024500, 0x80024564, + 0x80024570, 0x80024248 +}; /*********************************/ @@ -304,7 +605,7 @@ void func_8000C2D8(u8 *arg0, s32 length); void func_8000BF8C(void) { s32 i; - func_8001D258(D_800E514C, D_800E5150, 0, -0x2000, 0); + func_8001D258(D_800E514C.floatLiteral, D_800E5150.floatLiteral, 0, -0x2000, 0); D_8011AE68 = (s32*)func_80070B78(0x15800, 0x200); particlePtrList = (Player **)func_80070C9C(0x320, 0xFFFF); D_8011AE6C = (s32*)func_80070C9C(0x50, 0xFFFF); From 9a7b8411948d69859ca661046349400189306948 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 21:18:37 -0500 Subject: [PATCH 03/66] Moved .rodata in unknown_0255E0 & unknown_031D30 from asm to C. --- asm/unknown_031D30.s | 22 ++++++ data/unknown_0255E0.rodata.s | 149 ----------------------------------- data/unknown_031D30.rodata.s | 36 --------- data/unknown_032760.rodata.s | 10 +++ src/unknown_0255E0.c | 42 ++++++++++ 5 files changed, 74 insertions(+), 185 deletions(-) delete mode 100644 data/unknown_0255E0.rodata.s delete mode 100644 data/unknown_031D30.rodata.s diff --git a/asm/unknown_031D30.s b/asm/unknown_031D30.s index 4f13b63e..33bfd6b9 100644 --- a/asm/unknown_031D30.s +++ b/asm/unknown_031D30.s @@ -8,6 +8,28 @@ .set noreorder # dont insert nops after branches .set gp=64 # 64-bit instructions are used +.section .text + .include "asm/unknown_031D30/func_80031130.s" .include "asm/unknown_031D30/func_800314DC.s" .include "asm/unknown_031D30/func_80031600.s" + +.section .rodata + +glabel D_800E5F60 +.float -0.1 + +glabel D_800E5F64 +.float -0.1 + +glabel D_800E5F68 +.float 0.707 + +glabel D_800E5F6C +.float 0.45 + +glabel D_800E5F70 +.float -0.1 + + + diff --git a/data/unknown_0255E0.rodata.s b/data/unknown_0255E0.rodata.s deleted file mode 100644 index 8113c88d..00000000 --- a/data/unknown_0255E0.rodata.s +++ /dev/null @@ -1,149 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E5DF0 -.aligned_text "TT CAM" - -.aligned_text "Solid Clipping x0=x1 Error!!!\n" -.aligned_text "TrackGetHeight() - Overflow!!!\n" - -glabel D_800E5E38 -.aligned_text "ERROR!! TrackMem overflow .. %d\n" - -.word 0x00000000 - -glabel D_800E5E60 -.word 0x406F4000 - -glabel D_800E5E64 -.word 0x00000000 - -glabel D_800E5E68 -.word 0xC072C000 - -glabel D_800E5E6C -.word 0x00000000 - -glabel D_800E5E70 -.word 0x4072C000 - -glabel D_800E5E74 -.word 0x00000000 - -glabel D_800E5E78 -.word 0x4072C000 - -glabel D_800E5E7C -.word 0x00000000 - -glabel D_800E5E80 -.word 0xC072C000 - -glabel D_800E5E84 -.word 0x00000000 - -glabel D_800E5E88 -.word 0xC072C000 - -glabel D_800E5E8C -.word 0x00000000 - -glabel D_800E5E90 -.word 0xBFB99999 - -glabel D_800E5E94 -.word 0x9999999A - -glabel D_800E5E98 -.word 0xBFB99999 - -glabel D_800E5E9C -.word 0x9999999A - -glabel D_800E5EA0 -.word 0x408F4000 - -glabel D_800E5EA4 -.word 0x00000000 - -glabel D_800E5EA8 -.word 0x408F4000 - -glabel D_800E5EAC -.word 0x00000000 - -glabel D_800E5EB0 -.word 0x3FE99999 - -glabel D_800E5EB4 -.word 0x9999999A - -glabel D_800E5EB8 -.word 0x406FE000 - -glabel D_800E5EBC -.word 0x00000000 - -glabel D_800E5EC0 -.word 0x8002AB40 -.word 0x8002AB40 -.word 0x8002AB54 -.word 0x8002AB40 -.word 0x8002AB40 -.word 0x8002AB54 -.word 0x8002AB40 -.word 0x8002AB54 -.word 0x8002AB2C -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB58 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB40 -.word 0x8002AB54 -.word 0x8002AB40 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB58 -.word 0x8002AB54 -.word 0x8002AB54 -.word 0x8002AB58 -.word 0x8002AB40 - -glabel D_800E5F40 -.word 0x3FC99999 - -glabel D_800E5F44 -.word 0x9999999A - -glabel D_800E5F48 -.word 0x3FB33333 - -glabel D_800E5F4C -.word 0x3F36C8B4 - -glabel D_800E5F50 -.word 0x3BA3D70A - -glabel D_800E5F54 -.word 0x3FB50481 - -glabel D_800E5F58 -.word 0x3BA3D70A - -glabel D_800E5F5C -.word 0x3F7D70A4 diff --git a/data/unknown_031D30.rodata.s b/data/unknown_031D30.rodata.s deleted file mode 100644 index 16850414..00000000 --- a/data/unknown_031D30.rodata.s +++ /dev/null @@ -1,36 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E5F60 -.word 0xBDCCCCCD - -glabel D_800E5F64 -.word 0xBDCCCCCD - -glabel D_800E5F68 -.word 0x3F34FDF4 - -glabel D_800E5F6C -.word 0x3EE66666 - -glabel D_800E5F70 -.word 0xBDCCCCCD -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 - -glabel D_800E5F80 -.word 0x80033A70 -.word 0x80033AA4 -.word 0x80033AE4 -.word 0x80033B48 -.word 0x80033BB4 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/data/unknown_032760.rodata.s b/data/unknown_032760.rodata.s index 807f8d77..fad48228 100644 --- a/data/unknown_032760.rodata.s +++ b/data/unknown_032760.rodata.s @@ -7,6 +7,16 @@ .section .rodata +glabel D_800E5F80 +.word 0x80033A70 +.word 0x80033AA4 +.word 0x80033AE4 +.word 0x80033B48 +.word 0x80033BB4 +.word 0x00000000 +.word 0x00000000 +.word 0x00000000 + glabel D_800E5FA0 .aligned_text "Illegal door no!!!\n" diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 20efb5c5..4695fa7d 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -124,6 +124,48 @@ s8 D_800DC92C[24] = { /*******************************/ +/************ .rodata ************/ + +const char D_800E5DF0[] = "TT CAM"; +const char D_800E5DF8[] = "Solid Clipping x0=x1 Error!!!\n"; +const char D_800E5E10[] = "TrackGetHeight() - Overflow!!!\n"; +const char D_800E5E38[] = "ERROR!! TrackMem overflow .. %d\n"; + +const DoubleLiteral D_800E5E60 = { 250.0 }; +const DoubleLiteral D_800E5E68 = { -300.0 }; +const DoubleLiteral D_800E5E70 = { 300.0 }; +const DoubleLiteral D_800E5E78 = { 300.0 }; +const DoubleLiteral D_800E5E80 = { -300.0 }; +const DoubleLiteral D_800E5E88 = { -300.0 }; +const DoubleLiteral D_800E5E90 = { -0.1 }; +const DoubleLiteral D_800E5E98 = { -0.1 }; +const DoubleLiteral D_800E5EA0 = { 1000.0 }; +const DoubleLiteral D_800E5EA8 = { 1000.0 }; +const DoubleLiteral D_800E5EB0 = { 0.8 }; +const DoubleLiteral D_800E5EB8 = { 255.0 }; + +// Jump table in func_8002A900 +const u32 D_800E5EC0[] = { + 0x8002AB40, 0x8002AB40, 0x8002AB54, 0x8002AB40, + 0x8002AB40, 0x8002AB54, 0x8002AB40, 0x8002AB54, + 0x8002AB2C, 0x8002AB54, 0x8002AB54, 0x8002AB54, + 0x8002AB58, 0x8002AB54, 0x8002AB54, 0x8002AB54, + 0x8002AB54, 0x8002AB54, 0x8002AB54, 0x8002AB54, + 0x8002AB40, 0x8002AB54, 0x8002AB40, 0x8002AB54, + 0x8002AB54, 0x8002AB54, 0x8002AB54, 0x8002AB58, + 0x8002AB54, 0x8002AB54, 0x8002AB58, 0x8002AB40 +}; + +const DoubleLiteral D_800E5F40 = { 0.2 }; +const FloatLiteral D_800E5F48 = { 1.4f }; +const FloatLiteral D_800E5F4C = { 0.714f }; +const FloatLiteral D_800E5F50 = { 0.005f }; +const FloatLiteral D_800E5F54 = { 1.4142f }; +const FloatLiteral D_800E5F58 = { 0.005f }; +const FloatLiteral D_800E5F5C = { 0.99f }; + +/*********************************/ + /************ .bss ************/ extern s32 D_8011D37C; From 47e6de7646d48823c53f6fa420c55c9be5103224 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 22:11:24 -0500 Subject: [PATCH 04/66] Moved .rodata in unknown_032760 from asm to C. --- data/unknown_032760.rodata.s | 379 ----------------------------------- src/unknown_032760.c | 120 +++++++++++ 2 files changed, 120 insertions(+), 379 deletions(-) delete mode 100644 data/unknown_032760.rodata.s diff --git a/data/unknown_032760.rodata.s b/data/unknown_032760.rodata.s deleted file mode 100644 index fad48228..00000000 --- a/data/unknown_032760.rodata.s +++ /dev/null @@ -1,379 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E5F80 -.word 0x80033A70 -.word 0x80033AA4 -.word 0x80033AE4 -.word 0x80033B48 -.word 0x80033BB4 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 - -glabel D_800E5FA0 -.aligned_text "Illegal door no!!!\n" - -glabel D_800E5FB4 -.aligned_text "Illegal door no!!!\n" - -glabel D_800E5FC8 -.aligned_text "Illegal door no!!!\n" - -.word 0x00000000 - -glabel D_800E5FE0 -.word 0x3FF33333 - -glabel D_800E5FE4 -.word 0x33333333 - -glabel D_800E5FE8 -.word 0x3FB99999 - -glabel D_800E5FEC -.word 0x9999999A - -glabel D_800E5FF0 -.word 0x3FECCCCC - -glabel D_800E5FF4 -.word 0xCCCCCCCD - -glabel D_800E5FF8 -.word 0x3FF33333 - -glabel D_800E5FFC -.word 0x33333333 - -glabel D_800E6000 -.word 0x3E4CCCCD - -glabel D_800E6004 -.word 0x3F1CAC08 - -glabel D_800E6008 -.word 0x3F0D4FDF -.word 0x00000000 - -glabel D_800E6010 -.word 0x3FF33333 - -glabel D_800E6014 -.word 0x33333333 - -glabel D_800E6018 -.word 0x3FEF5C28 - -glabel D_800E601C -.word 0xF5C28F5C - -glabel D_800E6020 -.word 0x3FEE6666 - -glabel D_800E6024 -.word 0x66666666 - -glabel D_800E6028 -.word 0x3FF33333 - -glabel D_800E602C -.word 0x33333333 - -glabel D_800E6030 -.word 0x4072C000 - -glabel D_800E6034 -.word 0x00000000 - -glabel D_800E6038 -.word 0x3FA99999 - -glabel D_800E603C -.word 0x9999999A - -glabel D_800E6040 -.word 0x3FA99999 - -glabel D_800E6044 -.word 0x9999999A - -glabel D_800E6048 -.word 0x3C23D70A -.word 0x00000000 - -glabel D_800E6050 -.word 0x3FF33333 - -glabel D_800E6054 -.word 0x33333333 - -glabel D_800E6058 -.word 0x3FF33333 - -glabel D_800E605C -.word 0x33333333 - -glabel D_800E6060 -.word 0x3FF33333 - -glabel D_800E6064 -.word 0x33333333 - -glabel D_800E6068 -.word 0x4072C000 - -glabel D_800E606C -.word 0x00000000 - -glabel D_800E6070 -.word 0x80039758 -.word 0x80039758 -.word 0x80039758 -.word 0x80039758 -.word 0x80039768 -.word 0x80039768 -.word 0x80039758 -.word 0x80039768 -.word 0x80039768 -.word 0x80039758 -.word 0x80039758 -.word 0x80039768 -.word 0x80039768 -.word 0x80039768 -.word 0x80039758 -.word 0x80039768 -.word 0x80039768 -.word 0x80039768 -.word 0x80039768 -.word 0x80039758 -.word 0x80039758 - -glabel D_800E60C4 -.word 0x800397BC -.word 0x80039978 -.word 0x80039AE0 -.word 0x80039BB8 -.word 0x80039DC4 -.word 0x80039ED8 -.word 0x80039FDC -.word 0x80039FDC -.word 0x8003A5AC -.word 0x8003A0CC -.word 0x8003A1E8 -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A268 -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A3FC -.word 0x8003A4F4 -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A5AC -.word 0x8003A574 -.word 0x00000000 - -glabel D_800E6140 -.word 0x40534000 - -glabel D_800E6144 -.word 0x00000000 - -glabel D_800E6148 -.word 0x3DCCCCCD -.word 0x00000000 - -glabel D_800E6150 -.word 0x3FF19999 - -glabel D_800E6154 -.word 0x9999999A - -glabel D_800E6158 -.word 0x40019999 - -glabel D_800E615C -.word 0x9999999A - -glabel D_800E6160 -.word 0x3FF33333 - -glabel D_800E6164 -.word 0x33333333 - -glabel D_800E6168 -.word 0x3FF33333 - -glabel D_800E616C -.word 0x33333333 - -glabel D_800E6170 -.word 0x40604000 - -glabel D_800E6174 -.word 0x00000000 - -glabel D_800E6178 -.word 0x3FF33333 - -glabel D_800E617C -.word 0x33333333 - -glabel D_800E6180 -.word 0x4745C100 -.word 0x00000000 - -glabel D_800E6188 -.word 0x3FF33333 - -glabel D_800E618C -.word 0x33333333 - -glabel D_800E6190 -.word 0x3FF33333 - -glabel D_800E6194 -.word 0x33333333 - -glabel D_800E6198 -.word 0x3FEE6666 - -glabel D_800E619C -.word 0x66666666 - -glabel D_800E61A0 -.word 0xC61C4000 -.word 0x00000000 - -glabel D_800E61A8 -.word 0x3F50624D - -glabel D_800E61AC -.word 0xD2F1A9FC - -glabel D_800E61B0 -.word 0x3A83126F -.word 0x00000000 - -glabel D_800E61B8 -.word 0x3FB99999 - -glabel D_800E61BC -.word 0x9999999A - -glabel D_800E61C0; -.word 0x8003E66C -.word 0x8003E66C -.word 0x8003E67C -.word 0x8003E67C -.word 0x8003E684 -.word 0x8003E684 -.word 0x8003E684 -.word 0x8003E684 -.word 0x8003E684 -.word 0x8003E684 -.word 0x8003E67C -.word 0x8003E67C - -glabel D_800E61F0 -.word 0x3FF33333 - -glabel D_800E61F4 -.word 0x33333333 - -glabel D_800E61F8 -.word 0x40C38800 - -glabel D_800E61FC -.word 0x00000000 - -glabel D_800E6200 -.word 0x3FF33333 - -glabel D_800E6204 -.word 0x33333333 - -glabel D_800E6208 -.word 0xC61C4000 - -glabel D_800E620C -.word 0x3F19999A - -glabel D_800E6210 -.word 0x3F19999A - -glabel D_800E6214 -.word 0x3D99999A - -glabel D_800E6218 -.word 0x3C23D70A - -glabel D_800E621C -.word 0x3DCCCCCD - -glabel D_800E6220 -.word 0x3FCCCCCD - -glabel D_800E6224 -.word 0x3FCCCCCD - -glabel D_800E6228; -.word 0x80040D30 -.word 0x80040E54 -.word 0x80040E54 -.word 0x800411E4 -.word 0x8004153C - -glabel D_800E623C -.word 0x46AFC800 - -glabel D_800E6240 -.word 0x3F99999A - -glabel D_800E6244 -.word 0x3FCCCCCD - -glabel D_800E6248 -.word 0x3FCCCCCD -.word 0x00000000 - -glabel D_800E6250 -.word 0x3FF33333 - -glabel D_800E6254 -.word 0x33333333 - -glabel D_800E6258 -.word 0x80042378 -.word 0x800426B8 -.word 0x80042898 -.word 0x800428E8 -.word 0x8004292C - -glabel D_800E626C -.word 0x3FAB851F - -glabel D_800E6270 -.word 0x3D4CCCCD - -glabel D_800E6274 -.word 0x3E19999A - -glabel D_800E6278 -.word 0x3E19999A -.word 0x00000000 diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 8b09eb9b..2b9d05b3 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -108,6 +108,126 @@ u16 D_800DCB28[20] = { /*******************************/ +/************ .rodata ************/ + +// Jump table in func_80033A14 +const u32 D_800E5F80[] = { + 0x80033A70, 0x80033AA4, 0x80033AE4, 0x80033B48, + 0x80033BB4 +}; + +// Not sure if these are actually strings. Might just be padding. +const char D_800E5F94[] = ""; +const char D_800E5F98[] = ""; +const char D_800E5F9C[] = ""; + +const char D_800E5FA0[] = "Illegal door no!!!\n"; +const char D_800E5FB4[] = "Illegal door no!!!\n"; +const char D_800E5FC8[] = "Illegal door no!!!\n"; + +const DoubleLiteral D_800E5FE0 = { 1.2 }; +const DoubleLiteral D_800E5FE8 = { 0.1 }; +const DoubleLiteral D_800E5FF0 = { 0.9 }; +const DoubleLiteral D_800E5FF8 = { 1.2 }; +const FloatLiteral D_800E6000 = { 0.2f }; +const FloatLiteral D_800E6004 = { 0.612f }; +const FloatLiteral D_800E6008 = { 0.552f }; +const DoubleLiteral D_800E6010 = { 1.2 }; +const DoubleLiteral D_800E6018 = { 0.98 }; +const DoubleLiteral D_800E6020 = { 0.95 }; +const DoubleLiteral D_800E6028 = { 1.2 }; +const DoubleLiteral D_800E6030 = { 300.0 }; +const DoubleLiteral D_800E6038 = { 0.05 }; +const DoubleLiteral D_800E6040 = { 0.05 }; +const FloatLiteral D_800E6048 = { 0.01f }; +const DoubleLiteral D_800E6050 = { 1.2 }; +const DoubleLiteral D_800E6058 = { 1.2 }; +const DoubleLiteral D_800E6060 = { 1.2 }; +const DoubleLiteral D_800E6068 = { 300.0 }; + +// Jump table in func_80039330 +const u32 D_800E6070[] = { + 0x80039758, 0x80039758, 0x80039758, 0x80039758, + 0x80039768, 0x80039768, 0x80039758, 0x80039768, + 0x80039768, 0x80039758, 0x80039758, 0x80039768, + 0x80039768, 0x80039768, 0x80039758, 0x80039768, + 0x80039768, 0x80039768, 0x80039768, 0x80039758, + 0x80039758 +}; + +// Jump table in func_80039330 +const u32 D_800E60C4[] = { + 0x800397BC, 0x80039978, 0x80039AE0, 0x80039BB8, + 0x80039DC4, 0x80039ED8, 0x80039FDC, 0x80039FDC, + 0x8003A5AC, 0x8003A0CC, 0x8003A1E8, 0x8003A5AC, + 0x8003A5AC, 0x8003A5AC, 0x8003A268, 0x8003A5AC, + 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, 0x8003A3FC, + 0x8003A4F4, 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, + 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, + 0x8003A5AC, 0x8003A574 +}; + +const DoubleLiteral D_800E6140 = { 77.0 }; +const FloatLiteral D_800E6148 = { 0.1f }; +const DoubleLiteral D_800E6150 = { 1.1 }; +const DoubleLiteral D_800E6158 = { 2.2 }; +const DoubleLiteral D_800E6160 = { 1.2 }; +const DoubleLiteral D_800E6168 = { 1.2 }; +const DoubleLiteral D_800E6170 = { 130.0 }; +const DoubleLiteral D_800E6178 = { 1.2 }; +const FloatLiteral D_800E6180 = { 50625.0f }; +const DoubleLiteral D_800E6188 = { 1.2 }; +const DoubleLiteral D_800E6190 = { 1.2 }; +const DoubleLiteral D_800E6198 = { 0.95 }; +const FloatLiteral D_800E61A0 = { -10000.0f }; +const DoubleLiteral D_800E61A8 = { 0.001 }; +const FloatLiteral D_800E61B0 = { 0.001f }; +const DoubleLiteral D_800E61B8 = { 0.1 }; + +// Jump table in func_8003E630 +const u32 D_800E61C0[] = { + 0x8003E66C, 0x8003E66C, 0x8003E67C, 0x8003E67C, + 0x8003E684, 0x8003E684, 0x8003E684, 0x8003E684, + 0x8003E684, 0x8003E684, 0x8003E67C, 0x8003E67C +}; + +const DoubleLiteral D_800E61F0 = { 1.2 }; +const DoubleLiteral D_800E61F8 = { 10000.0 }; +const DoubleLiteral D_800E6200 = { 1.2 }; +const FloatLiteral D_800E6208 = { -10000.0f }; +const FloatLiteral D_800E620C = { 0.6f }; +const FloatLiteral D_800E6210 = { 0.6f }; +const FloatLiteral D_800E6214 = { 0.075f }; +const FloatLiteral D_800E6218 = { 0.01f }; +const FloatLiteral D_800E621C = { 0.1f }; +const FloatLiteral D_800E6220 = { 1.6f }; +const FloatLiteral D_800E6224 = { 1.6f }; + +// Jump table in func_80040C54 +const u32 D_800E6228[] = { + 0x80040D30, 0x80040E54, 0x80040E54, 0x800411E4, + 0x8004153C +}; + +const FloatLiteral D_800E623C = { 22500.0f }; +const FloatLiteral D_800E6240 = { 1.2f }; +const FloatLiteral D_800E6244 = { 1.6f }; +const FloatLiteral D_800E6248 = { 1.6f }; +const DoubleLiteral D_800E6250 = { 1.2 }; + +// Jump table in func_800422F0 +const u32 D_800E6258[] = { + 0x80042378, 0x800426B8, 0x80042898, 0x800428E8, + 0x8004292C +}; + +const FloatLiteral D_800E626C = { 1.34f }; +const FloatLiteral D_800E6270 = { 0.05f }; +const FloatLiteral D_800E6274 = { 0.15f }; +const FloatLiteral D_800E6278 = { 0.15f }; + +/*********************************/ + /************ .bss ************/ extern f32 D_8011D4D0; From db78c062303b3e999ff81a82fceae57d24331803 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 22:14:53 -0500 Subject: [PATCH 05/66] Moved .rodata in unknown_080240 from asm to C. --- data/unknown_080240.rodata.s | 13 ------------- src/unknown_080240.c | 4 +--- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 data/unknown_080240.rodata.s diff --git a/data/unknown_080240.rodata.s b/data/unknown_080240.rodata.s deleted file mode 100644 index e29848b2..00000000 --- a/data/unknown_080240.rodata.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E7C90 -.aligned_text "SCREEN: No out of range!!\n" - -.word 0x00000000 diff --git a/src/unknown_080240.c b/src/unknown_080240.c index c9262c71..510b4b4a 100644 --- a/src/unknown_080240.c +++ b/src/unknown_080240.c @@ -15,8 +15,6 @@ Gfx D_800DF440[] = { /*******************************/ -extern s32 D_800E7C90; - u32 func_8007F640(s32 arg0) { u32 someAddr; s32 count, start, size; @@ -37,7 +35,7 @@ u32 func_8007F640(s32 arg0) { return 0x80100000; } else { if (arg0 < 0 || arg0 >= count) { - func_800C9D54(&D_800E7C90); + func_800C9D54("SCREEN: No out of range!!\n"); arg0 = 0; } From b99479f17fcda9fc6c3147cc9647afc16a9c8856 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 22:17:54 -0500 Subject: [PATCH 06/66] Moved .rodata in unknown_065D30 from asm to C. --- data/unknown_065D30.rodata.s | 16 ---------------- src/unknown_065D30.c | 7 +++++++ 2 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 data/unknown_065D30.rodata.s diff --git a/data/unknown_065D30.rodata.s b/data/unknown_065D30.rodata.s deleted file mode 100644 index 8039fb69..00000000 --- a/data/unknown_065D30.rodata.s +++ /dev/null @@ -1,16 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6EC0 -.word 0x412E8480 - -glabel D_800E6EC4 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_065D30.c b/src/unknown_065D30.c index 7d56eca1..2d897500 100644 --- a/src/unknown_065D30.c +++ b/src/unknown_065D30.c @@ -4,6 +4,13 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +// In __timeToSamplesNoRound +const DoubleLiteral D_800E6EC0 = { 1000000.0 }; + +/*********************************/ + GLOBAL_ASM("asm/non_matchings/unknown_065D30/alSynNew.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/alAudioFrame.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/__allocParam.s") From 6ed98a11a5b1a1f151cfb4104ec32ed9a706c37b Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 22:20:38 -0500 Subject: [PATCH 07/66] Moved .rodata in unknown_0CA730 from asm to C. --- data/unknown_0CA730.rodata.s | 16 ---------------- lib/src/unknown_0CA730.c | 8 ++++++++ 2 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 data/unknown_0CA730.rodata.s diff --git a/data/unknown_0CA730.rodata.s b/data/unknown_0CA730.rodata.s deleted file mode 100644 index 07e5356a..00000000 --- a/data/unknown_0CA730.rodata.s +++ /dev/null @@ -1,16 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E9550 -.word 0x80000000 -.word 0x00000000 - -glabel D_800E9558 -.word 0x80000000 -.word 0x00000000 diff --git a/lib/src/unknown_0CA730.c b/lib/src/unknown_0CA730.c index 1d48aaaa..8a7aee72 100644 --- a/lib/src/unknown_0CA730.c +++ b/lib/src/unknown_0CA730.c @@ -4,6 +4,14 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +// In __f_to_ll +const DoubleLiteral D_800E9550 = { -0.0 }; +const DoubleLiteral D_800E9558 = { -0.0 }; + +/*********************************/ + GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA730/__d_to_ll.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA730/__ll_to_f.s") From 12d379c2070902d7db11181a7b933e4aad76cd62 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 29 May 2021 22:31:14 -0500 Subject: [PATCH 08/66] Moved .rodata in unknown_05F0C0, unknown_0667D0, and unknown_0CA530 from asm to C. --- data/unknown_05F0C0.rodata.s | 20 -------------------- data/unknown_0667D0.rodata.s | 14 -------------- data/unknown_0CA530.rodata.s | 24 ------------------------ lib/src/unknown_0CA530.c | 9 +++++++++ src/unknown_05F0C0.c | 8 ++++++++ src/unknown_0667D0.c | 8 ++++++++ 6 files changed, 25 insertions(+), 58 deletions(-) delete mode 100644 data/unknown_05F0C0.rodata.s delete mode 100644 data/unknown_0667D0.rodata.s delete mode 100644 data/unknown_0CA530.rodata.s diff --git a/data/unknown_05F0C0.rodata.s b/data/unknown_05F0C0.rodata.s deleted file mode 100644 index 250d8cd2..00000000 --- a/data/unknown_05F0C0.rodata.s +++ /dev/null @@ -1,20 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6AA0 -.word 0x3FD33333 - -glabel D_800E6AA4 -.word 0x33333333 - -glabel D_800E6AA8 -.word 0x4085E000 - -glabel D_800E6AAC -.word 0x00000000 diff --git a/data/unknown_0667D0.rodata.s b/data/unknown_0667D0.rodata.s deleted file mode 100644 index 53fb67c7..00000000 --- a/data/unknown_0667D0.rodata.s +++ /dev/null @@ -1,14 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6ED0 -.aligned_text "WARNING: Stack overflow/underflow!!!\n" - -.word 0x00000000 -.word 0x00000000 diff --git a/data/unknown_0CA530.rodata.s b/data/unknown_0CA530.rodata.s deleted file mode 100644 index 989b95d2..00000000 --- a/data/unknown_0CA530.rodata.s +++ /dev/null @@ -1,24 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E94B0 -.word 0x412E8480 -.word 0x00000000 - -glabel D_800E94B8 -.word 0x412E8480 -.word 0x00000000 - -glabel D_800E94C0 -.word 0x3F8012EF - -glabel D_800E94C4 -.word 0x3F7FDA28 -.word 0x00000000 -.word 0x00000000 diff --git a/lib/src/unknown_0CA530.c b/lib/src/unknown_0CA530.c index 0c6bbb03..839d1f1b 100644 --- a/lib/src/unknown_0CA530.c +++ b/lib/src/unknown_0CA530.c @@ -4,6 +4,15 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +const DoubleLiteral D_800E94B0 = { 1000000.0 }; +const DoubleLiteral D_800E94B8 = { 1000000.0 }; +const FloatLiteral D_800E94C0 = { 1.0005778075f }; +const FloatLiteral D_800E94C4 = { 0.999422551f }; + +/*********************************/ + GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/alSynFreeVoice.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/osSetIntMask.s") diff --git a/src/unknown_05F0C0.c b/src/unknown_05F0C0.c index 09ce122c..1e3f3db7 100644 --- a/src/unknown_05F0C0.c +++ b/src/unknown_05F0C0.c @@ -15,4 +15,12 @@ s16 D_800DCE40[16] = { /*******************************/ +/************ .rodata ************/ + +// In func_8005E4C0 +const DoubleLiteral D_800E6AA0 = { 0.3 }; +const DoubleLiteral D_800E6AA8 = { 700.0 }; + +/*********************************/ + GLOBAL_ASM("asm/non_matchings/unknown_05F0C0/func_8005E4C0.s") diff --git a/src/unknown_0667D0.c b/src/unknown_0667D0.c index bc589714..799b38e4 100644 --- a/src/unknown_0667D0.c +++ b/src/unknown_0667D0.c @@ -12,6 +12,14 @@ s16 D_800DD050 = 0; extern s32* D_80065D98; +/************ .rodata ************/ + +// In func_80065E30 +const char D_800E6ED0[] = "WARNING: Stack overflow/underflow!!!\n"; + +/*********************************/ + + /************ .bss ************/ extern s32* D_8011D750; From a6d38d8aa7c135d21ef186853fdaebe9d90a806c Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 14:26:39 -0500 Subject: [PATCH 09/66] Moved .rodata in unknown_05DCD0 & unknown_05CEF0 from asm to C. --- data/unknown_05CEF0.rodata.s | 32 -------------- data/unknown_05DCD0.rodata.s | 82 ------------------------------------ src/unknown_05CEF0.c | 9 ++++ src/unknown_05DCD0.c | 23 ++++++++++ 4 files changed, 32 insertions(+), 114 deletions(-) delete mode 100644 data/unknown_05CEF0.rodata.s delete mode 100644 data/unknown_05DCD0.rodata.s diff --git a/data/unknown_05CEF0.rodata.s b/data/unknown_05CEF0.rodata.s deleted file mode 100644 index eb3a3cd2..00000000 --- a/data/unknown_05CEF0.rodata.s +++ /dev/null @@ -1,32 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6A10 -.word 0x3FD33333 - -glabel D_800E6A14 -.word 0x33333333 - -glabel D_800E6A18 -.word 0xBFB99999 - -glabel D_800E6A1C -.word 0x9999999A - -glabel D_800E6A20 -.word 0x3FB99999 - -glabel D_800E6A24 -.word 0x9999999A - -glabel D_800E6A28 -.word 0x4085E000 - -glabel D_800E6A2C -.word 0x00000000 diff --git a/data/unknown_05DCD0.rodata.s b/data/unknown_05DCD0.rodata.s deleted file mode 100644 index 838ae7dc..00000000 --- a/data/unknown_05DCD0.rodata.s +++ /dev/null @@ -1,82 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6A30 -.word 0x3FD33333 - -glabel D_800E6A34 -.word 0x33333333 - -glabel D_800E6A38 -.word 0xBFB99999 - -glabel D_800E6A3C -.word 0x9999999A - -glabel D_800E6A40 -.word 0x3FB99999 - -glabel D_800E6A44 -.word 0x9999999A - -glabel D_800E6A48 -.word 0x4085E000 - -glabel D_800E6A4C -.word 0x00000000 - -glabel D_800E6A50 -.word 0x3FD33333 - -glabel D_800E6A54 -.word 0x33333333 - -glabel D_800E6A58 -.word 0xBFD33333 - -glabel D_800E6A5C -.word 0x33333333 - -glabel D_800E6A60 -.word 0x3FD147AE - -glabel D_800E6A64 -.word 0x147AE148 - -glabel D_800E6A68 -.word 0x3FDCCCCC - -glabel D_800E6A6C -.word 0xCCCCCCCD - -glabel D_800E6A70 -.word 0x8005DBEC -.word 0x8005DC10 -.word 0x8005DC48 -.word 0x8005DC64 -.word 0x8005DCBC -.word 0x8005DCE8 - -glabel D_800E6A88 -.word 0xBFB99999 - -glabel D_800E6A8C -.word 0x9999999A - -glabel D_800E6A90 -.word 0x3FB99999 - -glabel D_800E6A94 -.word 0x9999999A - -glabel D_800E6A98 -.word 0x4085E000 - -glabel D_800E6A9C -.word 0x00000000 diff --git a/src/unknown_05CEF0.c b/src/unknown_05CEF0.c index d9f998b9..71f76806 100644 --- a/src/unknown_05CEF0.c +++ b/src/unknown_05CEF0.c @@ -15,6 +15,15 @@ s16 D_800DCDE0[16] = { /*******************************/ +/************ .rodata ************/ + +const DoubleLiteral D_800E6A10 = { 0.3 }; +const DoubleLiteral D_800E6A18 = { -0.1 }; +const DoubleLiteral D_800E6A20 = { 0.1 }; +const DoubleLiteral D_800E6A28 = { 700.0 }; + +/*********************************/ + GLOBAL_ASM("asm/non_matchings/unknown_05CEF0/func_8005C2F0.s") GLOBAL_ASM("asm/non_matchings/unknown_05CEF0/func_8005C364.s") GLOBAL_ASM("asm/non_matchings/unknown_05CEF0/func_8005CA78.s") diff --git a/src/unknown_05DCD0.c b/src/unknown_05DCD0.c index 64c60118..5836dd7f 100644 --- a/src/unknown_05DCD0.c +++ b/src/unknown_05DCD0.c @@ -22,6 +22,29 @@ s16 D_800DCE20[16] = { /*******************************/ +/************ .rodata ************/ + +const DoubleLiteral D_800E6A30 = { 0.3 }; +const DoubleLiteral D_800E6A38 = { -0.1 }; +const DoubleLiteral D_800E6A40 = { 0.1 }; +const DoubleLiteral D_800E6A48 = { 700.0 }; +const DoubleLiteral D_800E6A50 = { 0.3 }; +const DoubleLiteral D_800E6A58 = { -0.3 }; +const DoubleLiteral D_800E6A60 = { 0.27 }; +const DoubleLiteral D_800E6A68 = { 0.45 }; + +// Jump table in func_8005D820 +const u32 D_800E6A70[] = { + 0x8005DBEC, 0x8005DC10, 0x8005DC48, 0x8005DC64, + 0x8005DCBC, 0x8005DCE8 +}; + +const DoubleLiteral D_800E6A88 = { -0.1 }; +const DoubleLiteral D_800E6A90 = { 0.1 }; +const DoubleLiteral D_800E6A98 = { 700.0 }; + +/*********************************/ + GLOBAL_ASM("asm/non_matchings/unknown_05DCD0/func_8005D0D0.s") GLOBAL_ASM("asm/non_matchings/unknown_05DCD0/func_8005D820.s") GLOBAL_ASM("asm/non_matchings/unknown_05DCD0/func_8005E204.s") From ed6db75b4837a2aaf8e6d28a352c091b0523244c Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 14:36:36 -0500 Subject: [PATCH 10/66] Moved .rodata in unknown_079F50 from asm to C. --- data/unknown_079F50.rodata.s | 41 ------------------------------------ src/unknown_079F50.c | 32 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 41 deletions(-) delete mode 100644 data/unknown_079F50.rodata.s diff --git a/data/unknown_079F50.rodata.s b/data/unknown_079F50.rodata.s deleted file mode 100644 index d7828698..00000000 --- a/data/unknown_079F50.rodata.s +++ /dev/null @@ -1,41 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "(Audio task)" -.aligned_text "(Game task)" -.aligned_text "(DI task)\n" -.aligned_text "(DI benchmark test)\n" -.aligned_text "(Unknown task type %d)\n" -.aligned_text "\nRCP TASK INFO\n" -.aligned_text "-------------\n" -.aligned_text "\ttype\t\t= %u\n" -.aligned_text "\tflags\t\t= %u\n" -.aligned_text "\tucode_boot\t\t= %p\n" -.aligned_text "\tucode_boot_size\t\t= %u\n" -.aligned_text "\tucode\t\t= %p\n" -.aligned_text "\tucode_size\t\t= %u\n" -.aligned_text "\tucode_data\t\t= %p\n" -.aligned_text "\tucode_data_size\t\t= %u\n" -.aligned_text "\toutput_buff\t\t= %p\n" -.aligned_text "\toutput_buff_size\t\t= %u\n" -.aligned_text "\tdata_ptr\t\t= %p\n" -.aligned_text "\tdata_size\t\t= %u\n" - -glabel D_800E796C -.word 0x48E4E1C0 - -glabel D_800E7970 -.word 0x8007A2A4 -.word 0x8007A248 -.word 0x8007A1BC -.word 0x8007A2A4 -.word 0x8007A2A4 -.word 0x8007A248 -.word 0x8007A248 -.word 0x00000000 diff --git a/src/unknown_079F50.c b/src/unknown_079F50.c index 30663b6f..ae78025d 100644 --- a/src/unknown_079F50.c +++ b/src/unknown_079F50.c @@ -83,6 +83,38 @@ s32 D_800DE764 = 0; // Currently unknown, might be a different type. /*******************************/ +/************ .rodata ************/ + +const char D_800E7800[] = "(Audio task)"; +const char D_800E7810[] = "(Game task)"; +const char D_800E781C[] = "(DI task)\n"; +const char D_800E7828[] = "(DI benchmark test)\n"; +const char D_800E7840[] = "(Unknown task type %d)\n"; +const char D_800E7858[] = "\nRCP TASK INFO\n"; +const char D_800E7868[] = "-------------\n"; +const char D_800E7878[] = "\ttype\t\t= %u\n"; +const char D_800E7888[] = "\tflags\t\t= %u\n"; +const char D_800E7898[] = "\tucode_boot\t\t= %p\n"; +const char D_800E78AC[] = "\tucode_boot_size\t\t= %u\n"; +const char D_800E78C4[] = "\tucode\t\t= %p\n"; +const char D_800E78D4[] = "\tucode_size\t\t= %u\n"; +const char D_800E78E8[] = "\tucode_data\t\t= %p\n"; +const char D_800E78FC[] = "\tucode_data_size\t\t= %u\n"; +const char D_800E7914[] = "\toutput_buff\t\t= %p\n"; +const char D_800E7928[] = "\toutput_buff_size\t\t= %u\n"; +const char D_800E7944[] = "\tdata_ptr\t\t= %p\n"; +const char D_800E7958[] = "\tdata_size\t\t= %u\n"; + +const FloatLiteral D_800E796C = { 468750.0f }; + +// Jump table in __scSchedule +const u32 D_800E7970[] = { + 0x8007A2A4, 0x8007A248, 0x8007A1BC, 0x8007A2A4, + 0x8007A2A4, 0x8007A248, 0x8007A248 +}; + +/*********************************/ + extern OSViMode D_800E3900[];//osViModeTable; extern s32 D_80126120; From 214d0923a4074cb66d9ebf13095f29c555e29f0a Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 14:49:29 -0500 Subject: [PATCH 11/66] Moved .rodata in unknown_05F690 from asm to C. --- data/unknown_05F690.rodata.s | 74 ------------------------------------ src/unknown_05F690.c | 26 +++++++++++++ 2 files changed, 26 insertions(+), 74 deletions(-) delete mode 100644 data/unknown_05F690.rodata.s diff --git a/data/unknown_05F690.rodata.s b/data/unknown_05F690.rodata.s deleted file mode 100644 index be4ca171..00000000 --- a/data/unknown_05F690.rodata.s +++ /dev/null @@ -1,74 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6AB0 -.word 0x3FD33333 - -glabel D_800E6AB4 -.word 0x33333333 - -glabel D_800E6AB8 -.word 0xBFD33333 - -glabel D_800E6ABC -.word 0x33333333 - -glabel D_800E6AC0 -.word 0x3FD99999 - -glabel D_800E6AC4 -.word 0x9999999A - -glabel D_800E6AC8 -.word 0x3FDCCCCC - -glabel D_800E6ACC -.word 0xCCCCCCCD - -glabel D_800E6AD0 -.word 0x8005EE9C -.word 0x8005EEC0 -.word 0x8005EEF8 -.word 0x8005EF14 -.word 0x8005EF6C -.word 0x8005EF98 - -glabel D_800E6AE8 -.word 0xBFB99999 - -glabel D_800E6AEC -.word 0x9999999A - -glabel D_800E6AF0 -.word 0x3FB99999 - -glabel D_800E6AF4 -.word 0x9999999A -.word 0x00000000 -.word 0x00000000 - -glabel D_800E6B00 -.word 0x3FD33333 - -glabel D_800E6B04 -.word 0x33333333 - -glabel D_800E6B08 -.word 0xBFD33333 - -glabel D_800E6B0C -.word 0x33333333 - -glabel D_800E6B10 -.word 0x3FD99999 - -glabel D_800E6B14 -.word 0x9999999A -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_05F690.c b/src/unknown_05F690.c index 5d67e307..a01b4021 100644 --- a/src/unknown_05F690.c +++ b/src/unknown_05F690.c @@ -26,6 +26,32 @@ s32 D_800DCEA4 = 1980; /*******************************/ +/************ .rodata ************/ + +const DoubleLiteral D_800E6AB0 = { 0.3 }; +const DoubleLiteral D_800E6AB8 = { -0.3 }; +const DoubleLiteral D_800E6AC0 = { 0.4 }; +const DoubleLiteral D_800E6AC8 = { 0.45 }; + +// Jump table in func_8005EA90 +const u32 D_800E6AD0[] = { + 0x8005EE9C, 0x8005EEC0, 0x8005EEF8, 0x8005EF14, + 0x8005EF6C, 0x8005EF98 +}; + +const DoubleLiteral D_800E6AE8 = { -0.1 }; +const DoubleLiteral D_800E6AF0 = { 0.1 }; + +// This is probably just file boundary padding. +const DoubleLiteral D_800E6AF8 = { 0.0 }; + +const DoubleLiteral D_800E6B00 = { 0.3 }; +const DoubleLiteral D_800E6B08 = { -0.3 }; +const DoubleLiteral D_800E6B10 = { 0.4 }; + + +/*********************************/ + GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005EA90.s") GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F310.s") GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F850.s") From 0907b49b92975142f1d8d177e96a20f2e519d80d Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 15:01:34 -0500 Subject: [PATCH 12/66] Moved .rodata in unknown_07AF10 from asm to C. --- data/unknown_07AF10.rodata.s | 40 -------------------------- src/unknown_07AF10.c | 55 +++++++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 data/unknown_07AF10.rodata.s diff --git a/data/unknown_07AF10.rodata.s b/data/unknown_07AF10.rodata.s deleted file mode 100644 index 5b2b47ef..00000000 --- a/data/unknown_07AF10.rodata.s +++ /dev/null @@ -1,40 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "320 by 240 Point sampled, Non interlaced.\n" -.aligned_text "320 by 240 Anti-aliased, Non interlaced.\n" -.aligned_text "640 by 240 Point sampled, Non interlaced.\n" -.aligned_text "640 by 240 Anti-aliased, Non interlaced.\n" -.aligned_text "640 by 480 Point sampled, Interlaced.\n" -.aligned_text "640 by 480 Anti-aliased, Interlaced.\n" -.aligned_text "640 by 480 Point sampled, Interlaced, De-flickered.\n" -.aligned_text "640 by 480 Anti-aliased, Interlaced, De-flickered.\n" - -glabel D_800E7AFC -.word 0x3F9B26CA - -glabel D_800E7B00 -.word 0x3F8CCCCD - -glabel D_800E7B04 -.word 0x3FAAAAAB - -glabel D_800E7B08 -.word 0x3FAAAAAB - -glabel D_800E7B0C -.word 0x8007A5AC -.word 0x8007A5D0 -.word 0x8007A658 -.word 0x8007A6C0 -.word 0x8007A728 -.word 0x8007A750 -.word 0x8007A778 -.word 0x8007A7A0 -.word 0x00000000 diff --git a/src/unknown_07AF10.c b/src/unknown_07AF10.c index bf69b37b..3a109177 100644 --- a/src/unknown_07AF10.c +++ b/src/unknown_07AF10.c @@ -12,25 +12,52 @@ s8 D_800DE778 = 2; /* Size: 0x08 bytes */ typedef struct unk800DE77C { - /* 0x00 */ s32 unk0; - /* 0x04 */ s32 unk4; + /* 0x00 */ s32 width; + /* 0x04 */ s32 height; } unk800DE77C; -extern unk800DE77C D_800DE77C[8] = { - { 0x140, 0xF0 }, - { 0x140, 0xF0 }, - { 0x280, 0xF0 }, - { 0x280, 0xF0 }, - { 0x280, 0x1E0 }, - { 0x280, 0x1E0 }, - { 0x280, 0x1E0 }, - { 0x280, 0x1E0 } +// Video mode resolutions +unk800DE77C D_800DE77C[8] = { + { 320, 240 }, + { 320, 240 }, + { 640, 240 }, + { 640, 240 }, + { 640, 480 }, + { 640, 480 }, + { 640, 480 }, + { 640, 480 } }; s32 D_800DE7BC = 0; // Currently unknown, might be a different type. /*******************************/ +/************ .rodata ************/ + +const char D_800E7990[] = "320 by 240 Point sampled, Non interlaced.\n"; +const char D_800E79BC[] = "320 by 240 Anti-aliased, Non interlaced.\n"; +const char D_800E79EC[] = "640 by 240 Point sampled, Non interlaced.\n"; +const char D_800E7A10[] = "640 by 240 Anti-aliased, Non interlaced.\n"; +const char D_800E7A40[] = "640 by 480 Point sampled, Interlaced.\n"; +const char D_800E7A68[] = "640 by 480 Anti-aliased, Interlaced.\n"; +const char D_800E7A90[] = "640 by 480 Point sampled, Interlaced, De-flickered.\n"; +const char D_800E7AC8[] = "640 by 480 Anti-aliased, Interlaced, De-flickered.\n"; + +const FloatLiteral D_800E7AFC = { 1.21212125f }; +const FloatLiteral D_800E7B00 = { 1.1f }; +const FloatLiteral D_800E7B04 = { 1.33333333f }; +const FloatLiteral D_800E7B08 = { 1.33333333f }; + +// Jump table in func_8007A550 +const u32 D_800E7B0C[] = { + 0x8007A5AC, 0x8007A5D0, 0x8007A658, 0x8007A6C0, + 0x8007A728, 0x8007A750, 0x8007A778, 0x8007A7A0 +}; + +/*********************************/ + +/************ .bss ************/ + extern s32 D_801262B0[2]; extern s32 D_801262B8[2]; extern s32 D_801262C8; @@ -38,6 +65,8 @@ extern s32 D_801262CC; extern s8 D_80126308; extern s8 D_80126309; +/******************************/ + GLOBAL_ASM("asm/non_matchings/unknown_07AF10/func_8007A310.s") void func_8007A4C0(s32 arg0) { @@ -51,8 +80,8 @@ s32 func_8007A4CC(void) { /* Unused? */ void func_8007A4DC(s32 arg0) { - D_801262B0[arg0] = D_800DE77C[D_801262CC & 0x07].unk0; - D_801262B8[arg0] = D_800DE77C[D_801262CC & 0x07].unk4; + D_801262B0[arg0] = D_800DE77C[D_801262CC & 0x07].width; + D_801262B8[arg0] = D_800DE77C[D_801262CC & 0x07].height; } s32 func_8007A520(void) { From c91759a97a6fb0d0372d8870086bfe0bdd8e14d1 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 15:31:15 -0500 Subject: [PATCH 13/66] Moved .rodata in unknown_0D3160 from asm to C. --- data/unknown_0D3160.rodata.s | 48 ------------------------------- lib/asm/exception/__osException.s | 25 ++++++++++++++++ lib/src/unknown_0D3160.c | 13 +++++++++ 3 files changed, 38 insertions(+), 48 deletions(-) delete mode 100644 data/unknown_0D3160.rodata.s diff --git a/data/unknown_0D3160.rodata.s b/data/unknown_0D3160.rodata.s deleted file mode 100644 index b698a160..00000000 --- a/data/unknown_0D3160.rodata.s +++ /dev/null @@ -1,48 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E9640 -.word 0x3F91DF46 -.word 0x9D353918 -.word 0x00000000 -.word 0x00000000 - -glabel D_800E9650 -.word 0x800D2A70 -.word 0x800D2964 -.word 0x800D29A4 -.word 0x800D2A90 -.word 0x800D2A90 -.word 0x800D29E0 -.word 0x800D2A28 -.word 0x00000000 - -glabel D_800E9670 -.word 0x00141818 -.word 0x1C1C1C1C -.word 0x20202020 -.word 0x20202020 -.word 0x00040808 -.word 0x0C0C0C0C -.word 0x10101010 -.word 0x10101010 - -glabel D_800E9690 -.word 0x800D3168 -.word 0x800D3130 -.word 0x800D3110 -.word 0x800D2F74 -.word 0x800D2F20 -.word 0x800D30B4 -.word 0x800D2EE8 -.word 0x800D2EF4 -.word 0x800D2F00 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/lib/asm/exception/__osException.s b/lib/asm/exception/__osException.s index b49a8d69..a6c15414 100644 --- a/lib/asm/exception/__osException.s +++ b/lib/asm/exception/__osException.s @@ -1,3 +1,28 @@ +.section .rodata + +glabel D_800E9670 +.word 0x00141818 +.word 0x1C1C1C1C +.word 0x20202020 +.word 0x20202020 +.word 0x00040808 +.word 0x0C0C0C0C +.word 0x10101010 +.word 0x10101010 + +glabel D_800E9690 +.word 0x800D3168 +.word 0x800D3130 +.word 0x800D3110 +.word 0x800D2F74 +.word 0x800D2F20 +.word 0x800D30B4 +.word 0x800D2EE8 +.word 0x800D2EF4 +.word 0x800D2F00 + +.section .text + glabel __osException /* 0D38C0 800D2CC0 3C1A8013 */ lui $k0, %hi(D_8012D240) # $k0, 0x8013 /* 0D38C4 800D2CC4 275AD240 */ addiu $k0, %lo(D_8012D240) # addiu $k0, $k0, -0x2dc0 diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index 3804eb00..3d95cfc6 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -6,6 +6,19 @@ #include "libultra_internal.h" #include "hardware.h" +/************ .rodata ************/ + +const DoubleLiteral D_800E9640 = { 0.017453292222222222 }; +const DoubleLiteral D_800E9648 = { 0.0 }; // This is probably a file boundary. This file needs to be split. + +// Jump table in __osDevMgrMain +const u32 D_800E9650[] = { + 0x800D2A70, 0x800D2964, 0x800D29A4, 0x800D2A90, + 0x800D2A90, 0x800D29E0, 0x800D2A28 +}; + +/*********************************/ + GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s") From a074165247198a90d4b95111e708746618e2f921 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 15:40:00 -0500 Subject: [PATCH 14/66] Moved .rodata in unknown_07B870 from asm to C. --- data/unknown_07B870.rodata.s | 20 -------------------- src/unknown_07B870.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 20 deletions(-) delete mode 100644 data/unknown_07B870.rodata.s diff --git a/data/unknown_07B870.rodata.s b/data/unknown_07B870.rodata.s deleted file mode 100644 index cd3977cc..00000000 --- a/data/unknown_07B870.rodata.s +++ /dev/null @@ -1,20 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "Error: Texture no %x out of range on load. !!\n" -.aligned_text "TEX Error: Palette memory overflow!!\n" -.aligned_text "TEX Error: TexTab overflow!!\n" -.aligned_text "texFreeTexture: NULL tex!!\n" -.aligned_text "TEX Error: Tryed to deallocate non-existent texture!!\n" -.aligned_text "SRPBUF overflow!!\n" -.aligned_text "Error: Sprite table overflow!!\n" -.aligned_text "texFreeSprite: NULL sprite!!\n" -.aligned_text "TEXSPR Error: Tryed to deallocate non-existent sprite!!\n" - -.word 0x00000000 diff --git a/src/unknown_07B870.c b/src/unknown_07B870.c index 1a9c1428..c304859e 100644 --- a/src/unknown_07B870.c +++ b/src/unknown_07B870.c @@ -466,6 +466,21 @@ u32 D_800DF410[] = { /*******************************/ + +/************ .rodata ************/ + +const char D_800E7B30[] = "Error: Texture no %x out of range on load. !!\n"; +const char D_800E7B60[] = "TEX Error: Palette memory overflow!!\n"; +const char D_800E7B88[] = "TEX Error: TexTab overflow!!\n"; +const char D_800E7BA8[] = "texFreeTexture: NULL tex!!\n"; +const char D_800E7BC4[] = "TEX Error: Tryed to deallocate non-existent texture!!\n"; +const char D_800E7BFC[] = "SRPBUF overflow!!\n"; +const char D_800E7C10[] = "Error: Sprite table overflow!!\n"; +const char D_800E7C30[] = "texFreeSprite: NULL sprite!!\n"; +const char D_800E7C50[] = "TEXSPR Error: Tryed to deallocate non-existent sprite!!\n"; + +/*********************************/ + /************ .bss ************/ extern s32 D_80126338; From 515065c717e32db4020a34296145f6380d78dd82 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 15:52:11 -0500 Subject: [PATCH 15/66] Moved .rodata in unknown_062930 from asm to unknown_05F690.c. --- data/unknown_062930.rodata.s | 20 -------------------- src/unknown_05F690.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 data/unknown_062930.rodata.s diff --git a/data/unknown_062930.rodata.s b/data/unknown_062930.rodata.s deleted file mode 100644 index fa69915c..00000000 --- a/data/unknown_062930.rodata.s +++ /dev/null @@ -1,20 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -# I am not sure if this is in the correct file. It is hard to tell without any glabels. - -.aligned_text "Error: Model no. out of range on load. !!\n" -.aligned_text "TEXTURE ERROR!!\n%d,%d\n" -.aligned_text "Error: Model table overflow!!\n" -.aligned_text "WARNING :: createModelInstance called with NULL pointer\n" -.aligned_text "ModFreeModel : NULL mod_inst!!\n" -.aligned_text "MOD Error: Tryed to deallocate non-existent model!!\n" - -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_05F690.c b/src/unknown_05F690.c index a01b4021..c09fcd4a 100644 --- a/src/unknown_05F690.c +++ b/src/unknown_05F690.c @@ -49,6 +49,17 @@ const DoubleLiteral D_800E6B00 = { 0.3 }; const DoubleLiteral D_800E6B08 = { -0.3 }; const DoubleLiteral D_800E6B10 = { 0.4 }; +// This is another file boundary. +const DoubleLiteral D_800E6B18 = { 0.0 }; + +// I am not sure where these go. It is hard to tell without any glabels. +// Need to figure out which file handles creating models. +const char D_800E6B20[] = "Error: Model no. out of range on load. !!\n"; +const char D_800E6B4C[] = "TEXTURE ERROR!!\n%d,%d\n"; +const char D_800E6B64[] = "Error: Model table overflow!!\n"; +const char D_800E6B84[] = "WARNING :: createModelInstance called with NULL pointer\n"; +const char D_800E6BC0[] = "ModFreeModel : NULL mod_inst!!\n"; +const char D_800E6BE0[] = "MOD Error: Tryed to deallocate non-existent model!!\n"; /*********************************/ From c95fd196a8a9c353d5497724eb91378f3b47a5d0 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 16:02:34 -0500 Subject: [PATCH 16/66] Moved .rodata in unknown_061D30 from asm to C. --- data/unknown_061D30.rodata.s | 161 ----------------------------------- src/unknown_061D30.c | 54 ++++++++++++ tools/python/generate_ld.py | 1 + 3 files changed, 55 insertions(+), 161 deletions(-) delete mode 100644 data/unknown_061D30.rodata.s diff --git a/data/unknown_061D30.rodata.s b/data/unknown_061D30.rodata.s deleted file mode 100644 index 7a937001..00000000 --- a/data/unknown_061D30.rodata.s +++ /dev/null @@ -1,161 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "CSP: oh oh \n" - -glabel D_800E6C30 -.word 0x8006247C -.word 0x80062978 -.word 0x800626F8 -.word 0x80062978 -.word 0x80062978 -.word 0x800624AC -.word 0x800624FC -.word 0x8006270C -.word 0x80062978 -.word 0x8006248C -.word 0x80062720 -.word 0x80062978 -.word 0x80062924 -.word 0x80062944 -.word 0x80062968 -.word 0x80062788 -.word 0x800627AC -.word 0x80062880 -.word 0x80062978 -.word 0x80062978 -.word 0x80062978 -.word 0x800626F8 -.word 0x80062564 -.word 0x80062668 - -glabel D_800E6C90 -.word 0x80062A90 -.word 0x80062AF0 -.word 0x80062AA8 -.word 0x80062AC0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AF0 -.word 0x80062AE8 -.word 0x80062AE8 -.word 0x80062AE8 - -glabel D_800E6CE0 -.word 0x80063068 -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x80062C38 -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800630C0 -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x8006319C -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800636E0 -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x80063124 -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x800637CC -.word 0x80063714 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 - diff --git a/src/unknown_061D30.c b/src/unknown_061D30.c index 2268bc29..095e4eb7 100644 --- a/src/unknown_061D30.c +++ b/src/unknown_061D30.c @@ -4,6 +4,60 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +const char D_800E6C20[] = "CSP: oh oh \n"; + +// Jump table in __CSPVoiceHandler +const u32 D_800E6C30[] = { + 0x8006247C, 0x80062978, 0x800626F8, 0x80062978, + 0x80062978, 0x800624AC, 0x800624FC, 0x8006270C, + 0x80062978, 0x8006248C, 0x80062720, 0x80062978, + 0x80062924, 0x80062944, 0x80062968, 0x80062788, + 0x800627AC, 0x80062880, 0x80062978, 0x80062978, + 0x80062978, 0x800626F8, 0x80062564, 0x80062668 +}; + +// Jump table in __CSPHandleNextSeqEvent +const u32 D_800E6C90[] = { + 0x80062A90, 0x80062AF0, 0x80062AA8, 0x80062AC0, + 0x80062AF0, 0x80062AF0, 0x80062AF0, 0x80062AF0, + 0x80062AF0, 0x80062AF0, 0x80062AF0, 0x80062AF0, + 0x80062AF0, 0x80062AF0, 0x80062AF0, 0x80062AF0, + 0x80062AF0, 0x80062AE8, 0x80062AE8, 0x80062AE8 +}; + +// Jump table in __CSPHandleMIDIMsg +const u32 D_800E6CE0[] = { + 0x80063068, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x80062C38, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800630C0, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x8006319C, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800636E0, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x80063124, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, + 0x80063714 +}; + +/*********************************/ + GLOBAL_ASM("asm/non_matchings/unknown_061D30/alCSPNew.s") GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s") GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s") diff --git a/tools/python/generate_ld.py b/tools/python/generate_ld.py index cdf75cea..9e32a4c0 100644 --- a/tools/python/generate_ld.py +++ b/tools/python/generate_ld.py @@ -34,6 +34,7 @@ class GenerateLD: self.indentLevel = 0 self.file = file self.gen_comment('linker script generated by generate_ld.py') + self.gen_comment('If you want to make any changes, then edit the generate_ld.py script!') self.gen_newline() self.gen_line('OUTPUT_ARCH (mips)') self.gen_newline() From 9eecfad9022b52c2ef78d15165a89394fa5eb113 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 16:11:43 -0500 Subject: [PATCH 17/66] Moved .rodata in unknown_064830 from asm to C. --- data/unknown_064830.rodata.s | 40 ------------------------------------ src/unknown_064830.c | 25 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 41 deletions(-) delete mode 100644 data/unknown_064830.rodata.s diff --git a/data/unknown_064830.rodata.s b/data/unknown_064830.rodata.s deleted file mode 100644 index 21f4a364..00000000 --- a/data/unknown_064830.rodata.s +++ /dev/null @@ -1,40 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6E70 -.word 0x80063FE8 -.word 0x8006401C -.word 0x8006407C -.word 0x80064050 -.word 0x800640A8 -.word 0x800640D4 -.word 0x80064144 -.word 0x800641C4 - -glabel D_800E6E90 -.word 0x4105221B - -glabel D_800E6E94 -.word 0x3D3FB61B -.word 0x00000000 -.word 0x00000000 - -glabel D_800E6EA0 -.word 0x80064AD8 -.word 0x80064AE4 -.word 0x80064AFC -.word 0x80064B08 -.word 0x80064AF0 -.word 0x80064B14 - -glabel D_800E6EB8 -.word 0x4105221B - -glabel D_800E6EBC -.word 0x3D3FB61B diff --git a/src/unknown_064830.c b/src/unknown_064830.c index fe1d2ab4..c8101ab5 100644 --- a/src/unknown_064830.c +++ b/src/unknown_064830.c @@ -87,9 +87,32 @@ s32 D_800DD028[10] = { 0x00000000, 0x00000000 }; - /*******************************/ +/************ .rodata ************/ + +// Jump table in alFxParamHdl +const u32 D_800E6E70[] = { + 0x80063FE8, 0x8006401C, 0x8006407C, 0x80064050, + 0x800640A8, 0x800640D4, 0x80064144, 0x800641C4 +}; + +const FloatLiteral D_800E6E90 = { 8.320827f }; +const FloatLiteral D_800E6E94 = { 0.04680453f }; + +const DoubleLiteral D_800E6E98 = { 0.0f }; // Probably a file boundary. + +// Jump table in alFxNew +const u32 D_800E6EA0[] = { + 0x80064AD8, 0x80064AE4, 0x80064AFC, 0x80064B08, + 0x80064AF0, 0x80064B14 +}; + +const FloatLiteral D_800E6EB8 = { 8.320827f }; +const FloatLiteral D_800E6EBC = { 0.04680453f }; + +/*********************************/ + extern s32 alAuxBusPull; extern s32 alAuxBusParam; extern s32 alEnvMixerPull; From 40aa93ed3c1f64db5ac0738c97b60b8595b03138 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 16:18:09 -0500 Subject: [PATCH 18/66] Moved .rodata in unknown_0CA6E0 from asm to C. --- data/unknown_0CA6E0.rodata.s | 42 ------------------------------------ lib/src/unknown_0CA6E0.c | 16 ++++++++++++++ 2 files changed, 16 insertions(+), 42 deletions(-) delete mode 100644 data/unknown_0CA6E0.rodata.s diff --git a/data/unknown_0CA6E0.rodata.s b/data/unknown_0CA6E0.rodata.s deleted file mode 100644 index df27739b..00000000 --- a/data/unknown_0CA6E0.rodata.s +++ /dev/null @@ -1,42 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E94D0 -.word 0x05550556 -.word 0x0559055A -.word 0x05650566 -.word 0x0569056A -.word 0x05950596 -.word 0x0599059A -.word 0x05A505A6 -.word 0x05A905AA -.word 0x06550656 -.word 0x0659065A -.word 0x06650666 -.word 0x0669066A -.word 0x06950696 -.word 0x0699069A -.word 0x06A506A6 -.word 0x06A906AA -.word 0x09550956 -.word 0x0959095A -.word 0x09650966 -.word 0x0969096A -.word 0x09950996 -.word 0x0999099A -.word 0x09A509A6 -.word 0x09A909AA -.word 0x0A550A56 -.word 0x0A590A5A -.word 0x0A650A66 -.word 0x0A690A6A -.word 0x0A950A96 -.word 0x0A990A9A -.word 0x0AA50AA6 -.word 0x0AA90AAA diff --git a/lib/src/unknown_0CA6E0.c b/lib/src/unknown_0CA6E0.c index 443a8058..daadab2a 100644 --- a/lib/src/unknown_0CA6E0.c +++ b/lib/src/unknown_0CA6E0.c @@ -4,4 +4,20 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +// Not sure where this belongs. +const u16 D_800E94D0[] = { + 0x0555, 0x0556, 0x0559, 0x055A, 0x0565, 0x0566, 0x0569, 0x056A, + 0x0595, 0x0596, 0x0599, 0x059A, 0x05A5, 0x05A6, 0x05A9, 0x05AA, + 0x0655, 0x0656, 0x0659, 0x065A, 0x0665, 0x0666, 0x0669, 0x066A, + 0x0695, 0x0696, 0x0699, 0x069A, 0x06A5, 0x06A6, 0x06A9, 0x06AA, + 0x0955, 0x0956, 0x0959, 0x095A, 0x0965, 0x0966, 0x0969, 0x096A, + 0x0995, 0x0996, 0x0999, 0x099A, 0x09A5, 0x09A6, 0x09A9, 0x09AA, + 0x0A55, 0x0A56, 0x0A59, 0x0A5A, 0x0A65, 0x0A66, 0x0A69, 0x0A6A, + 0x0A95, 0x0A96, 0x0A99, 0x0A9A, 0x0AA5, 0x0AA6, 0x0AA9, 0x0AAA +}; + +/*********************************/ + GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA6E0/alSynSetPriority.s") From d447556e907fcb2a8aeb8424060c484dea02280b Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 16:34:04 -0500 Subject: [PATCH 19/66] Moved .rodata in unknown_072E50 from asm to C. --- data/unknown_072E50.rodata.s | 117 ----------------------------------- src/unknown_072E50.c | 47 ++++++++++++++ 2 files changed, 47 insertions(+), 117 deletions(-) delete mode 100644 data/unknown_072E50.rodata.s diff --git a/data/unknown_072E50.rodata.s b/data/unknown_072E50.rodata.s deleted file mode 100644 index e4ac95b7..00000000 --- a/data/unknown_072E50.rodata.s +++ /dev/null @@ -1,117 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "Region = %d loc = %x size = %x\t" -.aligned_text "FREE" -.aligned_text "ALLOCATED" -.aligned_text "ALLOCATED,FIXED" -.aligned_text "\n" -.aligned_text "\n" -.aligned_text "Region number = %d\t" -.aligned_text "maxSlots = %d\t" -.aligned_text "slotsUsed = %d\t" -.aligned_text "loc = %x\t" -.aligned_text "size = %x\n" -.aligned_text "\n" - -glabel D_800E7630 -.aligned_text "DKRACING-ADV" - -glabel D_800E7640 -.aligned_text "DKRACING-ADV" - -glabel D_800E7650 -.aligned_text "DKRACING-TIMES" - -glabel D_800E7660 -.aligned_text "DKRACING-TIMES" - -glabel D_800E7670 -.aligned_text "DKRACING-ADV" - -glabel D_800E7680 -.aligned_text "DKRACING-ADV" - -glabel D_800E7690 -.aligned_text "DKRACING-TIMES" - -glabel D_800E76A0 -.aligned_text "DKRACING-TIMES" - -.aligned_text "WARNING : No Eprom\n" -.aligned_text "WARNING : No Eprom\n" -.aligned_text "WARNING : No Eprom\n" -.aligned_text "WARNING : No Eprom\n" -.aligned_text "WARNING : No Eprom\n" -.aligned_text "WARNING : No Eprom\n" -.aligned_text "WARNING : No Eprom\n" - -glabel D_800E773C -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E774C -.word 0x00000000 - -.aligned_text "warning: corrupt ghost\n" - -glabel D_800E7768 -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E7778 -.word 0x00000000 - -glabel D_800E777C -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E778C -.word 0x00000000 - -glabel D_800E7790 -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E77A0 -.word 0x00000000 - -glabel D_800E77A4 -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E77B4 -.word 0x00000000 - -glabel D_800E77B8 -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E77C8 -.word 0x00000000 - -glabel D_800E77CC -.aligned_text "DKRACING-GHOSTS" - -glabel D_800E77DC -.word 0x00000000 - -glabel D_800E77E0 -.word 0x3FB99999 - -glabel D_800E77E4 -.word 0x9999999A - -glabel D_800E77E8 -.word 0x400CCCCC - -glabel D_800E77EC -.word 0xCCCCCCCD - -glabel D_800E77F0 -.word 0x407EA000 - -glabel D_800E77F4 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_072E50.c b/src/unknown_072E50.c index f6ad31ab..585fced0 100644 --- a/src/unknown_072E50.c +++ b/src/unknown_072E50.c @@ -13,6 +13,53 @@ s32 D_800DE48C = 0; /*******************************/ +/************ .rodata ************/ + +const char D_800E7590[] = "Region = %d loc = %x size = %x\t"; +const char D_800E75B4[] = "FREE"; +const char D_800E75BC[] = "ALLOCATED"; +const char D_800E75C8[] = "ALLOCATED,FIXED"; +const char D_800E75D8[] = "\n"; +const char D_800E75DC[] = "\n"; +const char D_800E75E0[] = "Region number = %d\t"; +const char D_800E75F4[] = "maxSlots = %d\t"; +const char D_800E7604[] = "slotsUsed = %d\t"; +const char D_800E7614[] = "loc = %x\t"; +const char D_800E7620[] = "size = %x\n"; +const char D_800E762C[] = "\n"; + +const char D_800E7630[] = "DKRACING-ADV"; +const char D_800E7640[] = "DKRACING-ADV"; +const char D_800E7650[] = "DKRACING-TIMES"; +const char D_800E7660[] = "DKRACING-TIMES"; +const char D_800E7670[] = "DKRACING-ADV"; +const char D_800E7680[] = "DKRACING-ADV"; +const char D_800E7690[] = "DKRACING-TIMES"; +const char D_800E76A0[] = "DKRACING-TIMES"; + +const char D_800E76B0[] = "WARNING : No Eprom\n"; +const char D_800E76C4[] = "WARNING : No Eprom\n"; +const char D_800E76D8[] = "WARNING : No Eprom\n"; +const char D_800E76EC[] = "WARNING : No Eprom\n"; +const char D_800E7700[] = "WARNING : No Eprom\n"; +const char D_800E7714[] = "WARNING : No Eprom\n"; +const char D_800E7728[] = "WARNING : No Eprom\n"; + +const char D_800E773C[] = "DKRACING-GHOSTS\0"; +const char D_800E7750[] = "warning: corrupt ghost\n"; +const char D_800E7768[] = "DKRACING-GHOSTS\0"; +const char D_800E777C[] = "DKRACING-GHOSTS\0"; +const char D_800E7790[] = "DKRACING-GHOSTS\0"; +const char D_800E77A4[] = "DKRACING-GHOSTS\0"; +const char D_800E77B8[] = "DKRACING-GHOSTS\0"; +const char D_800E77CC[] = "DKRACING-GHOSTS\0"; + +const DoubleLiteral D_800E77E0 = { 0.1 }; +const DoubleLiteral D_800E77E8 = { 3.6 }; +const DoubleLiteral D_800E77F0 = { 490.0 }; + +/*********************************/ + /************ .bss ************/ extern s32 D_80124010; From 60bc0581b9701799096cf35c7613ebff5060b366 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 17:05:58 -0500 Subject: [PATCH 20/66] Moved .rodata in unknown_071730 from asm to C. --- data/unknown_071730.rodata.s | 51 ------------------------------------ src/unknown_071730.c | 37 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 51 deletions(-) delete mode 100644 data/unknown_071730.rodata.s diff --git a/data/unknown_071730.rodata.s b/data/unknown_071730.rodata.s deleted file mode 100644 index 6d83d171..00000000 --- a/data/unknown_071730.rodata.s +++ /dev/null @@ -1,51 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "*** mmAlloc: size = 0 ***\n" -.aligned_text "*** mm Error *** ---> No more slots available.\n" -.aligned_text "\n*** mm Error *** ---> No suitble block found for allocation.\n" -.aligned_text "*** mmAllocAtAddr: size = 0 ***\n" -.aligned_text "\n*** mm Error *** ---> No more slots available.\n" -.aligned_text "\n*** mm Error *** ---> Can't allocate memory at desired address.\n" -.aligned_text "\n*** mm Error *** ---> Can't free ram at this location: %x\n" -.aligned_text "\n*** mm Error *** ---> No match found for mmFree.\n" -.aligned_text "*** Slots still in use in region ***\n" -.aligned_text "\n*** mm Error *** ---> stbf stack too deep!\n" -.aligned_text "\n*** mm Error *** ---> Can't fix the specified block.\n" -.aligned_text "\n*** mm Error *** ---> Can't unfix the specified block.\n" -.aligned_text "Colour %x >> %d\n" -.aligned_text "Unable to record %d slots, colours overflowed table.\n" -.aligned_text "RED %d\n" -.aligned_text "GREEN %d\n" -.aligned_text "BLUE %d\n" -.aligned_text "YELLOW %d\n" -.aligned_text "MAGENTA %d\n" -.aligned_text "CYAN %d\n" -.aligned_text "WHITE %d\n" -.aligned_text "GREY %d\n" -.aligned_text "ORANGE %d\n\n" - -glabel D_800E7528 -.aligned_text "RED %d\n" -glabel D_800E7530 -.aligned_text "GREEN %d\n" -glabel D_800E753C -.aligned_text "BLUE %d\n" -glabel D_800E7548 -.aligned_text "YELLOW %d\n" -glabel D_800E7554 -.aligned_text "MAGENTA %d\n" -glabel D_800E7560 -.aligned_text "CYAN %d\n" -glabel D_800E756C -.aligned_text "WHITE %d\n" -glabel D_800E7578 -.aligned_text "GREY %d\n" -glabel D_800E7584 -.aligned_text "ORANGE %d\n\n" diff --git a/src/unknown_071730.c b/src/unknown_071730.c index 3e1952b5..4c194240 100644 --- a/src/unknown_071730.c +++ b/src/unknown_071730.c @@ -4,6 +4,43 @@ #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"; +const char D_800E7528[] = "RED %d\n"; +const char D_800E7530[] = "GREEN %d\n"; +const char D_800E753C[] = "BLUE %d\n"; +const char D_800E7548[] = "YELLOW %d\n"; +const char D_800E7554[] = "MAGENTA %d\n"; +const char D_800E7560[] = "CYAN %d\n"; +const char D_800E756C[] = "WHITE %d\n"; +const char D_800E7578[] = "GREY %d\n"; +const char D_800E7584[] = "ORANGE %d\n\n"; + +/*********************************/ + /* Size: 0x8 bytes */ typedef struct unk80070BE4_8_0 { s16 unk0; From be11b5f14aa9e0914d9243a6bf1d0217be7370d9 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 20:37:07 -0500 Subject: [PATCH 21/66] Moved .rodata in unknown_09F8F0 & unknown_0B8920 from asm to C. --- data/unknown_09F8F0.rodata.s | 430 +++++++++++++++++------------------ data/unknown_0B8920.rodata.s | 122 ---------- src/unknown_09F8F0.c | 72 ++++++ src/unknown_0B8920.c | 68 ++++++ 4 files changed, 355 insertions(+), 337 deletions(-) delete mode 100644 data/unknown_0B8920.rodata.s diff --git a/data/unknown_09F8F0.rodata.s b/data/unknown_09F8F0.rodata.s index 4d5df9f0..0172cdaa 100644 --- a/data/unknown_09F8F0.rodata.s +++ b/data/unknown_09F8F0.rodata.s @@ -7,218 +7,218 @@ .section .rodata -glabel D_800E8640 -.aligned_text "CAN'T" - -glabel D_800E8648 -.aligned_text "SAVE" - -glabel D_800E8650 -.aligned_text "GHOST" - -glabel D_800E8658 -.aligned_text " CONTROLLER" - -glabel D_800E8664 -.aligned_text "PAK" - -glabel D_800E8668 -.aligned_text "FULL" - -glabel D_800E8670 -.aligned_text " CONTROLLER" - -glabel D_800E867C -.aligned_text "PAK" - -glabel D_800E8680 -.aligned_text "DAMAGED" - -glabel D_800E8688 -.aligned_text "RACE" - -glabel D_800E8690 -.aligned_text "LAP" - -glabel D_800E8694 -.aligned_text "DID NOT FINISH" - -.word 0x00000000 - -glabel D_800E86A8 -.word 0x3FE33333 - -glabel D_800E86AC -.word 0x33333333 -.word 0x3FF33333 -.word 0x33333333 - -glabel D_800E86B8 -.word 0x43838000 - -glabel D_800E86BC -.word 0x43818000 - -glabel D_800E86C0 -.word 0x43848000 -.word 0x00000000 -.word 0x3FF33333 -.word 0x33333333 -.word 0x3FE33333 -.word 0x33333333 -.word 0x3FF33333 -.word 0x33333333 -.word 0x3FE33333 -.word 0x33333333 - -glabel D_800E86E8 -.word 0x3FF33333 - -glabel D_800E86EC -.word 0x33333333 - -glabel D_800E86F0 -.word 0x3FE33333 - -glabel D_800E86F4 -.word 0x33333333 - -glabel D_800E86F8 -.word 0x800A0F28 -.word 0x800A0F38 -.word 0x800A0F48 -.word 0x800A0F58 -.word 0x800A0F6C -.word 0x800A0F80 -.word 0x800A0F94 -.word 0x800A0FAC - -glabel D_800E8718 -.word 0x43898000 -.word 0x00000000 - -glabel D_800E8720 -.word 0x40508000 - -glabel D_800E8724 -.word 0x00000000 - -glabel D_800E8728 -.word 0x40508000 - -glabel D_800E872C -.word 0x00000000 - -glabel D_800E8730 -.word 0x40508000 - -glabel D_800E8734 -.word 0x00000000 - -glabel D_800E8738 -.word 0x3FF33333 - -glabel D_800E873C -.word 0x33333333 - -glabel D_800E8740 -.word 0x46C92000 - -glabel D_800E8744 -.word 0x800A63D8 -.word 0x800A691C -.word 0x800A6BCC -.word 0x800A6CA4 -.word 0x800A6D68 - -glabel D_800E8758 -.word 0x3FF19999 - -glabel D_800E875C -.word 0x9999999A - -glabel D_800E8760 -.word 0x3FF19999 - -glabel D_800E8764 -.word 0x9999999A - -glabel D_800E8768 -.word 0x800A6E70 -.word 0x800A6F3C -.word 0x800A7014 -.word 0x800A70D4 -.word 0x800A7158 -.word 0x00000000 - -glabel D_800E8780 -.word 0x3FA7FF58 - -glabel D_800E8784 -.word 0x3A53B8E5 - -glabel D_800E8788 -.word 0x40855544 - -glabel D_800E878C -.word 0x32CA57A8 - -glabel D_800E8790 -.word 0x3FC70A3D - -glabel D_800E8794 -.word 0x70A3D70A - -glabel D_800E8798 -.word 0x3FA7FF58 - -glabel D_800E879C -.word 0x3A53B8E5 - -glabel D_800E87A0 -.word 0x3FF19999 - -glabel D_800E87A4 -.word 0x9999999A - -glabel D_800E87A8 -.word 0x43358000 -.word 0x00000000 -.word 0x40508000 -.word 0x00000000 - -glabel D_800E87B8 -.word 0x40508000 - -glabel D_800E87BC -.word 0x00000000 - -glabel D_800E87C0 -.word 0x3FF19999 - -glabel D_800E87C4 -.word 0x9999999A - -glabel D_800E87C8 -.word 0x3FF33333 - -glabel D_800E87CC -.word 0x33333333 - -glabel D_800E87D0 -.word 0x3F4CCCCD - -glabel D_800E87D4 -.word 0x3F99999A - -glabel D_800E87D8 -.word 0x3F8CCCCD -.word 0x00000000 - -glabel D_800E87E0 -.word 0x3FF19999 - -glabel D_800E87E4 -.word 0x9999999A -.word 0x00000000 -.word 0x00000000 +# glabel D_800E8640 +# .aligned_text "CAN'T" +# +# glabel D_800E8648 +# .aligned_text "SAVE" +# +# glabel D_800E8650 +# .aligned_text "GHOST" +# +# glabel D_800E8658 +# .aligned_text " CONTROLLER" +# +# glabel D_800E8664 +# .aligned_text "PAK" +# +# glabel D_800E8668 +# .aligned_text "FULL" +# +# glabel D_800E8670 +# .aligned_text " CONTROLLER" +# +# glabel D_800E867C +# .aligned_text "PAK" +# +# glabel D_800E8680 +# .aligned_text "DAMAGED" +# +# glabel D_800E8688 +# .aligned_text "RACE" +# +# glabel D_800E8690 +# .aligned_text "LAP" +# +# glabel D_800E8694 +# .aligned_text "DID NOT FINISH" +# +# .word 0x00000000 +# +# glabel D_800E86A8 +# .word 0x3FE33333 +# +# glabel D_800E86AC +# .word 0x33333333 +# .word 0x3FF33333 +# .word 0x33333333 +# +# glabel D_800E86B8 +# .word 0x43838000 +# +# glabel D_800E86BC +# .word 0x43818000 +# +# glabel D_800E86C0 +# .word 0x43848000 # 265.0f +# .word 0x00000000 +# .word 0x3FF33333 # 1.2 +# .word 0x33333333 +# .word 0x3FE33333 # 0.6 +# .word 0x33333333 +# .word 0x3FF33333 # 1.2 +# .word 0x33333333 +# .word 0x3FE33333 # 0.6 +# .word 0x33333333 +# +# glabel D_800E86E8 +# .word 0x3FF33333 # 1.2 +# +# glabel D_800E86EC +# .word 0x33333333 +# +# glabel D_800E86F0 +# .word 0x3FE33333 # 0.6 +# +# glabel D_800E86F4 +# .word 0x33333333 +# +# glabel D_800E86F8 +# .word 0x800A0F28 +# .word 0x800A0F38 +# .word 0x800A0F48 +# .word 0x800A0F58 +# .word 0x800A0F6C +# .word 0x800A0F80 +# .word 0x800A0F94 +# .word 0x800A0FAC +# +# glabel D_800E8718 +# .word 0x43898000 # 275.0f +# .word 0x00000000 +# +# glabel D_800E8720 +# .word 0x40508000 # 66.0 +# +# glabel D_800E8724 +# .word 0x00000000 +# +# glabel D_800E8728 +# .word 0x40508000 # 66.0 +# +# glabel D_800E872C +# .word 0x00000000 +# +# glabel D_800E8730 +# .word 0x40508000 # 66.0 +# +# glabel D_800E8734 +# .word 0x00000000 +# +# glabel D_800E8738 +# .word 0x3FF33333 # 1.2 +# +# glabel D_800E873C +# .word 0x33333333 +# +# glabel D_800E8740 +# .word 0x46C92000 # 25744.0f +# +# glabel D_800E8744 +# .word 0x800A63D8 +# .word 0x800A691C +# .word 0x800A6BCC +# .word 0x800A6CA4 +# .word 0x800A6D68 +# +# glabel D_800E8758 +# .word 0x3FF19999 # 1.1 +# +# glabel D_800E875C +# .word 0x9999999A +# +# glabel D_800E8760 +# .word 0x3FF19999 # 1.1 +# +# glabel D_800E8764 +# .word 0x9999999A +# +# glabel D_800E8768 +# .word 0x800A6E70 +# .word 0x800A6F3C +# .word 0x800A7014 +# .word 0x800A70D4 +# .word 0x800A7158 +# .word 0x00000000 +# +# glabel D_800E8780 +# .word 0x3FA7FF58 # 0.04687 +# +# glabel D_800E8784 +# .word 0x3A53B8E5 +# +# glabel D_800E8788 +# .word 0x40855544 # 682.6583 +# +# glabel D_800E878C +# .word 0x32CA57A8 +# +# glabel D_800E8790 +# .word 0x3FC70A3D # 0.18 +# +# glabel D_800E8794 +# .word 0x70A3D70A +# +# glabel D_800E8798 +# .word 0x3FA7FF58 # 0.04687 +# +# glabel D_800E879C +# .word 0x3A53B8E5 +# +# glabel D_800E87A0 +# .word 0x3FF19999 # 1.1 +# +# glabel D_800E87A4 +# .word 0x9999999A +# +# glabel D_800E87A8 +# .word 0x43358000 # 181.5f +# .word 0x00000000 +# .word 0x40508000 # 66.0 +# .word 0x00000000 +# +# glabel D_800E87B8 +# .word 0x40508000 # 66.0 +# +# glabel D_800E87BC +# .word 0x00000000 +# +# glabel D_800E87C0 +# .word 0x3FF19999 # 1.1 +# +# glabel D_800E87C4 +# .word 0x9999999A +# +# glabel D_800E87C8 +# .word 0x3FF33333 # 1.2 +# +# glabel D_800E87CC +# .word 0x33333333 +# +# glabel D_800E87D0 +# .word 0x3F4CCCCD # 0.8f +# +# glabel D_800E87D4 +# .word 0x3F99999A # 1.2f +# +# glabel D_800E87D8 +# .word 0x3F8CCCCD # 1.1f +# .word 0x00000000 +# +# glabel D_800E87E0 +# .word 0x3FF19999 # 1.1 +# +# glabel D_800E87E4 +# .word 0x9999999A +# .word 0x00000000 +# .word 0x00000000 diff --git a/data/unknown_0B8920.rodata.s b/data/unknown_0B8920.rodata.s deleted file mode 100644 index bfa884c6..00000000 --- a/data/unknown_0B8920.rodata.s +++ /dev/null @@ -1,122 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "\nCouldn't find a block to pick wave details from.\nUsing block 0 as default." -.aligned_text "\n\nBlock may be specified using 'P' on water group node." -.aligned_text "\nError :: can not remove a wave swell object which doesn't exist !" -.aligned_text "\nError :: more than eight swells overlap on column %d." -.aligned_text "\nError :: can not add another wave swell, reached limit of %d." - -glabel D_800E92A0 -.word 0x461C4000 - -glabel D_800E92A4 -.word 0xC61C4000 - -glabel D_800E92A8 -.word 0x40D47AE1 - -glabel D_800E92AC -.word 0x47AE147B - -glabel D_800E92B0 -.word 0x40D11111 - -glabel D_800E92B4 -.word 0x47AE147B - -glabel D_800E92B8 -.word 0x40D47AE1 - -glabel D_800E92BC -.word 0x47AE147B - -glabel D_800E92C0 -.word 0x40D11111 - -glabel D_800E92C4 -.word 0x47AE147B -.word 0x00000000 -.word 0x00000000 - -glabel D_800E92D0 -.word 0x800C0310 -.word 0x800C0320 -.word 0x800C0370 -.word 0x800C03C0 -.word 0x800C03D0 -.word 0x800C0420 -.word 0x800C0470 - -glabel D_800E92EC -.word 0x800C056C -.word 0x800C0580 -.word 0x800C0580 -.word 0x800C0594 -.word 0x800C0580 -.word 0x800C0580 -.word 0x800C05A8 - -glabel D_800E9308 -.word 0x3FB33333 - -glabel D_800E930C -.word 0x3F99999A - -glabel D_800E9310 -.word 0x800C0680 -.word 0x800C0694 -.word 0x800C06A8 -.word 0x800C06BC -.word 0x800C06D0 -.word 0x800C06E4 -.word 0x800C06F8 - -glabel D_800E932C -.word 0x3F99999A - -glabel D_800E9330 -.word 0x800C3958 -.word 0x800C3984 -.word 0x800C3A30 -.word 0x800C3AA8 -.word 0x800C3ADC -.word 0x800C3B00 -.word 0x800C3B2C -.word 0x800C3B50 -.word 0x800C3B88 -.word 0x800C3BA0 -.word 0x00000000 -.word 0x00000000 - -glabel D_800E9360 -.word 0x800C4A88 -.word 0x800C4A78 -.word 0x800C4AD0 -.word 0x800C4AE8 -.word 0x800C4ADC -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4AE8 -.word 0x800C4A6C diff --git a/src/unknown_09F8F0.c b/src/unknown_09F8F0.c index 416ec7a0..906fb16d 100644 --- a/src/unknown_09F8F0.c +++ b/src/unknown_09F8F0.c @@ -367,6 +367,78 @@ s16 D_800E2C98[4] = { /*******************************/ +/************ .rodata ************/ + +const char D_800E8640[] = "CAN'T"; +const char D_800E8648[] = "SAVE"; +const char D_800E8650[] = "GHOST"; +const char D_800E8658[] = " CONTROLLER"; +const char D_800E8664[] = "PAK"; +const char D_800E8668[] = "FULL"; +const char D_800E8670[] = " CONTROLLER"; +const char D_800E867C[] = "PAK"; +const char D_800E8680[] = "DAMAGED"; +const char D_800E8688[] = "RACE"; +const char D_800E8690[] = "LAP"; +const char D_800E8694[] = "DID NOT FINISH"; + +const DoubleLiteral D_800E86A8 = { 0.6 }; +const DoubleLiteral D_800E86B0 = { 1.2 }; +const FloatLiteral D_800E86B8 = { 263.0f }; +const FloatLiteral D_800E86BC = { 259.0f }; +const FloatLiteral D_800E86C0 = { 265.0f }; +const DoubleLiteral D_800E86C8 = { 1.2 }; +const DoubleLiteral D_800E86D0 = { 0.6 }; +const DoubleLiteral D_800E86D8 = { 1.2 }; +const DoubleLiteral D_800E86E0 = { 0.6 }; +const DoubleLiteral D_800E86E8 = { 1.2 }; +const DoubleLiteral D_800E86F0 = { 0.6 }; + +// Jump table in func_800A0EB4 +const u32 D_800E86F8[] = { + 0x800A0F28, 0x800A0F38, 0x800A0F48, 0x800A0F58, + 0x800A0F6C, 0x800A0F80, 0x800A0F94, 0x800A0FAC +}; + +const FloatLiteral D_800E8718 = { 275.0f }; +const DoubleLiteral D_800E8720 = { 66.0 }; +const DoubleLiteral D_800E8728 = { 66.0 }; +const DoubleLiteral D_800E8730 = { 66.0 }; +const DoubleLiteral D_800E8738 = { 1.2 }; +const FloatLiteral D_800E8740 = { 25744.0f }; + +// Jump table in func_800A6254 +const u32 D_800E8744[] = { + 0x800A63D8, 0x800A691C, 0x800A6BCC, 0x800A6CA4, + 0x800A6D68 +}; + +const DoubleLiteral D_800E8758 = { 1.1 }; +const DoubleLiteral D_800E8760 = { 1.1 }; + +// Jump table in func_800A6E30 +const u32 D_800E8768[] = { + 0x800A6E70, 0x800A6F3C, 0x800A7014, 0x800A70D4, + 0x800A7158 +}; + +const DoubleLiteral D_800E8780 = { 0.04687 }; +const DoubleLiteral D_800E8788 = { 682.6583 }; +const DoubleLiteral D_800E8790 = { 0.18 }; +const DoubleLiteral D_800E8798 = { 0.04687 }; +const DoubleLiteral D_800E87A0 = { 1.1 }; +const FloatLiteral D_800E87A8 = { 181.5f }; +const DoubleLiteral D_800E87B0 = { 66.0 }; +const DoubleLiteral D_800E87B8 = { 66.0 }; +const DoubleLiteral D_800E87C0 = { 1.1 }; +const DoubleLiteral D_800E87C8 = { 1.2 }; +const FloatLiteral D_800E87D0 = { 0.8f }; +const FloatLiteral D_800E87D8 = { 1.2f }; +const FloatLiteral D_800E87E0 = { 1.1f }; +const DoubleLiteral D_800E87E8 = { 1.1 }; + +/*********************************/ + /************ .bss ************/ extern u8 D_80126CD0; diff --git a/src/unknown_0B8920.c b/src/unknown_0B8920.c index 4f5131d5..945947a4 100644 --- a/src/unknown_0B8920.c +++ b/src/unknown_0B8920.c @@ -330,6 +330,74 @@ u8* gzip_inflate_output = NULL; /*******************************/ +/************ .rodata ************/ + +const char D_800E9160[] = "\nCouldn't find a block to pick wave details from.\nUsing block 0 as default."; +const char D_800E91AC[] = "\n\nBlock may be specified using 'P' on water group node."; +const char D_800E91E4[] = "\nError :: can not remove a wave swell object which doesn't exist !"; +const char D_800E9228[] = "\nError :: more than eight swells overlap on column %d."; +const char D_800E9260[] = "\nError :: can not add another wave swell, reached limit of %d."; + +const FloatLiteral D_800E92A0 = { 10000.0f }; +const FloatLiteral D_800E92A4 = { -10000.0f }; +const FloatLiteral D_800E92A8 = { 6.64f }; +const FloatLiteral D_800E92AC = { 89128.961f }; +const FloatLiteral D_800E92B0 = { 6.5333333f }; +const FloatLiteral D_800E92B4 = { 89128.961f}; +const FloatLiteral D_800E92B8 = { 6.64f }; +const FloatLiteral D_800E92BC = { 89128.961f }; +const FloatLiteral D_800E92C0 = { 6.5333333f }; +const FloatLiteral D_800E92C4 = { 89128.961f }; + +// This is probably a file boundary. +const DoubleLiteral D_800E92C8 = { 0.0 }; + +// Jump table in func_800C01D8 +const u32 D_800E92D0[] = { + 0x800C0310, 0x800C0320, 0x800C0370, 0x800C03C0, + 0x800C03D0, 0x800C0420, 0x800C0470 +}; + +// Jump table in func_800C0494 +const u32 D_800E92EC[] = { + 0x800C056C, 0x800C0580, 0x800C0580, 0x800C0594, + 0x800C0580, 0x800C0580, 0x800C05A8 +}; + +const FloatLiteral D_800E9308 = { 1.4f }; +const FloatLiteral D_800E930C = { 1.2f }; + +// Jump table in func_800C05C8 +const u32 D_800E9310[] = { + 0x800C0680, 0x800C0694, 0x800C06A8, 0x800C06BC, + 0x800C06D0, 0x800C06E4, 0x800C06F8 +}; + +const FloatLiteral D_800E932C = { 1.2f }; + +// Jump table in func_800C38B4 +const u32 D_800E9330[] = { + 0x800C3958, 0x800C3984, 0x800C3A30, 0x800C3AA8, + 0x800C3ADC, 0x800C3B00, 0x800C3B2C, 0x800C3B50, + 0x800C3B88, 0x800C3BA0 +}; + +// This is probably a file boundary. +const DoubleLiteral D_800E9358 = { 0.0 }; + +// Jump table in func_800C45A4 +const u32 D_800E9360[] = { + 0x800C4A88, 0x800C4A78, 0x800C4AD0, 0x800C4AE8, + 0x800C4ADC, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, + 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, + 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, + 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, + 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4A6C +}; + + +/*********************************/ + /************ .bss ************/ extern s32 D_8012A0D8; From 9d7401bf281ff9b2f18394b51568efe7ed0f9b8b Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sun, 30 May 2021 21:13:46 -0500 Subject: [PATCH 22/66] Moved .rodata in unknown_066AA0 from asm to C. --- data/unknown_066AA0.rodata.s | 120 ------------------- data/unknown_09F8F0.rodata.s | 224 ----------------------------------- src/unknown_066AA0.c | 94 ++++++++++++--- 3 files changed, 80 insertions(+), 358 deletions(-) delete mode 100644 data/unknown_066AA0.rodata.s delete mode 100644 data/unknown_09F8F0.rodata.s diff --git a/data/unknown_066AA0.rodata.s b/data/unknown_066AA0.rodata.s deleted file mode 100644 index 51a76b17..00000000 --- a/data/unknown_066AA0.rodata.s +++ /dev/null @@ -1,120 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "Camera Error: Illegal mode!\n" -.aligned_text "Camera Error: Illegal player no!\n" -.aligned_text "cameraPushSprMtx: model stack overflow!!\n" -.aligned_text "\nCam do 2D sprite called with NULL pointer!" -.aligned_text "CamDo2DSprite FrameNo Overflow !!!\n" -.aligned_text "cameraPushModelMtx: model stack overflow!!\n" -.aligned_text "camPushModelMtx: bsp stack overflow!!\n" -.aligned_text "camPopModelMtx: model stack negative overflow!!\n" -.aligned_text "camPopModelMtx: bsp stack negative overflow!!\n" - -glabel D_800E7078 -.aligned_text "%x." - -glabel D_800E707C -.aligned_text "%x " - -glabel D_800E7084 -.aligned_text "\n" - -glabel D_800E7088 -.aligned_text "\n" - -glabel D_800E708C -.aligned_text "%f " - -glabel D_800E7094 -.aligned_text "\n" - -glabel D_800E7098 -.aligned_text "\n" - -glabel D_800E709C -.word 0x466A6000 - -glabel D_800E70A0 -.word 0x466A6000 - -glabel D_800E70A4 -.word 0x466A6000 -.word 0x00000000 -.word 0x00000000 - -.aligned_text "LOADLEVEL Error: Level out of range\n" -.aligned_text "BossLev problem\n" -.aligned_text "AITABLE Error: Table out of range\n" -.aligned_text "1.1605" -.aligned_text "02/10/97 16:03" -.aligned_text "pmountain" - -glabel D_800E7134 -.aligned_text "BBB\n" - -.aligned_text "CAR" -.aligned_text "HOV" -.aligned_text "PLN" -.aligned_text "Swapping\n" - -glabel D_800E7154 -.word 0x8006CF68 -.word 0x8006CF5C -.word 0x8006D024 -.word 0x8006CF80 -.word 0x8006CF9C -.word 0x8006D024 -.word 0x8006D024 -.word 0x8006CFB0 -.word 0x8006CFC4 -.word 0x8006CFD8 -.word 0x8006CFEC -.word 0x8006D000 -.word 0x8006D014 - -glabel D_800E7188 -.word 0x8006D0B8 -.word 0x8006D0C4 -.word 0x8006D108 -.word 0x8006D19C -.word 0x8006D14C -.word 0x8006D17C -.word 0x8006D188 -.word 0x8006D1C0 -.word 0x8006D1C0 -.word 0x8006D1C0 -.word 0x8006D1C0 -.word 0x8006D164 - -glabel D_800E71B8 -.word 0x8006D5FC -.word 0x8006D614 -.word 0x8006D62C -.word 0x8006D644 -.word 0x8006D65C -.word 0x8006D674 -.word 0x8006D6D4 -.word 0x8006D6F4 -.word 0x8006DF70 -.word 0x8006E00C -.word 0x8006E054 -.word 0x8006E0E0 - -glabel D_800E71D8 -.word 0x8006DEE8 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006E0E0 -.word 0x8006DF00 diff --git a/data/unknown_09F8F0.rodata.s b/data/unknown_09F8F0.rodata.s deleted file mode 100644 index 0172cdaa..00000000 --- a/data/unknown_09F8F0.rodata.s +++ /dev/null @@ -1,224 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -# glabel D_800E8640 -# .aligned_text "CAN'T" -# -# glabel D_800E8648 -# .aligned_text "SAVE" -# -# glabel D_800E8650 -# .aligned_text "GHOST" -# -# glabel D_800E8658 -# .aligned_text " CONTROLLER" -# -# glabel D_800E8664 -# .aligned_text "PAK" -# -# glabel D_800E8668 -# .aligned_text "FULL" -# -# glabel D_800E8670 -# .aligned_text " CONTROLLER" -# -# glabel D_800E867C -# .aligned_text "PAK" -# -# glabel D_800E8680 -# .aligned_text "DAMAGED" -# -# glabel D_800E8688 -# .aligned_text "RACE" -# -# glabel D_800E8690 -# .aligned_text "LAP" -# -# glabel D_800E8694 -# .aligned_text "DID NOT FINISH" -# -# .word 0x00000000 -# -# glabel D_800E86A8 -# .word 0x3FE33333 -# -# glabel D_800E86AC -# .word 0x33333333 -# .word 0x3FF33333 -# .word 0x33333333 -# -# glabel D_800E86B8 -# .word 0x43838000 -# -# glabel D_800E86BC -# .word 0x43818000 -# -# glabel D_800E86C0 -# .word 0x43848000 # 265.0f -# .word 0x00000000 -# .word 0x3FF33333 # 1.2 -# .word 0x33333333 -# .word 0x3FE33333 # 0.6 -# .word 0x33333333 -# .word 0x3FF33333 # 1.2 -# .word 0x33333333 -# .word 0x3FE33333 # 0.6 -# .word 0x33333333 -# -# glabel D_800E86E8 -# .word 0x3FF33333 # 1.2 -# -# glabel D_800E86EC -# .word 0x33333333 -# -# glabel D_800E86F0 -# .word 0x3FE33333 # 0.6 -# -# glabel D_800E86F4 -# .word 0x33333333 -# -# glabel D_800E86F8 -# .word 0x800A0F28 -# .word 0x800A0F38 -# .word 0x800A0F48 -# .word 0x800A0F58 -# .word 0x800A0F6C -# .word 0x800A0F80 -# .word 0x800A0F94 -# .word 0x800A0FAC -# -# glabel D_800E8718 -# .word 0x43898000 # 275.0f -# .word 0x00000000 -# -# glabel D_800E8720 -# .word 0x40508000 # 66.0 -# -# glabel D_800E8724 -# .word 0x00000000 -# -# glabel D_800E8728 -# .word 0x40508000 # 66.0 -# -# glabel D_800E872C -# .word 0x00000000 -# -# glabel D_800E8730 -# .word 0x40508000 # 66.0 -# -# glabel D_800E8734 -# .word 0x00000000 -# -# glabel D_800E8738 -# .word 0x3FF33333 # 1.2 -# -# glabel D_800E873C -# .word 0x33333333 -# -# glabel D_800E8740 -# .word 0x46C92000 # 25744.0f -# -# glabel D_800E8744 -# .word 0x800A63D8 -# .word 0x800A691C -# .word 0x800A6BCC -# .word 0x800A6CA4 -# .word 0x800A6D68 -# -# glabel D_800E8758 -# .word 0x3FF19999 # 1.1 -# -# glabel D_800E875C -# .word 0x9999999A -# -# glabel D_800E8760 -# .word 0x3FF19999 # 1.1 -# -# glabel D_800E8764 -# .word 0x9999999A -# -# glabel D_800E8768 -# .word 0x800A6E70 -# .word 0x800A6F3C -# .word 0x800A7014 -# .word 0x800A70D4 -# .word 0x800A7158 -# .word 0x00000000 -# -# glabel D_800E8780 -# .word 0x3FA7FF58 # 0.04687 -# -# glabel D_800E8784 -# .word 0x3A53B8E5 -# -# glabel D_800E8788 -# .word 0x40855544 # 682.6583 -# -# glabel D_800E878C -# .word 0x32CA57A8 -# -# glabel D_800E8790 -# .word 0x3FC70A3D # 0.18 -# -# glabel D_800E8794 -# .word 0x70A3D70A -# -# glabel D_800E8798 -# .word 0x3FA7FF58 # 0.04687 -# -# glabel D_800E879C -# .word 0x3A53B8E5 -# -# glabel D_800E87A0 -# .word 0x3FF19999 # 1.1 -# -# glabel D_800E87A4 -# .word 0x9999999A -# -# glabel D_800E87A8 -# .word 0x43358000 # 181.5f -# .word 0x00000000 -# .word 0x40508000 # 66.0 -# .word 0x00000000 -# -# glabel D_800E87B8 -# .word 0x40508000 # 66.0 -# -# glabel D_800E87BC -# .word 0x00000000 -# -# glabel D_800E87C0 -# .word 0x3FF19999 # 1.1 -# -# glabel D_800E87C4 -# .word 0x9999999A -# -# glabel D_800E87C8 -# .word 0x3FF33333 # 1.2 -# -# glabel D_800E87CC -# .word 0x33333333 -# -# glabel D_800E87D0 -# .word 0x3F4CCCCD # 0.8f -# -# glabel D_800E87D4 -# .word 0x3F99999A # 1.2f -# -# glabel D_800E87D8 -# .word 0x3F8CCCCD # 1.1f -# .word 0x00000000 -# -# glabel D_800E87E0 -# .word 0x3FF19999 # 1.1 -# -# glabel D_800E87E4 -# .word 0x9999999A -# .word 0x00000000 -# .word 0x00000000 diff --git a/src/unknown_066AA0.c b/src/unknown_066AA0.c index b5de06be..a216afb4 100644 --- a/src/unknown_066AA0.c +++ b/src/unknown_066AA0.c @@ -8,6 +8,78 @@ extern u32 osTvType; +/************ .rodata ************/ + +const char D_800E6F00[] = "Camera Error: Illegal mode!\n"; +const char D_800E6F20[] = "Camera Error: Illegal player no!\n"; +const char D_800E6F34[] = "cameraPushSprMtx: model stack overflow!!\n"; +const char D_800E6F70[] = "\nCam do 2D sprite called with NULL pointer!"; +const char D_800E6F9C[] = "CamDo2DSprite FrameNo Overflow !!!\n"; +const char D_800E6FC0[] = "cameraPushModelMtx: model stack overflow!!\n"; +const char D_800E6FEC[] = "camPushModelMtx: bsp stack overflow!!\n"; +const char D_800E7010[] = "camPopModelMtx: model stack negative overflow!!\n"; +const char D_800E7048[] = "camPopModelMtx: bsp stack negative overflow!!\n"; + +const char D_800E7078[] = "%x."; +const char D_800E707C[] = "%x "; +const char D_800E7084[] = "\n"; +const char D_800E7088[] = "\n"; +const char D_800E708C[] = "%f "; +const char D_800E7094[] = "\n"; +const char D_800E7098[] = "\n"; + +const FloatLiteral D_800E709C = { 15000.0f }; +const FloatLiteral D_800E70A0 = { 15000.0f }; +const FloatLiteral D_800E70A4 = { 15000.0f }; + +// This is probably a file boundary. +const DoubleLiteral D_800E70A8 = { 0.0 }; + +const char D_800E70B0[] = "LOADLEVEL Error: Level out of range\n"; +const char D_800E70D8[] = "BossLev problem\n"; +const char D_800E70EC[] = "AITABLE Error: Table out of range\n"; +const char D_800E7110[] = "1.1605"; +const char D_800E7118[] = "02/10/97 16:03"; +const char D_800E7128[] = "pmountain"; + +const char D_800E7134[] = "BBB\n"; +const char D_800E713C[] = "CAR"; +const char D_800E7140[] = "HOV"; +const char D_800E7144[] = "PLN"; +const char D_800E7148[] = "Swapping\n"; + +// Jump table in func_8006CCF0 +const u32 D_800E7154[] = { + 0x8006CF68, 0x8006CF5C, 0x8006D024, 0x8006CF80, + 0x8006CF9C, 0x8006D024, 0x8006D024, 0x8006CFB0, + 0x8006CFC4, 0x8006CFD8, 0x8006CFEC, 0x8006D000, + 0x8006D014 +}; + +// Jump table in func_8006CCF0 +const u32 D_800E7188[] = { + 0x8006D0B8, 0x8006D0C4, 0x8006D108, 0x8006D19C, + 0x8006D14C, 0x8006D17C, 0x8006D188, 0x8006D1C0, + 0x8006D1C0, 0x8006D1C0, 0x8006D1C0, 0x8006D164 +}; + +// Jump table in func_8006CCF0 +const u32 D_800E71B8[] = { + 0x8006D5FC, 0x8006D614, 0x8006D62C, 0x8006D644, + 0x8006D65C, 0x8006D674, 0x8006D6D4, 0x8006D6F4, + 0x8006DF70, 0x8006E00C, 0x8006E054, 0x8006E0E0 +}; + +// Jump table in func_8006DCF8 +const u32 D_800E71D8[] = { + 0x8006DEE8, 0x8006E0E0, 0x8006E0E0, 0x8006E0E0, + 0x8006E0E0, 0x8006E0E0, 0x8006E0E0, 0x8006E0E0, + 0x8006E0E0, 0x8006DF00 +}; + + +/*********************************/ + /************ .data ************/ s32 D_800DD060 = 0; // Currently unknown, might be a different type. @@ -145,10 +217,10 @@ s16 D_800DD32C = 0; s8 D_800DD330 = 0; -// Unused? Unsure on pointer type -s32 *D_800DD334[6] = { +// Unused? +char *D_800DD334[6] = { NULL, NULL, NULL, // These also could just be regular zeroes and not pointers. - 0x800E7110, 0x800E7118, 0x800E7128 + D_800E7110, D_800E7118, D_800E7128 }; // Unused? @@ -195,9 +267,9 @@ s32 D_800DD404 = 12; s32 D_800DD408 = 0x00FFFFFF; s32 D_800DD40C = 0x001EFFFF; // Unused? -// Unused? Unsure on pointer type -s32 *D_800DD410[3] = { - 0x800E713C, 0x800E7140, 0x800E7144 +// Unused? +char *D_800DD410[3] = { + D_800E713C, D_800E7140, D_800E7144 }; // Not sure if this is an array or a struct. @@ -208,16 +280,10 @@ s32 D_800DD41C[2] = { s32 D_800DD424[2] = { 0, 0x0104FFFF }; - -/*******************************/ - extern s32 D_800DFD94; /*******************************/ -extern f32 D_800E70A0; -extern f32 D_800E70A4; - /* Size: 0x44 bytes */ typedef struct unk80120AC0 { s16 unk0; @@ -375,13 +441,13 @@ f32 func_800660DC(void) { void func_800660EC(f32 arg0) { if (0.0f < arg0 && arg0 < 90.0f && arg0 != D_80120D10) { D_80120D10 = arg0; - guPerspectiveF(&D_80120EE0, &D_80120D6C, arg0, 1.33333333f, 10.0f, D_800E70A0, 1.0f); + guPerspectiveF(&D_80120EE0, &D_80120D6C, arg0, 1.33333333f, 10.0f, D_800E70A0.floatLiteral, 1.0f); func_8006F870(&D_80120EE0, &D_80120FE0); } } void func_80066194(void) { - guPerspectiveF(&D_80120EE0, &D_80120D6C, 60.0f, 1.33333333f, 10.0f, D_800E70A4, 1.0f); + guPerspectiveF(&D_80120EE0, &D_80120D6C, 60.0f, 1.33333333f, 10.0f, D_800E70A4.floatLiteral, 1.0f); func_8006F870(&D_80120EE0, &D_80120FE0); } From 3e4c4359603ab89288d8a8c647ee5511e35a0a8b Mon Sep 17 00:00:00 2001 From: David Benepe Date: Mon, 31 May 2021 13:49:08 -0500 Subject: [PATCH 23/66] Moved .rodata in unknown_0AEE70 from asm to C. --- data/unknown_0AEE70.rodata.s | 363 ----------------------------------- src/unknown_0AEE70.c | 153 +++++++++++++++ 2 files changed, 153 insertions(+), 363 deletions(-) delete mode 100644 data/unknown_0AEE70.rodata.s diff --git a/data/unknown_0AEE70.rodata.s b/data/unknown_0AEE70.rodata.s deleted file mode 100644 index 0da13905..00000000 --- a/data/unknown_0AEE70.rodata.s +++ /dev/null @@ -1,363 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -.aligned_text "\nMaximum limit of %d lens flare switches, per level, has been exceeded." - -.word 0x00000000 -.word 0x00000000 - -.aligned_text "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n" -.aligned_text "\n\nUnknown particle type in initParticleTrigger %d, Max %d.\n\n" -.aligned_text "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n" -.aligned_text "Sprite Particle buffer is full.\n" -.aligned_text "Triangle Particle buffer is full.\n" -.aligned_text "Rectangle Particle buffer is full.\n" -.aligned_text "Line Particle buffer is full.\n" -.aligned_text "Point Particle buffer is full.\n" -.aligned_text "\n\nCan't allocate space for unknown particle type." -.aligned_text "\n\nParticle has been freed twice, this is Super Safe, Honest!\n" -.aligned_text "\n\nSprite Particle Buffer is empty.\n\n" -.aligned_text "\n\nTriangle Particle Buffer is empty.\n\n" -.aligned_text "\n\nRectangle Particle Buffer is empty.\n\n" -.aligned_text "\n\nLine Particle buffer is empty.\n\n" -.aligned_text "\n\nPoint Particle buffer is empty.\n\n" -.aligned_text "\n\nCan't deallocate space for unknown particle type.\n\n" -.aligned_text "\nError :: trigger %x has no reference to point %x" -.aligned_text "\nError :: particle %x is not indexed correctly in trigger list %x (%d >> %p)" - -.word 0x00000000 - -glabel D_800E8B98 -.word 0x3EEFFFFF - -glabel D_800E8B9C -.word 0xFFE97B64 - -glabel D_800E8BA0 -.word 0x3EEFFFFF - -glabel D_800E8BA4 -.word 0xFFE97B64 - -glabel D_800E8BA8 -.word 0x3EEFFFFF - -glabel D_800E8BAC -.word 0xFFE97B64 - -glabel D_800E8BB0 -.word 0x3EEFFFFF - -glabel D_800E8BB4 -.word 0xFFE97B64 - -glabel D_800E8BB8 -.word 0x3EEFFFFF - -glabel D_800E8BBC -.word 0xFFE97B64 - -glabel D_800E8BC0 -.word 0x3EEFFFFF - -glabel D_800E8BC4 -.word 0xFFE97B64 - -glabel D_800E8BC8 -.word 0x3EEFFFFF - -glabel D_800E8BCC -.word 0xFFE97B64 - -glabel D_800E8BD0 -.word 0x3EEFFFFF - -glabel D_800E8BD4 -.word 0xFFE97B64 - -glabel D_800E8BD8 -.word 0x3DCCCCCD - -glabel D_800E8BDC -.word 0x800B2250 -.word 0x800B20E0 -.word 0x800B2138 -.word 0x800B2190 -.word 0x800B21E8 - -glabel D_800E8BF0 -.word 0x3DCCCCCD - -glabel D_800E8BF4 -.word 0x3C23D70A -.word 0x00000000 -.word 0x00000000 - -glabel D_800E8C00 -.aligned_text "0123456789abcdefghijklmnopqrstuvwxyz" - -glabel D_800E8C28 -.aligned_text "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" - -glabel D_800E8C50 -.word 0x00000000 - -glabel D_800E8C54 -.aligned_text "(null)" - -glabel D_800E8C5C -.aligned_text "(nil)" - -.aligned_text "*** diPrintf Error *** ---> Out of string space. (Print less text!)\n" - -glabel D_800E8CAC -.word 0x800B4BA4 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BBC -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BAC -.word 0x800B4BC8 -.word 0x800B4BB4 -.word 0x800B4BC8 -.word 0x800B4BC8 -.word 0x800B4BC4 - -glabel D_800E8CF0 -.word 0x800B4DB0 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DB8 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4D90 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4D98 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC4 -.word 0x800B4DC0 - -glabel D_800E8D88 -.word 0x800B52C4 -.word 0x800B5E0C -.word 0x800B5794 -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B4F84 -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5AC4 -.word 0x800B4E38 -.word 0x800B52C4 -.word 0x800B57A4 -.word 0x800B5794 -.word 0x800B5E0C -.word 0x800B4E38 -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5D78 -.word 0x800B4F64 -.word 0x800B5C8C -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B5B48 -.word 0x800B5E0C -.word 0x800B4F44 -.word 0x800B5E0C -.word 0x800B5E0C -.word 0x800B4FA4 - -glabel D_800E8E58 -.word 0x800B6658 -.word 0x800B6740 -.word 0x800B6614 -.word 0x800B6634 -.word 0x800B66CC - -.word 0x00000000 - -.aligned_text "\nAssertion failed: '%s' in file %s, line %d\n" -.aligned_text "\nAssertion failed: '%s' in file %s, line %d\n" -.aligned_text ">fault< " - -glabel D_800E8EDC -.aligned_text "CORE" - -glabel D_800E8EE4 -.word 0x00000000 - -glabel D_800E8EE8 -.aligned_text "CORE" - -glabel D_800E8EF0 -.word 0x00000000 - -glabel D_800E8EF4 -.aligned_text "CORE" - -glabel D_800E8EFC -.word 0x00000000 - -.aligned_text "setup" -.aligned_text "control" -.aligned_text "print" - -# EPC (Error program counter?) Lockup display strings, see: https://tcrf.net/Diddy_Kong_Racing#Crash_Debugger -glabel D_800E8F18 -.aligned_text " epc\t\t0x%08x\n" - -glabel D_800E8F28 -.aligned_text " cause\t\tmmAlloc(%d,0x%8x)\n" - -glabel D_800E8F44 -.aligned_text " object\t\t" - -glabel D_800E8F50 -.aligned_text "%s %d " - -glabel D_800E8F58 -.aligned_text "\n" - -glabel D_800E8F5C -.aligned_text "\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - -glabel D_800E8F6C -.aligned_text " Fault in thread %d\n" - -glabel D_800E8F84 -.aligned_text " epc\t\t0x%08x\n" - -glabel D_800E8F94 -.aligned_text " cause\t\t0x%08x\n" - -glabel D_800E8FA4 -.aligned_text " sr\t\t0x%08x\n" - -glabel D_800E8FB4 -.aligned_text " badvaddr\t0x%08x\n" - -glabel D_800E8FC8 -.aligned_text " object\t\t" - -glabel D_800E8FD4 -.aligned_text "%s %d " - -glabel D_800E8FDC -.aligned_text "\n" - -glabel D_800E8FE0 -.aligned_text " at 0x%08x v0 0x%08x v1 0x%08x\n" - -glabel D_800E9000 -.aligned_text " a0 0x%08x a1 0x%08x a2 0x%08x\n" - -glabel D_800E9020 -.aligned_text " a3 0x%08x t0 0x%08x t1 0x%08x\n" - -glabel D_800E9040 -.aligned_text " t2 0x%08x t3 0x%08x t4 0x%08x\n" - -glabel D_800E9060 -.aligned_text " t5 0x%08x t6 0x%08x t7 0x%08x\n" - -glabel D_800E9080 -.aligned_text " s0 0x%08x s1 0x%08x s2 0x%08x\n" - -glabel D_800E90A0 -.aligned_text " s3 0x%08x s4 0x%08x s5 0x%08x\n" - -glabel D_800E90C0 -.aligned_text " s6 0x%08x s7 0x%08x t8 0x%08x\n" - -glabel D_800E90E0 -.aligned_text " t9 0x%08x gp 0x%08x sp 0x%08x\n" - -glabel D_800E9100 -.aligned_text " s8 0x%08x ra 0x%08x\n\n" -glabel D_800E9118 -.aligned_text " %08x %08x %08x\n" - -glabel D_800E912C -.aligned_text " " - -glabel D_800E9130 -.aligned_text "%04x " - -glabel D_800E9138 -.aligned_text "\n" - -### End of EPC lockup strings ### - -glabel D_800E913C -.word 0x800B7898 -.word 0x800B7C18 -.word 0x800B7C18 -.word 0x800B7C18 -.word 0x800B7C70 -.word 0x800B7CE4 - -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_0AEE70.c b/src/unknown_0AEE70.c index 4af88825..9d468239 100644 --- a/src/unknown_0AEE70.c +++ b/src/unknown_0AEE70.c @@ -172,6 +172,159 @@ s32 *D_800E302C[3] = { }; /*******************************/ +/************ .rodata ************/ + +const char D_800E87F0[] = "\nMaximum limit of %d lens flare switches, per level, has been exceeded."; + +// This is probably a file boundary. +const DoubleLiteral D_800E8838 = { 0.0 }; + +const char D_800E8840[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; +const char D_800E887C[] = "\n\nUnknown particle type in initParticleTrigger %d, Max %d.\n\n"; +const char D_800E88BC[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; +const char D_800E88F8[] = "Sprite Particle buffer is full.\n"; +const char D_800E891C[] = "Triangle Particle buffer is full.\n"; +const char D_800E8940[] = "Rectangle Particle buffer is full.\n"; +const char D_800E8964[] = "Line Particle buffer is full.\n"; +const char D_800E8980[] = "Point Particle buffer is full.\n"; +const char D_800E89A4[] = "\n\nCan't allocate space for unknown particle type."; +const char D_800E89D8[] = "\n\nParticle has been freed twice, this is Super Safe, Honest!\n"; +const char D_800E8A18[] = "\n\nSprite Particle Buffer is empty.\n\n"; +const char D_800E8A40[] = "\n\nTriangle Particle Buffer is empty.\n\n"; +const char D_800E8A68[] = "\n\nRectangle Particle Buffer is empty.\n\n"; +const char D_800E8A90[] = "\n\nLine Particle buffer is empty.\n\n"; +const char D_800E8AB4[] = "\n\nPoint Particle buffer is empty.\n\n"; +const char D_800E8AD8[] = "\n\nCan't deallocate space for unknown particle type.\n\n"; +const char D_800E8B10[] = "\nError :: trigger %x has no reference to point %x"; +const char D_800E8B44[] = "\nError :: particle %x is not indexed correctly in trigger list %x (%d >> %p)"; + +const DoubleLiteral D_800E8B98 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BA0 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BA8 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BB0 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BB8 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BC0 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BC8 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BD0 = { 0.00001525878906 }; +const FloatLiteral D_800E8BD8 = { 0.1f }; + +// Jump table in func_800B2040 +const u32 D_800E8BDC[] = { + 0x800B2250, 0x800B20E0, 0x800B2138, 0x800B2190, + 0x800B21E8 +}; + +const FloatLiteral D_800E8BF0 = { 0.1f }; +const FloatLiteral D_800E8BF4 = { 0.01f }; + +// This is probably another file boundary. +const DoubleLiteral D_800E8BF8 = { 0.0 }; + +const char D_800E8C00[] = "0123456789abcdefghijklmnopqrstuvwxyz"; +const char D_800E8C28[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +const char D_800E8C50[] = ""; +const char D_800E8C54[] = "(null)"; +const char D_800E8C5C[] = "(nil)"; +const char D_800E8C64[] = "*** diPrintf Error *** ---> Out of string space. (Print less text!)\n"; + +// Jump table in func_800B4A40 +const u32 D_800E8CAC[] = { + 0x800B4BA4, 0x800B4BC8, 0x800B4BC8, 0x800B4BBC, + 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, + 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BAC, + 0x800B4BC8, 0x800B4BB4, 0x800B4BC8, 0x800B4BC8, + 0x800B4BC4 +}; + +// Jump table in func_800B4A40 +const u32 D_800E8CF0[] = { + 0x800B4DB0, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DB8, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4D90, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4D98, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC0 +}; + +// Jump table in func_800B4A40 +const u32 D_800E8D88[] = { + 0x800B52C4, 0x800B5E0C, 0x800B5794, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B4F84, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5AC4, 0x800B4E38, + 0x800B52C4, 0x800B57A4, 0x800B5794, 0x800B5E0C, + 0x800B4E38, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5D78, 0x800B4F64, 0x800B5C8C, + 0x800B5E0C, 0x800B5E0C, 0x800B5B48, 0x800B5E0C, + 0x800B4F44, 0x800B5E0C, 0x800B5E0C, 0x800B4FA4 +}; + +// Jump table in func_800B653C +const u32 D_800E8E58[] = { + 0x800B6658, 0x800B6740, 0x800B6614, 0x800B6634, + 0x800B66CC +}; + +// This is probably another file boundary. +const FloatLiteral D_800E8E6C = { 0.0f }; + +const char D_800E8E70[] = "\nAssertion failed: '%s' in file %s, line %d\n"; +const char D_800E8EA0[] = "\nAssertion failed: '%s' in file %s, line %d\n"; +const char D_800E8ED0[] = ">fault< "; +const char D_800E8EDC[] = "CORE\0\0\0\0"; +const char D_800E8EE8[] = "CORE\0\0\0\0"; +const char D_800E8EF4[] = "CORE\0\0\0\0"; + +const char D_800E8F00[] = "setup"; +const char D_800E8F08[] = "control"; +const char D_800E8F10[] = "print"; + +// EPC (Error program counter?) Lockup display strings, see: https://tcrf.net/Diddy_Kong_Racing#Crash_Debugger +const char D_800E8F18[] = " epc\t\t0x%08x\n"; +const char D_800E8F28[] = " cause\t\tmmAlloc(%d,0x%8x)\n"; +const char D_800E8F44[] = " object\t\t"; +const char D_800E8F50[] = "%s %d "; +const char D_800E8F58[] = "\n"; +const char D_800E8F5C[] = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; +const char D_800E8F6C[] = " Fault in thread %d\n"; +const char D_800E8F84[] = " epc\t\t0x%08x\n"; +const char D_800E8F94[] = " cause\t\t0x%08x\n"; +const char D_800E8FA4[] = " sr\t\t0x%08x\n"; +const char D_800E8FB4[] = " badvaddr\t0x%08x\n"; +const char D_800E8FC8[] = " object\t\t"; +const char D_800E8FD4[] = "%s %d "; +const char D_800E8FDC[] = "\n"; +const char D_800E8FE0[] = " at 0x%08x v0 0x%08x v1 0x%08x\n"; +const char D_800E9000[] = " a0 0x%08x a1 0x%08x a2 0x%08x\n"; +const char D_800E9020[] = " a3 0x%08x t0 0x%08x t1 0x%08x\n"; +const char D_800E9040[] = " t2 0x%08x t3 0x%08x t4 0x%08x\n"; +const char D_800E9060[] = " t5 0x%08x t6 0x%08x t7 0x%08x\n"; +const char D_800E9080[] = " s0 0x%08x s1 0x%08x s2 0x%08x\n"; +const char D_800E90A0[] = " s3 0x%08x s4 0x%08x s5 0x%08x\n"; +const char D_800E90C0[] = " s6 0x%08x s7 0x%08x t8 0x%08x\n"; +const char D_800E90E0[] = " t9 0x%08x gp 0x%08x sp 0x%08x\n"; +const char D_800E9100[] = " s8 0x%08x ra 0x%08x\n\n"; +const char D_800E9118[] = " %08x %08x %08x\n"; +const char D_800E912C[] = " "; +const char D_800E9130[] = "%04x "; +const char D_800E9138[] = "\n"; +// End of EPC lockup strings + +// Jump table in func_800B7810 +const u32 D_800E913C[] = { + 0x800B7898, 0x800B7C18, 0x800B7C18, 0x800B7C18, + 0x800B7C70, 0x800B7CE4 +}; + +/*********************************/ void func_800AE2D8(void); void func_800AE374(void); From e1675f4cc0ac5189ec9d36aed26cc7c5333add3d Mon Sep 17 00:00:00 2001 From: David Benepe Date: Mon, 31 May 2021 18:43:02 -0500 Subject: [PATCH 24/66] Moved .rodata in unknown_043920 from asm to C. --- data/unknown_043920.rodata.s | 1185 ---------------------------------- src/unknown_043920.c | 300 ++++++++- 2 files changed, 290 insertions(+), 1195 deletions(-) delete mode 100644 data/unknown_043920.rodata.s diff --git a/data/unknown_043920.rodata.s b/data/unknown_043920.rodata.s deleted file mode 100644 index 7623e2fb..00000000 --- a/data/unknown_043920.rodata.s +++ /dev/null @@ -1,1185 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E6280 -.aligned_text "%.1f,%.1f,%.1f\n" # Used with the Print Coordinates cheat? -.aligned_text "Chk ovflow!!\n" -.aligned_text "Back\n" - -glabel D_800E62A8 -.word 0xC0A38800 - -glabel D_800E62AC -.word 0x00000000 - -glabel D_800E62B0 -.word 0x3F999999 - -glabel D_800E62B4 -.word 0x9999999A - -glabel D_800E62B8 -.word 0x3FE1F3B6 - -glabel D_800E62BC -.word 0x45A1CAC1 - -glabel D_800E62C0 -.word 0x3F70624D - -glabel D_800E62C4 -.word 0xD2F1A9FC - -glabel D_800E62C8 -.word 0x3F999999 - -glabel D_800E62CC -.word 0x9999999A - -glabel D_800E62D0 -.word 0x3FE1F3B6 - -glabel D_800E62D4 -.word 0x45A1CAC1 - -glabel D_800E62D8 -.word 0x3F70624D - -glabel D_800E62DC -.word 0xD2F1A9FC - -glabel D_800E62E0 -.word 0x3FC99999 - -glabel D_800E62E4 -.word 0x9999999A - -glabel D_800E62E8 -.word 0x3F70624D - -glabel D_800E62EC -.word 0xD2F1A9FC - -glabel D_800E62F0 -.word 0x3FE30A3D - -glabel D_800E62F4 -.word 0x70A3D70A - -glabel D_800E62F8 -.word 0x3F999999 - -glabel D_800E62FC -.word 0x9999999A - -glabel D_800E6300 -.word 0x407F4000 - -glabel D_800E6304 -.word 0x00000000 - -glabel D_800E6308 -.word 0x40845000 - -glabel D_800E630C -.word 0x00000000 - -glabel D_800E6310 -.word 0xBFD33333 - -glabel D_800E6314 -.word 0x33333333 - -glabel D_800E6318 -.word 0x800446AC -.word 0x80044A04 -.word 0x80044A04 -.word 0x80044A04 -.word 0x80044A04 -.word 0x80044F54 -.word 0x80044A04 - -glabel D_800E6334 -.word 0x80044A2C -.word 0x80044A44 -.word 0x80044A60 -.word 0x80044A94 -.word 0x80044ADC -.word 0x80044AC8 -.word 0x00000000 - -glabel D_800E6350 -.word 0x4072C000 - -glabel D_800E6354 -.word 0x00000000 - -glabel D_800E6358 -.word 0x800456A0 -.word 0x800456A8 -.word 0x800456B0 -.word 0x800456BC -.word 0x800456CC -.word 0x800456D4 -.word 0x800456B0 -.word 0x800456DC - -glabel D_800E6378 -.word 0x49742400 - -glabel D_800E637C -.word 0x80045ADC -.word 0x80045AF8 -.word 0x80045B30 -.word 0x80045B30 -.word 0x80045B58 -.word 0x80045B70 -.word 0x80045BB8 -.word 0x80045ADC -.word 0x00000000 - -glabel D_800E63A0 -.word 0x407F4000 - -glabel D_800E63A4 -.word 0x00000000 - -glabel D_800E63A8 -.word 0x3FF26666 - -glabel D_800E63AC -.word 0x66666666 - -glabel D_800E63B0 -.word 0x3F90624D - -glabel D_800E63B4 -.word 0xD2F1A9FC - -glabel D_800E63B8 -.word 0x3F90624D - -glabel D_800E63BC -.word 0xD2F1A9FC - -glabel D_800E63C0 -.word 0x3FF33333 - -glabel D_800E63C4 -.word 0x33333333 - -glabel D_800E63C8 -.word 0x3FA78D4F - -glabel D_800E63CC -.word 0xDF3B645A - -glabel D_800E63D0 -.word 0x3FF33333 - -glabel D_800E63D4 -.word 0x33333333 - -glabel D_800E63D8 -.word 0x3F99999A -.word 0x00000000 - -glabel D_800E63E0 -.word 0x3FA78D4F - -glabel D_800E63E4 -.word 0xDF3B645A - -glabel D_800E63E8 -.word 0x3FD33333 - -glabel D_800E63EC -.word 0x33333333 - -glabel D_800E63F0 -.word 0x3B83126F -.word 0x00000000 - -glabel D_800E63F8 -.word 0x3F999999 - -glabel D_800E63FC -.word 0x9999999A - -glabel D_800E6400 -.word 0x4072C000 - -glabel D_800E6404 -.word 0x00000000 - -glabel D_800E6408 -.word 0x3F947AE1 - -glabel D_800E640C -.word 0x47AE147B - -glabel D_800E6410 -.word 0x3FFB3333 - -glabel D_800E6414 -.word 0x33333333 - -glabel D_800E6418 -.word 0x3FD66666 - -glabel D_800E641C -.word 0x66666666 - -glabel D_800E6420 -.word 0x3FC99999 - -glabel D_800E6424 -.word 0x9999999A - -glabel D_800E6428 -.word 0x3FB1EB85 - -glabel D_800E642C -.word 0x1EB851EC - -glabel D_800E6430 -.word 0x3FE99999 - -glabel D_800E6434 -.word 0x9999999A - -glabel D_800E6438 -.word 0x3FE4CCCC - -glabel D_800E643C -.word 0xCCCCCCCD - -glabel D_800E6440 -.word 0x3FE4CCCC - -glabel D_800E6444 -.word 0xCCCCCCCD - -glabel D_800E6448 -.word 0x40418000 - -glabel D_800E644C -.word 0x00000000 - -glabel D_800E6450 -.word 0xC61C4000 -.word 0x00000000 - -glabel D_800E6458 -.word 0x3FE99999 - -glabel D_800E645C -.word 0x9999999A - -glabel D_800E6460 -.word 0x3FA99999 - -glabel D_800E6464 -.word 0x9999999A - -glabel D_800E6468 -.word 0x3DE147AE - -glabel D_800E646C -.word 0x80048D40 -.word 0x80048D40 -.word 0x80048E50 -.word 0x80048DAC -.word 0x80048E18 -.word 0x80048DB8 -.word 0x00000000 - -glabel D_800E6488 -.word 0x3FE66666 - -glabel D_800E648C -.word 0x66666666 - -glabel D_800E6490 -.word 0x40348000 - -glabel D_800E6494 -.word 0x00000000 - -glabel D_800E6498 -.word 0x40504000 - -glabel D_800E649C -.word 0x00000000 - -glabel D_800E64A0 -.word 0x3FC55555 - -glabel D_800E64A4 -.word 0x55555555 - -glabel D_800E64A8 -.word 0x3FF170A3 - -glabel D_800E64AC -.word 0xD70A3D71 - -glabel D_800E64B0 -.word 0x3FD99999 - -glabel D_800E64B4 -.word 0x9999999A - -glabel D_800E64B8 -.word 0x3F847AE1 - -glabel D_800E64BC -.word 0x47AE147B - -glabel D_800E64C0 -.word 0x3F847AE1 - -glabel D_800E64C4 -.word 0x47AE147B - -glabel D_800E64C8 -.word 0x3F90624D - -glabel D_800E64CC -.word 0xD2F1A9FC - -glabel D_800E64D0 -.word 0x3FF33333 - -glabel D_800E64D4 -.word 0x33333333 - -glabel D_800E64D8 -.word 0x3F99999A -.word 0x00000000 - -glabel D_800E64E0 -.word 0x3F90624D - -glabel D_800E64E4 -.word 0xD2F1A9FC - -glabel D_800E64E8 -.word 0x3FB33333 - -glabel D_800E64EC -.word 0x3C23D70A - -glabel D_800E64F0 -.word 0x3CA3D70A - -glabel D_800E64F4 -.word 0x3B83126F - -glabel D_800E64F8 -.word 0x3FE33333 - -glabel D_800E64FC -.word 0x33333333 - -glabel D_800E6500 -.word 0x3FD33333 - -glabel D_800E6504 -.word 0x33333333 - -glabel D_800E6508 -.word 0x3F99999A -.word 0x00000000 - -glabel D_800E6510 -.word 0x3F23A92A - -glabel D_800E6514 -.word 0x30553261 - -glabel D_800E6518 -.word 0x3FFCCCCC - -glabel D_800E651C -.word 0xCCCCCCCD - -glabel D_800E6520 -.word 0x3FD99999 - -glabel D_800E6524 -.word 0x9999999A - -glabel D_800E6528 -.word 0x3ECCCCCD -.word 0x00000000 - -glabel D_800E6530 -.word 0x3FAE1E1E - -glabel D_800E6534 -.word 0x1E1E1E1E - -glabel D_800E6538 -.word 0x3FA99999 - -glabel D_800E653C -.word 0x9999999A - -glabel D_800E6540 -.word 0x3FE4CCCC - -glabel D_800E6544 -.word 0xCCCCCCCD - -glabel D_800E6548 -.word 0x3FE4CCCC - -glabel D_800E654C -.word 0xCCCCCCCD - -glabel D_800E6550 -.word 0x3FE66666 - -glabel D_800E6554 -.word 0x66666666 - -glabel D_800E6558 -.word 0x3FD99999 - -glabel D_800E655C -.word 0x9999999A - -glabel D_800E6560 -.word 0x3F76C16C - -glabel D_800E6564 -.word 0x16C16C17 - -glabel D_800E6568 -.word 0x3ECCCCCD -.word 0x00000000 - -glabel D_800E6570 -.word 0x40504000 - -glabel D_800E6574 -.word 0x00000000 - -glabel D_800E6578 -.word 0x3FC99999 - -glabel D_800E657C -.word 0x9999999A - -glabel D_800E6580 -.word 0x3FA66666 - -glabel D_800E6584 -.word 0x3DCCCCCD - -glabel D_800E6588 -.word 0x3B03126F - -glabel D_800E658C -.word 0x3C23D70A - -glabel D_800E6590 -.word 0x3FF33333 - -glabel D_800E6594 -.word 0x33333333 - -glabel D_800E6598 -.word 0x3FDCCCCC - -glabel D_800E659C -.word 0xCCCCCCCD - -glabel D_800E65A0 -.word 0xBCA3D70A - -glabel D_800E65A4 -.word 0x3F5EB852 - -glabel D_800E65A8 -.word 0x3F666666 - -glabel D_800E65AC -.word 0xC61C4000 - -glabel D_800E65B0 -.word 0x8004EB84 -.word 0x8004EBBC -.word 0x8004EBD8 -.word 0x8004EBF4 -.word 0x8004EBA0 -.word 0x8004EC10 -.word 0x8004EC50 -.word 0x8004EC90 -.word 0x8004EC90 -.word 0x8004ED88 -.word 0x8004EBF4 -.word 0x8004ECD0 -.word 0x8004ED10 -.word 0x8004ED50 - -glabel D_800E65E8 -.word 0x3F8F5C29 - -glabel D_800E65EC -.word 0x3CA3D70A - -glabel D_800E65F0 -.word 0xBCA3D70A - -glabel D_800E65F4 -.word 0x43848000 - -glabel D_800E65F8 -.word 0x40977000 - -glabel D_800E65FC -.word 0x00000000 - -glabel D_800E6600 -.word 0x3FB0A3D7 - -glabel D_800E6604 -.word 0x0A3D70A4 - -glabel D_800E6608 -.word 0x3FD33333 - -glabel D_800E660C -.word 0x33333333 - -glabel D_800E6610 -.word 0x3FB99999 - -glabel D_800E6614 -.word 0x9999999A - -glabel D_800E6618 -.word 0x3FD33333 - -glabel D_800E661C -.word 0x33333333 - -glabel D_800E6620 -.word 0x3FB99999 - -glabel D_800E6624 -.word 0x9999999A - -glabel D_800E6628 -.word 0x3F70624D - -glabel D_800E662C -.word 0xD2F1A9FC - -glabel D_800E6630 -.word 0x3FE4CCCC - -glabel D_800E6634 -.word 0xCCCCCCCD - -glabel D_800E6638 -.word 0x3F999999 - -glabel D_800E663C -.word 0x99999999 - -glabel D_800E6640 -.word 0x3FD99999 - -glabel D_800E6644 -.word 0x9999999A - -glabel D_800E6648 -.word 0x3FF19999 - -glabel D_800E664C -.word 0x9999999A - -glabel D_800E6650 -.word 0xBFD33333 - -glabel D_800E6654 -.word 0x33333333 - -glabel D_800E6658 -.word 0x3FD33333 - -glabel D_800E665C -.word 0x33333333 - -glabel D_800E6660 -.word 0x3CA3D70A -.word 0x00000000 - -glabel D_800E6668 -.word 0x3FECCCCC - -glabel D_800E666C -.word 0xCCCCCCCD - -glabel D_800E6670 -.word 0x3FE66666 - -glabel D_800E6674 -.word 0x66666666 - -glabel D_800E6678 -.word 0x3FFB3333 - -glabel D_800E667C -.word 0x33333333 - -glabel D_800E6680 -.word 0x3FC33333 - -glabel D_800E6684 -.word 0x33333333 - -glabel D_800E6688 -.word 0x3FD33333 - -glabel D_800E668C -.word 0x33333333 - -glabel D_800E6690 -.word 0x3FD47AE1 - -glabel D_800E6694 -.word 0x47AE147B - -glabel D_800E6698 -.word 0xBFA47AE1 - -glabel D_800E669C -.word 0x47AE147B - -glabel D_800E66A0 -.word 0x3FA47AE1 - -glabel D_800E66A4 -.word 0x47AE147B - -glabel D_800E66A8 -.word 0x3FECCCCC - -glabel D_800E66AC -.word 0xCCCCCCCD - -glabel D_800E66B0 -.word 0x3FD33333 - -glabel D_800E66B4 -.word 0x33333333 - -glabel D_800E66B8 -.word 0x3FB99999 - -glabel D_800E66BC -.word 0x9999999A - -glabel D_800E66C0 -.word 0x3DCCCCCD -.word 0x00000000 - -glabel D_800E66C8 -.word 0x3FA99999 - -glabel D_800E66CC -.word 0x9999999A - -glabel D_800E66D0 -.word 0x80052678 -.word 0x80052978 -.word 0x80052978 -.word 0x800527AC -.word 0x8005280C -.word 0x80052858 -.word 0x800528A4 -.word 0x80052910 - -glabel D_800E66F0 -.word 0x3FEF0A3D - -glabel D_800E66F4 -.word 0x70A3D70A - -glabel D_800E66F8 -.word 0x3FEBD70A - -glabel D_800E66FC -.word 0x3D70A3D7 - -glabel D_800E6700 -.word 0x3FECCCCC - -glabel D_800E6704 -.word 0xCCCCCCCD - -glabel D_800E6708 -.word 0x3FD33333 - -glabel D_800E670C -.word 0x33333333 - -glabel D_800E6710 -.word 0x3FF99999 - -glabel D_800E6714 -.word 0x9999999A - -glabel D_800E6718 -.word 0x3F999999 - -glabel D_800E671C -.word 0x9999999A - -glabel D_800E6720 -.word 0x3EE66666 -.word 0x00000000 - -glabel D_800E6728 -.word 0x3FEF0A3D - -glabel D_800E672C -.word 0x70A3D70A - -glabel D_800E6730 -.word 0x3FC99999 - -glabel D_800E6734 -.word 0x9999999A - -glabel D_800E6738 -.word 0x3FC99999 - -glabel D_800E673C -.word 0x9999999A - -glabel D_800E6740 -.word 0x3FF547AE - -glabel D_800E6744 -.word 0x147AE148 - -glabel D_800E6748 -.word 0x3FE0F5C2 - -glabel D_800E674C -.word 0x8F5C28F6 - -glabel D_800E6750 -.word 0x3FFCCCCC - -glabel D_800E6754 -.word 0xCCCCCCCD - -glabel D_800E6758 -.word 0x3FE66666 -.word 0x00000000 - -glabel D_800E6760 -.word 0x3FC99999 - -glabel D_800E6764 -.word 0x9999999A - -glabel D_800E6768 -.word 0x3FB99999 - -glabel D_800E676C -.word 0x9999999A - -glabel D_800E6770 -.word 0x3FC99999 -.word 0x9999999A - -glabel D_800E6778 -.word 0x3FA99999 -.word 0x9999999A - -glabel D_800E6780 -.word 0x3FB99999 - -glabel D_800E6784 -.word 0x9999999A - -glabel D_800E6788 -.word 0x3FD99999 - -glabel D_800E678C -.word 0x9999999A - -glabel D_800E6790 -.word 0x3FB99999 - -glabel D_800E6794 -.word 0x9999999A - -glabel D_800E6798 -.word 0x3FF66666 - -glabel D_800E679C -.word 0x66666666 - -glabel D_800E67A0 -.word 0x3DCCCCCD - -glabel D_800E67A4 -.word 0x80053FF0 -.word 0x8005406C -.word 0x800540FC -.word 0x8005408C -.word 0x800540C4 -.word 0x80054098 -.word 0x00000000 - -glabel D_800E67C0 -.word 0x40348000 - -glabel D_800E67C4 -.word 0x00000000 - -glabel D_800E67C8 -.word 0x3FD33333 - -glabel D_800E67CC -.word 0x33333333 - -glabel D_800E67D0 -.word 0x3FB99999 - -glabel D_800E67D4 -.word 0x9999999A - -glabel D_800E67D8 -.word 0x3FD33333 - -glabel D_800E67DC -.word 0x33333333 - -glabel D_800E67E0 -.word 0x3FB99999 - -glabel D_800E67E4 -.word 0x9999999A - -glabel D_800E67E8 -.word 0xBFD33333 - -glabel D_800E67EC -.word 0x33333333 - -glabel D_800E67F0 -.word 0x3FD33333 - -glabel D_800E67F4 -.word 0x33333333 - -glabel D_800E67F8 -.word 0x3FECCCCC - -glabel D_800E67FC -.word 0xCCCCCCCD - -glabel D_800E6800 -.word 0x3CA3D70A -.word 0x00000000 - -glabel D_800E6808 -.word 0x3FFB3333 - -glabel D_800E680C -.word 0x33333333 - -glabel D_800E6810 -.word 0x3FC33333 - -glabel D_800E6814 -.word 0x33333333 - -glabel D_800E6818 -.word 0x3FD47AE1 - -glabel D_800E681C -.word 0x47AE147B - -glabel D_800E6820 -.word 0xBFA47AE1 - -glabel D_800E6824 -.word 0x47AE147B - -glabel D_800E6828 -.word 0x3FA47AE1 - -glabel D_800E682C -.word 0x47AE147B - -glabel D_800E6830 -.word 0x3FECCCCC - -glabel D_800E6834 -.word 0xCCCCCCCD - -glabel D_800E6838 -.word 0x3FF13333 - -glabel D_800E683C -.word 0x33333333 - -glabel D_800E6840 -.word 0x3FC33333 - -glabel D_800E6844 -.word 0x33333333 - -glabel D_800E6848 -.word 0x3FE66666 - -glabel D_800E684C -.word 0x66666666 - -glabel D_800E6850 -.word 0x44BB8000 - -glabel D_800E6854 -.word 0x8005635C -.word 0x80056370 -.word 0x80056380 -.word 0x8005639C -.word 0x800563EC -.word 0x80056508 -.word 0x8005655C -.word 0x80056508 -.word 0x800563EC -.word 0x80056620 -.word 0x800563CC -.word 0x80056380 -.word 0x800565C0 -.word 0x800565E0 -.word 0x80056600 -.word 0x800563EC -.word 0x80056828 - -glabel D_800E6894 -.word 0x80056834 -.word 0x80056840 -.word 0x8005684C -.word 0x80056884 -.word 0x80056884 -.word 0x80056884 -.word 0x80056884 -.word 0x80056884 -.word 0x80056884 -.word 0x80056874 -.word 0x80056880 - -glabel D_800E68C4 -.word 0x461C4000 - -glabel D_800E68C8 -.word 0x461C4000 - -glabel D_800E68CC -.word 0x3CCCCCCD - -glabel D_800E68D0 -.word 0x80057BBC -.word 0x80057BE4 -.word 0x80057CD0 -.word 0x80057C0C -.word 0x80057C34 -.word 0x80057C5C -.word 0x80057C84 -.word 0x80057CAC - -glabel D_800E68F0 -.word 0x4056F000 - -glabel D_800E68F4 -.word 0x00000000 - -glabel D_800E68F8 -.word 0x40568000 - -glabel D_800E68FC -.word 0x00000000 - -glabel D_800E6900 -.word 0x40484000 - -glabel D_800E6904 -.word 0x00000000 - -glabel D_800E6908 -.word 0x3FEE6666 - -glabel D_800E690C -.word 0x66666666 - -glabel D_800E6910 -.word 0x40504000 - -glabel D_800E6914 -.word 0x00000000 - -glabel D_800E6918 -.word 0x3FF4CCCC - -glabel D_800E691C -.word 0xCCCCCCCD - -glabel D_800E6920 -.word 0xBFC99999 - -glabel D_800E6924 -.word 0x9999999A - -glabel D_800E6928 -.word 0x3FF33333 - -glabel D_800E692C -.word 0x33333333 - -glabel D_800E6930 -.word 0x3FF33333 - -glabel D_800E6934 -.word 0x33333333 - -glabel D_800E6938 -.word 0x3FE99999 - -glabel D_800E693C -.word 0x9999999A - -glabel D_800E6940 -.word 0x3FDCCCCC - -glabel D_800E6944 -.word 0xCCCCCCCD - -glabel D_800E6948 -.word 0xBCA3D70A - -glabel D_800E694C -.word 0x49742400 - -glabel D_800E6950 -.word 0x41038800 - -glabel D_800E6954 -.word 0x00000000 - -glabel D_800E6958 -.word 0x3F4CCCCD -.word 0x00000000 - -glabel D_800E6960 -.word 0x41038800 - -glabel D_800E6964 -.word 0x00000000 - -glabel D_800E6968 -.word 0x8005AF80 -.word 0x8005AFD8 -.word 0x8005B004 -.word 0x8005B030 -.word 0x8005AFAC -.word 0x8005B05C -.word 0x8005B094 -.word 0x8005B0CC -.word 0x8005B0CC -.word 0x8005B1B0 -.word 0x8005B030 -.word 0x8005B10C -.word 0x8005B144 -.word 0x8005B17C - -glabel D_800E69A0 -.word 0x3FECCCCC - -glabel D_800E69A4 -.word 0xCCCCCCCD - -glabel D_800E69A8 -.word 0x3CA3D70A - -glabel D_800E69AC -.word 0xBCA3D70A - -glabel D_800E69B0 -.word 0x43848000 -.word 0x00000000 - -glabel D_800E69B8 -.word 0x40977000 - -glabel D_800E69BC -.word 0x00000000 - -glabel D_800E69C0 -.word 0x3F999999 - -glabel D_800E69C4 -.word 0x9999999A - -glabel D_800E69C8 -.word 0x3FE30A3D - -glabel D_800E69CC -.word 0x70A3D70A - -glabel D_800E69D0 -.word 0x3F70624D - -glabel D_800E69D4 -.word 0xD2F1A9FC - -glabel D_800E69D8 -.word 0x3FF4CCCC - -glabel D_800E69DC -.word 0xCCCCCCCD - -glabel D_800E69E0 -.word 0x4062C000 - -glabel D_800E69E4 -.word 0x00000000 - -glabel D_800E69E8 -.word 0x3C23D70A -.word 0x00000000 - -glabel D_800E69F0 -.word 0x3F847AE1 - -glabel D_800E69F4 -.word 0x47AE147B - -glabel D_800E69F8 -.word 0x40418000 - -glabel D_800E69FC -.word 0x00000000 - -glabel D_800E6A00 -.word 0x3D4CCCCD -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_043920.c b/src/unknown_043920.c index 38febf2c..b412ff4f 100644 --- a/src/unknown_043920.c +++ b/src/unknown_043920.c @@ -116,11 +116,291 @@ s16 D_800DCDD4[4] = { /************ .rodata ************/ -extern f64 D_800E6768; -extern f64 D_800E6770; -extern f64 D_800E6778; -extern f64 D_800E6780; -extern f32 D_800E6A00; +const char D_800E6280[] = "%.1f,%.1f,%.1f\n"; +const char D_800E6290[] = "Chk ovflow!!\n"; +const char D_800E62A0[] = "Back\n"; + +const DoubleLiteral D_800E62A8 = { -2500.0 }; +const DoubleLiteral D_800E62B0 = { 0.025 }; +const DoubleLiteral D_800E62B8 = { 0.561 }; +const DoubleLiteral D_800E62C0 = { 0.004 }; +const DoubleLiteral D_800E62C8 = { 0.025 }; +const DoubleLiteral D_800E62D0 = { 0.561 }; +const DoubleLiteral D_800E62D8 = { 0.004 }; +const DoubleLiteral D_800E62E0 = { 0.2 }; +const DoubleLiteral D_800E62E8 = { 0.004 }; +const DoubleLiteral D_800E62F0 = { 0.595 }; +const DoubleLiteral D_800E62F8 = { 0.025 }; +const DoubleLiteral D_800E6300 = { 500.0 }; +const DoubleLiteral D_800E6308 = { 650.0 }; +const DoubleLiteral D_800E6310 = { -0.3 }; + +// Jump table in func_8004447C +const u32 D_800E6318[] = { + 0x800446AC, 0x80044A04, 0x80044A04, 0x80044A04, + 0x80044A04, 0x80044F54, 0x80044A04 +}; + +// Jump table in func_8004447C +const u32 D_800E6334[] = { + 0x80044A2C, 0x80044A44, 0x80044A60, 0x80044A94, + 0x80044ADC, 0x80044AC8 +}; + +const DoubleLiteral D_800E6350 = { 300.0 }; + +// Jump table in func_800452A0 +const u32 D_800E6358[] = { + 0x800456A0, 0x800456A8, 0x800456B0, 0x800456BC, + 0x800456CC, 0x800456D4, 0x800456B0, 0x800456DC +}; + +const FloatLiteral D_800E6378 = { 1000000.0f }; + +// Jump table in +const u32 D_800E637C[] = { + 0x80045ADC, 0x80045AF8, 0x80045B30, 0x80045B30, + 0x80045B58, 0x80045B70, 0x80045BB8, 0x80045ADC +}; + +const DoubleLiteral D_800E63A0 = { 500.0 }; +const DoubleLiteral D_800E63A8 = { 1.15 }; +const DoubleLiteral D_800E63B0 = { 0.016 }; +const DoubleLiteral D_800E63B8 = { 0.016 }; +const DoubleLiteral D_800E63C0 = { 1.2 }; +const DoubleLiteral D_800E63C8 = { 0.046 }; +const DoubleLiteral D_800E63D0 = { 1.2 }; +const FloatLiteral D_800E63D8 = { 1.2f }; +const DoubleLiteral D_800E63E0 = { 0.046 }; +const DoubleLiteral D_800E63E8 = { 0.3 }; +const FloatLiteral D_800E63F0 = { 0.004f }; +const DoubleLiteral D_800E63F8 = { 0.025 }; +const DoubleLiteral D_800E6400 = { 300.0 }; +const DoubleLiteral D_800E6408 = { 0.02 }; +const DoubleLiteral D_800E6410 = { 1.7 }; +const DoubleLiteral D_800E6418 = { 0.35 }; +const DoubleLiteral D_800E6420 = { 0.2 }; +const DoubleLiteral D_800E6428 = { 0.07 }; +const DoubleLiteral D_800E6430 = { 0.8 }; +const DoubleLiteral D_800E6438 = { 0.65 }; +const DoubleLiteral D_800E6440 = { 0.65 }; +const DoubleLiteral D_800E6448 = { 35.0 }; +const FloatLiteral D_800E6450 = { -10000.0f }; +const DoubleLiteral D_800E6458 = { 0.8 }; +const DoubleLiteral D_800E6460 = { 0.05 }; +const FloatLiteral D_800E6468 = { 0.11f }; + +// Jump table in func_80048C7C +const u32 D_800E646C[] = { + 0x80048D40, 0x80048D40, 0x80048E50, 0x80048DAC, + 0x80048E18, 0x80048DB8 +}; + +const DoubleLiteral D_800E6488 = { 0.7 }; +const DoubleLiteral D_800E6490 = { 20.5 }; +const DoubleLiteral D_800E6498 = { 65.0 }; +const DoubleLiteral D_800E64A0 = { 0.16666666666666666 }; +const DoubleLiteral D_800E64A8 = { 1.09 }; +const DoubleLiteral D_800E64B0 = { 0.4 }; +const DoubleLiteral D_800E64B8 = { 0.01 }; +const DoubleLiteral D_800E64C0 = { 0.01 }; +const DoubleLiteral D_800E64C8 = { 0.016 }; +const DoubleLiteral D_800E64D0 = { 1.2 }; +const FloatLiteral D_800E64D8 = { 1.2f }; +const DoubleLiteral D_800E64E0 = { 0.016 }; +const FloatLiteral D_800E64E8 = { 1.4f }; +const FloatLiteral D_800E64EC = { 0.01f }; +const FloatLiteral D_800E64F0 = { 0.02f }; +const FloatLiteral D_800E64F4 = { 0.004f }; +const DoubleLiteral D_800E64F8 = { 0.6 }; +const DoubleLiteral D_800E6500 = { 0.3 }; +const FloatLiteral D_800E6508 = { 1.2f }; +const DoubleLiteral D_800E6510 = { 0.00015 }; +const DoubleLiteral D_800E6518 = { 1.8 }; +const DoubleLiteral D_800E6520 = { 0.4 }; +const FloatLiteral D_800E6528 = { 0.4f }; +const DoubleLiteral D_800E6530 = { 0.058823529411764705 }; +const DoubleLiteral D_800E6538 = { 0.05 }; +const DoubleLiteral D_800E6540 = { 0.65 }; +const DoubleLiteral D_800E6548 = { 0.65 }; +const DoubleLiteral D_800E6550 = { 0.7 }; +const DoubleLiteral D_800E6558 = { 0.4 }; +const DoubleLiteral D_800E6560 = { 0.005555555555555556 }; +const FloatLiteral D_800E6568 = { 0.4f }; +const DoubleLiteral D_800E6570 = { 65.0 }; +const DoubleLiteral D_800E6578 = { 0.2 }; +const FloatLiteral D_800E6580 = { 1.3f }; +const FloatLiteral D_800E6584 = { 0.1f }; +const FloatLiteral D_800E6588 = { 0.002f }; +const FloatLiteral D_800E658C = { 0.01f }; +const DoubleLiteral D_800E6590 = { 1.2 }; +const DoubleLiteral D_800E6598 = { 0.45 }; +const FloatLiteral D_800E65A0 = { -0.02f }; +const FloatLiteral D_800E65A4 = { 0.87f }; +const FloatLiteral D_800E65A8 = { 0.9f }; +const FloatLiteral D_800E65AC = { -10000.0f }; + +// Jump table in func_8004DE38 +const u32 D_800E65B0[] = { + 0x8004EB84, 0x8004EBBC, 0x8004EBD8, 0x8004EBF4, + 0x8004EBA0, 0x8004EC10, 0x8004EC50, 0x8004EC90, + 0x8004EC90, 0x8004ED88, 0x8004EBF4, 0x8004ECD0, + 0x8004ED10, 0x8004ED50 +}; + +const FloatLiteral D_800E65E8 = { 1.12f }; +const FloatLiteral D_800E65EC = { 0.02f }; +const FloatLiteral D_800E65F0 = { -0.02f }; +const FloatLiteral D_800E65F4 = { 265.0f }; +const DoubleLiteral D_800E65F8 = { 1500.0 }; +const DoubleLiteral D_800E6600 = { 0.065 }; +const DoubleLiteral D_800E6608 = { 0.3 }; +const DoubleLiteral D_800E6610 = { 0.1 }; +const DoubleLiteral D_800E6618 = { 0.3 }; +const DoubleLiteral D_800E6620 = { 0.1 }; +const DoubleLiteral D_800E6628 = { 0.004 }; +const DoubleLiteral D_800E6630 = { 0.65 }; +const DoubleLiteral D_800E6638 = { 0.024999999999999998 }; +const DoubleLiteral D_800E6640 = { 0.4 }; +const DoubleLiteral D_800E6648 = { 1.1 }; +const DoubleLiteral D_800E6650 = { -0.3 }; +const DoubleLiteral D_800E6658 = { 0.3 }; +const FloatLiteral D_800E6660 = { 0.02f }; +const DoubleLiteral D_800E6668 = { 0.9 }; +const DoubleLiteral D_800E6670 = { 0.7 }; +const DoubleLiteral D_800E6678 = { 1.7 }; +const DoubleLiteral D_800E6680 = { 0.15 }; +const DoubleLiteral D_800E6688 = { 0.3 }; +const DoubleLiteral D_800E6690 = { 0.32 }; +const DoubleLiteral D_800E6698 = { -0.04 }; +const DoubleLiteral D_800E66A0 = { 0.04 }; +const DoubleLiteral D_800E66A8 = { 0.9 }; +const DoubleLiteral D_800E66B0 = { 0.3 }; +const DoubleLiteral D_800E66B8 = { 0.1 }; +const FloatLiteral D_800E66C0 = { 0.1f }; +const DoubleLiteral D_800E66C8 = { 0.05 }; + +// Jump table in func_8005250C +const u32 D_800E66D0[] = { + 0x80052678, 0x80052978, 0x80052978, 0x800527AC, + 0x8005280C, 0x80052858, 0x800528A4, 0x80052910 +}; + +const DoubleLiteral D_800E66F0 = { 0.97 }; +const DoubleLiteral D_800E66F8 = { 0.87 }; +const DoubleLiteral D_800E6700 = { 0.9 }; +const DoubleLiteral D_800E6708 = { 0.3 }; +const DoubleLiteral D_800E6710 = { 1.6 }; +const DoubleLiteral D_800E6718 = { 0.025 }; +const FloatLiteral D_800E6720 = { 0.45f }; +const DoubleLiteral D_800E6728 = { 0.97 }; +const DoubleLiteral D_800E6730 = { 0.2 }; +const DoubleLiteral D_800E6738 = { 0.2 }; +const DoubleLiteral D_800E6740 = { 1.33 }; +const DoubleLiteral D_800E6748 = { 0.53 }; +const DoubleLiteral D_800E6750 = { 1.8 }; +const FloatLiteral D_800E6758 = { 1.8f }; +const DoubleLiteral D_800E6760 = { 0.2 }; +const DoubleLiteral D_800E6768 = { 0.1 }; +const DoubleLiteral D_800E6770 = { 0.2 }; +const DoubleLiteral D_800E6778 = { 0.05 }; +const DoubleLiteral D_800E6780 = { 0.1 }; +const DoubleLiteral D_800E6788 = { 0.4 }; +const DoubleLiteral D_800E6790 = { 0.1 }; +const DoubleLiteral D_800E6798 = { 1.4 }; +const FloatLiteral D_800E67A0 = { 0.1f }; + +// Jump table in func_80053E9C +const u32 D_800E67A4[] = { + 0x80053FF0, 0x8005406C, 0x800540FC, 0x8005408C, + 0x800540C4, 0x80054098 +}; + +const DoubleLiteral D_800E67C0 = { 20.5 }; +const DoubleLiteral D_800E67C8 = { 0.3 }; +const DoubleLiteral D_800E67D0 = { 0.1 }; +const DoubleLiteral D_800E67D8 = { 0.3 }; +const DoubleLiteral D_800E67E0 = { 0.1 }; +const DoubleLiteral D_800E67E8 = { -0.3 }; +const DoubleLiteral D_800E67F0 = { 0.3 }; +const DoubleLiteral D_800E67F8 = { 0.9 }; +const FloatLiteral D_800E6800 = { 0.02f }; +const DoubleLiteral D_800E6808 = { 1.7 }; +const DoubleLiteral D_800E6810 = { 0.15 }; +const DoubleLiteral D_800E6818 = { 0.32 }; +const DoubleLiteral D_800E6820 = { -0.04 }; +const DoubleLiteral D_800E6828 = { 0.04 }; +const DoubleLiteral D_800E6830 = { 0.9 }; +const DoubleLiteral D_800E6838 = { 1.075 }; +const DoubleLiteral D_800E6840 = { 0.15 }; +const DoubleLiteral D_800E6848 = { 0.7 }; +const FloatLiteral D_800E6850 = { 1500.0f }; + +// Jump table in func_80055EC0 +const u32 D_800E6854[] = { + 0x8005635C, 0x80056370, 0x80056380, 0x8005639C, + 0x800563EC, 0x80056508, 0x8005655C, 0x80056508, + 0x800563EC, 0x80056620, 0x800563CC, 0x80056380, + 0x800565C0, 0x800565E0, 0x80056600, 0x800563EC, + 0x80056828 +}; + +// Jump table in func_80055EC0 +const u32 D_800E6894[] = { + 0x80056834, 0x80056840, 0x8005684C, 0x80056884, + 0x80056884, 0x80056884, 0x80056884, 0x80056884, + 0x80056884, 0x80056874, 0x80056880 +}; + +const FloatLiteral D_800E68C4 = { 10000.0f }; +const FloatLiteral D_800E68C8 = { 10000.0f }; +const FloatLiteral D_800E68CC = { 0.025f }; + +// Jump table in func_80057A40 +const u32 D_800E68D0[] = { + 0x80057BBC, 0x80057BE4, 0x80057CD0, 0x80057C0C, + 0x80057C34, 0x80057C5C, 0x80057C84, 0x80057CAC +}; + +const DoubleLiteral D_800E68F0 = { 91.75 }; +const DoubleLiteral D_800E68F8 = { 90.0 }; +const DoubleLiteral D_800E6900 = { 48.5 }; +const DoubleLiteral D_800E6908 = { 0.95 }; +const DoubleLiteral D_800E6910 = { 65.0 }; +const DoubleLiteral D_800E6918 = { 1.3 }; +const DoubleLiteral D_800E6920 = { -0.2 }; +const DoubleLiteral D_800E6928 = { 1.2 }; +const DoubleLiteral D_800E6930 = { 1.2 }; +const DoubleLiteral D_800E6938 = { 0.8 }; +const DoubleLiteral D_800E6940 = { 0.45 }; +const FloatLiteral D_800E6948 = { -0.02f }; +const FloatLiteral D_800E694C = { 1000000.0f }; +const DoubleLiteral D_800E6950 = { 160000.0 }; +const FloatLiteral D_800E6958 = { 0.8f }; +const DoubleLiteral D_800E6960 = { 160000.0 }; + +// Jump table in func_8005A6F0 +const u32 D_800E6968[] = { + 0x8005AF80, 0x8005AFD8, 0x8005B004, 0x8005B030, + 0x8005AFAC, 0x8005B05C, 0x8005B094, 0x8005B0CC, + 0x8005B0CC, 0x8005B1B0, 0x8005B030, 0x8005B10C, + 0x8005B144, 0x8005B17C +}; + +const DoubleLiteral D_800E69A0 = { 0.9 }; +const FloatLiteral D_800E69A8 = { 0.02f }; +const FloatLiteral D_800E69AC = { -0.02f }; +const FloatLiteral D_800E69B0 = { 265.0f }; +const DoubleLiteral D_800E69B8 = { 1500.0 }; +const DoubleLiteral D_800E69C0 = { 0.025 }; +const DoubleLiteral D_800E69C8 = { 0.595 }; +const DoubleLiteral D_800E69D0 = { 0.004 }; +const DoubleLiteral D_800E69D8 = { 1.3 }; +const DoubleLiteral D_800E69E0 = { 150.0 }; +const FloatLiteral D_800E69E8 = { 0.01f }; +const DoubleLiteral D_800E69F0 = { 0.01 }; +const DoubleLiteral D_800E69F8 = { 35.0 }; +const FloatLiteral D_800E6A00 = { 0.05f }; /*********************************/ @@ -350,7 +630,7 @@ void func_800535C4(unk800535C4 *arg0, unk800535C4_2 *arg1) { void func_80053664(Player_64 *arg0) { if (arg0->throttle > 0.0) { - arg0->throttle -= D_800E6768; + arg0->throttle -= D_800E6768.doubleLiteral; } if (D_8011D528 & 0x8000) { @@ -359,12 +639,12 @@ void func_80053664(Player_64 *arg0) { if (D_8011D528 & 0x4000) { if (arg0->brake < 1.0) { - arg0->brake += D_800E6770; + arg0->brake += D_800E6770.doubleLiteral; } } else { //! @bug Will cause a negative brake value resulting in higher velocity - if (arg0->brake > D_800E6778) { - arg0->brake -= D_800E6780; + if (arg0->brake > D_800E6778.doubleLiteral) { + arg0->brake -= D_800E6780.doubleLiteral; } } } @@ -569,7 +849,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A6F0.s") GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005B818.s") void func_8005C25C(void) { - D_800DCB9C[0] = D_800E6A00; + D_800DCB9C[0] = D_800E6A00.floatLiteral; } /* Unknown Size */ From d1a98464a77a77ce83c4d18c79b80cc502ed5ba9 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Mon, 31 May 2021 20:52:51 -0500 Subject: [PATCH 25/66] Moved .rodata in unknown_080500 from asm to C. --- data/unknown_080500.rodata.s | 528 ----------------------------------- src/unknown_080500.c | 277 ++++++++++++++---- 2 files changed, 229 insertions(+), 576 deletions(-) delete mode 100644 data/unknown_080500.rodata.s diff --git a/data/unknown_080500.rodata.s b/data/unknown_080500.rodata.s deleted file mode 100644 index 9f729915..00000000 --- a/data/unknown_080500.rodata.s +++ /dev/null @@ -1,528 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -# Used in the title screen sequence. -.aligned_text "TIMBER" -.aligned_text "BUMPER" -.aligned_text "CONKER" -.aligned_text "TIPTUP" -.aligned_text "DRUMSTICK" -.aligned_text "PIPSY" -.aligned_text "BANJO" -.aligned_text "KRUNCH" -.aligned_text "WIZPIG" -.aligned_text "DIDDY" - -.float 0.5 - -# Credits, 800E7D08 -.aligned_text "CREDITS" - -.aligned_text "Software Director" -.aligned_text "R.Harrison" - -.aligned_text "Software Engineers" -.aligned_text "P.Mountain" -.aligned_text "J.Pegg" -.aligned_text "R.Gale" - -.aligned_text "Art Director" -.aligned_text "K.Bayliss" - -.aligned_text "3D Artists" -.aligned_text "L.Musgrave" -.aligned_text "K.Rabbette" -.aligned_text "D.Smith" -.aligned_text "J.Christensen" -.aligned_text "B.Smyth" -.aligned_text "P.Cunningham" - -.aligned_text "Music" -.aligned_text "D.Wise" - -.aligned_text "Sound Effects" -.aligned_text "G.Norgate" - -.aligned_text "ALSO" - -.aligned_text "Additional Design" -.aligned_text "M.Wakeley" - -.aligned_text "Documentation" -.aligned_text "L.Loveday" -.aligned_text "Liason" -.aligned_text "E.Hochberg" - -.aligned_text "Character Voices" -.aligned_text "K.Bayliss" -.aligned_text "J.Christensen" -.aligned_text "E.Fischer" -.aligned_text "K.Rabbette" -.aligned_text "L.Ray" -.aligned_text "L.Schuneman" -.aligned_text "C.Seavor" -.aligned_text "D.Smith" -.aligned_text "J.Stamper" -.aligned_text "K.Stamper" -.aligned_text "C.Sutherland" - -.aligned_text "Rare Quality Assurance" -.aligned_text "H.Ward" -.aligned_text "G.Richards" -.aligned_text "S.Farmer" -.aligned_text "J.Williams" -.aligned_text "D.Wong" -.aligned_text "G.Jones" -.aligned_text "M.Penny" -.aligned_text "S.Brand" -.aligned_text "S.Malpass" -.aligned_text "A.Wilson" - -.aligned_text "NOA Thanks To" -.aligned_text "M.Fukuda" -.aligned_text "K.Lobb" -.aligned_text "M.Kelbaugh" -.aligned_text "A.Williams" -.aligned_text "R.Johnson" -.aligned_text "M.Forrest" -.aligned_text "P.Sandhop" -.aligned_text "H.Sterchi" -.aligned_text "T.Hertzog" -.aligned_text "D.Bridgham" -.aligned_text "G.Richardson" -.aligned_text "B.Smith" - -.aligned_text "NOA Thanks To" -.aligned_text "NOA Tree House" -.aligned_text "NOA Tree Branch" - -.aligned_text "NCL Thank You's" -.aligned_text "K.Terasaki" -.aligned_text "M.Goto" -.aligned_text "H.Yamada" -.aligned_text "Mario Club" - -.aligned_text "NOE Thank You's" -.aligned_text "J.Kraft" -.aligned_text "J.Bardakoff" - -.aligned_text "Special Thanks To" -.aligned_text "J.Hochberg" -.aligned_text "H.Lincoln" -.aligned_text "M.Arakawa" - -.aligned_text "Game Director" -.aligned_text "L.Schuneman" - -.aligned_text "Producer" -.aligned_text "C.Stamper" - -.aligned_text "Executive Producer" -.aligned_text "T.Stamper" - -# Developer's best times for each track -.aligned_text "0:53:43" -.aligned_text "1:21:55" -.aligned_text "0:54:13" -.aligned_text "1:22:48" -.aligned_text "1:04:11" -.aligned_text "1:13:51" -.aligned_text "1:25:01" -.aligned_text "0:55:05" -.aligned_text "1:37:63" -.aligned_text "1:56:60" -.aligned_text "0:57:81" -.aligned_text "1:28:01" -.aligned_text "1:51:15" -.aligned_text "1:31:80" -.aligned_text "2:03:16" -.aligned_text "0:58:25" -.aligned_text "2:00:38" -.aligned_text "2:05:68" -.aligned_text "1:52:96" -.aligned_text "1:55:00" - -.aligned_text "THE END?" - -.aligned_text "TO BE CONTINUED ..." - -.aligned_text "THE END" - -# This appears if you use the "WHODIDTHIS" cheat. You have to beat wizpig to get cheat codes. -.aligned_text "NO CHEAT" -.aligned_text "THIS TIME." - -### End of credits ### - -.aligned_text " (ADV." - -glabel D_800E8208 -.aligned_text "OK?" - -glabel D_800E820C -.aligned_text "~" - -glabel D_800E8210 -.aligned_text "DEL" - -glabel D_800E8214 -.aligned_text "OK" - -# Used with the "DODGYROMMER" cheat. -glabel D_800E8218 -.aligned_text "ROM checksum %08X,%d\n" - -glabel D_800E8230 -.aligned_text "OK?" - -glabel D_800E8234 -.aligned_text "OK?" - -glabel D_800E8238 -.aligned_text "OK?" - -glabel D_800E823C -.aligned_text "OK?" - -glabel D_800E8240 -.aligned_text "OK?" - -glabel D_800E8244 -.aligned_text "SP" - -glabel D_800E8248 -.aligned_text "DEL" - -glabel D_800E824C -.aligned_text "OK" - -.aligned_text "loadFrontEndItem() - Item no %d out of range 0-%d\n" - -glabel D_800E8284 -.word 0x80081464 -.word 0x80081454 -.word 0x8008158C -.word 0x800814C4 -.word 0x8008158C -.word 0x80081504 -.word 0x800814E4 -.word 0x8008158C -.word 0x8008158C -.word 0x8008158C -.word 0x800814A4 -.word 0x800814B4 -.word 0x80081474 -.word 0x80081484 -.word 0x80081494 -.word 0x800814F4 -.word 0x8008158C -.word 0x80081514 -.word 0x8008158C -.word 0x800814D4 -.word 0x80081524 -.word 0x80081534 -.word 0x8008158C -.word 0x80081544 -.word 0x80081554 -.word 0x80081564 -.word 0x80081574 -.word 0x8008158C -.word 0x80081584 - -glabel D_800E82F8 -.word 0x80081634 -.word 0x80081620 -.word 0x800817AC -.word 0x800816AC -.word 0x800817AC -.word 0x800816FC -.word 0x800816C0 -.word 0x800817AC -.word 0x800817AC -.word 0x800817AC -.word 0x80081684 -.word 0x80081698 -.word 0x80081648 -.word 0x8008165C -.word 0x80081670 -.word 0x800816E8 -.word 0x800817AC -.word 0x80081710 -.word 0x800817AC -.word 0x800816D4 -.word 0x80081724 -.word 0x80081738 -.word 0x800817AC -.word 0x8008174C -.word 0x80081760 -.word 0x80081774 -.word 0x80081788 -.word 0x800817AC -.word 0x8008179C - -glabel D_800E836C -.word 0x800823E8 -.word 0x80082454 -.word 0x800824B8 -.word 0x80082524 -.word 0x8008256C -.word 0x80082608 -.word 0x80082760 -.word 0x800827C0 - -glabel D_800E838C -.word 0x40266666 - -glabel D_800E8390 -.word 0x400AE148 -.word 0x00000000 - -glabel D_800E8398 -.word 0x407FE000 - -glabel D_800E839C -.word 0x00000000 - -glabel D_800E83A0 -.word 0x407FE000 - -glabel D_800E83A4 -.word 0x00000000 - -glabel D_800E83A8 -.word 0x407FE000 - -glabel D_800E83AC -.word 0x00000000 - -glabel D_800E83B0 -.word 0x3F2B851F - -glabel D_800E83B4 -.word 0x40351EB8 - -glabel D_800E83B8 -.word 0x8008541C -.word 0x8008553C -.word 0x80085574 -.word 0x80085690 -.word 0x800856DC -.word 0x80085728 -.word 0x80085828 -.word 0x80085774 -.word 0x800857C0 -.word 0x800857F0 - -glabel D_800E83E0 -.word 0x80085C30 -.word 0x80085BF8 -.word 0x80085BF8 -.word 0x80085C00 -.word 0x80085C00 -.word 0x80085C08 -.word 0x80085C14 -.word 0x80085C24 - -glabel D_800E8400 -.word 0x80086834 -.word 0x80086888 -.word 0x800868C0 -.word 0x80086920 -.word 0x80086998 - -glabel D_800E8414 -.word 0x3DCCCCCD - -glabel D_800E8418 -.word 0x80086B54 -.word 0x80086CDC -.word 0x80086D54 -.word 0x80086F74 -.word 0x80087084 -.word 0x80087110 -.word 0x800871C4 -.word 0x800871C4 -.word 0x800871C4 -.word 0x80087158 - -glabel D_800E8440 -.word 0x800878D4 -.word 0x800878D4 -.word 0x800878D4 -.word 0x800878F0 -.word 0x800878BC -.word 0x800878F0 -.word 0x800878E0 -.word 0x800878F0 -.word 0x800878D4 - -glabel D_800E8464 -.word 0x80087930 -.word 0x80087948 -.word 0x80087948 -.word 0x80087964 -.word 0x80087930 -.word 0x80087964 -.word 0x80087954 -.word 0x80087964 -.word 0x80087948 - -glabel D_800E8488 -.word 0x800879A4 -.word 0x800879A4 -.word 0x800879A4 -.word 0x80087B50 -.word 0x800879A4 -.word 0x80087B50 -.word 0x800879A4 -.word 0x80087B50 -.word 0x800879BC -.word 0x800879BC - -glabel D_800E84B0 -.word 0x80087D18 -.word 0x80087D28 -.word 0x80087D54 -.word 0x80087D94 -.word 0x80087DAC -.word 0x80087DEC -.word 0x80087E04 -.word 0x80087E1C - -glabel D_800E84D0 -.word 0x3FF19999 - -glabel D_800E84D4 -.word 0x9999999A - -glabel D_800E84D8 -.word 0x3F99999A -.word 0x00000000 - -glabel D_800E84E0 -.word 0x3FB99999 - -glabel D_800E84E4 -.word 0x9999999A - -glabel D_800E84E8 -.word 0x3FB99999 - -glabel D_800E84EC -.word 0x9999999A - -glabel D_800E84F0 -.word 0x3F99999A - -glabel D_800E84F4 -.word 0x8009246C -.word 0x8009251C -.word 0x80092740 -.word 0x8009287C -.word 0x8009287C - -glabel D_800E8508 -.word 0x80094DD0 -.word 0x80094FB0 -.word 0x80095084 -.word 0x80095588 -.word 0x80095110 -.word 0x800951CC - -glabel D_800E8520 -.word 0x3F99999A - -glabel D_800E8524 -.word 0x80095650 -.word 0x800956C8 -.word 0x800956C8 -.word 0x80095668 -.word 0x80095650 -.word 0x80095668 -.word 0x80095680 -.word 0x80095698 -.word 0x800956B0 - -glabel D_800E8548 -.word 0x80095948 -.word 0x80095964 -.word 0x80095B34 -.word 0x80095D30 -.word 0x80095D50 -.word 0x80095EA8 -.word 0x80095EC8 -.word 0x800964AC -.word 0x800964DC - -glabel D_800E856C -.word 0x3DCCCCCD - -glabel D_800E8570 -.word 0x3D99999A - -glabel D_800E8574 -.word 0x8009BA98 -.word 0x8009BAD8 -.word 0x8009BB08 -.word 0x8009BB48 -.word 0x8009BB9C - -glabel D_800E8588 -.word 0x8009D0B8 -.word 0x8009D104 -.word 0x8009D0C8 -.word 0x8009D0D8 -.word 0x8009D0E8 -.word 0x8009D0F8 - -glabel D_800E85A0 -.word 0x8009D944 -.word 0x8009D944 -.word 0x8009D944 -.word 0x8009D91C -.word 0x8009D8F0 -.word 0x8009D8D4 -.word 0x8009D8D4 -.word 0x8009D8D4 -.word 0x8009D618 -.word 0x8009D638 -.word 0x8009D7A0 -.word 0x8009D840 -.word 0x8009D968 -.word 0x8009D998 -.word 0x8009D9B0 -.word 0x8009D9B0 - -glabel D_800E85E0 -.word 0x8009DC60 -.word 0x8009DEF0 -.word 0x8009E37C -.word 0x8009E37C -.word 0x8009DFB0 -.word 0x8009DFEC -.word 0x8009E098 -.word 0x8009E194 -.word 0x8009E23C -.word 0x8009E37C -.word 0x8009DC60 - -glabel D_800E860C -.word 0x8009E2D0 -.word 0x8009E2F4 -.word 0x8009E354 -.word 0x8009E354 -.word 0x8009E314 -.word 0x8009E354 -.word 0x8009E314 -.word 0x8009E2E4 -.word 0x8009E354 -.word 0x8009E334 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/src/unknown_080500.c b/src/unknown_080500.c index 777ff80c..e71574b0 100644 --- a/src/unknown_080500.c +++ b/src/unknown_080500.c @@ -223,7 +223,7 @@ MenuBootDrawTexture D_800DF7DC[12] = { /* Size: 0x30 bytes */ typedef struct unk800DF83C { - s32* unk0; // Pointer to something. + char* unk0; // Pointer to ascii text. f32 unk4; f32 unk8; f32 unkC; @@ -236,17 +236,18 @@ typedef struct unk800DF83C { f32 unk28; } unk800DF83C; +// Title screen cinematic text unk800DF83C D_800DF83C[10] = { - { (s32*)0x800E7CB0, 14.0f, 14.5f, 16.5f, 17.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CB8, 19.0f, 19.5f, 21.5f, 22.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CC0, 24.0f, 24.5f, 26.5f, 27.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CC8, 29.0f, 29.5f, 31.5f, 32.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CD0, 35.0f, 35.5f, 37.5f, 38.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CDC, 40.0f, 40.5f, 42.5f, 43.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CE4, 45.0f, 45.5f, 47.5f, 48.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CEC, 50.0f, 50.5f, 52.5f, 53.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CF4, 57.5f, 58.0f, 60.0f, 60.5f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, - { (s32*)0x800E7CFC, 63.5f, 64.0f, 66.0f, 66.5f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f } + { "TIMBER", 14.0f, 14.5f, 16.5f, 17.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "BUMPER", 19.0f, 19.5f, 21.5f, 22.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "CONKER", 24.0f, 24.5f, 26.5f, 27.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "TIPTUP", 29.0f, 29.5f, 31.5f, 32.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "DRUMSTICK", 35.0f, 35.5f, 37.5f, 38.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "PIPSY", 40.0f, 40.5f, 42.5f, 43.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "BANJO", 45.0f, 45.5f, 47.5f, 48.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "KRUNCH", 50.0f, 50.5f, 52.5f, 53.0f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "WIZPIG", 57.5f, 58.0f, 60.0f, 60.5f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f }, + { "DIDDY", 63.5f, 64.0f, 66.0f, 66.5f, -80.0f, 208.0f, 160.0f, 208.0f, 400.0f, 208.0f } }; s32 D_800DF9F4 = 0; @@ -738,7 +739,8 @@ s32 D_800E0968 = 0; s32 D_800E096C = 0; s32 D_800E0970 = 0; s32 D_800E0974 = 0; -u32* D_800E0978 = (u32*)0x800E7D04; +const FloatLiteral D_800E7D04 = { 0.5f }; +f32* D_800E0978 = &D_800E7D04; s32 D_800E097C = 0; s32 D_800E0980 = 0; s32 D_800E0984 = 0; @@ -1160,45 +1162,47 @@ u16 D_800E18FC[30] = { 0x1000, 0x0000 }; -// Credits text look-up table +// List of amazing people. char *D_800E1938[87] = { - (char*)0x800E7D08, (char*)0x800E7D10, (char*)0x800E7D24, (char*)0x800E7D30, - (char*)0x800E7D44, (char*)0x800E7D50, (char*)0x800E7D58, (char*)0x800E7D60, - (char*)0x800E7D70, (char*)0x800E7D7C, (char*)0x800E7D88, (char*)0x800E7D94, - (char*)0x800E7DA0, (char*)0x800E7DA8, (char*)0x800E7DB8, (char*)0x800E7DC0, - (char*)0x800E7DD0, (char*)0x800E7DD8, (char*)0x800E7DE0, (char*)0x800E7DF0, - (char*)0x800E7DFC, (char*)0x800E7E04, (char*)0x800E7E18, (char*)0x800E7E24, - (char*)0x800E7E34, (char*)0x800E7E40, (char*)0x800E7E48, (char*)0x800E7E54, - (char*)0x800E7E68, (char*)0x800E7E74, (char*)0x800E7E84, (char*)0x800E7E90, - (char*)0x800E7E9C, (char*)0x800E7EA4, (char*)0x800E7EB0, (char*)0x800E7EBC, - (char*)0x800E7EC4, (char*)0x800E7ED0, (char*)0x800E7EDC, (char*)0x800E7EEC, - (char*)0x800E7F04, (char*)0x800E7F0C, (char*)0x800E7F18, (char*)0x800E7F24, - (char*)0x800E7F30, (char*)0x800E7F38, (char*)0x800E7F40, (char*)0x800E7F48, - (char*)0x800E7F50, (char*)0x800E7F5C, (char*)0x800E7F68, (char*)0x800E7F78, - (char*)0x800E7F84, (char*)0x800E7F8C, (char*)0x800E7F98, (char*)0x800E7FA4, - (char*)0x800E7FB0, (char*)0x800E7FBC, (char*)0x800E7FC8, (char*)0x800E7FD4, - (char*)0x800E7FE0, (char*)0x800E7FEC, (char*)0x800E7FFC, (char*)0x800E8004, - (char*)0x800E8014, (char*)0x800E8024, (char*)0x800E8034, (char*)0x800E8044, - (char*)0x800E8050, (char*)0x800E8058, (char*)0x800E8064, (char*)0x800E8070, - (char*)0x800E8080, (char*)0x800E8088, (char*)0x800E8094, (char*)0x800E80A8, - (char*)0x800E80B4, (char*)0x800E80C0, (char*)0x800E80CC, (char*)0x800E80DC, - (char*)0x800E80E8, (char*)0x800E80F4, (char*)0x800E8100, (char*)0x800E8114, - (char*)0x00000000, (char*)0x00000000, (char*)0x00000000 + "CREDITS", + "Software Director", "R.Harrison", + "Software Engineers", "P.Mountain", "J.Pegg", "R.Gale", + "Art Director", "K.Bayliss", + "3D Artists", "L.Musgrave", "K.Rabbette", "D.Smith", "J.Christensen", "B.Smyth", "P.Cunningham", + "Music", "D.Wise", + "Sound Effects", "G.Norgate", + "ALSO", + "Additional Design", "M.Wakeley", + "Documentation", "L.Loveday", "Liason", "E.Hochberg", + "Character Voices", "K.Bayliss", "J.Christensen", "E.Fischer", "K.Rabbette", "L.Ray", + "L.Schuneman", "C.Seavor", "D.Smith", "J.Stamper", "K.Stamper", "C.Sutherland", + "Rare Quality Assurance", "H.Ward", "G.Richards", "S.Farmer", "J.Williams", "D.Wong", + "G.Jones", "M.Penny", "S.Brand", "S.Malpass", "A.Wilson", + "NOA Thanks To", "M.Fukuda", "K.Lobb", "M.Kelbaugh", "A.Williams", "R.Johnson", "M.Forrest", + "P.Sandhop", "H.Sterchi", "T.Hertzog", "D.Bridgham", "G.Richardson", "B.Smith", + "NOA Thanks To", "NOA Tree House", "NOA Tree Branch", + "NCL Thank You's", "K.Terasaki", "M.Goto", "H.Yamada", "Mario Club", + "NOE Thank You's", "J.Kraft", "J.Bardakoff", + "Special Thanks To", "J.Hochberg", "H.Lincoln", "M.Arakawa", + "Game Director", "L.Schuneman", + "Producer", "C.Stamper", + "Executive Producer", "T.Stamper", + NULL, NULL, NULL }; -// Credits text look-up table (time trials time sheet) +// Developer's best times for each track char *D_800E1A94[20] = { - (char*)0x800E8120, (char*)0x800E8128, (char*)0x800E8130, (char*)0x800E8138, - (char*)0x800E8140, (char*)0x800E8148, (char*)0x800E8150, (char*)0x800E8158, - (char*)0x800E8160, (char*)0x800E8168, (char*)0x800E8170, (char*)0x800E8178, - (char*)0x800E8180, (char*)0x800E8188, (char*)0x800E8190, (char*)0x800E8198, - (char*)0x800E81A0, (char*)0x800E81A8, (char*)0x800E81B0, (char*)0x800E81B8 +/***** Dino Domain *****/ "0:53:43", "1:21:55", "0:54:13", "1:22:48", +/** Snowflake Mountain */ "1:04:11", "1:13:51", "1:25:01", "0:55:05", +/**** Sherbet Island ***/ "1:37:63", "1:56:60", "0:57:81", "1:28:01", +/**** Dragon Forest ****/ "1:51:15", "1:31:80", "2:03:16", "0:58:25", +/*** Future Fun Land ***/ "2:00:38", "2:05:68", "1:52:96", "1:55:00" }; -// Another credits text look-up table char *D_800E1AE4[5] = { - (char*)0x800E81C0, (char*)0x800E81CC, (char*)0x800E81E0, (char*)0x800E81E8, - (char*)0x800E81F4, + "THE END?", "TO BE CONTINUED ...", // Appears after beating the first wizpig race. + "THE END", // Appears after beating the second wizpig race. + "NO CHEAT", "THIS TIME.", // Appears if you use the "WHODIDTHIS" cheat. }; s32 D_800E1AF8[21] = { @@ -1330,8 +1334,185 @@ s16 D_800E1E40[10] = { /************ .rodata ************/ -extern s32 D_800E8230; -extern f32 D_800E8414; +const char D_800E8200[] = " (ADV."; +const char D_800E8208[] = "OK?"; +const char D_800E820C[] = "~"; +const char D_800E8210[] = "DEL"; +const char D_800E8214[] = "OK"; +const char D_800E8218[] = "ROM checksum %08X,%d\n"; // Used with the "DODGYROMMER" cheat. +const char D_800E8230[] = "OK?"; +const char D_800E8234[] = "OK?"; +const char D_800E8238[] = "OK?"; +const char D_800E823C[] = "OK?"; +const char D_800E8240[] = "OK?"; +const char D_800E8244[] = "SP"; +const char D_800E8248[] = "DEL"; +const char D_800E824C[] = "OK"; +const char D_800E8250[] = "loadFrontEndItem() - Item no %d out of range 0-%d\n"; + +// Jump table in MenuInit +const u32 D_800E8284[] = { + 0x80081464, 0x80081454, 0x8008158C, 0x800814C4, + 0x8008158C, 0x80081504, 0x800814E4, 0x8008158C, + 0x8008158C, 0x8008158C, 0x800814A4, 0x800814B4, + 0x80081474, 0x80081484, 0x80081494, 0x800814F4, + 0x8008158C, 0x80081514, 0x8008158C, 0x800814D4, + 0x80081524, 0x80081534, 0x8008158C, 0x80081544, + 0x80081554, 0x80081564, 0x80081574, 0x8008158C, + 0x80081584 +}; + +// Jump table in MenuLoop +const u32 D_800E82F8[] = { + 0x80081634, 0x80081620, 0x800817AC, 0x800816AC, + 0x800817AC, 0x800816FC, 0x800816C0, 0x800817AC, + 0x800817AC, 0x800817AC, 0x80081684, 0x80081698, + 0x80081648, 0x8008165C, 0x80081670, 0x800816E8, + 0x800817AC, 0x80081710, 0x800817AC, 0x800816D4, + 0x80081724, 0x80081738, 0x800817AC, 0x8008174C, + 0x80081760, 0x80081774, 0x80081788, 0x800817AC, + 0x8008179C +}; + +// Jump table in DrawMenuText +const u32 D_800E836C[] = { + 0x800823E8, 0x80082454, 0x800824B8, 0x80082524, + 0x8008256C, 0x80082608, 0x80082760, 0x800827C0 +}; + +const FloatLiteral D_800E838C = { 2.6f }; +const FloatLiteral D_800E8390 = { 2.17f }; +const DoubleLiteral D_800E8398 = { 510.0 }; +const DoubleLiteral D_800E83A0 = { 510.0 }; +const DoubleLiteral D_800E83A8 = { 510.0 }; +const FloatLiteral D_800E83B0 = { 0.67f }; +const FloatLiteral D_800E83B4 = { 2.83f }; + +// Jump table in func_800853D0 +const u32 D_800E83B8[] = { + 0x8008541C, 0x8008553C, 0x80085574, 0x80085690, + 0x800856DC, 0x80085728, 0x80085828, 0x80085774, + 0x800857C0, 0x800857F0 +}; + +// Jump table in func_80085B9C +const u32 D_800E83E0[] = { + 0x80085C30, 0x80085BF8, 0x80085BF8, 0x80085C00, + 0x80085C00, 0x80085C08, 0x80085C14, 0x80085C24 +}; + +// Jump table in func_800867D4 +const u32 D_800E8400[] = { + 0x80086834, 0x80086888, 0x800868C0, 0x80086920, + 0x80086998 +}; + +const FloatLiteral D_800E8414 = { 0.1f }; + +// Jump table in func_80086AFC +const u32 D_800E8418[] = { + 0x80086B54, 0x80086CDC, 0x80086D54, 0x80086F74, + 0x80087084, 0x80087110, 0x800871C4, 0x800871C4, + 0x800871C4, 0x80087158 +}; + +// Jump table in func_80087734 +const u32 D_800E8440[] = { + 0x800878D4, 0x800878D4, 0x800878D4, 0x800878F0, + 0x800878BC, 0x800878F0, 0x800878E0, 0x800878F0, + 0x800878D4 +}; + +// Jump table in func_80087734 +const u32 D_800E8464[] = { + 0x80087930, 0x80087948, 0x80087948, 0x80087964, + 0x80087930, 0x80087964, 0x80087954, 0x80087964, + 0x80087948 +}; + +// Jump table in func_80087734 +const u32 D_800E8488[] = { + 0x800879A4, 0x800879A4, 0x800879A4, 0x80087B50, + 0x800879A4, 0x80087B50, 0x800879A4, 0x80087B50, + 0x800879BC, 0x800879BC +}; + +// Jump table in MenuSaveOptionsLoop +const u32 D_800E84B0[] = { + 0x80087D18, 0x80087D28, 0x80087D54, 0x80087D94, + 0x80087DAC, 0x80087DEC, 0x80087E04, 0x80087E1C +}; + +const DoubleLiteral D_800E84D0 = { 1.1 }; +const FloatLiteral D_800E84D8 = { 1.2f }; +const DoubleLiteral D_800E84E0 = { 0.1 }; +const DoubleLiteral D_800E84E8 = { 0.1 }; +const FloatLiteral D_800E84F0 = { 1.2f }; + +// Jump table in func_80092188 +const u32 D_800E84F4[] = { + 0x8009246C, 0x8009251C, 0x80092740, 0x8009287C, + 0x8009287C +}; + +// Jump table in func_80094D28 +const u32 D_800E8508[] = { + 0x80094DD0, 0x80094FB0, 0x80095084, 0x80095588, + 0x80095110, 0x800951CC +}; + +const FloatLiteral D_800E8520 = { 1.2f }; + +// Jump table in func_80095624 +const u32 D_800E8524[] = { + 0x80095650, 0x800956C8, 0x800956C8, 0x80095668, + 0x80095650, 0x80095668, 0x80095680, 0x80095698, + 0x800956B0 +}; + +// Jump table in func_80095728 +const u32 D_800E8548[] = { + 0x80095948, 0x80095964, 0x80095B34, 0x80095D30, + 0x80095D50, 0x80095EA8, 0x80095EC8, 0x800964AC, + 0x800964DC +}; + +const FloatLiteral D_800E856C = { 0.1f }; +const FloatLiteral D_800E8570 = { 0.075f }; + +// Jump table in MenuCreditsLoop +const u32 D_800E8574[] = { + 0x8009BA98, 0x8009BAD8, 0x8009BB08, 0x8009BB48, + 0x8009BB9C +}; + +// Jump table in func_8009CFEC +const u32 D_800E8588[] = { + 0x8009D0B8, 0x8009D104, 0x8009D0C8, 0x8009D0D8, + 0x8009D0E8, 0x8009D0F8 +}; + +// Jump table in func_8009D360 +const u32 D_800E85A0[] = { + 0x8009D944, 0x8009D944, 0x8009D944, 0x8009D91C, + 0x8009D8F0, 0x8009D8D4, 0x8009D8D4, 0x8009D8D4, + 0x8009D618, 0x8009D638, 0x8009D7A0, 0x8009D840, + 0x8009D968, 0x8009D998, 0x8009D9B0, 0x8009D9B0 +}; + +// Jump table in func_8009DB3C +const u32 D_800E85E0[] = { + 0x8009DC60, 0x8009DEF0, 0x8009E37C, 0x8009E37C, + 0x8009DFB0, 0x8009DFEC, 0x8009E098, 0x8009E194, + 0x8009E23C, 0x8009E37C, 0x8009DC60 +}; + +// Jump table in func_8009DB3C +const u32 D_800E860C[] = { + 0x8009E2D0, 0x8009E2F4, 0x8009E354, 0x8009E354, + 0x8009E314, 0x8009E354, 0x8009E314, 0x8009E2E4, + 0x8009E354, 0x8009E334 +}; /*********************************/ @@ -2157,7 +2338,7 @@ void func_80086A48(s32 arg0) { temp = D_80126BD4; temp2 = D_80126BE4; while (arg0 > 0) { - temp3 = D_800E8414; + temp3 = D_800E8414.floatLiteral; if (D_80126A08 > 0) { D_80126BDC = D_80126BDC + temp3 * (temp - D_80126BDC); } @@ -2575,7 +2756,7 @@ void func_8008B20C(s32 arg0) { if (osTvType == 0) { temp = 0xEA; } - func_800C4440(&D_801263A0, 0xA0, temp, &D_800E8230, 0xC); + func_800C4440(&D_801263A0, 0xA0, temp, D_800E8230 /* "OK?" */, 0xC); } func_8007B3D0(&D_801263A0); func_800660EC(40.0f); From fa384597c10e01863412c6579a9860d1c0226d19 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Tue, 1 Jun 2021 00:01:37 -0500 Subject: [PATCH 26/66] Moved .rodata in unknown_0CA9A0 & unknown_0D43F0 from asm to C. --- data/unknown_0CA9A0.rodata.s | 73 -------------------------------- data/unknown_0D43F0.rodata.s | 80 ------------------------------------ lib/src/unknown_0CA9A0.c | 32 +++++++++++++++ lib/src/unknown_0D3020.c | 4 +- lib/src/unknown_0D43F0.c | 29 ++++++++++++- 5 files changed, 62 insertions(+), 156 deletions(-) delete mode 100644 data/unknown_0CA9A0.rodata.s delete mode 100644 data/unknown_0D43F0.rodata.s diff --git a/data/unknown_0CA9A0.rodata.s b/data/unknown_0CA9A0.rodata.s deleted file mode 100644 index cee78d89..00000000 --- a/data/unknown_0CA9A0.rodata.s +++ /dev/null @@ -1,73 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E9560 -.aligned_text "samples >= 0" - -glabel D_800E9570 -.aligned_text "env.c" - -glabel D_800E9578 -.aligned_text "samples <= AL_MAX_RSP_SAMPLES" - -glabel D_800E9598 -.aligned_text "env.c" - -glabel D_800E95A0 -.aligned_text "source" - -glabel D_800E95A8 -.aligned_text "env.c" - -glabel D_800E95B0 -.word 0x800CA870 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA8C4 -.word 0x800CA460 -.word 0x800CA460 -.word 0x800CA22C -.word 0x800CA7A8 -.word 0x800CA828 -.word 0x800CA460 - -.word 0x00000000 - -glabel D_800E95F8 -.word 0x40EFFFE0 - -glabel D_800E95FC -.word 0x00000000 - -glabel D_800E9600 -.word 0x800CC0C0 -.word 0x800CC150 -.word 0x800CC150 -.word 0x800CC0C8 -.word 0x800CC150 -.word 0x800CC150 -.word 0x800CC134 -.word 0x800CC144 -.word 0x800CC104 -.word 0x00000000 - -glabel D_800E9628 -.word 0x3FFFFFD6 -.word 0x0E94EE39 -.word 0x3FFFFEB0 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/data/unknown_0D43F0.rodata.s b/data/unknown_0D43F0.rodata.s deleted file mode 100644 index d60bd507..00000000 --- a/data/unknown_0D43F0.rodata.s +++ /dev/null @@ -1,80 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E96C0 -.word 0x686C4C00 - -glabel D_800E96C4 -.word 0x202B2D23 -.word 0x30000000 - -glabel D_800E96CC -.word 0x00000001 -.word 0x00000002 -.word 0x00000004 -.word 0x00000008 -.word 0x00000010 -.word 0x00000000 - -glabel D_800E96E4 -.word 0x800D3C08 -.word 0x800D3EE8 -.word 0x800D3C08 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3AB8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3910 -.word 0x800D3948 -.word 0x800D3C08 -.word 0x800D3C08 -.word 0x800D3C08 -.word 0x800D3EE8 -.word 0x800D3948 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3D6C -.word 0x800D3AB8 -.word 0x800D3E3C -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3E84 -.word 0x800D3EE8 -.word 0x800D3AB8 -.word 0x800D3EE8 -.word 0x800D3EE8 -.word 0x800D3AB8 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/lib/src/unknown_0CA9A0.c b/lib/src/unknown_0CA9A0.c index 38ba6f31..d92dbe42 100644 --- a/lib/src/unknown_0CA9A0.c +++ b/lib/src/unknown_0CA9A0.c @@ -4,6 +4,38 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +const char D_800E9560[] = "samples >= 0"; +const char D_800E9570[] = "env.c"; +const char D_800E9578[] = "samples <= AL_MAX_RSP_SAMPLES"; +const char D_800E9598[] = "env.c"; +const char D_800E95A0[] = "source"; +const char D_800E95A8[] = "env.c"; + +// Jump table in alEnvMixerPull +const u32 D_800E95B0[] = { + 0x800CA870, 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, + 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, + 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, 0x800CA460, + 0x800CA460, 0x800CA22C, 0x800CA7A8, 0x800CA828, + 0x800CA460 +}; + +const DoubleLiteral D_800E95F8 = { 65535.0 }; + +// Jump table in alResampleParam +const u32 D_800E9600[] = { + 0x800CC0C0, 0x800CC150, 0x800CC150, 0x800CC0C8, + 0x800CC150, 0x800CC150, 0x800CC134, 0x800CC144, + 0x800CC104 +}; + +const DoubleLiteral D_800E9628 = { 1.99996 }; +const FloatLiteral D_800E9630 = { 1.99996f }; + +/*********************************/ + GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alFilterNew.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s") diff --git a/lib/src/unknown_0D3020.c b/lib/src/unknown_0D3020.c index 315d60cd..308528dc 100644 --- a/lib/src/unknown_0D3020.c +++ b/lib/src/unknown_0D3020.c @@ -32,6 +32,8 @@ void __osPiRelAccess(void) osSendMesg(&piAccessQueue, NULL, OS_MESG_NOBLOCK); } -// Used with _Litob.s. Please move this later! +// Used with _Litob.s. Please move these later! char D_800E4920[20] = "0123456789abcdef"; // lowercase hex digits char D_800E4934[20] = "0123456789ABCDEF"; // uppercase hex digits + + diff --git a/lib/src/unknown_0D43F0.c b/lib/src/unknown_0D43F0.c index 78c8dc8c..7357a8d6 100644 --- a/lib/src/unknown_0D43F0.c +++ b/lib/src/unknown_0D43F0.c @@ -7,10 +7,35 @@ s32 D_800E48A0[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/alCopy.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Putfld.s") -// Both of these are used in _Printf + char D_800E48C0[36] = " "; char D_800E48E4[32] = "00000000000000000000000000000000"; +/************ .rodata ************/ + +const char D_800E96C0[] = "hlL"; +const char D_800E96C4[] = " +-#0"; +const int D_800E96CC[] = { 1, 2, 4, 8, 16, 0 }; + +// Jump table in _Putfld +const u32 D_800E96E4[] = { + 0x800D3C08, 0x800D3EE8, 0x800D3C08, 0x800D3EE8, + 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, + 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, + 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, + 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3AB8, + 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, + 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, + 0x800D3EE8, 0x800D3EE8, 0x800D3910, 0x800D3948, + 0x800D3C08, 0x800D3C08, 0x800D3C08, 0x800D3EE8, + 0x800D3948, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, + 0x800D3EE8, 0x800D3D6C, 0x800D3AB8, 0x800D3E3C, + 0x800D3EE8, 0x800D3EE8, 0x800D3E84, 0x800D3EE8, + 0x800D3AB8, 0x800D3EE8, 0x800D3EE8, 0x800D3AB8 +}; + +/*********************************/ + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Putfld.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Printf.s") \ No newline at end of file From 77b305e5f19e25b951753c4b6e60c5eca95386ee Mon Sep 17 00:00:00 2001 From: David Benepe Date: Tue, 1 Jun 2021 00:43:38 -0500 Subject: [PATCH 27/66] Moved .rodata in unknown_0D3020 from asm to C. --- data/unknown_0D3020.rodata.s | 108 ----------------------------------- lib/src/unknown_0D3020.c | 98 ++++++++++++++++++++++++++++++- 2 files changed, 97 insertions(+), 109 deletions(-) delete mode 100644 data/unknown_0D3020.rodata.s diff --git a/data/unknown_0D3020.rodata.s b/data/unknown_0D3020.rodata.s deleted file mode 100644 index 7bcc0107..00000000 --- a/data/unknown_0D3020.rodata.s +++ /dev/null @@ -1,108 +0,0 @@ -.include "macros.inc" - -.macro .aligned_text ascii - .asciz "\ascii" - .balign 4 -.endm - -.section .rodata - -glabel D_800E97C0 -.word 0x3FF00000 -.word 0x00000000 -.word 0xBFC55554 -.word 0xBC83656D -.word 0x3F8110ED -.word 0x3804C2A0 -.word 0xBF29F6FF -.word 0xEEA56814 -.word 0x3EC5DBDF -.word 0x0E314BFE - -glabel D_800E97E8 -.word 0x3FD45F30 -.word 0x6DC9C883 - -glabel D_800E97F0 -.word 0x400921FB -.word 0x50000000 - -glabel D_800E97F8 -.word 0x3E6110B4 -.word 0x611A6263 - -glabel D_800E9800 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 - -glabel D_800E9810 -.word 0x3FF00000 -.word 0x00000000 -.word 0xBFC55554 -.word 0xBC83656D -.word 0x3F8110ED -.word 0x3804C2A0 -.word 0xBF29F6FF -.word 0xEEA56814 -.word 0x3EC5DBDF -.word 0x0E314BFE - -glabel D_800E9838 -.word 0x3FD45F30 -.word 0x6DC9C883 - -glabel D_800E9840 -.word 0x400921FB -.word 0x50000000 - -glabel D_800E9848 -.word 0x3E6110B4 -.word 0x611A6263 - -glabel D_800E9850 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 - -glabel D_800E9860 -.word 0x40240000 -.word 0x00000000 -.word 0x40590000 -.word 0x00000000 -.word 0x40C38800 -.word 0x00000000 -.word 0x4197D784 -.word 0x00000000 -.word 0x4341C379 -.word 0x37E08000 -.word 0x4693B8B5 -.word 0xB5056E17 -.word 0x4D384F03 -.word 0xE93FF9F5 -.word 0x5A827748 -.word 0xF9301D32 -.word 0x75154FDD -.word 0x7F73BF3C - -glabel D_800E98A8 -.aligned_text "NaN" - -glabel D_800E98AC -.aligned_text "Inf" - -glabel D_800E98B0 -.word 0x30000000 -.word 0x00000000 - -glabel D_800E98B8 -.word 0x4197D784 -.word 0x00000000 - -glabel D_800E98C0 -.word 0x7F810000 -.word 0x00000000 -.word 0x00000000 -.word 0x00000000 diff --git a/lib/src/unknown_0D3020.c b/lib/src/unknown_0D3020.c index 308528dc..6e51a003 100644 --- a/lib/src/unknown_0D3020.c +++ b/lib/src/unknown_0D3020.c @@ -32,8 +32,104 @@ void __osPiRelAccess(void) osSendMesg(&piAccessQueue, NULL, OS_MESG_NOBLOCK); } -// Used with _Litob.s. Please move these later! +/**********************************************************************/ + +// Please move these later! + +// Used with cosf + +const int D_800E97C0[5][2] = { + { 0x3FF00000, 0x00000000 }, + { 0xBFC55554, 0xBC83656D }, + { 0x3F8110ED, 0x3804C2A0 }, + { 0xBF29F6FF, 0xEEA56814 }, + { 0x3EC5DBDF, 0x0E314BFE } +}; + +const int D_800E97E8[2] = { + 0x3FD45F30, 0x6DC9C883 +}; +const int D_800E97F0[2] = { + 0x400921FB, 0x50000000 +}; +const int D_800E97F8[2] = { + 0x3E6110B4, 0x611A6263 +}; +const int D_800E9800[1] = { + 0x00000000 +}; + +const int COSF_FILE_PADDING[3] = { 0 }; + +// Used with sinf + +const int D_800E9810[5][2] = { + { 0x3FF00000, 0x00000000 }, + { 0xBFC55554, 0xBC83656D }, + { 0x3F8110ED, 0x3804C2A0 }, + { 0xBF29F6FF, 0xEEA56814 }, + { 0x3EC5DBDF, 0x0E314BFE } +}; + +const int D_800E9838[2] = { + 0x3FD45F30, 0x6DC9C883 +}; + +const int D_800E9840[2] = { + 0x400921FB, 0x50000000 +}; + +const int D_800E9848[2] = { + 0x3E6110B4, 0x611A6263 +}; + +const int D_800E9850[1] = { + 0x00000000 +}; + +const int SINF_FILE_PADDING[3] = { 0 }; + +// Used with _Litob + char D_800E4920[20] = "0123456789abcdef"; // lowercase hex digits char D_800E4934[20] = "0123456789ABCDEF"; // uppercase hex digits +// Powers +const double D_800E9860[] = { + 10e0L, 10e1L, 10e3L, 10e7L, + 10e15L, 10e31L, 10e63L, 10e127L, + 10e255L +}; + +const char D_800E98A8[] = "NaN"; +const char D_800E98AC[] = "Inf"; + +const int D_800E98B0[2] = { + 0x30000000, 0x00000000 +}; + +const int D_800E98B8[2] = { + 0x4197D784, 0x00000000 +}; + +const int D_800E98C0[2] = { + 0x7F810000, 0x00000000 +}; + + + + + + + + + + + + + + + + + From 635eb650e8f86523c0cc9b15418e670bd6f98452 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 00:27:41 -0500 Subject: [PATCH 28/66] Updated score script with game status. --- tools/python/score.py | 55 +++-- tools/python/score_display.py | 157 +++++++++++++++ tools/python/score_progress.json | 335 +++++++++++++++++++++++++++++++ 3 files changed, 517 insertions(+), 30 deletions(-) create mode 100644 tools/python/score_display.py create mode 100644 tools/python/score_progress.json diff --git a/tools/python/score.py b/tools/python/score.py index 61e7053e..b9b52ac2 100644 --- a/tools/python/score.py +++ b/tools/python/score.py @@ -1,6 +1,8 @@ import re import sys +import argparse from file_util import FileUtil +from score_display import ScoreDisplay ASM_FOLDERS = [ './asm/unknown_0251F0', @@ -13,7 +15,7 @@ ASM_FOLDERS = [ ] # These will automatically be added to the adventure one percentage. -ASM_FUNCTIONS = [ 'entrypoint' ] +ASM_LABELS = [ 'entrypoint' ] for folder in ASM_FOLDERS: GLABEL_REGEX = r'glabel ([0-9A-Za-z_]+)' filenames = FileUtil.get_filenames_from_directory(folder, extensions=('.s',)) @@ -22,12 +24,12 @@ for folder in ASM_FOLDERS: text = asmFile.read() matches = re.finditer(GLABEL_REGEX, text, re.MULTILINE) for matchNum, match in enumerate(matches, start=1): - ASM_FUNCTIONS.append(match.groups()[0]) + ASM_LABELS.append(match.groups()[0]) BUILD_DIRECTORY = './build/us_1.0' SRC_DIRECTORY = './src' LIB_SRC_DIRECTORY = './lib/src' -FUNCTION_REGEX = r'([/][*][*]([^*]|([*][^/]))*[*][/][\n]\s*)?(void|s64|s32|s16|s8|u64|u32|u16|u8|f32|f64)(\s|[*])*([0-9A-Za-z_]+)\s*[(][^)]*[)]\s*{' +FUNCTION_REGEX = r'((?:[\/][*][*]+[\n])(?:[^\n]*\n)*?(?:.*[*][\/]))?(void|s64|s32|s16|s8|u64|u32|u16|u8|f32|f64)(?:\s|[*])*([0-9A-Za-z_]+)\s*[(][^)]*[)]\s*{' GLOBAL_ASM_REGEX = r'GLOBAL_ASM[(]".*(?=\/)\/([^.]+).s"[)]' WIP_REGEX = r'#if(.|\n)*?(GLOBAL_ASM[(]([^)]*)[)])(.|\n)*?#else(.|\n)*?#endif' @@ -87,7 +89,7 @@ class ScoreFile: matches = re.finditer(FUNCTION_REGEX, self.text, re.MULTILINE) for matchNum, match in enumerate(matches, start=1): groups = match.groups() - self.functions.append(ScoreFileMatch(groups[0], groups[5])) + self.functions.append(ScoreFileMatch(groups[0], groups[2])) matches = re.finditer(GLOBAL_ASM_REGEX, self.text, re.MULTILINE) for matchNum, match in enumerate(matches, start=1): @@ -120,17 +122,16 @@ class ScoreFile: def main(): showTopFiles = 0 - - numArgs = len(sys.argv) - for i in range(1, numArgs): - arg = sys.argv[i].lower() - print('Argument:', sys.argv[i]) - if arg.startswith("--top"): - num = arg[5:] - if num == "": - showTopFiles = 10 # 10 is the default - else: - showTopFiles = int(num) + + parser = argparse.ArgumentParser(description="") + parser.add_argument("-t", "--top", help="(Optional) Shows the top N files remaining.") + parser.add_argument("-a", "--adventure", help="(Optional) Only shows adventure 1 or 2 based on passed in value.", choices=['1', '2']) + args = parser.parse_args() + adventureSelect = 3 # Show both adventures by default + if args.adventure != None: + adventureSelect = int(args.adventure) + if args.top != None: + showTopFiles = int(args.top) scoreFiles = [] totalNumberOfDecompiledFunctions = 0 @@ -158,25 +159,17 @@ def main(): totalSizeOfDocumentedFunctions += scoreFile.get_size_of_documented_functions() scoreFiles.append(scoreFile) - totalNumberOfFunctions = MAP_FILE.numFunctions - for asm_function in ASM_FUNCTIONS: - totalSizeOfDecompiledFunctions += MAP_FILE.functionSizes[asm_function] + totalNumberOfFunctions = MAP_FILE.numFunctions + for asm_function in ASM_LABELS: + if asm_function in MAP_FILE.functionSizes: + totalSizeOfDecompiledFunctions += MAP_FILE.functionSizes[asm_function] adventureOnePercentage = (totalSizeOfDecompiledFunctions / CODE_SIZE) * 100 adventureTwoPercentage = (totalSizeOfDocumentedFunctions / CODE_SIZE) * 100 - print('=========================================') - print(' ADVENTURE ONE (ASM -> C Decompilation)') - print(' ----------- {:5.2f}% Complete -----------'.format(adventureOnePercentage)) - print(' # Decompiled functions: ' + str(totalNumberOfDecompiledFunctions)) - print(' # GLOBAL_ASM remaining: ' + str(totalNumberOfGlobalAsms)) - print('=========================================') - print(' ADVENTURE TWO (Cleanup & Documentation)') - print(' ----------- {:5.2f}% Complete -----------'.format(adventureTwoPercentage)) - print(' # Documented functions: ' + str(totalNumberOfDocumentedFunctions)) - print(' # Undocumented remaining: ' + str(totalNumberOfFunctions - totalNumberOfDocumentedFunctions)) - print('=========================================') + scoreDisplay = ScoreDisplay() + print(scoreDisplay.getDisplay(adventureOnePercentage, adventureTwoPercentage, adventureSelect, totalNumberOfDecompiledFunctions, totalNumberOfGlobalAsms, totalNumberOfDocumentedFunctions, totalNumberOfFunctions - totalNumberOfDocumentedFunctions)) if showTopFiles > 0: if showTopFiles > len(scoreFiles): @@ -189,7 +182,9 @@ def main(): for i in range(0, showTopFiles): percentageRemaining = (files[i][1] / CODE_SIZE) * 100 percentageDone = (files[i][2] / CODE_SIZE) * 100 - funcName = files[i][0][12:] + funcName = files[i][0] + if '/' in funcName: + funcName = funcName[funcName.rindex('/') + 1:] print("", funcName, (" " * (24 - len(funcName))), "| {:5.2f}% | {:5.2f}% |".format(percentageRemaining, percentageDone)) diff --git a/tools/python/score_display.py b/tools/python/score_display.py new file mode 100644 index 00000000..5b3a35ba --- /dev/null +++ b/tools/python/score_display.py @@ -0,0 +1,157 @@ +import json +import argparse + +def readScoreDisplayJson(filename='./tools/python/score_progress.json'): + with open(filename, 'r') as inFile: + return json.loads(inFile.read()) + +TOTAL_NUMBER_OF_BALLOONS = 47 +TOTAL_NUMBER_OF_KEYS = 4 +TOTAL_NUMBER_OF_TT_AMULETS = 4 +TOTAL_NUMBER_OF_WIZPIG_AMULETS = 4 +TOTAL_NUMBER_OF_TROPHIES = 5 + +DEFAULT_MAX_LENGTH = 42 + +class ScoreDisplay: + def __init__(self): + self.progressNodes = readScoreDisplayJson() + + def getStatus(self, percentage): + if percentage >= 100.0: + return { + "Balloon": TOTAL_NUMBER_OF_BALLOONS, + "Key": TOTAL_NUMBER_OF_KEYS, + "TTAmulet": TOTAL_NUMBER_OF_TT_AMULETS, + "WizpigAmulet": TOTAL_NUMBER_OF_WIZPIG_AMULETS, + "Trophy": TOTAL_NUMBER_OF_TROPHIES, + "Msg": "COMPLETED!" + } + out = { + "Balloon": 0, + "Key": 0, + "TTAmulet": 0, + "WizpigAmulet": 0, + "Trophy": 0, + "Msg": 'Not Started' + } + if percentage <= 0.0: + return out + numberOfCompletedNodes = int((percentage / 100.0) * len(self.progressNodes)) + currentNodeProgress = ((percentage / 100.0) * len(self.progressNodes)) - numberOfCompletedNodes + for i in range(0, numberOfCompletedNodes): + rewards = self.progressNodes[i]["rewards"] + for reward in rewards: + out[reward] += rewards[reward] + out['Msg'] = self.progressNodes[numberOfCompletedNodes]['msg'] + nodeType = self.progressNodes[numberOfCompletedNodes]['type'] + #if nodeType != 'Task': + # out['Msg'] += '\n' + if nodeType == 'Race': + out['Msg'] += ' (Lap ' + str(int(currentNodeProgress*3)+1) + '/3)' + elif nodeType == 'Collecting': + collectingName = self.progressNodes[numberOfCompletedNodes]['collecting']['name'] + collectingMax = self.progressNodes[numberOfCompletedNodes]['collecting']['max'] + out['Msg'] += ' (' + str(int(currentNodeProgress * collectingMax)) + '/' + str(collectingMax) + ' ' + collectingName + 's)' + elif nodeType == 'SilverCoinsRace': + out['Msg'] += ' (' + str(int(currentNodeProgress*9)) + '/8 silver coins)' + elif nodeType == 'TrophyRace': + if currentNodeProgress < 0.25: + out['Msg'] += ' (Round One)' + elif currentNodeProgress < 0.50: + out['Msg'] += ' (Round Two)' + elif currentNodeProgress < 0.75: + out['Msg'] += ' (Round Three)' + elif currentNodeProgress < 1.00: + out['Msg'] += ' (Round Four)' + elif nodeType == 'Battle': + if currentNodeProgress < 0.34: + out['Msg'] += ' (3 opponents remain)' + elif currentNodeProgress < 0.67: + out['Msg'] += ' (2 opponents remain)' + elif currentNodeProgress < 1.00: + out['Msg'] += ' (1 opponent remains)' + return out + + def makeLine(self, char, length, title=None): + if title == None: + return ' ' + (char * length) + ' \n' + else: + lineSideLength = (length - len(title) - 2) // 2 + leftLength = lineSideLength + rightLength = lineSideLength + if (leftLength + rightLength + len(title) + 2) < length: + rightLength += 1 + if leftLength + rightLength <= 0: + if leftLength + rightLength == 0: + return ' ' + title + ' \n' + else: + return ' ' + title + ' \n' + else: + return ' ' + (char * leftLength) + ' ' + title + ' ' + (char * rightLength) + ' \n' + + def getGameStatusDisplay(self, status, dashLen): + out = '' + out += self.makeLine('-', dashLen, 'Game Status') + firstStatusLine = '' + secondStatusLine = '' + firstStatusLine += 'Balloons: {:}/{:},'.format(status['Balloon'], TOTAL_NUMBER_OF_BALLOONS) + firstStatusLine += ' Keys: {:}/{:},'.format(status['Key'], TOTAL_NUMBER_OF_KEYS) + firstStatusLine += ' Trophies: {:}/{:}'.format(status['Trophy'], TOTAL_NUMBER_OF_TROPHIES) + secondStatusLine += 'T.T. Amulets: {:}/{:},'.format(status['TTAmulet'], TOTAL_NUMBER_OF_TT_AMULETS) + secondStatusLine += ' Wizpig Amulets: {:}/{:}'.format(status['WizpigAmulet'], TOTAL_NUMBER_OF_WIZPIG_AMULETS) + out += self.makeLine(' ', dashLen, firstStatusLine) + out += self.makeLine(' ', dashLen, secondStatusLine) + out += self.makeLine('-', dashLen) + out += self.makeLine(' ', dashLen, status['Msg']) + return [out, dashLen] + + def getDisplay(self, advOnePer, advTwoPer, showFlags=3, totalDecompFunctions=0, totalGlobalAsm=0, totalDocumented=0, totalUndocumented=0): + advOneStatus = self.getStatus(advOnePer) + advTwoStatus = self.getStatus(advTwoPer) + if showFlags == 3: + dashLen = max(len(advOneStatus['Msg']), len(advTwoStatus['Msg']), DEFAULT_MAX_LENGTH) + elif showFlags == 1: + dashLen = max(len(advOneStatus['Msg']), DEFAULT_MAX_LENGTH) + elif showFlags == 2: + dashLen = max(len(advTwoStatus['Msg']), DEFAULT_MAX_LENGTH) + else: + dashLen = DEFAULT_MAX_LENGTH + advOneGameStatusDisplay = self.getGameStatusDisplay(advOneStatus, dashLen) + advTwoGameStatusDisplay = self.getGameStatusDisplay(advTwoStatus, dashLen) + out = '' + if showFlags & 1: + out += self.makeLine('=', dashLen) + out += self.makeLine(' ', dashLen, 'ADVENTURE ONE (ASM -> C Decompilation)') + if advOnePer >= 100.0: + out += self.makeLine('-', dashLen, '{:5.1f}% Complete'.format(advOnePer)) + else: + out += self.makeLine('-', dashLen, '{:5.2f}% Complete'.format(advOnePer)) + out += self.makeLine(' ', dashLen, '# Decompiled functions: ' + str(totalDecompFunctions)) + out += self.makeLine(' ', dashLen, '# GLOBAL_ASM remaining: ' + str(totalGlobalAsm)) + out += advOneGameStatusDisplay[0] + if showFlags & 2: + out += self.makeLine('=', dashLen) + out += self.makeLine(' ', dashLen, ' ADVENTURE TWO (Cleanup & Documentation)') + if advTwoPer >= 100.0: + out += self.makeLine('-', dashLen, '{:5.1f}% Complete'.format(advTwoPer)) + else: + out += self.makeLine('-', dashLen, '{:5.2f}% Complete'.format(advTwoPer)) + out += self.makeLine(' ', dashLen, '# Documented functions: ' + str(totalDocumented)) + out += self.makeLine(' ', dashLen, '# Undocumented remaining: ' + str(totalUndocumented)) + out += advTwoGameStatusDisplay[0] + out += self.makeLine('=', dashLen)[:-1] + return out + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="") + parser.add_argument("adventureOnePercentage", help="Value within [0.0, 100.0] that describes how complete the decomp is.") + parser.add_argument("adventureTwoPercentage", help="Value within [0.0, 100.0] that describes how complete the documentation is.") + parser.add_argument("-a", "--adventure", help="(Optional) Only shows adventure 1 or 2 based on passed in value.", choices=['1', '2']) + args = parser.parse_args() + adventureSelect = 3 # Show both adventures by default + if args.adventure != None: + adventureSelect = int(args.adventure) + scoreDisplay = ScoreDisplay() + print(scoreDisplay.getDisplay(float(args.adventureOnePercentage), float(args.adventureTwoPercentage), adventureSelect)) + \ No newline at end of file diff --git a/tools/python/score_progress.json b/tools/python/score_progress.json new file mode 100644 index 00000000..314d61cf --- /dev/null +++ b/tools/python/score_progress.json @@ -0,0 +1,335 @@ +[ + { + "msg": "We are collecting the first balloon on Timber's Island.", + "rewards": { "Balloon": 1 }, + "type": "Task" + }, + { + "msg": "We are collecting the second balloon on Timber's Island.", + "rewards": { "Balloon": 1 }, + "type": "Task" + }, + { + "msg": "We are collecting the third balloon on Timber's Island.", + "rewards": { "Balloon": 1 }, + "type": "Task" + }, + { + "msg": "We are collecting the fourth balloon on Timber's Island.", + "rewards": { "Balloon": 1 }, + "type": "Task" + }, + { + "msg": "We are racing in Ancient Lake.", + "rewards": { "Balloon": 1, "Key": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Fossil Canyon.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Jungle Falls.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Hot Top Volcano.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing the dinosaur boss Trickytops", + "rewards": {}, + "type": "Task" + }, + { + "msg": "We are collecting eggs in Fire Mountain.", + "rewards": { "TTAmulet": 1 }, + "type": "Collecting", + "collecting": { "name": "Egg", "max": 3 } + }, + { + "msg": "We are collecting silver coins in Ancient Lake.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Fossil Canyon.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Jungle Falls.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Hot Top Volcano.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are racing in the rematch against Trickytops.", + "rewards": { "WizpigAmulet": 1 }, + "type": "Task" + }, + { + "msg": "We are participating in the Trophy Race of Dino Domain.", + "rewards": { "Trophy": 1 }, + "type": "TrophyRace" + }, + { + "msg": "We are racing Taj in the Car Challenge.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Everfrost Peak.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Walrus Cove.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Snowball Valley.", + "rewards": { "Balloon": 1, "Key": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Frosty Village.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing the walrus boss Bluey.", + "rewards": {}, + "type": "Task" + }, + { + "msg": "We are battling in Icicle Pyramid.", + "rewards": { "TTAmulet": 1 }, + "type": "Battle" + }, + { + "msg": "We are collecting silver coins in Everfrost Peak.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Walrus Cove.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Snowball Valley.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Frosty Village.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are racing in the rematch against Bluey.", + "rewards": { "WizpigAmulet": 1 }, + "type": "Task" + }, + { + "msg": "We are participating in the Trophy Race of Snowflake Mountain.", + "rewards": { "Trophy": 1 }, + "type": "TrophyRace" + }, + { + "msg": "We are racing Taj in the Hover Challenge.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Whale Bay.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Crescent Island.", + "rewards": { "Balloon": 1, "Key": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Pirate Lagoon.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Treasure Caves.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing the octopus boss Bubbler.", + "rewards": {}, + "type": "Race" + }, + { + "msg": "We are battling in Darkwater Beach.", + "rewards": { "TTAmulet": 1 }, + "type": "Battle" + }, + { + "msg": "We are collecting silver coins in Whale Bay.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Crescent Island.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Pirate Lagoon.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Treasure Caves.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are racing in the rematch against Bubbler.", + "rewards": { "WizpigAmulet": 1 }, + "type": "Race" + }, + { + "msg": "We are participating in the Trophy Race of Sherbet Island.", + "rewards": { "Trophy": 1 }, + "type": "TrophyRace" + }, + { + "msg": "We are racing Taj in the Plane Challenge.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Windmill Plains.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Greenwood Village.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Boulder Canyon.", + "rewards": { "Balloon": 1, "Key": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Haunted Woods.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing the dragon boss Smokey.", + "rewards": {}, + "type": "Race" + }, + { + "msg": "We are collecting bananas in Smokey Castle.", + "rewards": { "TTAmulet": 1 }, + "type": "Collecting", + "collecting": { "name": "Banana", "max": 10 } + }, + { + "msg": "We are collecting silver coins in Windmill Plains.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Greenwood Village.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Boulder Canyon.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Haunted Woods.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are racing in the rematch against Smokey.", + "rewards": { "WizpigAmulet": 1 }, + "type": "Race" + }, + { + "msg": "We are participating in the Trophy Race of Dragon Forest.", + "rewards": { "Trophy": 1 }, + "type": "TrophyRace" + }, + { + "msg": "We are racing the wizard pig boss Wizpig.", + "rewards": {}, + "type": "Race" + }, + { + "msg": "We are racing in Spacedust Alley.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Darkmoon Caverns.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Spaceport Alpha.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are racing in Star City.", + "rewards": { "Balloon": 1 }, + "type": "Race" + }, + { + "msg": "We are collecting silver coins in Spacedust Alley.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Darkmoon Caverns.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Spaceport Alpha.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are collecting silver coins in Star City.", + "rewards": { "Balloon": 1 }, + "type": "SilverCoinsRace" + }, + { + "msg": "We are racing in the rematch against Wizpig.", + "rewards": {}, + "type": "Race" + }, + { + "msg": "We are participating in the Trophy Race of Future Fun Land.", + "rewards": {}, + "type": "TrophyRace" + } +] + From d6c0e143e64f094b27992b1aecc685ff4e18e8ab Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 15:56:24 -0500 Subject: [PATCH 29/66] Updated asm_processor --- tools/asm_processor/asm_processor.py | 37 +++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/tools/asm_processor/asm_processor.py b/tools/asm_processor/asm_processor.py index 302668d7..01148c7a 100644 --- a/tools/asm_processor/asm_processor.py +++ b/tools/asm_processor/asm_processor.py @@ -380,7 +380,7 @@ class Failure(Exception): class GlobalState: - def __init__(self, min_instr_count, skip_instr_count, use_jtbl_for_rodata): + def __init__(self, min_instr_count, skip_instr_count, use_jtbl_for_rodata, mips1): # A value that hopefully never appears as a 32-bit rodata constant (or we # miscompile late rodata). Increases by 1 in each step. self.late_rodata_hex = 0xE0123456 @@ -388,6 +388,7 @@ class GlobalState: self.min_instr_count = min_instr_count self.skip_instr_count = skip_instr_count self.use_jtbl_for_rodata = use_jtbl_for_rodata + self.mips1 = mips1 def next_late_rodata_hex(self): dummy_bytes = struct.pack('>I', self.late_rodata_hex) @@ -608,12 +609,14 @@ class GlobalAsmBlock: size = self.fn_section_sizes['.late_rodata'] // 4 skip_next = False needs_double = (self.late_rodata_alignment != 0) + extra_mips1_nop = False + jtbl_size = 11 if state.mips1 else 9 for i in range(size): if skip_next: skip_next = False continue - # Jump tables give 9 instructions for >= 5 words of rodata, and should be - # emitted when: + # Jump tables give 9 instructions (11 with -mips1) for >= 5 words of rodata, + # and should be emitted when: # - -O2 or -O2 -g3 are used, which give the right codegen # - we have emitted our first .float/.double (to ensure that we find the # created rodata in the binary) @@ -624,11 +627,12 @@ class GlobalAsmBlock: # - we have at least 10 more instructions to go in this function (otherwise our # function size computation will be wrong since the delay slot goes unused) if (not needs_double and state.use_jtbl_for_rodata and i >= 1 and - size - i >= 5 and num_instr - len(late_rodata_fn_output) >= 10): + size - i >= 5 and num_instr - len(late_rodata_fn_output) >= jtbl_size + 1): cases = " ".join("case {}:".format(case) for case in range(size - i)) late_rodata_fn_output.append("switch (*(volatile int*)0) { " + cases + " ; }") - late_rodata_fn_output.extend([""] * 8) + late_rodata_fn_output.extend([""] * (jtbl_size - 1)) jtbl_rodata_size = (size - i) * 4 + extra_mips1_nop = i != 2 break dummy_bytes = state.next_late_rodata_hex() late_rodata_dummy_bytes.append(dummy_bytes) @@ -638,12 +642,20 @@ class GlobalAsmBlock: fval, = struct.unpack('>d', dummy_bytes + dummy_bytes2) late_rodata_fn_output.append('*(volatile double*)0 = {};'.format(fval)) skip_next = True - needs_double = True + needs_double = False + if state.mips1: + # mips1 does not have ldc1/sdc1 + late_rodata_fn_output.append('') + late_rodata_fn_output.append('') + extra_mips1_nop = False else: fval, = struct.unpack('>f', dummy_bytes) late_rodata_fn_output.append('*(volatile float*)0 = {}f;'.format(fval)) + extra_mips1_nop = True late_rodata_fn_output.append('') late_rodata_fn_output.append('') + if state.mips1 and extra_mips1_nop: + late_rodata_fn_output.append('') text_name = None if self.fn_section_sizes['.text'] > 0 or late_rodata_fn_output: @@ -722,7 +734,7 @@ float_regexpr = re.compile(r"[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?f") def repl_float_hex(m): return str(struct.unpack(">I", struct.pack(">f", float(m.group(0).strip().rstrip("f"))))[0]) -def parse_source(f, opt, framepointer, input_enc, output_enc, out_dependencies, print_source=None): +def parse_source(f, opt, framepointer, mips1, input_enc, output_enc, out_dependencies, print_source=None): if opt in ['O2', 'O1']: if framepointer: min_instr_count = 6 @@ -751,7 +763,7 @@ def parse_source(f, opt, framepointer, input_enc, output_enc, out_dependencies, if opt in ['O2', 'g3'] and not framepointer: use_jtbl_for_rodata = True - state = GlobalState(min_instr_count, skip_instr_count, use_jtbl_for_rodata) + state = GlobalState(min_instr_count, skip_instr_count, use_jtbl_for_rodata, mips1) global_asm = None asm_functions = [] @@ -803,7 +815,7 @@ def parse_source(f, opt, framepointer, input_enc, output_enc, out_dependencies, out_dependencies.append(fname) include_src = StringIO() with open(fname, encoding=input_enc) as include_file: - parse_source(include_file, opt, framepointer, input_enc, output_enc, out_dependencies, include_src) + parse_source(include_file, opt, framepointer, mips1, input_enc, output_enc, out_dependencies, include_src) include_src.write('#line ' + str(line_no + 1) + ' "' + f.name + '"') output_lines[-1] = include_src.getvalue() include_src.close() @@ -1179,6 +1191,7 @@ def run_wrapped(argv, outfile, functions): parser.add_argument('--input-enc', default='latin1', help="Input encoding (default: latin1)") parser.add_argument('--output-enc', default='latin1', help="Output encoding (default: latin1)") parser.add_argument('-framepointer', dest='framepointer', action='store_true') + parser.add_argument('-mips1', dest='mips1', action='store_true') parser.add_argument('-g3', dest='g3', action='store_true') group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-O1', dest='opt', action='store_const', const='O1') @@ -1190,18 +1203,20 @@ def run_wrapped(argv, outfile, functions): if opt != 'O2': raise Failure("-g3 is only supported together with -O2") opt = 'g3' + if args.mips1 and (opt != 'O2' or args.framepointer): + raise Failure("-mips1 is only supported together with -O2") if args.objfile is None: with open(args.filename, encoding=args.input_enc) as f: deps = [] - functions = parse_source(f, opt=opt, framepointer=args.framepointer, input_enc=args.input_enc, output_enc=args.output_enc, out_dependencies=deps, print_source=outfile) + functions = parse_source(f, opt=opt, framepointer=args.framepointer, mips1=args.mips1, input_enc=args.input_enc, output_enc=args.output_enc, out_dependencies=deps, print_source=outfile) return functions, deps else: if args.assembler is None: raise Failure("must pass assembler command") if functions is None: with open(args.filename, encoding=args.input_enc) as f: - functions = parse_source(f, opt=opt, framepointer=args.framepointer, input_enc=args.input_enc, out_dependencies=[], output_enc=args.output_enc) + functions = parse_source(f, opt=opt, framepointer=args.framepointer, mips1=args.mips1, input_enc=args.input_enc, out_dependencies=[], output_enc=args.output_enc) if not functions: return asm_prelude = b'' From 9edef376f3672aa97a5ea8b9ca89c8e51fb61887 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 16:13:21 -0500 Subject: [PATCH 30/66] Updated asm_processor build.py --- tools/asm_processor/build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/asm_processor/build.py b/tools/asm_processor/build.py index 2c760dcf..019d3db7 100755 --- a/tools/asm_processor/build.py +++ b/tools/asm_processor/build.py @@ -32,8 +32,12 @@ opt_flags = [x for x in compile_args if x in ['-g3', '-g', '-O1', '-O2', '-frame preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c', delete=False) try: + if '-O2' in opt_flags: + opt_flags.append('-mips1') asmproc_flags = opt_flags + [in_file, '--input-enc', 'utf-8', '--output-enc', 'euc-jp'] compile_cmdline = compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name] + + print(asmproc_flags) asm_processor.run(asmproc_flags, outfile=preprocessed_file) try: From 91f32ac0d27c5d05aae3497c2700b6efc5c13a80 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 16:40:33 -0500 Subject: [PATCH 31/66] Added rodata_move tool --- tools/asm_processor/build.py | 3 - tools/python/rodata_move.py | 229 +++++++++++++++++++++++++++++++++++ 2 files changed, 229 insertions(+), 3 deletions(-) create mode 100755 tools/python/rodata_move.py diff --git a/tools/asm_processor/build.py b/tools/asm_processor/build.py index 019d3db7..239c3443 100755 --- a/tools/asm_processor/build.py +++ b/tools/asm_processor/build.py @@ -36,9 +36,6 @@ try: opt_flags.append('-mips1') asmproc_flags = opt_flags + [in_file, '--input-enc', 'utf-8', '--output-enc', 'euc-jp'] compile_cmdline = compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name] - - print(asmproc_flags) - asm_processor.run(asmproc_flags, outfile=preprocessed_file) try: subprocess.check_call(compile_cmdline) diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py new file mode 100755 index 00000000..e141fb52 --- /dev/null +++ b/tools/python/rodata_move.py @@ -0,0 +1,229 @@ +import os +import re +import argparse +from file_util import FileUtil + +C_RODATA_REGEX = r"/[*]+[ ]*[.]rodata[ ]*[*]+/(?:.*\n)+/[*]{33}/" +C_STRING_REGEX = r"const[ ]+char[ ]+(D_[0-9A-Fa-f]{8})[[][^]]*[]][ ]*=[ ]*(\"[^\"]*\")[ ]*;" +C_FLOAT_REGEX = r".*(D_[0-9A-Fa-f]{8})[ ]*=[ ]*{[ ]*([-]?[0-9]+.[0-9]+)[f]?[ ]*}.*" +C_JMPTABLE_REGEX = r"(?:(?:D_)|0x)[0-9A-Fa-f]{8}" + +# Debugging variables +NO_OUTPUT = False # If True, then no files will be changed. +ONLY_THE_FIRST_ASM_FILE = False # If True, then only one asm file will be changed. + +def getMatches(string, regex): + out = [] + matches = re.finditer(regex, string, re.MULTILINE) + for matchNum, match in enumerate(matches, start=1): + start = match.start() + end = match.end() + out.append((string[start:end], match.groups(), (start, end))) + return out + +def getLineType(line): + if line.lower().startswith('const char '): + return 1 # Literal string + elif line.lower().startswith('const floatliteral '): + return 2 # Literal float + elif line.lower().startswith('const doubleliteral '): + return 3 # Literal double + elif line.lower().startswith('};'): + return 4 # Jump Table bottom + elif line.lower().startswith('const u32 '): + return 5 # Jump Table top + else: + return 0 + +def getAsmFileReferenceForLabel(filename, label): + searchLabel = 'asm/non_matchings/'+filename + possibleFiles = [] + search = os.popen('fgrep -r "' + label + '"').read().split('\n') + for line in search: + if searchLabel in line: + asmfilePath = line.split(':')[0] + if asmfilePath not in possibleFiles: + possibleFiles.append(asmfilePath) + if len(possibleFiles) > 1: + raise Exception('Cannot determine asm file for label: ' + label) + elif len(possibleFiles) == 0: + raise Exception(label + ' has no asm files associated with it!') + return possibleFiles[0] + +def adjustAsmFile(asmFilepath, refs): + with open(asmFilepath, 'r') as inFile: + asmFile = inFile.read() + if '.late_rodata' in asmFile: + raise Exception('Cannot add to file "' + asmFilepath + '" since it already has .late_rodata in it!') + asmLines = asmFile.split('\n') + replaces = [] + cur = 0 + asmLines.insert(cur, '.late_rodata'); cur += 1 + for index, ref in enumerate(refs): + asmLines.insert(cur, 'glabel ' + ref[1]); cur += 1 + if ref[0] == 'double' or ref[0] == 'float' or ref[0] == 'asciz': + asmLines.insert(cur, '.' + ref[0] + ' ' + ref[2]); cur += 1 + elif ref[0] == 'table': + replaces.append((ref[1], 'jpt' + ref[1][1:])) + tblWords = '.word L' + ref[2][0] + for word in ref[2][1:]: + tblWords += ', L' + word + doneWords = [] + for word in ref[2]: + if word in doneWords: + continue + for i in range(0, len(asmLines)): + line = asmLines[i] + if line.startswith('/* '): + lineParts = line.split(' ') + if lineParts[2] == word: + asmLines.insert(i, 'glabel L' + word) + break + doneWords.append(word) + asmLines.insert(cur, tblWords); cur += 1 + if index < len(refs) - 1 and ref[0] != 'double' and refs[index + 1][0] == 'double': + addPadding = False + if ref[0] == 'float': + addPadding = ref[1].endswith('0') or ref[1].endswith('8') + elif ref[0] == 'table': + tableSizeAlignment = len(ref[2]) % 4 + if ref[1].endswith('0') or ref[1].endswith('8'): + addPadding = tableSizeAlignment == 1 or tableSizeAlignment == 3 + else: + addPadding = tableSizeAlignment == 0 or tableSizeAlignment == 2 + if addPadding: + asmLines.insert(cur, '.word 0 # Padding'); cur += 1 # Insert padding before the next double. + asmLines.insert(cur, ''); cur += 1 + asmLines.insert(cur, '.text'); cur += 1 + asmOut = '\n'.join(asmLines) + for rep in replaces: + asmOut = asmOut.replace(rep[0], rep[1]) + # print(asmOut) + if not NO_OUTPUT: + with open(asmFilepath, 'w') as outFile: + outFile.write(asmOut) + #print(asmFilepath) + #print(refs) + +def convertFile(cFilepath): + filename = cFilepath[cFilepath.rindex('/') + 1:-2] + print(filename) + with open(cFilepath, 'r') as inFile: + cFile = inFile.read() + match = getMatches(cFile, C_RODATA_REGEX) + if len(match) == 0: + print('No .rodata in file "' + cFilepath + '"') + return + rodataPart = match[0][0] + rodataSection = match[0][2] + rodataLines = rodataPart.split('\n') + tableBottom = -1 + hasProcessed = False + stoppedPremature = False + curLine = len(rodataLines) - 1 + bottomLine = curLine + asmData = [] + for line in reversed(rodataLines): + lineType = getLineType(line) + if lineType == 0: + pass + elif lineType == 1: # Literal string + # try: + # strMatch = getMatches(line, C_STRING_REGEX)[0] + # strLabel = strMatch[1][0] + # strValue = strMatch[1][1] + # # Check if the string has a reference somewhere + # getAsmFileReferenceForLabel(filename, strLabel) + # hasProcessed = True + # bottomLine = curLine - 1 + # asmData.insert(0, ('asciz', strLabel, strValue, bottomLine)) + # except: + print('Currently cannot process literal string: ') + print(line) + stoppedPremature = True + break + elif lineType == 2: # Literal float + floatMatch = getMatches(line, C_FLOAT_REGEX)[0] + floatLabel = floatMatch[1][0] + floatValue = floatMatch[1][1] + if floatValue == '0.0': + print('File boundary hit!') + stoppedPremature = True + break + hasProcessed = True + bottomLine = curLine - 1 + asmData.insert(0, ('float', floatLabel, floatValue, bottomLine)) + elif lineType == 3: # Literal double + floatMatch = getMatches(line, C_FLOAT_REGEX)[0] + floatLabel = floatMatch[1][0] + floatValue = floatMatch[1][1] + if floatValue == '0.0': + print('File boundary hit!') + stoppedPremature = True + break + hasProcessed = True + bottomLine = curLine - 1 + asmData.insert(0, ('double', floatLabel, floatValue, bottomLine)) + elif lineType == 4: # Jump table bottom + tableBottom = curLine + elif lineType == 5: # Jump table top + tblMatch = getMatches('\n'.join(rodataLines[curLine:tableBottom+1]), C_JMPTABLE_REGEX) + tblLabel = tblMatch[0][0] + tblValues = [] + for val in range(1, len(tblMatch)): + tblValues.append(tblMatch[val][0][2:]) + hasProcessed = True + bottomLine = curLine - 1 + asmData.insert(0, ('table', tblLabel, tblValues, bottomLine)) + tableBottom = -1 + else: + print(line) + curLine -= 1 + asmRefs = {} + asmBottomLine = 999999 + for i in range(0, len(asmData)): + data = asmData[i] + try: + ref = getAsmFileReferenceForLabel(filename, data[1]) + if ref not in asmRefs: + asmRefs[ref] = [] + asmRefs[ref].append(data) + asmBottomLine = min(asmBottomLine, asmRefs[ref][3]) + except Exception as e: + print(e) + if asmBottomLine != 999999: + bottomLine = asmBottomLine + stoppedPremature = True + break + for asmFilepath in reversed(asmRefs): + print('Processing: ' + asmFilepath) + asmBottomLine = 999999 + adjustAsmFile(asmFilepath, asmRefs[asmFilepath]) + for ref in asmRefs[asmFilepath]: + asmBottomLine = min(asmBottomLine, ref[3]) + if ONLY_THE_FIRST_ASM_FILE: + # print(bottomLine, asmBottomLine) + bottomLine = asmBottomLine + break + # print(asmRefs) + if hasProcessed and not NO_OUTPUT: + newRodata = '\n'.join(rodataLines[0:bottomLine] + rodataLines[-2:]) + newFileText = cFile[:rodataSection[0]] + (newRodata if stoppedPremature else '') + cFile[rodataSection[1]:] + with open(cFilepath, 'w') as outFile: + outFile.write(newFileText) + print('Changes were made to ' + cFilepath) + else: + print('No changes were made to ' + cFilepath) + + +parser = argparse.ArgumentParser(description="") +parser.add_argument("file", help=".c file that contains rodata to move.") +args = parser.parse_args() + +if args.file.endswith('.c'): + convertFile(args.file) +else: + raise Exception('The file must be a .c file.') + +# files = FileUtil.get_filenames_from_directory('src', ('.c',)) +# \ No newline at end of file From 83cf81d2a3e1f8d56cf46256df9f9bcd11b8e61e Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 17:24:42 -0500 Subject: [PATCH 32/66] Moved rodata from C to GLOBAL_ASM --- .../unknown_00BC20/func_8000B750.s | 7 + .../unknown_00BC20/func_8000BADC.s | 13 + .../unknown_00BC20/func_8000CC7C.s | 19 +- .../unknown_00BC20/func_8000E0B0.s | 14 +- .../unknown_00BC20/func_8000E2B4.s | 7 + .../unknown_00BC20/func_8000EA54.s | 16 +- .../unknown_00BC20/func_800101AC.s | 29 +- .../unknown_00BC20/func_80011570.s | 9 + .../unknown_00BC20/func_80011AD0.s | 5 + .../unknown_00BC20/func_80012F94.s | 13 + .../unknown_00BC20/func_800135B8.s | 5 + .../unknown_00BC20/func_80013A0C.s | 10 + .../unknown_00BC20/func_80013DCC.s | 7 + .../unknown_00BC20/func_80014B50.s | 16 +- .../unknown_00BC20/func_800159C8.s | 19 ++ .../unknown_00BC20/func_80016748.s | 7 + .../unknown_00BC20/func_80017A18.s | 9 + .../unknown_00BC20/func_800185E4.s | 7 + .../unknown_00BC20/func_8001955C.s | 5 + .../unknown_00BC20/func_8001BF20.s | 7 + .../unknown_00BC20/func_8001C418.s | 5 + .../unknown_00BC20/func_8001C6C4.s | 12 + .../unknown_00BC20/func_8001D2A0.s | 5 + .../unknown_00BC20/func_8001EFA4.s | 5 + .../unknown_00BC20/func_8001F460.s | 10 + .../unknown_00BC20/func_800235DC.s | 40 ++- .../unknown_00BC20/func_800238BC.s | 92 +++++- .../unknown_00BC20/func_80023E30.s | 39 ++- .../unknown_00BC20/func_80023F48.s | 85 ++++- src/unknown_00BC20.c | 290 +----------------- tools/python/rodata_move.py | 21 +- 31 files changed, 512 insertions(+), 316 deletions(-) diff --git a/asm/non_matchings/unknown_00BC20/func_8000B750.s b/asm/non_matchings/unknown_00BC20/func_8000B750.s index 4a52d8d4..88e3a5ca 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000B750.s +++ b/asm/non_matchings/unknown_00BC20/func_8000B750.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5130 +.float 1.09 +glabel D_800E5134 +.float 1.18 + +.text glabel func_8000B750 /* 00C350 8000B750 27BDFF80 */ addiu $sp, $sp, -0x80 /* 00C354 8000B754 AFB00028 */ sw $s0, 0x28($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_8000BADC.s b/asm/non_matchings/unknown_00BC20/func_8000BADC.s index 1678da01..f0b093f7 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000BADC.s +++ b/asm/non_matchings/unknown_00BC20/func_8000BADC.s @@ -1,3 +1,16 @@ +.late_rodata +glabel D_800E5138 +.float 1.2 +glabel D_800E513C +.float 2.4 +glabel D_800E5140 +.float 4.8 +glabel D_800E5144 +.float 0.05 +glabel D_800E5148 +.float 0.1 + +.text glabel func_8000BADC /* 00C6DC 8000BADC 3C028012 */ lui $v0, %hi(D_8011B008) # $v0, 0x8012 /* 00C6E0 8000BAE0 2442B008 */ addiu $v0, %lo(D_8011B008) # addiu $v0, $v0, -0x4ff8 diff --git a/asm/non_matchings/unknown_00BC20/func_8000CC7C.s b/asm/non_matchings/unknown_00BC20/func_8000CC7C.s index 7d3023f0..c9a79bab 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000CC7C.s +++ b/asm/non_matchings/unknown_00BC20/func_8000CC7C.s @@ -1,3 +1,16 @@ +.late_rodata +glabel jpt_800E5154 +.word L8000D974, L8000D974, L8000D974, L8000D974, L8000D974, L8000D98C, L8000D974, L8000D974, L8000D974 +glabel D_800E5178 +.float 0.0099999999 +glabel D_800E517C +.float 0.0099999999 +glabel D_800E5180 +.float 1.4 +glabel D_800E5184 +.float 0.714 + +.text glabel func_8000CC7C /* 00D87C 8000CC7C 27BDFEB0 */ addiu $sp, $sp, -0x150 /* 00D880 8000CC80 3C018012 */ lui $at, %hi(D_8011AD20) # $at, 0x8012 @@ -915,12 +928,13 @@ glabel func_8000CC7C /* 00E550 8000D950 2DE10009 */ sltiu $at, $t7, 9 /* 00E554 8000D954 1020000D */ beqz $at, .L8000D98C /* 00E558 8000D958 000F7880 */ sll $t7, $t7, 2 -/* 00E55C 8000D95C 3C01800E */ lui $at, %hi(D_800E5154) # $at, 0x800e +/* 00E55C 8000D95C 3C01800E */ lui $at, %hi(jpt_800E5154) # $at, 0x800e /* 00E560 8000D960 002F0821 */ addu $at, $at, $t7 -/* 00E564 8000D964 8C2F5154 */ lw $t7, %lo(D_800E5154)($at) +/* 00E564 8000D964 8C2F5154 */ lw $t7, %lo(jpt_800E5154)($at) /* 00E568 8000D968 00000000 */ nop /* 00E56C 8000D96C 01E00008 */ jr $t7 /* 00E570 8000D970 00000000 */ nop +glabel L8000D974 /* 00E574 8000D974 02202025 */ move $a0, $s1 /* 00E578 8000D978 0C0170BC */ jal func_8005C2F0 /* 00E57C 8000D97C 02602825 */ move $a1, $s3 @@ -928,6 +942,7 @@ glabel func_8000CC7C /* 00E584 8000D984 10000003 */ b .L8000D994 /* 00E588 8000D988 24020005 */ li $v0, 5 .L8000D98C: +glabel L8000D98C /* 00E58C 8000D98C 8FA40068 */ lw $a0, 0x68($sp) /* 00E590 8000D990 24020005 */ li $v0, 5 .L8000D994: diff --git a/asm/non_matchings/unknown_00BC20/func_8000E0B0.s b/asm/non_matchings/unknown_00BC20/func_8000E0B0.s index 2833f662..717c2a54 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000E0B0.s +++ b/asm/non_matchings/unknown_00BC20/func_8000E0B0.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E5188 +.word L8000E104, L8000E0E4, L8000E0F4, L8000E0F4, L8000E0FC, L8000E104, L8000E0FC, L8000E0EC, L8000E104 + +.text glabel func_8000E0B0 /* 00ECB0 8000E0B0 3C0E8012 */ lui $t6, %hi(D_8011AD38) # $t6, 0x8012 /* 00ECB4 8000E0B4 8DCEAD38 */ lw $t6, %lo(D_8011AD38)($t6) @@ -6,20 +11,25 @@ glabel func_8000E0B0 /* 00ECC0 8000E0C0 10200014 */ beqz $at, .L8000E114 /* 00ECC4 8000E0C4 AFBF0014 */ sw $ra, 0x14($sp) /* 00ECC8 8000E0C8 000E7080 */ sll $t6, $t6, 2 -/* 00ECCC 8000E0CC 3C01800E */ lui $at, %hi(D_800E5188) # $at, 0x800e +/* 00ECCC 8000E0CC 3C01800E */ lui $at, %hi(jpt_800E5188) # $at, 0x800e /* 00ECD0 8000E0D0 002E0821 */ addu $at, $at, $t6 -/* 00ECD4 8000E0D4 8C2E5188 */ lw $t6, %lo(D_800E5188)($at) +/* 00ECD4 8000E0D4 8C2E5188 */ lw $t6, %lo(jpt_800E5188)($at) /* 00ECD8 8000E0D8 00000000 */ nop /* 00ECDC 8000E0DC 01C00008 */ jr $t6 /* 00ECE0 8000E0E0 00000000 */ nop +glabel L8000E0E4 /* 00ECE4 8000E0E4 1000000C */ b .L8000E118 /* 00ECE8 8000E0E8 2402FFFF */ li $v0, -1 +glabel L8000E0EC /* 00ECEC 8000E0EC 1000000A */ b .L8000E118 /* 00ECF0 8000E0F0 00001025 */ move $v0, $zero +glabel L8000E0F4 /* 00ECF4 8000E0F4 10000008 */ b .L8000E118 /* 00ECF8 8000E0F8 24020003 */ li $v0, 3 +glabel L8000E0FC /* 00ECFC 8000E0FC 10000006 */ b .L8000E118 /* 00ED00 8000E100 24020002 */ li $v0, 2 +glabel L8000E104 /* 00ED04 8000E104 0C016788 */ jal func_80059E20 /* 00ED08 8000E108 00000000 */ nop /* 00ED0C 8000E10C 10000003 */ b .L8000E11C diff --git a/asm/non_matchings/unknown_00BC20/func_8000E2B4.s b/asm/non_matchings/unknown_00BC20/func_8000E2B4.s index f8db715a..ac164001 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000E2B4.s +++ b/asm/non_matchings/unknown_00BC20/func_8000E2B4.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E51AC +.float 1.4 +glabel D_800E51B0 +.float 0.714 + +.text glabel func_8000E2B4 /* 00EEB4 8000E2B4 3C038012 */ lui $v1, %hi(D_8011AD44) # $v1, 0x8012 /* 00EEB8 8000E2B8 2463AD44 */ addiu $v1, %lo(D_8011AD44) # addiu $v1, $v1, -0x52bc diff --git a/asm/non_matchings/unknown_00BC20/func_8000EA54.s b/asm/non_matchings/unknown_00BC20/func_8000EA54.s index bf1bd880..380ac789 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000EA54.s +++ b/asm/non_matchings/unknown_00BC20/func_8000EA54.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E51B4 +.word L8000ECD8, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000ED98, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000ECF4, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000ED10, L8000EDE0, L8000EDE0, L8000EDE0, L8000ED40, L8000EDE0, L8000EDE0, L8000EDE0, L8000EDE0, L8000ED54 + +.text glabel func_8000EA54 /* 00F654 8000EA54 27BDFF98 */ addiu $sp, $sp, -0x68 /* 00F658 8000EA58 AFBF0024 */ sw $ra, 0x24($sp) @@ -162,12 +167,13 @@ glabel func_8000EA54 /* 00F8B4 8000ECB4 2D410027 */ sltiu $at, $t2, 0x27 /* 00F8B8 8000ECB8 10200049 */ beqz $at, .L8000EDE0 /* 00F8BC 8000ECBC 000A5080 */ sll $t2, $t2, 2 -/* 00F8C0 8000ECC0 3C01800E */ lui $at, %hi(D_800E51B4) # $at, 0x800e +/* 00F8C0 8000ECC0 3C01800E */ lui $at, %hi(jpt_800E51B4) # $at, 0x800e /* 00F8C4 8000ECC4 002A0821 */ addu $at, $at, $t2 -/* 00F8C8 8000ECC8 8C2A51B4 */ lw $t2, %lo(D_800E51B4)($at) +/* 00F8C8 8000ECC8 8C2A51B4 */ lw $t2, %lo(jpt_800E51B4)($at) /* 00F8CC 8000ECCC 00000000 */ nop /* 00F8D0 8000ECD0 01400008 */ jr $t2 /* 00F8D4 8000ECD4 00000000 */ nop +glabel L8000ECD8 /* 00F8D8 8000ECD8 24040007 */ li $a0, 7 /* 00F8DC 8000ECDC 0C01867D */ jal func_800619F4 /* 00F8E0 8000ECE0 AFA6005C */ sw $a2, 0x5c($sp) @@ -175,6 +181,7 @@ glabel func_8000EA54 /* 00F8E8 8000ECE8 8FA7006C */ lw $a3, 0x6c($sp) /* 00F8EC 8000ECEC 1000003D */ b .L8000EDE4 /* 00F8F0 8000ECF0 8FAF002C */ lw $t7, 0x2c($sp) +glabel L8000ECF4 /* 00F8F4 8000ECF4 0C02708A */ jal func_8009C228 /* 00F8F8 8000ECF8 00002025 */ move $a0, $zero /* 00F8FC 8000ECFC A242003A */ sb $v0, 0x3a($s2) @@ -182,6 +189,7 @@ glabel func_8000EA54 /* 00F904 8000ED04 00403025 */ move $a2, $v0 /* 00F908 8000ED08 10000035 */ b .L8000EDE0 /* 00F90C 8000ED0C 24530001 */ addiu $s3, $v0, 1 +glabel L8000ED10 /* 00F910 8000ED10 922B0048 */ lbu $t3, 0x48($s1) /* 00F914 8000ED14 9629000E */ lhu $t1, 0xe($s1) /* 00F918 8000ED18 256CFFFF */ addiu $t4, $t3, -1 @@ -194,11 +202,13 @@ glabel func_8000EA54 /* 00F934 8000ED34 24D30001 */ addiu $s3, $a2, 1 /* 00F938 8000ED38 10000029 */ b .L8000EDE0 /* 00F93C 8000ED3C A246003A */ sb $a2, 0x3a($s2) +glabel L8000ED40 /* 00F940 8000ED40 92260017 */ lbu $a2, 0x17($s1) /* 00F944 8000ED44 00000000 */ nop /* 00F948 8000ED48 24D30001 */ addiu $s3, $a2, 1 /* 00F94C 8000ED4C 10000024 */ b .L8000EDE0 /* 00F950 8000ED50 A246003A */ sb $a2, 0x3a($s2) +glabel L8000ED54 /* 00F954 8000ED54 9638000E */ lhu $t8, 0xe($s1) /* 00F958 8000ED58 00009825 */ move $s3, $zero /* 00F95C 8000ED5C 24020003 */ li $v0, 3 @@ -218,6 +228,7 @@ glabel func_8000EA54 /* 00F98C 8000ED8C A246003A */ sb $a2, 0x3a($s2) /* 00F990 8000ED90 10000013 */ b .L8000EDE0 /* 00F994 8000ED94 24D30001 */ addiu $s3, $a2, 1 +glabel L8000ED98 /* 00F998 8000ED98 24130001 */ li $s3, 1 /* 00F99C 8000ED9C 0C027B1C */ jal is_in_adventure_two /* 00F9A0 8000EDA0 AFA6005C */ sw $a2, 0x5c($sp) @@ -238,6 +249,7 @@ glabel func_8000EA54 /* 00F9D8 8000EDD8 8FA7006C */ lw $a3, 0x6c($sp) /* 00F9DC 8000EDDC 00000000 */ nop .L8000EDE0: +glabel L8000EDE0 /* 00F9E0 8000EDE0 8FAF002C */ lw $t7, 0x2c($sp) .L8000EDE4: /* 00F9E4 8000EDE4 00000000 */ nop diff --git a/asm/non_matchings/unknown_00BC20/func_800101AC.s b/asm/non_matchings/unknown_00BC20/func_800101AC.s index 72ab0216..11c0f4c4 100644 --- a/asm/non_matchings/unknown_00BC20/func_800101AC.s +++ b/asm/non_matchings/unknown_00BC20/func_800101AC.s @@ -1,3 +1,10 @@ +.late_rodata +glabel jpt_800E5250 +.word L80010374, L800105F8, L800105F8, L800105F8, L80010400, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L80010400, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800104C0, L800105F8, L800105F8, L800105A8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105D0, L800105E4, L800105F8, L800105F8, L800105F8, L800105F8, L800104D8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800104AC, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105A8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L80010508, L800105F8, L80010374, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L8001047C, L8001047C, L800105F8, L800105F8, L800105F8, L8001047C, L8001047C, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L800105F8, L8001044C +glabel jpt_800E5420 +.word L8001063C, L8001063C, L80010664, L8001063C, L8001063C, L80010664, L8001063C, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L8001063C, L80010664, L8001063C, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L8001063C, L8001063C, L80010664, L80010664, L8001063C, L8001063C, L8001063C, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L8001063C, L8001063C, L80010664, L80010664, L80010664, L8001063C, L8001063C, L8001063C, L8001063C, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L80010664, L8001063C, L80010664, L8001063C, L80010664, L80010664, L80010664, L8001063C + +.text glabel func_800101AC /* 010DAC 800101AC 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 010DB0 800101B0 AFBF0034 */ sw $ra, 0x34($sp) @@ -117,12 +124,13 @@ glabel func_800101AC /* 010F50 80010350 2D810074 */ sltiu $at, $t4, 0x74 /* 010F54 80010354 102000A8 */ beqz $at, .L800105F8 /* 010F58 80010358 000C6080 */ sll $t4, $t4, 2 -/* 010F5C 8001035C 3C01800E */ lui $at, %hi(D_800E5250) # $at, 0x800e +/* 010F5C 8001035C 3C01800E */ lui $at, %hi(jpt_800E5250) # $at, 0x800e /* 010F60 80010360 002C0821 */ addu $at, $at, $t4 -/* 010F64 80010364 8C2C5250 */ lw $t4, %lo(D_800E5250)($at) +/* 010F64 80010364 8C2C5250 */ lw $t4, %lo(jpt_800E5250)($at) /* 010F68 80010368 00000000 */ nop /* 010F6C 8001036C 01800008 */ jr $t4 /* 010F70 80010370 00000000 */ nop +glabel L80010374 /* 010F74 80010374 3C038012 */ lui $v1, %hi(objCount) # $v1, 0x8012 /* 010F78 80010378 8C63AE5C */ lw $v1, %lo(objCount)($v1) /* 010F7C 8001037C 0000A825 */ move $s5, $zero @@ -161,6 +169,7 @@ glabel func_800101AC .L800103F8: /* 010FF8 800103F8 10000080 */ b .L800105FC /* 010FFC 800103FC 24140012 */ li $s4, 18 +glabel L80010400 /* 011000 80010400 8ED00064 */ lw $s0, 0x64($s6) /* 011004 80010404 00000000 */ nop /* 011008 80010408 8E04001C */ lw $a0, 0x1c($s0) @@ -181,6 +190,7 @@ glabel func_800101AC .L80010444: /* 011044 80010444 1000006D */ b .L800105FC /* 011048 80010448 24140012 */ li $s4, 18 +glabel L8001044C /* 01104C 8001044C 8ED00064 */ lw $s0, 0x64($s6) /* 011050 80010450 00000000 */ nop /* 011054 80010454 8E04001C */ lw $a0, 0x1c($s0) @@ -194,6 +204,7 @@ glabel func_800101AC .L80010474: /* 011074 80010474 10000061 */ b .L800105FC /* 011078 80010478 24140012 */ li $s4, 18 +glabel L8001047C /* 01107C 8001047C 8EC20064 */ lw $v0, 0x64($s6) /* 011080 80010480 00000000 */ nop /* 011084 80010484 8C430020 */ lw $v1, 0x20($v0) @@ -207,17 +218,20 @@ glabel func_800101AC .L800104A4: /* 0110A4 800104A4 10000055 */ b .L800105FC /* 0110A8 800104A8 24140012 */ li $s4, 18 +glabel L800104AC /* 0110AC 800104AC 0C02FCF9 */ jal func_800BF3E4 /* 0110B0 800104B0 02C02025 */ move $a0, $s6 /* 0110B4 800104B4 86C50048 */ lh $a1, 0x48($s6) /* 0110B8 800104B8 10000050 */ b .L800105FC /* 0110BC 800104BC 24140012 */ li $s4, 18 +glabel L800104C0 /* 0110C0 800104C0 8EC40064 */ lw $a0, 0x64($s6) /* 0110C4 800104C4 0C00CAEB */ jal func_80032BAC /* 0110C8 800104C8 00000000 */ nop /* 0110CC 800104CC 86C50048 */ lh $a1, 0x48($s6) /* 0110D0 800104D0 1000004A */ b .L800105FC /* 0110D4 800104D4 24140012 */ li $s4, 18 +glabel L800104D8 /* 0110D8 800104D8 8EC40064 */ lw $a0, 0x64($s6) /* 0110DC 800104DC 8FB9003C */ lw $t9, 0x3c($sp) /* 0110E0 800104E0 10800007 */ beqz $a0, .L80010500 @@ -231,6 +245,7 @@ glabel func_800101AC .L80010500: /* 011100 80010500 1000003E */ b .L800105FC /* 011104 80010504 24140012 */ li $s4, 18 +glabel L80010508 /* 011108 80010508 3C048012 */ lui $a0, %hi(D_8011AE00) # $a0, 0x8012 /* 01110C 8001050C 2484AE00 */ addiu $a0, %lo(D_8011AE00) # addiu $a0, $a0, -0x5200 /* 011110 80010510 80830000 */ lb $v1, ($a0) @@ -275,6 +290,7 @@ glabel func_800101AC /* 01119C 8001059C 86C50048 */ lh $a1, 0x48($s6) /* 0111A0 800105A0 10000016 */ b .L800105FC /* 0111A4 800105A4 00009825 */ move $s3, $zero +glabel L800105A8 /* 0111A8 800105A8 8EC40064 */ lw $a0, 0x64($s6) /* 0111AC 800105AC 00000000 */ nop /* 0111B0 800105B0 10800005 */ beqz $a0, .L800105C8 @@ -286,17 +302,20 @@ glabel func_800101AC .L800105C8: /* 0111C8 800105C8 1000000C */ b .L800105FC /* 0111CC 800105CC 24140012 */ li $s4, 18 +glabel L800105D0 /* 0111D0 800105D0 0C02B220 */ jal func_800AC880 /* 0111D4 800105D4 02C02025 */ move $a0, $s6 /* 0111D8 800105D8 86C50048 */ lh $a1, 0x48($s6) /* 0111DC 800105DC 10000007 */ b .L800105FC /* 0111E0 800105E0 24140012 */ li $s4, 18 +glabel L800105E4 /* 0111E4 800105E4 0C02B3E6 */ jal func_800ACF98 /* 0111E8 800105E8 02C02025 */ move $a0, $s6 /* 0111EC 800105EC 86C50048 */ lh $a1, 0x48($s6) /* 0111F0 800105F0 10000002 */ b .L800105FC /* 0111F4 800105F4 24140012 */ li $s4, 18 .L800105F8: +glabel L800105F8 /* 0111F8 800105F8 24140012 */ li $s4, 18 .L800105FC: /* 0111FC 800105FC 28A1000D */ slti $at, $a1, 0xd @@ -306,9 +325,9 @@ glabel func_800101AC /* 01120C 8001060C 2F210046 */ sltiu $at, $t9, 0x46 /* 011210 80010610 10200014 */ beqz $at, .L80010664 /* 011214 80010614 0019C880 */ sll $t9, $t9, 2 -/* 011218 80010618 3C01800E */ lui $at, %hi(D_800E5420) # $at, 0x800e +/* 011218 80010618 3C01800E */ lui $at, %hi(jpt_800E5420) # $at, 0x800e /* 01121C 8001061C 00390821 */ addu $at, $at, $t9 -/* 011220 80010620 8C395420 */ lw $t9, %lo(D_800E5420)($at) +/* 011220 80010620 8C395420 */ lw $t9, %lo(jpt_800E5420)($at) /* 011224 80010624 00000000 */ nop /* 011228 80010628 03200008 */ jr $t9 /* 01122C 8001062C 00000000 */ nop @@ -316,6 +335,7 @@ glabel func_800101AC /* 011230 80010630 2401000C */ li $at, 12 /* 011234 80010634 1441000C */ bne $v0, $at, .L80010668 /* 011238 80010638 24010001 */ li $at, 1 +glabel L8001063C /* 01123C 8001063C 8EC20064 */ lw $v0, 0x64($s6) /* 011240 80010640 00000000 */ nop /* 011244 80010644 8C440018 */ lw $a0, 0x18($v0) @@ -327,6 +347,7 @@ glabel func_800101AC /* 01125C 8001065C 86C50048 */ lh $a1, 0x48($s6) /* 011260 80010660 00000000 */ nop .L80010664: +glabel L80010664 /* 011264 80010664 24010001 */ li $at, 1 .L80010668: /* 011268 80010668 14A10061 */ bne $a1, $at, .L800107F0 diff --git a/asm/non_matchings/unknown_00BC20/func_80011570.s b/asm/non_matchings/unknown_00BC20/func_80011570.s index d7a3b9c3..bb5a8071 100644 --- a/asm/non_matchings/unknown_00BC20/func_80011570.s +++ b/asm/non_matchings/unknown_00BC20/func_80011570.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5538 +.double 1000.0 +glabel D_800E5540 +.double 3000.0 +glabel D_800E5548 +.double 500.0 + +.text glabel func_80011570 /* 012170 80011570 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 012174 80011574 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80011AD0.s b/asm/non_matchings/unknown_00BC20/func_80011AD0.s index edf6f216..d99bcbb1 100644 --- a/asm/non_matchings/unknown_00BC20/func_80011AD0.s +++ b/asm/non_matchings/unknown_00BC20/func_80011AD0.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5550 +.float 0.01 + +.text glabel func_80011AD0 /* 0126D0 80011AD0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0126D4 80011AD4 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80012F94.s b/asm/non_matchings/unknown_00BC20/func_80012F94.s index b1a64273..fb1d4872 100644 --- a/asm/non_matchings/unknown_00BC20/func_80012F94.s +++ b/asm/non_matchings/unknown_00BC20/func_80012F94.s @@ -1,3 +1,16 @@ +.late_rodata +glabel D_800E5554 +.float 0.2 +glabel D_800E5558 +.float 0.05 +glabel D_800E555C +.float 3500.0 +glabel D_800E5560 +.float 2700.0 +glabel D_800E5564 +.float 0.6 + +.text glabel func_80012F94 /* 013B94 80012F94 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 013B98 80012F98 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_800135B8.s b/asm/non_matchings/unknown_00BC20/func_800135B8.s index 7a8e2b3e..fa2f4bbc 100644 --- a/asm/non_matchings/unknown_00BC20/func_800135B8.s +++ b/asm/non_matchings/unknown_00BC20/func_800135B8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5568 +.float 1.15 + +.text glabel func_800135B8 /* 0141B8 800135B8 27BDFF88 */ addiu $sp, $sp, -0x78 /* 0141BC 800135BC AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80013A0C.s b/asm/non_matchings/unknown_00BC20/func_80013A0C.s index f08385f9..de3e1e6c 100644 --- a/asm/non_matchings/unknown_00BC20/func_80013A0C.s +++ b/asm/non_matchings/unknown_00BC20/func_80013A0C.s @@ -1,3 +1,13 @@ +.late_rodata +glabel D_800E556C +.float 0.05 +glabel D_800E5570 +.float 0.95 +.word 0 # Padding +glabel D_800E5578 +.double 0.1 + +.text glabel func_80013A0C /* 01460C 80013A0C 27BDFF98 */ addiu $sp, $sp, -0x68 /* 014610 80013A10 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80013DCC.s b/asm/non_matchings/unknown_00BC20/func_80013DCC.s index 1becf18d..8f9b02cd 100644 --- a/asm/non_matchings/unknown_00BC20/func_80013DCC.s +++ b/asm/non_matchings/unknown_00BC20/func_80013DCC.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5580 +.float 0.02 +glabel D_800E5584 +.float 0.98 + +.text glabel func_80013DCC /* 0149CC 80013DCC 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 0149D0 80013DD0 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80014B50.s b/asm/non_matchings/unknown_00BC20/func_80014B50.s index 6bebda90..0269af6a 100644 --- a/asm/non_matchings/unknown_00BC20/func_80014B50.s +++ b/asm/non_matchings/unknown_00BC20/func_80014B50.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E5588 +.word L80014B80, L80014CCC, L80014E18, L80015340, L80015340, L80015340, L80015340, L80015340, L80014F64, L800150B0, L800151FC + +.text glabel func_80014B50 /* 015750 80014B50 44866000 */ mtc1 $a2, $f12 /* 015754 80014B54 2CE1000B */ sltiu $at, $a3, 0xb @@ -5,12 +10,13 @@ glabel func_80014B50 /* 01575C 80014B5C 102001F8 */ beqz $at, .L80015340 /* 015760 80014B60 00A01825 */ move $v1, $a1 /* 015764 80014B64 00077080 */ sll $t6, $a3, 2 -/* 015768 80014B68 3C01800E */ lui $at, %hi(D_800E5588) # $at, 0x800e +/* 015768 80014B68 3C01800E */ lui $at, %hi(jpt_800E5588) # $at, 0x800e /* 01576C 80014B6C 002E0821 */ addu $at, $at, $t6 -/* 015770 80014B70 8C2E5588 */ lw $t6, %lo(D_800E5588)($at) +/* 015770 80014B70 8C2E5588 */ lw $t6, %lo(jpt_800E5588)($at) /* 015774 80014B74 00000000 */ nop /* 015778 80014B78 01C00008 */ jr $t6 /* 01577C 80014B7C 00000000 */ nop +glabel L80014B80 /* 015780 80014B80 00A4082A */ slt $at, $a1, $a0 /* 015784 80014B84 142001EE */ bnez $at, .L80015340 /* 015788 80014B88 3C0A8012 */ lui $t2, %hi(objPtrList) # $t2, 0x8012 @@ -103,6 +109,7 @@ glabel func_80014B50 /* 0158C4 80014CC4 03E00008 */ jr $ra /* 0158C8 80014CC8 00801025 */ move $v0, $a0 +glabel L80014CCC /* 0158CC 80014CCC 00A4082A */ slt $at, $a1, $a0 /* 0158D0 80014CD0 1420019B */ bnez $at, .L80015340 /* 0158D4 80014CD4 3C0A8012 */ lui $t2, %hi(objPtrList) # $t2, 0x8012 @@ -195,6 +202,7 @@ glabel func_80014B50 /* 015A10 80014E10 03E00008 */ jr $ra /* 015A14 80014E14 00801025 */ move $v0, $a0 +glabel L80014E18 /* 015A18 80014E18 00A4082A */ slt $at, $a1, $a0 /* 015A1C 80014E1C 14200148 */ bnez $at, .L80015340 /* 015A20 80014E20 3C0A8012 */ lui $t2, %hi(objPtrList) # $t2, 0x8012 @@ -287,6 +295,7 @@ glabel func_80014B50 /* 015B5C 80014F5C 03E00008 */ jr $ra /* 015B60 80014F60 00801025 */ move $v0, $a0 +glabel L80014F64 /* 015B64 80014F64 00A4082A */ slt $at, $a1, $a0 /* 015B68 80014F68 142000F5 */ bnez $at, .L80015340 /* 015B6C 80014F6C 3C0A8012 */ lui $t2, %hi(objPtrList) # $t2, 0x8012 @@ -379,6 +388,7 @@ glabel func_80014B50 /* 015CA8 800150A8 03E00008 */ jr $ra /* 015CAC 800150AC 00801025 */ move $v0, $a0 +glabel L800150B0 /* 015CB0 800150B0 00A4082A */ slt $at, $a1, $a0 /* 015CB4 800150B4 142000A2 */ bnez $at, .L80015340 /* 015CB8 800150B8 3C0A8012 */ lui $t2, %hi(objPtrList) # $t2, 0x8012 @@ -471,6 +481,7 @@ glabel func_80014B50 /* 015DF4 800151F4 03E00008 */ jr $ra /* 015DF8 800151F8 00801025 */ move $v0, $a0 +glabel L800151FC /* 015DFC 800151FC 00A4082A */ slt $at, $a1, $a0 /* 015E00 80015200 1420004F */ bnez $at, .L80015340 /* 015E04 80015204 3C0A8012 */ lui $t2, %hi(objPtrList) # $t2, 0x8012 @@ -561,6 +572,7 @@ glabel func_80014B50 /* 015F38 80015338 1020FFB5 */ beqz $at, .L80015210 /* 015F3C 8001533C 0064082A */ slt $at, $v1, $a0 .L80015340: +glabel L80015340 /* 015F40 80015340 03E00008 */ jr $ra /* 015F44 80015344 00801025 */ move $v0, $a0 diff --git a/asm/non_matchings/unknown_00BC20/func_800159C8.s b/asm/non_matchings/unknown_00BC20/func_800159C8.s index c98d89e1..d674ce00 100644 --- a/asm/non_matchings/unknown_00BC20/func_800159C8.s +++ b/asm/non_matchings/unknown_00BC20/func_800159C8.s @@ -1,3 +1,22 @@ +.late_rodata +glabel D_800E55B8 +.double 0.3 +glabel D_800E55C0 +.double 0.3 +glabel D_800E55C8 +.double 0.8 +glabel D_800E55D0 +.double 0.1 +glabel D_800E55D8 +.double 0.1 +glabel D_800E55E0 +.double 0.3 +glabel D_800E55E8 +.double 0.3 +glabel D_800E55F0 +.double 0.1 + +.text glabel func_800159C8 /* 0165C8 800159C8 27BDFF60 */ addiu $sp, $sp, -0xa0 /* 0165CC 800159CC AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80016748.s b/asm/non_matchings/unknown_00BC20/func_80016748.s index 735e8599..a31b8785 100644 --- a/asm/non_matchings/unknown_00BC20/func_80016748.s +++ b/asm/non_matchings/unknown_00BC20/func_80016748.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E55F8 +.double 0.3 +glabel D_800E5600 +.double 0.1 + +.text glabel func_80016748 /* 017348 80016748 27BDFF10 */ addiu $sp, $sp, -0xf0 /* 01734C 8001674C AFBF007C */ sw $ra, 0x7c($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80017A18.s b/asm/non_matchings/unknown_00BC20/func_80017A18.s index fe772f57..e9d175c5 100644 --- a/asm/non_matchings/unknown_00BC20/func_80017A18.s +++ b/asm/non_matchings/unknown_00BC20/func_80017A18.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5608 +.double -0.1 +glabel D_800E5610 +.double -0.1 +glabel D_800E5618 +.double 0.707 + +.text glabel func_80017A18 /* 018618 80017A18 27BDFEE0 */ addiu $sp, $sp, -0x120 /* 01861C 80017A1C AFBF005C */ sw $ra, 0x5c($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_800185E4.s b/asm/non_matchings/unknown_00BC20/func_800185E4.s index 91c53a4d..c14c05b7 100644 --- a/asm/non_matchings/unknown_00BC20/func_800185E4.s +++ b/asm/non_matchings/unknown_00BC20/func_800185E4.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5620 +.double -0.3 +glabel D_800E5628 +.double 1.3 + +.text glabel func_800185E4 /* 0191E4 800185E4 27BDFF88 */ addiu $sp, $sp, -0x78 /* 0191E8 800185E8 3C028012 */ lui $v0, %hi(D_8011AED0) # $v0, 0x8012 diff --git a/asm/non_matchings/unknown_00BC20/func_8001955C.s b/asm/non_matchings/unknown_00BC20/func_8001955C.s index c840d476..f2b5cef5 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001955C.s +++ b/asm/non_matchings/unknown_00BC20/func_8001955C.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5630 +.double 500.0 + +.text glabel func_8001955C /* 01A15C 8001955C 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 01A160 80019560 AFB60040 */ sw $s6, 0x40($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_8001BF20.s b/asm/non_matchings/unknown_00BC20/func_8001BF20.s index 7695645c..aec05458 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001BF20.s +++ b/asm/non_matchings/unknown_00BC20/func_8001BF20.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5638 +.float -20000.0 +glabel D_800E563C +.float -10000.0 + +.text glabel func_8001BF20 /* 01CB20 8001BF20 27BDFE70 */ addiu $sp, $sp, -0x190 /* 01CB24 8001BF24 3C028012 */ lui $v0, %hi(D_8011AF10) # $v0, 0x8012 diff --git a/asm/non_matchings/unknown_00BC20/func_8001C418.s b/asm/non_matchings/unknown_00BC20/func_8001C418.s index f1559d48..414d020e 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001C418.s +++ b/asm/non_matchings/unknown_00BC20/func_8001C418.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5640 +.float -20000.0 + +.text glabel func_8001C418 /* 01D018 8001C418 3C01800E */ lui $at, %hi(D_800E5640) # $at, 0x800e /* 01D01C 8001C41C 3C048012 */ lui $a0, %hi(D_8011AF18) # $a0, 0x8012 diff --git a/asm/non_matchings/unknown_00BC20/func_8001C6C4.s b/asm/non_matchings/unknown_00BC20/func_8001C6C4.s index b2430e4b..ed14d98e 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001C6C4.s +++ b/asm/non_matchings/unknown_00BC20/func_8001C6C4.s @@ -1,3 +1,15 @@ +.late_rodata +glabel D_800E5644 +.float 50000.0 +glabel D_800E5648 +.double 1.2 +glabel D_800E5650 +.float 0.01 +.word 0 # Padding +glabel D_800E5658 +.double 255.0 + +.text glabel func_8001C6C4 /* 01D2C4 8001C6C4 27BDFF18 */ addiu $sp, $sp, -0xe8 /* 01D2C8 8001C6C8 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_00BC20/func_8001D2A0.s b/asm/non_matchings/unknown_00BC20/func_8001D2A0.s index 1d051d0c..d8898f21 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001D2A0.s +++ b/asm/non_matchings/unknown_00BC20/func_8001D2A0.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5660 +.float 1.99 + +.text glabel func_8001D2A0 /* 01DEA0 8001D2A0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 01DEA4 8001D2A4 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_8001EFA4.s b/asm/non_matchings/unknown_00BC20/func_8001EFA4.s index b33b84c9..e4176f0b 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001EFA4.s +++ b/asm/non_matchings/unknown_00BC20/func_8001EFA4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5668 +.double 0.1 + +.text glabel func_8001EFA4 /* 01FBA4 8001EFA4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 01FBA8 8001EFA8 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_8001F460.s b/asm/non_matchings/unknown_00BC20/func_8001F460.s index 83c340d0..3895b23e 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001F460.s +++ b/asm/non_matchings/unknown_00BC20/func_8001F460.s @@ -1,3 +1,13 @@ +.late_rodata +glabel D_800E5670 +.double 1.2 +glabel D_800E5678 +.float 0.01 +.word 0 # Padding +glabel D_800E5680 +.double 0.1 + +.text glabel func_8001F460 /* 020060 8001F460 27BDFE68 */ addiu $sp, $sp, -0x198 /* 020064 8001F464 3C0E8012 */ lui $t6, %hi(D_8011AE7A) # $t6, 0x8012 diff --git a/asm/non_matchings/unknown_00BC20/func_800235DC.s b/asm/non_matchings/unknown_00BC20/func_800235DC.s index 793525af..aab10d33 100644 --- a/asm/non_matchings/unknown_00BC20/func_800235DC.s +++ b/asm/non_matchings/unknown_00BC20/func_800235DC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E5688 +.word L80023614, L800238A8, L80023808, L80023650, L800236DC, L800238A8, L8002363C, L80023664, L80023678, L800238A8, L800238A8, L80023790, L800238A8, L80023628, L800238A8, L8002368C, L800236F0, L800236DC, L80023678, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800236B4, L800238A8, L800236C8, L800236A0, L80023754, L80023704, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L80023718, L800238A8, L8002372C, L800236A0, L800238A8, L800238A8, L800238A8, L80023740, L800238A8, L80023830, L800238A8, L800238A8, L80023790, L80023790, L800238A8, L80023790, L80023790, L800236A0, L80023790, L800238A8, L800238A8, L800238A8, L800238A8, L800237E0, L80023754, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L80023790, L800237A4, L80023790, L800238A8, L8002386C, L800238A8, L800238A8, L80023754, L800238A8, L80023768, L80023790, L80023790, L800238A8, L8002377C, L80023790, L80023790, L80023790, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L800238A8, L80023858, L800238A8, L80023790, L80023790, L800238A8, L800238A8, L800238A8, L80023790, L80023790, L80023790, L80023790, L800238A8, L800238A8, L800238A8, L800238A8, L80023880, L800238A8, L80023628, L800237B8, L80023790, L800238A8, L80023790, L80023894, L800238A8, L800237CC, L80023790 + +.text glabel func_800235DC /* 0241DC 800235DC 8C8E0040 */ lw $t6, 0x40($a0) /* 0241E0 800235E0 AC850064 */ sw $a1, 0x64($a0) @@ -7,150 +12,174 @@ glabel func_800235DC /* 0241F0 800235F0 2F010077 */ sltiu $at, $t8, 0x77 /* 0241F4 800235F4 102000AC */ beqz $at, .L800238A8 /* 0241F8 800235F8 0018C080 */ sll $t8, $t8, 2 -/* 0241FC 800235FC 3C01800E */ lui $at, %hi(D_800E5688) # $at, 0x800e +/* 0241FC 800235FC 3C01800E */ lui $at, %hi(jpt_800E5688) # $at, 0x800e /* 024200 80023600 00380821 */ addu $at, $at, $t8 -/* 024204 80023604 8C385688 */ lw $t8, %lo(D_800E5688)($at) +/* 024204 80023604 8C385688 */ lw $t8, %lo(jpt_800E5688)($at) /* 024208 80023608 00000000 */ nop /* 02420C 8002360C 03000008 */ jr $t8 /* 024210 80023610 00000000 */ nop +glabel L80023614 /* 024214 80023614 24030224 */ li $v1, 548 /* 024218 80023618 2401FFFC */ li $at, -4 /* 02421C 8002361C 00611024 */ and $v0, $v1, $at /* 024220 80023620 03E00008 */ jr $ra /* 024224 80023624 24420004 */ addiu $v0, $v0, 4 +glabel L80023628 /* 024228 80023628 24030018 */ li $v1, 24 /* 02422C 8002362C 2401FFFC */ li $at, -4 /* 024230 80023630 00611024 */ and $v0, $v1, $at /* 024234 80023634 03E00008 */ jr $ra /* 024238 80023638 24420004 */ addiu $v0, $v0, 4 +glabel L8002363C /* 02423C 8002363C 24030018 */ li $v1, 24 /* 024240 80023640 2401FFFC */ li $at, -4 /* 024244 80023644 00611024 */ and $v0, $v1, $at /* 024248 80023648 03E00008 */ jr $ra /* 02424C 8002364C 24420004 */ addiu $v0, $v0, 4 +glabel L80023650 /* 024250 80023650 2403000C */ li $v1, 12 /* 024254 80023654 2401FFFC */ li $at, -4 /* 024258 80023658 00611024 */ and $v0, $v1, $at /* 02425C 8002365C 03E00008 */ jr $ra /* 024260 80023660 24420004 */ addiu $v0, $v0, 4 +glabel L80023664 /* 024264 80023664 24030010 */ li $v1, 16 /* 024268 80023668 2401FFFC */ li $at, -4 /* 02426C 8002366C 00611024 */ and $v0, $v1, $at /* 024270 80023670 03E00008 */ jr $ra /* 024274 80023674 24420004 */ addiu $v0, $v0, 4 +glabel L80023678 /* 024278 80023678 24030014 */ li $v1, 20 /* 02427C 8002367C 2401FFFC */ li $at, -4 /* 024280 80023680 00611024 */ and $v0, $v1, $at /* 024284 80023684 03E00008 */ jr $ra /* 024288 80023688 24420004 */ addiu $v0, $v0, 4 +glabel L8002368C /* 02428C 8002368C 2403001C */ li $v1, 28 /* 024290 80023690 2401FFFC */ li $at, -4 /* 024294 80023694 00611024 */ and $v0, $v1, $at /* 024298 80023698 03E00008 */ jr $ra /* 02429C 8002369C 24420004 */ addiu $v0, $v0, 4 +glabel L800236A0 /* 0242A0 800236A0 24030018 */ li $v1, 24 /* 0242A4 800236A4 2401FFFC */ li $at, -4 /* 0242A8 800236A8 00611024 */ and $v0, $v1, $at /* 0242AC 800236AC 03E00008 */ jr $ra /* 0242B0 800236B0 24420004 */ addiu $v0, $v0, 4 +glabel L800236B4 /* 0242B4 800236B4 24030006 */ li $v1, 6 /* 0242B8 800236B8 2401FFFC */ li $at, -4 /* 0242BC 800236BC 00611024 */ and $v0, $v1, $at /* 0242C0 800236C0 03E00008 */ jr $ra /* 0242C4 800236C4 24420004 */ addiu $v0, $v0, 4 +glabel L800236C8 /* 0242C8 800236C8 2403000C */ li $v1, 12 /* 0242CC 800236CC 2401FFFC */ li $at, -4 /* 0242D0 800236D0 00611024 */ and $v0, $v1, $at /* 0242D4 800236D4 03E00008 */ jr $ra /* 0242D8 800236D8 24420004 */ addiu $v0, $v0, 4 +glabel L800236DC /* 0242DC 800236DC 24030020 */ li $v1, 32 /* 0242E0 800236E0 2401FFFC */ li $at, -4 /* 0242E4 800236E4 00611024 */ and $v0, $v1, $at /* 0242E8 800236E8 03E00008 */ jr $ra /* 0242EC 800236EC 24420004 */ addiu $v0, $v0, 4 +glabel L800236F0 /* 0242F0 800236F0 24030008 */ li $v1, 8 /* 0242F4 800236F4 2401FFFC */ li $at, -4 /* 0242F8 800236F8 00611024 */ and $v0, $v1, $at /* 0242FC 800236FC 03E00008 */ jr $ra /* 024300 80023700 24420004 */ addiu $v0, $v0, 4 +glabel L80023704 /* 024304 80023704 2403000C */ li $v1, 12 /* 024308 80023708 2401FFFC */ li $at, -4 /* 02430C 8002370C 00611024 */ and $v0, $v1, $at /* 024310 80023710 03E00008 */ jr $ra /* 024314 80023714 24420004 */ addiu $v0, $v0, 4 +glabel L80023718 /* 024318 80023718 24030008 */ li $v1, 8 /* 02431C 8002371C 2401FFFC */ li $at, -4 /* 024320 80023720 00611024 */ and $v0, $v1, $at /* 024324 80023724 03E00008 */ jr $ra /* 024328 80023728 24420004 */ addiu $v0, $v0, 4 +glabel L8002372C /* 02432C 8002372C 24030018 */ li $v1, 24 /* 024330 80023730 2401FFFC */ li $at, -4 /* 024334 80023734 00611024 */ and $v0, $v1, $at /* 024338 80023738 03E00008 */ jr $ra /* 02433C 8002373C 24420004 */ addiu $v0, $v0, 4 +glabel L80023740 /* 024340 80023740 2403000C */ li $v1, 12 /* 024344 80023744 2401FFFC */ li $at, -4 /* 024348 80023748 00611024 */ and $v0, $v1, $at /* 02434C 8002374C 03E00008 */ jr $ra /* 024350 80023750 24420004 */ addiu $v0, $v0, 4 +glabel L80023754 /* 024354 80023754 24030038 */ li $v1, 56 /* 024358 80023758 2401FFFC */ li $at, -4 /* 02435C 8002375C 00611024 */ and $v0, $v1, $at /* 024360 80023760 03E00008 */ jr $ra /* 024364 80023764 24420004 */ addiu $v0, $v0, 4 +glabel L80023768 /* 024368 80023768 24030014 */ li $v1, 20 /* 02436C 8002376C 2401FFFC */ li $at, -4 /* 024370 80023770 00611024 */ and $v0, $v1, $at /* 024374 80023774 03E00008 */ jr $ra /* 024378 80023778 24420004 */ addiu $v0, $v0, 4 +glabel L8002377C /* 02437C 8002377C 24030010 */ li $v1, 16 /* 024380 80023780 2401FFFC */ li $at, -4 /* 024384 80023784 00611024 */ and $v0, $v1, $at /* 024388 80023788 03E00008 */ jr $ra /* 02438C 8002378C 24420004 */ addiu $v0, $v0, 4 +glabel L80023790 /* 024390 80023790 24030048 */ li $v1, 72 /* 024394 80023794 2401FFFC */ li $at, -4 /* 024398 80023798 00611024 */ and $v0, $v1, $at /* 02439C 8002379C 03E00008 */ jr $ra /* 0243A0 800237A0 24420004 */ addiu $v0, $v0, 4 +glabel L800237A4 /* 0243A4 800237A4 24030044 */ li $v1, 68 /* 0243A8 800237A8 2401FFFC */ li $at, -4 /* 0243AC 800237AC 00611024 */ and $v0, $v1, $at /* 0243B0 800237B0 03E00008 */ jr $ra /* 0243B4 800237B4 24420004 */ addiu $v0, $v0, 4 +glabel L800237B8 /* 0243B8 800237B8 24030020 */ li $v1, 32 /* 0243BC 800237BC 2401FFFC */ li $at, -4 /* 0243C0 800237C0 00611024 */ and $v0, $v1, $at /* 0243C4 800237C4 03E00008 */ jr $ra /* 0243C8 800237C8 24420004 */ addiu $v0, $v0, 4 +glabel L800237CC /* 0243CC 800237CC 24030004 */ li $v1, 4 /* 0243D0 800237D0 2401FFFC */ li $at, -4 /* 0243D4 800237D4 00611024 */ and $v0, $v1, $at /* 0243D8 800237D8 03E00008 */ jr $ra /* 0243DC 800237DC 24420004 */ addiu $v0, $v0, 4 +glabel L800237E0 /* 0243E0 800237E0 30B9000F */ andi $t9, $a1, 0xf /* 0243E4 800237E4 24080010 */ li $t0, 16 /* 0243E8 800237E8 01191023 */ subu $v0, $t0, $t9 @@ -162,6 +191,7 @@ glabel func_800235DC /* 024400 80023800 03E00008 */ jr $ra /* 024404 80023804 24420004 */ addiu $v0, $v0, 4 +glabel L80023808 /* 024408 80023808 30AA000F */ andi $t2, $a1, 0xf /* 02440C 8002380C 240B0010 */ li $t3, 16 /* 024410 80023810 016A1023 */ subu $v0, $t3, $t2 @@ -173,6 +203,7 @@ glabel func_800235DC /* 024428 80023828 03E00008 */ jr $ra /* 02442C 8002382C 24420004 */ addiu $v0, $v0, 4 +glabel L80023830 /* 024430 80023830 30AD000F */ andi $t5, $a1, 0xf /* 024434 80023834 240E0010 */ li $t6, 16 /* 024438 80023838 01CD1023 */ subu $v0, $t6, $t5 @@ -184,24 +215,28 @@ glabel func_800235DC /* 024450 80023850 03E00008 */ jr $ra /* 024454 80023854 24420004 */ addiu $v0, $v0, 4 +glabel L80023858 /* 024458 80023858 24030060 */ li $v1, 96 /* 02445C 8002385C 2401FFFC */ li $at, -4 /* 024460 80023860 00611024 */ and $v0, $v1, $at /* 024464 80023864 03E00008 */ jr $ra /* 024468 80023868 24420004 */ addiu $v0, $v0, 4 +glabel L8002386C /* 02446C 8002386C 24030008 */ li $v1, 8 /* 024470 80023870 2401FFFC */ li $at, -4 /* 024474 80023874 00611024 */ and $v0, $v1, $at /* 024478 80023878 03E00008 */ jr $ra /* 02447C 8002387C 24420004 */ addiu $v0, $v0, 4 +glabel L80023880 /* 024480 80023880 24030034 */ li $v1, 52 /* 024484 80023884 2401FFFC */ li $at, -4 /* 024488 80023888 00611024 */ and $v0, $v1, $at /* 02448C 8002388C 03E00008 */ jr $ra /* 024490 80023890 24420004 */ addiu $v0, $v0, 4 +glabel L80023894 /* 024494 80023894 24030020 */ li $v1, 32 /* 024498 80023898 2401FFFC */ li $at, -4 /* 02449C 8002389C 00611024 */ and $v0, $v1, $at @@ -209,6 +244,7 @@ glabel func_800235DC /* 0244A4 800238A4 24420004 */ addiu $v0, $v0, 4 .L800238A8: +glabel L800238A8 /* 0244A8 800238A8 AC800064 */ sw $zero, 0x64($a0) /* 0244AC 800238AC 2401FFFC */ li $at, -4 /* 0244B0 800238B0 00611024 */ and $v0, $v1, $at diff --git a/asm/non_matchings/unknown_00BC20/func_800238BC.s b/asm/non_matchings/unknown_00BC20/func_800238BC.s index 6d5dc28d..bbafa168 100644 --- a/asm/non_matchings/unknown_00BC20/func_800238BC.s +++ b/asm/non_matchings/unknown_00BC20/func_800238BC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E5864 +.word L80023908, L80023918, L80023928, L80023938, L80023A78, L80023948, L80023978, L80023988, L80023998, L800239B8, L800239C8, L800239D8, L800239E8, L80023A18, L80023A38, L80023A48, L80023A58, L80023A78, L80023998, L80023E20, L80023E20, L80023968, L80023A68, L80023E20, L80023958, L80023A88, L800239A8, L80023A98, L80023AA8, L800239F8, L80023AB8, L80023AC8, L80023AD8, L80023E20, L80023E20, L80023AE8, L80023B08, L80023B18, L80023B28, L80023B38, L80023A08, L80023E20, L80023B48, L80023B58, L80023B68, L80023B78, L80023B88, L80023E20, L80023B98, L80023E20, L80023E20, L80023BA8, L80023E20, L80023E20, L80023BB8, L80023E20, L80023BC8, L80023BD8, L80023BE8, L80023E20, L80023BF8, L80023C08, L80023E20, L80023C18, L80023C28, L80023C38, L80023AF8, L80023C48, L80023C58, L80023C68, L80023CA8, L80023C78, L80023CD8, L80023CE8, L80023CF8, L80023D08, L80023D18, L80023D28, L80023D38, L80023E20, L80023E20, L80023D48, L80023D58, L80023D68, L80023E20, L80023E20, L80023E20, L80023D88, L80023D78, L80023D98, L80023E20, L80023E20, L80023BC8, L80023DA8, L80023C78, L80023C88, L80023C98, L80023DB8, L80023DC8, L80023DC8, L80023C88, L80023C98, L80023C68, L80023C78, L80023DD8, L80023E20, L80023E20, L80023DE8, L80023DF8, L80023E08, L80023A28, L80023CB8, L80023E20, L80023E20, L80023E20, L80023DE8, L80023E18, L80023CC8 + +.text glabel func_800238BC /* 0244BC 800238BC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0244C0 800238C0 AFBF0014 */ sw $ra, 0x14($sp) @@ -12,339 +17,422 @@ glabel func_800238BC /* 0244E4 800238E4 2F210076 */ sltiu $at, $t9, 0x76 /* 0244E8 800238E8 1020014D */ beqz $at, .L80023E20 /* 0244EC 800238EC 0019C880 */ sll $t9, $t9, 2 -/* 0244F0 800238F0 3C01800E */ lui $at, %hi(D_800E5864) # $at, 0x800e +/* 0244F0 800238F0 3C01800E */ lui $at, %hi(jpt_800E5864) # $at, 0x800e /* 0244F4 800238F4 00390821 */ addu $at, $at, $t9 -/* 0244F8 800238F8 8C395864 */ lw $t9, %lo(D_800E5864)($at) +/* 0244F8 800238F8 8C395864 */ lw $t9, %lo(jpt_800E5864)($at) /* 0244FC 800238FC 00000000 */ nop /* 024500 80023900 03200008 */ jr $t9 /* 024504 80023904 00000000 */ nop +glabel L80023908 /* 024508 80023908 0C0136AC */ jal func_8004DAB0 /* 02450C 8002390C 00000000 */ nop /* 024510 80023910 10000144 */ b .L80023E24 /* 024514 80023914 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023918 /* 024518 80023918 0C00CF30 */ jal func_80033CC0 /* 02451C 8002391C 00000000 */ nop /* 024520 80023920 10000140 */ b .L80023E24 /* 024524 80023924 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023928 /* 024528 80023928 0C00DB0C */ jal func_80036C30 /* 02452C 8002392C 00000000 */ nop /* 024530 80023930 1000013C */ b .L80023E24 /* 024534 80023934 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023938 /* 024538 80023938 0C00DDB8 */ jal func_800376E0 /* 02453C 8002393C 00000000 */ nop /* 024540 80023940 10000138 */ b .L80023E24 /* 024544 80023944 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023948 /* 024548 80023948 0C00E26B */ jal func_800389AC /* 02454C 8002394C 00000000 */ nop /* 024550 80023950 10000134 */ b .L80023E24 /* 024554 80023954 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023958 /* 024558 80023958 0C00E29B */ jal func_80038A6C /* 02455C 8002395C 00000000 */ nop /* 024560 80023960 10000130 */ b .L80023E24 /* 024564 80023964 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023968 /* 024568 80023968 0C00E2DD */ jal func_80038B74 /* 02456C 8002396C 00000000 */ nop /* 024570 80023970 1000012C */ b .L80023E24 /* 024574 80023974 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023978 /* 024578 80023978 0C00E38F */ jal func_80038E3C /* 02457C 8002397C 00000000 */ nop /* 024580 80023980 10000128 */ b .L80023E24 /* 024584 80023984 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023988 /* 024588 80023988 0C00FF5A */ jal func_8003FD68 /* 02458C 8002398C 00000000 */ nop /* 024590 80023990 10000124 */ b .L80023E24 /* 024594 80023994 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023998 /* 024598 80023998 0C00FFBD */ jal func_8003FEF4 /* 02459C 8002399C 00000000 */ nop /* 0245A0 800239A0 10000120 */ b .L80023E24 /* 0245A4 800239A4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800239A8 /* 0245A8 800239A8 0C010007 */ jal func_8004001C /* 0245AC 800239AC 00000000 */ nop /* 0245B0 800239B0 1000011C */ b .L80023E24 /* 0245B4 800239B4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800239B8 /* 0245B8 800239B8 0C00E458 */ jal func_80039160 /* 0245BC 800239BC 00000000 */ nop /* 0245C0 800239C0 10000118 */ b .L80023E24 /* 0245C4 800239C4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800239C8 /* 0245C8 800239C8 0C00E464 */ jal func_80039190 /* 0245CC 800239CC 00000000 */ nop /* 0245D0 800239D0 10000114 */ b .L80023E24 /* 0245D4 800239D4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800239D8 /* 0245D8 800239D8 0C00E472 */ jal func_800391C8 /* 0245DC 800239DC 00000000 */ nop /* 0245E0 800239E0 10000110 */ b .L80023E24 /* 0245E4 800239E4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800239E8 /* 0245E8 800239E8 0C00EB2F */ jal func_8003ACBC /* 0245EC 800239EC 00000000 */ nop /* 0245F0 800239F0 1000010C */ b .L80023E24 /* 0245F4 800239F4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800239F8 /* 0245F8 800239F8 0C00EB4D */ jal func_8003AD34 /* 0245FC 800239FC 00000000 */ nop /* 024600 80023A00 10000108 */ b .L80023E24 /* 024604 80023A04 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A08 /* 024608 80023A08 0C00EC16 */ jal func_8003B058 /* 02460C 80023A0C 00000000 */ nop /* 024610 80023A10 10000104 */ b .L80023E24 /* 024614 80023A14 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A18 /* 024618 80023A18 0C00EDF3 */ jal func_8003B7CC /* 02461C 80023A1C 00000000 */ nop /* 024620 80023A20 10000100 */ b .L80023E24 /* 024624 80023A24 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A28 /* 024628 80023A28 0C00F078 */ jal func_8003C1E0 /* 02462C 80023A2C 00000000 */ nop /* 024630 80023A30 100000FC */ b .L80023E24 /* 024634 80023A34 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A38 /* 024638 80023A38 0C00F3C6 */ jal func_8003CF18 /* 02463C 80023A3C 00000000 */ nop /* 024640 80023A40 100000F8 */ b .L80023E24 /* 024644 80023A44 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A48 /* 024648 80023A48 0C00F3F8 */ jal func_8003CFE0 /* 02464C 80023A4C 00000000 */ nop /* 024650 80023A50 100000F4 */ b .L80023E24 /* 024654 80023A54 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A58 /* 024658 80023A58 0C00F7F3 */ jal func_8003DFCC /* 02465C 80023A5C 00000000 */ nop /* 024660 80023A60 100000F0 */ b .L80023E24 /* 024664 80023A64 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A68 /* 024668 80023A68 0C00F96C */ jal func_8003E5B0 /* 02466C 80023A6C 00000000 */ nop /* 024670 80023A70 100000EC */ b .L80023E24 /* 024674 80023A74 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A78 /* 024678 80023A78 0C00F972 */ jal func_8003E5C8 /* 02467C 80023A7C 00000000 */ nop /* 024680 80023A80 100000E8 */ b .L80023E24 /* 024684 80023A84 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A88 /* 024688 80023A88 0C00F3D6 */ jal func_8003CF58 /* 02468C 80023A8C 00000000 */ nop /* 024690 80023A90 100000E4 */ b .L80023E24 /* 024694 80023A94 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023A98 /* 024698 80023A98 0C00D2BC */ jal func_80034AF0 /* 02469C 80023A9C 00000000 */ nop /* 0246A0 80023AA0 100000E0 */ b .L80023E24 /* 0246A4 80023AA4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023AA8 /* 0246A8 80023AA8 0C010029 */ jal func_800400A4 /* 0246AC 80023AAC 00000000 */ nop /* 0246B0 80023AB0 100000DC */ b .L80023E24 /* 0246B4 80023AB4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023AB8 /* 0246B8 80023AB8 0C00D865 */ jal func_80036194 /* 0246BC 80023ABC 00000000 */ nop /* 0246C0 80023AC0 100000D8 */ b .L80023E24 /* 0246C4 80023AC4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023AC8 /* 0246C8 80023AC8 0C00F54D */ jal func_8003D534 /* 0246CC 80023ACC 00000000 */ nop /* 0246D0 80023AD0 100000D4 */ b .L80023E24 /* 0246D4 80023AD4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023AD8 /* 0246D8 80023AD8 0C0100EA */ jal func_800403A8 /* 0246DC 80023ADC 00000000 */ nop /* 0246E0 80023AE0 100000D0 */ b .L80023E24 /* 0246E4 80023AE4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023AE8 /* 0246E8 80023AE8 0C0100F6 */ jal func_800403D8 /* 0246EC 80023AEC 00000000 */ nop /* 0246F0 80023AF0 100000CC */ b .L80023E24 /* 0246F4 80023AF4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023AF8 /* 0246F8 80023AF8 0C010127 */ jal func_8004049C /* 0246FC 80023AFC 00000000 */ nop /* 024700 80023B00 100000C8 */ b .L80023E24 /* 024704 80023B04 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B08 /* 024708 80023B08 0C010200 */ jal func_80040800 /* 02470C 80023B0C 00000000 */ nop /* 024710 80023B10 100000C4 */ b .L80023E24 /* 024714 80023B14 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B18 /* 024718 80023B18 0C00F27B */ jal func_8003C9EC /* 02471C 80023B1C 00000000 */ nop /* 024720 80023B20 100000C0 */ b .L80023E24 /* 024724 80023B24 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B28 /* 024728 80023B28 0C00F399 */ jal func_8003CE64 /* 02472C 80023B2C 00000000 */ nop /* 024730 80023B30 100000BC */ b .L80023E24 /* 024734 80023B34 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B38 /* 024738 80023B38 0C00F3C0 */ jal func_8003CF00 /* 02473C 80023B3C 00000000 */ nop /* 024740 80023B40 100000B8 */ b .L80023E24 /* 024744 80023B44 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B48 /* 024748 80023B48 0C01024B */ jal func_8004092C /* 02474C 80023B4C 00000000 */ nop /* 024750 80023B50 100000B4 */ b .L80023E24 /* 024754 80023B54 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B58 /* 024758 80023B58 0C010253 */ jal func_8004094C /* 02475C 80023B5C 00000000 */ nop /* 024760 80023B60 100000B0 */ b .L80023E24 /* 024764 80023B64 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B68 /* 024768 80023B68 0C00D48B */ jal func_8003522C /* 02476C 80023B6C 00000000 */ nop /* 024770 80023B70 100000AC */ b .L80023E24 /* 024774 80023B74 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B78 /* 024778 80023B78 0C00D590 */ jal func_80035640 /* 02477C 80023B7C 00000000 */ nop /* 024780 80023B80 100000A8 */ b .L80023E24 /* 024784 80023B84 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B88 /* 024788 80023B88 0C00D7BE */ jal func_80035EF8 /* 02478C 80023B8C 00000000 */ nop /* 024790 80023B90 100000A4 */ b .L80023E24 /* 024794 80023B94 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023B98 /* 024798 80023B98 0C00DE86 */ jal func_80037A18 /* 02479C 80023B9C 00000000 */ nop /* 0247A0 80023BA0 100000A0 */ b .L80023E24 /* 0247A4 80023BA4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023BA8 /* 0247A8 80023BA8 0C00E215 */ jal func_80038854 /* 0247AC 80023BAC 00000000 */ nop /* 0247B0 80023BB0 1000009C */ b .L80023E24 /* 0247B4 80023BB4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023BB8 /* 0247B8 80023BB8 0C00F191 */ jal func_8003C644 /* 0247BC 80023BBC 00000000 */ nop /* 0247C0 80023BC0 10000098 */ b .L80023E24 /* 0247C4 80023BC4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023BC8 /* 0247C8 80023BC8 0C00D623 */ jal func_8003588C /* 0247CC 80023BCC 00000000 */ nop /* 0247D0 80023BD0 10000094 */ b .L80023E24 /* 0247D4 80023BD4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023BD8 /* 0247D8 80023BD8 0C00D788 */ jal func_80035E20 /* 0247DC 80023BDC 00000000 */ nop /* 0247E0 80023BE0 10000090 */ b .L80023E24 /* 0247E4 80023BE4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023BE8 /* 0247E8 80023BE8 0C010269 */ jal func_800409A4 /* 0247EC 80023BEC 00000000 */ nop /* 0247F0 80023BF0 1000008C */ b .L80023E24 /* 0247F4 80023BF4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023BF8 /* 0247F8 80023BF8 0C010272 */ jal func_800409C8 /* 0247FC 80023BFC 00000000 */ nop /* 024800 80023C00 10000088 */ b .L80023E24 /* 024804 80023C04 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C08 /* 024808 80023C08 0C00E4AE */ jal func_800392B8 /* 02480C 80023C0C 00000000 */ nop /* 024810 80023C10 10000084 */ b .L80023E24 /* 024814 80023C14 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C18 /* 024818 80023C18 0C00F79D */ jal func_8003DE74 /* 02481C 80023C1C 00000000 */ nop /* 024820 80023C20 10000080 */ b .L80023E24 /* 024824 80023C24 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C28 /* 024828 80023C28 0C00F4FB */ jal func_8003D3EC /* 02482C 80023C2C 00000000 */ nop /* 024830 80023C30 1000007C */ b .L80023E24 /* 024834 80023C34 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C38 /* 024838 80023C38 0C00F40E */ jal func_8003D038 /* 02483C 80023C3C 00000000 */ nop /* 024840 80023C40 10000078 */ b .L80023E24 /* 024844 80023C44 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C48 /* 024848 80023C48 0C00DD5E */ jal func_80037578 /* 02484C 80023C4C 00000000 */ nop /* 024850 80023C50 10000074 */ b .L80023E24 /* 024854 80023C54 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C58 /* 024858 80023C58 0C00DD89 */ jal func_80037624 /* 02485C 80023C5C 00000000 */ nop /* 024860 80023C60 10000070 */ b .L80023E24 /* 024864 80023C64 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C68 /* 024868 80023C68 0C00E063 */ jal func_8003818C /* 02486C 80023C6C 00000000 */ nop /* 024870 80023C70 1000006C */ b .L80023E24 /* 024874 80023C74 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C78 /* 024878 80023C78 0C00E078 */ jal func_800381E0 /* 02487C 80023C7C 00000000 */ nop /* 024880 80023C80 10000068 */ b .L80023E24 /* 024884 80023C84 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C88 /* 024888 80023C88 0C00E085 */ jal func_80038214 /* 02488C 80023C8C 00000000 */ nop /* 024890 80023C90 10000064 */ b .L80023E24 /* 024894 80023C94 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023C98 /* 024898 80023C98 0C00E092 */ jal func_80038248 /* 02489C 80023C9C 00000000 */ nop /* 0248A0 80023CA0 10000060 */ b .L80023E24 /* 0248A4 80023CA4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023CA8 /* 0248A8 80023CA8 0C0106A4 */ jal func_80041A90 /* 0248AC 80023CAC 00000000 */ nop /* 0248B0 80023CB0 1000005C */ b .L80023E24 /* 0248B4 80023CB4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023CB8 /* 0248B8 80023CB8 0C0107A0 */ jal func_80041E80 /* 0248BC 80023CBC 00000000 */ nop /* 0248C0 80023CC0 10000058 */ b .L80023E24 /* 0248C4 80023CC4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023CC8 /* 0248C8 80023CC8 0C010805 */ jal func_80042014 /* 0248CC 80023CCC 00000000 */ nop /* 0248D0 80023CD0 10000054 */ b .L80023E24 /* 0248D4 80023CD4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023CD8 /* 0248D8 80023CD8 0C00D2DA */ jal func_80034B68 /* 0248DC 80023CDC 00000000 */ nop /* 0248E0 80023CE0 10000050 */ b .L80023E24 /* 0248E4 80023CE4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023CE8 /* 0248E8 80023CE8 0C00D39C */ jal func_80034E70 /* 0248EC 80023CEC 00000000 */ nop /* 0248F0 80023CF0 1000004C */ b .L80023E24 /* 0248F4 80023CF4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023CF8 /* 0248F8 80023CF8 0C01080F */ jal func_8004203C /* 0248FC 80023CFC 00000000 */ nop /* 024900 80023D00 10000048 */ b .L80023E24 /* 024904 80023D04 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D08 /* 024908 80023D08 0C00F4AB */ jal func_8003D2AC /* 02490C 80023D0C 00000000 */ nop /* 024910 80023D10 10000044 */ b .L80023E24 /* 024914 80023D14 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D18 /* 024918 80023D18 0C00ECDA */ jal func_8003B368 /* 02491C 80023D1C 00000000 */ nop /* 024920 80023D20 10000040 */ b .L80023E24 /* 024924 80023D24 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D28 /* 024928 80023D28 0C00D211 */ jal func_80034844 /* 02492C 80023D2C 00000000 */ nop /* 024930 80023D30 1000003C */ b .L80023E24 /* 024934 80023D34 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D38 /* 024938 80023D38 0C00D14C */ jal func_80034530 /* 02493C 80023D3C 00000000 */ nop /* 024940 80023D40 10000038 */ b .L80023E24 /* 024944 80023D44 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D48 /* 024948 80023D48 0C00D6BA */ jal func_80035AE8 /* 02494C 80023D4C 00000000 */ nop /* 024950 80023D50 10000034 */ b .L80023E24 /* 024954 80023D54 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D58 /* 024958 80023D58 0C00DF55 */ jal func_80037D54 /* 02495C 80023D5C 00000000 */ nop /* 024960 80023D60 10000030 */ b .L80023E24 /* 024964 80023D64 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D68 /* 024968 80023D68 0C00DF5B */ jal func_80037D6C /* 02496C 80023D6C 00000000 */ nop /* 024970 80023D70 1000002C */ b .L80023E24 /* 024974 80023D74 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D78 /* 024978 80023D78 0C010843 */ jal func_8004210C /* 02497C 80023D7C 00000000 */ nop /* 024980 80023D80 10000028 */ b .L80023E24 /* 024984 80023D84 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D88 /* 024988 80023D88 0C00F717 */ jal func_8003DC5C /* 02498C 80023D8C 00000000 */ nop /* 024990 80023D90 10000024 */ b .L80023E24 /* 024994 80023D94 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023D98 /* 024998 80023D98 0C00E2B2 */ jal func_80038AC8 /* 02499C 80023D9C 00000000 */ nop /* 0249A0 80023DA0 10000020 */ b .L80023E24 /* 0249A4 80023DA4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023DA8 /* 0249A8 80023DA8 0C010854 */ jal func_80042150 /* 0249AC 80023DAC 00000000 */ nop /* 0249B0 80023DB0 1000001C */ b .L80023E24 /* 0249B4 80023DB4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023DB8 /* 0249B8 80023DB8 0C00E356 */ jal func_80038D58 /* 0249BC 80023DBC 00000000 */ nop /* 0249C0 80023DC0 10000018 */ b .L80023E24 /* 0249C4 80023DC4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023DC8 /* 0249C8 80023DC8 0C00D5CB */ jal func_8003572C /* 0249CC 80023DCC 00000000 */ nop /* 0249D0 80023DD0 10000014 */ b .L80023E24 /* 0249D4 80023DD4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023DD8 /* 0249D8 80023DD8 0C01085B */ jal func_8004216C /* 0249DC 80023DDC 00000000 */ nop /* 0249E0 80023DE0 10000010 */ b .L80023E24 /* 0249E4 80023DE4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023DE8 /* 0249E8 80023DE8 0C00CFD1 */ jal func_80033F44 /* 0249EC 80023DEC 00000000 */ nop /* 0249F0 80023DF0 1000000C */ b .L80023E24 /* 0249F4 80023DF4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023DF8 /* 0249F8 80023DF8 0C010884 */ jal func_80042210 /* 0249FC 80023DFC 00000000 */ nop /* 024A00 80023E00 10000008 */ b .L80023E24 /* 024A04 80023E04 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023E08 /* 024A08 80023E08 0C00F6E8 */ jal func_8003DBA0 /* 024A0C 80023E0C 00000000 */ nop /* 024A10 80023E10 10000004 */ b .L80023E24 /* 024A14 80023E14 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80023E18 /* 024A18 80023E18 0C010A87 */ jal func_80042A1C /* 024A1C 80023E1C 00000000 */ nop .L80023E20: +glabel L80023E20 /* 024A20 80023E20 8FBF0014 */ lw $ra, 0x14($sp) .L80023E24: /* 024A24 80023E24 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_00BC20/func_80023E30.s b/asm/non_matchings/unknown_00BC20/func_80023E30.s index 33ee5bdd..0a33dd34 100644 --- a/asm/non_matchings/unknown_00BC20/func_80023E30.s +++ b/asm/non_matchings/unknown_00BC20/func_80023E30.s @@ -1,101 +1,136 @@ +.late_rodata +glabel jpt_800E5A3C +.word L80023E5C, L80023E64, L80023F40, L80023F40, L80023E6C, L80023F40, L80023F14, L80023F40, L80023F40, L80023F40, L80023F40, L80023E74, L80023F14, L80023E7C, L80023F40, L80023F40, L80023E84, L80023F14, L80023F40, L80023F40, L80023F40, L80023F40, L80023F40, L80023E9C, L80023F40, L80023F14, L80023F40, L80023F40, L80023F40, L80023F14, L80023EA4, L80023EAC, L80023F40, L80023F40, L80023F40, L80023F14, L80023F40, L80023EBC, L80023EC4, L80023ECC, L80023F14, L80023F40, L80023F40, L80023F40, L80023ED4, L80023F40, L80023F40, L80023EDC, L80023F24, L80023EEC, L80023F24, L80023F14, L80023F40, L80023EF4, L80023F14, L80023EEC, L80023F14, L80023F40, L80023F40, L80023F40, L80023F24, L80023F2C, L80023EE4, L80023EAC, L80023F40, L80023F40, L80023EB4, L80023F14, L80023F40, L80023E8C, L80023F40, L80023E8C, L80023F40, L80023EFC, L80023F40, L80023F40, L80023E84, L80023F14, L80023F14, L80023EEC, L80023F0C, L80023F1C, L80023F40, L80023EEC, L80023F40, L80023EEC, L80023F40, L80023EAC, L80023F40, L80023F40, L80023F04, L80023F40, L80023F14, L80023F40, L80023EFC, L80023E8C, L80023E8C, L80023F14, L80023EFC, L80023EFC, L80023E94, L80023E94, L80023E94, L80023E94, L80023F40, L80023F40, L80023F40, L80023F14, L80023F34, L80023EAC, L80023E7C, L80023F40, L80023F40, L80023F3C, L80023EEC, L80023F14 + +.text glabel func_80023E30 /* 024A30 80023E30 248EFFFF */ addiu $t6, $a0, -1 /* 024A34 80023E34 2DC10074 */ sltiu $at, $t6, 0x74 /* 024A38 80023E38 10200041 */ beqz $at, .L80023F40 /* 024A3C 80023E3C 00001825 */ move $v1, $zero /* 024A40 80023E40 000E7080 */ sll $t6, $t6, 2 -/* 024A44 80023E44 3C01800E */ lui $at, %hi(D_800E5A3C) # $at, 0x800e +/* 024A44 80023E44 3C01800E */ lui $at, %hi(jpt_800E5A3C) # $at, 0x800e /* 024A48 80023E48 002E0821 */ addu $at, $at, $t6 -/* 024A4C 80023E4C 8C2E5A3C */ lw $t6, %lo(D_800E5A3C)($at) +/* 024A4C 80023E4C 8C2E5A3C */ lw $t6, %lo(jpt_800E5A3C)($at) /* 024A50 80023E50 00000000 */ nop /* 024A54 80023E54 01C00008 */ jr $t6 /* 024A58 80023E58 00000000 */ nop +glabel L80023E5C /* 024A5C 80023E5C 03E00008 */ jr $ra /* 024A60 80023E60 2402001F */ li $v0, 31 +glabel L80023E64 /* 024A64 80023E64 03E00008 */ jr $ra /* 024A68 80023E68 24020013 */ li $v0, 19 +glabel L80023E6C /* 024A6C 80023E6C 03E00008 */ jr $ra /* 024A70 80023E70 24020016 */ li $v0, 22 +glabel L80023E74 /* 024A74 80023E74 03E00008 */ jr $ra /* 024A78 80023E78 2402001B */ li $v0, 27 +glabel L80023E7C /* 024A7C 80023E7C 03E00008 */ jr $ra /* 024A80 80023E80 24020030 */ li $v0, 48 +glabel L80023E84 /* 024A84 80023E84 03E00008 */ jr $ra /* 024A88 80023E88 24020012 */ li $v0, 18 +glabel L80023E8C /* 024A8C 80023E8C 03E00008 */ jr $ra /* 024A90 80023E90 2402003B */ li $v0, 59 +glabel L80023E94 /* 024A94 80023E94 03E00008 */ jr $ra /* 024A98 80023E98 2402003A */ li $v0, 58 +glabel L80023E9C /* 024A9C 80023E9C 03E00008 */ jr $ra /* 024AA0 80023EA0 24020004 */ li $v0, 4 +glabel L80023EA4 /* 024AA4 80023EA4 03E00008 */ jr $ra /* 024AA8 80023EA8 2402001B */ li $v0, 27 +glabel L80023EAC /* 024AAC 80023EAC 03E00008 */ jr $ra /* 024AB0 80023EB0 24020012 */ li $v0, 18 +glabel L80023EB4 /* 024AB4 80023EB4 03E00008 */ jr $ra /* 024AB8 80023EB8 24020030 */ li $v0, 48 +glabel L80023EBC /* 024ABC 80023EBC 03E00008 */ jr $ra /* 024AC0 80023EC0 24020039 */ li $v0, 57 +glabel L80023EC4 /* 024AC4 80023EC4 03E00008 */ jr $ra /* 024AC8 80023EC8 24020012 */ li $v0, 18 +glabel L80023ECC /* 024ACC 80023ECC 03E00008 */ jr $ra /* 024AD0 80023ED0 24020009 */ li $v0, 9 +glabel L80023ED4 /* 024AD4 80023ED4 03E00008 */ jr $ra /* 024AD8 80023ED8 24020012 */ li $v0, 18 +glabel L80023EDC /* 024ADC 80023EDC 03E00008 */ jr $ra /* 024AE0 80023EE0 24020009 */ li $v0, 9 +glabel L80023EE4 /* 024AE4 80023EE4 03E00008 */ jr $ra /* 024AE8 80023EE8 24020009 */ li $v0, 9 +glabel L80023EEC /* 024AEC 80023EEC 03E00008 */ jr $ra /* 024AF0 80023EF0 2402000B */ li $v0, 11 +glabel L80023EF4 /* 024AF4 80023EF4 03E00008 */ jr $ra /* 024AF8 80023EF8 2402000B */ li $v0, 11 +glabel L80023EFC /* 024AFC 80023EFC 03E00008 */ jr $ra /* 024B00 80023F00 24020031 */ li $v0, 49 +glabel L80023F04 /* 024B04 80023F04 03E00008 */ jr $ra /* 024B08 80023F08 24020001 */ li $v0, 1 +glabel L80023F0C /* 024B0C 80023F0C 03E00008 */ jr $ra /* 024B10 80023F10 2402000A */ li $v0, 10 +glabel L80023F14 /* 024B14 80023F14 03E00008 */ jr $ra /* 024B18 80023F18 24020010 */ li $v0, 16 +glabel L80023F1C /* 024B1C 80023F1C 03E00008 */ jr $ra /* 024B20 80023F20 24020012 */ li $v0, 18 +glabel L80023F24 /* 024B24 80023F24 03E00008 */ jr $ra /* 024B28 80023F28 24020002 */ li $v0, 2 +glabel L80023F2C /* 024B2C 80023F2C 03E00008 */ jr $ra /* 024B30 80023F30 2402001B */ li $v0, 27 +glabel L80023F34 /* 024B34 80023F34 03E00008 */ jr $ra /* 024B38 80023F38 2402000B */ li $v0, 11 +glabel L80023F3C /* 024B3C 80023F3C 24030001 */ li $v1, 1 .L80023F40: +glabel L80023F40 /* 024B40 80023F40 03E00008 */ jr $ra /* 024B44 80023F44 00601025 */ move $v0, $v1 diff --git a/asm/non_matchings/unknown_00BC20/func_80023F48.s b/asm/non_matchings/unknown_00BC20/func_80023F48.s index fe6cc235..b4c19696 100644 --- a/asm/non_matchings/unknown_00BC20/func_80023F48.s +++ b/asm/non_matchings/unknown_00BC20/func_80023F48.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E5C0C +.word L80023FA4, L80023FB8, L80023FCC, L80024108, L80023FE0, L8002401C, L80024570, L80024570, L80024030, L80024044, L80024058, L8002406C, L800240A8, L800240BC, L800240CC, L800240E0, L80024108, L80024570, L80024570, L80024570, L80024008, L800240F4, L80024570, L80023FF4, L8002411C, L80024570, L80024130, L80024144, L80024080, L80024158, L8002416C, L80024570, L80024570, L80024570, L80024180, L800241A8, L800241BC, L800241D0, L800241E4, L80024094, L80024570, L80024570, L80024570, L800241F8, L8002420C, L80024220, L80024570, L80024570, L80024234, L8002425C, L80024270, L80024284, L80024298, L800242AC, L800242C0, L800242D4, L800242E8, L80024570, L800242FC, L8002430C, L80024320, L80024570, L80024334, L80024348, L8002435C, L80024194, L80024370, L80024384, L80024398, L80024570, L80024398, L800243C0, L800243D4, L800243E8, L800243FC, L80024410, L80024424, L80024438, L8002444C, L80024234, L80024460, L80024570, L80024474, L80024234, L80024234, L80024570, L80024488, L80024570, L8002449C, L80024570, L80024570, L800242D4, L800244B0, L80024570, L800243AC, L800243AC, L800244C4, L80024570, L800244EC, L800243AC, L800243AC, L80024398, L80024398, L800244D8, L80024570, L80024570, L80024500, L80024514, L80024488, L80024528, L80024570, L8002453C, L80024570, L80024550, L80024500, L80024564, L80024570, L80024248 + +.text glabel func_80023F48 /* 024B48 80023F48 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 024B4C 80023F4C AFBF0014 */ sw $ra, 0x14($sp) @@ -16,384 +21,460 @@ glabel func_80023F48 /* 024B80 80023F80 2DE10076 */ sltiu $at, $t7, 0x76 /* 024B84 80023F84 1020017A */ beqz $at, .L80024570 /* 024B88 80023F88 000F7880 */ sll $t7, $t7, 2 -/* 024B8C 80023F8C 3C01800E */ lui $at, %hi(D_800E5C0C) # $at, 0x800e +/* 024B8C 80023F8C 3C01800E */ lui $at, %hi(jpt_800E5C0C) # $at, 0x800e /* 024B90 80023F90 002F0821 */ addu $at, $at, $t7 -/* 024B94 80023F94 8C2F5C0C */ lw $t7, %lo(D_800E5C0C)($at) +/* 024B94 80023F94 8C2F5C0C */ lw $t7, %lo(jpt_800E5C0C)($at) /* 024B98 80023F98 00000000 */ nop /* 024B9C 80023F9C 01E00008 */ jr $t7 /* 024BA0 80023FA0 00000000 */ nop +glabel L80023FA4 /* 024BA4 80023FA4 00C02025 */ move $a0, $a2 /* 024BA8 80023FA8 0C00CF74 */ jal func_80033DD0 /* 024BAC 80023FAC 00E02825 */ move $a1, $a3 /* 024BB0 80023FB0 10000170 */ b .L80024574 /* 024BB4 80023FB4 24040001 */ li $a0, 1 +glabel L80023FB8 /* 024BB8 80023FB8 00C02025 */ move $a0, $a2 /* 024BBC 80023FBC 0C00DC35 */ jal func_800370D4 /* 024BC0 80023FC0 00E02825 */ move $a1, $a3 /* 024BC4 80023FC4 1000016B */ b .L80024574 /* 024BC8 80023FC8 24040001 */ li $a0, 1 +glabel L80023FCC /* 024BCC 80023FCC 00C02025 */ move $a0, $a2 /* 024BD0 80023FD0 0C00DDF9 */ jal func_800377E4 /* 024BD4 80023FD4 00E02825 */ move $a1, $a3 /* 024BD8 80023FD8 10000166 */ b .L80024574 /* 024BDC 80023FDC 24040001 */ li $a0, 1 +glabel L80023FE0 /* 024BE0 80023FE0 00C02025 */ move $a0, $a2 /* 024BE4 80023FE4 0C00E26E */ jal func_800389B8 /* 024BE8 80023FE8 00E02825 */ move $a1, $a3 /* 024BEC 80023FEC 10000161 */ b .L80024574 /* 024BF0 80023FF0 24040001 */ li $a0, 1 +glabel L80023FF4 /* 024BF4 80023FF4 00C02025 */ move $a0, $a2 /* 024BF8 80023FF8 0C00E29E */ jal func_80038A78 /* 024BFC 80023FFC 00E02825 */ move $a1, $a3 /* 024C00 80024000 1000015C */ b .L80024574 /* 024C04 80024004 24040001 */ li $a0, 1 +glabel L80024008 /* 024C08 80024008 00C02025 */ move $a0, $a2 /* 024C0C 8002400C 0C00E2FD */ jal func_80038BF4 /* 024C10 80024010 00E02825 */ move $a1, $a3 /* 024C14 80024014 10000157 */ b .L80024574 /* 024C18 80024018 24040001 */ li $a0, 1 +glabel L8002401C /* 024C1C 8002401C 00C02025 */ move $a0, $a2 /* 024C20 80024020 0C00E3D6 */ jal func_80038F58 /* 024C24 80024024 00E02825 */ move $a1, $a3 /* 024C28 80024028 10000152 */ b .L80024574 /* 024C2C 8002402C 24040001 */ li $a0, 1 +glabel L80024030 /* 024C30 80024030 00C02025 */ move $a0, $a2 /* 024C34 80024034 0C00E461 */ jal func_80039184 /* 024C38 80024038 00E02825 */ move $a1, $a3 /* 024C3C 8002403C 1000014D */ b .L80024574 /* 024C40 80024040 24040001 */ li $a0, 1 +glabel L80024044 /* 024C44 80024044 00C02025 */ move $a0, $a2 /* 024C48 80024048 0C00E46F */ jal func_800391BC /* 024C4C 8002404C 00E02825 */ move $a1, $a3 /* 024C50 80024050 10000148 */ b .L80024574 /* 024C54 80024054 24040001 */ li $a0, 1 +glabel L80024058 /* 024C58 80024058 00C02025 */ move $a0, $a2 /* 024C5C 8002405C 0C00E47F */ jal func_800391FC /* 024C60 80024060 00E02825 */ move $a1, $a3 /* 024C64 80024064 10000143 */ b .L80024574 /* 024C68 80024068 24040001 */ li $a0, 1 +glabel L8002406C /* 024C6C 8002406C 00C02025 */ move $a0, $a2 /* 024C70 80024070 0C00EB4A */ jal func_8003AD28 /* 024C74 80024074 00E02825 */ move $a1, $a3 /* 024C78 80024078 1000013E */ b .L80024574 /* 024C7C 8002407C 24040001 */ li $a0, 1 +glabel L80024080 /* 024C80 80024080 00C02025 */ move $a0, $a2 /* 024C84 80024084 0C00EB94 */ jal func_8003AE50 /* 024C88 80024088 00E02825 */ move $a1, $a3 /* 024C8C 8002408C 10000139 */ b .L80024574 /* 024C90 80024090 24040001 */ li $a0, 1 +glabel L80024094 /* 024C94 80024094 00C02025 */ move $a0, $a2 /* 024C98 80024098 0C00EC5D */ jal func_8003B174 /* 024C9C 8002409C 00E02825 */ move $a1, $a3 /* 024CA0 800240A0 10000134 */ b .L80024574 /* 024CA4 800240A4 24040001 */ li $a0, 1 +glabel L800240A8 /* 024CA8 800240A8 00C02025 */ move $a0, $a2 /* 024CAC 800240AC 0C00EE62 */ jal func_8003B988 /* 024CB0 800240B0 00E02825 */ move $a1, $a3 /* 024CB4 800240B4 1000012F */ b .L80024574 /* 024CB8 800240B8 24040001 */ li $a0, 1 +glabel L800240BC /* 024CBC 800240BC 0C00C29D */ jal func_80030A74 /* 024CC0 800240C0 00C02025 */ move $a0, $a2 /* 024CC4 800240C4 1000012B */ b .L80024574 /* 024CC8 800240C8 24040001 */ li $a0, 1 +glabel L800240CC /* 024CCC 800240CC 00C02025 */ move $a0, $a2 /* 024CD0 800240D0 0C00F40B */ jal func_8003D02C /* 024CD4 800240D4 00E02825 */ move $a1, $a3 /* 024CD8 800240D8 10000126 */ b .L80024574 /* 024CDC 800240DC 24040001 */ li $a0, 1 +glabel L800240E0 /* 024CE0 800240E0 00C02025 */ move $a0, $a2 /* 024CE4 800240E4 0C00F850 */ jal func_8003E140 /* 024CE8 800240E8 00E02825 */ move $a1, $a3 /* 024CEC 800240EC 10000121 */ b .L80024574 /* 024CF0 800240F0 24040001 */ li $a0, 1 +glabel L800240F4 /* 024CF4 800240F4 00C02025 */ move $a0, $a2 /* 024CF8 800240F8 0C00F96F */ jal func_8003E5BC /* 024CFC 800240FC 00E02825 */ move $a1, $a3 /* 024D00 80024100 1000011C */ b .L80024574 /* 024D04 80024104 24040001 */ li $a0, 1 +glabel L80024108 /* 024D08 80024108 00C02025 */ move $a0, $a2 /* 024D0C 8002410C 0C00F98C */ jal func_8003E630 /* 024D10 80024110 00E02825 */ move $a1, $a3 /* 024D14 80024114 10000117 */ b .L80024574 /* 024D18 80024118 24040001 */ li $a0, 1 +glabel L8002411C /* 024D1C 8002411C 00C02025 */ move $a0, $a2 /* 024D20 80024120 0C00F3E6 */ jal func_8003CF98 /* 024D24 80024124 00E02825 */ move $a1, $a3 /* 024D28 80024128 10000112 */ b .L80024574 /* 024D2C 8002412C 24040001 */ li $a0, 1 +glabel L80024130 /* 024D30 80024130 00C02025 */ move $a0, $a2 /* 024D34 80024134 0C00D2D3 */ jal func_80034B4C /* 024D38 80024138 00E02825 */ move $a1, $a3 /* 024D3C 8002413C 1000010D */ b .L80024574 /* 024D40 80024140 24040001 */ li $a0, 1 +glabel L80024144 /* 024D44 80024144 00C02025 */ move $a0, $a2 /* 024D48 80024148 0C010052 */ jal func_80040148 /* 024D4C 8002414C 00E02825 */ move $a1, $a3 /* 024D50 80024150 10000108 */ b .L80024574 /* 024D54 80024154 24040001 */ li $a0, 1 +glabel L80024158 /* 024D58 80024158 00C02025 */ move $a0, $a2 /* 024D5C 8002415C 0C00D878 */ jal func_800361E0 /* 024D60 80024160 00E02825 */ move $a1, $a3 /* 024D64 80024164 10000103 */ b .L80024574 /* 024D68 80024168 24040001 */ li $a0, 1 +glabel L8002416C /* 024D6C 8002416C 00C02025 */ move $a0, $a2 /* 024D70 80024170 0C00F568 */ jal func_8003D5A0 /* 024D74 80024174 00E02825 */ move $a1, $a3 /* 024D78 80024178 100000FE */ b .L80024574 /* 024D7C 8002417C 24040001 */ li $a0, 1 +glabel L80024180 /* 024D80 80024180 00C02025 */ move $a0, $a2 /* 024D84 80024184 0C010112 */ jal func_80040448 /* 024D88 80024188 00E02825 */ move $a1, $a3 /* 024D8C 8002418C 100000F9 */ b .L80024574 /* 024D90 80024190 24040001 */ li $a0, 1 +glabel L80024194 /* 024D94 80024194 00C02025 */ move $a0, $a2 /* 024D98 80024198 0C01015C */ jal func_80040570 /* 024D9C 8002419C 00E02825 */ move $a1, $a3 /* 024DA0 800241A0 100000F4 */ b .L80024574 /* 024DA4 800241A4 24040001 */ li $a0, 1 +glabel L800241A8 /* 024DA8 800241A8 00C02025 */ move $a0, $a2 /* 024DAC 800241AC 0C010208 */ jal func_80040820 /* 024DB0 800241B0 00E02825 */ move $a1, $a3 /* 024DB4 800241B4 100000EF */ b .L80024574 /* 024DB8 800241B8 24040001 */ li $a0, 1 +glabel L800241BC /* 024DBC 800241BC 00C02025 */ move $a0, $a2 /* 024DC0 800241C0 0C00F29A */ jal func_8003CA68 /* 024DC4 800241C4 00E02825 */ move $a1, $a3 /* 024DC8 800241C8 100000EA */ b .L80024574 /* 024DCC 800241CC 24040001 */ li $a0, 1 +glabel L800241D0 /* 024DD0 800241D0 00C02025 */ move $a0, $a2 /* 024DD4 800241D4 0C00F3A8 */ jal func_8003CEA0 /* 024DD8 800241D8 00E02825 */ move $a1, $a3 /* 024DDC 800241DC 100000E5 */ b .L80024574 /* 024DE0 800241E0 24040001 */ li $a0, 1 +glabel L800241E4 /* 024DE4 800241E4 00C02025 */ move $a0, $a2 /* 024DE8 800241E8 0C00F3C3 */ jal func_8003CF0C /* 024DEC 800241EC 00E02825 */ move $a1, $a3 /* 024DF0 800241F0 100000E0 */ b .L80024574 /* 024DF4 800241F4 24040001 */ li $a0, 1 +glabel L800241F8 /* 024DF8 800241F8 00C02025 */ move $a0, $a2 /* 024DFC 800241FC 0C00D498 */ jal func_80035260 /* 024E00 80024200 00E02825 */ move $a1, $a3 /* 024E04 80024204 100000DB */ b .L80024574 /* 024E08 80024208 24040001 */ li $a0, 1 +glabel L8002420C /* 024E0C 8002420C 00C02025 */ move $a0, $a2 /* 024E10 80024210 0C00D593 */ jal func_8003564C /* 024E14 80024214 00E02825 */ move $a1, $a3 /* 024E18 80024218 100000D6 */ b .L80024574 /* 024E1C 8002421C 24040001 */ li $a0, 1 +glabel L80024220 /* 024E20 80024220 00C02025 */ move $a0, $a2 /* 024E24 80024224 0C00D7DB */ jal func_80035F6C /* 024E28 80024228 00E02825 */ move $a1, $a3 /* 024E2C 8002422C 100000D1 */ b .L80024574 /* 024E30 80024230 24040001 */ li $a0, 1 +glabel L80024234 /* 024E34 80024234 00C02025 */ move $a0, $a2 /* 024E38 80024238 0C00DF3A */ jal func_80037CE8 /* 024E3C 8002423C 00E02825 */ move $a1, $a3 /* 024E40 80024240 100000CC */ b .L80024574 /* 024E44 80024244 24040001 */ li $a0, 1 +glabel L80024248 /* 024E48 80024248 00C02025 */ move $a0, $a2 /* 024E4C 8002424C 0C010B34 */ jal func_80042CD0 /* 024E50 80024250 00E02825 */ move $a1, $a3 /* 024E54 80024254 100000C7 */ b .L80024574 /* 024E58 80024258 24040001 */ li $a0, 1 +glabel L8002425C /* 024E5C 8002425C 00C02025 */ move $a0, $a2 /* 024E60 80024260 0C00E1C4 */ jal func_80038710 /* 024E64 80024264 00E02825 */ move $a1, $a3 /* 024E68 80024268 100000C2 */ b .L80024574 /* 024E6C 8002426C 24040001 */ li $a0, 1 +glabel L80024270 /* 024E70 80024270 00C02025 */ move $a0, $a2 /* 024E74 80024274 0C00E235 */ jal func_800388D4 /* 024E78 80024278 00E02825 */ move $a1, $a3 /* 024E7C 8002427C 100000BD */ b .L80024574 /* 024E80 80024280 24040001 */ li $a0, 1 +glabel L80024284 /* 024E84 80024284 00C02025 */ move $a0, $a2 /* 024E88 80024288 0C00E1F3 */ jal func_800387CC /* 024E8C 8002428C 00E02825 */ move $a1, $a3 /* 024E90 80024290 100000B8 */ b .L80024574 /* 024E94 80024294 24040001 */ li $a0, 1 +glabel L80024298 /* 024E98 80024298 00C02025 */ move $a0, $a2 /* 024E9C 8002429C 0C00E0CF */ jal func_8003833C /* 024EA0 800242A0 00E02825 */ move $a1, $a3 /* 024EA4 800242A4 100000B3 */ b .L80024574 /* 024EA8 800242A8 24040001 */ li $a0, 1 +glabel L800242AC /* 024EAC 800242AC 00C02025 */ move $a0, $a2 /* 024EB0 800242B0 0C00F1E9 */ jal func_8003C7A4 /* 024EB4 800242B4 00E02825 */ move $a1, $a3 /* 024EB8 800242B8 100000AE */ b .L80024574 /* 024EBC 800242BC 24040001 */ li $a0, 1 +glabel L800242C0 /* 024EC0 800242C0 00C02025 */ move $a0, $a2 /* 024EC4 800242C4 0C00E03E */ jal func_800380F8 /* 024EC8 800242C8 00E02825 */ move $a1, $a3 /* 024ECC 800242CC 100000A9 */ b .L80024574 /* 024ED0 800242D0 24040001 */ li $a0, 1 +glabel L800242D4 /* 024ED4 800242D4 00C02025 */ move $a0, $a2 /* 024ED8 800242D8 0C00D65B */ jal func_8003596C /* 024EDC 800242DC 00E02825 */ move $a1, $a3 /* 024EE0 800242E0 100000A4 */ b .L80024574 /* 024EE4 800242E4 24040001 */ li $a0, 1 +glabel L800242E8 /* 024EE8 800242E8 00C02025 */ move $a0, $a2 /* 024EEC 800242EC 0C00D78D */ jal func_80035E34 /* 024EF0 800242F0 00E02825 */ move $a1, $a3 /* 024EF4 800242F4 1000009F */ b .L80024574 /* 024EF8 800242F8 24040001 */ li $a0, 1 +glabel L800242FC /* 024EFC 800242FC 0C02FFF7 */ jal func_800BFFDC /* 024F00 80024300 00C02025 */ move $a0, $a2 /* 024F04 80024304 1000009B */ b .L80024574 /* 024F08 80024308 24040001 */ li $a0, 1 +glabel L8002430C /* 024F0C 8002430C 00C02025 */ move $a0, $a2 /* 024F10 80024310 0C010315 */ jal func_80040C54 /* 024F14 80024314 00E02825 */ move $a1, $a3 /* 024F18 80024318 10000096 */ b .L80024574 /* 024F1C 8002431C 24040001 */ li $a0, 1 +glabel L80024320 /* 024F20 80024320 00C02025 */ move $a0, $a2 /* 024F24 80024324 0C00E4CC */ jal func_80039330 /* 024F28 80024328 00E02825 */ move $a1, $a3 /* 024F2C 8002432C 10000091 */ b .L80024574 /* 024F30 80024330 24040001 */ li $a0, 1 +glabel L80024334 /* 024F34 80024334 00C02025 */ move $a0, $a2 /* 024F38 80024338 0C00F7C2 */ jal func_8003DF08 /* 024F3C 8002433C 00E02825 */ move $a1, $a3 /* 024F40 80024340 1000008C */ b .L80024574 /* 024F44 80024344 24040001 */ li $a0, 1 +glabel L80024348 /* 024F48 80024348 00C02025 */ move $a0, $a2 /* 024F4C 8002434C 0C00F4FF */ jal func_8003D3FC /* 024F50 80024350 00E02825 */ move $a1, $a3 /* 024F54 80024354 10000087 */ b .L80024574 /* 024F58 80024358 24040001 */ li $a0, 1 +glabel L8002435C /* 024F5C 8002435C 00C02025 */ move $a0, $a2 /* 024F60 80024360 0C00F416 */ jal func_8003D058 /* 024F64 80024364 00E02825 */ move $a1, $a3 /* 024F68 80024368 10000082 */ b .L80024574 /* 024F6C 8002436C 24040001 */ li $a0, 1 +glabel L80024370 /* 024F70 80024370 00C02025 */ move $a0, $a2 /* 024F74 80024374 0C00DD65 */ jal func_80037594 /* 024F78 80024378 00E02825 */ move $a1, $a3 /* 024F7C 8002437C 1000007D */ b .L80024574 /* 024F80 80024380 24040001 */ li $a0, 1 +glabel L80024384 /* 024F84 80024384 00C02025 */ move $a0, $a2 /* 024F88 80024388 0C00DD8F */ jal func_8003763C /* 024F8C 8002438C 00E02825 */ move $a1, $a3 /* 024F90 80024390 10000078 */ b .L80024574 /* 024F94 80024394 24040001 */ li $a0, 1 +glabel L80024398 /* 024F98 80024398 00C02025 */ move $a0, $a2 /* 024F9C 8002439C 0C00E070 */ jal func_800381C0 /* 024FA0 800243A0 00E02825 */ move $a1, $a3 /* 024FA4 800243A4 10000073 */ b .L80024574 /* 024FA8 800243A8 24040001 */ li $a0, 1 +glabel L800243AC /* 024FAC 800243AC 00C02025 */ move $a0, $a2 /* 024FB0 800243B0 0C00E09F */ jal func_8003827C /* 024FB4 800243B4 00E02825 */ move $a1, $a3 /* 024FB8 800243B8 1000006E */ b .L80024574 /* 024FBC 800243BC 24040001 */ li $a0, 1 +glabel L800243C0 /* 024FC0 800243C0 00C02025 */ move $a0, $a2 /* 024FC4 800243C4 0C00D2DD */ jal func_80034B74 /* 024FC8 800243C8 00E02825 */ move $a1, $a3 /* 024FCC 800243CC 10000069 */ b .L80024574 /* 024FD0 800243D0 24040001 */ li $a0, 1 +glabel L800243D4 /* 024FD4 800243D4 00C02025 */ move $a0, $a2 /* 024FD8 800243D8 0C00D3A7 */ jal func_80034E9C /* 024FDC 800243DC 00E02825 */ move $a1, $a3 /* 024FE0 800243E0 10000064 */ b .L80024574 /* 024FE4 800243E4 24040001 */ li $a0, 1 +glabel L800243E8 /* 024FE8 800243E8 00C02025 */ move $a0, $a2 /* 024FEC 800243EC 0C010824 */ jal func_80042090 /* 024FF0 800243F0 00E02825 */ move $a1, $a3 /* 024FF4 800243F4 1000005F */ b .L80024574 /* 024FF8 800243F8 24040001 */ li $a0, 1 +glabel L800243FC /* 024FFC 800243FC 00C02025 */ move $a0, $a2 /* 025000 80024400 0C00F4AE */ jal func_8003D2B8 /* 025004 80024404 00E02825 */ move $a1, $a3 /* 025008 80024408 1000005A */ b .L80024574 /* 02500C 8002440C 24040001 */ li $a0, 1 +glabel L80024410 /* 025010 80024410 00C02025 */ move $a0, $a2 /* 025014 80024414 0C00ED2F */ jal func_8003B4BC /* 025018 80024418 00E02825 */ move $a1, $a3 /* 02501C 8002441C 10000055 */ b .L80024574 /* 025020 80024420 24040001 */ li $a0, 1 +glabel L80024424 /* 025024 80024424 00C02025 */ move $a0, $a2 /* 025028 80024428 0C00D218 */ jal func_80034860 /* 02502C 8002442C 00E02825 */ move $a1, $a3 /* 025030 80024430 10000050 */ b .L80024574 /* 025034 80024434 24040001 */ li $a0, 1 +glabel L80024438 /* 025038 80024438 00C02025 */ move $a0, $a2 /* 02503C 8002443C 0C00D168 */ jal func_800345A0 /* 025040 80024440 00E02825 */ move $a1, $a3 /* 025044 80024444 1000004B */ b .L80024574 /* 025048 80024448 24040001 */ li $a0, 1 +glabel L8002444C /* 02504C 8002444C 00C02025 */ move $a0, $a2 /* 025050 80024450 0C00EB28 */ jal func_8003ACA0 /* 025054 80024454 00E02825 */ move $a1, $a3 /* 025058 80024458 10000046 */ b .L80024574 /* 02505C 8002445C 24040001 */ li $a0, 1 +glabel L80024460 /* 025060 80024460 00C02025 */ move $a0, $a2 /* 025064 80024464 0C00D714 */ jal func_80035C50 /* 025068 80024468 00E02825 */ move $a1, $a3 /* 02506C 8002446C 10000041 */ b .L80024574 /* 025070 80024470 24040001 */ li $a0, 1 +glabel L80024474 /* 025074 80024474 00C02025 */ move $a0, $a2 /* 025078 80024478 0C00DF5E */ jal func_80037D78 /* 02507C 8002447C 00E02825 */ move $a1, $a3 /* 025080 80024480 1000003C */ b .L80024574 /* 025084 80024484 24040001 */ li $a0, 1 +glabel L80024488 /* 025088 80024488 00C02025 */ move $a0, $a2 /* 02508C 8002448C 0C00F745 */ jal func_8003DD14 /* 025090 80024490 00E02825 */ move $a1, $a3 /* 025094 80024494 10000037 */ b .L80024574 /* 025098 80024498 24040001 */ li $a0, 1 +glabel L8002449C /* 02509C 8002449C 00C02025 */ move $a0, $a2 /* 0250A0 800244A0 0C00E2B5 */ jal func_80038AD4 /* 0250A4 800244A4 00E02825 */ move $a1, $a3 /* 0250A8 800244A8 10000032 */ b .L80024574 /* 0250AC 800244AC 24040001 */ li $a0, 1 +glabel L800244B0 /* 0250B0 800244B0 00C02025 */ move $a0, $a2 /* 0250B4 800244B4 0C010858 */ jal func_80042160 /* 0250B8 800244B8 00E02825 */ move $a1, $a3 /* 0250BC 800244BC 1000002D */ b .L80024574 /* 0250C0 800244C0 24040001 */ li $a0, 1 +glabel L800244C4 /* 0250C4 800244C4 00C02025 */ move $a0, $a2 /* 0250C8 800244C8 0C00E371 */ jal func_80038DC4 /* 0250CC 800244CC 00E02825 */ move $a1, $a3 /* 0250D0 800244D0 10000028 */ b .L80024574 /* 0250D4 800244D4 24040001 */ li $a0, 1 +glabel L800244D8 /* 0250D8 800244D8 00C02025 */ move $a0, $a2 /* 0250DC 800244DC 0C01085E */ jal func_80042178 /* 0250E0 800244E0 00E02825 */ move $a1, $a3 /* 0250E4 800244E4 10000023 */ b .L80024574 /* 0250E8 800244E8 24040001 */ li $a0, 1 +glabel L800244EC /* 0250EC 800244EC 00C02025 */ move $a0, $a2 /* 0250F0 800244F0 0C00D5F5 */ jal func_800357D4 /* 0250F4 800244F4 00E02825 */ move $a1, $a3 /* 0250F8 800244F8 1000001E */ b .L80024574 /* 0250FC 800244FC 24040001 */ li $a0, 1 +glabel L80024500 /* 025100 80024500 00C02025 */ move $a0, $a2 /* 025104 80024504 0C00CFD8 */ jal func_80033F60 /* 025108 80024508 00E02825 */ move $a1, $a3 /* 02510C 8002450C 10000019 */ b .L80024574 /* 025110 80024510 24040001 */ li $a0, 1 +glabel L80024514 /* 025114 80024514 00C02025 */ move $a0, $a2 /* 025118 80024518 0C0108BC */ jal func_800422F0 /* 02511C 8002451C 00E02825 */ move $a1, $a3 /* 025120 80024520 10000014 */ b .L80024574 /* 025124 80024524 24040001 */ li $a0, 1 +glabel L80024528 /* 025128 80024528 00C02025 */ move $a0, $a2 /* 02512C 8002452C 0C00F0B9 */ jal func_8003C2E4 /* 025130 80024530 00E02825 */ move $a1, $a3 /* 025134 80024534 1000000F */ b .L80024574 /* 025138 80024538 24040001 */ li $a0, 1 +glabel L8002453C /* 02513C 8002453C 00C02025 */ move $a0, $a2 /* 025140 80024540 0C00DF42 */ jal func_80037D08 /* 025144 80024544 00E02825 */ move $a1, $a3 /* 025148 80024548 1000000A */ b .L80024574 /* 02514C 8002454C 24040001 */ li $a0, 1 +glabel L80024550 /* 025150 80024550 00C02025 */ move $a0, $a2 /* 025154 80024554 0C010A66 */ jal func_80042998 /* 025158 80024558 00E02825 */ move $a1, $a3 /* 02515C 8002455C 10000005 */ b .L80024574 /* 025160 80024560 24040001 */ li $a0, 1 +glabel L80024564 /* 025164 80024564 00C02025 */ move $a0, $a2 /* 025168 80024568 0C010AA4 */ jal func_80042A90 /* 02516C 8002456C 00E02825 */ move $a1, $a3 .L80024570: +glabel L80024570 /* 025170 80024570 24040001 */ li $a0, 1 .L80024574: /* 025174 80024574 0C02DDAE */ jal func_800B76B8 diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index 4322bf11..8546900e 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -117,294 +117,6 @@ const char D_800E50FC[] = "ERROR Channel %d\n"; const char D_800E5110[] = "RO error %d!!\n"; const char D_800E5120[] = "ARGHHHHHHHHH\n"; -const FloatLiteral D_800E5130 = { 1.09f }; -const FloatLiteral D_800E5134 = { 1.18f }; -const FloatLiteral D_800E5138 = { 1.2f }; -const FloatLiteral D_800E513C = { 2.4f }; -const FloatLiteral D_800E5140 = { 4.8f }; -const FloatLiteral D_800E5144 = { 0.05f }; -const FloatLiteral D_800E5148 = { 0.1f }; -const FloatLiteral D_800E514C = { 0.67f }; -const FloatLiteral D_800E5150 = { 0.33f }; - -// Jump table in func_8000CC7C -const u32 D_800E5154[] = { - 0x8000D974, 0x8000D974, 0x8000D974, 0x8000D974, - 0x8000D974, 0x8000D98C, 0x8000D974, 0x8000D974, - 0x8000D974 -}; - -const FloatLiteral D_800E5178 = { 0.0099999999f }; -const FloatLiteral D_800E517C = { 0.0099999999f }; -const FloatLiteral D_800E5180 = { 1.4f }; -const FloatLiteral D_800E5184 = { 0.714f }; - -// Jump table in func_8000E0B0 -const u32 D_800E5188[] = { - 0x8000E104, 0x8000E0E4, 0x8000E0F4, 0x8000E0F4, - 0x8000E0FC, 0x8000E104, 0x8000E0FC, 0x8000E0EC, - 0x8000E104 -}; - -const FloatLiteral D_800E51AC = { 1.4f }; -const FloatLiteral D_800E51B0 = { 0.714f }; - -// Jump table in func_8000EA54 -const u32 D_800E51B4[] = { - 0x8000ECD8, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000ED98, - 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, - 0x8000ECF4, 0x8000EDE0, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000ED10, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000ED40, 0x8000EDE0, 0x8000EDE0, - 0x8000EDE0, 0x8000EDE0, 0x8000ED54 -}; - -// Jump table in func_800101AC -const u32 D_800E5250[] = { - 0x80010374, 0x800105F8, 0x800105F8, 0x800105F8, - 0x80010400, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x80010400, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800104C0, 0x800105F8, 0x800105F8, 0x800105A8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105D0, 0x800105E4, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800104D8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800104AC, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105A8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x80010508, 0x800105F8, - 0x80010374, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x8001047C, - 0x8001047C, 0x800105F8, 0x800105F8, 0x800105F8, - 0x8001047C, 0x8001047C, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x800105F8, - 0x800105F8, 0x800105F8, 0x800105F8, 0x8001044C -}; - -// Jump table in func_800101AC -const u32 D_800E5420[] = { - 0x8001063C, 0x8001063C, 0x80010664, 0x8001063C, - 0x8001063C, 0x80010664, 0x8001063C, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x80010664, - 0x8001063C, 0x80010664, 0x8001063C, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x80010664, - 0x80010664, 0x80010664, 0x8001063C, 0x8001063C, - 0x80010664, 0x80010664, 0x8001063C, 0x8001063C, - 0x8001063C, 0x80010664, 0x80010664, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x80010664, - 0x80010664, 0x80010664, 0x8001063C, 0x8001063C, - 0x80010664, 0x80010664, 0x80010664, 0x8001063C, - 0x8001063C, 0x8001063C, 0x8001063C, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x80010664, - 0x80010664, 0x80010664, 0x80010664, 0x8001063C, - 0x80010664, 0x8001063C, 0x80010664, 0x80010664, - 0x80010664, 0x8001063C -}; - -const DoubleLiteral D_800E5538 = { 1000.0 }; -const DoubleLiteral D_800E5540 = { 3000.0 }; -const DoubleLiteral D_800E5548 = { 500.0 }; -const FloatLiteral D_800E5550 = { 0.01f }; -const FloatLiteral D_800E5554 = { 0.2f }; -const FloatLiteral D_800E5558 = { 0.05f }; -const FloatLiteral D_800E555C = { 3500.0f }; -const FloatLiteral D_800E5560 = { 2700.0f }; -const FloatLiteral D_800E5564 = { 0.6f }; -const FloatLiteral D_800E5568 = { 1.15f }; -const FloatLiteral D_800E556C = { 0.05f }; -const FloatLiteral D_800E5570 = { 0.95f }; -const DoubleLiteral D_800E5578 = { 0.1 }; -const FloatLiteral D_800E5580 = { 0.02f }; -const FloatLiteral D_800E5584 = { 0.98f }; - -// Jump table in func_80014B50 -const u32 D_800E5588[] = { - 0x80014B80, 0x80014CCC, 0x80014E18, 0x80015340, - 0x80015340, 0x80015340, 0x80015340, 0x80015340, - 0x80014F64, 0x800150B0, 0x800151FC -}; - -const DoubleLiteral D_800E55B8 = { 0.3 }; -const DoubleLiteral D_800E55C0 = { 0.3 }; -const DoubleLiteral D_800E55C8 = { 0.8 }; -const DoubleLiteral D_800E55D0 = { 0.1 }; -const DoubleLiteral D_800E55D8 = { 0.1 }; -const DoubleLiteral D_800E55E0 = { 0.3 }; -const DoubleLiteral D_800E55E8 = { 0.3 }; -const DoubleLiteral D_800E55F0 = { 0.1 }; -const DoubleLiteral D_800E55F8 = { 0.3 }; -const DoubleLiteral D_800E5600 = { 0.1 }; -const DoubleLiteral D_800E5608 = { -0.1 }; -const DoubleLiteral D_800E5610 = { -0.1 }; -const DoubleLiteral D_800E5618 = { 0.707 }; -const DoubleLiteral D_800E5620 = { -0.3 }; -const DoubleLiteral D_800E5628 = { 1.3 }; -const DoubleLiteral D_800E5630 = { 500.0 }; -const FloatLiteral D_800E5638 = { -20000.0f }; -const FloatLiteral D_800E563C = { -10000.0f }; -const FloatLiteral D_800E5644 = { -20000.0f }; -const FloatLiteral D_800E5648 = { 50000.0f }; -const DoubleLiteral D_800E564C = { 1.2 }; -const FloatLiteral D_800E5650 = { 0.01f }; -const DoubleLiteral D_800E5658 = { 255.0 }; -const FloatLiteral D_800E5660 = { 1.99f }; -const DoubleLiteral D_800E5668 = { 0.1 }; -const DoubleLiteral D_800E5670 = { 1.2 }; -const FloatLiteral D_800E5678 = { 0.01f }; -const DoubleLiteral D_800E5680 = { 0.1 }; - -// Jump table in func_800235DC -const u32 D_800E5688[] = { - 0x80023614, 0x800238A8, 0x80023808, 0x80023650, - 0x800236DC, 0x800238A8, 0x8002363C, 0x80023664, - 0x80023678, 0x800238A8, 0x800238A8, 0x80023790, - 0x800238A8, 0x80023628, 0x800238A8, 0x8002368C, - 0x800236F0, 0x800236DC, 0x80023678, 0x800238A8, - 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, - 0x800238A8, 0x800238A8, 0x800236B4, 0x800238A8, - 0x800236C8, 0x800236A0, 0x80023754, 0x80023704, - 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, - 0x800238A8, 0x80023718, 0x800238A8, 0x8002372C, - 0x800236A0, 0x800238A8, 0x800238A8, 0x800238A8, - 0x80023740, 0x800238A8, 0x80023830, 0x800238A8, - 0x800238A8, 0x80023790, 0x80023790, 0x800238A8, - 0x80023790, 0x80023790, 0x800236A0, 0x80023790, - 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, - 0x800237E0, 0x80023754, 0x800238A8, 0x800238A8, - 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, - 0x800238A8, 0x80023790, 0x800237A4, 0x80023790, - 0x800238A8, 0x8002386C, 0x800238A8, 0x800238A8, - 0x80023754, 0x800238A8, 0x80023768, 0x80023790, - 0x80023790, 0x800238A8, 0x8002377C, 0x80023790, - 0x80023790, 0x80023790, 0x800238A8, 0x800238A8, - 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, - 0x800238A8, 0x80023858, 0x800238A8, 0x80023790, - 0x80023790, 0x800238A8, 0x800238A8, 0x800238A8, - 0x80023790, 0x80023790, 0x80023790, 0x80023790, - 0x800238A8, 0x800238A8, 0x800238A8, 0x800238A8, - 0x80023880, 0x800238A8, 0x80023628, 0x800237B8, - 0x80023790, 0x800238A8, 0x80023790, 0x80023894, - 0x800238A8, 0x800237CC, 0x80023790 -}; - -// Jump table in func_800238BC -const u32 D_800E5864[] = { - 0x80023908, 0x80023918, 0x80023928, 0x80023938, - 0x80023A78, 0x80023948, 0x80023978, 0x80023988, - 0x80023998, 0x800239B8, 0x800239C8, 0x800239D8, - 0x800239E8, 0x80023A18, 0x80023A38, 0x80023A48, - 0x80023A58, 0x80023A78, 0x80023998, 0x80023E20, - 0x80023E20, 0x80023968, 0x80023A68, 0x80023E20, - 0x80023958, 0x80023A88, 0x800239A8, 0x80023A98, - 0x80023AA8, 0x800239F8, 0x80023AB8, 0x80023AC8, - 0x80023AD8, 0x80023E20, 0x80023E20, 0x80023AE8, - 0x80023B08, 0x80023B18, 0x80023B28, 0x80023B38, - 0x80023A08, 0x80023E20, 0x80023B48, 0x80023B58, - 0x80023B68, 0x80023B78, 0x80023B88, 0x80023E20, - 0x80023B98, 0x80023E20, 0x80023E20, 0x80023BA8, - 0x80023E20, 0x80023E20, 0x80023BB8, 0x80023E20, - 0x80023BC8, 0x80023BD8, 0x80023BE8, 0x80023E20, - 0x80023BF8, 0x80023C08, 0x80023E20, 0x80023C18, - 0x80023C28, 0x80023C38, 0x80023AF8, 0x80023C48, - 0x80023C58, 0x80023C68, 0x80023CA8, 0x80023C78, - 0x80023CD8, 0x80023CE8, 0x80023CF8, 0x80023D08, - 0x80023D18, 0x80023D28, 0x80023D38, 0x80023E20, - 0x80023E20, 0x80023D48, 0x80023D58, 0x80023D68, - 0x80023E20, 0x80023E20, 0x80023E20, 0x80023D88, - 0x80023D78, 0x80023D98, 0x80023E20, 0x80023E20, - 0x80023BC8, 0x80023DA8, 0x80023C78, 0x80023C88, - 0x80023C98, 0x80023DB8, 0x80023DC8, 0x80023DC8, - 0x80023C88, 0x80023C98, 0x80023C68, 0x80023C78, - 0x80023DD8, 0x80023E20, 0x80023E20, 0x80023DE8, - 0x80023DF8, 0x80023E08, 0x80023A28, 0x80023CB8, - 0x80023E20, 0x80023E20, 0x80023E20, 0x80023DE8, - 0x80023E18, 0x80023CC8 -}; - -// Jump table in func_80023E30 -const u32 D_800E5A3C[] = { - 0x80023E5C, 0x80023E64, 0x80023F40, 0x80023F40, - 0x80023E6C, 0x80023F40, 0x80023F14, 0x80023F40, - 0x80023F40, 0x80023F40, 0x80023F40, 0x80023E74, - 0x80023F14, 0x80023E7C, 0x80023F40, 0x80023F40, - 0x80023E84, 0x80023F14, 0x80023F40, 0x80023F40, - 0x80023F40, 0x80023F40, 0x80023F40, 0x80023E9C, - 0x80023F40, 0x80023F14, 0x80023F40, 0x80023F40, - 0x80023F40, 0x80023F14, 0x80023EA4, 0x80023EAC, - 0x80023F40, 0x80023F40, 0x80023F40, 0x80023F14, - 0x80023F40, 0x80023EBC, 0x80023EC4, 0x80023ECC, - 0x80023F14, 0x80023F40, 0x80023F40, 0x80023F40, - 0x80023ED4, 0x80023F40, 0x80023F40, 0x80023EDC, - 0x80023F24, 0x80023EEC, 0x80023F24, 0x80023F14, - 0x80023F40, 0x80023EF4, 0x80023F14, 0x80023EEC, - 0x80023F14, 0x80023F40, 0x80023F40, 0x80023F40, - 0x80023F24, 0x80023F2C, 0x80023EE4, 0x80023EAC, - 0x80023F40, 0x80023F40, 0x80023EB4, 0x80023F14, - 0x80023F40, 0x80023E8C, 0x80023F40, 0x80023E8C, - 0x80023F40, 0x80023EFC, 0x80023F40, 0x80023F40, - 0x80023E84, 0x80023F14, 0x80023F14, 0x80023EEC, - 0x80023F0C, 0x80023F1C, 0x80023F40, 0x80023EEC, - 0x80023F40, 0x80023EEC, 0x80023F40, 0x80023EAC, - 0x80023F40, 0x80023F40, 0x80023F04, 0x80023F40, - 0x80023F14, 0x80023F40, 0x80023EFC, 0x80023E8C, - 0x80023E8C, 0x80023F14, 0x80023EFC, 0x80023EFC, - 0x80023E94, 0x80023E94, 0x80023E94, 0x80023E94, - 0x80023F40, 0x80023F40, 0x80023F40, 0x80023F14, - 0x80023F34, 0x80023EAC, 0x80023E7C, 0x80023F40, - 0x80023F40, 0x80023F3C, 0x80023EEC, 0x80023F14 -}; - -// Jump table in func_80023F48 -const u32 D_800E5C0C[] = { - 0x80023FA4, 0x80023FB8, 0x80023FCC, 0x80024108, - 0x80023FE0, 0x8002401C, 0x80024570, 0x80024570, - 0x80024030, 0x80024044, 0x80024058, 0x8002406C, - 0x800240A8, 0x800240BC, 0x800240CC, 0x800240E0, - 0x80024108, 0x80024570, 0x80024570, 0x80024570, - 0x80024008, 0x800240F4, 0x80024570, 0x80023FF4, - 0x8002411C, 0x80024570, 0x80024130, 0x80024144, - 0x80024080, 0x80024158, 0x8002416C, 0x80024570, - 0x80024570, 0x80024570, 0x80024180, 0x800241A8, - 0x800241BC, 0x800241D0, 0x800241E4, 0x80024094, - 0x80024570, 0x80024570, 0x80024570, 0x800241F8, - 0x8002420C, 0x80024220, 0x80024570, 0x80024570, - 0x80024234, 0x8002425C, 0x80024270, 0x80024284, - 0x80024298, 0x800242AC, 0x800242C0, 0x800242D4, - 0x800242E8, 0x80024570, 0x800242FC, 0x8002430C, - 0x80024320, 0x80024570, 0x80024334, 0x80024348, - 0x8002435C, 0x80024194, 0x80024370, 0x80024384, - 0x80024398, 0x80024570, 0x80024398, 0x800243C0, - 0x800243D4, 0x800243E8, 0x800243FC, 0x80024410, - 0x80024424, 0x80024438, 0x8002444C, 0x80024234, - 0x80024460, 0x80024570, 0x80024474, 0x80024234, - 0x80024234, 0x80024570, 0x80024488, 0x80024570, - 0x8002449C, 0x80024570, 0x80024570, 0x800242D4, - 0x800244B0, 0x80024570, 0x800243AC, 0x800243AC, - 0x800244C4, 0x80024570, 0x800244EC, 0x800243AC, - 0x800243AC, 0x80024398, 0x80024398, 0x800244D8, - 0x80024570, 0x80024570, 0x80024500, 0x80024514, - 0x80024488, 0x80024528, 0x80024570, 0x8002453C, - 0x80024570, 0x80024550, 0x80024500, 0x80024564, - 0x80024570, 0x80024248 -}; - /*********************************/ /************ .bss ************/ @@ -605,7 +317,7 @@ void func_8000C2D8(u8 *arg0, s32 length); void func_8000BF8C(void) { s32 i; - func_8001D258(D_800E514C.floatLiteral, D_800E5150.floatLiteral, 0, -0x2000, 0); + 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); diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index e141fb52..a2dfb749 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -135,7 +135,7 @@ def convertFile(cFilepath): # # Check if the string has a reference somewhere # getAsmFileReferenceForLabel(filename, strLabel) # hasProcessed = True - # bottomLine = curLine - 1 + # bottomLine = curLine # asmData.insert(0, ('asciz', strLabel, strValue, bottomLine)) # except: print('Currently cannot process literal string: ') @@ -151,7 +151,7 @@ def convertFile(cFilepath): stoppedPremature = True break hasProcessed = True - bottomLine = curLine - 1 + bottomLine = curLine asmData.insert(0, ('float', floatLabel, floatValue, bottomLine)) elif lineType == 3: # Literal double floatMatch = getMatches(line, C_FLOAT_REGEX)[0] @@ -162,7 +162,7 @@ def convertFile(cFilepath): stoppedPremature = True break hasProcessed = True - bottomLine = curLine - 1 + bottomLine = curLine asmData.insert(0, ('double', floatLabel, floatValue, bottomLine)) elif lineType == 4: # Jump table bottom tableBottom = curLine @@ -173,7 +173,7 @@ def convertFile(cFilepath): for val in range(1, len(tblMatch)): tblValues.append(tblMatch[val][0][2:]) hasProcessed = True - bottomLine = curLine - 1 + bottomLine = curLine asmData.insert(0, ('table', tblLabel, tblValues, bottomLine)) tableBottom = -1 else: @@ -181,22 +181,25 @@ def convertFile(cFilepath): curLine -= 1 asmRefs = {} asmBottomLine = 999999 - for i in range(0, len(asmData)): + for i in reversed(range(0, len(asmData))): data = asmData[i] try: ref = getAsmFileReferenceForLabel(filename, data[1]) if ref not in asmRefs: asmRefs[ref] = [] asmRefs[ref].append(data) - asmBottomLine = min(asmBottomLine, asmRefs[ref][3]) + asmBottomLine = min(asmBottomLine, data[3]) except Exception as e: + # raise e print(e) if asmBottomLine != 999999: + print(bottomLine, asmBottomLine) bottomLine = asmBottomLine stoppedPremature = True break - for asmFilepath in reversed(asmRefs): + for asmFilepath in asmRefs: print('Processing: ' + asmFilepath) + asmRefs[asmFilepath].reverse() asmBottomLine = 999999 adjustAsmFile(asmFilepath, asmRefs[asmFilepath]) for ref in asmRefs[asmFilepath]: @@ -218,8 +221,12 @@ def convertFile(cFilepath): parser = argparse.ArgumentParser(description="") parser.add_argument("file", help=".c file that contains rodata to move.") +parser.add_argument("-s", "--single", help="Only do one ASM function in the file", action='store_true') args = parser.parse_args() +if args.single is not None and args.single: + ONLY_THE_FIRST_ASM_FILE = True + if args.file.endswith('.c'): convertFile(args.file) else: From 5514a51133b11fffc07bf02d3c761364dff6dda9 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 17:27:34 -0500 Subject: [PATCH 33/66] Moved rodata from C to GLOBAL_ASM in unknown_032760 --- .../unknown_032760/func_80033F60.s | 9 ++ .../unknown_032760/func_80034860.s | 7 ++ .../unknown_032760/func_80034E9C.s | 7 ++ .../unknown_032760/func_80035260.s | 9 ++ .../unknown_032760/func_800361E0.s | 11 ++ .../unknown_032760/func_80036C30.s | 5 + .../unknown_032760/func_800389B8.s | 5 + .../unknown_032760/func_80038AD4.s | 5 + .../unknown_032760/func_80039330.s | 45 +++++++- .../unknown_032760/func_8003B4BC.s | 5 + .../unknown_032760/func_8003B988.s | 7 ++ .../unknown_032760/func_8003CA68.s | 5 + .../unknown_032760/func_8003D058.s | 5 + .../unknown_032760/func_8003D2B8.s | 5 + .../unknown_032760/func_8003D5A0.s | 9 ++ .../unknown_032760/func_8003E140.s | 10 ++ .../unknown_032760/func_8003E630.s | 12 ++- .../unknown_032760/func_8003E694.s | 5 + .../unknown_032760/func_8003EDD8.s | 5 + .../unknown_032760/func_8003F2E8.s | 13 +++ .../unknown_032760/func_800409C8.s | 5 + .../unknown_032760/func_80040C54.s | 27 ++++- .../unknown_032760/func_800422F0.s | 24 ++++- src/unknown_032760.c | 100 ------------------ 24 files changed, 230 insertions(+), 110 deletions(-) diff --git a/asm/non_matchings/unknown_032760/func_80033F60.s b/asm/non_matchings/unknown_032760/func_80033F60.s index ea9afef2..6a16baf0 100644 --- a/asm/non_matchings/unknown_032760/func_80033F60.s +++ b/asm/non_matchings/unknown_032760/func_80033F60.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5FE0 +.double 1.2 +glabel D_800E5FE8 +.double 0.1 +glabel D_800E5FF0 +.double 0.9 + +.text glabel func_80033F60 /* 034B60 80033F60 27BDFF78 */ addiu $sp, $sp, -0x88 /* 034B64 80033F64 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_80034860.s b/asm/non_matchings/unknown_032760/func_80034860.s index 4a346fdb..7ef7f2fd 100644 --- a/asm/non_matchings/unknown_032760/func_80034860.s +++ b/asm/non_matchings/unknown_032760/func_80034860.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5FF8 +.double 1.2 +glabel D_800E6000 +.float 0.2 + +.text glabel func_80034860 /* 035460 80034860 44852000 */ mtc1 $a1, $f4 /* 035464 80034864 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80034E9C.s b/asm/non_matchings/unknown_032760/func_80034E9C.s index 29754dbe..e5327d21 100644 --- a/asm/non_matchings/unknown_032760/func_80034E9C.s +++ b/asm/non_matchings/unknown_032760/func_80034E9C.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6004 +.float 0.612 +glabel D_800E6008 +.float 0.552 + +.text glabel func_80034E9C /* 035A9C 80034E9C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035AA0 80034EA0 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_032760/func_80035260.s b/asm/non_matchings/unknown_032760/func_80035260.s index 56fa4148..9eef6a6b 100644 --- a/asm/non_matchings/unknown_032760/func_80035260.s +++ b/asm/non_matchings/unknown_032760/func_80035260.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E6010 +.double 1.2 +glabel D_800E6018 +.double 0.98 +glabel D_800E6020 +.double 0.95 + +.text glabel func_80035260 /* 035E60 80035260 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035E64 80035264 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_800361E0.s b/asm/non_matchings/unknown_032760/func_800361E0.s index 1b4b3523..d4d9789e 100644 --- a/asm/non_matchings/unknown_032760/func_800361E0.s +++ b/asm/non_matchings/unknown_032760/func_800361E0.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E6028 +.double 1.2 +glabel D_800E6030 +.double 300.0 +glabel D_800E6038 +.double 0.05 +glabel D_800E6040 +.double 0.05 + +.text glabel func_800361E0 /* 036DE0 800361E0 27BDFF80 */ addiu $sp, $sp, -0x80 /* 036DE4 800361E4 44853000 */ mtc1 $a1, $f6 diff --git a/asm/non_matchings/unknown_032760/func_80036C30.s b/asm/non_matchings/unknown_032760/func_80036C30.s index 3f841729..795ea304 100644 --- a/asm/non_matchings/unknown_032760/func_80036C30.s +++ b/asm/non_matchings/unknown_032760/func_80036C30.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6048 +.float 0.01 + +.text glabel func_80036C30 /* 037830 80036C30 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 037834 80036C34 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_800389B8.s b/asm/non_matchings/unknown_032760/func_800389B8.s index de3ae2ad..f33667dc 100644 --- a/asm/non_matchings/unknown_032760/func_800389B8.s +++ b/asm/non_matchings/unknown_032760/func_800389B8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6050 +.double 1.2 + +.text glabel func_800389B8 /* 0395B8 800389B8 44852000 */ mtc1 $a1, $f4 /* 0395BC 800389BC 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80038AD4.s b/asm/non_matchings/unknown_032760/func_80038AD4.s index 33b14047..1e4562ef 100644 --- a/asm/non_matchings/unknown_032760/func_80038AD4.s +++ b/asm/non_matchings/unknown_032760/func_80038AD4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6058 +.double 1.2 + +.text glabel func_80038AD4 /* 0396D4 80038AD4 44852000 */ mtc1 $a1, $f4 /* 0396D8 80038AD8 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80039330.s b/asm/non_matchings/unknown_032760/func_80039330.s index d042346e..a44839ef 100644 --- a/asm/non_matchings/unknown_032760/func_80039330.s +++ b/asm/non_matchings/unknown_032760/func_80039330.s @@ -1,3 +1,24 @@ +.late_rodata +glabel D_800E6060 +.double 1.2 +glabel D_800E6068 +.double 300.0 +glabel jpt_800E6070 +.word L80039758, L80039758, L80039758, L80039758, L80039768, L80039768, L80039758, L80039768, L80039768, L80039758, L80039758, L80039768, L80039768, L80039768, L80039758, L80039768, L80039768, L80039768, L80039768, L80039758, L80039758 +glabel jpt_800E60C4 +.word L800397BC, L80039978, L80039AE0, L80039BB8, L80039DC4, L80039ED8, L80039FDC, L80039FDC, L8003A5AC, L8003A0CC, L8003A1E8, L8003A5AC, L8003A5AC, L8003A5AC, L8003A268, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A3FC, L8003A4F4, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A5AC, L8003A574 +.word 0 # Padding +glabel D_800E6140 +.double 77.0 +glabel D_800E6148 +.float 0.1 +.word 0 # Padding +glabel D_800E6150 +.double 1.1 +glabel D_800E6158 +.double 2.2 + +.text glabel func_80039330 /* 039F30 80039330 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 039F34 80039334 44853000 */ mtc1 $a1, $f6 @@ -280,17 +301,19 @@ glabel func_80039330 /* 03A334 80039734 2DA10015 */ sltiu $at, $t5, 0x15 /* 03A338 80039738 1020000B */ beqz $at, .L80039768 /* 03A33C 8003973C 000D6880 */ sll $t5, $t5, 2 -/* 03A340 80039740 3C01800E */ lui $at, %hi(D_800E6070) # $at, 0x800e +/* 03A340 80039740 3C01800E */ lui $at, %hi(jpt_800E6070) # $at, 0x800e /* 03A344 80039744 002D0821 */ addu $at, $at, $t5 -/* 03A348 80039748 8C2D6070 */ lw $t5, %lo(D_800E6070)($at) +/* 03A348 80039748 8C2D6070 */ lw $t5, %lo(jpt_800E6070)($at) /* 03A34C 8003974C 00000000 */ nop /* 03A350 80039750 01A00008 */ jr $t5 /* 03A354 80039754 00000000 */ nop +glabel L80039758 /* 03A358 80039758 0C01BCE2 */ jal func_8006F388 /* 03A35C 8003975C 24040001 */ li $a0, 1 /* 03A360 80039760 8E020078 */ lw $v0, 0x78($s0) /* 03A364 80039764 24070003 */ li $a3, 3 .L80039768: +glabel L80039768 /* 03A368 80039768 1040000A */ beqz $v0, .L80039794 /* 03A36C 8003976C 244FFFFF */ addiu $t7, $v0, -1 /* 03A370 80039770 8FAE007C */ lw $t6, 0x7c($sp) @@ -307,12 +330,13 @@ glabel func_80039330 /* 03A398 80039798 10200384 */ beqz $at, .L8003A5AC /* 03A39C 8003979C 24030004 */ li $v1, 4 /* 03A3A0 800397A0 000F7880 */ sll $t7, $t7, 2 -/* 03A3A4 800397A4 3C01800E */ lui $at, %hi(D_800E60C4) # $at, 0x800e +/* 03A3A4 800397A4 3C01800E */ lui $at, %hi(jpt_800E60C4) # $at, 0x800e /* 03A3A8 800397A8 002F0821 */ addu $at, $at, $t7 -/* 03A3AC 800397AC 8C2F60C4 */ lw $t7, %lo(D_800E60C4)($at) +/* 03A3AC 800397AC 8C2F60C4 */ lw $t7, %lo(jpt_800E60C4)($at) /* 03A3B0 800397B0 00000000 */ nop /* 03A3B4 800397B4 01E00008 */ jr $t7 /* 03A3B8 800397B8 00000000 */ nop +glabel L800397BC /* 03A3BC 800397BC C7A2009C */ lwc1 $f2, 0x9c($sp) /* 03A3C0 800397C0 3C014059 */ li $at, 0x40590000 # 3.390625 /* 03A3C4 800397C4 44813800 */ mtc1 $at, $f7 @@ -433,6 +457,7 @@ glabel func_80039330 /* 03A56C 8003996C 00000000 */ nop /* 03A570 80039970 10000464 */ b .L8003AB04 /* 03A574 80039974 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039978 /* 03A578 80039978 0C0168F0 */ jal func_8005A3C0 /* 03A57C 8003997C 00000000 */ nop /* 03A580 80039980 C7AE00AC */ lwc1 $f14, 0xac($sp) @@ -528,6 +553,7 @@ glabel func_80039330 /* 03A6D4 80039AD4 00000000 */ nop /* 03A6D8 80039AD8 1000040A */ b .L8003AB04 /* 03A6DC 80039ADC C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039AE0 /* 03A6E0 80039AE0 24190001 */ li $t9, 1 /* 03A6E4 80039AE4 44805000 */ mtc1 $zero, $f10 /* 03A6E8 80039AE8 A219003B */ sb $t9, 0x3b($s0) @@ -587,6 +613,7 @@ glabel func_80039330 /* 03A7AC 80039BAC A60C0000 */ sh $t4, ($s0) /* 03A7B0 80039BB0 100003D4 */ b .L8003AB04 /* 03A7B4 80039BB4 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039BB8 /* 03A7B8 80039BB8 A203003B */ sb $v1, 0x3b($s0) /* 03A7BC 80039BBC C62A0004 */ lwc1 $f10, 4($s1) /* 03A7C0 80039BC0 C7B200AC */ lwc1 $f18, 0xac($sp) @@ -726,6 +753,7 @@ glabel func_80039330 .L80039DBC: /* 03A9BC 80039DBC 10000351 */ b .L8003AB04 /* 03A9C0 80039DC0 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039DC4 /* 03A9C4 80039DC4 240A0005 */ li $t2, 5 /* 03A9C8 80039DC8 0C0168F0 */ jal func_8005A3C0 /* 03A9CC 80039DCC A20A003B */ sb $t2, 0x3b($s0) @@ -799,6 +827,7 @@ glabel func_80039330 .L80039ED0: /* 03AAD0 80039ED0 1000030C */ b .L8003AB04 /* 03AAD4 80039ED4 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039ED8 /* 03AAD8 80039ED8 0C0168F0 */ jal func_8005A3C0 /* 03AADC 80039EDC 00000000 */ nop /* 03AAE0 80039EE0 8FB80090 */ lw $t8, 0x90($sp) @@ -869,6 +898,7 @@ glabel func_80039330 .L80039FD4: /* 03ABD4 80039FD4 100002CB */ b .L8003AB04 /* 03ABD8 80039FD8 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L80039FDC /* 03ABDC 80039FDC C62C0004 */ lwc1 $f12, 4($s1) /* 03ABE0 80039FE0 44800800 */ mtc1 $zero, $f1 /* 03ABE4 80039FE4 44800000 */ mtc1 $zero, $f0 @@ -931,6 +961,7 @@ glabel func_80039330 /* 03ACC0 8003A0C0 8FAB0070 */ lw $t3, 0x70($sp) /* 03ACC4 8003A0C4 1000028E */ b .L8003AB00 /* 03ACC8 8003A0C8 AD620118 */ sw $v0, 0x118($t3) +glabel L8003A0CC /* 03ACCC 8003A0CC 44805000 */ mtc1 $zero, $f10 /* 03ACD0 8003A0D0 A207003B */ sb $a3, 0x3b($s0) /* 03ACD4 8003A0D4 240C00FF */ li $t4, 255 @@ -1005,6 +1036,7 @@ glabel func_80039330 /* 03ADDC 8003A1DC A6090000 */ sh $t1, ($s0) /* 03ADE0 8003A1E0 10000248 */ b .L8003AB04 /* 03ADE4 8003A1E4 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A1E8 /* 03ADE8 8003A1E8 A207003B */ sb $a3, 0x3b($s0) /* 03ADEC 8003A1EC C7A600AC */ lwc1 $f6, 0xac($sp) /* 03ADF0 8003A1F0 C6300004 */ lwc1 $f16, 4($s1) @@ -1039,6 +1071,7 @@ glabel func_80039330 /* 03AE5C 8003A25C AE0F0078 */ sw $t7, 0x78($s0) /* 03AE60 8003A260 10000228 */ b .L8003AB04 /* 03AE64 8003A264 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A268 /* 03AE68 8003A268 44808000 */ mtc1 $zero, $f16 /* 03AE6C 8003A26C A207003B */ sb $a3, 0x3b($s0) /* 03AE70 8003A270 241800FF */ li $t8, 255 @@ -1144,6 +1177,7 @@ glabel func_80039330 /* 03AFF0 8003A3F0 AE0B0078 */ sw $t3, 0x78($s0) /* 03AFF4 8003A3F4 100001C3 */ b .L8003AB04 /* 03AFF8 8003A3F8 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A3FC /* 03AFFC 8003A3FC 44809000 */ mtc1 $zero, $f18 /* 03B000 8003A400 A207003B */ sb $a3, 0x3b($s0) /* 03B004 8003A404 240C00FF */ li $t4, 255 @@ -1210,6 +1244,7 @@ glabel func_80039330 .L8003A4EC: /* 03B0EC 8003A4EC 10000185 */ b .L8003AB04 /* 03B0F0 8003A4F0 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A4F4 /* 03B0F4 8003A4F4 A207003B */ sb $a3, 0x3b($s0) /* 03B0F8 8003A4F8 C7AA00AC */ lwc1 $f10, 0xac($sp) /* 03B0FC 8003A4FC C6240004 */ lwc1 $f4, 4($s1) @@ -1244,6 +1279,7 @@ glabel func_80039330 /* 03B168 8003A568 AE000078 */ sw $zero, 0x78($s0) /* 03B16C 8003A56C 10000165 */ b .L8003AB04 /* 03B170 8003A570 C7B00098 */ lwc1 $f16, 0x98($sp) +glabel L8003A574 /* 03B174 8003A574 8E0F004C */ lw $t7, 0x4c($s0) /* 03B178 8003A578 24180006 */ li $t8, 6 /* 03B17C 8003A57C A5E00014 */ sh $zero, 0x14($t7) @@ -1259,6 +1295,7 @@ glabel func_80039330 /* 03B1A4 8003A5A4 10000156 */ b .L8003AB00 /* 03B1A8 8003A5A8 E62A0004 */ swc1 $f10, 4($s1) .L8003A5AC: +glabel L8003A5AC /* 03B1AC 8003A5AC A200003B */ sb $zero, 0x3b($s0) /* 03B1B0 8003A5B0 44802000 */ mtc1 $zero, $f4 /* 03B1B4 8003A5B4 9228000D */ lbu $t0, 0xd($s1) diff --git a/asm/non_matchings/unknown_032760/func_8003B4BC.s b/asm/non_matchings/unknown_032760/func_8003B4BC.s index 52767314..4ca2c046 100644 --- a/asm/non_matchings/unknown_032760/func_8003B4BC.s +++ b/asm/non_matchings/unknown_032760/func_8003B4BC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6160 +.double 1.2 + +.text glabel func_8003B4BC /* 03C0BC 8003B4BC 44852000 */ mtc1 $a1, $f4 /* 03C0C0 8003B4C0 27BDFFB0 */ addiu $sp, $sp, -0x50 diff --git a/asm/non_matchings/unknown_032760/func_8003B988.s b/asm/non_matchings/unknown_032760/func_8003B988.s index 12f0c521..3fe49df6 100644 --- a/asm/non_matchings/unknown_032760/func_8003B988.s +++ b/asm/non_matchings/unknown_032760/func_8003B988.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6168 +.double 1.2 +glabel D_800E6170 +.double 130.0 + +.text glabel func_8003B988 /* 03C588 8003B988 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 03C58C 8003B98C 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_8003CA68.s b/asm/non_matchings/unknown_032760/func_8003CA68.s index 53c5e200..7204ae6d 100644 --- a/asm/non_matchings/unknown_032760/func_8003CA68.s +++ b/asm/non_matchings/unknown_032760/func_8003CA68.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6178 +.double 1.2 + +.text glabel func_8003CA68 /* 03D668 8003CA68 27BDFF90 */ addiu $sp, $sp, -0x70 /* 03D66C 8003CA6C 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_032760/func_8003D058.s b/asm/non_matchings/unknown_032760/func_8003D058.s index 85848c8c..cccee6a1 100644 --- a/asm/non_matchings/unknown_032760/func_8003D058.s +++ b/asm/non_matchings/unknown_032760/func_8003D058.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6180 +.float 50625.0 + +.text glabel func_8003D058 /* 03DC58 8003D058 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 03DC5C 8003D05C AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D2B8.s b/asm/non_matchings/unknown_032760/func_8003D2B8.s index 539890a0..cbc7533b 100644 --- a/asm/non_matchings/unknown_032760/func_8003D2B8.s +++ b/asm/non_matchings/unknown_032760/func_8003D2B8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6188 +.double 1.2 + +.text glabel func_8003D2B8 /* 03DEB8 8003D2B8 44852000 */ mtc1 $a1, $f4 /* 03DEBC 8003D2BC 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003D5A0.s b/asm/non_matchings/unknown_032760/func_8003D5A0.s index c89376bd..108cf425 100644 --- a/asm/non_matchings/unknown_032760/func_8003D5A0.s +++ b/asm/non_matchings/unknown_032760/func_8003D5A0.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E6190 +.double 1.2 +glabel D_800E6198 +.double 0.95 +glabel D_800E61A0 +.float -10000.0 + +.text glabel func_8003D5A0 /* 03E1A0 8003D5A0 44852000 */ mtc1 $a1, $f4 /* 03E1A4 8003D5A4 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003E140.s b/asm/non_matchings/unknown_032760/func_8003E140.s index c071cd5c..043f429c 100644 --- a/asm/non_matchings/unknown_032760/func_8003E140.s +++ b/asm/non_matchings/unknown_032760/func_8003E140.s @@ -1,3 +1,13 @@ +.late_rodata +glabel D_800E61A8 +.double 0.001 +glabel D_800E61B0 +.float 0.001 +.word 0 # Padding +glabel D_800E61B8 +.double 0.1 + +.text glabel func_8003E140 /* 03ED40 8003E140 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 03ED44 8003E144 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003E630.s b/asm/non_matchings/unknown_032760/func_8003E630.s index a686c27c..41cf28a5 100644 --- a/asm/non_matchings/unknown_032760/func_8003E630.s +++ b/asm/non_matchings/unknown_032760/func_8003E630.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E61C0 +.word L8003E66C, L8003E66C, L8003E67C, L8003E67C, L8003E684, L8003E684, L8003E684, L8003E684, L8003E684, L8003E684, L8003E67C, L8003E67C + +.text glabel func_8003E630 /* 03F230 8003E630 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 03F234 8003E634 AFBF0014 */ sw $ra, 0x14($sp) @@ -8,19 +13,22 @@ glabel func_8003E630 /* 03F248 8003E648 2DC1000C */ sltiu $at, $t6, 0xc /* 03F24C 8003E64C 1020000D */ beqz $at, .L8003E684 /* 03F250 8003E650 000E7080 */ sll $t6, $t6, 2 -/* 03F254 8003E654 3C01800E */ lui $at, %hi(D_800E61C0) # $at, 0x800e +/* 03F254 8003E654 3C01800E */ lui $at, %hi(jpt_800E61C0) # $at, 0x800e /* 03F258 8003E658 002E0821 */ addu $at, $at, $t6 -/* 03F25C 8003E65C 8C2E61C0 */ lw $t6, %lo(D_800E61C0)($at) +/* 03F25C 8003E65C 8C2E61C0 */ lw $t6, %lo(jpt_800E61C0)($at) /* 03F260 8003E660 00000000 */ nop /* 03F264 8003E664 01C00008 */ jr $t6 /* 03F268 8003E668 00000000 */ nop +glabel L8003E66C /* 03F26C 8003E66C 0C00F9A5 */ jal func_8003E694 /* 03F270 8003E670 00000000 */ nop /* 03F274 8003E674 10000004 */ b .L8003E688 /* 03F278 8003E678 8FBF0014 */ lw $ra, 0x14($sp) +glabel L8003E67C /* 03F27C 8003E67C 0C00FCBA */ jal func_8003F2E8 /* 03F280 8003E680 00000000 */ nop .L8003E684: +glabel L8003E684 /* 03F284 8003E684 8FBF0014 */ lw $ra, 0x14($sp) .L8003E688: /* 03F288 8003E688 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_032760/func_8003E694.s b/asm/non_matchings/unknown_032760/func_8003E694.s index 91817585..87bd5787 100644 --- a/asm/non_matchings/unknown_032760/func_8003E694.s +++ b/asm/non_matchings/unknown_032760/func_8003E694.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E61F0 +.double 1.2 + +.text glabel func_8003E694 /* 03F294 8003E694 27BDFF18 */ addiu $sp, $sp, -0xe8 /* 03F298 8003E698 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003EDD8.s b/asm/non_matchings/unknown_032760/func_8003EDD8.s index e28f1ffd..08e1871b 100644 --- a/asm/non_matchings/unknown_032760/func_8003EDD8.s +++ b/asm/non_matchings/unknown_032760/func_8003EDD8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E61F8 +.double 10000.0 + +.text glabel func_8003EDD8 /* 03F9D8 8003EDD8 27BDFF88 */ addiu $sp, $sp, -0x78 /* 03F9DC 8003EDDC AFBF0034 */ sw $ra, 0x34($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003F2E8.s b/asm/non_matchings/unknown_032760/func_8003F2E8.s index 3b307b61..a54a1930 100644 --- a/asm/non_matchings/unknown_032760/func_8003F2E8.s +++ b/asm/non_matchings/unknown_032760/func_8003F2E8.s @@ -1,3 +1,16 @@ +.late_rodata +glabel D_800E6200 +.double 1.2 +glabel D_800E6208 +.float -10000.0 +glabel D_800E620C +.float 0.6 +glabel D_800E6210 +.float 0.6 +glabel D_800E6214 +.float 0.075 + +.text glabel func_8003F2E8 /* 03FEE8 8003F2E8 27BDFF90 */ addiu $sp, $sp, -0x70 /* 03FEEC 8003F2EC AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_800409C8.s b/asm/non_matchings/unknown_032760/func_800409C8.s index 7a1c1c7f..a50b41c4 100644 --- a/asm/non_matchings/unknown_032760/func_800409C8.s +++ b/asm/non_matchings/unknown_032760/func_800409C8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6218 +.float 0.01 + +.text glabel func_800409C8 /* 0415C8 800409C8 AFA50004 */ sw $a1, 4($sp) /* 0415CC 800409CC 8C820064 */ lw $v0, 0x64($a0) diff --git a/asm/non_matchings/unknown_032760/func_80040C54.s b/asm/non_matchings/unknown_032760/func_80040C54.s index 121ccd18..288c77aa 100644 --- a/asm/non_matchings/unknown_032760/func_80040C54.s +++ b/asm/non_matchings/unknown_032760/func_80040C54.s @@ -1,3 +1,22 @@ +.late_rodata +glabel D_800E621C +.float 0.1 +glabel D_800E6220 +.float 1.6 +glabel D_800E6224 +.float 1.6 +glabel jpt_800E6228 +.word L80040D30, L80040E54, L80040E54, L800411E4, L8004153C +glabel D_800E623C +.float 22500.0 +glabel D_800E6240 +.float 1.2 +glabel D_800E6244 +.float 1.6 +glabel D_800E6248 +.float 1.6 + +.text glabel func_80040C54 /* 041854 80040C54 27BDFF68 */ addiu $sp, $sp, -0x98 /* 041858 80040C58 AFBF0024 */ sw $ra, 0x24($sp) @@ -51,12 +70,13 @@ glabel func_80040C54 /* 04190C 80040D0C 2C410005 */ sltiu $at, $v0, 5 /* 041910 80040D10 102002C9 */ beqz $at, .L80041838 /* 041914 80040D14 0002C880 */ sll $t9, $v0, 2 -/* 041918 80040D18 3C01800E */ lui $at, %hi(D_800E6228) # $at, 0x800e +/* 041918 80040D18 3C01800E */ lui $at, %hi(jpt_800E6228) # $at, 0x800e /* 04191C 80040D1C 00390821 */ addu $at, $at, $t9 -/* 041920 80040D20 8C396228 */ lw $t9, %lo(D_800E6228)($at) +/* 041920 80040D20 8C396228 */ lw $t9, %lo(jpt_800E6228)($at) /* 041924 80040D24 00000000 */ nop /* 041928 80040D28 03200008 */ jr $t9 /* 04192C 80040D2C 00000000 */ nop +glabel L80040D30 /* 041930 80040D30 44807000 */ mtc1 $zero, $f14 /* 041934 80040D34 240E0001 */ li $t6, 1 /* 041938 80040D38 E50E0108 */ swc1 $f14, 0x108($t0) @@ -134,6 +154,7 @@ glabel func_80040C54 /* 041A48 80040E48 910200FD */ lbu $v0, 0xfd($t0) /* 041A4C 80040E4C 1000027A */ b .L80041838 /* 041A50 80040E50 00000000 */ nop +glabel L80040E54 /* 041A54 80040E54 28610480 */ slti $at, $v1, 0x480 /* 041A58 80040E58 1020000C */ beqz $at, .L80040E8C /* 041A5C 80040E5C 00000000 */ nop @@ -374,6 +395,7 @@ glabel func_80040C54 /* 041DD8 800411D8 910200FD */ lbu $v0, 0xfd($t0) /* 041DDC 800411DC 10000196 */ b .L80041838 /* 041DE0 800411E0 00000000 */ nop +glabel L800411E4 /* 041DE4 800411E4 28610480 */ slti $at, $v1, 0x480 /* 041DE8 800411E8 1020000C */ beqz $at, .L8004121C /* 041DEC 800411EC 00000000 */ nop @@ -600,6 +622,7 @@ glabel func_80040C54 /* 042130 80041530 910200FD */ lbu $v0, 0xfd($t0) /* 042134 80041534 100000C0 */ b .L80041838 /* 042138 80041538 00000000 */ nop +glabel L8004153C /* 04213C 8004153C 28610181 */ slti $at, $v1, 0x181 /* 042140 80041540 1420000C */ bnez $at, .L80041574 /* 042144 80041544 00000000 */ nop diff --git a/asm/non_matchings/unknown_032760/func_800422F0.s b/asm/non_matchings/unknown_032760/func_800422F0.s index deb0f56c..ef6064ee 100644 --- a/asm/non_matchings/unknown_032760/func_800422F0.s +++ b/asm/non_matchings/unknown_032760/func_800422F0.s @@ -1,3 +1,18 @@ +.late_rodata +glabel D_800E6250 +.double 1.2 +glabel jpt_800E6258 +.word L80042378, L800426B8, L80042898, L800428E8, L8004292C +glabel D_800E626C +.float 1.34 +glabel D_800E6270 +.float 0.05 +glabel D_800E6274 +.float 0.15 +glabel D_800E6278 +.float 0.15 + +.text glabel func_800422F0 /* 042EF0 800422F0 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 042EF4 800422F4 44852000 */ mtc1 $a1, $f4 @@ -28,12 +43,13 @@ glabel func_800422F0 /* 042F54 80042354 2DE10005 */ sltiu $at, $t7, 5 /* 042F58 80042358 10200186 */ beqz $at, .L80042974 /* 042F5C 8004235C 000F7880 */ sll $t7, $t7, 2 -/* 042F60 80042360 3C01800E */ lui $at, %hi(D_800E6258) # $at, 0x800e +/* 042F60 80042360 3C01800E */ lui $at, %hi(jpt_800E6258) # $at, 0x800e /* 042F64 80042364 002F0821 */ addu $at, $at, $t7 -/* 042F68 80042368 8C2F6258 */ lw $t7, %lo(D_800E6258)($at) +/* 042F68 80042368 8C2F6258 */ lw $t7, %lo(jpt_800E6258)($at) /* 042F6C 8004236C 00000000 */ nop /* 042F70 80042370 01E00008 */ jr $t7 /* 042F74 80042374 00000000 */ nop +glabel L80042378 /* 042F78 80042378 AFA00104 */ sw $zero, 0x104($sp) /* 042F7C 8004237C 82020019 */ lb $v0, 0x19($s0) /* 042F80 80042380 3C0742C0 */ lui $a3, 0x42c0 @@ -256,6 +272,7 @@ glabel func_800422F0 /* 0432AC 800426AC E6060024 */ swc1 $f6, 0x24($s0) /* 0432B0 800426B0 100000B0 */ b .L80042974 /* 0432B4 800426B4 A62D0000 */ sh $t5, ($s1) +glabel L800426B8 /* 0432B8 800426B8 820E0018 */ lb $t6, 0x18($s0) /* 0432BC 800426BC 82020019 */ lb $v0, 0x19($s0) /* 0432C0 800426C0 01C57823 */ subu $t7, $t6, $a1 @@ -381,6 +398,7 @@ glabel func_800422F0 /* 04348C 8004288C AFA00014 */ sw $zero, 0x14($sp) /* 043490 80042890 10000039 */ b .L80042978 /* 043494 80042894 8FBF0034 */ lw $ra, 0x34($sp) +glabel L80042898 /* 043498 80042898 3C01800E */ lui $at, %hi(D_800E6270) # $at, 0x800e /* 04349C 8004289C C4206270 */ lwc1 $f0, %lo(D_800E6270)($at) /* 0434A0 800428A0 3C01800E */ lui $at, %hi(D_800E6274) # $at, 0x800e @@ -401,6 +419,7 @@ glabel func_800422F0 /* 0434DC 800428DC A20A0014 */ sb $t2, 0x14($s0) /* 0434E0 800428E0 10000024 */ b .L80042974 /* 0434E4 800428E4 A60B0016 */ sh $t3, 0x16($s0) +glabel L800428E8 /* 0434E8 800428E8 860C0016 */ lh $t4, 0x16($s0) /* 0434EC 800428EC 240F0004 */ li $t7, 4 /* 0434F0 800428F0 01856823 */ subu $t5, $t4, $a1 @@ -418,6 +437,7 @@ glabel func_800422F0 /* 043520 80042920 AFB80010 */ sw $t8, 0x10($sp) /* 043524 80042924 10000014 */ b .L80042978 /* 043528 80042928 8FBF0034 */ lw $ra, 0x34($sp) +glabel L8004292C /* 04352C 8004292C 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 043530 80042930 44816000 */ mtc1 $at, $f12 /* 043534 80042934 C6000030 */ lwc1 $f0, 0x30($s0) diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 2b9d05b3..3f8d3ddc 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -125,106 +125,6 @@ const char D_800E5FA0[] = "Illegal door no!!!\n"; const char D_800E5FB4[] = "Illegal door no!!!\n"; const char D_800E5FC8[] = "Illegal door no!!!\n"; -const DoubleLiteral D_800E5FE0 = { 1.2 }; -const DoubleLiteral D_800E5FE8 = { 0.1 }; -const DoubleLiteral D_800E5FF0 = { 0.9 }; -const DoubleLiteral D_800E5FF8 = { 1.2 }; -const FloatLiteral D_800E6000 = { 0.2f }; -const FloatLiteral D_800E6004 = { 0.612f }; -const FloatLiteral D_800E6008 = { 0.552f }; -const DoubleLiteral D_800E6010 = { 1.2 }; -const DoubleLiteral D_800E6018 = { 0.98 }; -const DoubleLiteral D_800E6020 = { 0.95 }; -const DoubleLiteral D_800E6028 = { 1.2 }; -const DoubleLiteral D_800E6030 = { 300.0 }; -const DoubleLiteral D_800E6038 = { 0.05 }; -const DoubleLiteral D_800E6040 = { 0.05 }; -const FloatLiteral D_800E6048 = { 0.01f }; -const DoubleLiteral D_800E6050 = { 1.2 }; -const DoubleLiteral D_800E6058 = { 1.2 }; -const DoubleLiteral D_800E6060 = { 1.2 }; -const DoubleLiteral D_800E6068 = { 300.0 }; - -// Jump table in func_80039330 -const u32 D_800E6070[] = { - 0x80039758, 0x80039758, 0x80039758, 0x80039758, - 0x80039768, 0x80039768, 0x80039758, 0x80039768, - 0x80039768, 0x80039758, 0x80039758, 0x80039768, - 0x80039768, 0x80039768, 0x80039758, 0x80039768, - 0x80039768, 0x80039768, 0x80039768, 0x80039758, - 0x80039758 -}; - -// Jump table in func_80039330 -const u32 D_800E60C4[] = { - 0x800397BC, 0x80039978, 0x80039AE0, 0x80039BB8, - 0x80039DC4, 0x80039ED8, 0x80039FDC, 0x80039FDC, - 0x8003A5AC, 0x8003A0CC, 0x8003A1E8, 0x8003A5AC, - 0x8003A5AC, 0x8003A5AC, 0x8003A268, 0x8003A5AC, - 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, 0x8003A3FC, - 0x8003A4F4, 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, - 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, 0x8003A5AC, - 0x8003A5AC, 0x8003A574 -}; - -const DoubleLiteral D_800E6140 = { 77.0 }; -const FloatLiteral D_800E6148 = { 0.1f }; -const DoubleLiteral D_800E6150 = { 1.1 }; -const DoubleLiteral D_800E6158 = { 2.2 }; -const DoubleLiteral D_800E6160 = { 1.2 }; -const DoubleLiteral D_800E6168 = { 1.2 }; -const DoubleLiteral D_800E6170 = { 130.0 }; -const DoubleLiteral D_800E6178 = { 1.2 }; -const FloatLiteral D_800E6180 = { 50625.0f }; -const DoubleLiteral D_800E6188 = { 1.2 }; -const DoubleLiteral D_800E6190 = { 1.2 }; -const DoubleLiteral D_800E6198 = { 0.95 }; -const FloatLiteral D_800E61A0 = { -10000.0f }; -const DoubleLiteral D_800E61A8 = { 0.001 }; -const FloatLiteral D_800E61B0 = { 0.001f }; -const DoubleLiteral D_800E61B8 = { 0.1 }; - -// Jump table in func_8003E630 -const u32 D_800E61C0[] = { - 0x8003E66C, 0x8003E66C, 0x8003E67C, 0x8003E67C, - 0x8003E684, 0x8003E684, 0x8003E684, 0x8003E684, - 0x8003E684, 0x8003E684, 0x8003E67C, 0x8003E67C -}; - -const DoubleLiteral D_800E61F0 = { 1.2 }; -const DoubleLiteral D_800E61F8 = { 10000.0 }; -const DoubleLiteral D_800E6200 = { 1.2 }; -const FloatLiteral D_800E6208 = { -10000.0f }; -const FloatLiteral D_800E620C = { 0.6f }; -const FloatLiteral D_800E6210 = { 0.6f }; -const FloatLiteral D_800E6214 = { 0.075f }; -const FloatLiteral D_800E6218 = { 0.01f }; -const FloatLiteral D_800E621C = { 0.1f }; -const FloatLiteral D_800E6220 = { 1.6f }; -const FloatLiteral D_800E6224 = { 1.6f }; - -// Jump table in func_80040C54 -const u32 D_800E6228[] = { - 0x80040D30, 0x80040E54, 0x80040E54, 0x800411E4, - 0x8004153C -}; - -const FloatLiteral D_800E623C = { 22500.0f }; -const FloatLiteral D_800E6240 = { 1.2f }; -const FloatLiteral D_800E6244 = { 1.6f }; -const FloatLiteral D_800E6248 = { 1.6f }; -const DoubleLiteral D_800E6250 = { 1.2 }; - -// Jump table in func_800422F0 -const u32 D_800E6258[] = { - 0x80042378, 0x800426B8, 0x80042898, 0x800428E8, - 0x8004292C -}; - -const FloatLiteral D_800E626C = { 1.34f }; -const FloatLiteral D_800E6270 = { 0.05f }; -const FloatLiteral D_800E6274 = { 0.15f }; -const FloatLiteral D_800E6278 = { 0.15f }; /*********************************/ From 7cf167f8093e6a5e1124c3466efe4d407b665842 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 18:17:42 -0500 Subject: [PATCH 34/66] Fixed string literals in rodata_move --- .../unknown_032760/func_8003B368.s | 5 ++ .../unknown_032760/func_8003B7CC.s | 5 ++ .../unknown_032760/func_8003C644.s | 5 ++ src/unknown_032760.c | 10 +--- tools/python/rodata_move.py | 57 +++++++++++-------- 5 files changed, 50 insertions(+), 32 deletions(-) diff --git a/asm/non_matchings/unknown_032760/func_8003B368.s b/asm/non_matchings/unknown_032760/func_8003B368.s index 3024ad1c..0c54edd2 100644 --- a/asm/non_matchings/unknown_032760/func_8003B368.s +++ b/asm/non_matchings/unknown_032760/func_8003B368.s @@ -1,3 +1,8 @@ +.rdata +glabel D_800E5FA0 +.asciz "Illegal door no!!!\n" + +.text glabel func_8003B368 /* 03BF68 8003B368 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 03BF6C 8003B36C AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003B7CC.s b/asm/non_matchings/unknown_032760/func_8003B7CC.s index 44a1e1d2..d71d3ac2 100644 --- a/asm/non_matchings/unknown_032760/func_8003B7CC.s +++ b/asm/non_matchings/unknown_032760/func_8003B7CC.s @@ -1,3 +1,8 @@ +.rdata +glabel D_800E5FB4 +.asciz "Illegal door no!!!\n" + +.text glabel func_8003B7CC /* 03C3CC 8003B7CC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03C3D0 8003B7D0 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003C644.s b/asm/non_matchings/unknown_032760/func_8003C644.s index 90612073..ddda579e 100644 --- a/asm/non_matchings/unknown_032760/func_8003C644.s +++ b/asm/non_matchings/unknown_032760/func_8003C644.s @@ -1,3 +1,8 @@ +.rdata +glabel D_800E5FC8 +.asciz "Illegal door no!!!\n" + +.text glabel func_8003C644 /* 03D244 8003C644 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03D248 8003C648 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 3f8d3ddc..e636a69b 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -116,14 +116,8 @@ const u32 D_800E5F80[] = { 0x80033BB4 }; -// Not sure if these are actually strings. Might just be padding. -const char D_800E5F94[] = ""; -const char D_800E5F98[] = ""; -const char D_800E5F9C[] = ""; - -const char D_800E5FA0[] = "Illegal door no!!!\n"; -const char D_800E5FB4[] = "Illegal door no!!!\n"; -const char D_800E5FC8[] = "Illegal door no!!!\n"; +// File boundary padding +const s32 padding[] = { 0, 0, 0 }; /*********************************/ diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index a2dfb749..51421cb0 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -57,12 +57,16 @@ def adjustAsmFile(asmFilepath, refs): raise Exception('Cannot add to file "' + asmFilepath + '" since it already has .late_rodata in it!') asmLines = asmFile.split('\n') replaces = [] - cur = 0 - asmLines.insert(cur, '.late_rodata'); cur += 1 + + rodata = '' + lateRodata = '' + for index, ref in enumerate(refs): - asmLines.insert(cur, 'glabel ' + ref[1]); cur += 1 - if ref[0] == 'double' or ref[0] == 'float' or ref[0] == 'asciz': - asmLines.insert(cur, '.' + ref[0] + ' ' + ref[2]); cur += 1 + if ref[0] == 'asciz': + rodata += 'glabel ' + ref[1] + '\n' + rodata += '.' + ref[0] + ' ' + ref[2] + '\n' + elif ref[0] == 'double' or ref[0] == 'float': + lateRodata += '.' + ref[0] + ' ' + ref[2] + '\n' elif ref[0] == 'table': replaces.append((ref[1], 'jpt' + ref[1][1:])) tblWords = '.word L' + ref[2][0] @@ -80,7 +84,7 @@ def adjustAsmFile(asmFilepath, refs): asmLines.insert(i, 'glabel L' + word) break doneWords.append(word) - asmLines.insert(cur, tblWords); cur += 1 + lateRodata += tblWords + '\n' if index < len(refs) - 1 and ref[0] != 'double' and refs[index + 1][0] == 'double': addPadding = False if ref[0] == 'float': @@ -92,9 +96,13 @@ def adjustAsmFile(asmFilepath, refs): else: addPadding = tableSizeAlignment == 0 or tableSizeAlignment == 2 if addPadding: - asmLines.insert(cur, '.word 0 # Padding'); cur += 1 # Insert padding before the next double. - asmLines.insert(cur, ''); cur += 1 - asmLines.insert(cur, '.text'); cur += 1 + lateRodata += '.word 0 # Padding\n' # Insert padding before the next double. + outData = '' + if len(rodata) > 0: + outData += '.rdata\n' + rodata + '\n' + if len(lateRodata) > 0: + outData += '.late_rodata\n' + lateRodata + '\n' + asmLines.insert(0, outData + '.text'); asmOut = '\n'.join(asmLines) for rep in replaces: asmOut = asmOut.replace(rep[0], rep[1]) @@ -128,20 +136,20 @@ def convertFile(cFilepath): if lineType == 0: pass elif lineType == 1: # Literal string - # try: - # strMatch = getMatches(line, C_STRING_REGEX)[0] - # strLabel = strMatch[1][0] - # strValue = strMatch[1][1] - # # Check if the string has a reference somewhere - # getAsmFileReferenceForLabel(filename, strLabel) - # hasProcessed = True - # bottomLine = curLine - # asmData.insert(0, ('asciz', strLabel, strValue, bottomLine)) - # except: - print('Currently cannot process literal string: ') - print(line) - stoppedPremature = True - break + try: + strMatch = getMatches(line, C_STRING_REGEX)[0] + strLabel = strMatch[1][0] + strValue = strMatch[1][1] + # Check if the string has a reference somewhere + getAsmFileReferenceForLabel(filename, strLabel) + hasProcessed = True + bottomLine = curLine + asmData.insert(0, ('asciz', strLabel, strValue, bottomLine)) + except: + print('Currently cannot process literal string: ') + print(line) + stoppedPremature = True + break elif lineType == 2: # Literal float floatMatch = getMatches(line, C_FLOAT_REGEX)[0] floatLabel = floatMatch[1][0] @@ -205,8 +213,9 @@ def convertFile(cFilepath): for ref in asmRefs[asmFilepath]: asmBottomLine = min(asmBottomLine, ref[3]) if ONLY_THE_FIRST_ASM_FILE: - # print(bottomLine, asmBottomLine) + print(bottomLine, asmBottomLine) bottomLine = asmBottomLine + stoppedPremature = True break # print(asmRefs) if hasProcessed and not NO_OUTPUT: From 75276c51f6dafd0e0490e987e8d7be6a3d6dfed4 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 18:37:06 -0500 Subject: [PATCH 35/66] Split unknown_032760 into unknown_0348C0. Finished moving rodata in both files. --- .../unknown_032760/func_80033A14.s | 14 +- src/unknown_032760.c | 922 ------------------ src/unknown_0348C0.c | 917 +++++++++++++++++ tools/python/rodata_move.py | 2 + 4 files changed, 931 insertions(+), 924 deletions(-) create mode 100644 src/unknown_0348C0.c diff --git a/asm/non_matchings/unknown_032760/func_80033A14.s b/asm/non_matchings/unknown_032760/func_80033A14.s index fd89e253..ee3e0fac 100644 --- a/asm/non_matchings/unknown_032760/func_80033A14.s +++ b/asm/non_matchings/unknown_032760/func_80033A14.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E5F80 +.word L80033A70, L80033AA4, L80033AE4, L80033B48, L80033BB4 + +.text glabel func_80033A14 /* 034614 80033A14 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 034618 80033A18 AFBF0024 */ sw $ra, 0x24($sp) @@ -16,12 +21,13 @@ glabel func_80033A14 /* 03464C 80033A4C 10200067 */ beqz $at, .L80033BEC /* 034650 80033A50 46083503 */ div.s $f20, $f6, $f8 /* 034654 80033A54 0018C080 */ sll $t8, $t8, 2 -/* 034658 80033A58 3C01800E */ lui $at, %hi(D_800E5F80) # $at, 0x800e +/* 034658 80033A58 3C01800E */ lui $at, %hi(jpt_800E5F80) # $at, 0x800e /* 03465C 80033A5C 00380821 */ addu $at, $at, $t8 -/* 034660 80033A60 8C385F80 */ lw $t8, %lo(D_800E5F80)($at) +/* 034660 80033A60 8C385F80 */ lw $t8, %lo(jpt_800E5F80)($at) /* 034664 80033A64 00000000 */ nop /* 034668 80033A68 03000008 */ jr $t8 /* 03466C 80033A6C 00000000 */ nop +glabel L80033A70 /* 034670 80033A70 3C018012 */ lui $at, %hi(D_8011D4C0) # $at, 0x8012 /* 034674 80033A74 C42CD4C0 */ lwc1 $f12, %lo(D_8011D4C0)($at) /* 034678 80033A78 0C0326B4 */ jal sqrtf @@ -35,6 +41,7 @@ glabel func_80033A14 /* 034698 80033A98 4602A502 */ mul.s $f20, $f20, $f2 /* 03469C 80033A9C 10000054 */ b .L80033BF0 /* 0346A0 80033AA0 8FBF0024 */ lw $ra, 0x24($sp) +glabel L80033AA4 /* 0346A4 80033AA4 3C018012 */ lui $at, %hi(D_8011D4C0) # $at, 0x8012 /* 0346A8 80033AA8 C42CD4C0 */ lwc1 $f12, %lo(D_8011D4C0)($at) /* 0346AC 80033AAC 0C0326B4 */ jal sqrtf @@ -51,6 +58,7 @@ glabel func_80033A14 /* 0346D8 80033AD8 4608A502 */ mul.s $f20, $f20, $f8 /* 0346DC 80033ADC 10000044 */ b .L80033BF0 /* 0346E0 80033AE0 8FBF0024 */ lw $ra, 0x24($sp) +glabel L80033AE4 /* 0346E4 80033AE4 3C018012 */ lui $at, %hi(D_8011D4C0) # $at, 0x8012 /* 0346E8 80033AE8 C42CD4C0 */ lwc1 $f12, %lo(D_8011D4C0)($at) /* 0346EC 80033AEC 0C0326B4 */ jal sqrtf @@ -76,6 +84,7 @@ glabel func_80033A14 /* 03473C 80033B3C 4600A502 */ mul.s $f20, $f20, $f0 /* 034740 80033B40 1000002B */ b .L80033BF0 /* 034744 80033B44 8FBF0024 */ lw $ra, 0x24($sp) +glabel L80033B48 /* 034748 80033B48 3C018012 */ lui $at, %hi(D_8011D4C0) # $at, 0x8012 /* 03474C 80033B4C C42CD4C0 */ lwc1 $f12, %lo(D_8011D4C0)($at) /* 034750 80033B50 0C0326B4 */ jal sqrtf @@ -103,6 +112,7 @@ glabel func_80033A14 /* 0347A8 80033BA8 4606A502 */ mul.s $f20, $f20, $f6 /* 0347AC 80033BAC 1000000F */ b .L80033BEC /* 0347B0 80033BB0 00000000 */ nop +glabel L80033BB4 /* 0347B4 80033BB4 3C018012 */ lui $at, %hi(D_8011D4C0) # $at, 0x8012 /* 0347B8 80033BB8 C42CD4C0 */ lwc1 $f12, %lo(D_8011D4C0)($at) /* 0347BC 80033BBC 0C0326B4 */ jal sqrtf diff --git a/src/unknown_032760.c b/src/unknown_032760.c index e636a69b..41d60444 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -14,128 +14,9 @@ s32 D_800DC95C = 0; s32 D_800DC960 = 0; s32 D_800DC964 = 0; s32 D_800DC968 = 0; // Currently unknown, might be a different type. -s32 D_800DC96C = 0; // Currently unknown, might be a different type. - -// Unsure about the signed/unsigned with these arrays. -u16 D_800DC970[4] = { - 0x40FF, 0xFFFF, 0x0007, 0x0003 -}; -u16 D_800DC978[4] = { - 0x0000, 0x0000, 0x001E, 0xFFFF -}; -u16 D_800DC980[20] = { - 0xFF00, 0x0100, 0x0000, 0xFFFF, - 0xFFFF, 0x0100, 0x0100, 0x0000, - 0xFFFF, 0xFFFF, 0x0100, 0xFF00, - 0x0000, 0xFFFF, 0xFFFF, 0xFF00, - 0xFF00, 0x0000, 0xFFFF, 0xFFFF -}; -u16 D_800DC9A8[20] = { - 0x0000, 0x0040, 0xFFC0, 0x0000, - 0xFFC0, 0xFFC0, 0x0000, 0x0040, - 0x0020, 0x0000, 0xFFC0, 0x0020, - 0x0000, 0x0040, 0x0040, 0x0000, - 0xFFC0, 0x0040, 0x0000, 0x0000 -}; -u16 D_800DC9D0[64] = { - 0x0000, 0x0301, 0x0004, 0x0000, - 0x0001, 0x0004, 0x0004, 0x0004, - 0x0000, 0x0203, 0x0004, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0004, - 0x0002, 0x0503, 0x0001, 0x0000, - 0x0000, 0x0004, 0x0001, 0x0004, - 0x0002, 0x0405, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0004, - 0x0000, 0x0103, 0x0004, 0x0000, - 0x0004, 0x0004, 0x0001, 0x0004, - 0x0000, 0x0302, 0x0004, 0x0000, - 0x0001, 0x0004, 0x0001, 0x0000, - 0x0002, 0x0305, 0x0001, 0x0000, - 0x0001, 0x0004, 0x0000, 0x0004, - 0x0002, 0x0504, 0x0001, 0x0000, - 0x0000, 0x0004, 0x0000, 0x0000 -}; -s8 D_800DCA50[8] = { - 2, 5, 6, 3, 10, 8, 7, 9 -}; -u8 D_800DCA58[9] = { - 2, 5, 6, 3, 10, 8, 7, 9, 11 -}; -s8 D_800DCA64[9] = { - 2, 5, 6, 3, 10, 8, 7, 9, 12 -}; -s8 D_800DCA70[10] = { - 2, 5, 6, 3, 10, 8, 7, 9, 11, 12 -}; -s32 D_800DCA7C[3] = { // Not sure about typing - 0, 0, 0 -}; -s32 D_800DCA88[3] = { // Not sure about typing - 0, 0, 0 -}; -s8 D_800DCA94[16] = { - 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00 -}; -s8 D_800DCA9C[4] = { - 0x00, 0x00, 0x00, 0x00 -}; -u16 D_800DCAA8[64] = { - 0x0000, 0x0301, 0x0000, 0x0000, - 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, - 0x0000, 0x0203, 0x0000, 0x0000, - 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, - 0x0002, 0x0503, 0xFFFF, 0x0000, - 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, - 0x0002, 0x0405, 0xFFFF, 0x0000, - 0x0000, 0x0000, 0x0000, 0xFFFF, - 0x0000, 0x0103, 0x0000, 0x0000, - 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, - 0x0000, 0x0302, 0x0000, 0x0000, - 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, - 0x0002, 0x0305, 0xFFFF, 0x0000, - 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, - 0x0002, 0x0504, 0xFFFF, 0x0000, - 0x0000, 0xFFFF, 0x0000, 0x0000 -}; -u16 D_800DCB28[20] = { - 0xFFC0, 0x0000, 0x0020, 0xFFC0, - 0x0000, 0xFFE0, 0x0000, 0x0000, - 0x0020, 0x0000, 0x0000, 0xFFE0, - 0x0040, 0x0000, 0x0020, 0x0040, - 0x0000, 0xFFE0, 0x0000, 0x0000 -}; /*******************************/ -/************ .rodata ************/ - -// Jump table in func_80033A14 -const u32 D_800E5F80[] = { - 0x80033A70, 0x80033AA4, 0x80033AE4, 0x80033B48, - 0x80033BB4 -}; - -// File boundary padding -const s32 padding[] = { 0, 0, 0 }; - - -/*********************************/ - -/************ .bss ************/ - -extern f32 D_8011D4D0; -extern s32 D_8011D4D4; -extern s32 D_8011D4D8; -extern s32 D_8011D4DC; -extern s16 D_8011D4E2; - -/******************************/ - -Settings* get_settings(); -Player_64 *func_800BE654(s16, f32, f32); -void func_80000FDC(s32, s32, f32); - void func_80031B60(void) { if (D_800DC950 != 0) { func_80071140(D_800DC950); @@ -163,806 +44,3 @@ GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80032C7C.s") GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800337E4.s") GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033A14.s") GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033C08.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033CC0.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033DD0.s") - -void func_80033F44(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033F60.s") - -typedef struct unk80034530 { - u8 pad0[0x8]; - u8 unk8; - u8 unk9; - s8 unkA; - s8 unkB; - u8 unkC; - u8 unkD; -} unk80034530; - -void func_80034530(Player *arg0, unk80034530 *arg1) { - Player_64* temp; - arg0->unk4C->unk14 = 0x22; - arg0->unk4C->unk11 = 0; - temp = arg0->unk64; - temp->unkE = arg1->unkA; - temp->unkF = arg1->unkB; - temp->unk10 = arg1->unkC; - temp->unk11 = arg1->unkD; - temp->unkCD.half = temp->unkF; - arg0->y_rotation = arg1->unk8 << 4 << 4; // Not sure about the shift amounts here, but it - arg0->x_rotation = arg1->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800345A0.s") - -// Literally the same function as func_80033F44() -void func_80034844(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034860.s") - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034AF0.s") -#else -// regalloc issues -void func_80034AF0(Player *arg0, u8 *arg1) { - f32 phi_f0 = (s32)arg1[9]; - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->unk78 = arg1[8]; -} -#endif - -typedef struct unk80034B4C { - u8 pad0[0x18]; - s16 unk18; - u8 pad1A[0x5E]; - s32 unk78; -} unk80034B4C; - -void func_80034B4C(unk80034B4C *arg0, s32 arg1) { - arg0->unk18 += arg0->unk78 * arg1; -} - -void func_80034B68(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034B74.s") - -void func_80034E70(Player *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->y_rotation = arg1[8] << 6 << 4; // Not sure about the values here. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034E9C.s") - -void func_8003522C(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035260.s") - -void func_80035640(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003564C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003572C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800357D4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003588C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003596C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035AE8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035C50.s") - -typedef struct unk80035E20 { - u8 pad0[0x40]; - s32 unk40; - u8 pad44[0x34]; - s32 unk78; - s32 unk7C; -} unk80035E20; - -void func_80035E20(unk80035E20 *arg0, s32 arg1) { - arg0->unk78 = 0; - arg0->unk7C = arg0->unk40; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035E34.s") - -typedef struct unk80035EF8 { - u8 pad0[0xA]; - s16 unkA; - s16 unkC; - s16 unkE; -} unk80035EF8; - -void func_80035EF8(Player *arg0, unk80035EF8 *arg1) { - f32 phi_f0; - arg0->unk78 = (s32) arg1->unkE; - arg0->unk7C.word = -1; - arg0->y_rotation = arg1->unkC << 6 << 4; // Not sure about the values here. - phi_f0 = (f32) (arg1->unkA & 0xFF); - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = (f32) (arg0->descriptor_ptr->unkC * phi_f0); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035F6C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s") - -void func_80036194(Player *arg0, s32 arg1) { - Player_64* temp; - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk4C->unk12 = 0; - temp = arg0->unk64; - temp->unkCD.bytes.byteD = 0xFF; - temp->unk0 = 0.0f; - D_8011D4D8 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800361E0.s") - -void func_80036BCC(u16 arg0, s32 arg1) { - if ((D_8011D4D8 != 0) && (arg1 & 1)) { - func_8000488C(D_8011D4D8); - D_8011D4D8 = 0; - } - if (D_8011D4D8 == 0) { - func_80001D04(arg0, &D_8011D4D8); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036C30.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800370D4.s") - -typedef struct unk80037578 { - u8 pad0[0x78]; - s32 unk78; - s32 unk7C; -} unk80037578; - -void func_80037578(unk80037578 *arg0, u8 *arg1) { - arg0->unk78 = arg1[9] * 2; - arg0->unk7C = arg1[8]; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037594.s") - -typedef struct unk80037624 { - u8 pad0[6]; - s16 unk6; -} unk80037624; - -void func_80037624(unk80037624 *arg0, s32 arg1) { - arg0->unk6 |= 0x4000; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003763C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800376E0.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800377E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037A18.s") - -void func_80037CE8(s32 arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); -} - -typedef struct unk80037D08_arg0_64 { - u8 pad0[0x2A]; - s16 unk2A; -} unk80037D08_arg0_64; - -typedef struct unk80037D08_arg0 { - u8 pad0[0x64]; - unk80037D08_arg0_64* unk64; -} unk80037D08_arg0; - -void func_80037D08(unk80037D08_arg0 *arg0, s32 arg1) { - s32 phi_a0; - unk80037D08_arg0_64 *sp18; - - sp18 = arg0->unk64; - phi_a0 = 1 - func_8001F460(arg0, arg1, arg0); - if (sp18->unk2A > 0) { - phi_a0 = 0; - } - func_800235D0(phi_a0); -} - -void func_80037D54(s32 arg0, s32 arg1) { - -} - -/* Unused? */ -void func_80037D60(s32 arg0, s32 arg1) { - -} - -void func_80037D6C(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037D78.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800380F8.s") - -void func_8003818C(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 0x81; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_80037CE8() -void func_800381C0(s32 arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); -} - -void func_800381E0(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_8003818C() -void func_80038214(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 0x81; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_800381E0() -void func_80038248(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003827C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003833C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038710.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800387CC.s") - -void func_80038854(Player *arg0, u8 *arg1) { - if (arg1[9] != 0) { - arg0->unk4C->unk14 = 0x21; - } else { - arg0->unk4C->unk14 = 0x22; - } - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0xF; - arg0->unk4C->unk12 = 0; - arg0->unk78 = (arg1[10] << 16) | arg1[8]; // Not sure about the values here. - arg0->unk7C.word = arg1[9]; - arg0->y_rotation = arg1[11] << 10; // Not sure about the values here. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800388D4.s") - -void func_800389AC(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800389B8.s") - -void func_80038A6C(s32 arg0, s32 arg1) { - -} - -typedef struct unk80038A78 { - u8 pad0[0x18]; - s16 unk18; -} unk80038A78; - -void func_80038A78(unk80038A78 *arg0, s32 arg1) { - arg0->unk18 += arg1 * 8; - if (arg0->unk18 >= 0x100) { - particlePtrList_addObject(); - arg0->unk18 = 0xFF; - } -} - -void func_80038AC8(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038AD4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038B74.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038BF4.s") - -void func_80038D58(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0xF; - arg0->unk4C->unk12 = 0; - if (get_settings()->cutsceneFlags & 1) { - arg0->unk78 = 1; - } -} - -void func_80038DC4(Player *arg0, s32 arg1) { - if (arg0->unk78 != 0) { - Player_3C* temp = arg0->unk3C; - if(arg0->unk4C->unk13 < 0x78) { - func_8006F338(temp->unk8); - arg0->unk78 = 0; - func_80001D04(0x30, 0, arg0); - func_80000FDC(0x12A, 0, 1.0f); - } - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038E3C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038F58.s") - -typedef struct unk80039160 { - u8 pad0[0x78]; - s32 unk78; -} unk80039160; - -void func_80039160(unk80039160 *arg0, s8 *arg1) { - arg0->unk78 = arg1[8]; - func_80011390(); -} - -void func_80039184(s32 arg0, s32 arg1) { - -} - -typedef struct unk80039190 { - u16 unk0; - u8 pad2[0x76]; - s32 unk78; - s32 unk7C; -} unk80039190; - -void func_80039190(unk80039190 *arg0, u8 *arg1) { - s32 temp; - arg0->unk78 = arg1[8]; - arg0->unk7C = arg1[9]; - arg0->unk0 = arg1[10] << 6 << 4; // Not sure about the values here. -} - -void func_800391BC(s32 arg0, s32 arg1) { - -} - -void func_800391C8(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 3; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800391FC.s") - -void func_800392B8(Player *arg0, s32 arg1) { - Player_64* temp; - arg0->unk4C->unk14 = (u16)1; - arg0->unk4C->unk11 = (u8)0; - arg0->unk4C->unk10 = (u8)0x1E; - arg0->unk4C->unk12 = (u8)0; - temp = arg0->unk64; - temp->unkCD.bytes.byteD = 0xFF; - temp->unk0 = 0.0f; - temp->unk28 = 0; - temp->unk2C = 0; - temp->unk34 = 0; - temp->unk36 = 0; - D_8011D4D4 = 0; - D_8011D4E2 = 0x10F; -} - -void func_80039320(s16 arg0) { - D_8011D4E2 = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80039330.s") - -void func_8003AC3C(u16 arg0, s32 arg1) { - if ((D_8011D4D4 != 0) && (arg1 & 1)) { - func_8000488C(D_8011D4D4); - D_8011D4D4 = 0; - } - if (D_8011D4D4 == 0) { - func_80001D04(arg0, &D_8011D4D4); - } -} - -void func_8003ACA0(s32 arg0, s32 arg1) { - -} - -f32 func_8003ACAC(void) { - return D_8011D4D0; -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003ACBC.s") -#else - -void func_8003ACBC(Player *arg0, u8 *arg1, s32 arg2) { - f32 phi_f0 = (s32)arg1[8]; // Regalloc issue here - if (phi_f0 < 5.0f) { - phi_f0 = 5.0f; - } - phi_f0 /= 64; - arg0->scale = phi_f0; - arg0->y_rotation = arg1[10] << 6 << 4; // Not sure about the values here. - func_80011390(); -} -#endif - -void func_8003AD28(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003AD34.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003AE50.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B058.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B174.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B368.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B4BC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B7CC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B988.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C1E0.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C2E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C644.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C7A4.s") - -void func_8003C9EC(Player *arg0, u8 *arg1) { - Player_64 *temp = arg0->unk64; - arg0->unk3A = arg1[8]; - arg0->y_rotation = arg1[9] << 6 << 4; - temp->unk0 = arg0->y_position; - arg0->unk4C->unk14 = 0x21; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - temp->unk4 = 0; - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003CA68.s") - -void func_8003CE64(Player *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - arg0->unk78 = arg1[8]; -} - -void func_8003CEA0(Player *arg0, s32 arg1) { - if (arg0->unk4C->unk13 < 0x2D) { - func_8001E344(arg0->unk78, arg0); - } - arg0->unk4C->unk13 = (u8)0xFF; -} - -void func_8003CF00(s32 arg0, s32 arg1) { - -} - -void func_8003CF0C(s32 arg0, s32 arg1) { - -} - -typedef struct unk8003CF18 { - u8 pad1A[0x78]; - f32 unk78; -} unk8003CF18; - -void func_8003CF18(unk8003CF18 *arg0, u8 *arg1) { - f32 temp_f0; - temp_f0 = arg1[8] * 8.0f; - temp_f0 = temp_f0 * temp_f0; - arg0->unk78 = temp_f0; -} - -void func_8003CF58(Player *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = arg1[9]; - arg0->unk78 = arg1[8]; - arg0->unk7C.word = arg1[9]; -} - -void func_8003CF98(Player *arg0, s32 arg1) { - if (arg0->unk4C->unk13 < arg0->unk7C.word) { - func_80028044(arg0->unk78); - } -} - -void func_8003CFE0(s32 arg0, u8 *arg1) { - if (arg1[9] == 0xFF) { - arg1[9] = func_8001C48C(arg0) & 0xFF; - } - func_8001D1BC(arg1[9], arg1); - func_8001D1AC(); -} - -void func_8003D02C(s32 arg0, s32 arg1) { - -} - -typedef struct unk8003D038 { - u8 pad0[0x18]; - s16 unk18; - u8 pad1A[0x5E]; - s32 unk78; -} unk8003D038; - -void func_8003D038(unk8003D038 *arg0, s8 *arg1) { - arg0->unk18 = 0x78; - arg0->unk78 = (arg1[8] - 1) & 3; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D058.s") - -void func_8003D2AC(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D2B8.s") - -typedef struct unk8003D3EC { - u8 pad0[0x18]; - u16 unk18; -} unk8003D3EC; - -void func_8003D3EC(unk8003D3EC *arg0, s32 arg1) { - arg0->unk18 = 0x64; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D3FC.s") - -void func_8003D534(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk7C.half.upper = 0x14; - arg0->unk7C.half.lower = 0x10; - if (func_8009C30C() & 0x1000) { - particlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D5A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DBA0.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DC5C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DD14.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DE74.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DF08.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DFCC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E140.s") - -void func_8003E5B0(s32 arg0, s32 arg1) { - -} - -void func_8003E5BC(s32 arg0, s32 arg1) { - -} - -void func_8003E5C8(Player *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x18; - arg0->unk4C->unk12 = 0; - arg0->unk78 = func_8000C8B4(0x1E0, arg0); - arg0->unk7C.word = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E630.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E694.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EC14.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EDD8.s") - -void func_8003F0D0(void) { - D_8011D4DC = 0; -} - -void func_8003F0DC(void) { - D_8011D4DC--; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F0F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F2E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FC44.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FD68.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FEF4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8004001C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800400A4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040148.s") - -typedef struct unk800403A8 { - u8 pad0[0x64]; - s32 unk64; -} unk800403A8; - -void func_800403A8(unk800403A8 *arg0, s32 arg1, s32 arg2) { - arg0->unk64 = func_80031CAC(arg0, arg1); -} - -void func_800403D8(Player *arg0, s32 arg1, s32 arg2) { - arg0->unk64 = func_800BE654(arg0->unk2E, arg0->x_position, arg0->z_position); - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk4C->unk12 = 0; -} - -f32 func_800BEEB4(Player_64*); - -void func_80040448(Player *arg0, s32 arg1) { - if (arg0->unk64 != NULL) { - arg0->y_position = func_800BEEB4(arg0->unk64); - } - arg0->unk18 += arg1 * 8; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8004049C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040570.s") - -typedef struct unk80040800 { - u8 pad0[0x78]; - f32 unk78; -} unk80040800; - -void func_80040800(unk80040800 *arg0, s16 *arg1) { - f32 temp = arg1[4]; - temp *= temp; - arg0->unk78 = temp; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040820.s") - -void func_8004092C(s32 arg0, s32 arg1) { - func_800AC8A8(arg0); -} - -void func_8004094C(Player *arg0, s16 *arg1, s32 arg2) { - func_800ACF60(); - arg0->scale = arg1[4]; - arg0->scale /= 40.0f; -} - -void func_800409A4(s32 arg0, s32 arg1, s32 arg2) { - func_800BF524(arg0); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800409C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040C54.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041A90.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041E80.s") - -typedef struct unk80042014_arg0_64 { - u16 unk0; - u8 unk2; - u8 unk3; -} unk80042014_arg0_64; - -typedef struct unk80042014_arg0 { - u8 pad0[0x64]; - unk80042014_arg0_64* unk64; -} unk80042014_arg0; - -typedef struct unk80042014_arg1 { - u8 pad0[8]; - u16 unk8; - u8 unkA; - u8 unkB; -} unk80042014_arg1; - -void func_80042014(unk80042014_arg0 *arg0, unk80042014_arg1 *arg1) { - unk80042014_arg0_64* temp = arg0->unk64; - temp->unk0 = arg1->unk8; - temp->unk2 = arg1->unkA; - temp->unk3 = arg1->unkB; -} - -typedef struct unk8004203C_arg1 { - u8 pad0[0x8]; - u8 unk8; - u8 unk9; - u16 unkA; -} unk8004203C_arg1; - -void func_8004203C(Player *arg0, unk8004203C_arg1 *arg1) { - func_800AF134(arg0->unk6C, arg1->unk9, arg1->unk8, 0, 0, 0); - arg0->unk78 = arg1->unkA; -} - -void func_80042090(Player *arg0, s32 arg1) { - if (arg0->unk78 >= func_8006F94C(0, 0x400)) { - arg0->unk74 = 1; - } else { - arg0->unk74 = 0; - } - if (func_8009C3C8() < 2) { - func_800AFC3C(arg0, arg1); - } -} - -typedef struct unk8004210C { - u8 pad0[0x3C]; - s32 unk3C; - u8 pad40[0x24]; - s32 unk64; -} unk8004210C; - -void func_8004210C(unk8004210C *arg0, s8 *arg1) { - arg0->unk64 = func_8001E29C(0x14) + (arg1[8] << 7); - arg0->unk3C = 0; -} - -void func_80042150(s32 arg0, s32 arg1, s32 arg2) { - -} - -void func_80042160(s32 arg0, s32 arg1) { - -} - -void func_8004216C(s32 arg0, s32 arg1) { - -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042178.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042210.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800422F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042998.s") - -typedef struct unk80042A1C { - u8 pad0[0x78]; - f32 unk78; - s16 unk7C; - s16 unk7E; -} unk80042A1C; - -void func_80042A1C(unk80042A1C *arg0, s8 *arg1) { - arg0->unk78 = arg1[9] * 8.0f; - arg0->unk78 *= arg0->unk78; - arg0->unk7C = arg1[8]; - arg0->unk7E = 0; - if (is_in_tracks_mode()) { - particlePtrList_addObject(arg0); - } - func_800C56D0(4); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042A90.s") - -typedef struct unk80042CD0 { - u8 pad0[0x18]; - s16 unk18; -} unk80042CD0; - -void func_80042CD0(unk80042CD0 *arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); - arg0->unk18 = (arg0->unk18 + (arg1 * 8)) & 0xFF; -} - - diff --git a/src/unknown_0348C0.c b/src/unknown_0348C0.c new file mode 100644 index 00000000..198edacc --- /dev/null +++ b/src/unknown_0348C0.c @@ -0,0 +1,917 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80033CC0 */ + +#include "types.h" +#include "macros.h" +#include "structs.h" + +/************ .data ************/ + +// Unsure about the signed/unsigned with these arrays. +u16 D_800DC970[4] = { + 0x40FF, 0xFFFF, 0x0007, 0x0003 +}; +u16 D_800DC978[4] = { + 0x0000, 0x0000, 0x001E, 0xFFFF +}; +u16 D_800DC980[20] = { + 0xFF00, 0x0100, 0x0000, 0xFFFF, + 0xFFFF, 0x0100, 0x0100, 0x0000, + 0xFFFF, 0xFFFF, 0x0100, 0xFF00, + 0x0000, 0xFFFF, 0xFFFF, 0xFF00, + 0xFF00, 0x0000, 0xFFFF, 0xFFFF +}; +u16 D_800DC9A8[20] = { + 0x0000, 0x0040, 0xFFC0, 0x0000, + 0xFFC0, 0xFFC0, 0x0000, 0x0040, + 0x0020, 0x0000, 0xFFC0, 0x0020, + 0x0000, 0x0040, 0x0040, 0x0000, + 0xFFC0, 0x0040, 0x0000, 0x0000 +}; +u16 D_800DC9D0[64] = { + 0x0000, 0x0301, 0x0004, 0x0000, + 0x0001, 0x0004, 0x0004, 0x0004, + 0x0000, 0x0203, 0x0004, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0004, + 0x0002, 0x0503, 0x0001, 0x0000, + 0x0000, 0x0004, 0x0001, 0x0004, + 0x0002, 0x0405, 0x0001, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0004, + 0x0000, 0x0103, 0x0004, 0x0000, + 0x0004, 0x0004, 0x0001, 0x0004, + 0x0000, 0x0302, 0x0004, 0x0000, + 0x0001, 0x0004, 0x0001, 0x0000, + 0x0002, 0x0305, 0x0001, 0x0000, + 0x0001, 0x0004, 0x0000, 0x0004, + 0x0002, 0x0504, 0x0001, 0x0000, + 0x0000, 0x0004, 0x0000, 0x0000 +}; +s8 D_800DCA50[8] = { + 2, 5, 6, 3, 10, 8, 7, 9 +}; +u8 D_800DCA58[9] = { + 2, 5, 6, 3, 10, 8, 7, 9, 11 +}; +s8 D_800DCA64[9] = { + 2, 5, 6, 3, 10, 8, 7, 9, 12 +}; +s8 D_800DCA70[10] = { + 2, 5, 6, 3, 10, 8, 7, 9, 11, 12 +}; +s32 D_800DCA7C[3] = { // Not sure about typing + 0, 0, 0 +}; +s32 D_800DCA88[3] = { // Not sure about typing + 0, 0, 0 +}; +s8 D_800DCA94[16] = { + 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00 +}; +s8 D_800DCA9C[4] = { + 0x00, 0x00, 0x00, 0x00 +}; +u16 D_800DCAA8[64] = { + 0x0000, 0x0301, 0x0000, 0x0000, + 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, + 0x0000, 0x0203, 0x0000, 0x0000, + 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, + 0x0002, 0x0503, 0xFFFF, 0x0000, + 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0002, 0x0405, 0xFFFF, 0x0000, + 0x0000, 0x0000, 0x0000, 0xFFFF, + 0x0000, 0x0103, 0x0000, 0x0000, + 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0000, 0x0302, 0x0000, 0x0000, + 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, + 0x0002, 0x0305, 0xFFFF, 0x0000, + 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, + 0x0002, 0x0504, 0xFFFF, 0x0000, + 0x0000, 0xFFFF, 0x0000, 0x0000 +}; +u16 D_800DCB28[20] = { + 0xFFC0, 0x0000, 0x0020, 0xFFC0, + 0x0000, 0xFFE0, 0x0000, 0x0000, + 0x0020, 0x0000, 0x0000, 0xFFE0, + 0x0040, 0x0000, 0x0020, 0x0040, + 0x0000, 0xFFE0, 0x0000, 0x0000 +}; + +/*******************************/ + +/************ .bss ************/ + +extern f32 D_8011D4D0; +extern s32 D_8011D4D4; +extern s32 D_8011D4D8; +extern s32 D_8011D4DC; +extern s16 D_8011D4E2; + +/******************************/ + +Settings* get_settings(); +Player_64 *func_800BE654(s16, f32, f32); +void func_80000FDC(s32, s32, f32); + + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033CC0.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033DD0.s") + +void func_80033F44(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033F60.s") + +typedef struct unk80034530 { + u8 pad0[0x8]; + u8 unk8; + u8 unk9; + s8 unkA; + s8 unkB; + u8 unkC; + u8 unkD; +} unk80034530; + +void func_80034530(Player *arg0, unk80034530 *arg1) { + Player_64* temp; + arg0->unk4C->unk14 = 0x22; + arg0->unk4C->unk11 = 0; + temp = arg0->unk64; + temp->unkE = arg1->unkA; + temp->unkF = arg1->unkB; + temp->unk10 = arg1->unkC; + temp->unk11 = arg1->unkD; + temp->unkCD.half = temp->unkF; + arg0->y_rotation = arg1->unk8 << 4 << 4; // Not sure about the shift amounts here, but it + arg0->x_rotation = arg1->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8. +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800345A0.s") + +// Literally the same function as func_80033F44() +void func_80034844(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034860.s") + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034AF0.s") +#else +// regalloc issues +void func_80034AF0(Player *arg0, u8 *arg1) { + f32 phi_f0 = (s32)arg1[9]; + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; + arg0->unk78 = arg1[8]; +} +#endif + +typedef struct unk80034B4C { + u8 pad0[0x18]; + s16 unk18; + u8 pad1A[0x5E]; + s32 unk78; +} unk80034B4C; + +void func_80034B4C(unk80034B4C *arg0, s32 arg1) { + arg0->unk18 += arg0->unk78 * arg1; +} + +void func_80034B68(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034B74.s") + +void func_80034E70(Player *arg0, u8 *arg1) { + arg0->unk4C->unk14 = 1; + arg0->unk4C->unk11 = 2; + arg0->y_rotation = arg1[8] << 6 << 4; // Not sure about the values here. +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034E9C.s") + +void func_8003522C(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035260.s") + +void func_80035640(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003564C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003572C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800357D4.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003588C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003596C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035AE8.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035C50.s") + +typedef struct unk80035E20 { + u8 pad0[0x40]; + s32 unk40; + u8 pad44[0x34]; + s32 unk78; + s32 unk7C; +} unk80035E20; + +void func_80035E20(unk80035E20 *arg0, s32 arg1) { + arg0->unk78 = 0; + arg0->unk7C = arg0->unk40; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035E34.s") + +typedef struct unk80035EF8 { + u8 pad0[0xA]; + s16 unkA; + s16 unkC; + s16 unkE; +} unk80035EF8; + +void func_80035EF8(Player *arg0, unk80035EF8 *arg1) { + f32 phi_f0; + arg0->unk78 = (s32) arg1->unkE; + arg0->unk7C.word = -1; + arg0->y_rotation = arg1->unkC << 6 << 4; // Not sure about the values here. + phi_f0 = (f32) (arg1->unkA & 0xFF); + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + arg0->scale = (f32) (arg0->descriptor_ptr->unkC * phi_f0); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035F6C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s") + +void func_80036194(Player *arg0, s32 arg1) { + Player_64* temp; + arg0->unk4C->unk14 = 1; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0x1E; + arg0->unk4C->unk12 = 0; + temp = arg0->unk64; + temp->unkCD.bytes.byteD = 0xFF; + temp->unk0 = 0.0f; + D_8011D4D8 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800361E0.s") + +void func_80036BCC(u16 arg0, s32 arg1) { + if ((D_8011D4D8 != 0) && (arg1 & 1)) { + func_8000488C(D_8011D4D8); + D_8011D4D8 = 0; + } + if (D_8011D4D8 == 0) { + func_80001D04(arg0, &D_8011D4D8); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036C30.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800370D4.s") + +typedef struct unk80037578 { + u8 pad0[0x78]; + s32 unk78; + s32 unk7C; +} unk80037578; + +void func_80037578(unk80037578 *arg0, u8 *arg1) { + arg0->unk78 = arg1[9] * 2; + arg0->unk7C = arg1[8]; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037594.s") + +typedef struct unk80037624 { + u8 pad0[6]; + s16 unk6; +} unk80037624; + +void func_80037624(unk80037624 *arg0, s32 arg1) { + arg0->unk6 |= 0x4000; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003763C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800376E0.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800377E4.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037A18.s") + +void func_80037CE8(s32 arg0, s32 arg1) { + func_8001F460(arg0, arg1, arg0); +} + +typedef struct unk80037D08_arg0_64 { + u8 pad0[0x2A]; + s16 unk2A; +} unk80037D08_arg0_64; + +typedef struct unk80037D08_arg0 { + u8 pad0[0x64]; + unk80037D08_arg0_64* unk64; +} unk80037D08_arg0; + +void func_80037D08(unk80037D08_arg0 *arg0, s32 arg1) { + s32 phi_a0; + unk80037D08_arg0_64 *sp18; + + sp18 = arg0->unk64; + phi_a0 = 1 - func_8001F460(arg0, arg1, arg0); + if (sp18->unk2A > 0) { + phi_a0 = 0; + } + func_800235D0(phi_a0); +} + +void func_80037D54(s32 arg0, s32 arg1) { + +} + +/* Unused? */ +void func_80037D60(s32 arg0, s32 arg1) { + +} + +void func_80037D6C(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037D78.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800380F8.s") + +void func_8003818C(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 0x81; + arg0->unk4C->unk11 = 2; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; +} + +// Literally the same as func_80037CE8() +void func_800381C0(s32 arg0, s32 arg1) { + func_8001F460(arg0, arg1, arg0); +} + +void func_800381E0(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 1; + arg0->unk4C->unk11 = 2; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; +} + +// Literally the same as func_8003818C() +void func_80038214(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 0x81; + arg0->unk4C->unk11 = 2; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; +} + +// Literally the same as func_800381E0() +void func_80038248(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 1; + arg0->unk4C->unk11 = 2; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003827C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003833C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038710.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800387CC.s") + +void func_80038854(Player *arg0, u8 *arg1) { + if (arg1[9] != 0) { + arg0->unk4C->unk14 = 0x21; + } else { + arg0->unk4C->unk14 = 0x22; + } + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0xF; + arg0->unk4C->unk12 = 0; + arg0->unk78 = (arg1[10] << 16) | arg1[8]; // Not sure about the values here. + arg0->unk7C.word = arg1[9]; + arg0->y_rotation = arg1[11] << 10; // Not sure about the values here. +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800388D4.s") + +void func_800389AC(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800389B8.s") + +void func_80038A6C(s32 arg0, s32 arg1) { + +} + +typedef struct unk80038A78 { + u8 pad0[0x18]; + s16 unk18; +} unk80038A78; + +void func_80038A78(unk80038A78 *arg0, s32 arg1) { + arg0->unk18 += arg1 * 8; + if (arg0->unk18 >= 0x100) { + particlePtrList_addObject(); + arg0->unk18 = 0xFF; + } +} + +void func_80038AC8(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038AD4.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038B74.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038BF4.s") + +void func_80038D58(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0xF; + arg0->unk4C->unk12 = 0; + if (get_settings()->cutsceneFlags & 1) { + arg0->unk78 = 1; + } +} + +void func_80038DC4(Player *arg0, s32 arg1) { + if (arg0->unk78 != 0) { + Player_3C* temp = arg0->unk3C; + if(arg0->unk4C->unk13 < 0x78) { + func_8006F338(temp->unk8); + arg0->unk78 = 0; + func_80001D04(0x30, 0, arg0); + func_80000FDC(0x12A, 0, 1.0f); + } + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038E3C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038F58.s") + +typedef struct unk80039160 { + u8 pad0[0x78]; + s32 unk78; +} unk80039160; + +void func_80039160(unk80039160 *arg0, s8 *arg1) { + arg0->unk78 = arg1[8]; + func_80011390(); +} + +void func_80039184(s32 arg0, s32 arg1) { + +} + +typedef struct unk80039190 { + u16 unk0; + u8 pad2[0x76]; + s32 unk78; + s32 unk7C; +} unk80039190; + +void func_80039190(unk80039190 *arg0, u8 *arg1) { + s32 temp; + arg0->unk78 = arg1[8]; + arg0->unk7C = arg1[9]; + arg0->unk0 = arg1[10] << 6 << 4; // Not sure about the values here. +} + +void func_800391BC(s32 arg0, s32 arg1) { + +} + +void func_800391C8(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 1; + arg0->unk4C->unk11 = 3; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800391FC.s") + +void func_800392B8(Player *arg0, s32 arg1) { + Player_64* temp; + arg0->unk4C->unk14 = (u16)1; + arg0->unk4C->unk11 = (u8)0; + arg0->unk4C->unk10 = (u8)0x1E; + arg0->unk4C->unk12 = (u8)0; + temp = arg0->unk64; + temp->unkCD.bytes.byteD = 0xFF; + temp->unk0 = 0.0f; + temp->unk28 = 0; + temp->unk2C = 0; + temp->unk34 = 0; + temp->unk36 = 0; + D_8011D4D4 = 0; + D_8011D4E2 = 0x10F; +} + +void func_80039320(s16 arg0) { + D_8011D4E2 = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80039330.s") + +void func_8003AC3C(u16 arg0, s32 arg1) { + if ((D_8011D4D4 != 0) && (arg1 & 1)) { + func_8000488C(D_8011D4D4); + D_8011D4D4 = 0; + } + if (D_8011D4D4 == 0) { + func_80001D04(arg0, &D_8011D4D4); + } +} + +void func_8003ACA0(s32 arg0, s32 arg1) { + +} + +f32 func_8003ACAC(void) { + return D_8011D4D0; +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003ACBC.s") +#else + +void func_8003ACBC(Player *arg0, u8 *arg1, s32 arg2) { + f32 phi_f0 = (s32)arg1[8]; // Regalloc issue here + if (phi_f0 < 5.0f) { + phi_f0 = 5.0f; + } + phi_f0 /= 64; + arg0->scale = phi_f0; + arg0->y_rotation = arg1[10] << 6 << 4; // Not sure about the values here. + func_80011390(); +} +#endif + +void func_8003AD28(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003AD34.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003AE50.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B058.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B174.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B368.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B4BC.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B7CC.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B988.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C1E0.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C2E4.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C644.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C7A4.s") + +void func_8003C9EC(Player *arg0, u8 *arg1) { + Player_64 *temp = arg0->unk64; + arg0->unk3A = arg1[8]; + arg0->y_rotation = arg1[9] << 6 << 4; + temp->unk0 = arg0->y_position; + arg0->unk4C->unk14 = 0x21; + arg0->unk4C->unk11 = 2; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; + temp->unk4 = 0; + if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { + arg0->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003CA68.s") + +void func_8003CE64(Player *arg0, u8 *arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0x14; + arg0->unk4C->unk12 = 0; + arg0->unk78 = arg1[8]; +} + +void func_8003CEA0(Player *arg0, s32 arg1) { + if (arg0->unk4C->unk13 < 0x2D) { + func_8001E344(arg0->unk78, arg0); + } + arg0->unk4C->unk13 = (u8)0xFF; +} + +void func_8003CF00(s32 arg0, s32 arg1) { + +} + +void func_8003CF0C(s32 arg0, s32 arg1) { + +} + +typedef struct unk8003CF18 { + u8 pad1A[0x78]; + f32 unk78; +} unk8003CF18; + +void func_8003CF18(unk8003CF18 *arg0, u8 *arg1) { + f32 temp_f0; + temp_f0 = arg1[8] * 8.0f; + temp_f0 = temp_f0 * temp_f0; + arg0->unk78 = temp_f0; +} + +void func_8003CF58(Player *arg0, u8 *arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = arg1[9]; + arg0->unk78 = arg1[8]; + arg0->unk7C.word = arg1[9]; +} + +void func_8003CF98(Player *arg0, s32 arg1) { + if (arg0->unk4C->unk13 < arg0->unk7C.word) { + func_80028044(arg0->unk78); + } +} + +void func_8003CFE0(s32 arg0, u8 *arg1) { + if (arg1[9] == 0xFF) { + arg1[9] = func_8001C48C(arg0) & 0xFF; + } + func_8001D1BC(arg1[9], arg1); + func_8001D1AC(); +} + +void func_8003D02C(s32 arg0, s32 arg1) { + +} + +typedef struct unk8003D038 { + u8 pad0[0x18]; + s16 unk18; + u8 pad1A[0x5E]; + s32 unk78; +} unk8003D038; + +void func_8003D038(unk8003D038 *arg0, s8 *arg1) { + arg0->unk18 = 0x78; + arg0->unk78 = (arg1[8] - 1) & 3; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D058.s") + +void func_8003D2AC(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D2B8.s") + +typedef struct unk8003D3EC { + u8 pad0[0x18]; + u16 unk18; +} unk8003D3EC; + +void func_8003D3EC(unk8003D3EC *arg0, s32 arg1) { + arg0->unk18 = 0x64; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D3FC.s") + +void func_8003D534(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0x1E; + arg0->unk7C.half.upper = 0x14; + arg0->unk7C.half.lower = 0x10; + if (func_8009C30C() & 0x1000) { + particlePtrList_addObject(arg0); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D5A0.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DBA0.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DC5C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DD14.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DE74.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DF08.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DFCC.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E140.s") + +void func_8003E5B0(s32 arg0, s32 arg1) { + +} + +void func_8003E5BC(s32 arg0, s32 arg1) { + +} + +void func_8003E5C8(Player *arg0, s32 arg1) { + arg0->unk4C->unk14 = 2; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0x18; + arg0->unk4C->unk12 = 0; + arg0->unk78 = func_8000C8B4(0x1E0, arg0); + arg0->unk7C.word = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E630.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E694.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EC14.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EDD8.s") + +void func_8003F0D0(void) { + D_8011D4DC = 0; +} + +void func_8003F0DC(void) { + D_8011D4DC--; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F0F8.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F2E8.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FC44.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FD68.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FEF4.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8004001C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800400A4.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040148.s") + +typedef struct unk800403A8 { + u8 pad0[0x64]; + s32 unk64; +} unk800403A8; + +void func_800403A8(unk800403A8 *arg0, s32 arg1, s32 arg2) { + arg0->unk64 = func_80031CAC(arg0, arg1); +} + +void func_800403D8(Player *arg0, s32 arg1, s32 arg2) { + arg0->unk64 = func_800BE654(arg0->unk2E, arg0->x_position, arg0->z_position); + arg0->unk4C->unk14 = 1; + arg0->unk4C->unk11 = 0; + arg0->unk4C->unk10 = 0x1E; + arg0->unk4C->unk12 = 0; +} + +f32 func_800BEEB4(Player_64*); + +void func_80040448(Player *arg0, s32 arg1) { + if (arg0->unk64 != NULL) { + arg0->y_position = func_800BEEB4(arg0->unk64); + } + arg0->unk18 += arg1 * 8; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8004049C.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040570.s") + +typedef struct unk80040800 { + u8 pad0[0x78]; + f32 unk78; +} unk80040800; + +void func_80040800(unk80040800 *arg0, s16 *arg1) { + f32 temp = arg1[4]; + temp *= temp; + arg0->unk78 = temp; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040820.s") + +void func_8004092C(s32 arg0, s32 arg1) { + func_800AC8A8(arg0); +} + +void func_8004094C(Player *arg0, s16 *arg1, s32 arg2) { + func_800ACF60(); + arg0->scale = arg1[4]; + arg0->scale /= 40.0f; +} + +void func_800409A4(s32 arg0, s32 arg1, s32 arg2) { + func_800BF524(arg0); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800409C8.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040C54.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041A90.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041E80.s") + +typedef struct unk80042014_arg0_64 { + u16 unk0; + u8 unk2; + u8 unk3; +} unk80042014_arg0_64; + +typedef struct unk80042014_arg0 { + u8 pad0[0x64]; + unk80042014_arg0_64* unk64; +} unk80042014_arg0; + +typedef struct unk80042014_arg1 { + u8 pad0[8]; + u16 unk8; + u8 unkA; + u8 unkB; +} unk80042014_arg1; + +void func_80042014(unk80042014_arg0 *arg0, unk80042014_arg1 *arg1) { + unk80042014_arg0_64* temp = arg0->unk64; + temp->unk0 = arg1->unk8; + temp->unk2 = arg1->unkA; + temp->unk3 = arg1->unkB; +} + +typedef struct unk8004203C_arg1 { + u8 pad0[0x8]; + u8 unk8; + u8 unk9; + u16 unkA; +} unk8004203C_arg1; + +void func_8004203C(Player *arg0, unk8004203C_arg1 *arg1) { + func_800AF134(arg0->unk6C, arg1->unk9, arg1->unk8, 0, 0, 0); + arg0->unk78 = arg1->unkA; +} + +void func_80042090(Player *arg0, s32 arg1) { + if (arg0->unk78 >= func_8006F94C(0, 0x400)) { + arg0->unk74 = 1; + } else { + arg0->unk74 = 0; + } + if (func_8009C3C8() < 2) { + func_800AFC3C(arg0, arg1); + } +} + +typedef struct unk8004210C { + u8 pad0[0x3C]; + s32 unk3C; + u8 pad40[0x24]; + s32 unk64; +} unk8004210C; + +void func_8004210C(unk8004210C *arg0, s8 *arg1) { + arg0->unk64 = func_8001E29C(0x14) + (arg1[8] << 7); + arg0->unk3C = 0; +} + +void func_80042150(s32 arg0, s32 arg1, s32 arg2) { + +} + +void func_80042160(s32 arg0, s32 arg1) { + +} + +void func_8004216C(s32 arg0, s32 arg1) { + +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042178.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042210.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800422F0.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042998.s") + +typedef struct unk80042A1C { + u8 pad0[0x78]; + f32 unk78; + s16 unk7C; + s16 unk7E; +} unk80042A1C; + +void func_80042A1C(unk80042A1C *arg0, s8 *arg1) { + arg0->unk78 = arg1[9] * 8.0f; + arg0->unk78 *= arg0->unk78; + arg0->unk7C = arg1[8]; + arg0->unk7E = 0; + if (is_in_tracks_mode()) { + particlePtrList_addObject(arg0); + } + func_800C56D0(4); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042A90.s") + +typedef struct unk80042CD0 { + u8 pad0[0x18]; + s16 unk18; +} unk80042CD0; + +void func_80042CD0(unk80042CD0 *arg0, s32 arg1) { + func_8001F460(arg0, arg1, arg0); + arg0->unk18 = (arg0->unk18 + (arg1 * 8)) & 0xFF; +} diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index 51421cb0..7d1a1178 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -66,6 +66,7 @@ def adjustAsmFile(asmFilepath, refs): rodata += 'glabel ' + ref[1] + '\n' rodata += '.' + ref[0] + ' ' + ref[2] + '\n' elif ref[0] == 'double' or ref[0] == 'float': + lateRodata += 'glabel ' + ref[1] + '\n' lateRodata += '.' + ref[0] + ' ' + ref[2] + '\n' elif ref[0] == 'table': replaces.append((ref[1], 'jpt' + ref[1][1:])) @@ -84,6 +85,7 @@ def adjustAsmFile(asmFilepath, refs): asmLines.insert(i, 'glabel L' + word) break doneWords.append(word) + lateRodata += 'glabel ' + ref[1] + '\n' lateRodata += tblWords + '\n' if index < len(refs) - 1 and ref[0] != 'double' and refs[index + 1][0] == 'double': addPadding = False From fb3c04a839669a78941be80bc85530b0aa43a835 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 18:40:31 -0500 Subject: [PATCH 36/66] Moved rodata from C to GLOBAL_ASM in unknown_080500 --- .../unknown_080500/DrawMenuText.s | 17 +- .../unknown_080500/MenuCreditsLoop.s | 14 +- asm/non_matchings/unknown_080500/MenuInit.s | 30 +++- .../unknown_080500/MenuLogoScreenLoop.s | 14 ++ asm/non_matchings/unknown_080500/MenuLoop.s | 30 +++- .../unknown_080500/MenuSaveOptionsLoop.s | 17 +- .../unknown_080500/MenuTitleScreenLoop.s | 7 + .../unknown_080500/func_800853D0.s | 19 +- .../unknown_080500/func_80085B9C.s | 15 +- .../unknown_080500/func_800867D4.s | 14 +- .../unknown_080500/func_80086A48.s | 5 + .../unknown_080500/func_80086AFC.s | 17 +- .../unknown_080500/func_80087734.s | 32 +++- .../unknown_080500/func_8008FA54.s | 7 + .../unknown_080500/func_800904E8.s | 7 + .../unknown_080500/func_80090F30.s | 5 + .../unknown_080500/func_80092188.s | 13 +- .../unknown_080500/func_80094D28.s | 17 +- .../unknown_080500/func_80095624.s | 15 +- .../unknown_080500/func_80095728.s | 18 +- .../unknown_080500/func_80097D10.s | 5 + .../unknown_080500/func_80099E8C.s | 5 + .../unknown_080500/func_8009CFEC.s | 15 +- .../unknown_080500/func_8009D360.s | 20 ++- .../unknown_080500/func_8009DB3C.s | 29 +++- src/unknown_080500.c | 164 ------------------ 26 files changed, 347 insertions(+), 204 deletions(-) diff --git a/asm/non_matchings/unknown_080500/DrawMenuText.s b/asm/non_matchings/unknown_080500/DrawMenuText.s index e7cb83bf..a6dacb4d 100644 --- a/asm/non_matchings/unknown_080500/DrawMenuText.s +++ b/asm/non_matchings/unknown_080500/DrawMenuText.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E836C +.word L800823E8, L80082454, L800824B8, L80082524, L8008256C, L80082608, L80082760, L800827C0 + +.text glabel DrawMenuText /* 082DEC 800821EC 27BDFF90 */ addiu $sp, $sp, -0x70 /* 082DF0 800821F0 E7B4003C */ swc1 $f20, 0x3c($sp) @@ -125,12 +130,13 @@ glabel DrawMenuText /* 082FC4 800823C4 2D810008 */ sltiu $at, $t4, 8 /* 082FC8 800823C8 10200117 */ beqz $at, .L80082828 /* 082FCC 800823CC 000C6080 */ sll $t4, $t4, 2 -/* 082FD0 800823D0 3C01800F */ lui $at, %hi(D_800E836C) # $at, 0x800f +/* 082FD0 800823D0 3C01800F */ lui $at, %hi(jpt_800E836C) # $at, 0x800f /* 082FD4 800823D4 002C0821 */ addu $at, $at, $t4 -/* 082FD8 800823D8 8C2C836C */ lw $t4, %lo(D_800E836C)($at) +/* 082FD8 800823D8 8C2C836C */ lw $t4, %lo(jpt_800E836C)($at) /* 082FDC 800823DC 00000000 */ nop /* 082FE0 800823E0 01800008 */ jr $t4 /* 082FE4 800823E4 00000000 */ nop +glabel L800823E8 /* 082FE8 800823E8 86040018 */ lh $a0, 0x18($s0) /* 082FEC 800823EC 8605001A */ lh $a1, 0x1a($s0) /* 082FF0 800823F0 8606001C */ lh $a2, 0x1c($s0) @@ -158,6 +164,7 @@ glabel DrawMenuText /* 083048 80082448 8FA40070 */ lw $a0, 0x70($sp) /* 08304C 8008244C 100000F7 */ b .L8008282C /* 083050 80082450 8E110034 */ lw $s1, 0x34($s0) +glabel L80082454 /* 083054 80082454 12A00003 */ beqz $s5, .L80082464 /* 083058 80082458 02C02025 */ move $a0, $s6 /* 08305C 8008245C 0C01ECF4 */ jal func_8007B3D0 @@ -184,6 +191,7 @@ glabel DrawMenuText /* 0830AC 800824AC 8FA40070 */ lw $a0, 0x70($sp) /* 0830B0 800824B0 100000DE */ b .L8008282C /* 0830B4 800824B4 8E110034 */ lw $s1, 0x34($s0) +glabel L800824B8 /* 0830B8 800824B8 12A00005 */ beqz $s5, .L800824D0 /* 0830BC 800824BC 02C02025 */ move $a0, $s6 /* 0830C0 800824C0 0C01ECF4 */ jal func_8007B3D0 @@ -212,6 +220,7 @@ glabel DrawMenuText /* 083118 80082518 8FA40070 */ lw $a0, 0x70($sp) /* 08311C 8008251C 100000C3 */ b .L8008282C /* 083120 80082520 8E110034 */ lw $s1, 0x34($s0) +glabel L80082524 /* 083124 80082524 920B000C */ lbu $t3, 0xc($s0) /* 083128 80082528 8FCA0000 */ lw $t2, ($fp) /* 08312C 8008252C AFAB0010 */ sw $t3, 0x10($sp) @@ -230,6 +239,7 @@ glabel DrawMenuText /* 083160 80082560 8FA40070 */ lw $a0, 0x70($sp) /* 083164 80082564 100000B1 */ b .L8008282C /* 083168 80082568 8E110034 */ lw $s1, 0x34($s0) +glabel L8008256C /* 08316C 8008256C 86190018 */ lh $t9, 0x18($s0) /* 083170 80082570 44928000 */ mtc1 $s2, $f16 /* 083174 80082574 44992000 */ mtc1 $t9, $f4 @@ -269,6 +279,7 @@ glabel DrawMenuText /* 0831FC 800825FC 8FA40070 */ lw $a0, 0x70($sp) /* 083200 80082600 1000008A */ b .L8008282C /* 083204 80082604 8E110034 */ lw $s1, 0x34($s0) +glabel L80082608 /* 083208 80082608 12A00003 */ beqz $s5, .L80082618 /* 08320C 8008260C 02C02025 */ move $a0, $s6 /* 083210 80082610 0C01ECF4 */ jal func_8007B3D0 @@ -356,6 +367,7 @@ glabel DrawMenuText /* 083354 80082754 8FA40070 */ lw $a0, 0x70($sp) /* 083358 80082758 10000034 */ b .L8008282C /* 08335C 8008275C 8E110034 */ lw $s1, 0x34($s0) +glabel L80082760 /* 083360 80082760 860E001A */ lh $t6, 0x1a($s0) /* 083364 80082764 86070018 */ lh $a3, 0x18($s0) /* 083368 80082768 AFAE0010 */ sw $t6, 0x10($sp) @@ -380,6 +392,7 @@ glabel DrawMenuText /* 0833B4 800827B4 8FA40070 */ lw $a0, 0x70($sp) /* 0833B8 800827B8 1000001C */ b .L8008282C /* 0833BC 800827BC 8E110034 */ lw $s1, 0x34($s0) +glabel L800827C0 /* 0833C0 800827C0 860A001A */ lh $t2, 0x1a($s0) /* 0833C4 800827C4 86070018 */ lh $a3, 0x18($s0) /* 0833C8 800827C8 AFAA0010 */ sw $t2, 0x10($sp) diff --git a/asm/non_matchings/unknown_080500/MenuCreditsLoop.s b/asm/non_matchings/unknown_080500/MenuCreditsLoop.s index 6c274152..de982047 100644 --- a/asm/non_matchings/unknown_080500/MenuCreditsLoop.s +++ b/asm/non_matchings/unknown_080500/MenuCreditsLoop.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8574 +.word L8009BA98, L8009BAD8, L8009BB08, L8009BB48, L8009BB9C + +.text glabel MenuCreditsLoop /* 09BF2C 8009B32C 27BDFF78 */ addiu $sp, $sp, -0x88 /* 09BF30 8009B330 AFBF0054 */ sw $ra, 0x54($sp) @@ -509,12 +514,13 @@ glabel MenuCreditsLoop /* 09C674 8009BA74 2D410005 */ sltiu $at, $t2, 5 /* 09C678 8009BA78 10200062 */ beqz $at, .L8009BC04 /* 09C67C 8009BA7C 000A5080 */ sll $t2, $t2, 2 -/* 09C680 8009BA80 3C01800F */ lui $at, %hi(D_800E8574) # $at, 0x800f +/* 09C680 8009BA80 3C01800F */ lui $at, %hi(jpt_800E8574) # $at, 0x800f /* 09C684 8009BA84 002A0821 */ addu $at, $at, $t2 -/* 09C688 8009BA88 8C2A8574 */ lw $t2, %lo(D_800E8574)($at) +/* 09C688 8009BA88 8C2A8574 */ lw $t2, %lo(jpt_800E8574)($at) /* 09C68C 8009BA8C 00000000 */ nop /* 09C690 8009BA90 01400008 */ jr $t2 /* 09C694 8009BA94 00000000 */ nop +glabel L8009BA98 /* 09C698 8009BA98 3C038012 */ lui $v1, %hi(D_80126BCC) # $v1, 0x8012 /* 09C69C 8009BA9C 24636BCC */ addiu $v1, %lo(D_80126BCC) # addiu $v1, $v1, 0x6bcc /* 09C6A0 8009BAA0 8C6C0000 */ lw $t4, ($v1) @@ -531,6 +537,7 @@ glabel MenuCreditsLoop /* 09C6CC 8009BACC 3C018012 */ lui $at, %hi(D_801263D8) # $at, 0x8012 /* 09C6D0 8009BAD0 1000004C */ b .L8009BC04 /* 09C6D4 8009BAD4 AC2F63D8 */ sw $t7, %lo(D_801263D8)($at) +glabel L8009BAD8 /* 09C6D8 8009BAD8 0C031CF8 */ jal func_800C73E0 /* 09C6DC 8009BADC 00000000 */ nop /* 09C6E0 8009BAE0 14400048 */ bnez $v0, .L8009BC04 @@ -543,6 +550,7 @@ glabel MenuCreditsLoop /* 09C6FC 8009BAFC 3C018012 */ lui $at, %hi(D_80126BD8) # $at, 0x8012 /* 09C700 8009BB00 10000040 */ b .L8009BC04 /* 09C704 8009BB04 AC206BD8 */ sw $zero, %lo(D_80126BD8)($at) +glabel L8009BB08 /* 09C708 8009BB08 3C038012 */ lui $v1, %hi(D_801263BC) # $v1, 0x8012 /* 09C70C 8009BB0C 246363BC */ addiu $v1, %lo(D_801263BC) # addiu $v1, $v1, 0x63bc /* 09C710 8009BB10 8C690000 */ lw $t1, ($v1) @@ -559,6 +567,7 @@ glabel MenuCreditsLoop /* 09C73C 8009BB3C AC6F0000 */ sw $t7, ($v1) /* 09C740 8009BB40 10000030 */ b .L8009BC04 /* 09C744 8009BB44 AE180000 */ sw $t8, ($s0) +glabel L8009BB48 /* 09C748 8009BB48 3C038012 */ lui $v1, %hi(D_801263BC) # $v1, 0x8012 /* 09C74C 8009BB4C 246363BC */ addiu $v1, %lo(D_801263BC) # addiu $v1, $v1, 0x63bc /* 09C750 8009BB50 8C790000 */ lw $t9, ($v1) @@ -582,6 +591,7 @@ glabel MenuCreditsLoop /* 09C790 8009BB90 AC6E0000 */ sw $t6, ($v1) /* 09C794 8009BB94 1000001B */ b .L8009BC04 /* 09C798 8009BB98 AE110000 */ sw $s1, ($s0) +glabel L8009BB9C /* 09C79C 8009BB9C 3C038012 */ lui $v1, %hi(D_801263BC) # $v1, 0x8012 /* 09C7A0 8009BBA0 246363BC */ addiu $v1, %lo(D_801263BC) # addiu $v1, $v1, 0x63bc /* 09C7A4 8009BBA4 8C6F0000 */ lw $t7, ($v1) diff --git a/asm/non_matchings/unknown_080500/MenuInit.s b/asm/non_matchings/unknown_080500/MenuInit.s index 87cffeae..9f595bce 100644 --- a/asm/non_matchings/unknown_080500/MenuInit.s +++ b/asm/non_matchings/unknown_080500/MenuInit.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8284 +.word L80081464, L80081454, L8008158C, L800814C4, L8008158C, L80081504, L800814E4, L8008158C, L8008158C, L8008158C, L800814A4, L800814B4, L80081474, L80081484, L80081494, L800814F4, L8008158C, L80081514, L8008158C, L800814D4, L80081524, L80081534, L8008158C, L80081544, L80081554, L80081564, L80081574, L8008158C, L80081584 + +.text glabel MenuInit /* 081FD0 800813D0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 081FD4 800813D4 AFBF0014 */ sw $ra, 0x14($sp) @@ -26,91 +31,112 @@ glabel MenuInit /* 082030 80081430 2DE1001D */ sltiu $at, $t7, 0x1d /* 082034 80081434 10200055 */ beqz $at, .L8008158C /* 082038 80081438 000F7880 */ sll $t7, $t7, 2 -/* 08203C 8008143C 3C01800F */ lui $at, %hi(D_800E8284) # $at, 0x800f +/* 08203C 8008143C 3C01800F */ lui $at, %hi(jpt_800E8284) # $at, 0x800f /* 082040 80081440 002F0821 */ addu $at, $at, $t7 -/* 082044 80081444 8C2F8284 */ lw $t7, %lo(D_800E8284)($at) +/* 082044 80081444 8C2F8284 */ lw $t7, %lo(jpt_800E8284)($at) /* 082048 80081448 00000000 */ nop /* 08204C 8008144C 01E00008 */ jr $t7 /* 082050 80081450 00000000 */ nop +glabel L80081454 /* 082054 80081454 0C020AAB */ jal menu_logos_screen_init /* 082058 80081458 00000000 */ nop /* 08205C 8008145C 1000004C */ b .L80081590 /* 082060 80081460 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081464 /* 082064 80081464 0C020D4F */ jal MenuTitleScreenInit /* 082068 80081468 00000000 */ nop /* 08206C 8008146C 10000048 */ b .L80081590 /* 082070 80081470 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081474 /* 082074 80081474 0C021057 */ jal menu_options_init /* 082078 80081478 00000000 */ nop /* 08207C 8008147C 10000044 */ b .L80081590 /* 082080 80081480 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081484 /* 082084 80081484 0C0211D5 */ jal MenuAudioOptionsInit /* 082088 80081488 00000000 */ nop /* 08208C 8008148C 10000040 */ b .L80081590 /* 082090 80081490 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081494 /* 082094 80081494 0C02149C */ jal menu_save_options_init /* 082098 80081498 00000000 */ nop /* 08209C 8008149C 1000003C */ b .L80081590 /* 0820A0 800814A0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800814A4 /* 0820A4 800814A4 0C022577 */ jal menu_magic_codes_init /* 0820A8 800814A8 00000000 */ nop /* 0820AC 800814AC 10000038 */ b .L80081590 /* 0820B0 800814B0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800814B4 /* 0820B4 800814B4 0C02293A */ jal menu_magic_codes_list_init /* 0820B8 800814B8 00000000 */ nop /* 0820BC 800814BC 10000034 */ b .L80081590 /* 0820C0 800814C0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800814C4 /* 0820C4 800814C4 0C022BF3 */ jal MenuCharacterSelectInit /* 0820C8 800814C8 00000000 */ nop /* 0820CC 800814CC 10000030 */ b .L80081590 /* 0820D0 800814D0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800814D4 /* 0820D4 800814D4 0C023142 */ jal MenuGameSelectInit /* 0820D8 800814D8 00000000 */ nop /* 0820DC 800814DC 1000002C */ b .L80081590 /* 0820E0 800814E0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800814E4 /* 0820E4 800814E4 0C0232BF */ jal menu_file_select_init /* 0820E8 800814E8 00000000 */ nop /* 0820EC 800814EC 10000028 */ b .L80081590 /* 0820F0 800814F0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800814F4 /* 0820F4 800814F4 0C0239E8 */ jal MenuTrackSelectInit /* 0820F8 800814F8 00000000 */ nop /* 0820FC 800814FC 10000024 */ b .L80081590 /* 082100 80081500 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081504 /* 082104 80081504 0C024B21 */ jal MenuLoadNewAreaInit /* 082108 80081508 00000000 */ nop /* 08210C 8008150C 10000020 */ b .L80081590 /* 082110 80081510 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081514 /* 082114 80081514 0C025A12 */ jal menu_11_init /* 082118 80081518 00000000 */ nop /* 08211C 8008151C 1000001C */ b .L80081590 /* 082120 80081520 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081524 /* 082124 80081524 0C02609B */ jal MenuTrophyRaceRoundInit /* 082128 80081528 00000000 */ nop /* 08212C 8008152C 10000018 */ b .L80081590 /* 082130 80081530 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081534 /* 082134 80081534 0C026289 */ jal MenuTrophyRaceRankingsInit /* 082138 80081538 00000000 */ nop /* 08213C 8008153C 10000014 */ b .L80081590 /* 082140 80081540 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081544 /* 082144 80081544 0C026B26 */ jal menu_17_init /* 082148 80081548 00000000 */ nop /* 08214C 8008154C 10000010 */ b .L80081590 /* 082150 80081550 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081554 /* 082154 80081554 0C026697 */ jal MenuGhostDataInit /* 082158 80081558 00000000 */ nop /* 08215C 8008155C 1000000C */ b .L80081590 /* 082160 80081560 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081564 /* 082164 80081564 0C026BD2 */ jal menu_credits_init /* 082168 80081568 00000000 */ nop /* 08216C 8008156C 10000008 */ b .L80081590 /* 082170 80081570 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081574 /* 082174 80081574 0C02213D */ jal menu_boot_init /* 082178 80081578 00000000 */ nop /* 08217C 8008157C 10000004 */ b .L80081590 /* 082180 80081580 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80081584 /* 082184 80081584 0C0230ED */ jal menu_caution_init /* 082188 80081588 00000000 */ nop .L8008158C: +glabel L8008158C /* 08218C 8008158C 8FBF0014 */ lw $ra, 0x14($sp) .L80081590: /* 082190 80081590 3418D000 */ li $t8, 53248 diff --git a/asm/non_matchings/unknown_080500/MenuLogoScreenLoop.s b/asm/non_matchings/unknown_080500/MenuLogoScreenLoop.s index f9376038..5ac43352 100644 --- a/asm/non_matchings/unknown_080500/MenuLogoScreenLoop.s +++ b/asm/non_matchings/unknown_080500/MenuLogoScreenLoop.s @@ -1,3 +1,17 @@ +.late_rodata +glabel D_800E838C +.float 2.6 +glabel D_800E8390 +.float 2.17 +.word 0 # Padding +glabel D_800E8398 +.double 510.0 +glabel D_800E83A0 +.double 510.0 +glabel D_800E83A8 +.double 510.0 + +.text glabel MenuLogoScreenLoop /* 083784 80082B84 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 /* 083788 80082B88 8DCE0300 */ lw $t6, %lo(osTvType)($t6) diff --git a/asm/non_matchings/unknown_080500/MenuLoop.s b/asm/non_matchings/unknown_080500/MenuLoop.s index e6f0b39c..8b5d13e6 100644 --- a/asm/non_matchings/unknown_080500/MenuLoop.s +++ b/asm/non_matchings/unknown_080500/MenuLoop.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E82F8 +.word L80081634, L80081620, L800817AC, L800816AC, L800817AC, L800816FC, L800816C0, L800817AC, L800817AC, L800817AC, L80081684, L80081698, L80081648, L8008165C, L80081670, L800816E8, L800817AC, L80081710, L800817AC, L800816D4, L80081724, L80081738, L800817AC, L8008174C, L80081760, L80081774, L80081788, L800817AC, L8008179C + +.text glabel MenuLoop /* 0821A4 800815A4 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0821A8 800815A8 AFBF0014 */ sw $ra, 0x14($sp) @@ -24,112 +29,133 @@ glabel MenuLoop /* 0821FC 800815FC 2D81001D */ sltiu $at, $t4, 0x1d /* 082200 80081600 1020006A */ beqz $at, .L800817AC /* 082204 80081604 000C6080 */ sll $t4, $t4, 2 -/* 082208 80081608 3C01800F */ lui $at, %hi(D_800E82F8) # $at, 0x800f +/* 082208 80081608 3C01800F */ lui $at, %hi(jpt_800E82F8) # $at, 0x800f /* 08220C 8008160C 002C0821 */ addu $at, $at, $t4 -/* 082210 80081610 8C2C82F8 */ lw $t4, %lo(D_800E82F8)($at) +/* 082210 80081610 8C2C82F8 */ lw $t4, %lo(jpt_800E82F8)($at) /* 082214 80081614 00000000 */ nop /* 082218 80081618 01800008 */ jr $t4 /* 08221C 8008161C 00000000 */ nop +glabel L80081620 /* 082220 80081620 8FA40030 */ lw $a0, 0x30($sp) /* 082224 80081624 0C020AE1 */ jal MenuLogoScreenLoop /* 082228 80081628 00000000 */ nop /* 08222C 8008162C 1000005F */ b .L800817AC /* 082230 80081630 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081634 /* 082234 80081634 8FA40030 */ lw $a0, 0x30($sp) /* 082238 80081638 0C020E79 */ jal MenuTitleScreenLoop /* 08223C 8008163C 00000000 */ nop /* 082240 80081640 1000005A */ b .L800817AC /* 082244 80081644 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081648 /* 082248 80081648 8FA40030 */ lw $a0, 0x30($sp) /* 08224C 8008164C 0C0210D7 */ jal MenuOptionsLoop /* 082250 80081650 00000000 */ nop /* 082254 80081654 10000055 */ b .L800817AC /* 082258 80081658 AFA2001C */ sw $v0, 0x1c($sp) +glabel L8008165C /* 08225C 8008165C 8FA40030 */ lw $a0, 0x30($sp) /* 082260 80081660 0C02131D */ jal MenuAudioOptionsLoop /* 082264 80081664 00000000 */ nop /* 082268 80081668 10000050 */ b .L800817AC /* 08226C 8008166C AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081670 /* 082270 80081670 8FA40030 */ lw $a0, 0x30($sp) /* 082274 80081674 0C021ED8 */ jal MenuSaveOptionsLoop /* 082278 80081678 00000000 */ nop /* 08227C 8008167C 1000004B */ b .L800817AC /* 082280 80081680 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081684 /* 082284 80081684 8FA40030 */ lw $a0, 0x30($sp) /* 082288 80081688 0C022736 */ jal MenuMagicCodesLoop /* 08228C 8008168C 00000000 */ nop /* 082290 80081690 10000046 */ b .L800817AC /* 082294 80081694 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081698 /* 082298 80081698 8FA40030 */ lw $a0, 0x30($sp) /* 08229C 8008169C 0C022A4A */ jal MenuMagicCodesListLoop /* 0822A0 800816A0 00000000 */ nop /* 0822A4 800816A4 10000041 */ b .L800817AC /* 0822A8 800816A8 AFA2001C */ sw $v0, 0x1c($sp) +glabel L800816AC /* 0822AC 800816AC 8FA40030 */ lw $a0, 0x30($sp) /* 0822B0 800816B0 0C022F49 */ jal MenuCharacterSelectLoop /* 0822B4 800816B4 00000000 */ nop /* 0822B8 800816B8 1000003C */ b .L800817AC /* 0822BC 800816BC AFA2001C */ sw $v0, 0x1c($sp) +glabel L800816C0 /* 0822C0 800816C0 8FA40030 */ lw $a0, 0x30($sp) /* 0822C4 800816C4 0C02379C */ jal MenuGameSelectLoop /* 0822C8 800816C8 00000000 */ nop /* 0822CC 800816CC 10000037 */ b .L800817AC /* 0822D0 800816D0 AFA2001C */ sw $v0, 0x1c($sp) +glabel L800816D4 /* 0822D4 800816D4 8FA40030 */ lw $a0, 0x30($sp) /* 0822D8 800816D8 0C0231EF */ jal MenuFileSelectLoop /* 0822DC 800816DC 00000000 */ nop /* 0822E0 800816E0 10000032 */ b .L800817AC /* 0822E4 800816E4 AFA2001C */ sw $v0, 0x1c($sp) +glabel L800816E8 /* 0822E8 800816E8 8FA40030 */ lw $a0, 0x30($sp) /* 0822EC 800816EC 0C023C8D */ jal MenuTrackSelectLoop /* 0822F0 800816F0 00000000 */ nop /* 0822F4 800816F4 1000002D */ b .L800817AC /* 0822F8 800816F8 AFA2001C */ sw $v0, 0x1c($sp) +glabel L800816FC /* 0822FC 800816FC 8FA40030 */ lw $a0, 0x30($sp) /* 082300 80081700 0C024D80 */ jal MenuLoadNewAreaLoop /* 082304 80081704 00000000 */ nop /* 082308 80081708 10000028 */ b .L800817AC /* 08230C 8008170C AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081710 /* 082310 80081710 8FA40030 */ lw $a0, 0x30($sp) /* 082314 80081714 0C025CAA */ jal Menu11Loop /* 082318 80081718 00000000 */ nop /* 08231C 8008171C 10000023 */ b .L800817AC /* 082320 80081720 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081724 /* 082324 80081724 8FA40030 */ lw $a0, 0x30($sp) /* 082328 80081728 0C026167 */ jal MenuTrophyRaceRoundLoop /* 08232C 8008172C 00000000 */ nop /* 082330 80081730 1000001E */ b .L800817AC /* 082334 80081734 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081738 /* 082338 80081738 8FA40030 */ lw $a0, 0x30($sp) /* 08233C 8008173C 0C0263F5 */ jal MenuTrophyRaceRankingsLoop /* 082340 80081740 00000000 */ nop /* 082344 80081744 10000019 */ b .L800817AC /* 082348 80081748 AFA2001C */ sw $v0, 0x1c($sp) +glabel L8008174C /* 08234C 8008174C 8FA40030 */ lw $a0, 0x30($sp) /* 082350 80081750 0C026B3F */ jal Menu17Loop /* 082354 80081754 00000000 */ nop /* 082358 80081758 10000014 */ b .L800817AC /* 08235C 8008175C AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081760 /* 082360 80081760 8FA40030 */ lw $a0, 0x30($sp) /* 082364 80081764 0C0269F5 */ jal MenuGhostDataLoop /* 082368 80081768 00000000 */ nop /* 08236C 8008176C 1000000F */ b .L800817AC /* 082370 80081770 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081774 /* 082374 80081774 8FA40030 */ lw $a0, 0x30($sp) /* 082378 80081778 0C026CCB */ jal MenuCreditsLoop /* 08237C 8008177C 00000000 */ nop /* 082380 80081780 1000000A */ b .L800817AC /* 082384 80081784 AFA2001C */ sw $v0, 0x1c($sp) +glabel L80081788 /* 082388 80081788 8FA40030 */ lw $a0, 0x30($sp) /* 08238C 8008178C 0C022183 */ jal menu_boot_loop /* 082390 80081790 00000000 */ nop /* 082394 80081794 10000005 */ b .L800817AC /* 082398 80081798 AFA2001C */ sw $v0, 0x1c($sp) +glabel L8008179C /* 08239C 8008179C 8FA40030 */ lw $a0, 0x30($sp) /* 0823A0 800817A0 0C0230FF */ jal menu_caution_loop /* 0823A4 800817A4 00000000 */ nop /* 0823A8 800817A8 AFA2001C */ sw $v0, 0x1c($sp) .L800817AC: +glabel L800817AC /* 0823AC 800817AC 3C0D8012 */ lui $t5, %hi(D_801263A0) # $t5, 0x8012 /* 0823B0 800817B0 8DAD63A0 */ lw $t5, %lo(D_801263A0)($t5) /* 0823B4 800817B4 8FAE0020 */ lw $t6, 0x20($sp) diff --git a/asm/non_matchings/unknown_080500/MenuSaveOptionsLoop.s b/asm/non_matchings/unknown_080500/MenuSaveOptionsLoop.s index 0c951e72..e271f93a 100644 --- a/asm/non_matchings/unknown_080500/MenuSaveOptionsLoop.s +++ b/asm/non_matchings/unknown_080500/MenuSaveOptionsLoop.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E84B0 +.word L80087D18, L80087D28, L80087D54, L80087D94, L80087DAC, L80087DEC, L80087E04, L80087E1C + +.text glabel MenuSaveOptionsLoop /* 088760 80087B60 3C038012 */ lui $v1, %hi(D_801263BC) # $v1, 0x8012 /* 088764 80087B64 246363BC */ addiu $v1, %lo(D_801263BC) # addiu $v1, $v1, 0x63bc @@ -113,16 +118,18 @@ glabel MenuSaveOptionsLoop .L80087CF8: /* 0888F8 80087CF8 1020005D */ beqz $at, .L80087E70 /* 0888FC 80087CFC 00027880 */ sll $t7, $v0, 2 -/* 088900 80087D00 3C01800F */ lui $at, %hi(D_800E84B0) # $at, 0x800f +/* 088900 80087D00 3C01800F */ lui $at, %hi(jpt_800E84B0) # $at, 0x800f /* 088904 80087D04 002F0821 */ addu $at, $at, $t7 -/* 088908 80087D08 8C2F84B0 */ lw $t7, %lo(D_800E84B0)($at) +/* 088908 80087D08 8C2F84B0 */ lw $t7, %lo(jpt_800E84B0)($at) /* 08890C 80087D0C 00000000 */ nop /* 088910 80087D10 01E00008 */ jr $t7 /* 088914 80087D14 00000000 */ nop +glabel L80087D18 /* 088918 80087D18 2418FFFF */ li $t8, -1 /* 08891C 80087D1C 3C01800E */ lui $at, %hi(D_800DF47C) # $at, 0x800e /* 088920 80087D20 10000053 */ b .L80087E70 /* 088924 80087D24 AC38F47C */ sw $t8, %lo(D_800DF47C)($at) +glabel L80087D28 /* 088928 80087D28 3C108012 */ lui $s0, %hi(D_801263D8) # $s0, 0x8012 /* 08892C 80087D2C 261063D8 */ addiu $s0, %lo(D_801263D8) # addiu $s0, $s0, 0x63d8 /* 088930 80087D30 8E190000 */ lw $t9, ($s0) @@ -134,6 +141,7 @@ glabel MenuSaveOptionsLoop /* 088948 80087D48 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 08894C 80087D4C 10000048 */ b .L80087E70 /* 088950 80087D50 AC2A63E0 */ sw $t2, %lo(D_801263E0)($at) +glabel L80087D54 /* 088954 80087D54 3C018012 */ lui $at, %hi(D_80126BD4) # $at, 0x8012 /* 088958 80087D58 44802000 */ mtc1 $zero, $f4 /* 08895C 80087D5C AC206BD4 */ sw $zero, %lo(D_80126BD4)($at) @@ -151,12 +159,14 @@ glabel MenuSaveOptionsLoop /* 088988 80087D88 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 08898C 80087D8C 10000038 */ b .L80087E70 /* 088990 80087D90 AC2B63E0 */ sw $t3, %lo(D_801263E0)($at) +glabel L80087D94 /* 088994 80087D94 00C02025 */ move $a0, $a2 /* 088998 80087D98 0C021D34 */ jal func_800874D0 /* 08899C 80087D9C 02802825 */ move $a1, $s4 /* 0889A0 80087DA0 3C01800E */ lui $at, %hi(D_800DF47C) # $at, 0x800e /* 0889A4 80087DA4 10000032 */ b .L80087E70 /* 0889A8 80087DA8 AC22F47C */ sw $v0, %lo(D_800DF47C)($at) +glabel L80087DAC /* 0889AC 80087DAC 3C018012 */ lui $at, %hi(D_80126BE4) # $at, 0x8012 /* 0889B0 80087DB0 44803000 */ mtc1 $zero, $f6 /* 0889B4 80087DB4 AC206BE4 */ sw $zero, %lo(D_80126BE4)($at) @@ -174,18 +184,21 @@ glabel MenuSaveOptionsLoop /* 0889E0 80087DE0 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 0889E4 80087DE4 10000022 */ b .L80087E70 /* 0889E8 80087DE8 AC2C63E0 */ sw $t4, %lo(D_801263E0)($at) +glabel L80087DEC /* 0889EC 80087DEC 00C02025 */ move $a0, $a2 /* 0889F0 80087DF0 0C021D79 */ jal func_800875E4 /* 0889F4 80087DF4 02802825 */ move $a1, $s4 /* 0889F8 80087DF8 3C01800E */ lui $at, %hi(D_800DF47C) # $at, 0x800e /* 0889FC 80087DFC 1000001C */ b .L80087E70 /* 088A00 80087E00 AC22F47C */ sw $v0, %lo(D_800DF47C)($at) +glabel L80087E04 /* 088A04 80087E04 00C02025 */ move $a0, $a2 /* 088A08 80087E08 0C021DB3 */ jal func_800876CC /* 088A0C 80087E0C 02802825 */ move $a1, $s4 /* 088A10 80087E10 3C01800E */ lui $at, %hi(D_800DF47C) # $at, 0x800e /* 088A14 80087E14 10000016 */ b .L80087E70 /* 088A18 80087E18 AC22F47C */ sw $v0, %lo(D_800DF47C)($at) +glabel L80087E1C /* 088A1C 80087E1C 3C108012 */ lui $s0, %hi(D_801263D8) # $s0, 0x8012 /* 088A20 80087E20 261063D8 */ addiu $s0, %lo(D_801263D8) # addiu $s0, $s0, 0x63d8 /* 088A24 80087E24 8E0D0000 */ lw $t5, ($s0) diff --git a/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s b/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s index 45cb9352..233209cf 100644 --- a/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s +++ b/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E83B0 +.float 0.67 +glabel D_800E83B4 +.float 2.83 + +.text glabel MenuTitleScreenLoop /* 0845E4 800839E4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0845E8 800839E8 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_080500/func_800853D0.s b/asm/non_matchings/unknown_080500/func_800853D0.s index 37a5f84d..ec269e2c 100644 --- a/asm/non_matchings/unknown_080500/func_800853D0.s +++ b/asm/non_matchings/unknown_080500/func_800853D0.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E83B8 +.word L8008541C, L8008553C, L80085574, L80085690, L800856DC, L80085728, L80085828, L80085774, L800857C0, L800857F0 + +.text glabel func_800853D0 /* 085FD0 800853D0 27BDFF80 */ addiu $sp, $sp, -0x80 /* 085FD4 800853D4 240E000B */ li $t6, 11 @@ -12,12 +17,13 @@ glabel func_800853D0 /* 085FF8 800853F8 2F01000A */ sltiu $at, $t8, 0xa /* 085FFC 800853FC 1020010A */ beqz $at, .L80085828 /* 086000 80085400 0018C080 */ sll $t8, $t8, 2 -/* 086004 80085404 3C01800F */ lui $at, %hi(D_800E83B8) # $at, 0x800f +/* 086004 80085404 3C01800F */ lui $at, %hi(jpt_800E83B8) # $at, 0x800f /* 086008 80085408 00380821 */ addu $at, $at, $t8 -/* 08600C 8008540C 8C3883B8 */ lw $t8, %lo(D_800E83B8)($at) +/* 08600C 8008540C 8C3883B8 */ lw $t8, %lo(jpt_800E83B8)($at) /* 086010 80085410 00000000 */ nop /* 086014 80085414 03000008 */ jr $t8 /* 086018 80085418 00000000 */ nop +glabel L8008541C /* 08601C 8008541C 3C19800E */ lui $t9, %hi(D_800DFC10) # $t9, 0x800e /* 086020 80085420 2739FC10 */ addiu $t9, %lo(D_800DFC10) # addiu $t9, $t9, -0x3f0 /* 086024 80085424 AFB90068 */ sw $t9, 0x68($sp) @@ -94,6 +100,7 @@ glabel func_800853D0 /* 086130 80085530 8F1901DC */ lw $t9, 0x1dc($t8) /* 086134 80085534 100000C8 */ b .L80085858 /* 086138 80085538 AFB90060 */ sw $t9, 0x60($sp) +glabel L8008553C /* 08613C 8008553C 3C0A800E */ lui $t2, %hi(D_800DFC20) # $t2, 0x800e /* 086140 80085540 3C03800E */ lui $v1, %hi(D_800DF4A0) # $v1, 0x800e /* 086144 80085544 8C63F4A0 */ lw $v1, %lo(D_800DF4A0)($v1) @@ -108,6 +115,7 @@ glabel func_800853D0 /* 086168 80085568 3529C0FF */ ori $t1, (0xB0E0C0FF & 0xFFFF) # ori $t1, $t1, 0xc0ff /* 08616C 8008556C 100000BA */ b .L80085858 /* 086170 80085570 AFAC0060 */ sw $t4, 0x60($sp) +glabel L80085574 /* 086174 80085574 3C0D800E */ lui $t5, %hi(D_800DFC10) # $t5, 0x800e /* 086178 80085578 25ADFC10 */ addiu $t5, %lo(D_800DFC10) # addiu $t5, $t5, -0x3f0 /* 08617C 8008557C AFAD0068 */ sw $t5, 0x68($sp) @@ -183,6 +191,7 @@ glabel func_800853D0 /* 086284 80085684 8FA50084 */ lw $a1, 0x84($sp) /* 086288 80085688 10000073 */ b .L80085858 /* 08628C 8008568C AFAE0070 */ sw $t6, 0x70($sp) +glabel L80085690 /* 086290 80085690 3C0D800E */ lui $t5, %hi(D_800DFC20) # $t5, 0x800e /* 086294 80085694 25ADFC20 */ addiu $t5, %lo(D_800DFC20) # addiu $t5, $t5, -0x3e0 /* 086298 80085698 AFAD0068 */ sw $t5, 0x68($sp) @@ -202,6 +211,7 @@ glabel func_800853D0 /* 0862D0 800856D0 8D29FACC */ lw $t1, %lo(D_800DFACC)($t1) /* 0862D4 800856D4 10000060 */ b .L80085858 /* 0862D8 800856D8 AFAC0060 */ sw $t4, 0x60($sp) +glabel L800856DC /* 0862DC 800856DC 3C0E800E */ lui $t6, %hi(D_800DFC30) # $t6, 0x800e /* 0862E0 800856E0 25CEFC30 */ addiu $t6, %lo(D_800DFC30) # addiu $t6, $t6, -0x3d0 /* 0862E4 800856E4 3C03800E */ lui $v1, %hi(D_800DF4A0) # $v1, 0x800e @@ -221,6 +231,7 @@ glabel func_800853D0 /* 08631C 8008571C 8D29FACC */ lw $t1, %lo(D_800DFACC)($t1) /* 086320 80085720 1000004D */ b .L80085858 /* 086324 80085724 AFAA0060 */ sw $t2, 0x60($sp) +glabel L80085728 /* 086328 80085728 3C0B800E */ lui $t3, %hi(D_800DFC40) # $t3, 0x800e /* 08632C 8008572C 256BFC40 */ addiu $t3, %lo(D_800DFC40) # addiu $t3, $t3, -0x3c0 /* 086330 80085730 AFAB0068 */ sw $t3, 0x68($sp) @@ -240,6 +251,7 @@ glabel func_800853D0 /* 086368 80085768 8D29FACC */ lw $t1, %lo(D_800DFACC)($t1) /* 08636C 8008576C 1000003A */ b .L80085858 /* 086370 80085770 AFB90060 */ sw $t9, 0x60($sp) +glabel L80085774 /* 086374 80085774 3C0A800E */ lui $t2, %hi(D_800DFC50) # $t2, 0x800e /* 086378 80085778 254AFC50 */ addiu $t2, %lo(D_800DFC50) # addiu $t2, $t2, -0x3b0 /* 08637C 8008577C 3C03800E */ lui $v1, %hi(D_800DF4A0) # $v1, 0x800e @@ -259,6 +271,7 @@ glabel func_800853D0 /* 0863B4 800857B4 8D29FACC */ lw $t1, %lo(D_800DFACC)($t1) /* 0863B8 800857B8 10000027 */ b .L80085858 /* 0863BC 800857BC AFAF0060 */ sw $t7, 0x60($sp) +glabel L800857C0 /* 0863C0 800857C0 3C18800E */ lui $t8, %hi(D_800DFC30) # $t8, 0x800e /* 0863C4 800857C4 3C19800E */ lui $t9, %hi(D_800DF4A0) # $t9, 0x800e /* 0863C8 800857C8 8F39F4A0 */ lw $t9, %lo(D_800DF4A0)($t9) @@ -271,6 +284,7 @@ glabel func_800853D0 /* 0863E4 800857E4 AFA00060 */ sw $zero, 0x60($sp) /* 0863E8 800857E8 1000001B */ b .L80085858 /* 0863EC 800857EC AFAA0064 */ sw $t2, 0x64($sp) +glabel L800857F0 /* 0863F0 800857F0 3C0B800E */ lui $t3, %hi(D_800DFC10) # $t3, 0x800e /* 0863F4 800857F4 3C03800E */ lui $v1, %hi(D_800DF4A0) # $v1, 0x800e /* 0863F8 800857F8 8C63F4A0 */ lw $v1, %lo(D_800DF4A0)($v1) @@ -286,6 +300,7 @@ glabel func_800853D0 /* 086420 80085820 1000000D */ b .L80085858 /* 086424 80085824 AFAE0060 */ sw $t6, 0x60($sp) .L80085828: +glabel L80085828 /* 086428 80085828 3C0D800E */ lui $t5, %hi(D_800DFC60) # $t5, 0x800e /* 08642C 8008582C 3C0F800E */ lui $t7, %hi(D_800DF4A0) # $t7, 0x800e /* 086430 80085830 8DEFF4A0 */ lw $t7, %lo(D_800DF4A0)($t7) diff --git a/asm/non_matchings/unknown_080500/func_80085B9C.s b/asm/non_matchings/unknown_080500/func_80085B9C.s index f5d2ff6e..79792860 100644 --- a/asm/non_matchings/unknown_080500/func_80085B9C.s +++ b/asm/non_matchings/unknown_080500/func_80085B9C.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E83E0 +.word L80085C30, L80085BF8, L80085BF8, L80085C00, L80085C00, L80085C08, L80085C14, L80085C24 + +.text glabel func_80085B9C /* 08679C 80085B9C 27BDFF98 */ addiu $sp, $sp, -0x68 /* 0867A0 80085BA0 AFBF003C */ sw $ra, 0x3c($sp) @@ -10,11 +15,11 @@ glabel func_80085B9C /* 0867BC 80085BBC AFA40068 */ sw $a0, 0x68($sp) /* 0867C0 80085BC0 3C038012 */ lui $v1, %hi(D_801263E0) # $v1, 0x8012 /* 0867C4 80085BC4 8C6363E0 */ lw $v1, %lo(D_801263E0)($v1) -/* 0867C8 80085BC8 3C01800F */ lui $at, %hi(D_800E83E0) # $at, 0x800f +/* 0867C8 80085BC8 3C01800F */ lui $at, %hi(jpt_800E83E0) # $at, 0x800f /* 0867CC 80085BCC 306E0007 */ andi $t6, $v1, 7 /* 0867D0 80085BD0 000E7080 */ sll $t6, $t6, 2 /* 0867D4 80085BD4 002E0821 */ addu $at, $at, $t6 -/* 0867D8 80085BD8 8C2E83E0 */ lw $t6, %lo(D_800E83E0)($at) +/* 0867D8 80085BD8 8C2E83E0 */ lw $t6, %lo(jpt_800E83E0)($at) /* 0867DC 80085BDC 3054FFFF */ andi $s4, $v0, 0xffff /* 0867E0 80085BE0 00009825 */ move $s3, $zero /* 0867E4 80085BE4 00003025 */ move $a2, $zero @@ -22,21 +27,27 @@ glabel func_80085B9C /* 0867EC 80085BEC 00004025 */ move $t0, $zero /* 0867F0 80085BF0 01C00008 */ jr $t6 /* 0867F4 80085BF4 00004825 */ move $t1, $zero +glabel L80085BF8 /* 0867F8 80085BF8 1000000D */ b .L80085C30 /* 0867FC 80085BFC 24070001 */ li $a3, 1 +glabel L80085C00 /* 086800 80085C00 1000000B */ b .L80085C30 /* 086804 80085C04 24130001 */ li $s3, 1 +glabel L80085C08 /* 086808 80085C08 24130001 */ li $s3, 1 /* 08680C 80085C0C 10000008 */ b .L80085C30 /* 086810 80085C10 24060001 */ li $a2, 1 +glabel L80085C14 /* 086814 80085C14 24130001 */ li $s3, 1 /* 086818 80085C18 24060001 */ li $a2, 1 /* 08681C 80085C1C 10000004 */ b .L80085C30 /* 086820 80085C20 24080001 */ li $t0, 1 +glabel L80085C24 /* 086824 80085C24 24130001 */ li $s3, 1 /* 086828 80085C28 24060001 */ li $a2, 1 /* 08682C 80085C2C 24070001 */ li $a3, 1 .L80085C30: +glabel L80085C30 /* 086830 80085C30 306F0008 */ andi $t7, $v1, 8 /* 086834 80085C34 11E00002 */ beqz $t7, .L80085C40 /* 086838 80085C38 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 diff --git a/asm/non_matchings/unknown_080500/func_800867D4.s b/asm/non_matchings/unknown_080500/func_800867D4.s index a7548a7c..482ec2e4 100644 --- a/asm/non_matchings/unknown_080500/func_800867D4.s +++ b/asm/non_matchings/unknown_080500/func_800867D4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8400 +.word L80086834, L80086888, L800868C0, L80086920, L80086998 + +.text glabel func_800867D4 /* 0873D4 800867D4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0873D8 800867D8 AFB00020 */ sw $s0, 0x20($sp) @@ -17,12 +22,13 @@ glabel func_800867D4 /* 087410 80086810 2D010005 */ sltiu $at, $t0, 5 /* 087414 80086814 1020007D */ beqz $at, .L80086A0C /* 087418 80086818 00084080 */ sll $t0, $t0, 2 -/* 08741C 8008681C 3C01800F */ lui $at, %hi(D_800E8400) # $at, 0x800f +/* 08741C 8008681C 3C01800F */ lui $at, %hi(jpt_800E8400) # $at, 0x800f /* 087420 80086820 00280821 */ addu $at, $at, $t0 -/* 087424 80086824 8C288400 */ lw $t0, %lo(D_800E8400)($at) +/* 087424 80086824 8C288400 */ lw $t0, %lo(jpt_800E8400)($at) /* 087428 80086828 00000000 */ nop /* 08742C 8008682C 01000008 */ jr $t0 /* 087430 80086830 00000000 */ nop +glabel L80086834 /* 087434 80086834 90440006 */ lbu $a0, 6($v0) /* 087438 80086838 0C01BADE */ jal func_8006EB78 /* 08743C 8008683C 00000000 */ nop @@ -44,6 +50,7 @@ glabel func_800867D4 /* 08747C 8008687C AFA20010 */ sw $v0, 0x10($sp) /* 087480 80086880 10000062 */ b .L80086A0C /* 087484 80086884 00401825 */ move $v1, $v0 +glabel L80086888 /* 087488 80086888 0C01CF15 */ jal func_80073C54 /* 08748C 8008688C 00000000 */ nop /* 087490 80086890 3C068012 */ lui $a2, %hi(D_80126A04) # $a2, 0x8012 @@ -58,6 +65,7 @@ glabel func_800867D4 /* 0874B4 800868B4 AFA20010 */ sw $v0, 0x10($sp) /* 0874B8 800868B8 10000054 */ b .L80086A0C /* 0874BC 800868BC 00401825 */ move $v1, $v0 +glabel L800868C0 /* 0874C0 800868C0 3C048012 */ lui $a0, %hi(D_80126A04) # $a0, 0x8012 /* 0874C4 800868C4 8C846A04 */ lw $a0, %lo(D_80126A04)($a0) /* 0874C8 800868C8 0C021872 */ jal func_800861C8 @@ -82,6 +90,7 @@ glabel func_800867D4 /* 087514 80086914 AFAE0014 */ sw $t6, 0x14($sp) /* 087518 80086918 1000003C */ b .L80086A0C /* 08751C 8008691C 00401825 */ move $v1, $v0 +glabel L80086920 /* 087520 80086920 8E080000 */ lw $t0, ($s0) /* 087524 80086924 3C198012 */ lui $t9, %hi(D_80126A04) # $t9, 0x8012 /* 087528 80086928 8F396A04 */ lw $t9, %lo(D_80126A04)($t9) @@ -112,6 +121,7 @@ glabel func_800867D4 /* 08758C 8008698C AFB90014 */ sw $t9, 0x14($sp) /* 087590 80086990 1000001E */ b .L80086A0C /* 087594 80086994 00401825 */ move $v1, $v0 +glabel L80086998 /* 087598 80086998 8E0A0000 */ lw $t2, ($s0) /* 08759C 8008699C 3C188012 */ lui $t8, %hi(D_80126A04) # $t8, 0x8012 /* 0875A0 800869A0 8F186A04 */ lw $t8, %lo(D_80126A04)($t8) diff --git a/asm/non_matchings/unknown_080500/func_80086A48.s b/asm/non_matchings/unknown_080500/func_80086A48.s index 6d0d482e..ff8d6527 100644 --- a/asm/non_matchings/unknown_080500/func_80086A48.s +++ b/asm/non_matchings/unknown_080500/func_80086A48.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E8414 +.float 0.1 + +.text glabel func_80086A48 /* 087648 80086A48 3C0E8012 */ lui $t6, %hi(D_80126BD4) # $t6, 0x8012 /* 08764C 80086A4C 8DCE6BD4 */ lw $t6, %lo(D_80126BD4)($t6) diff --git a/asm/non_matchings/unknown_080500/func_80086AFC.s b/asm/non_matchings/unknown_080500/func_80086AFC.s index c2663ac0..cb948fe9 100644 --- a/asm/non_matchings/unknown_080500/func_80086AFC.s +++ b/asm/non_matchings/unknown_080500/func_80086AFC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8418 +.word L80086B54, L80086CDC, L80086D54, L80086F74, L80087084, L80087110, L800871C4, L800871C4, L800871C4, L80087158 + +.text glabel func_80086AFC /* 0876FC 80086AFC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 087700 80086B00 AFBF0014 */ sw $ra, 0x14($sp) @@ -15,12 +20,13 @@ glabel func_80086AFC /* 087730 80086B30 2D41000A */ sltiu $at, $t2, 0xa /* 087734 80086B34 102001A3 */ beqz $at, .L800871C4 /* 087738 80086B38 000A5080 */ sll $t2, $t2, 2 -/* 08773C 80086B3C 3C01800F */ lui $at, %hi(D_800E8418) # $at, 0x800f +/* 08773C 80086B3C 3C01800F */ lui $at, %hi(jpt_800E8418) # $at, 0x800f /* 087740 80086B40 002A0821 */ addu $at, $at, $t2 -/* 087744 80086B44 8C2A8418 */ lw $t2, %lo(D_800E8418)($at) +/* 087744 80086B44 8C2A8418 */ lw $t2, %lo(jpt_800E8418)($at) /* 087748 80086B48 00000000 */ nop /* 08774C 80086B4C 01400008 */ jr $t2 /* 087750 80086B50 00000000 */ nop +glabel L80086B54 /* 087754 80086B54 3C098012 */ lui $t1, %hi(D_80126BE4) # $t1, 0x8012 /* 087758 80086B58 25296BE4 */ addiu $t1, %lo(D_80126BE4) # addiu $t1, $t1, 0x6be4 /* 08775C 80086B5C 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -122,6 +128,7 @@ glabel func_80086AFC /* 0878D0 80086CD0 240D0001 */ li $t5, 1 /* 0878D4 80086CD4 1000013C */ b .L800871C8 /* 0878D8 80086CD8 A32D004B */ sb $t5, 0x4b($t9) +glabel L80086CDC /* 0878DC 80086CDC 3C098012 */ lui $t1, %hi(D_80126BE4) # $t1, 0x8012 /* 0878E0 80086CE0 25296BE4 */ addiu $t1, %lo(D_80126BE4) # addiu $t1, $t1, 0x6be4 /* 0878E4 80086CE4 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -153,6 +160,7 @@ glabel func_80086AFC /* 087948 80086D48 24040000 */ li $a0, 0 /* 08794C 80086D4C 1000011F */ b .L800871CC /* 087950 80086D50 8FBF0014 */ lw $ra, 0x14($sp) +glabel L80086D54 /* 087954 80086D54 3C098012 */ lui $t1, %hi(D_80126BE4) # $t1, 0x8012 /* 087958 80086D58 25296BE4 */ addiu $t1, %lo(D_80126BE4) # addiu $t1, $t1, 0x6be4 /* 08795C 80086D5C 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -293,6 +301,7 @@ glabel func_80086AFC /* 087B68 80086F68 00000000 */ nop /* 087B6C 80086F6C 10000096 */ b .L800871C8 /* 087B70 80086F70 AFA20038 */ sw $v0, 0x38($sp) +glabel L80086F74 /* 087B74 80086F74 8CE40008 */ lw $a0, 8($a3) /* 087B78 80086F78 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 /* 087B7C 80086F7C 908C0000 */ lbu $t4, ($a0) @@ -369,6 +378,7 @@ glabel func_80086AFC /* 087C78 80087078 00000000 */ nop /* 087C7C 8008707C 10000052 */ b .L800871C8 /* 087C80 80087080 AFA20038 */ sw $v0, 0x38($sp) +glabel L80087084 /* 087C84 80087084 3C098012 */ lui $t1, %hi(D_80126BE4) # $t1, 0x8012 /* 087C88 80087088 25296BE4 */ addiu $t1, %lo(D_80126BE4) # addiu $t1, $t1, 0x6be4 /* 087C8C 8008708C 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -406,6 +416,7 @@ glabel func_80086AFC /* 087D04 80087104 00000000 */ nop /* 087D08 80087108 1000002F */ b .L800871C8 /* 087D0C 8008710C AFA20038 */ sw $v0, 0x38($sp) +glabel L80087110 /* 087D10 80087110 3C098012 */ lui $t1, %hi(D_80126BE4) # $t1, 0x8012 /* 087D14 80087114 25296BE4 */ addiu $t1, %lo(D_80126BE4) # addiu $t1, $t1, 0x6be4 /* 087D18 80087118 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -424,6 +435,7 @@ glabel func_80086AFC /* 087D4C 8008714C 00000000 */ nop /* 087D50 80087150 1000001D */ b .L800871C8 /* 087D54 80087154 AFA20038 */ sw $v0, 0x38($sp) +glabel L80087158 /* 087D58 80087158 3C098012 */ lui $t1, %hi(D_80126BE4) # $t1, 0x8012 /* 087D5C 8008715C 25296BE4 */ addiu $t1, %lo(D_80126BE4) # addiu $t1, $t1, 0x6be4 /* 087D60 80087160 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -452,6 +464,7 @@ glabel func_80086AFC /* 087DBC 800871BC 10000002 */ b .L800871C8 /* 087DC0 800871C0 ACAC0000 */ sw $t4, ($a1) .L800871C4: +glabel L800871C4 /* 087DC4 800871C4 AFA00038 */ sw $zero, 0x38($sp) .L800871C8: /* 087DC8 800871C8 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_080500/func_80087734.s b/asm/non_matchings/unknown_080500/func_80087734.s index 8ad8c89d..51220c5f 100644 --- a/asm/non_matchings/unknown_080500/func_80087734.s +++ b/asm/non_matchings/unknown_080500/func_80087734.s @@ -1,3 +1,12 @@ +.late_rodata +glabel jpt_800E8440 +.word L800878D4, L800878D4, L800878D4, L800878F0, L800878BC, L800878F0, L800878E0, L800878F0, L800878D4 +glabel jpt_800E8464 +.word L80087930, L80087948, L80087948, L80087964, L80087930, L80087964, L80087954, L80087964, L80087948 +glabel jpt_800E8488 +.word L800879A4, L800879A4, L800879A4, L80087B50, L800879A4, L80087B50, L800879A4, L80087B50, L800879BC, L800879BC + +.text glabel func_80087734 /* 088334 80087734 3C068012 */ lui $a2, %hi(D_801263BC) # $a2, 0x8012 /* 088338 80087738 8CC663BC */ lw $a2, %lo(D_801263BC)($a2) @@ -99,26 +108,30 @@ glabel func_80087734 /* 088498 80087898 2DE10009 */ sltiu $at, $t7, 9 /* 08849C 8008789C 10200014 */ beqz $at, .L800878F0 /* 0884A0 800878A0 000F7880 */ sll $t7, $t7, 2 -/* 0884A4 800878A4 3C01800F */ lui $at, %hi(D_800E8440) # $at, 0x800f +/* 0884A4 800878A4 3C01800F */ lui $at, %hi(jpt_800E8440) # $at, 0x800f /* 0884A8 800878A8 002F0821 */ addu $at, $at, $t7 -/* 0884AC 800878AC 8C2F8440 */ lw $t7, %lo(D_800E8440)($at) +/* 0884AC 800878AC 8C2F8440 */ lw $t7, %lo(jpt_800E8440)($at) /* 0884B0 800878B0 00000000 */ nop /* 0884B4 800878B4 01E00008 */ jr $t7 /* 0884B8 800878B8 00000000 */ nop +glabel L800878BC /* 0884BC 800878BC 24180005 */ li $t8, 5 /* 0884C0 800878C0 3C018012 */ lui $at, %hi(D_801263D8) # $at, 0x8012 /* 0884C4 800878C4 AC3863D8 */ sw $t8, %lo(D_801263D8)($at) /* 0884C8 800878C8 24190001 */ li $t9, 1 /* 0884CC 800878CC 100000A0 */ b .L80087B50 /* 0884D0 800878D0 AD390000 */ sw $t9, ($t1) +glabel L800878D4 /* 0884D4 800878D4 3C018012 */ lui $at, %hi(D_80126A18) # $at, 0x8012 /* 0884D8 800878D8 1000009D */ b .L80087B50 /* 0884DC 800878DC AC206A18 */ sw $zero, %lo(D_80126A18)($at) +glabel L800878E0 /* 0884E0 800878E0 240AFFFF */ li $t2, -1 /* 0884E4 800878E4 3C018012 */ lui $at, %hi(D_80126A18) # $at, 0x8012 /* 0884E8 800878E8 10000099 */ b .L80087B50 /* 0884EC 800878EC AC2A6A18 */ sw $t2, %lo(D_80126A18)($at) .L800878F0: +glabel L800878F0 /* 0884F0 800878F0 240B0001 */ li $t3, 1 /* 0884F4 800878F4 3C018012 */ lui $at, %hi(D_80126A18) # $at, 0x8012 /* 0884F8 800878F8 10000095 */ b .L80087B50 @@ -130,26 +143,30 @@ glabel func_80087734 /* 08850C 8008790C 2D810009 */ sltiu $at, $t4, 9 /* 088510 80087910 10200014 */ beqz $at, .L80087964 /* 088514 80087914 000C6080 */ sll $t4, $t4, 2 -/* 088518 80087918 3C01800F */ lui $at, %hi(D_800E8464) # $at, 0x800f +/* 088518 80087918 3C01800F */ lui $at, %hi(jpt_800E8464) # $at, 0x800f /* 08851C 8008791C 002C0821 */ addu $at, $at, $t4 -/* 088520 80087920 8C2C8464 */ lw $t4, %lo(D_800E8464)($at) +/* 088520 80087920 8C2C8464 */ lw $t4, %lo(jpt_800E8464)($at) /* 088524 80087924 00000000 */ nop /* 088528 80087928 01800008 */ jr $t4 /* 08852C 8008792C 00000000 */ nop +glabel L80087930 /* 088530 80087930 240E0005 */ li $t6, 5 /* 088534 80087934 3C018012 */ lui $at, %hi(D_801263D8) # $at, 0x8012 /* 088538 80087938 AC2E63D8 */ sw $t6, %lo(D_801263D8)($at) /* 08853C 8008793C 240F0001 */ li $t7, 1 /* 088540 80087940 10000083 */ b .L80087B50 /* 088544 80087944 AD2F0000 */ sw $t7, ($t1) +glabel L80087948 /* 088548 80087948 3C018012 */ lui $at, %hi(D_80126A1C) # $at, 0x8012 /* 08854C 8008794C 10000080 */ b .L80087B50 /* 088550 80087950 AC206A1C */ sw $zero, %lo(D_80126A1C)($at) +glabel L80087954 /* 088554 80087954 2418FFFF */ li $t8, -1 /* 088558 80087958 3C018012 */ lui $at, %hi(D_80126A1C) # $at, 0x8012 /* 08855C 8008795C 1000007C */ b .L80087B50 /* 088560 80087960 AC386A1C */ sw $t8, %lo(D_80126A1C)($at) .L80087964: +glabel L80087964 /* 088564 80087964 24190001 */ li $t9, 1 /* 088568 80087968 3C018012 */ lui $at, %hi(D_80126A1C) # $at, 0x8012 /* 08856C 8008796C 10000078 */ b .L80087B50 @@ -161,18 +178,20 @@ glabel func_80087734 /* 088580 80087980 2D61000A */ sltiu $at, $t3, 0xa /* 088584 80087984 10200072 */ beqz $at, .L80087B50 /* 088588 80087988 000B5880 */ sll $t3, $t3, 2 -/* 08858C 8008798C 3C01800F */ lui $at, %hi(D_800E8488) # $at, 0x800f +/* 08858C 8008798C 3C01800F */ lui $at, %hi(jpt_800E8488) # $at, 0x800f /* 088590 80087990 002B0821 */ addu $at, $at, $t3 -/* 088594 80087994 8C2B8488 */ lw $t3, %lo(D_800E8488)($at) +/* 088594 80087994 8C2B8488 */ lw $t3, %lo(jpt_800E8488)($at) /* 088598 80087998 00000000 */ nop /* 08859C 8008799C 01600008 */ jr $t3 /* 0885A0 800879A0 00000000 */ nop +glabel L800879A4 /* 0885A4 800879A4 240D0005 */ li $t5, 5 /* 0885A8 800879A8 3C018012 */ lui $at, %hi(D_801263D8) # $at, 0x8012 /* 0885AC 800879AC AC2D63D8 */ sw $t5, %lo(D_801263D8)($at) /* 0885B0 800879B0 240C0001 */ li $t4, 1 /* 0885B4 800879B4 10000066 */ b .L80087B50 /* 0885B8 800879B8 AD2C0000 */ sw $t4, ($t1) +glabel L800879BC /* 0885BC 800879BC 10000064 */ b .L80087B50 /* 0885C0 800879C0 AD220000 */ sw $v0, ($t1) .L800879C4: @@ -284,6 +303,7 @@ glabel func_80087734 /* 088748 80087B48 256DFFFF */ addiu $t5, $t3, -1 /* 08874C 80087B4C ACED0000 */ sw $t5, ($a3) .L80087B50: +glabel L80087B50 /* 088750 80087B50 8FBF0014 */ lw $ra, 0x14($sp) .L80087B54: /* 088754 80087B54 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/unknown_080500/func_8008FA54.s b/asm/non_matchings/unknown_080500/func_8008FA54.s index 6c2f6d18..4420b1d1 100644 --- a/asm/non_matchings/unknown_080500/func_8008FA54.s +++ b/asm/non_matchings/unknown_080500/func_8008FA54.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E84D0 +.double 1.1 +glabel D_800E84D8 +.float 1.2 + +.text glabel func_8008FA54 /* 090654 8008FA54 27BDFF80 */ addiu $sp, $sp, -0x80 /* 090658 8008FA58 3C0E8012 */ lui $t6, %hi(D_80126478) # $t6, 0x8012 diff --git a/asm/non_matchings/unknown_080500/func_800904E8.s b/asm/non_matchings/unknown_080500/func_800904E8.s index 1e45b4c2..ebe5599c 100644 --- a/asm/non_matchings/unknown_080500/func_800904E8.s +++ b/asm/non_matchings/unknown_080500/func_800904E8.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E84E0 +.double 0.1 +glabel D_800E84E8 +.double 0.1 + +.text glabel func_800904E8 /* 0910E8 800904E8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 0910EC 800904EC AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_080500/func_80090F30.s b/asm/non_matchings/unknown_080500/func_80090F30.s index d4024dae..e73a5d9b 100644 --- a/asm/non_matchings/unknown_080500/func_80090F30.s +++ b/asm/non_matchings/unknown_080500/func_80090F30.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E84F0 +.float 1.2 + +.text glabel func_80090F30 /* 091B30 80090F30 27BDFF68 */ addiu $sp, $sp, -0x98 /* 091B34 80090F34 AFBF0054 */ sw $ra, 0x54($sp) diff --git a/asm/non_matchings/unknown_080500/func_80092188.s b/asm/non_matchings/unknown_080500/func_80092188.s index d327f9ac..2d3317a0 100644 --- a/asm/non_matchings/unknown_080500/func_80092188.s +++ b/asm/non_matchings/unknown_080500/func_80092188.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E84F4 +.word L8009246C, L8009251C, L80092740, L8009287C, L8009287C + +.text glabel func_80092188 /* 092D88 80092188 3C0E800E */ lui $t6, %hi(D_800DF47C) # $t6, 0x800e /* 092D8C 8009218C 8DCEF47C */ lw $t6, %lo(D_800DF47C)($t6) @@ -189,12 +194,13 @@ glabel func_80092188 /* 093048 80092448 102001B3 */ beqz $at, .L80092B18 /* 09304C 8009244C AFA00034 */ sw $zero, 0x34($sp) /* 093050 80092450 000F7880 */ sll $t7, $t7, 2 -/* 093054 80092454 3C01800F */ lui $at, %hi(D_800E84F4) # $at, 0x800f +/* 093054 80092454 3C01800F */ lui $at, %hi(jpt_800E84F4) # $at, 0x800f /* 093058 80092458 002F0821 */ addu $at, $at, $t7 -/* 09305C 8009245C 8C2F84F4 */ lw $t7, %lo(D_800E84F4)($at) +/* 09305C 8009245C 8C2F84F4 */ lw $t7, %lo(jpt_800E84F4)($at) /* 093060 80092460 00000000 */ nop /* 093064 80092464 01E00008 */ jr $t7 /* 093068 80092468 00000000 */ nop +glabel L8009246C /* 09306C 8009246C 3C048012 */ lui $a0, %hi(D_801267D8) # $a0, 0x8012 /* 093070 80092470 248467D8 */ addiu $a0, %lo(D_801267D8) # addiu $a0, $a0, 0x67d8 /* 093074 80092474 8C830010 */ lw $v1, 0x10($a0) @@ -244,6 +250,7 @@ glabel func_80092188 /* 093110 80092510 AC3F0418 */ sw $ra, %lo(D_800E0418)($at) /* 093114 80092514 10000180 */ b .L80092B18 /* 093118 80092518 AFBF0034 */ sw $ra, 0x34($sp) +glabel L8009251C /* 09311C 8009251C 3C0A800E */ lui $t2, %hi(D_800DF4BC) # $t2, 0x800e /* 093120 80092520 8D4AF4BC */ lw $t2, %lo(D_800DF4BC)($t2) /* 093124 80092524 00002825 */ move $a1, $zero @@ -398,6 +405,7 @@ glabel func_80092188 /* 093334 80092734 00002825 */ move $a1, $zero /* 093338 80092738 100000F8 */ b .L80092B1C /* 09333C 8009273C 8FAF003C */ lw $t7, 0x3c($sp) +glabel L80092740 /* 093340 80092740 3C048012 */ lui $a0, %hi(D_801267D8) # $a0, 0x8012 /* 093344 80092744 248467D8 */ addiu $a0, %lo(D_801267D8) # addiu $a0, $a0, 0x67d8 /* 093348 80092748 8C820000 */ lw $v0, ($a0) @@ -484,6 +492,7 @@ glabel func_80092188 /* 093470 80092870 25CF0001 */ addiu $t7, $t6, 1 /* 093474 80092874 100000A8 */ b .L80092B18 /* 093478 80092878 AC2F0414 */ sw $t7, %lo(D_800E0414)($at) +glabel L8009287C /* 09347C 8009287C 24010002 */ li $at, 2 /* 093480 80092880 1461003E */ bne $v1, $at, .L8009297C /* 093484 80092884 3C19800E */ lui $t9, %hi(D_800DF4BC) # $t9, 0x800e diff --git a/asm/non_matchings/unknown_080500/func_80094D28.s b/asm/non_matchings/unknown_080500/func_80094D28.s index 8b065120..85f893c9 100644 --- a/asm/non_matchings/unknown_080500/func_80094D28.s +++ b/asm/non_matchings/unknown_080500/func_80094D28.s @@ -1,3 +1,10 @@ +.late_rodata +glabel jpt_800E8508 +.word L80094DD0, L80094FB0, L80095084, L80095588, L80095110, L800951CC +glabel D_800E8520 +.float 1.2 + +.text glabel func_80094D28 /* 095928 80094D28 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 09592C 80094D2C AFBF002C */ sw $ra, 0x2c($sp) @@ -37,12 +44,13 @@ glabel func_80094D28 /* 0959AC 80094DAC 2D410006 */ sltiu $at, $t2, 6 /* 0959B0 80094DB0 102001F5 */ beqz $at, .L80095588 /* 0959B4 80094DB4 000A5080 */ sll $t2, $t2, 2 -/* 0959B8 80094DB8 3C01800F */ lui $at, %hi(D_800E8508) # $at, 0x800f +/* 0959B8 80094DB8 3C01800F */ lui $at, %hi(jpt_800E8508) # $at, 0x800f /* 0959BC 80094DBC 002A0821 */ addu $at, $at, $t2 -/* 0959C0 80094DC0 8C2A8508 */ lw $t2, %lo(D_800E8508)($at) +/* 0959C0 80094DC0 8C2A8508 */ lw $t2, %lo(jpt_800E8508)($at) /* 0959C4 80094DC4 00000000 */ nop /* 0959C8 80094DC8 01400008 */ jr $t2 /* 0959CC 80094DCC 00000000 */ nop +glabel L80094DD0 /* 0959D0 80094DD0 3C108012 */ lui $s0, %hi(D_80126A94) # $s0, 0x8012 /* 0959D4 80094DD4 8E106A94 */ lw $s0, %lo(D_80126A94)($s0) /* 0959D8 80094DD8 3C118012 */ lui $s1, %hi(D_80126478) # $s1, 0x8012 @@ -174,6 +182,7 @@ glabel func_80094D28 /* 095BA4 80094FA4 46085402 */ mul.s $f16, $f10, $f8 /* 095BA8 80094FA8 10000177 */ b .L80095588 /* 095BAC 80094FAC E5B00088 */ swc1 $f16, 0x88($t5) +glabel L80094FB0 /* 095BB0 80094FB0 3C02800E */ lui $v0, %hi(D_800E0BEC) # $v0, 0x800e /* 095BB4 80094FB4 24420BEC */ addiu $v0, %lo(D_800E0BEC) # addiu $v0, $v0, 0xbec /* 095BB8 80094FB8 00002825 */ move $a1, $zero @@ -231,6 +240,7 @@ glabel func_80094D28 /* 095C78 80095078 A04700CD */ sb $a3, 0xcd($v0) /* 095C7C 8009507C 10000142 */ b .L80095588 /* 095C80 80095080 A04700CE */ sb $a3, 0xce($v0) +glabel L80095084 /* 095C84 80095084 3C06800E */ lui $a2, %hi(D_800E0DCC) # $a2, 0x800e /* 095C88 80095088 24C60DCC */ addiu $a2, %lo(D_800E0DCC) # addiu $a2, $a2, 0xdcc /* 095C8C 8009508C 00002825 */ move $a1, $zero @@ -269,6 +279,7 @@ glabel func_80094D28 /* 095D04 80095104 A0C3002E */ sb $v1, 0x2e($a2) /* 095D08 80095108 1000011F */ b .L80095588 /* 095D0C 8009510C 00000000 */ nop +glabel L80095110 /* 095D10 80095110 820A0117 */ lb $t2, 0x117($s0) /* 095D14 80095114 3C02800E */ lui $v0, %hi(D_800E0E4C) # $v0, 0x800e /* 095D18 80095118 11400014 */ beqz $t2, .L8009516C @@ -320,6 +331,7 @@ glabel func_80094D28 /* 095DC0 800951C0 A047006D */ sb $a3, 0x6d($v0) /* 095DC4 800951C4 100000F0 */ b .L80095588 /* 095DC8 800951C8 A047006E */ sb $a3, 0x6e($v0) +glabel L800951CC /* 095DCC 800951CC 0C0315B4 */ jal func_800C56D0 /* 095DD0 800951D0 24040007 */ li $a0, 7 /* 095DD4 800951D4 0C031525 */ jal func_800C5494 @@ -577,6 +589,7 @@ glabel func_80094D28 /* 096180 80095580 0C03157D */ jal func_800C55F4 /* 096184 80095584 24040007 */ li $a0, 7 .L80095588: +glabel L80095588 /* 096188 80095588 0C01B683 */ jal func_8006DA0C /* 09618C 8009558C 00000000 */ nop /* 096190 80095590 1440001D */ bnez $v0, .L80095608 diff --git a/asm/non_matchings/unknown_080500/func_80095624.s b/asm/non_matchings/unknown_080500/func_80095624.s index 26fc935c..89306211 100644 --- a/asm/non_matchings/unknown_080500/func_80095624.s +++ b/asm/non_matchings/unknown_080500/func_80095624.s @@ -1,39 +1,49 @@ +.late_rodata +glabel jpt_800E8524 +.word L80095650, L800956C8, L800956C8, L80095668, L80095650, L80095668, L80095680, L80095698, L800956B0 + +.text glabel func_80095624 /* 096224 80095624 308E00FF */ andi $t6, $a0, 0xff /* 096228 80095628 25CFFFFF */ addiu $t7, $t6, -1 /* 09622C 8009562C 2DE10009 */ sltiu $at, $t7, 9 /* 096230 80095630 10200025 */ beqz $at, .L800956C8 /* 096234 80095634 000F7880 */ sll $t7, $t7, 2 -/* 096238 80095638 3C01800F */ lui $at, %hi(D_800E8524) # $at, 0x800f +/* 096238 80095638 3C01800F */ lui $at, %hi(jpt_800E8524) # $at, 0x800f /* 09623C 8009563C 002F0821 */ addu $at, $at, $t7 -/* 096240 80095640 8C2F8524 */ lw $t7, %lo(D_800E8524)($at) +/* 096240 80095640 8C2F8524 */ lw $t7, %lo(jpt_800E8524)($at) /* 096244 80095644 00000000 */ nop /* 096248 80095648 01E00008 */ jr $t7 /* 09624C 8009564C 00000000 */ nop +glabel L80095650 /* 096250 80095650 3C048012 */ lui $a0, %hi(D_80126C1C) # $a0, 0x8012 /* 096254 80095654 3C18800E */ lui $t8, %hi(D_800E09D8) # $t8, 0x800e /* 096258 80095658 271809D8 */ addiu $t8, %lo(D_800E09D8) # addiu $t8, $t8, 0x9d8 /* 09625C 8009565C 24846C1C */ addiu $a0, %lo(D_80126C1C) # addiu $a0, $a0, 0x6c1c /* 096260 80095660 1000001E */ b .L800956DC /* 096264 80095664 AC980000 */ sw $t8, ($a0) +glabel L80095668 /* 096268 80095668 3C048012 */ lui $a0, %hi(D_80126C1C) # $a0, 0x8012 /* 09626C 8009566C 3C19800E */ lui $t9, %hi(D_800E09C4) # $t9, 0x800e /* 096270 80095670 273909C4 */ addiu $t9, %lo(D_800E09C4) # addiu $t9, $t9, 0x9c4 /* 096274 80095674 24846C1C */ addiu $a0, %lo(D_80126C1C) # addiu $a0, $a0, 0x6c1c /* 096278 80095678 10000018 */ b .L800956DC /* 09627C 8009567C AC990000 */ sw $t9, ($a0) +glabel L80095680 /* 096280 80095680 3C048012 */ lui $a0, %hi(D_80126C1C) # $a0, 0x8012 /* 096284 80095684 3C08800E */ lui $t0, %hi(D_800E0A04) # $t0, 0x800e /* 096288 80095688 24846C1C */ addiu $a0, %lo(D_80126C1C) # addiu $a0, $a0, 0x6c1c /* 09628C 8009568C 25080A04 */ addiu $t0, %lo(D_800E0A04) # addiu $t0, $t0, 0xa04 /* 096290 80095690 10000012 */ b .L800956DC /* 096294 80095694 AC880000 */ sw $t0, ($a0) +glabel L80095698 /* 096298 80095698 3C048012 */ lui $a0, %hi(D_80126C1C) # $a0, 0x8012 /* 09629C 8009569C 3C09800E */ lui $t1, %hi(D_800E0A14) # $t1, 0x800e /* 0962A0 800956A0 24846C1C */ addiu $a0, %lo(D_80126C1C) # addiu $a0, $a0, 0x6c1c /* 0962A4 800956A4 25290A14 */ addiu $t1, %lo(D_800E0A14) # addiu $t1, $t1, 0xa14 /* 0962A8 800956A8 1000000C */ b .L800956DC /* 0962AC 800956AC AC890000 */ sw $t1, ($a0) +glabel L800956B0 /* 0962B0 800956B0 3C048012 */ lui $a0, %hi(D_80126C1C) # $a0, 0x8012 /* 0962B4 800956B4 3C0A800E */ lui $t2, %hi(D_800E09EC) # $t2, 0x800e /* 0962B8 800956B8 24846C1C */ addiu $a0, %lo(D_80126C1C) # addiu $a0, $a0, 0x6c1c @@ -41,6 +51,7 @@ glabel func_80095624 /* 0962C0 800956C0 10000006 */ b .L800956DC /* 0962C4 800956C4 AC8A0000 */ sw $t2, ($a0) .L800956C8: +glabel L800956C8 /* 0962C8 800956C8 3C048012 */ lui $a0, %hi(D_80126C1C) # $a0, 0x8012 /* 0962CC 800956CC 3C0B800E */ lui $t3, %hi(D_800E09B0) # $t3, 0x800e /* 0962D0 800956D0 24846C1C */ addiu $a0, %lo(D_80126C1C) # addiu $a0, $a0, 0x6c1c diff --git a/asm/non_matchings/unknown_080500/func_80095728.s b/asm/non_matchings/unknown_080500/func_80095728.s index 3e826b7b..cf192211 100644 --- a/asm/non_matchings/unknown_080500/func_80095728.s +++ b/asm/non_matchings/unknown_080500/func_80095728.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8548 +.word L80095948, L80095964, L80095B34, L80095D30, L80095D50, L80095EA8, L80095EC8, L800964AC, L800964DC + +.text glabel func_80095728 /* 096328 80095728 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 09632C 8009572C AFBF0024 */ sw $ra, 0x24($sp) @@ -139,12 +144,13 @@ glabel func_80095728 /* 096524 80095924 2F010009 */ sltiu $at, $t8, 9 /* 096528 80095928 1020037A */ beqz $at, .L80096714 /* 09652C 8009592C 0018C080 */ sll $t8, $t8, 2 -/* 096530 80095930 3C01800F */ lui $at, %hi(D_800E8548) # $at, 0x800f +/* 096530 80095930 3C01800F */ lui $at, %hi(jpt_800E8548) # $at, 0x800f /* 096534 80095934 00380821 */ addu $at, $at, $t8 -/* 096538 80095938 8C388548 */ lw $t8, %lo(D_800E8548)($at) +/* 096538 80095938 8C388548 */ lw $t8, %lo(jpt_800E8548)($at) /* 09653C 8009593C 00000000 */ nop /* 096540 80095940 03000008 */ jr $t8 /* 096544 80095944 00000000 */ nop +glabel L80095948 /* 096548 80095948 30799000 */ andi $t9, $v1, 0x9000 /* 09654C 8009594C 13200371 */ beqz $t9, .L80096714 /* 096550 80095950 24070001 */ li $a3, 1 @@ -152,6 +158,7 @@ glabel func_80095728 /* 096558 80095958 3C018012 */ lui $at, %hi(D_80126A94) # $at, 0x8012 /* 09655C 8009595C 1000036D */ b .L80096714 /* 096560 80095960 AC206A94 */ sw $zero, %lo(D_80126A94)($at) +glabel L80095964 /* 096564 80095964 3C0C8012 */ lui $t4, %hi(D_80126A94) # $t4, 0x8012 /* 096568 80095968 8D8C6A94 */ lw $t4, %lo(D_80126A94)($t4) /* 09656C 8009596C 3C028012 */ lui $v0, %hi(D_80126478) # $v0, 0x8012 @@ -275,6 +282,7 @@ glabel func_80095728 /* 096728 80095B28 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 09672C 80095B2C 100002F9 */ b .L80096714 /* 096730 80095B30 AC2663E0 */ sw $a2, %lo(D_801263E0)($at) +glabel L80095B34 /* 096734 80095B34 8FA40064 */ lw $a0, 0x64($sp) /* 096738 80095B38 0C0207D3 */ jal func_80081F4C /* 09673C 80095B3C 00000000 */ nop @@ -406,6 +414,7 @@ glabel func_80095728 /* 096924 80095D24 AFAC0014 */ sw $t4, 0x14($sp) /* 096928 80095D28 1000027A */ b .L80096714 /* 09692C 80095D2C 00000000 */ nop +glabel L80095D30 /* 096930 80095D30 8FA40064 */ lw $a0, 0x64($sp) /* 096934 80095D34 0C0207D3 */ jal func_80081F4C /* 096938 80095D38 00000000 */ nop @@ -414,6 +423,7 @@ glabel func_80095728 /* 096944 80095D44 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 096948 80095D48 10000272 */ b .L80096714 /* 09694C 80095D4C AC3963E0 */ sw $t9, %lo(D_801263E0)($at) +glabel L80095D50 /* 096950 80095D50 8FA40064 */ lw $a0, 0x64($sp) /* 096954 80095D54 0C025F44 */ jal func_80097D10 /* 096958 80095D58 00000000 */ nop @@ -502,6 +512,7 @@ glabel func_80095728 /* 096A9C 80095E9C 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 096AA0 80095EA0 1000021C */ b .L80096714 /* 096AA4 80095EA4 AC2363E0 */ sw $v1, %lo(D_801263E0)($at) +glabel L80095EA8 /* 096AA8 80095EA8 8FA40064 */ lw $a0, 0x64($sp) /* 096AAC 80095EAC 0C0207D3 */ jal func_80081F4C /* 096AB0 80095EB0 00000000 */ nop @@ -510,6 +521,7 @@ glabel func_80095728 /* 096ABC 80095EBC 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 096AC0 80095EC0 10000214 */ b .L80096714 /* 096AC4 80095EC4 AC2E63E0 */ sw $t6, %lo(D_801263E0)($at) +glabel L80095EC8 /* 096AC8 80095EC8 3C058012 */ lui $a1, %hi(D_80126A98) # $a1, 0x8012 /* 096ACC 80095ECC 24A56A98 */ addiu $a1, %lo(D_80126A98) # addiu $a1, $a1, 0x6a98 /* 096AD0 80095ED0 8CA20000 */ lw $v0, ($a1) @@ -934,6 +946,7 @@ glabel func_80095728 /* 0970A0 800964A0 00002825 */ move $a1, $zero /* 0970A4 800964A4 1000009B */ b .L80096714 /* 0970A8 800964A8 00000000 */ nop +glabel L800964AC /* 0970AC 800964AC 306F9000 */ andi $t7, $v1, 0x9000 /* 0970B0 800964B0 11E00098 */ beqz $t7, .L80096714 /* 0970B4 800964B4 00000000 */ nop @@ -946,6 +959,7 @@ glabel func_80095728 /* 0970D0 800964D0 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 0970D4 800964D4 1000008F */ b .L80096714 /* 0970D8 800964D8 AC3863E0 */ sw $t8, %lo(D_801263E0)($at) +glabel L800964DC /* 0970DC 800964DC 3C0D800E */ lui $t5, %hi(D_800DF47C) # $t5, 0x800e /* 0970E0 800964E0 8DADF47C */ lw $t5, %lo(D_800DF47C)($t5) /* 0970E4 800964E4 8FB90064 */ lw $t9, 0x64($sp) diff --git a/asm/non_matchings/unknown_080500/func_80097D10.s b/asm/non_matchings/unknown_080500/func_80097D10.s index 449c1f72..b502be80 100644 --- a/asm/non_matchings/unknown_080500/func_80097D10.s +++ b/asm/non_matchings/unknown_080500/func_80097D10.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E856C +.float 0.1 + +.text glabel func_80097D10 /* 098910 80097D10 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 098914 80097D14 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_080500/func_80099E8C.s b/asm/non_matchings/unknown_080500/func_80099E8C.s index a3e4a2e3..775f6c0c 100644 --- a/asm/non_matchings/unknown_080500/func_80099E8C.s +++ b/asm/non_matchings/unknown_080500/func_80099E8C.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E8570 +.float 0.075 + +.text glabel func_80099E8C /* 09AA8C 80099E8C 27BDFF10 */ addiu $sp, $sp, -0xf0 /* 09AA90 80099E90 AFB70054 */ sw $s7, 0x54($sp) diff --git a/asm/non_matchings/unknown_080500/func_8009CFEC.s b/asm/non_matchings/unknown_080500/func_8009CFEC.s index d5a67b9b..74e2f196 100644 --- a/asm/non_matchings/unknown_080500/func_8009CFEC.s +++ b/asm/non_matchings/unknown_080500/func_8009CFEC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8588 +.word L8009D0B8, L8009D104, L8009D0C8, L8009D0D8, L8009D0E8, L8009D0F8 + +.text glabel func_8009CFEC /* 09DBEC 8009CFEC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 09DBF0 8009CFF0 3C01800E */ lui $at, %hi(D_800DF4E4) # $at, 0x800e @@ -47,32 +52,38 @@ glabel func_8009CFEC /* 09DC94 8009D094 2D210006 */ sltiu $at, $t1, 6 /* 09DC98 8009D098 1020001A */ beqz $at, .L8009D104 /* 09DC9C 8009D09C 00094880 */ sll $t1, $t1, 2 -/* 09DCA0 8009D0A0 3C01800F */ lui $at, %hi(D_800E8588) # $at, 0x800f +/* 09DCA0 8009D0A0 3C01800F */ lui $at, %hi(jpt_800E8588) # $at, 0x800f /* 09DCA4 8009D0A4 00290821 */ addu $at, $at, $t1 -/* 09DCA8 8009D0A8 8C298588 */ lw $t1, %lo(D_800E8588)($at) +/* 09DCA8 8009D0A8 8C298588 */ lw $t1, %lo(jpt_800E8588)($at) /* 09DCAC 8009D0AC 00000000 */ nop /* 09DCB0 8009D0B0 01200008 */ jr $t1 /* 09DCB4 8009D0B4 00000000 */ nop +glabel L8009D0B8 /* 09DCB8 8009D0B8 0C0274D8 */ jal func_8009D360 /* 09DCBC 8009D0BC 00000000 */ nop /* 09DCC0 8009D0C0 10000010 */ b .L8009D104 /* 09DCC4 8009D0C4 00401825 */ move $v1, $v0 +glabel L8009D0C8 /* 09DCC8 8009D0C8 0C0276CF */ jal func_8009DB3C /* 09DCCC 8009D0CC 00000000 */ nop /* 09DCD0 8009D0D0 1000000C */ b .L8009D104 /* 09DCD4 8009D0D4 00401825 */ move $v1, $v0 +glabel L8009D0D8 /* 09DCD8 8009D0D8 0C030D59 */ jal func_800C3564 /* 09DCDC 8009D0DC 00000000 */ nop /* 09DCE0 8009D0E0 10000008 */ b .L8009D104 /* 09DCE4 8009D0E4 00401825 */ move $v1, $v0 +glabel L8009D0E8 /* 09DCE8 8009D0E8 0C0279FA */ jal func_8009E7E8 /* 09DCEC 8009D0EC 00000000 */ nop /* 09DCF0 8009D0F0 10000004 */ b .L8009D104 /* 09DCF4 8009D0F4 00401825 */ move $v1, $v0 +glabel L8009D0F8 /* 09DCF8 8009D0F8 0C02767D */ jal func_8009D9F4 /* 09DCFC 8009D0FC 00000000 */ nop /* 09DD00 8009D100 00401825 */ move $v1, $v0 .L8009D104: +glabel L8009D104 /* 09DD04 8009D104 00601025 */ move $v0, $v1 .L8009D108: /* 09DD08 8009D108 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_080500/func_8009D360.s b/asm/non_matchings/unknown_080500/func_8009D360.s index 208308ff..e1c6cfaf 100644 --- a/asm/non_matchings/unknown_080500/func_8009D360.s +++ b/asm/non_matchings/unknown_080500/func_8009D360.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E85A0 +.word L8009D944, L8009D944, L8009D944, L8009D91C, L8009D8F0, L8009D8D4, L8009D8D4, L8009D8D4, L8009D618, L8009D638, L8009D7A0, L8009D840, L8009D968, L8009D998, L8009D9B0, L8009D9B0 + +.text glabel func_8009D360 /* 09DF60 8009D360 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 09DF64 8009D364 AFBF001C */ sw $ra, 0x1c($sp) @@ -176,12 +181,13 @@ glabel func_8009D360 /* 09E1F4 8009D5F4 2DA10010 */ sltiu $at, $t5, 0x10 /* 09E1F8 8009D5F8 102000FA */ beqz $at, .L8009D9E4 /* 09E1FC 8009D5FC 000D6880 */ sll $t5, $t5, 2 -/* 09E200 8009D600 3C01800F */ lui $at, %hi(D_800E85A0) # $at, 0x800f +/* 09E200 8009D600 3C01800F */ lui $at, %hi(jpt_800E85A0) # $at, 0x800f /* 09E204 8009D604 002D0821 */ addu $at, $at, $t5 -/* 09E208 8009D608 8C2D85A0 */ lw $t5, %lo(D_800E85A0)($at) +/* 09E208 8009D608 8C2D85A0 */ lw $t5, %lo(jpt_800E85A0)($at) /* 09E20C 8009D60C 00000000 */ nop /* 09E210 8009D610 01A00008 */ jr $t5 /* 09E214 8009D614 00000000 */ nop +glabel L8009D618 /* 09E218 8009D618 0C030C7B */ jal func_800C31EC /* 09E21C 8009D61C 24040007 */ li $a0, 7 /* 09E220 8009D620 24020001 */ li $v0, 1 @@ -190,6 +196,7 @@ glabel func_8009D360 /* 09E22C 8009D62C 3C01800E */ lui $at, %hi(D_800DF4D8) # $at, 0x800e /* 09E230 8009D630 100000EC */ b .L8009D9E4 /* 09E234 8009D634 A022F4D8 */ sb $v0, %lo(D_800DF4D8)($at) +glabel L8009D638 /* 09E238 8009D638 3C0E800E */ lui $t6, %hi(D_800DF4A0) # $t6, 0x800e /* 09E23C 8009D63C 8DCEF4A0 */ lw $t6, %lo(D_800DF4A0)($t6) /* 09E240 8009D640 3C01800E */ lui $at, %hi(D_800DF4DC) # $at, 0x800e @@ -285,6 +292,7 @@ glabel func_8009D360 /* 09E394 8009D794 24050001 */ li $a1, 1 /* 09E398 8009D798 10000093 */ b .L8009D9E8 /* 09E39C 8009D79C 8FBF001C */ lw $ra, 0x1c($sp) +glabel L8009D7A0 /* 09E3A0 8009D7A0 0C02749B */ jal func_8009D26C /* 09E3A4 8009D7A4 00000000 */ nop /* 09E3A8 8009D7A8 8FAC0028 */ lw $t4, 0x28($sp) @@ -327,6 +335,7 @@ glabel func_8009D360 /* 09E434 8009D834 24050001 */ li $a1, 1 /* 09E438 8009D838 1000006B */ b .L8009D9E8 /* 09E43C 8009D83C 8FBF001C */ lw $ra, 0x1c($sp) +glabel L8009D840 /* 09E440 8009D840 0C02749B */ jal func_8009D26C /* 09E444 8009D844 00000000 */ nop /* 09E448 8009D848 8FA30028 */ lw $v1, 0x28($sp) @@ -366,6 +375,7 @@ glabel func_8009D360 /* 09E4C8 8009D8C8 3C018012 */ lui $at, %hi(D_801264E2) # $at, 0x8012 /* 09E4CC 8009D8CC 10000045 */ b .L8009D9E4 /* 09E4D0 8009D8D0 A03864E2 */ sb $t8, %lo(D_801264E2)($at) +glabel L8009D8D4 /* 09E4D4 8009D8D4 24190008 */ li $t9, 8 /* 09E4D8 8009D8D8 0C030C7B */ jal func_800C31EC /* 09E4DC 8009D8DC 03252023 */ subu $a0, $t9, $a1 @@ -373,6 +383,7 @@ glabel func_8009D360 /* 09E4E4 8009D8E4 3C018012 */ lui $at, %hi(D_801264E2) # $at, 0x8012 /* 09E4E8 8009D8E8 1000003E */ b .L8009D9E4 /* 09E4EC 8009D8EC A02864E2 */ sb $t0, %lo(D_801264E2)($at) +glabel L8009D8F0 /* 09E4F0 8009D8F0 0C030C7B */ jal func_800C31EC /* 09E4F4 8009D8F4 24040011 */ li $a0, 17 /* 09E4F8 8009D8F8 3C01800E */ lui $at, %hi(D_800DF4DC) # $at, 0x800e @@ -384,6 +395,7 @@ glabel func_8009D360 /* 09E510 8009D910 240A0003 */ li $t2, 3 /* 09E514 8009D914 10000033 */ b .L8009D9E4 /* 09E518 8009D918 A02A64D8 */ sb $t2, %lo(D_801264D8)($at) +glabel L8009D91C /* 09E51C 8009D91C 0C030C7B */ jal func_800C31EC /* 09E520 8009D920 24040015 */ li $a0, 21 /* 09E524 8009D924 3C01800E */ lui $at, %hi(D_800DF4DC) # $at, 0x800e @@ -394,6 +406,7 @@ glabel func_8009D360 /* 09E538 8009D938 3C018012 */ lui $at, %hi(D_801264D8) # $at, 0x8012 /* 09E53C 8009D93C 10000029 */ b .L8009D9E4 /* 09E540 8009D940 A02064D8 */ sb $zero, %lo(D_801264D8)($at) +glabel L8009D944 /* 09E544 8009D944 240C000C */ li $t4, 12 /* 09E548 8009D948 0C030C7B */ jal func_800C31EC /* 09E54C 8009D94C 01852023 */ subu $a0, $t4, $a1 @@ -403,6 +416,7 @@ glabel func_8009D360 /* 09E55C 8009D95C 3C018012 */ lui $at, %hi(D_801264D8) # $at, 0x8012 /* 09E560 8009D960 10000020 */ b .L8009D9E4 /* 09E564 8009D964 A02064D8 */ sb $zero, %lo(D_801264D8)($at) +glabel L8009D968 /* 09E568 8009D968 3C0E800E */ lui $t6, %hi(D_800DF4DC) # $t6, 0x800e /* 09E56C 8009D96C 81CEF4DC */ lb $t6, %lo(D_800DF4DC)($t6) /* 09E570 8009D970 24190005 */ li $t9, 5 @@ -415,12 +429,14 @@ glabel func_8009D360 /* 09E58C 8009D98C 24040001 */ li $a0, 1 /* 09E590 8009D990 10000015 */ b .L8009D9E8 /* 09E594 8009D994 8FBF001C */ lw $ra, 0x1c($sp) +glabel L8009D998 /* 09E598 8009D998 3C01800E */ lui $at, %hi(D_800DF4DC) # $at, 0x800e /* 09E59C 8009D99C A020F4DC */ sb $zero, %lo(D_800DF4DC)($at) /* 09E5A0 8009D9A0 0C031588 */ jal func_800C5620 /* 09E5A4 8009D9A4 24040001 */ li $a0, 1 /* 09E5A8 8009D9A8 1000000F */ b .L8009D9E8 /* 09E5AC 8009D9AC 8FBF001C */ lw $ra, 0x1c($sp) +glabel L8009D9B0 /* 09E5B0 8009D9B0 24010007 */ li $at, 7 /* 09E5B4 8009D9B4 14A10002 */ bne $a1, $at, .L8009D9C0 /* 09E5B8 8009D9B8 24020004 */ li $v0, 4 diff --git a/asm/non_matchings/unknown_080500/func_8009DB3C.s b/asm/non_matchings/unknown_080500/func_8009DB3C.s index 71ca863e..73fe2f46 100644 --- a/asm/non_matchings/unknown_080500/func_8009DB3C.s +++ b/asm/non_matchings/unknown_080500/func_8009DB3C.s @@ -1,3 +1,10 @@ +.late_rodata +glabel jpt_800E85E0 +.word L8009DC60, L8009DEF0, L8009E37C, L8009E37C, L8009DFB0, L8009DFEC, L8009E098, L8009E194, L8009E23C, L8009E37C, L8009DC60 +glabel jpt_800E860C +.word L8009E2D0, L8009E2F4, L8009E354, L8009E354, L8009E314, L8009E354, L8009E314, L8009E2E4, L8009E354, L8009E334 + +.text glabel func_8009DB3C /* 09E73C 8009DB3C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 09E740 8009DB40 AFBF001C */ sw $ra, 0x1c($sp) @@ -71,12 +78,13 @@ glabel func_8009DB3C /* 09E83C 8009DC3C 102001CF */ beqz $at, .L8009E37C /* 09E840 8009DC40 AFA20040 */ sw $v0, 0x40($sp) /* 09E844 8009DC44 00037880 */ sll $t7, $v1, 2 -/* 09E848 8009DC48 3C01800F */ lui $at, %hi(D_800E85E0) # $at, 0x800f +/* 09E848 8009DC48 3C01800F */ lui $at, %hi(jpt_800E85E0) # $at, 0x800f /* 09E84C 8009DC4C 002F0821 */ addu $at, $at, $t7 -/* 09E850 8009DC50 8C2F85E0 */ lw $t7, %lo(D_800E85E0)($at) +/* 09E850 8009DC50 8C2F85E0 */ lw $t7, %lo(jpt_800E85E0)($at) /* 09E854 8009DC54 00000000 */ nop /* 09E858 8009DC58 01E00008 */ jr $t7 /* 09E85C 8009DC5C 00000000 */ nop +glabel L8009DC60 /* 09E860 8009DC60 3C18800E */ lui $t8, %hi(D_800DF4A0) # $t8, 0x800e /* 09E864 8009DC64 8F18F4A0 */ lw $t8, %lo(D_800DF4A0)($t8) /* 09E868 8009DC68 24190001 */ li $t9, 1 @@ -256,6 +264,7 @@ glabel func_8009DB3C /* 09EAE4 8009DEE4 24010001 */ li $at, 1 /* 09EAE8 8009DEE8 10000124 */ b .L8009E37C /* 09EAEC 8009DEEC AFAA0044 */ sw $t2, 0x44($sp) +glabel L8009DEF0 /* 09EAF0 8009DEF0 3C048012 */ lui $a0, %hi(D_801263A4) # $a0, 0x8012 /* 09EAF4 8009DEF4 8C8463A4 */ lw $a0, %lo(D_801263A4)($a0) /* 09EAF8 8009DEF8 00001825 */ move $v1, $zero @@ -309,6 +318,7 @@ glabel func_8009DB3C /* 09EBA4 8009DFA4 806364E2 */ lb $v1, %lo(D_801264E2)($v1) /* 09EBA8 8009DFA8 100000F5 */ b .L8009E380 /* 09EBAC 8009DFAC 24010001 */ li $at, 1 +glabel L8009DFB0 /* 09EBB0 8009DFB0 308CC000 */ andi $t4, $a0, 0xc000 /* 09EBB4 8009DFB4 118000F1 */ beqz $t4, .L8009E37C /* 09EBB8 8009DFB8 3C01800E */ lui $at, %hi(D_800E1E28) # $at, 0x800e @@ -324,6 +334,7 @@ glabel func_8009DB3C /* 09EBE0 8009DFE0 806364E2 */ lb $v1, %lo(D_801264E2)($v1) /* 09EBE4 8009DFE4 100000E6 */ b .L8009E380 /* 09EBE8 8009DFE8 24010001 */ li $at, 1 +glabel L8009DFEC /* 09EBEC 8009DFEC 3C02800E */ lui $v0, %hi(D_800DF4A0) # $v0, 0x800e /* 09EBF0 8009DFF0 8C42F4A0 */ lw $v0, %lo(D_800DF4A0)($v0) /* 09EBF4 8009DFF4 240300D0 */ li $v1, 208 @@ -370,6 +381,7 @@ glabel func_8009DB3C /* 09EC8C 8009E08C 806364E2 */ lb $v1, %lo(D_801264E2)($v1) /* 09EC90 8009E090 100000BB */ b .L8009E380 /* 09EC94 8009E094 24010001 */ li $at, 1 +glabel L8009E098 /* 09EC98 8009E098 3C0D800E */ lui $t5, %hi(D_800DF4A0) # $t5, 0x800e /* 09EC9C 8009E09C 8DADF4A0 */ lw $t5, %lo(D_800DF4A0)($t5) /* 09ECA0 8009E0A0 240F0001 */ li $t7, 1 @@ -435,6 +447,7 @@ glabel func_8009DB3C /* 09ED88 8009E188 806364E2 */ lb $v1, %lo(D_801264E2)($v1) /* 09ED8C 8009E18C 1000007C */ b .L8009E380 /* 09ED90 8009E190 24010001 */ li $at, 1 +glabel L8009E194 /* 09ED94 8009E194 3C0C800E */ lui $t4, %hi(D_800DF4A0) # $t4, 0x800e /* 09ED98 8009E198 8D8CF4A0 */ lw $t4, %lo(D_800DF4A0)($t4) /* 09ED9C 8009E19C 240E0001 */ li $t6, 1 @@ -478,6 +491,7 @@ glabel func_8009DB3C /* 09EE30 8009E230 806364E2 */ lb $v1, %lo(D_801264E2)($v1) /* 09EE34 8009E234 10000052 */ b .L8009E380 /* 09EE38 8009E238 24010001 */ li $at, 1 +glabel L8009E23C /* 09EE3C 8009E23C 3C0B800E */ lui $t3, %hi(D_800DF4A0) # $t3, 0x800e /* 09EE40 8009E240 8D6BF4A0 */ lw $t3, %lo(D_800DF4A0)($t3) /* 09EE44 8009E244 240D0001 */ li $t5, 1 @@ -510,21 +524,24 @@ glabel func_8009DB3C .L8009E2B0: /* 09EEB0 8009E2B0 10200028 */ beqz $at, .L8009E354 /* 09EEB4 8009E2B4 00035080 */ sll $t2, $v1, 2 -/* 09EEB8 8009E2B8 3C01800F */ lui $at, %hi(D_800E860C) # $at, 0x800f +/* 09EEB8 8009E2B8 3C01800F */ lui $at, %hi(jpt_800E860C) # $at, 0x800f /* 09EEBC 8009E2BC 002A0821 */ addu $at, $at, $t2 -/* 09EEC0 8009E2C0 8C2A860C */ lw $t2, %lo(D_800E860C)($at) +/* 09EEC0 8009E2C0 8C2A860C */ lw $t2, %lo(jpt_800E860C)($at) /* 09EEC4 8009E2C4 00000000 */ nop /* 09EEC8 8009E2C8 01400008 */ jr $t2 /* 09EECC 8009E2CC 00000000 */ nop +glabel L8009E2D0 /* 09EED0 8009E2D0 3C0C8012 */ lui $t4, %hi(D_8012639C) # $t4, 0x8012 /* 09EED4 8009E2D4 8D8C639C */ lw $t4, %lo(D_8012639C)($t4) /* 09EED8 8009E2D8 3C018012 */ lui $at, %hi(D_801264E2) # $at, 0x8012 /* 09EEDC 8009E2DC 10000024 */ b .L8009E370 /* 09EEE0 8009E2E0 A02C64E2 */ sb $t4, %lo(D_801264E2)($at) +glabel L8009E2E4 /* 09EEE4 8009E2E4 240E0006 */ li $t6, 6 /* 09EEE8 8009E2E8 3C018012 */ lui $at, %hi(D_801264E2) # $at, 0x8012 /* 09EEEC 8009E2EC 10000020 */ b .L8009E370 /* 09EEF0 8009E2F0 A02E64E2 */ sb $t6, %lo(D_801264E2)($at) +glabel L8009E2F4 /* 09EEF4 8009E2F4 3C0B800E */ lui $t3, %hi(D_800E09D8) # $t3, 0x800e /* 09EEF8 8009E2F8 256B09D8 */ addiu $t3, %lo(D_800E09D8) # addiu $t3, $t3, 0x9d8 /* 09EEFC 8009E2FC 3C018012 */ lui $at, %hi(D_801263A4) # $at, 0x8012 @@ -533,6 +550,7 @@ glabel func_8009DB3C /* 09EF08 8009E308 240D0001 */ li $t5, 1 /* 09EF0C 8009E30C 10000018 */ b .L8009E370 /* 09EF10 8009E310 A02D64E2 */ sb $t5, %lo(D_801264E2)($at) +glabel L8009E314 /* 09EF14 8009E314 3C0F800E */ lui $t7, %hi(D_800E09C4) # $t7, 0x800e /* 09EF18 8009E318 25EF09C4 */ addiu $t7, %lo(D_800E09C4) # addiu $t7, $t7, 0x9c4 /* 09EF1C 8009E31C 3C018012 */ lui $at, %hi(D_801263A4) # $at, 0x8012 @@ -541,6 +559,7 @@ glabel func_8009DB3C /* 09EF28 8009E328 24180001 */ li $t8, 1 /* 09EF2C 8009E32C 10000010 */ b .L8009E370 /* 09EF30 8009E330 A03864E2 */ sb $t8, %lo(D_801264E2)($at) +glabel L8009E334 /* 09EF34 8009E334 3C19800E */ lui $t9, %hi(D_800E09EC) # $t9, 0x800e /* 09EF38 8009E338 273909EC */ addiu $t9, %lo(D_800E09EC) # addiu $t9, $t9, 0x9ec /* 09EF3C 8009E33C 3C018012 */ lui $at, %hi(D_801263A4) # $at, 0x8012 @@ -550,6 +569,7 @@ glabel func_8009DB3C /* 09EF4C 8009E34C 10000008 */ b .L8009E370 /* 09EF50 8009E350 A02964E2 */ sb $t1, %lo(D_801264E2)($at) .L8009E354: +glabel L8009E354 /* 09EF54 8009E354 3C0A800E */ lui $t2, %hi(D_800E09B0) # $t2, 0x800e /* 09EF58 8009E358 254A09B0 */ addiu $t2, %lo(D_800E09B0) # addiu $t2, $t2, 0x9b0 /* 09EF5C 8009E35C 3C018012 */ lui $at, %hi(D_801263A4) # $at, 0x8012 @@ -562,6 +582,7 @@ glabel func_8009DB3C /* 09EF74 8009E374 806364E2 */ lb $v1, %lo(D_801264E2)($v1) /* 09EF78 8009E378 00000000 */ nop .L8009E37C: +glabel L8009E37C /* 09EF7C 8009E37C 24010001 */ li $at, 1 .L8009E380: /* 09EF80 8009E380 10610005 */ beq $v1, $at, .L8009E398 diff --git a/src/unknown_080500.c b/src/unknown_080500.c index e71574b0..757c92af 100644 --- a/src/unknown_080500.c +++ b/src/unknown_080500.c @@ -1350,170 +1350,6 @@ const char D_800E8248[] = "DEL"; const char D_800E824C[] = "OK"; const char D_800E8250[] = "loadFrontEndItem() - Item no %d out of range 0-%d\n"; -// Jump table in MenuInit -const u32 D_800E8284[] = { - 0x80081464, 0x80081454, 0x8008158C, 0x800814C4, - 0x8008158C, 0x80081504, 0x800814E4, 0x8008158C, - 0x8008158C, 0x8008158C, 0x800814A4, 0x800814B4, - 0x80081474, 0x80081484, 0x80081494, 0x800814F4, - 0x8008158C, 0x80081514, 0x8008158C, 0x800814D4, - 0x80081524, 0x80081534, 0x8008158C, 0x80081544, - 0x80081554, 0x80081564, 0x80081574, 0x8008158C, - 0x80081584 -}; - -// Jump table in MenuLoop -const u32 D_800E82F8[] = { - 0x80081634, 0x80081620, 0x800817AC, 0x800816AC, - 0x800817AC, 0x800816FC, 0x800816C0, 0x800817AC, - 0x800817AC, 0x800817AC, 0x80081684, 0x80081698, - 0x80081648, 0x8008165C, 0x80081670, 0x800816E8, - 0x800817AC, 0x80081710, 0x800817AC, 0x800816D4, - 0x80081724, 0x80081738, 0x800817AC, 0x8008174C, - 0x80081760, 0x80081774, 0x80081788, 0x800817AC, - 0x8008179C -}; - -// Jump table in DrawMenuText -const u32 D_800E836C[] = { - 0x800823E8, 0x80082454, 0x800824B8, 0x80082524, - 0x8008256C, 0x80082608, 0x80082760, 0x800827C0 -}; - -const FloatLiteral D_800E838C = { 2.6f }; -const FloatLiteral D_800E8390 = { 2.17f }; -const DoubleLiteral D_800E8398 = { 510.0 }; -const DoubleLiteral D_800E83A0 = { 510.0 }; -const DoubleLiteral D_800E83A8 = { 510.0 }; -const FloatLiteral D_800E83B0 = { 0.67f }; -const FloatLiteral D_800E83B4 = { 2.83f }; - -// Jump table in func_800853D0 -const u32 D_800E83B8[] = { - 0x8008541C, 0x8008553C, 0x80085574, 0x80085690, - 0x800856DC, 0x80085728, 0x80085828, 0x80085774, - 0x800857C0, 0x800857F0 -}; - -// Jump table in func_80085B9C -const u32 D_800E83E0[] = { - 0x80085C30, 0x80085BF8, 0x80085BF8, 0x80085C00, - 0x80085C00, 0x80085C08, 0x80085C14, 0x80085C24 -}; - -// Jump table in func_800867D4 -const u32 D_800E8400[] = { - 0x80086834, 0x80086888, 0x800868C0, 0x80086920, - 0x80086998 -}; - -const FloatLiteral D_800E8414 = { 0.1f }; - -// Jump table in func_80086AFC -const u32 D_800E8418[] = { - 0x80086B54, 0x80086CDC, 0x80086D54, 0x80086F74, - 0x80087084, 0x80087110, 0x800871C4, 0x800871C4, - 0x800871C4, 0x80087158 -}; - -// Jump table in func_80087734 -const u32 D_800E8440[] = { - 0x800878D4, 0x800878D4, 0x800878D4, 0x800878F0, - 0x800878BC, 0x800878F0, 0x800878E0, 0x800878F0, - 0x800878D4 -}; - -// Jump table in func_80087734 -const u32 D_800E8464[] = { - 0x80087930, 0x80087948, 0x80087948, 0x80087964, - 0x80087930, 0x80087964, 0x80087954, 0x80087964, - 0x80087948 -}; - -// Jump table in func_80087734 -const u32 D_800E8488[] = { - 0x800879A4, 0x800879A4, 0x800879A4, 0x80087B50, - 0x800879A4, 0x80087B50, 0x800879A4, 0x80087B50, - 0x800879BC, 0x800879BC -}; - -// Jump table in MenuSaveOptionsLoop -const u32 D_800E84B0[] = { - 0x80087D18, 0x80087D28, 0x80087D54, 0x80087D94, - 0x80087DAC, 0x80087DEC, 0x80087E04, 0x80087E1C -}; - -const DoubleLiteral D_800E84D0 = { 1.1 }; -const FloatLiteral D_800E84D8 = { 1.2f }; -const DoubleLiteral D_800E84E0 = { 0.1 }; -const DoubleLiteral D_800E84E8 = { 0.1 }; -const FloatLiteral D_800E84F0 = { 1.2f }; - -// Jump table in func_80092188 -const u32 D_800E84F4[] = { - 0x8009246C, 0x8009251C, 0x80092740, 0x8009287C, - 0x8009287C -}; - -// Jump table in func_80094D28 -const u32 D_800E8508[] = { - 0x80094DD0, 0x80094FB0, 0x80095084, 0x80095588, - 0x80095110, 0x800951CC -}; - -const FloatLiteral D_800E8520 = { 1.2f }; - -// Jump table in func_80095624 -const u32 D_800E8524[] = { - 0x80095650, 0x800956C8, 0x800956C8, 0x80095668, - 0x80095650, 0x80095668, 0x80095680, 0x80095698, - 0x800956B0 -}; - -// Jump table in func_80095728 -const u32 D_800E8548[] = { - 0x80095948, 0x80095964, 0x80095B34, 0x80095D30, - 0x80095D50, 0x80095EA8, 0x80095EC8, 0x800964AC, - 0x800964DC -}; - -const FloatLiteral D_800E856C = { 0.1f }; -const FloatLiteral D_800E8570 = { 0.075f }; - -// Jump table in MenuCreditsLoop -const u32 D_800E8574[] = { - 0x8009BA98, 0x8009BAD8, 0x8009BB08, 0x8009BB48, - 0x8009BB9C -}; - -// Jump table in func_8009CFEC -const u32 D_800E8588[] = { - 0x8009D0B8, 0x8009D104, 0x8009D0C8, 0x8009D0D8, - 0x8009D0E8, 0x8009D0F8 -}; - -// Jump table in func_8009D360 -const u32 D_800E85A0[] = { - 0x8009D944, 0x8009D944, 0x8009D944, 0x8009D91C, - 0x8009D8F0, 0x8009D8D4, 0x8009D8D4, 0x8009D8D4, - 0x8009D618, 0x8009D638, 0x8009D7A0, 0x8009D840, - 0x8009D968, 0x8009D998, 0x8009D9B0, 0x8009D9B0 -}; - -// Jump table in func_8009DB3C -const u32 D_800E85E0[] = { - 0x8009DC60, 0x8009DEF0, 0x8009E37C, 0x8009E37C, - 0x8009DFB0, 0x8009DFEC, 0x8009E098, 0x8009E194, - 0x8009E23C, 0x8009E37C, 0x8009DC60 -}; - -// Jump table in func_8009DB3C -const u32 D_800E860C[] = { - 0x8009E2D0, 0x8009E2F4, 0x8009E354, 0x8009E354, - 0x8009E314, 0x8009E354, 0x8009E314, 0x8009E2E4, - 0x8009E354, 0x8009E334 -}; - /*********************************/ /************ .bss ************/ From bc8d12f537ec34a2a21e996923726a4c002e2042 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 19:07:26 -0500 Subject: [PATCH 37/66] Moved rodata from C to GLOBAL_ASM in unknown_071730 --- .../unknown_071730/func_80071A24.s | 27 +++++++++++++++++++ src/unknown_071730.c | 9 ------- tools/python/rodata_move.py | 3 +++ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/asm/non_matchings/unknown_071730/func_80071A24.s b/asm/non_matchings/unknown_071730/func_80071A24.s index 18f8e610..a7042aa7 100644 --- a/asm/non_matchings/unknown_071730/func_80071A24.s +++ b/asm/non_matchings/unknown_071730/func_80071A24.s @@ -1,3 +1,30 @@ +.rdata +glabel D_800E7528 +.asciz "RED %d\n" +glabel D_800E7530 +.asciz "GREEN %d\n" +.ascii "\0\0" # padding +glabel D_800E753C +.asciz "BLUE %d\n" +.ascii "\0\0\0" # padding +glabel D_800E7548 +.asciz "YELLOW %d\n" +.ascii "\0" # padding +glabel D_800E7554 +.asciz "MAGENTA %d\n" +glabel D_800E7560 +.asciz "CYAN %d\n" +.ascii "\0\0\0" # padding +glabel D_800E756C +.asciz "WHITE %d\n" +.ascii "\0\0" # padding +glabel D_800E7578 +.asciz "GREY %d\n" +.ascii "\0\0\0" # padding +glabel D_800E7584 +.asciz "ORANGE %d\n\n" + +.text glabel func_80071A24 /* 072624 80071A24 3C028012 */ lui $v0, %hi(D_80123588) # $v0, 0x8012 /* 072628 80071A28 8C423588 */ lw $v0, %lo(D_80123588)($v0) diff --git a/src/unknown_071730.c b/src/unknown_071730.c index 4c194240..f09575b6 100644 --- a/src/unknown_071730.c +++ b/src/unknown_071730.c @@ -29,15 +29,6 @@ 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"; -const char D_800E7528[] = "RED %d\n"; -const char D_800E7530[] = "GREEN %d\n"; -const char D_800E753C[] = "BLUE %d\n"; -const char D_800E7548[] = "YELLOW %d\n"; -const char D_800E7554[] = "MAGENTA %d\n"; -const char D_800E7560[] = "CYAN %d\n"; -const char D_800E756C[] = "WHITE %d\n"; -const char D_800E7578[] = "GREY %d\n"; -const char D_800E7584[] = "ORANGE %d\n\n"; /*********************************/ diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index 7d1a1178..7a98fb2e 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -65,6 +65,9 @@ def adjustAsmFile(asmFilepath, refs): if ref[0] == 'asciz': rodata += 'glabel ' + ref[1] + '\n' rodata += '.' + ref[0] + ' ' + ref[2] + '\n' + strEnd = int(ref[1][-1:], 16) + len(ref[2].replace('\\', '')) - 2 + 1 + if strEnd % 4 != 0: + rodata += '.ascii "' + ('\\0' * (4 - (strEnd % 4))) + '" # padding\n' elif ref[0] == 'double' or ref[0] == 'float': lateRodata += 'glabel ' + ref[1] + '\n' lateRodata += '.' + ref[0] + ' ' + ref[2] + '\n' From 4ba114e8bd8685f3352e748c2143c95a0fed4ba3 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 19:35:42 -0500 Subject: [PATCH 38/66] Split unknown_064830.c into unknown_065550.c and moved the rest of the rodata --- asm/non_matchings/unknown_064830/alFxNew.s | 19 +- .../unknown_064830/alFxParamHdl.s | 21 +- src/unknown_064830.c | 203 ------------------ src/unknown_065550.c | 189 ++++++++++++++++ 4 files changed, 225 insertions(+), 207 deletions(-) create mode 100644 src/unknown_065550.c diff --git a/asm/non_matchings/unknown_064830/alFxNew.s b/asm/non_matchings/unknown_064830/alFxNew.s index 5b9746e2..08554ead 100644 --- a/asm/non_matchings/unknown_064830/alFxNew.s +++ b/asm/non_matchings/unknown_064830/alFxNew.s @@ -1,3 +1,12 @@ +.late_rodata +glabel jpt_800E6EA0 +.word L80064AD8, L80064AE4, L80064AFC, L80064B08, L80064AF0, L80064B14 +glabel D_800E6EB8 +.float 8.320827 +glabel D_800E6EBC +.float 0.04680453 + +.text glabel alFxNew /* 065608 80064A08 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 06560C 80064A0C AFB00038 */ sw $s0, 0x38($sp) @@ -45,27 +54,33 @@ glabel alFxNew /* 0656B4 80064AB4 1020001C */ beqz $at, .L80064B28 /* 0656B8 80064AB8 2673D028 */ addiu $s3, %lo(D_800DD028) # addiu $s3, $s3, -0x2fd8 /* 0656BC 80064ABC 00094880 */ sll $t1, $t1, 2 -/* 0656C0 80064AC0 3C01800E */ lui $at, %hi(D_800E6EA0) # $at, 0x800e +/* 0656C0 80064AC0 3C01800E */ lui $at, %hi(jpt_800E6EA0) # $at, 0x800e /* 0656C4 80064AC4 00290821 */ addu $at, $at, $t1 -/* 0656C8 80064AC8 8C296EA0 */ lw $t1, %lo(D_800E6EA0)($at) +/* 0656C8 80064AC8 8C296EA0 */ lw $t1, %lo(jpt_800E6EA0)($at) /* 0656CC 80064ACC 00000000 */ nop /* 0656D0 80064AD0 01200008 */ jr $t1 /* 0656D4 80064AD4 00000000 */ nop +glabel L80064AD8 /* 0656D8 80064AD8 3C13800E */ lui $s3, %hi(D_800DCEC0) # $s3, 0x800e /* 0656DC 80064ADC 10000012 */ b .L80064B28 /* 0656E0 80064AE0 2673CEC0 */ addiu $s3, %lo(D_800DCEC0) # addiu $s3, $s3, -0x3140 +glabel L80064AE4 /* 0656E4 80064AE4 3C13800E */ lui $s3, %hi(D_800DCF28) # $s3, 0x800e /* 0656E8 80064AE8 1000000F */ b .L80064B28 /* 0656EC 80064AEC 2673CF28 */ addiu $s3, %lo(D_800DCF28) # addiu $s3, $s3, -0x30d8 +glabel L80064AF0 /* 0656F0 80064AF0 3C13800E */ lui $s3, %hi(D_800DCFB0) # $s3, 0x800e /* 0656F4 80064AF4 1000000C */ b .L80064B28 /* 0656F8 80064AF8 2673CFB0 */ addiu $s3, %lo(D_800DCFB0) # addiu $s3, $s3, -0x3050 +glabel L80064AFC /* 0656FC 80064AFC 3C13800E */ lui $s3, %hi(D_800DCFD8) # $s3, 0x800e /* 065700 80064B00 10000009 */ b .L80064B28 /* 065704 80064B04 2673CFD8 */ addiu $s3, %lo(D_800DCFD8) # addiu $s3, $s3, -0x3028 +glabel L80064B08 /* 065708 80064B08 3C13800E */ lui $s3, %hi(D_800DD000) # $s3, 0x800e /* 06570C 80064B0C 10000006 */ b .L80064B28 /* 065710 80064B10 2673D000 */ addiu $s3, %lo(D_800DD000) # addiu $s3, $s3, -0x3000 +glabel L80064B14 /* 065714 80064B14 00105080 */ sll $t2, $s0, 2 /* 065718 80064B18 004A5821 */ addu $t3, $v0, $t2 /* 06571C 80064B1C 8D730020 */ lw $s3, 0x20($t3) diff --git a/asm/non_matchings/unknown_064830/alFxParamHdl.s b/asm/non_matchings/unknown_064830/alFxParamHdl.s index 00d6eec5..4549e313 100644 --- a/asm/non_matchings/unknown_064830/alFxParamHdl.s +++ b/asm/non_matchings/unknown_064830/alFxParamHdl.s @@ -1,3 +1,12 @@ +.late_rodata +glabel jpt_800E6E70 +.word L80063FE8, L8006401C, L8006407C, L80064050, L800640A8, L800640D4, L80064144, L800641C4 +glabel D_800E6E90 +.float 8.320827 +glabel D_800E6E94 +.float 0.04680453 + +.text glabel alFxParamHdl /* 064BAC 80063FAC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 064BB0 80063FB0 24A3FFFE */ addiu $v1, $a1, -2 @@ -8,12 +17,13 @@ glabel alFxParamHdl /* 064BC4 80063FC4 10200093 */ beqz $at, .L80064214 /* 064BC8 80063FC8 00803825 */ move $a3, $a0 /* 064BCC 80063FCC 000E7080 */ sll $t6, $t6, 2 -/* 064BD0 80063FD0 3C01800E */ lui $at, %hi(D_800E6E70) # $at, 0x800e +/* 064BD0 80063FD0 3C01800E */ lui $at, %hi(jpt_800E6E70) # $at, 0x800e /* 064BD4 80063FD4 002E0821 */ addu $at, $at, $t6 -/* 064BD8 80063FD8 8C2E6E70 */ lw $t6, %lo(D_800E6E70)($at) +/* 064BD8 80063FD8 8C2E6E70 */ lw $t6, %lo(jpt_800E6E70)($at) /* 064BDC 80063FDC 00000000 */ nop /* 064BE0 80063FE0 01C00008 */ jr $t6 /* 064BE4 80063FE4 00000000 */ nop +glabel L80063FE8 /* 064BE8 80063FE8 2401FFF8 */ li $at, -8 /* 064BEC 80063FEC 01017824 */ and $t7, $t0, $at /* 064BF0 80063FF0 8CF80020 */ lw $t8, 0x20($a3) @@ -28,6 +38,7 @@ glabel alFxParamHdl /* 064C10 80064010 03095021 */ addu $t2, $t8, $t1 /* 064C14 80064014 1000007F */ b .L80064214 /* 064C18 80064018 AD4F0000 */ sw $t7, ($t2) +glabel L8006401C /* 064C1C 8006401C 2401FFF8 */ li $at, -8 /* 064C20 80064020 01015824 */ and $t3, $t0, $at /* 064C24 80064024 8CEC0020 */ lw $t4, 0x20($a3) @@ -42,6 +53,7 @@ glabel alFxParamHdl /* 064C44 80064044 018EC821 */ addu $t9, $t4, $t6 /* 064C48 80064048 10000072 */ b .L80064214 /* 064C4C 8006404C AF2B0004 */ sw $t3, 4($t9) +glabel L80064050 /* 064C50 80064050 8CF80020 */ lw $t8, 0x20($a3) /* 064C54 80064054 04610003 */ bgez $v1, .L80064064 /* 064C58 80064058 000348C3 */ sra $t1, $v1, 3 @@ -54,6 +66,7 @@ glabel alFxParamHdl /* 064C70 80064070 030F5021 */ addu $t2, $t8, $t7 /* 064C74 80064074 10000067 */ b .L80064214 /* 064C78 80064078 A5480008 */ sh $t0, 8($t2) +glabel L8006407C /* 064C7C 8006407C 8CED0020 */ lw $t5, 0x20($a3) /* 064C80 80064080 04610003 */ bgez $v1, .L80064090 /* 064C84 80064084 000360C3 */ sra $t4, $v1, 3 @@ -66,6 +79,7 @@ glabel alFxParamHdl /* 064C9C 8006409C 01AE5821 */ addu $t3, $t5, $t6 /* 064CA0 800640A0 1000005C */ b .L80064214 /* 064CA4 800640A4 A568000A */ sh $t0, 0xa($t3) +glabel L800640A8 /* 064CA8 800640A8 8CF90020 */ lw $t9, 0x20($a3) /* 064CAC 800640AC 04610003 */ bgez $v1, .L800640BC /* 064CB0 800640B0 000348C3 */ sra $t1, $v1, 3 @@ -78,6 +92,7 @@ glabel alFxParamHdl /* 064CC8 800640C8 03387821 */ addu $t7, $t9, $t8 /* 064CCC 800640CC 10000051 */ b .L80064214 /* 064CD0 800640D0 A5E8000C */ sh $t0, 0xc($t7) +glabel L800640D4 /* 064CD4 800640D4 44882000 */ mtc1 $t0, $f4 /* 064CD8 800640D8 3C01447A */ li $at, 0x447A0000 # 1000.000000 /* 064CDC 800640DC 468021A0 */ cvt.s.w $f6, $f4 @@ -107,6 +122,7 @@ glabel alFxParamHdl /* 064D38 80064138 01AB4821 */ addu $t1, $t5, $t3 /* 064D3C 8006413C 10000035 */ b .L80064214 /* 064D40 80064140 E5280010 */ swc1 $f8, 0x10($t1) +glabel L80064144 /* 064D44 80064144 8CF90020 */ lw $t9, 0x20($a3) /* 064D48 80064148 04610003 */ bgez $v1, .L80064158 /* 064D4C 8006414C 0003C0C3 */ sra $t8, $v1, 3 @@ -141,6 +157,7 @@ glabel alFxParamHdl /* 064DB8 800641B8 462021A0 */ cvt.s.d $f6, $f4 /* 064DBC 800641BC 10000015 */ b .L80064214 /* 064DC0 800641C0 E446001C */ swc1 $f6, 0x1c($v0) +glabel L800641C4 /* 064DC4 800641C4 04610003 */ bgez $v1, .L800641D4 /* 064DC8 800641C8 000310C3 */ sra $v0, $v1, 3 /* 064DCC 800641CC 24610007 */ addiu $at, $v1, 7 diff --git a/src/unknown_064830.c b/src/unknown_064830.c index c8101ab5..42821e13 100644 --- a/src/unknown_064830.c +++ b/src/unknown_064830.c @@ -13,119 +13,8 @@ s32 D_800DCEB4 = 0x10; // Currently unknown, might be a different type. s32 D_800DCEB8 = 0x10; // Currently unknown, might be a different type. s32 D_800DCEBC = 0x20; // Currently unknown, might be a different type. -// TODO: Figure out what this actually is. -s32 D_800DCEC0[26] = { - 0x00000003, 0x00000FA0, - 0x00000000, 0x00000870, - 0x00002666, 0xFFFFD99A, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x000002F8, 0x000005F0, - 0x00000CCC, 0xFFFFF334, - 0x00003FFF, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000960, - 0x00001388, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00005000 -}; - -// TODO: Figure out what this actually is. -s32 D_800DCF28[34] = { - 0x00000004, 0x00000FA0, - 0x00000000, 0x00000A50, - 0x00002666, 0xFFFFD99A, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000370, 0x00000870, - 0x00000CCC, 0xFFFFF334, - 0x00003FFF, 0x00000000, - 0x00000000, 0x00000000, - 0x00000A50, 0x00000E38, - 0x00000CCC, 0xFFFFF334, - 0x00003FFF, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000EB0, - 0x00001F40, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00005000 -}; - -// TODO: Figure out what this actually is. -s32 D_800DCFB0[10] = { - 0x00000001, 0x00001F40, - 0x00000000, 0x00001BF8, - 0x00002EE0, 0x00000000, - 0x00007FFF, 0x00000000, - 0x00000000, 0x00000000 -}; - -// TODO: Figure out what this actually is. -s32 D_800DCFD8[10] = { - 0x00000001, 0x00000320, - 0x00000000, 0x000000C8, - 0x00004000, 0x00000000, - 0x00007FFF, 0x00001DB0, - 0x000002BC, 0x00000000 -}; - -// TODO: Figure out what this actually is. -s32 D_800DD000[10] = { - 0x00000001, 0x00000320, - 0x00000000, 0x000000C8, - 0x00000000, 0x00005FFF, - 0x00007FFF, 0x0000017C, - 0x000001F4, 0x00000000 -}; - -// TODO: Figure out what this actually is. -s32 D_800DD028[10] = { - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000 -}; - /*******************************/ -/************ .rodata ************/ - -// Jump table in alFxParamHdl -const u32 D_800E6E70[] = { - 0x80063FE8, 0x8006401C, 0x8006407C, 0x80064050, - 0x800640A8, 0x800640D4, 0x80064144, 0x800641C4 -}; - -const FloatLiteral D_800E6E90 = { 8.320827f }; -const FloatLiteral D_800E6E94 = { 0.04680453f }; - -const DoubleLiteral D_800E6E98 = { 0.0f }; // Probably a file boundary. - -// Jump table in alFxNew -const u32 D_800E6EA0[] = { - 0x80064AD8, 0x80064AE4, 0x80064AFC, 0x80064B08, - 0x80064AF0, 0x80064B14 -}; - -const FloatLiteral D_800E6EB8 = { 8.320827f }; -const FloatLiteral D_800E6EBC = { 0.04680453f }; - -/*********************************/ - -extern s32 alAuxBusPull; -extern s32 alAuxBusParam; -extern s32 alEnvMixerPull; -extern s32 alEnvmixerParam; -extern s32 alLoadParam; -extern s32 alLoadPull; -extern s32 alResampleParam; -extern s32 alResamplePull; -extern s32 alMainBusParam; -extern s32 alMainBusPull; -extern s32 alSaveParam; -extern s32 alSavePull; - GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxPull.s") s32 alFxParam(void* filter, s32 paramID, void* param) { @@ -138,7 +27,6 @@ s32 alFxParam(void* filter, s32 paramID, void* param) { GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxParamHdl.s") GLOBAL_ASM("asm/non_matchings/unknown_064830/_loadOutputBuffer.s") - /* * This routine is for loading data from the delay line buff. If the * address of curr_ptr < r->base, it will force it to be within r->base @@ -245,94 +133,3 @@ Acmd *_filterBuffer(ALLowPass *lp, s32 buff, s32 count, Acmd *p) GLOBAL_ASM("asm/non_matchings/unknown_064830/_doModFunc.s") GLOBAL_ASM("asm/non_matchings/unknown_064830/func_8006492C.s") - -#define SCALE 16384 - -void init_lpfilter(ALLowPass *lp) -{ - s32 i, temp; - s16 fc; - f64 ffc, fcoef; - - temp = lp->fc * SCALE; - fc = temp >> 15; - lp->fgain = SCALE - fc; - - lp->first = 1; - for (i=0; i<8; i++) - lp->fcvec.fccoef[i] = 0; - - lp->fcvec.fccoef[i++] = fc; - fcoef = ffc = (f64)fc/SCALE; - - for (; i<16; i++){ - fcoef *= ffc; - lp->fcvec.fccoef[i] = (s16)(fcoef * SCALE); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxNew.s") - -void alEnvmixerNew(ALEnvMixer* e, s32 arg1) { - alFilterNew(e, &alEnvMixerPull, &alEnvmixerParam, 4); - e->state = alHeapDBAlloc(0, 0, arg1, 1, 0x50); - e->first = 1; - e->motion = AL_STOPPED; - e->volume = 1; - e->ltgt = 1; - e->rtgt = 1; - e->cvolL = 1; - e->cvolR = 1; - e->dryamt = 0; - e->wetamt = 0; - e->lratm = 1; - e->lratl = 0; - e->delta = 0; - e->segEnd = 0; - e->pan = 0; - e->ctrlList = 0; - e->ctrlTail = 0; - e->sources = 0; -} - -void alLoadNew(ALLoadFilter* arg0, s32 (*arg1)(s32*), s32 arg2) { - alFilterNew(arg0, &alLoadPull, &alLoadParam, 0); - arg0->state = alHeapDBAlloc(0, 0, arg2, 1, 0x20); - arg0->lstate = alHeapDBAlloc(0, 0, arg2, 1, 0x20); - arg0->dma = arg1(&arg0->dmaState); - arg0->lastsam = 0; - arg0->first = 1; - arg0->memin = 0; -} - -void alResampleNew(ALResampler* r, ALHeap* hp) { - alFilterNew(r, &alResamplePull, &alResampleParam, 1); - r->state = alHeapDBAlloc(0, 0, hp, 1, 0x20); - r->first = 1; - r->motion = AL_STOPPED; - r->upitch = 0; - r->ctrlList = 0; - r->ctrlTail = 0; - r->delta = 0.0f; - r->ratio = 1.0f; -} - -void alAuxBusNew(ALAuxBus* m, void* sources, s32 maxSources) { - alFilterNew(m, &alAuxBusPull, &alAuxBusParam, 6); - m->sourceCount = 0; - m->maxSources = maxSources; - m->sources = sources; -} - -void alMainBusNew(ALMainBus* m, void* sources, s32 maxSources) { - alFilterNew(m, &alMainBusPull, &alMainBusParam, 7); - m->sourceCount = 0; - m->maxSources = maxSources; - m->sources = sources; -} - -void alSaveNew(ALSave* f) { - alFilterNew(f, &alSavePull, &alSaveParam, AL_SAVE); - f->dramout = 0; - f->first = 1; -} diff --git a/src/unknown_065550.c b/src/unknown_065550.c new file mode 100644 index 00000000..a098f86e --- /dev/null +++ b/src/unknown_065550.c @@ -0,0 +1,189 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80064950 */ + +#include "types.h" +#include "macros.h" +#include "libultra_internal.h" +#include "audio_internal.h" + +#define SCALE 16384 + +/************ .data ************/ + +// TODO: Figure out what this actually is. +s32 D_800DCEC0[26] = { + 0x00000003, 0x00000FA0, + 0x00000000, 0x00000870, + 0x00002666, 0xFFFFD99A, + 0x00000000, 0x00000000, + 0x00000000, 0x00000000, + 0x000002F8, 0x000005F0, + 0x00000CCC, 0xFFFFF334, + 0x00003FFF, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00000960, + 0x00001388, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00005000 +}; + +// TODO: Figure out what this actually is. +s32 D_800DCF28[34] = { + 0x00000004, 0x00000FA0, + 0x00000000, 0x00000A50, + 0x00002666, 0xFFFFD99A, + 0x00000000, 0x00000000, + 0x00000000, 0x00000000, + 0x00000370, 0x00000870, + 0x00000CCC, 0xFFFFF334, + 0x00003FFF, 0x00000000, + 0x00000000, 0x00000000, + 0x00000A50, 0x00000E38, + 0x00000CCC, 0xFFFFF334, + 0x00003FFF, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00000EB0, + 0x00001F40, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00005000 +}; + +// TODO: Figure out what this actually is. +s32 D_800DCFB0[10] = { + 0x00000001, 0x00001F40, + 0x00000000, 0x00001BF8, + 0x00002EE0, 0x00000000, + 0x00007FFF, 0x00000000, + 0x00000000, 0x00000000 +}; + +// TODO: Figure out what this actually is. +s32 D_800DCFD8[10] = { + 0x00000001, 0x00000320, + 0x00000000, 0x000000C8, + 0x00004000, 0x00000000, + 0x00007FFF, 0x00001DB0, + 0x000002BC, 0x00000000 +}; + +// TODO: Figure out what this actually is. +s32 D_800DD000[10] = { + 0x00000001, 0x00000320, + 0x00000000, 0x000000C8, + 0x00000000, 0x00005FFF, + 0x00007FFF, 0x0000017C, + 0x000001F4, 0x00000000 +}; + +// TODO: Figure out what this actually is. +s32 D_800DD028[10] = { + 0x00000000, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00000000, + 0x00000000, 0x00000000 +}; + +/*******************************/ + +extern s32 alAuxBusPull; +extern s32 alAuxBusParam; +extern s32 alEnvMixerPull; +extern s32 alEnvmixerParam; +extern s32 alLoadParam; +extern s32 alLoadPull; +extern s32 alResampleParam; +extern s32 alResamplePull; +extern s32 alMainBusParam; +extern s32 alMainBusPull; +extern s32 alSaveParam; +extern s32 alSavePull; + +void init_lpfilter(ALLowPass *lp) +{ + s32 i, temp; + s16 fc; + f64 ffc, fcoef; + + temp = lp->fc * SCALE; + fc = temp >> 15; + lp->fgain = SCALE - fc; + + lp->first = 1; + for (i=0; i<8; i++) + lp->fcvec.fccoef[i] = 0; + + lp->fcvec.fccoef[i++] = fc; + fcoef = ffc = (f64)fc/SCALE; + + for (; i<16; i++){ + fcoef *= ffc; + lp->fcvec.fccoef[i] = (s16)(fcoef * SCALE); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxNew.s") + +void alEnvmixerNew(ALEnvMixer* e, s32 arg1) { + alFilterNew(e, &alEnvMixerPull, &alEnvmixerParam, 4); + e->state = alHeapDBAlloc(0, 0, arg1, 1, 0x50); + e->first = 1; + e->motion = AL_STOPPED; + e->volume = 1; + e->ltgt = 1; + e->rtgt = 1; + e->cvolL = 1; + e->cvolR = 1; + e->dryamt = 0; + e->wetamt = 0; + e->lratm = 1; + e->lratl = 0; + e->delta = 0; + e->segEnd = 0; + e->pan = 0; + e->ctrlList = 0; + e->ctrlTail = 0; + e->sources = 0; +} + +void alLoadNew(ALLoadFilter* arg0, s32 (*arg1)(s32*), s32 arg2) { + alFilterNew(arg0, &alLoadPull, &alLoadParam, 0); + arg0->state = alHeapDBAlloc(0, 0, arg2, 1, 0x20); + arg0->lstate = alHeapDBAlloc(0, 0, arg2, 1, 0x20); + arg0->dma = arg1(&arg0->dmaState); + arg0->lastsam = 0; + arg0->first = 1; + arg0->memin = 0; +} + +void alResampleNew(ALResampler* r, ALHeap* hp) { + alFilterNew(r, &alResamplePull, &alResampleParam, 1); + r->state = alHeapDBAlloc(0, 0, hp, 1, 0x20); + r->first = 1; + r->motion = AL_STOPPED; + r->upitch = 0; + r->ctrlList = 0; + r->ctrlTail = 0; + r->delta = 0.0f; + r->ratio = 1.0f; +} + +void alAuxBusNew(ALAuxBus* m, void* sources, s32 maxSources) { + alFilterNew(m, &alAuxBusPull, &alAuxBusParam, 6); + m->sourceCount = 0; + m->maxSources = maxSources; + m->sources = sources; +} + +void alMainBusNew(ALMainBus* m, void* sources, s32 maxSources) { + alFilterNew(m, &alMainBusPull, &alMainBusParam, 7); + m->sourceCount = 0; + m->maxSources = maxSources; + m->sources = sources; +} + +void alSaveNew(ALSave* f) { + alFilterNew(f, &alSavePull, &alSaveParam, AL_SAVE); + f->dramout = 0; + f->first = 1; +} From 16c2094f75f0ab4fd070a49c68733b64a394291e Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 19:47:01 -0500 Subject: [PATCH 39/66] Moved rodata from C to GLOBAL_ASM in unknown_043920 --- .../unknown_043920/func_80042D20.s | 31 ++ .../unknown_043920/func_8004447C.s | 27 +- .../unknown_043920/func_800452A0.s | 33 +- .../unknown_043920/func_80046524.s | 56 ++++ .../unknown_043920/func_80048C7C.s | 19 +- .../unknown_043920/func_80048E64.s | 5 + .../unknown_043920/func_800494E0.s | 5 + .../unknown_043920/func_80049794.s | 52 ++++ .../unknown_043920/func_8004C140.s | 5 + .../unknown_043920/func_8004C2B0.s | 14 + .../unknown_043920/func_8004CC20.s | 11 + .../unknown_043920/func_8004DE38.s | 43 ++- .../unknown_043920/func_8004F7F4.s | 17 + .../unknown_043920/func_80050A28.s | 43 +++ .../unknown_043920/func_8005250C.s | 16 +- .../unknown_043920/func_80052B64.s | 5 + .../unknown_043920/func_80052D7C.s | 26 ++ .../unknown_043920/func_80053478.s | 10 + .../unknown_043920/func_80053750.s | 9 + .../unknown_043920/func_80053E9C.s | 20 +- .../unknown_043920/func_80054110.s | 11 + .../unknown_043920/func_8005492C.s | 24 ++ .../unknown_043920/func_80054FD0.s | 7 + .../unknown_043920/func_80055EC0.s | 38 ++- .../unknown_043920/func_8005698C.s | 7 + .../unknown_043920/func_80057220.s | 5 + .../unknown_043920/func_80057A40.s | 25 +- .../unknown_043920/func_800581E8.s | 7 + .../unknown_043920/func_80059208.s | 5 + .../unknown_043920/func_80059790.s | 5 + .../unknown_043920/func_80059E40.s | 7 + .../unknown_043920/func_8005A6F0.s | 45 ++- .../unknown_043920/func_8005B818.s | 20 ++ src/unknown_043920.c | 292 +----------------- 34 files changed, 634 insertions(+), 311 deletions(-) diff --git a/asm/non_matchings/unknown_043920/func_80042D20.s b/asm/non_matchings/unknown_043920/func_80042D20.s index e2fd4cda..633d653d 100644 --- a/asm/non_matchings/unknown_043920/func_80042D20.s +++ b/asm/non_matchings/unknown_043920/func_80042D20.s @@ -1,3 +1,34 @@ +.late_rodata +glabel D_800E62A8 +.double -2500.0 +glabel D_800E62B0 +.double 0.025 +glabel D_800E62B8 +.double 0.561 +glabel D_800E62C0 +.double 0.004 +glabel D_800E62C8 +.double 0.025 +glabel D_800E62D0 +.double 0.561 +glabel D_800E62D8 +.double 0.004 +glabel D_800E62E0 +.double 0.2 +glabel D_800E62E8 +.double 0.004 +glabel D_800E62F0 +.double 0.595 +glabel D_800E62F8 +.double 0.025 +glabel D_800E6300 +.double 500.0 +glabel D_800E6308 +.double 650.0 +glabel D_800E6310 +.double -0.3 + +.text glabel func_80042D20 /* 043920 80042D20 27BDFF68 */ addiu $sp, $sp, -0x98 /* 043924 80042D24 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_043920/func_8004447C.s b/asm/non_matchings/unknown_043920/func_8004447C.s index 5c5112fe..92af9e13 100644 --- a/asm/non_matchings/unknown_043920/func_8004447C.s +++ b/asm/non_matchings/unknown_043920/func_8004447C.s @@ -1,3 +1,13 @@ +.late_rodata +glabel jpt_800E6318 +.word L800446AC, L80044A04, L80044A04, L80044A04, L80044A04, L80044F54, L80044A04 +glabel jpt_800E6334 +.word L80044A2C, L80044A44, L80044A60, L80044A94, L80044ADC, L80044AC8 +.word 0 # Padding +glabel D_800E6350 +.double 300.0 + +.text glabel func_8004447C /* 04507C 8004447C 3C018012 */ lui $at, %hi(D_8011D52C) # $at, 0x8012 /* 045080 80044480 AC20D52C */ sw $zero, %lo(D_8011D52C)($at) @@ -142,12 +152,13 @@ glabel func_8004447C /* 045288 80044688 10200245 */ beqz $at, .L80044FA0 /* 04528C 8004468C 24050001 */ li $a1, 1 /* 045290 80044690 000D6880 */ sll $t5, $t5, 2 -/* 045294 80044694 3C01800E */ lui $at, %hi(D_800E6318) # $at, 0x800e +/* 045294 80044694 3C01800E */ lui $at, %hi(jpt_800E6318) # $at, 0x800e /* 045298 80044698 002D0821 */ addu $at, $at, $t5 -/* 04529C 8004469C 8C2D6318 */ lw $t5, %lo(D_800E6318)($at) +/* 04529C 8004469C 8C2D6318 */ lw $t5, %lo(jpt_800E6318)($at) /* 0452A0 800446A0 00000000 */ nop /* 0452A4 800446A4 01A00008 */ jr $t5 /* 0452A8 800446A8 00000000 */ nop +glabel L800446AC /* 0452AC 800446AC 00002025 */ move $a0, $zero /* 0452B0 800446B0 0C01BE53 */ jal func_8006F94C /* 0452B4 800446B4 24050009 */ li $a1, 9 @@ -378,22 +389,25 @@ glabel func_8004447C /* 0455F8 800449F8 A21801CD */ sb $t8, 0x1cd($s0) /* 0455FC 800449FC 10000168 */ b .L80044FA0 /* 045600 80044A00 A60C01C6 */ sh $t4, 0x1c6($s0) +glabel L80044A04 /* 045604 80044A04 246DFFFE */ addiu $t5, $v1, -2 /* 045608 80044A08 2DA10006 */ sltiu $at, $t5, 6 /* 04560C 80044A0C 10200033 */ beqz $at, .L80044ADC /* 045610 80044A10 000D6880 */ sll $t5, $t5, 2 -/* 045614 80044A14 3C01800E */ lui $at, %hi(D_800E6334) # $at, 0x800e +/* 045614 80044A14 3C01800E */ lui $at, %hi(jpt_800E6334) # $at, 0x800e /* 045618 80044A18 002D0821 */ addu $at, $at, $t5 -/* 04561C 80044A1C 8C2D6334 */ lw $t5, %lo(D_800E6334)($at) +/* 04561C 80044A1C 8C2D6334 */ lw $t5, %lo(jpt_800E6334)($at) /* 045620 80044A20 00000000 */ nop /* 045624 80044A24 01A00008 */ jr $t5 /* 045628 80044A28 00000000 */ nop +glabel L80044A2C /* 04562C 80044A2C 860E01C6 */ lh $t6, 0x1c6($s0) /* 045630 80044A30 00000000 */ nop /* 045634 80044A34 15C00029 */ bnez $t6, .L80044ADC /* 045638 80044A38 00000000 */ nop /* 04563C 80044A3C 10000027 */ b .L80044ADC /* 045640 80044A40 A20501CD */ sb $a1, 0x1cd($s0) +glabel L80044A44 /* 045644 80044A44 820F0172 */ lb $t7, 0x172($s0) /* 045648 80044A48 24190002 */ li $t9, 2 /* 04564C 80044A4C 11E00023 */ beqz $t7, .L80044ADC @@ -401,6 +415,7 @@ glabel func_8004447C /* 045654 80044A54 A21901CD */ sb $t9, 0x1cd($s0) /* 045658 80044A58 10000020 */ b .L80044ADC /* 04565C 80044A5C A61801C6 */ sh $t8, 0x1c6($s0) +glabel L80044A60 /* 045660 80044A60 820C0173 */ lb $t4, 0x173($s0) /* 045664 80044A64 3C018012 */ lui $at, %hi(D_8011D58C) # $at, 0x8012 /* 045668 80044A68 11800005 */ beqz $t4, .L80044A80 @@ -415,6 +430,7 @@ glabel func_8004447C /* 045688 80044A88 002E0821 */ addu $at, $at, $t6 /* 04568C 80044A8C 10000013 */ b .L80044ADC /* 045690 80044A90 A020D58C */ sb $zero, %lo(D_8011D58C)($at) +glabel L80044A94 /* 045694 80044A94 820F0002 */ lb $t7, 2($s0) /* 045698 80044A98 3C198012 */ lui $t9, %hi(D_8011D58C) # $t9, 0x8012 /* 04569C 80044A9C 032FC821 */ addu $t9, $t9, $t7 @@ -429,12 +445,14 @@ glabel func_8004447C .L80044AC0: /* 0456C0 80044AC0 10000006 */ b .L80044ADC /* 0456C4 80044AC4 A20501CD */ sb $a1, 0x1cd($s0) +glabel L80044AC8 /* 0456C8 80044AC8 820C0185 */ lb $t4, 0x185($s0) /* 0456CC 80044ACC 00000000 */ nop /* 0456D0 80044AD0 15800002 */ bnez $t4, .L80044ADC /* 0456D4 80044AD4 00000000 */ nop /* 0456D8 80044AD8 A20501CD */ sb $a1, 0x1cd($s0) .L80044ADC: +glabel L80044ADC /* 0456DC 80044ADC 920401CE */ lbu $a0, 0x1ce($s0) /* 0456E0 80044AE0 240100FF */ li $at, 255 /* 0456E4 80044AE4 10810026 */ beq $a0, $at, .L80044B80 @@ -749,6 +767,7 @@ glabel func_8004447C .L80044F4C: /* 045B4C 80044F4C 10000014 */ b .L80044FA0 /* 045B50 80044F50 AE000158 */ sw $zero, 0x158($s0) +glabel L80044F54 /* 045B54 80044F54 8FAF0078 */ lw $t7, 0x78($sp) /* 045B58 80044F58 24070002 */ li $a3, 2 /* 045B5C 80044F5C C5EC000C */ lwc1 $f12, 0xc($t7) diff --git a/asm/non_matchings/unknown_043920/func_800452A0.s b/asm/non_matchings/unknown_043920/func_800452A0.s index b4e4d33a..d765453b 100644 --- a/asm/non_matchings/unknown_043920/func_800452A0.s +++ b/asm/non_matchings/unknown_043920/func_800452A0.s @@ -1,3 +1,15 @@ +.late_rodata +glabel jpt_800E6358 +.word L800456A0, L800456A8, L800456B0, L800456BC, L800456CC, L800456D4, L800456B0, L800456DC +glabel D_800E6378 +.float 1000000.0 +glabel jpt_800E637C +.word L80045ADC, L80045AF8, L80045B30, L80045B30, L80045B58, L80045B70, L80045BB8, L80045ADC +.word 0 # Padding +glabel D_800E63A0 +.double 500.0 + +.text glabel func_800452A0 /* 045EA0 800452A0 27BDFF48 */ addiu $sp, $sp, -0xb8 /* 045EA4 800452A4 3C018012 */ lui $at, %hi(D_8011D52C) # $at, 0x8012 @@ -283,27 +295,34 @@ glabel func_800452A0 /* 04627C 8004567C 2F210008 */ sltiu $at, $t9, 8 /* 046280 80045680 10200018 */ beqz $at, .L800456E4 /* 046284 80045684 0019C880 */ sll $t9, $t9, 2 -/* 046288 80045688 3C01800E */ lui $at, %hi(D_800E6358) # $at, 0x800e +/* 046288 80045688 3C01800E */ lui $at, %hi(jpt_800E6358) # $at, 0x800e /* 04628C 8004568C 00390821 */ addu $at, $at, $t9 -/* 046290 80045690 8C396358 */ lw $t9, %lo(D_800E6358)($at) +/* 046290 80045690 8C396358 */ lw $t9, %lo(jpt_800E6358)($at) /* 046294 80045694 00000000 */ nop /* 046298 80045698 03200008 */ jr $t9 /* 04629C 8004569C 00000000 */ nop +glabel L800456A0 /* 0462A0 800456A0 10000010 */ b .L800456E4 /* 0462A4 800456A4 2413002D */ li $s3, 45 +glabel L800456A8 /* 0462A8 800456A8 1000000E */ b .L800456E4 /* 0462AC 800456AC 2413005C */ li $s3, 92 +glabel L800456B0 /* 0462B0 800456B0 2413005C */ li $s3, 92 /* 0462B4 800456B4 1000000B */ b .L800456E4 /* 0462B8 800456B8 24120002 */ li $s2, 2 +glabel L800456BC /* 0462BC 800456BC 82B10002 */ lb $s1, 2($s5) /* 0462C0 800456C0 2413005C */ li $s3, 92 /* 0462C4 800456C4 10000007 */ b .L800456E4 /* 0462C8 800456C8 24120002 */ li $s2, 2 +glabel L800456CC /* 0462CC 800456CC 10000005 */ b .L800456E4 /* 0462D0 800456D0 24130011 */ li $s3, 17 +glabel L800456D4 /* 0462D4 800456D4 10000003 */ b .L800456E4 /* 0462D8 800456D8 24130001 */ li $s3, 1 +glabel L800456DC /* 0462DC 800456DC 2413002D */ li $s3, 45 /* 0462E0 800456E0 24120001 */ li $s2, 1 .L800456E4: @@ -579,12 +598,13 @@ glabel func_800452A0 /* 0466B8 80045AB8 2D810008 */ sltiu $at, $t4, 8 /* 0466BC 80045ABC 10200050 */ beqz $at, .L80045C00 /* 0466C0 80045AC0 000C6080 */ sll $t4, $t4, 2 -/* 0466C4 80045AC4 3C01800E */ lui $at, %hi(D_800E637C) # $at, 0x800e +/* 0466C4 80045AC4 3C01800E */ lui $at, %hi(jpt_800E637C) # $at, 0x800e /* 0466C8 80045AC8 002C0821 */ addu $at, $at, $t4 -/* 0466CC 80045ACC 8C2C637C */ lw $t4, %lo(D_800E637C)($at) +/* 0466CC 80045ACC 8C2C637C */ lw $t4, %lo(jpt_800E637C)($at) /* 0466D0 80045AD0 00000000 */ nop /* 0466D4 80045AD4 01800008 */ jr $t4 /* 0466D8 80045AD8 00000000 */ nop +glabel L80045ADC /* 0466DC 80045ADC 8EAD0144 */ lw $t5, 0x144($s5) /* 0466E0 80045AE0 240E0004 */ li $t6, 4 /* 0466E4 80045AE4 11A00047 */ beqz $t5, .L80045C04 @@ -592,6 +612,7 @@ glabel func_800452A0 /* 0466EC 80045AEC A2A001CD */ sb $zero, 0x1cd($s5) /* 0466F0 80045AF0 10000043 */ b .L80045C00 /* 0466F4 80045AF4 A2AE01CE */ sb $t6, 0x1ce($s5) +glabel L80045AF8 /* 0466F8 80045AF8 3C014059 */ li $at, 0x40590000 # 3.390625 /* 0466FC 80045AFC 44818800 */ mtc1 $at, $f17 /* 046700 80045B00 44808000 */ mtc1 $zero, $f16 @@ -606,6 +627,7 @@ glabel func_800452A0 /* 046724 80045B24 35F82000 */ ori $t8, $t7, 0x2000 /* 046728 80045B28 10000035 */ b .L80045C00 /* 04672C 80045B2C AC580000 */ sw $t8, ($v0) +glabel L80045B30 /* 046730 80045B30 3C014069 */ li $at, 0x40690000 # 3.640625 /* 046734 80045B34 44812800 */ mtc1 $at, $f5 /* 046738 80045B38 44802000 */ mtc1 $zero, $f4 @@ -616,12 +638,14 @@ glabel func_800452A0 /* 04674C 80045B4C 8FBF0054 */ lw $ra, 0x54($sp) /* 046750 80045B50 1000002B */ b .L80045C00 /* 046754 80045B54 A2A001CD */ sb $zero, 0x1cd($s5) +glabel L80045B58 /* 046758 80045B58 82B90173 */ lb $t9, 0x173($s5) /* 04675C 80045B5C 00000000 */ nop /* 046760 80045B60 13200028 */ beqz $t9, .L80045C04 /* 046764 80045B64 8FBF0054 */ lw $ra, 0x54($sp) /* 046768 80045B68 10000025 */ b .L80045C00 /* 04676C 80045B6C A2A001CD */ sb $zero, 0x1cd($s5) +glabel L80045B70 /* 046770 80045B70 82A90173 */ lb $t1, 0x173($s5) /* 046774 80045B74 3C01800E */ lui $at, %hi(D_800E63A4) # $at, 0x800e /* 046778 80045B78 15200002 */ bnez $t1, .L80045B84 @@ -641,6 +665,7 @@ glabel func_800452A0 /* 0467AC 80045BAC AC4A0000 */ sw $t2, ($v0) /* 0467B0 80045BB0 10000013 */ b .L80045C00 /* 0467B4 80045BB4 A2A001CD */ sb $zero, 0x1cd($s5) +glabel L80045BB8 /* 0467B8 80045BB8 3C014069 */ li $at, 0x40690000 # 3.640625 /* 0467BC 80045BBC 44818800 */ mtc1 $at, $f17 /* 0467C0 80045BC0 44808000 */ mtc1 $zero, $f16 diff --git a/asm/non_matchings/unknown_043920/func_80046524.s b/asm/non_matchings/unknown_043920/func_80046524.s index d8aa6cf7..4128d38c 100644 --- a/asm/non_matchings/unknown_043920/func_80046524.s +++ b/asm/non_matchings/unknown_043920/func_80046524.s @@ -1,3 +1,59 @@ +.late_rodata +glabel D_800E63A8 +.double 1.15 +glabel D_800E63B0 +.double 0.016 +glabel D_800E63B8 +.double 0.016 +glabel D_800E63C0 +.double 1.2 +glabel D_800E63C8 +.double 0.046 +glabel D_800E63D0 +.double 1.2 +glabel D_800E63D8 +.float 1.2 +.word 0 # Padding +glabel D_800E63E0 +.double 0.046 +glabel D_800E63E8 +.double 0.3 +glabel D_800E63F0 +.float 0.004 +.word 0 # Padding +glabel D_800E63F8 +.double 0.025 +glabel D_800E6400 +.double 300.0 +glabel D_800E6408 +.double 0.02 +glabel D_800E6410 +.double 1.7 +glabel D_800E6418 +.double 0.35 +glabel D_800E6420 +.double 0.2 +glabel D_800E6428 +.double 0.07 +glabel D_800E6430 +.double 0.8 +glabel D_800E6438 +.double 0.65 +glabel D_800E6440 +.double 0.65 +glabel D_800E6448 +.double 35.0 +glabel D_800E6450 +.float -10000.0 +.word 0 # Padding +glabel D_800E6458 +.double 0.8 +glabel D_800E6460 +.double 0.05 +glabel D_800E6468 +.float 0.11 + +.text glabel func_80046524 /* 047124 80046524 27BDFED8 */ addiu $sp, $sp, -0x128 /* 047128 80046528 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80048C7C.s b/asm/non_matchings/unknown_043920/func_80048C7C.s index 23ff83bc..117b389f 100644 --- a/asm/non_matchings/unknown_043920/func_80048C7C.s +++ b/asm/non_matchings/unknown_043920/func_80048C7C.s @@ -1,3 +1,13 @@ +.late_rodata +glabel jpt_800E646C +.word L80048D40, L80048D40, L80048E50, L80048DAC, L80048E18, L80048DB8 +.word 0 # Padding +glabel D_800E6488 +.double 0.7 +glabel D_800E6490 +.double 20.5 + +.text glabel func_80048C7C /* 04987C 80048C7C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 049880 80048C80 AFBF001C */ sw $ra, 0x1c($sp) @@ -47,12 +57,13 @@ glabel func_80048C7C /* 04991C 80048D1C 2F210006 */ sltiu $at, $t9, 6 /* 049920 80048D20 1020004B */ beqz $at, .L80048E50 /* 049924 80048D24 0019C880 */ sll $t9, $t9, 2 -/* 049928 80048D28 3C01800E */ lui $at, %hi(D_800E646C) # $at, 0x800e +/* 049928 80048D28 3C01800E */ lui $at, %hi(jpt_800E646C) # $at, 0x800e /* 04992C 80048D2C 00390821 */ addu $at, $at, $t9 -/* 049930 80048D30 8C39646C */ lw $t9, %lo(D_800E646C)($at) +/* 049930 80048D30 8C39646C */ lw $t9, %lo(jpt_800E646C)($at) /* 049934 80048D34 00000000 */ nop /* 049938 80048D38 03200008 */ jr $t9 /* 04993C 80048D3C 00000000 */ nop +glabel L80048D40 /* 049940 80048D40 24080001 */ li $t0, 1 /* 049944 80048D44 14600008 */ bnez $v1, .L80048D68 /* 049948 80048D48 A20801F1 */ sb $t0, 0x1f1($s0) @@ -81,9 +92,11 @@ glabel func_80048C7C /* 0499A0 80048DA0 46203220 */ cvt.s.d $f8, $f6 /* 0499A4 80048DA4 1000002A */ b .L80048E50 /* 0499A8 80048DA8 E4880024 */ swc1 $f8, 0x24($a0) +glabel L80048DAC /* 0499AC 80048DAC 2409003C */ li $t1, 60 /* 0499B0 80048DB0 10000027 */ b .L80048E50 /* 0499B4 80048DB4 A20901ED */ sb $t1, 0x1ed($s0) +glabel L80048DB8 /* 0499B8 80048DB8 3C01800E */ lui $at, %hi(D_800E648C) # $at, 0x800e /* 0499BC 80048DBC C4216488 */ lwc1 $f1, %lo(D_800E6488)($at) /* 0499C0 80048DC0 C420648C */ lwc1 $f0, %lo(D_800E648C)($at) @@ -109,6 +122,7 @@ glabel func_80048C7C /* 049A0C 80048E0C 46209120 */ cvt.s.d $f4, $f18 /* 049A10 80048E10 1000000F */ b .L80048E50 /* 049A14 80048E14 E4840024 */ swc1 $f4, 0x24($a0) +glabel L80048E18 /* 049A18 80048E18 44800000 */ mtc1 $zero, $f0 /* 049A1C 80048E1C 240B0001 */ li $t3, 1 /* 049A20 80048E20 A20B01F1 */ sb $t3, 0x1f1($s0) @@ -124,6 +138,7 @@ glabel func_80048C7C /* 049A48 80048E48 0C015C12 */ jal func_80057048 /* 049A4C 80048E4C E4920020 */ swc1 $f18, 0x20($a0) .L80048E50: +glabel L80048E50 /* 049A50 80048E50 A2000187 */ sb $zero, 0x187($s0) .L80048E54: /* 049A54 80048E54 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80048E64.s b/asm/non_matchings/unknown_043920/func_80048E64.s index f30e2590..3fbdec9e 100644 --- a/asm/non_matchings/unknown_043920/func_80048E64.s +++ b/asm/non_matchings/unknown_043920/func_80048E64.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6498 +.double 65.0 + +.text glabel func_80048E64 /* 049A64 80048E64 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 049A68 80048E68 3C014325 */ li $at, 0x43250000 # 165.000000 diff --git a/asm/non_matchings/unknown_043920/func_800494E0.s b/asm/non_matchings/unknown_043920/func_800494E0.s index cd647457..4ebc8a01 100644 --- a/asm/non_matchings/unknown_043920/func_800494E0.s +++ b/asm/non_matchings/unknown_043920/func_800494E0.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E64A0 +.double 0.16666666666666666 + +.text glabel func_800494E0 /* 04A0E0 800494E0 27BDFF78 */ addiu $sp, $sp, -0x88 /* 04A0E4 800494E4 8FB80098 */ lw $t8, 0x98($sp) diff --git a/asm/non_matchings/unknown_043920/func_80049794.s b/asm/non_matchings/unknown_043920/func_80049794.s index 4d82fb7d..dfd316ec 100644 --- a/asm/non_matchings/unknown_043920/func_80049794.s +++ b/asm/non_matchings/unknown_043920/func_80049794.s @@ -1,3 +1,55 @@ +.late_rodata +glabel D_800E64A8 +.double 1.09 +glabel D_800E64B0 +.double 0.4 +glabel D_800E64B8 +.double 0.01 +glabel D_800E64C0 +.double 0.01 +glabel D_800E64C8 +.double 0.016 +glabel D_800E64D0 +.double 1.2 +glabel D_800E64D8 +.float 1.2 +.word 0 # Padding +glabel D_800E64E0 +.double 0.016 +glabel D_800E64E8 +.float 1.4 +glabel D_800E64EC +.float 0.01 +glabel D_800E64F0 +.float 0.02 +glabel D_800E64F4 +.float 0.004 +glabel D_800E64F8 +.double 0.6 +glabel D_800E6500 +.double 0.3 +glabel D_800E6508 +.float 1.2 +.word 0 # Padding +glabel D_800E6510 +.double 0.00015 +glabel D_800E6518 +.double 1.8 +glabel D_800E6520 +.double 0.4 +glabel D_800E6528 +.float 0.4 +.word 0 # Padding +glabel D_800E6530 +.double 0.058823529411764705 +glabel D_800E6538 +.double 0.05 +glabel D_800E6540 +.double 0.65 +glabel D_800E6548 +.double 0.65 + +.text glabel func_80049794 /* 04A394 80049794 27BDFF08 */ addiu $sp, $sp, -0xf8 /* 04A398 80049798 AFBF0034 */ sw $ra, 0x34($sp) diff --git a/asm/non_matchings/unknown_043920/func_8004C140.s b/asm/non_matchings/unknown_043920/func_8004C140.s index 4ad08d1d..327ce778 100644 --- a/asm/non_matchings/unknown_043920/func_8004C140.s +++ b/asm/non_matchings/unknown_043920/func_8004C140.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6550 +.double 0.7 + +.text glabel func_8004C140 /* 04CD40 8004C140 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 04CD44 8004C144 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_043920/func_8004C2B0.s b/asm/non_matchings/unknown_043920/func_8004C2B0.s index c7c14ba1..51c01f57 100644 --- a/asm/non_matchings/unknown_043920/func_8004C2B0.s +++ b/asm/non_matchings/unknown_043920/func_8004C2B0.s @@ -1,3 +1,17 @@ +.late_rodata +glabel D_800E6558 +.double 0.4 +glabel D_800E6560 +.double 0.005555555555555556 +glabel D_800E6568 +.float 0.4 +.word 0 # Padding +glabel D_800E6570 +.double 65.0 +glabel D_800E6578 +.double 0.2 + +.text glabel func_8004C2B0 /* 04CEB0 8004C2B0 3C014348 */ li $at, 0x43480000 # 200.000000 /* 04CEB4 8004C2B4 44810000 */ mtc1 $at, $f0 diff --git a/asm/non_matchings/unknown_043920/func_8004CC20.s b/asm/non_matchings/unknown_043920/func_8004CC20.s index a480de1f..0c254ae3 100644 --- a/asm/non_matchings/unknown_043920/func_8004CC20.s +++ b/asm/non_matchings/unknown_043920/func_8004CC20.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E6580 +.float 1.3 +glabel D_800E6584 +.float 0.1 +glabel D_800E6588 +.float 0.002 +glabel D_800E658C +.float 0.01 + +.text glabel func_8004CC20 /* 04D820 8004CC20 27BDFF28 */ addiu $sp, $sp, -0xd8 /* 04D824 8004CC24 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_043920/func_8004DE38.s b/asm/non_matchings/unknown_043920/func_8004DE38.s index 722bcafd..2326d11c 100644 --- a/asm/non_matchings/unknown_043920/func_8004DE38.s +++ b/asm/non_matchings/unknown_043920/func_8004DE38.s @@ -1,3 +1,30 @@ +.late_rodata +glabel D_800E6590 +.double 1.2 +glabel D_800E6598 +.double 0.45 +glabel D_800E65A0 +.float -0.02 +glabel D_800E65A4 +.float 0.87 +glabel D_800E65A8 +.float 0.9 +glabel D_800E65AC +.float -10000.0 +glabel jpt_800E65B0 +.word L8004EB84, L8004EBBC, L8004EBD8, L8004EBF4, L8004EBA0, L8004EC10, L8004EC50, L8004EC90, L8004EC90, L8004ED88, L8004EBF4, L8004ECD0, L8004ED10, L8004ED50 +glabel D_800E65E8 +.float 1.12 +glabel D_800E65EC +.float 0.02 +glabel D_800E65F0 +.float -0.02 +glabel D_800E65F4 +.float 265.0 +glabel D_800E65F8 +.double 1500.0 + +.text glabel func_8004DE38 /* 04EA38 8004DE38 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 04EA3C 8004DE3C AFBF002C */ sw $ra, 0x2c($sp) @@ -911,12 +938,13 @@ glabel func_8004DE38 /* 04F760 8004EB60 2D21000E */ sltiu $at, $t1, 0xe /* 04F764 8004EB64 10200088 */ beqz $at, .L8004ED88 /* 04F768 8004EB68 00094880 */ sll $t1, $t1, 2 -/* 04F76C 8004EB6C 3C01800E */ lui $at, %hi(D_800E65B0) # $at, 0x800e +/* 04F76C 8004EB6C 3C01800E */ lui $at, %hi(jpt_800E65B0) # $at, 0x800e /* 04F770 8004EB70 00290821 */ addu $at, $at, $t1 -/* 04F774 8004EB74 8C2965B0 */ lw $t1, %lo(D_800E65B0)($at) +/* 04F774 8004EB74 8C2965B0 */ lw $t1, %lo(jpt_800E65B0)($at) /* 04F778 8004EB78 00000000 */ nop /* 04F77C 8004EB7C 01200008 */ jr $t1 /* 04F780 8004EB80 00000000 */ nop +glabel L8004EB84 /* 04F784 8004EB84 8FA400B4 */ lw $a0, 0xb4($sp) /* 04F788 8004EB88 8FA5009C */ lw $a1, 0x9c($sp) /* 04F78C 8004EB8C 02203025 */ move $a2, $s1 @@ -924,6 +952,7 @@ glabel func_8004DE38 /* 04F794 8004EB94 02003825 */ move $a3, $s0 /* 04F798 8004EB98 1000007C */ b .L8004ED8C /* 04F79C 8004EB9C 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EBA0 /* 04F7A0 8004EBA0 8FA400B4 */ lw $a0, 0xb4($sp) /* 04F7A4 8004EBA4 8FA5009C */ lw $a1, 0x9c($sp) /* 04F7A8 8004EBA8 02203025 */ move $a2, $s1 @@ -931,6 +960,7 @@ glabel func_8004DE38 /* 04F7B0 8004EBB0 02003825 */ move $a3, $s0 /* 04F7B4 8004EBB4 10000075 */ b .L8004ED8C /* 04F7B8 8004EBB8 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EBBC /* 04F7BC 8004EBBC 8FA400B4 */ lw $a0, 0xb4($sp) /* 04F7C0 8004EBC0 8FA5009C */ lw $a1, 0x9c($sp) /* 04F7C4 8004EBC4 02203025 */ move $a2, $s1 @@ -938,6 +968,7 @@ glabel func_8004DE38 /* 04F7CC 8004EBCC 02003825 */ move $a3, $s0 /* 04F7D0 8004EBD0 1000006E */ b .L8004ED8C /* 04F7D4 8004EBD4 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EBD8 /* 04F7D8 8004EBD8 8FA400B4 */ lw $a0, 0xb4($sp) /* 04F7DC 8004EBDC 8FA5009C */ lw $a1, 0x9c($sp) /* 04F7E0 8004EBE0 02203025 */ move $a2, $s1 @@ -945,6 +976,7 @@ glabel func_8004DE38 /* 04F7E8 8004EBE8 02003825 */ move $a3, $s0 /* 04F7EC 8004EBEC 10000067 */ b .L8004ED8C /* 04F7F0 8004EBF0 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EBF4 /* 04F7F4 8004EBF4 8FA400B4 */ lw $a0, 0xb4($sp) /* 04F7F8 8004EBF8 8FA5009C */ lw $a1, 0x9c($sp) /* 04F7FC 8004EBFC 02203025 */ move $a2, $s1 @@ -952,6 +984,7 @@ glabel func_8004DE38 /* 04F804 8004EC04 02003825 */ move $a3, $s0 /* 04F808 8004EC08 10000060 */ b .L8004ED8C /* 04F80C 8004EC0C 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EC10 /* 04F810 8004EC10 3C0B8012 */ lui $t3, %hi(D_8011D528) # $t3, 0x8012 /* 04F814 8004EC14 3C0D8012 */ lui $t5, %hi(D_8011D52C) # $t5, 0x8012 /* 04F818 8004EC18 3C0C8012 */ lui $t4, %hi(D_8011D540) # $t4, 0x8012 @@ -968,6 +1001,7 @@ glabel func_8004DE38 /* 04F844 8004EC44 02003825 */ move $a3, $s0 /* 04F848 8004EC48 10000050 */ b .L8004ED8C /* 04F84C 8004EC4C 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EC50 /* 04F850 8004EC50 3C0E8012 */ lui $t6, %hi(D_8011D528) # $t6, 0x8012 /* 04F854 8004EC54 3C0F8012 */ lui $t7, %hi(D_8011D52C) # $t7, 0x8012 /* 04F858 8004EC58 3C088012 */ lui $t0, %hi(D_8011D540) # $t0, 0x8012 @@ -984,6 +1018,7 @@ glabel func_8004DE38 /* 04F884 8004EC84 02003825 */ move $a3, $s0 /* 04F888 8004EC88 10000040 */ b .L8004ED8C /* 04F88C 8004EC8C 820A0175 */ lb $t2, 0x175($s0) +glabel L8004EC90 /* 04F890 8004EC90 3C188012 */ lui $t8, %hi(D_8011D528) # $t8, 0x8012 /* 04F894 8004EC94 3C198012 */ lui $t9, %hi(D_8011D534) # $t9, 0x8012 /* 04F898 8004EC98 3C0A8012 */ lui $t2, %hi(D_8011D540) # $t2, 0x8012 @@ -1000,6 +1035,7 @@ glabel func_8004DE38 /* 04F8C4 8004ECC4 02003825 */ move $a3, $s0 /* 04F8C8 8004ECC8 10000030 */ b .L8004ED8C /* 04F8CC 8004ECCC 820A0175 */ lb $t2, 0x175($s0) +glabel L8004ECD0 /* 04F8D0 8004ECD0 3C098012 */ lui $t1, %hi(D_8011D528) # $t1, 0x8012 /* 04F8D4 8004ECD4 3C0B8012 */ lui $t3, %hi(D_8011D52C) # $t3, 0x8012 /* 04F8D8 8004ECD8 3C0D8012 */ lui $t5, %hi(D_8011D540) # $t5, 0x8012 @@ -1016,6 +1052,7 @@ glabel func_8004DE38 /* 04F904 8004ED04 02003825 */ move $a3, $s0 /* 04F908 8004ED08 10000020 */ b .L8004ED8C /* 04F90C 8004ED0C 820A0175 */ lb $t2, 0x175($s0) +glabel L8004ED10 /* 04F910 8004ED10 3C0C8012 */ lui $t4, %hi(D_8011D528) # $t4, 0x8012 /* 04F914 8004ED14 3C0E8012 */ lui $t6, %hi(D_8011D52C) # $t6, 0x8012 /* 04F918 8004ED18 3C0F8012 */ lui $t7, %hi(D_8011D540) # $t7, 0x8012 @@ -1032,6 +1069,7 @@ glabel func_8004DE38 /* 04F944 8004ED44 02003825 */ move $a3, $s0 /* 04F948 8004ED48 10000010 */ b .L8004ED8C /* 04F94C 8004ED4C 820A0175 */ lb $t2, 0x175($s0) +glabel L8004ED50 /* 04F950 8004ED50 3C088012 */ lui $t0, %hi(D_8011D528) # $t0, 0x8012 /* 04F954 8004ED54 3C188012 */ lui $t8, %hi(D_8011D52C) # $t8, 0x8012 /* 04F958 8004ED58 3C198012 */ lui $t9, %hi(D_8011D540) # $t9, 0x8012 @@ -1047,6 +1085,7 @@ glabel func_8004DE38 /* 04F980 8004ED80 0C017CC4 */ jal func_8005F310 /* 04F984 8004ED84 02003825 */ move $a3, $s0 .L8004ED88: +glabel L8004ED88 /* 04F988 8004ED88 820A0175 */ lb $t2, 0x175($s0) .L8004ED8C: /* 04F98C 8004ED8C 00000000 */ nop diff --git a/asm/non_matchings/unknown_043920/func_8004F7F4.s b/asm/non_matchings/unknown_043920/func_8004F7F4.s index 22c9006d..611b821d 100644 --- a/asm/non_matchings/unknown_043920/func_8004F7F4.s +++ b/asm/non_matchings/unknown_043920/func_8004F7F4.s @@ -1,3 +1,20 @@ +.late_rodata +glabel D_800E6600 +.double 0.065 +glabel D_800E6608 +.double 0.3 +glabel D_800E6610 +.double 0.1 +glabel D_800E6618 +.double 0.3 +glabel D_800E6620 +.double 0.1 +glabel D_800E6628 +.double 0.004 +glabel D_800E6630 +.double 0.65 + +.text glabel func_8004F7F4 /* 0503F4 8004F7F4 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 0503F8 8004F7F8 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80050A28.s b/asm/non_matchings/unknown_043920/func_80050A28.s index df7030a4..1938d2c6 100644 --- a/asm/non_matchings/unknown_043920/func_80050A28.s +++ b/asm/non_matchings/unknown_043920/func_80050A28.s @@ -1,3 +1,46 @@ +.late_rodata +glabel D_800E6638 +.double 0.024999999999999998 +glabel D_800E6640 +.double 0.4 +glabel D_800E6648 +.double 1.1 +glabel D_800E6650 +.double -0.3 +glabel D_800E6658 +.double 0.3 +glabel D_800E6660 +.float 0.02 +.word 0 # Padding +glabel D_800E6668 +.double 0.9 +glabel D_800E6670 +.double 0.7 +glabel D_800E6678 +.double 1.7 +glabel D_800E6680 +.double 0.15 +glabel D_800E6688 +.double 0.3 +glabel D_800E6690 +.double 0.32 +glabel D_800E6698 +.double -0.04 +glabel D_800E66A0 +.double 0.04 +glabel D_800E66A8 +.double 0.9 +glabel D_800E66B0 +.double 0.3 +glabel D_800E66B8 +.double 0.1 +glabel D_800E66C0 +.float 0.1 +.word 0 # Padding +glabel D_800E66C8 +.double 0.05 + +.text glabel func_80050A28 /* 051628 80050A28 27BDFF88 */ addiu $sp, $sp, -0x78 /* 05162C 80050A2C AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_043920/func_8005250C.s b/asm/non_matchings/unknown_043920/func_8005250C.s index 548a6596..d2d79256 100644 --- a/asm/non_matchings/unknown_043920/func_8005250C.s +++ b/asm/non_matchings/unknown_043920/func_8005250C.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E66D0 +.word L80052678, L80052978, L80052978, L800527AC, L8005280C, L80052858, L800528A4, L80052910 + +.text glabel func_8005250C /* 05310C 8005250C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 053110 80052510 AFBF0024 */ sw $ra, 0x24($sp) @@ -92,12 +97,13 @@ glabel func_8005250C /* 053254 80052654 2D410008 */ sltiu $at, $t2, 8 /* 053258 80052658 102000C7 */ beqz $at, .L80052978 /* 05325C 8005265C 000A5080 */ sll $t2, $t2, 2 -/* 053260 80052660 3C01800E */ lui $at, %hi(D_800E66D0) # $at, 0x800e +/* 053260 80052660 3C01800E */ lui $at, %hi(jpt_800E66D0) # $at, 0x800e /* 053264 80052664 002A0821 */ addu $at, $at, $t2 -/* 053268 80052668 8C2A66D0 */ lw $t2, %lo(D_800E66D0)($at) +/* 053268 80052668 8C2A66D0 */ lw $t2, %lo(jpt_800E66D0)($at) /* 05326C 8005266C 00000000 */ nop /* 053270 80052670 01400008 */ jr $t2 /* 053274 80052674 00000000 */ nop +glabel L80052678 /* 053278 80052678 84AC01A2 */ lh $t4, 0x1a2($a1) /* 05327C 8005267C 3C018012 */ lui $at, %hi(D_8011D570) # $at, 0x8012 /* 053280 80052680 000C6823 */ negu $t5, $t4 @@ -180,6 +186,7 @@ glabel func_8005250C /* 0533A0 800527A0 8FBF0024 */ lw $ra, 0x24($sp) /* 0533A4 800527A4 10000074 */ b .L80052978 /* 0533A8 800527A8 A0AE01F2 */ sb $t6, 0x1f2($a1) +glabel L800527AC /* 0533AC 800527AC 90B801F3 */ lbu $t8, 0x1f3($a1) /* 0533B0 800527B0 8FA40028 */ lw $a0, 0x28($sp) /* 0533B4 800527B4 33080004 */ andi $t0, $t8, 4 @@ -205,6 +212,7 @@ glabel func_8005250C /* 053400 80052800 31ABFFFB */ andi $t3, $t5, 0xfffb /* 053404 80052804 1000005C */ b .L80052978 /* 053408 80052808 A0AB01F3 */ sb $t3, 0x1f3($a1) +glabel L8005280C /* 05340C 8005280C 8FAE0030 */ lw $t6, 0x30($sp) /* 053410 80052810 8FA40028 */ lw $a0, 0x28($sp) /* 053414 80052814 240F0020 */ li $t7, 32 @@ -224,6 +232,7 @@ glabel func_8005250C /* 05344C 8005284C 3308FFF7 */ andi $t0, $t8, 0xfff7 /* 053450 80052850 10000049 */ b .L80052978 /* 053454 80052854 A0A801F3 */ sb $t0, 0x1f3($a1) +glabel L80052858 /* 053458 80052858 3C098012 */ lui $t1, %hi(D_8011D528) # $t1, 0x8012 /* 05345C 8005285C 8D29D528 */ lw $t1, %lo(D_8011D528)($t1) /* 053460 80052860 8FA40028 */ lw $a0, 0x28($sp) @@ -244,6 +253,7 @@ glabel func_8005250C /* 053498 80052898 AFAB001C */ sw $t3, 0x1c($sp) /* 05349C 8005289C 10000037 */ b .L8005297C /* 0534A0 800528A0 8FBF0024 */ lw $ra, 0x24($sp) +glabel L800528A4 /* 0534A4 800528A4 C4AA002C */ lwc1 $f10, 0x2c($a1) /* 0534A8 800528A8 44804800 */ mtc1 $zero, $f9 /* 0534AC 800528AC 44804000 */ mtc1 $zero, $f8 @@ -273,6 +283,7 @@ glabel func_8005250C /* 053504 80052904 AFA8001C */ sw $t0, 0x1c($sp) /* 053508 80052908 1000001C */ b .L8005297C /* 05350C 8005290C 8FBF0024 */ lw $ra, 0x24($sp) +glabel L80052910 /* 053510 80052910 8FAC0030 */ lw $t4, 0x30($sp) /* 053514 80052914 8FA40028 */ lw $a0, 0x28($sp) /* 053518 80052918 24090060 */ li $t1, 96 @@ -300,6 +311,7 @@ glabel func_8005250C /* 053570 80052970 0C014A62 */ jal func_80052988 /* 053574 80052974 AFB9001C */ sw $t9, 0x1c($sp) .L80052978: +glabel L80052978 /* 053578 80052978 8FBF0024 */ lw $ra, 0x24($sp) .L8005297C: /* 05357C 8005297C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/unknown_043920/func_80052B64.s b/asm/non_matchings/unknown_043920/func_80052B64.s index bdc0050a..c4a3ea52 100644 --- a/asm/non_matchings/unknown_043920/func_80052B64.s +++ b/asm/non_matchings/unknown_043920/func_80052B64.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E66F0 +.double 0.97 + +.text glabel func_80052B64 /* 053764 80052B64 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 053768 80052B68 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80052D7C.s b/asm/non_matchings/unknown_043920/func_80052D7C.s index 3354655e..b8f90151 100644 --- a/asm/non_matchings/unknown_043920/func_80052D7C.s +++ b/asm/non_matchings/unknown_043920/func_80052D7C.s @@ -1,3 +1,29 @@ +.late_rodata +glabel D_800E66F8 +.double 0.87 +glabel D_800E6700 +.double 0.9 +glabel D_800E6708 +.double 0.3 +glabel D_800E6710 +.double 1.6 +glabel D_800E6718 +.double 0.025 +glabel D_800E6720 +.float 0.45 +.word 0 # Padding +glabel D_800E6728 +.double 0.97 +glabel D_800E6730 +.double 0.2 +glabel D_800E6738 +.double 0.2 +glabel D_800E6740 +.double 1.33 +glabel D_800E6748 +.double 0.53 + +.text glabel func_80052D7C /* 05397C 80052D7C 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 053980 80052D80 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_043920/func_80053478.s b/asm/non_matchings/unknown_043920/func_80053478.s index 21e2b4d3..17e71be2 100644 --- a/asm/non_matchings/unknown_043920/func_80053478.s +++ b/asm/non_matchings/unknown_043920/func_80053478.s @@ -1,3 +1,13 @@ +.late_rodata +glabel D_800E6750 +.double 1.8 +glabel D_800E6758 +.float 1.8 +.word 0 # Padding +glabel D_800E6760 +.double 0.2 + +.text glabel func_80053478 /* 054078 80053478 C480002C */ lwc1 $f0, 0x2c($a0) /* 05407C 8005347C 44806800 */ mtc1 $zero, $f13 diff --git a/asm/non_matchings/unknown_043920/func_80053750.s b/asm/non_matchings/unknown_043920/func_80053750.s index 285333b0..5d594aa1 100644 --- a/asm/non_matchings/unknown_043920/func_80053750.s +++ b/asm/non_matchings/unknown_043920/func_80053750.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E6788 +.double 0.4 +glabel D_800E6790 +.double 0.1 +glabel D_800E6798 +.double 1.4 + +.text glabel func_80053750 /* 054350 80053750 AFA50004 */ sw $a1, 4($sp) /* 054354 80053754 8C820060 */ lw $v0, 0x60($a0) diff --git a/asm/non_matchings/unknown_043920/func_80053E9C.s b/asm/non_matchings/unknown_043920/func_80053E9C.s index d7571a2f..f3468f6a 100644 --- a/asm/non_matchings/unknown_043920/func_80053E9C.s +++ b/asm/non_matchings/unknown_043920/func_80053E9C.s @@ -1,3 +1,13 @@ +.late_rodata +glabel D_800E67A0 +.float 0.1 +glabel jpt_800E67A4 +.word L80053FF0, L8005406C, L800540FC, L8005408C, L800540C4, L80054098 +.word 0 # Padding +glabel D_800E67C0 +.double 20.5 + +.text glabel func_80053E9C /* 054A9C 80053E9C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 054AA0 80053EA0 AFBF001C */ sw $ra, 0x1c($sp) @@ -88,12 +98,13 @@ glabel func_80053E9C /* 054BCC 80053FCC 2DE10006 */ sltiu $at, $t7, 6 /* 054BD0 80053FD0 1020004A */ beqz $at, .L800540FC /* 054BD4 80053FD4 000F7880 */ sll $t7, $t7, 2 -/* 054BD8 80053FD8 3C01800E */ lui $at, %hi(D_800E67A4) # $at, 0x800e +/* 054BD8 80053FD8 3C01800E */ lui $at, %hi(jpt_800E67A4) # $at, 0x800e /* 054BDC 80053FDC 002F0821 */ addu $at, $at, $t7 -/* 054BE0 80053FE0 8C2F67A4 */ lw $t7, %lo(D_800E67A4)($at) +/* 054BE0 80053FE0 8C2F67A4 */ lw $t7, %lo(jpt_800E67A4)($at) /* 054BE4 80053FE4 00000000 */ nop /* 054BE8 80053FE8 01E00008 */ jr $t7 /* 054BEC 80053FEC 00000000 */ nop +glabel L80053FF0 /* 054BF0 80053FF0 24180001 */ li $t8, 1 /* 054BF4 80053FF4 A21801F1 */ sb $t8, 0x1f1($s0) /* 054BF8 80053FF8 83B90027 */ lb $t9, 0x27($sp) @@ -126,6 +137,7 @@ glabel func_80053E9C /* 054C60 80054060 462042A0 */ cvt.s.d $f10, $f8 /* 054C64 80054064 10000025 */ b .L800540FC /* 054C68 80054068 E48A0020 */ swc1 $f10, 0x20($a0) +glabel L8005406C /* 054C6C 8005406C 24080002 */ li $t0, 2 /* 054C70 80054070 24091002 */ li $t1, 4098 /* 054C74 80054074 A20801DB */ sb $t0, 0x1db($s0) @@ -134,9 +146,11 @@ glabel func_80053E9C /* 054C80 80054080 2405013B */ li $a1, 315 /* 054C84 80054084 1000001E */ b .L80054100 /* 054C88 80054088 A2000187 */ sb $zero, 0x187($s0) +glabel L8005408C /* 054C8C 8005408C 240A003C */ li $t2, 60 /* 054C90 80054090 1000001A */ b .L800540FC /* 054C94 80054094 A20A01ED */ sb $t2, 0x1ed($s0) +glabel L80054098 /* 054C98 80054098 C610002C */ lwc1 $f16, 0x2c($s0) /* 054C9C 8005409C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 /* 054CA0 800540A0 44812800 */ mtc1 $at, $f5 @@ -148,6 +162,7 @@ glabel func_80053E9C /* 054CB8 800540B8 46203220 */ cvt.s.d $f8, $f6 /* 054CBC 800540BC 1000000F */ b .L800540FC /* 054CC0 800540C0 E608002C */ swc1 $f8, 0x2c($s0) +glabel L800540C4 /* 054CC4 800540C4 44805000 */ mtc1 $zero, $f10 /* 054CC8 800540C8 240C0001 */ li $t4, 1 /* 054CCC 800540CC A20C01F1 */ sb $t4, 0x1f1($s0) @@ -163,6 +178,7 @@ glabel func_80053E9C /* 054CF4 800540F4 0C015C12 */ jal func_80057048 /* 054CF8 800540F8 E4880020 */ swc1 $f8, 0x20($a0) .L800540FC: +glabel L800540FC /* 054CFC 800540FC A2000187 */ sb $zero, 0x187($s0) .L80054100: /* 054D00 80054100 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80054110.s b/asm/non_matchings/unknown_043920/func_80054110.s index c96a31ce..00671236 100644 --- a/asm/non_matchings/unknown_043920/func_80054110.s +++ b/asm/non_matchings/unknown_043920/func_80054110.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E67C8 +.double 0.3 +glabel D_800E67D0 +.double 0.1 +glabel D_800E67D8 +.double 0.3 +glabel D_800E67E0 +.double 0.1 + +.text glabel func_80054110 /* 054D10 80054110 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 054D14 80054114 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_043920/func_8005492C.s b/asm/non_matchings/unknown_043920/func_8005492C.s index f2be331d..f2e9087d 100644 --- a/asm/non_matchings/unknown_043920/func_8005492C.s +++ b/asm/non_matchings/unknown_043920/func_8005492C.s @@ -1,3 +1,27 @@ +.late_rodata +glabel D_800E67E8 +.double -0.3 +glabel D_800E67F0 +.double 0.3 +glabel D_800E67F8 +.double 0.9 +glabel D_800E6800 +.float 0.02 +.word 0 # Padding +glabel D_800E6808 +.double 1.7 +glabel D_800E6810 +.double 0.15 +glabel D_800E6818 +.double 0.32 +glabel D_800E6820 +.double -0.04 +glabel D_800E6828 +.double 0.04 +glabel D_800E6830 +.double 0.9 + +.text glabel func_8005492C /* 05552C 8005492C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 055530 80054930 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_043920/func_80054FD0.s b/asm/non_matchings/unknown_043920/func_80054FD0.s index 46f6029f..6f457e33 100644 --- a/asm/non_matchings/unknown_043920/func_80054FD0.s +++ b/asm/non_matchings/unknown_043920/func_80054FD0.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6838 +.double 1.075 +glabel D_800E6840 +.double 0.15 + +.text glabel func_80054FD0 /* 055BD0 80054FD0 27BDFE60 */ addiu $sp, $sp, -0x1a0 /* 055BD4 80054FD4 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80055EC0.s b/asm/non_matchings/unknown_043920/func_80055EC0.s index 3c6d41f9..f6c00f7d 100644 --- a/asm/non_matchings/unknown_043920/func_80055EC0.s +++ b/asm/non_matchings/unknown_043920/func_80055EC0.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E6848 +.double 0.7 +glabel D_800E6850 +.float 1500.0 +glabel jpt_800E6854 +.word L8005635C, L80056370, L80056380, L8005639C, L800563EC, L80056508, L8005655C, L80056508, L800563EC, L80056620, L800563CC, L80056380, L800565C0, L800565E0, L80056600, L800563EC +glabel jpt_800E6894 +.word L80056828, L80056834, L80056840, L8005684C, L80056884, L80056884, L80056884, L80056884, L80056884, L80056884, L80056874, L80056880 + +.text glabel func_80055EC0 /* 056AC0 80055EC0 27BDFF78 */ addiu $sp, $sp, -0x88 /* 056AC4 80055EC4 AFBF0024 */ sw $ra, 0x24($sp) @@ -308,21 +319,24 @@ glabel func_80055EC0 /* 056F38 80056338 102000B9 */ beqz $at, .L80056620 /* 056F3C 8005633C 0100C825 */ move $t9, $t0 /* 056F40 80056340 0019C880 */ sll $t9, $t9, 2 -/* 056F44 80056344 3C01800E */ lui $at, %hi(D_800E6854) # $at, 0x800e +/* 056F44 80056344 3C01800E */ lui $at, %hi(jpt_800E6854) # $at, 0x800e /* 056F48 80056348 00390821 */ addu $at, $at, $t9 -/* 056F4C 8005634C 8C396854 */ lw $t9, %lo(D_800E6854)($at) +/* 056F4C 8005634C 8C396854 */ lw $t9, %lo(jpt_800E6854)($at) /* 056F50 80056350 00000000 */ nop /* 056F54 80056354 03200008 */ jr $t9 /* 056F58 80056358 00000000 */ nop +glabel L8005635C /* 056F5C 8005635C 3C01C120 */ li $at, 0xC1200000 # -10.000000 /* 056F60 80056360 44815000 */ mtc1 $at, $f10 /* 056F64 80056364 240200E5 */ li $v0, 229 /* 056F68 80056368 100000B0 */ b .L8005662C /* 056F6C 8005636C E7AA0064 */ swc1 $f10, 0x64($sp) +glabel L80056370 /* 056F70 80056370 3C01C120 */ li $at, 0xC1200000 # -10.000000 /* 056F74 80056374 44819000 */ mtc1 $at, $f18 /* 056F78 80056378 100000AC */ b .L8005662C /* 056F7C 8005637C E7B20064 */ swc1 $f18, 0x64($sp) +glabel L80056380 /* 056F80 80056380 3C014120 */ li $at, 0x41200000 # 10.000000 /* 056F84 80056384 44818000 */ mtc1 $at, $f16 /* 056F88 80056388 3C01C000 */ li $at, 0xC0000000 # -2.000000 @@ -330,6 +344,7 @@ glabel func_80055EC0 /* 056F90 80056390 2402000E */ li $v0, 14 /* 056F94 80056394 100000A5 */ b .L8005662C /* 056F98 80056398 E7B00064 */ swc1 $f16, 0x64($sp) +glabel L8005639C /* 056F9C 8005639C 820B01D6 */ lb $t3, 0x1d6($s0) /* 056FA0 800563A0 24010002 */ li $at, 2 /* 056FA4 800563A4 11610003 */ beq $t3, $at, .L800563B4 @@ -343,6 +358,7 @@ glabel func_80055EC0 /* 056FC0 800563C0 44810000 */ mtc1 $at, $f0 /* 056FC4 800563C4 10000099 */ b .L8005662C /* 056FC8 800563C8 E7A40064 */ swc1 $f4, 0x64($sp) +glabel L800563CC /* 056FCC 800563CC 3C014120 */ li $at, 0x41200000 # 10.000000 /* 056FD0 800563D0 44814000 */ mtc1 $at, $f8 /* 056FD4 800563D4 3C01C000 */ li $at, 0xC0000000 # -2.000000 @@ -351,6 +367,7 @@ glabel func_80055EC0 /* 056FE0 800563E0 00005025 */ move $t2, $zero /* 056FE4 800563E4 10000091 */ b .L8005662C /* 056FE8 800563E8 E7A80064 */ swc1 $f8, 0x64($sp) +glabel L800563EC /* 056FEC 800563EC 24010008 */ li $at, 8 /* 056FF0 800563F0 11010009 */ beq $t0, $at, .L80056418 /* 056FF4 800563F4 2401000F */ li $at, 15 @@ -429,6 +446,7 @@ glabel func_80055EC0 /* 0570FC 800564FC 24050008 */ li $a1, 8 /* 057100 80056500 10000108 */ b .L80056924 /* 057104 80056504 8FBF0024 */ lw $ra, 0x24($sp) +glabel L80056508 /* 057108 80056508 820C0173 */ lb $t4, 0x173($s0) /* 05710C 8005650C 860B0000 */ lh $t3, ($s0) /* 057110 80056510 2401FFFF */ li $at, -1 @@ -451,6 +469,7 @@ glabel func_80055EC0 /* 057150 80056550 2405000F */ li $a1, 15 /* 057154 80056554 100000F3 */ b .L80056924 /* 057158 80056558 8FBF0024 */ lw $ra, 0x24($sp) +glabel L8005655C /* 05715C 8005655C 820C0173 */ lb $t4, 0x173($s0) /* 057160 80056560 860B0000 */ lh $t3, ($s0) /* 057164 80056564 2401FFFF */ li $at, -1 @@ -477,6 +496,7 @@ glabel func_80055EC0 /* 0571B4 800565B4 2405000F */ li $a1, 15 /* 0571B8 800565B8 100000DA */ b .L80056924 /* 0571BC 800565BC 8FBF0024 */ lw $ra, 0x24($sp) +glabel L800565C0 /* 0571C0 800565C0 820D0173 */ lb $t5, 0x173($s0) /* 0571C4 800565C4 24190001 */ li $t9, 1 /* 0571C8 800565C8 240B012C */ li $t3, 300 @@ -485,6 +505,7 @@ glabel func_80055EC0 /* 0571D4 800565D4 A60B018E */ sh $t3, 0x18e($s0) /* 0571D8 800565D8 100000D1 */ b .L80056920 /* 0571DC 800565DC A20E0173 */ sb $t6, 0x173($s0) +glabel L800565E0 /* 0571E0 800565E0 82180173 */ lb $t8, 0x173($s0) /* 0571E4 800565E4 240F0002 */ li $t7, 2 /* 0571E8 800565E8 24190258 */ li $t9, 600 @@ -493,6 +514,7 @@ glabel func_80055EC0 /* 0571F4 800565F4 A20C0173 */ sb $t4, 0x173($s0) /* 0571F8 800565F8 100000C9 */ b .L80056920 /* 0571FC 800565FC A619018E */ sh $t9, 0x18e($s0) +glabel L80056600 /* 057200 80056600 820E0173 */ lb $t6, 0x173($s0) /* 057204 80056604 240B0003 */ li $t3, 3 /* 057208 80056608 240D0384 */ li $t5, 900 @@ -502,6 +524,7 @@ glabel func_80055EC0 /* 057218 80056618 100000C1 */ b .L80056920 /* 05721C 8005661C A20F0173 */ sb $t7, 0x173($s0) .L80056620: +glabel L80056620 /* 057220 80056620 44803000 */ mtc1 $zero, $f6 /* 057224 80056624 00000000 */ nop /* 057228 80056628 E7A60064 */ swc1 $f6, 0x64($sp) @@ -628,21 +651,25 @@ glabel func_80055EC0 /* 057404 80056804 1020001F */ beqz $at, .L80056884 /* 057408 80056808 E46A0010 */ swc1 $f10, 0x10($v1) /* 05740C 8005680C 000E7080 */ sll $t6, $t6, 2 -/* 057410 80056810 3C01800E */ lui $at, %hi(D_800E6894) # $at, 0x800e +/* 057410 80056810 3C01800E */ lui $at, %hi(jpt_800E6894) # $at, 0x800e /* 057414 80056814 002E0821 */ addu $at, $at, $t6 -/* 057418 80056818 8C2E6894 */ lw $t6, %lo(D_800E6894)($at) +/* 057418 80056818 8C2E6894 */ lw $t6, %lo(jpt_800E6894)($at) /* 05741C 8005681C 00000000 */ nop /* 057420 80056820 01C00008 */ jr $t6 /* 057424 80056824 00000000 */ nop +glabel L80056828 /* 057428 80056828 240F0134 */ li $t7, 308 /* 05742C 8005682C 10000015 */ b .L80056884 /* 057430 80056830 A7AF003A */ sh $t7, 0x3a($sp) +glabel L80056834 /* 057434 80056834 24180135 */ li $t8, 309 /* 057438 80056838 10000012 */ b .L80056884 /* 05743C 8005683C A7B8003A */ sh $t8, 0x3a($sp) +glabel L80056840 /* 057440 80056840 240C000F */ li $t4, 15 /* 057444 80056844 1000000F */ b .L80056884 /* 057448 80056848 A7AC003A */ sh $t4, 0x3a($sp) +glabel L8005684C /* 05744C 8005684C 821901D6 */ lb $t9, 0x1d6($s0) /* 057450 80056850 24010002 */ li $at, 2 /* 057454 80056854 13210005 */ beq $t9, $at, .L8005686C @@ -654,11 +681,14 @@ glabel func_80055EC0 .L8005686C: /* 05746C 8005686C 10000005 */ b .L80056884 /* 057470 80056870 A7AD003A */ sh $t5, 0x3a($sp) +glabel L80056874 /* 057474 80056874 240E000F */ li $t6, 15 /* 057478 80056878 10000002 */ b .L80056884 /* 05747C 8005687C A7AE003A */ sh $t6, 0x3a($sp) +glabel L80056880 /* 057480 80056880 A4400018 */ sh $zero, 0x18($v0) .L80056884: +glabel L80056884 /* 057484 80056884 97AF003A */ lhu $t7, 0x3a($sp) /* 057488 80056888 00000000 */ nop /* 05748C 8005688C 11E0001D */ beqz $t7, .L80056904 diff --git a/asm/non_matchings/unknown_043920/func_8005698C.s b/asm/non_matchings/unknown_043920/func_8005698C.s index 40fc3e3e..2260531c 100644 --- a/asm/non_matchings/unknown_043920/func_8005698C.s +++ b/asm/non_matchings/unknown_043920/func_8005698C.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E68C4 +.float 10000.0 +glabel D_800E68C8 +.float 10000.0 + +.text glabel func_8005698C /* 05758C 8005698C 27BDFF48 */ addiu $sp, $sp, -0xb8 /* 057590 80056990 AFBF004C */ sw $ra, 0x4c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80057220.s b/asm/non_matchings/unknown_043920/func_80057220.s index 0f6f8af6..fe486e59 100644 --- a/asm/non_matchings/unknown_043920/func_80057220.s +++ b/asm/non_matchings/unknown_043920/func_80057220.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E68CC +.float 0.025 + +.text glabel func_80057220 /* 057E20 80057220 3C0E8012 */ lui $t6, %hi(D_8011D540) # $t6, 0x8012 /* 057E24 80057224 8DCED540 */ lw $t6, %lo(D_8011D540)($t6) diff --git a/asm/non_matchings/unknown_043920/func_80057A40.s b/asm/non_matchings/unknown_043920/func_80057A40.s index e434abbd..d7f55626 100644 --- a/asm/non_matchings/unknown_043920/func_80057A40.s +++ b/asm/non_matchings/unknown_043920/func_80057A40.s @@ -1,3 +1,16 @@ +.late_rodata +glabel jpt_800E68D0 +.word L80057BBC, L80057BE4, L80057CD0, L80057C0C, L80057C34, L80057C5C, L80057C84, L80057CAC +glabel D_800E68F0 +.double 91.75 +glabel D_800E68F8 +.double 90.0 +glabel D_800E6900 +.double 48.5 +glabel D_800E6908 +.double 0.95 + +.text glabel func_80057A40 /* 058640 80057A40 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 058644 80057A44 3C0E8012 */ lui $t6, %hi(D_8011D52C) # $t6, 0x8012 @@ -97,12 +110,13 @@ glabel func_80057A40 /* 058798 80057B98 2F010008 */ sltiu $at, $t8, 8 /* 05879C 80057B9C 1020004C */ beqz $at, .L80057CD0 /* 0587A0 80057BA0 0018C080 */ sll $t8, $t8, 2 -/* 0587A4 80057BA4 3C01800E */ lui $at, %hi(D_800E68D0) # $at, 0x800e +/* 0587A4 80057BA4 3C01800E */ lui $at, %hi(jpt_800E68D0) # $at, 0x800e /* 0587A8 80057BA8 00380821 */ addu $at, $at, $t8 -/* 0587AC 80057BAC 8C3868D0 */ lw $t8, %lo(D_800E68D0)($at) +/* 0587AC 80057BAC 8C3868D0 */ lw $t8, %lo(jpt_800E68D0)($at) /* 0587B0 80057BB0 00000000 */ nop /* 0587B4 80057BB4 03000008 */ jr $t8 /* 0587B8 80057BB8 00000000 */ nop +glabel L80057BBC /* 0587BC 80057BBC C7AC0040 */ lwc1 $f12, 0x40($sp) /* 0587C0 80057BC0 8FA50038 */ lw $a1, 0x38($sp) /* 0587C4 80057BC4 0C01607A */ jal func_800581E8 @@ -113,6 +127,7 @@ glabel func_80057A40 /* 0587D8 80057BD8 8FA6003C */ lw $a2, 0x3c($sp) /* 0587DC 80057BDC 1000003C */ b .L80057CD0 /* 0587E0 80057BE0 00000000 */ nop +glabel L80057BE4 /* 0587E4 80057BE4 C7AC0040 */ lwc1 $f12, 0x40($sp) /* 0587E8 80057BE8 8FA50038 */ lw $a1, 0x38($sp) /* 0587EC 80057BEC 0C0130AC */ jal func_8004C2B0 @@ -123,6 +138,7 @@ glabel func_80057A40 /* 058800 80057C00 8FA6003C */ lw $a2, 0x3c($sp) /* 058804 80057C04 10000032 */ b .L80057CD0 /* 058808 80057C08 00000000 */ nop +glabel L80057C0C /* 05880C 80057C0C C7AC0040 */ lwc1 $f12, 0x40($sp) /* 058810 80057C10 8FA50038 */ lw $a1, 0x38($sp) /* 058814 80057C14 0C0163D1 */ jal func_80058F44 @@ -133,6 +149,7 @@ glabel func_80057A40 /* 058828 80057C28 8FA6003C */ lw $a2, 0x3c($sp) /* 05882C 80057C2C 10000028 */ b .L80057CD0 /* 058830 80057C30 00000000 */ nop +glabel L80057C34 /* 058834 80057C34 C7AC0040 */ lwc1 $f12, 0x40($sp) /* 058838 80057C38 8FA50038 */ lw $a1, 0x38($sp) /* 05883C 80057C3C 0C012399 */ jal func_80048E64 @@ -143,6 +160,7 @@ glabel func_80057A40 /* 058850 80057C50 8FA6003C */ lw $a2, 0x3c($sp) /* 058854 80057C54 1000001E */ b .L80057CD0 /* 058858 80057C58 00000000 */ nop +glabel L80057C5C /* 05885C 80057C5C C7AC0040 */ lwc1 $f12, 0x40($sp) /* 058860 80057C60 8FA50038 */ lw $a1, 0x38($sp) /* 058864 80057C64 0C0162E1 */ jal func_80058B84 @@ -153,6 +171,7 @@ glabel func_80057A40 /* 058878 80057C78 8FA6003C */ lw $a2, 0x3c($sp) /* 05887C 80057C7C 10000014 */ b .L80057CD0 /* 058880 80057C80 00000000 */ nop +glabel L80057C84 /* 058884 80057C84 C7AC0040 */ lwc1 $f12, 0x40($sp) /* 058888 80057C88 8FA50038 */ lw $a1, 0x38($sp) /* 05888C 80057C8C 0C013564 */ jal func_8004D590 @@ -163,6 +182,7 @@ glabel func_80057A40 /* 0588A0 80057CA0 8FA6003C */ lw $a2, 0x3c($sp) /* 0588A4 80057CA4 1000000A */ b .L80057CD0 /* 0588A8 80057CA8 00000000 */ nop +glabel L80057CAC /* 0588AC 80057CAC C7AC0040 */ lwc1 $f12, 0x40($sp) /* 0588B0 80057CB0 8FA50038 */ lw $a1, 0x38($sp) /* 0588B4 80057CB4 0C016357 */ jal func_80058D5C @@ -173,6 +193,7 @@ glabel func_80057A40 /* 0588C8 80057CC8 8FA6003C */ lw $a2, 0x3c($sp) /* 0588CC 80057CCC 00000000 */ nop .L80057CD0: +glabel L80057CD0 /* 0588D0 80057CD0 3C038012 */ lui $v1, %hi(D_8011D586) # $v1, 0x8012 /* 0588D4 80057CD4 3C01800E */ lui $at, %hi(D_800E68F4) # $at, 0x800e /* 0588D8 80057CD8 2463D586 */ addiu $v1, %lo(D_8011D586) # addiu $v1, $v1, -0x2a7a diff --git a/asm/non_matchings/unknown_043920/func_800581E8.s b/asm/non_matchings/unknown_043920/func_800581E8.s index 978bbc33..286d056a 100644 --- a/asm/non_matchings/unknown_043920/func_800581E8.s +++ b/asm/non_matchings/unknown_043920/func_800581E8.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6910 +.double 65.0 +glabel D_800E6918 +.double 1.3 + +.text glabel func_800581E8 /* 058DE8 800581E8 27BDFF98 */ addiu $sp, $sp, -0x68 /* 058DEC 800581EC 3C0142F0 */ li $at, 0x42F00000 # 120.000000 diff --git a/asm/non_matchings/unknown_043920/func_80059208.s b/asm/non_matchings/unknown_043920/func_80059208.s index 782e6bca..184399a2 100644 --- a/asm/non_matchings/unknown_043920/func_80059208.s +++ b/asm/non_matchings/unknown_043920/func_80059208.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6920 +.double -0.2 + +.text glabel func_80059208 /* 059E08 80059208 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 059E0C 8005920C AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_043920/func_80059790.s b/asm/non_matchings/unknown_043920/func_80059790.s index 6b68366d..f24b3bc5 100644 --- a/asm/non_matchings/unknown_043920/func_80059790.s +++ b/asm/non_matchings/unknown_043920/func_80059790.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6928 +.double 1.2 + +.text glabel func_80059790 /* 05A390 80059790 3C0E8012 */ lui $t6, %hi(D_80126170) # $t6, 0x8012 /* 05A394 80059794 8DCE6170 */ lw $t6, %lo(D_80126170)($t6) diff --git a/asm/non_matchings/unknown_043920/func_80059E40.s b/asm/non_matchings/unknown_043920/func_80059E40.s index 1b0be27a..708dbc1f 100644 --- a/asm/non_matchings/unknown_043920/func_80059E40.s +++ b/asm/non_matchings/unknown_043920/func_80059E40.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6930 +.double 1.2 +glabel D_800E6938 +.double 0.8 + +.text glabel func_80059E40 /* 05AA40 80059E40 3C058012 */ lui $a1, %hi(D_80120001) # $a1, 0x8012 /* 05AA44 80059E44 80A5D59C */ lb $a1, %lo(D_8011D59C)($a1) diff --git a/asm/non_matchings/unknown_043920/func_8005A6F0.s b/asm/non_matchings/unknown_043920/func_8005A6F0.s index 3b0c6d2d..af6c2bc8 100644 --- a/asm/non_matchings/unknown_043920/func_8005A6F0.s +++ b/asm/non_matchings/unknown_043920/func_8005A6F0.s @@ -1,3 +1,32 @@ +.late_rodata +glabel D_800E6940 +.double 0.45 +glabel D_800E6948 +.float -0.02 +glabel D_800E694C +.float 1000000.0 +glabel D_800E6950 +.double 160000.0 +glabel D_800E6958 +.float 0.8 +.word 0 # Padding +glabel D_800E6960 +.double 160000.0 +glabel jpt_800E6968 +.word L8005AF80, L8005AFD8, L8005B004, L8005B030, L8005AFAC, L8005B05C, L8005B094, L8005B0CC, L8005B0CC, L8005B1B0, L8005B030, L8005B10C, L8005B144, L8005B17C +glabel D_800E69A0 +.double 0.9 +glabel D_800E69A8 +.float 0.02 +glabel D_800E69AC +.float -0.02 +glabel D_800E69B0 +.float 265.0 +.word 0 # Padding +glabel D_800E69B8 +.double 1500.0 + +.text glabel func_8005A6F0 /* 05B2F0 8005A6F0 27BDFF60 */ addiu $sp, $sp, -0xa0 /* 05B2F4 8005A6F4 AFBF002C */ sw $ra, 0x2c($sp) @@ -585,12 +614,13 @@ glabel func_8005A6F0 /* 05BB5C 8005AF5C 10200094 */ beqz $at, .L8005B1B0 /* 05BB60 8005AF60 2442D52C */ addiu $v0, %lo(D_8011D52C) # addiu $v0, $v0, -0x2ad4 /* 05BB64 8005AF64 0019C880 */ sll $t9, $t9, 2 -/* 05BB68 8005AF68 3C01800E */ lui $at, %hi(D_800E6968) # $at, 0x800e +/* 05BB68 8005AF68 3C01800E */ lui $at, %hi(jpt_800E6968) # $at, 0x800e /* 05BB6C 8005AF6C 00390821 */ addu $at, $at, $t9 -/* 05BB70 8005AF70 8C396968 */ lw $t9, %lo(D_800E6968)($at) +/* 05BB70 8005AF70 8C396968 */ lw $t9, %lo(jpt_800E6968)($at) /* 05BB74 8005AF74 00000000 */ nop /* 05BB78 8005AF78 03200008 */ jr $t9 /* 05BB7C 8005AF7C 00000000 */ nop +glabel L8005AF80 /* 05BB80 8005AF80 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BB84 8005AF84 8FA500AC */ lw $a1, 0xac($sp) /* 05BB88 8005AF88 8FA600A0 */ lw $a2, 0xa0($sp) @@ -602,6 +632,7 @@ glabel func_8005A6F0 /* 05BBA0 8005AFA0 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BBA4 8005AFA4 10000082 */ b .L8005B1B0 /* 05BBA8 8005AFA8 240B0001 */ li $t3, 1 +glabel L8005AFAC /* 05BBAC 8005AFAC 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BBB0 8005AFB0 8FA500AC */ lw $a1, 0xac($sp) /* 05BBB4 8005AFB4 8FA600A0 */ lw $a2, 0xa0($sp) @@ -613,6 +644,7 @@ glabel func_8005A6F0 /* 05BBCC 8005AFCC 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BBD0 8005AFD0 10000077 */ b .L8005B1B0 /* 05BBD4 8005AFD4 240B0001 */ li $t3, 1 +glabel L8005AFD8 /* 05BBD8 8005AFD8 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BBDC 8005AFDC 8FA500AC */ lw $a1, 0xac($sp) /* 05BBE0 8005AFE0 8FA600A0 */ lw $a2, 0xa0($sp) @@ -624,6 +656,7 @@ glabel func_8005A6F0 /* 05BBF8 8005AFF8 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BBFC 8005AFFC 1000006C */ b .L8005B1B0 /* 05BC00 8005B000 240B0001 */ li $t3, 1 +glabel L8005B004 /* 05BC04 8005B004 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BC08 8005B008 8FA500AC */ lw $a1, 0xac($sp) /* 05BC0C 8005B00C 8FA600A0 */ lw $a2, 0xa0($sp) @@ -635,6 +668,7 @@ glabel func_8005A6F0 /* 05BC24 8005B024 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BC28 8005B028 10000061 */ b .L8005B1B0 /* 05BC2C 8005B02C 240B0001 */ li $t3, 1 +glabel L8005B030 /* 05BC30 8005B030 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BC34 8005B034 8FA500AC */ lw $a1, 0xac($sp) /* 05BC38 8005B038 8FA600A0 */ lw $a2, 0xa0($sp) @@ -646,6 +680,7 @@ glabel func_8005A6F0 /* 05BC50 8005B050 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BC54 8005B054 10000056 */ b .L8005B1B0 /* 05BC58 8005B058 240B0001 */ li $t3, 1 +glabel L8005B05C /* 05BC5C 8005B05C 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BC60 8005B060 8FA500AC */ lw $a1, 0xac($sp) /* 05BC64 8005B064 8FA600A0 */ lw $a2, 0xa0($sp) @@ -660,6 +695,7 @@ glabel func_8005A6F0 /* 05BC88 8005B088 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BC8C 8005B08C 10000048 */ b .L8005B1B0 /* 05BC90 8005B090 240B0001 */ li $t3, 1 +glabel L8005B094 /* 05BC94 8005B094 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BC98 8005B098 8FA500AC */ lw $a1, 0xac($sp) /* 05BC9C 8005B09C 8FA600A0 */ lw $a2, 0xa0($sp) @@ -674,6 +710,7 @@ glabel func_8005A6F0 /* 05BCC0 8005B0C0 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BCC4 8005B0C4 1000003A */ b .L8005B1B0 /* 05BCC8 8005B0C8 240B0001 */ li $t3, 1 +glabel L8005B0CC /* 05BCCC 8005B0CC 3C0D8012 */ lui $t5, %hi(D_8011D534) # $t5, 0x8012 /* 05BCD0 8005B0D0 25ADD534 */ addiu $t5, %lo(D_8011D534) # addiu $t5, $t5, -0x2acc /* 05BCD4 8005B0D4 8FA400A8 */ lw $a0, 0xa8($sp) @@ -690,6 +727,7 @@ glabel func_8005A6F0 /* 05BD00 8005B100 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BD04 8005B104 1000002A */ b .L8005B1B0 /* 05BD08 8005B108 240B0001 */ li $t3, 1 +glabel L8005B10C /* 05BD0C 8005B10C 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BD10 8005B110 8FA500AC */ lw $a1, 0xac($sp) /* 05BD14 8005B114 8FA600A0 */ lw $a2, 0xa0($sp) @@ -704,6 +742,7 @@ glabel func_8005A6F0 /* 05BD38 8005B138 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BD3C 8005B13C 1000001C */ b .L8005B1B0 /* 05BD40 8005B140 240B0001 */ li $t3, 1 +glabel L8005B144 /* 05BD44 8005B144 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BD48 8005B148 8FA500AC */ lw $a1, 0xac($sp) /* 05BD4C 8005B14C 8FA600A0 */ lw $a2, 0xa0($sp) @@ -718,6 +757,7 @@ glabel func_8005A6F0 /* 05BD70 8005B170 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BD74 8005B174 1000000E */ b .L8005B1B0 /* 05BD78 8005B178 240B0001 */ li $t3, 1 +glabel L8005B17C /* 05BD7C 8005B17C 8FA400A8 */ lw $a0, 0xa8($sp) /* 05BD80 8005B180 8FA500AC */ lw $a1, 0xac($sp) /* 05BD84 8005B184 8FA600A0 */ lw $a2, 0xa0($sp) @@ -732,6 +772,7 @@ glabel func_8005A6F0 /* 05BDA8 8005B1A8 2463D528 */ addiu $v1, %lo(D_8011D528) # addiu $v1, $v1, -0x2ad8 /* 05BDAC 8005B1AC 240B0001 */ li $t3, 1 .L8005B1B0: +glabel L8005B1B0 /* 05BDB0 8005B1B0 8FAE0094 */ lw $t6, 0x94($sp) /* 05BDB4 8005B1B4 8FA400A0 */ lw $a0, 0xa0($sp) /* 05BDB8 8005B1B8 11CB0006 */ beq $t6, $t3, .L8005B1D4 diff --git a/asm/non_matchings/unknown_043920/func_8005B818.s b/asm/non_matchings/unknown_043920/func_8005B818.s index 5940fc3a..12682972 100644 --- a/asm/non_matchings/unknown_043920/func_8005B818.s +++ b/asm/non_matchings/unknown_043920/func_8005B818.s @@ -1,3 +1,23 @@ +.late_rodata +glabel D_800E69C0 +.double 0.025 +glabel D_800E69C8 +.double 0.595 +glabel D_800E69D0 +.double 0.004 +glabel D_800E69D8 +.double 1.3 +glabel D_800E69E0 +.double 150.0 +glabel D_800E69E8 +.float 0.01 +.word 0 # Padding +glabel D_800E69F0 +.double 0.01 +glabel D_800E69F8 +.double 35.0 + +.text glabel func_8005B818 /* 05C418 8005B818 27BDFED8 */ addiu $sp, $sp, -0x128 /* 05C41C 8005B81C AFB30050 */ sw $s3, 0x50($sp) diff --git a/src/unknown_043920.c b/src/unknown_043920.c index b412ff4f..f7f6559e 100644 --- a/src/unknown_043920.c +++ b/src/unknown_043920.c @@ -120,288 +120,6 @@ const char D_800E6280[] = "%.1f,%.1f,%.1f\n"; const char D_800E6290[] = "Chk ovflow!!\n"; const char D_800E62A0[] = "Back\n"; -const DoubleLiteral D_800E62A8 = { -2500.0 }; -const DoubleLiteral D_800E62B0 = { 0.025 }; -const DoubleLiteral D_800E62B8 = { 0.561 }; -const DoubleLiteral D_800E62C0 = { 0.004 }; -const DoubleLiteral D_800E62C8 = { 0.025 }; -const DoubleLiteral D_800E62D0 = { 0.561 }; -const DoubleLiteral D_800E62D8 = { 0.004 }; -const DoubleLiteral D_800E62E0 = { 0.2 }; -const DoubleLiteral D_800E62E8 = { 0.004 }; -const DoubleLiteral D_800E62F0 = { 0.595 }; -const DoubleLiteral D_800E62F8 = { 0.025 }; -const DoubleLiteral D_800E6300 = { 500.0 }; -const DoubleLiteral D_800E6308 = { 650.0 }; -const DoubleLiteral D_800E6310 = { -0.3 }; - -// Jump table in func_8004447C -const u32 D_800E6318[] = { - 0x800446AC, 0x80044A04, 0x80044A04, 0x80044A04, - 0x80044A04, 0x80044F54, 0x80044A04 -}; - -// Jump table in func_8004447C -const u32 D_800E6334[] = { - 0x80044A2C, 0x80044A44, 0x80044A60, 0x80044A94, - 0x80044ADC, 0x80044AC8 -}; - -const DoubleLiteral D_800E6350 = { 300.0 }; - -// Jump table in func_800452A0 -const u32 D_800E6358[] = { - 0x800456A0, 0x800456A8, 0x800456B0, 0x800456BC, - 0x800456CC, 0x800456D4, 0x800456B0, 0x800456DC -}; - -const FloatLiteral D_800E6378 = { 1000000.0f }; - -// Jump table in -const u32 D_800E637C[] = { - 0x80045ADC, 0x80045AF8, 0x80045B30, 0x80045B30, - 0x80045B58, 0x80045B70, 0x80045BB8, 0x80045ADC -}; - -const DoubleLiteral D_800E63A0 = { 500.0 }; -const DoubleLiteral D_800E63A8 = { 1.15 }; -const DoubleLiteral D_800E63B0 = { 0.016 }; -const DoubleLiteral D_800E63B8 = { 0.016 }; -const DoubleLiteral D_800E63C0 = { 1.2 }; -const DoubleLiteral D_800E63C8 = { 0.046 }; -const DoubleLiteral D_800E63D0 = { 1.2 }; -const FloatLiteral D_800E63D8 = { 1.2f }; -const DoubleLiteral D_800E63E0 = { 0.046 }; -const DoubleLiteral D_800E63E8 = { 0.3 }; -const FloatLiteral D_800E63F0 = { 0.004f }; -const DoubleLiteral D_800E63F8 = { 0.025 }; -const DoubleLiteral D_800E6400 = { 300.0 }; -const DoubleLiteral D_800E6408 = { 0.02 }; -const DoubleLiteral D_800E6410 = { 1.7 }; -const DoubleLiteral D_800E6418 = { 0.35 }; -const DoubleLiteral D_800E6420 = { 0.2 }; -const DoubleLiteral D_800E6428 = { 0.07 }; -const DoubleLiteral D_800E6430 = { 0.8 }; -const DoubleLiteral D_800E6438 = { 0.65 }; -const DoubleLiteral D_800E6440 = { 0.65 }; -const DoubleLiteral D_800E6448 = { 35.0 }; -const FloatLiteral D_800E6450 = { -10000.0f }; -const DoubleLiteral D_800E6458 = { 0.8 }; -const DoubleLiteral D_800E6460 = { 0.05 }; -const FloatLiteral D_800E6468 = { 0.11f }; - -// Jump table in func_80048C7C -const u32 D_800E646C[] = { - 0x80048D40, 0x80048D40, 0x80048E50, 0x80048DAC, - 0x80048E18, 0x80048DB8 -}; - -const DoubleLiteral D_800E6488 = { 0.7 }; -const DoubleLiteral D_800E6490 = { 20.5 }; -const DoubleLiteral D_800E6498 = { 65.0 }; -const DoubleLiteral D_800E64A0 = { 0.16666666666666666 }; -const DoubleLiteral D_800E64A8 = { 1.09 }; -const DoubleLiteral D_800E64B0 = { 0.4 }; -const DoubleLiteral D_800E64B8 = { 0.01 }; -const DoubleLiteral D_800E64C0 = { 0.01 }; -const DoubleLiteral D_800E64C8 = { 0.016 }; -const DoubleLiteral D_800E64D0 = { 1.2 }; -const FloatLiteral D_800E64D8 = { 1.2f }; -const DoubleLiteral D_800E64E0 = { 0.016 }; -const FloatLiteral D_800E64E8 = { 1.4f }; -const FloatLiteral D_800E64EC = { 0.01f }; -const FloatLiteral D_800E64F0 = { 0.02f }; -const FloatLiteral D_800E64F4 = { 0.004f }; -const DoubleLiteral D_800E64F8 = { 0.6 }; -const DoubleLiteral D_800E6500 = { 0.3 }; -const FloatLiteral D_800E6508 = { 1.2f }; -const DoubleLiteral D_800E6510 = { 0.00015 }; -const DoubleLiteral D_800E6518 = { 1.8 }; -const DoubleLiteral D_800E6520 = { 0.4 }; -const FloatLiteral D_800E6528 = { 0.4f }; -const DoubleLiteral D_800E6530 = { 0.058823529411764705 }; -const DoubleLiteral D_800E6538 = { 0.05 }; -const DoubleLiteral D_800E6540 = { 0.65 }; -const DoubleLiteral D_800E6548 = { 0.65 }; -const DoubleLiteral D_800E6550 = { 0.7 }; -const DoubleLiteral D_800E6558 = { 0.4 }; -const DoubleLiteral D_800E6560 = { 0.005555555555555556 }; -const FloatLiteral D_800E6568 = { 0.4f }; -const DoubleLiteral D_800E6570 = { 65.0 }; -const DoubleLiteral D_800E6578 = { 0.2 }; -const FloatLiteral D_800E6580 = { 1.3f }; -const FloatLiteral D_800E6584 = { 0.1f }; -const FloatLiteral D_800E6588 = { 0.002f }; -const FloatLiteral D_800E658C = { 0.01f }; -const DoubleLiteral D_800E6590 = { 1.2 }; -const DoubleLiteral D_800E6598 = { 0.45 }; -const FloatLiteral D_800E65A0 = { -0.02f }; -const FloatLiteral D_800E65A4 = { 0.87f }; -const FloatLiteral D_800E65A8 = { 0.9f }; -const FloatLiteral D_800E65AC = { -10000.0f }; - -// Jump table in func_8004DE38 -const u32 D_800E65B0[] = { - 0x8004EB84, 0x8004EBBC, 0x8004EBD8, 0x8004EBF4, - 0x8004EBA0, 0x8004EC10, 0x8004EC50, 0x8004EC90, - 0x8004EC90, 0x8004ED88, 0x8004EBF4, 0x8004ECD0, - 0x8004ED10, 0x8004ED50 -}; - -const FloatLiteral D_800E65E8 = { 1.12f }; -const FloatLiteral D_800E65EC = { 0.02f }; -const FloatLiteral D_800E65F0 = { -0.02f }; -const FloatLiteral D_800E65F4 = { 265.0f }; -const DoubleLiteral D_800E65F8 = { 1500.0 }; -const DoubleLiteral D_800E6600 = { 0.065 }; -const DoubleLiteral D_800E6608 = { 0.3 }; -const DoubleLiteral D_800E6610 = { 0.1 }; -const DoubleLiteral D_800E6618 = { 0.3 }; -const DoubleLiteral D_800E6620 = { 0.1 }; -const DoubleLiteral D_800E6628 = { 0.004 }; -const DoubleLiteral D_800E6630 = { 0.65 }; -const DoubleLiteral D_800E6638 = { 0.024999999999999998 }; -const DoubleLiteral D_800E6640 = { 0.4 }; -const DoubleLiteral D_800E6648 = { 1.1 }; -const DoubleLiteral D_800E6650 = { -0.3 }; -const DoubleLiteral D_800E6658 = { 0.3 }; -const FloatLiteral D_800E6660 = { 0.02f }; -const DoubleLiteral D_800E6668 = { 0.9 }; -const DoubleLiteral D_800E6670 = { 0.7 }; -const DoubleLiteral D_800E6678 = { 1.7 }; -const DoubleLiteral D_800E6680 = { 0.15 }; -const DoubleLiteral D_800E6688 = { 0.3 }; -const DoubleLiteral D_800E6690 = { 0.32 }; -const DoubleLiteral D_800E6698 = { -0.04 }; -const DoubleLiteral D_800E66A0 = { 0.04 }; -const DoubleLiteral D_800E66A8 = { 0.9 }; -const DoubleLiteral D_800E66B0 = { 0.3 }; -const DoubleLiteral D_800E66B8 = { 0.1 }; -const FloatLiteral D_800E66C0 = { 0.1f }; -const DoubleLiteral D_800E66C8 = { 0.05 }; - -// Jump table in func_8005250C -const u32 D_800E66D0[] = { - 0x80052678, 0x80052978, 0x80052978, 0x800527AC, - 0x8005280C, 0x80052858, 0x800528A4, 0x80052910 -}; - -const DoubleLiteral D_800E66F0 = { 0.97 }; -const DoubleLiteral D_800E66F8 = { 0.87 }; -const DoubleLiteral D_800E6700 = { 0.9 }; -const DoubleLiteral D_800E6708 = { 0.3 }; -const DoubleLiteral D_800E6710 = { 1.6 }; -const DoubleLiteral D_800E6718 = { 0.025 }; -const FloatLiteral D_800E6720 = { 0.45f }; -const DoubleLiteral D_800E6728 = { 0.97 }; -const DoubleLiteral D_800E6730 = { 0.2 }; -const DoubleLiteral D_800E6738 = { 0.2 }; -const DoubleLiteral D_800E6740 = { 1.33 }; -const DoubleLiteral D_800E6748 = { 0.53 }; -const DoubleLiteral D_800E6750 = { 1.8 }; -const FloatLiteral D_800E6758 = { 1.8f }; -const DoubleLiteral D_800E6760 = { 0.2 }; -const DoubleLiteral D_800E6768 = { 0.1 }; -const DoubleLiteral D_800E6770 = { 0.2 }; -const DoubleLiteral D_800E6778 = { 0.05 }; -const DoubleLiteral D_800E6780 = { 0.1 }; -const DoubleLiteral D_800E6788 = { 0.4 }; -const DoubleLiteral D_800E6790 = { 0.1 }; -const DoubleLiteral D_800E6798 = { 1.4 }; -const FloatLiteral D_800E67A0 = { 0.1f }; - -// Jump table in func_80053E9C -const u32 D_800E67A4[] = { - 0x80053FF0, 0x8005406C, 0x800540FC, 0x8005408C, - 0x800540C4, 0x80054098 -}; - -const DoubleLiteral D_800E67C0 = { 20.5 }; -const DoubleLiteral D_800E67C8 = { 0.3 }; -const DoubleLiteral D_800E67D0 = { 0.1 }; -const DoubleLiteral D_800E67D8 = { 0.3 }; -const DoubleLiteral D_800E67E0 = { 0.1 }; -const DoubleLiteral D_800E67E8 = { -0.3 }; -const DoubleLiteral D_800E67F0 = { 0.3 }; -const DoubleLiteral D_800E67F8 = { 0.9 }; -const FloatLiteral D_800E6800 = { 0.02f }; -const DoubleLiteral D_800E6808 = { 1.7 }; -const DoubleLiteral D_800E6810 = { 0.15 }; -const DoubleLiteral D_800E6818 = { 0.32 }; -const DoubleLiteral D_800E6820 = { -0.04 }; -const DoubleLiteral D_800E6828 = { 0.04 }; -const DoubleLiteral D_800E6830 = { 0.9 }; -const DoubleLiteral D_800E6838 = { 1.075 }; -const DoubleLiteral D_800E6840 = { 0.15 }; -const DoubleLiteral D_800E6848 = { 0.7 }; -const FloatLiteral D_800E6850 = { 1500.0f }; - -// Jump table in func_80055EC0 -const u32 D_800E6854[] = { - 0x8005635C, 0x80056370, 0x80056380, 0x8005639C, - 0x800563EC, 0x80056508, 0x8005655C, 0x80056508, - 0x800563EC, 0x80056620, 0x800563CC, 0x80056380, - 0x800565C0, 0x800565E0, 0x80056600, 0x800563EC, - 0x80056828 -}; - -// Jump table in func_80055EC0 -const u32 D_800E6894[] = { - 0x80056834, 0x80056840, 0x8005684C, 0x80056884, - 0x80056884, 0x80056884, 0x80056884, 0x80056884, - 0x80056884, 0x80056874, 0x80056880 -}; - -const FloatLiteral D_800E68C4 = { 10000.0f }; -const FloatLiteral D_800E68C8 = { 10000.0f }; -const FloatLiteral D_800E68CC = { 0.025f }; - -// Jump table in func_80057A40 -const u32 D_800E68D0[] = { - 0x80057BBC, 0x80057BE4, 0x80057CD0, 0x80057C0C, - 0x80057C34, 0x80057C5C, 0x80057C84, 0x80057CAC -}; - -const DoubleLiteral D_800E68F0 = { 91.75 }; -const DoubleLiteral D_800E68F8 = { 90.0 }; -const DoubleLiteral D_800E6900 = { 48.5 }; -const DoubleLiteral D_800E6908 = { 0.95 }; -const DoubleLiteral D_800E6910 = { 65.0 }; -const DoubleLiteral D_800E6918 = { 1.3 }; -const DoubleLiteral D_800E6920 = { -0.2 }; -const DoubleLiteral D_800E6928 = { 1.2 }; -const DoubleLiteral D_800E6930 = { 1.2 }; -const DoubleLiteral D_800E6938 = { 0.8 }; -const DoubleLiteral D_800E6940 = { 0.45 }; -const FloatLiteral D_800E6948 = { -0.02f }; -const FloatLiteral D_800E694C = { 1000000.0f }; -const DoubleLiteral D_800E6950 = { 160000.0 }; -const FloatLiteral D_800E6958 = { 0.8f }; -const DoubleLiteral D_800E6960 = { 160000.0 }; - -// Jump table in func_8005A6F0 -const u32 D_800E6968[] = { - 0x8005AF80, 0x8005AFD8, 0x8005B004, 0x8005B030, - 0x8005AFAC, 0x8005B05C, 0x8005B094, 0x8005B0CC, - 0x8005B0CC, 0x8005B1B0, 0x8005B030, 0x8005B10C, - 0x8005B144, 0x8005B17C -}; - -const DoubleLiteral D_800E69A0 = { 0.9 }; -const FloatLiteral D_800E69A8 = { 0.02f }; -const FloatLiteral D_800E69AC = { -0.02f }; -const FloatLiteral D_800E69B0 = { 265.0f }; -const DoubleLiteral D_800E69B8 = { 1500.0 }; -const DoubleLiteral D_800E69C0 = { 0.025 }; -const DoubleLiteral D_800E69C8 = { 0.595 }; -const DoubleLiteral D_800E69D0 = { 0.004 }; -const DoubleLiteral D_800E69D8 = { 1.3 }; -const DoubleLiteral D_800E69E0 = { 150.0 }; -const FloatLiteral D_800E69E8 = { 0.01f }; -const DoubleLiteral D_800E69F0 = { 0.01 }; -const DoubleLiteral D_800E69F8 = { 35.0 }; -const FloatLiteral D_800E6A00 = { 0.05f }; - /*********************************/ /************ .bss ************/ @@ -630,7 +348,7 @@ void func_800535C4(unk800535C4 *arg0, unk800535C4_2 *arg1) { void func_80053664(Player_64 *arg0) { if (arg0->throttle > 0.0) { - arg0->throttle -= D_800E6768.doubleLiteral; + arg0->throttle -= 0.1; } if (D_8011D528 & 0x8000) { @@ -639,12 +357,12 @@ void func_80053664(Player_64 *arg0) { if (D_8011D528 & 0x4000) { if (arg0->brake < 1.0) { - arg0->brake += D_800E6770.doubleLiteral; + arg0->brake += 0.2; } } else { //! @bug Will cause a negative brake value resulting in higher velocity - if (arg0->brake > D_800E6778.doubleLiteral) { - arg0->brake -= D_800E6780.doubleLiteral; + if (arg0->brake > 0.05) { + arg0->brake -= 0.1; } } } @@ -849,7 +567,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A6F0.s") GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005B818.s") void func_8005C25C(void) { - D_800DCB9C[0] = D_800E6A00.floatLiteral; + D_800DCB9C[0] = 0.05f; } /* Unknown Size */ From a2500be835bafef9560211245420fa7306cec37c Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 20:31:02 -0500 Subject: [PATCH 40/66] Split unknown_066AA0.c into unknown_06B2B0.c and moved the rest of the rodata --- .../unknown_066AA0/func_80065EA0.s | 5 + .../unknown_066AA0/func_80069F28.s | 23 + .../unknown_066AA0/func_8006CCF0.s | 49 +- .../unknown_066AA0/func_8006DCF8.s | 15 +- asm/unknown_070110.s | 2 +- src/unknown_066AA0.c | 3254 +++++------------ src/unknown_06B2B0.c | 1324 +++++++ 7 files changed, 2365 insertions(+), 2307 deletions(-) create mode 100644 src/unknown_06B2B0.c diff --git a/asm/non_matchings/unknown_066AA0/func_80065EA0.s b/asm/non_matchings/unknown_066AA0/func_80065EA0.s index 7d5d58ec..bbd88892 100644 --- a/asm/non_matchings/unknown_066AA0/func_80065EA0.s +++ b/asm/non_matchings/unknown_066AA0/func_80065EA0.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E709C +.float 15000.0 + +.text glabel func_80065EA0 /* 066AA0 80065EA0 3C048012 */ lui $a0, %hi(D_80120DA0) # $a0, 0x8012 /* 066AA4 80065EA4 24030001 */ li $v1, 1 diff --git a/asm/non_matchings/unknown_066AA0/func_80069F28.s b/asm/non_matchings/unknown_066AA0/func_80069F28.s index f2628b53..71355d63 100644 --- a/asm/non_matchings/unknown_066AA0/func_80069F28.s +++ b/asm/non_matchings/unknown_066AA0/func_80069F28.s @@ -1,3 +1,26 @@ +.rdata +glabel D_800E7078 +.asciz "%x." +glabel D_800E707C +.asciz "%x " +.ascii "\0\0\0" # padding +glabel D_800E7084 +.asciz "\n" +.ascii "\0\0" # padding +glabel D_800E7088 +.asciz "\n" +.ascii "\0\0" # padding +glabel D_800E708C +.asciz "%f " +.ascii "\0\0\0" # padding +glabel D_800E7094 +.asciz "\n" +.ascii "\0\0" # padding +glabel D_800E7098 +.asciz "\n" +.ascii "\0\0" # padding + +.text glabel func_80069F28 /* 06AB28 80069F28 3C038012 */ lui $v1, %hi(D_80120CE0) # $v1, 0x8012 /* 06AB2C 80069F2C 8C630CE0 */ lw $v1, %lo(D_80120CE0)($v1) diff --git a/asm/non_matchings/unknown_066AA0/func_8006CCF0.s b/asm/non_matchings/unknown_066AA0/func_8006CCF0.s index 58553169..362f0859 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006CCF0.s +++ b/asm/non_matchings/unknown_066AA0/func_8006CCF0.s @@ -1,3 +1,12 @@ +.late_rodata +glabel jpt_800E7154 +.word L8006CF68, L8006CF5C, L8006D024, L8006CF80, L8006CF9C, L8006D024, L8006D024, L8006CFB0, L8006CFC4, L8006CFD8, L8006CFEC, L8006D000, L8006D014 +glabel jpt_800E7188 +.word L8006D0B8, L8006D0C4, L8006D108, L8006D19C, L8006D14C, L8006D17C, L8006D188, L8006D1C0, L8006D1C0, L8006D1C0, L8006D1C0, L8006D164 +glabel jpt_800E71B8 +.word L8006D5FC, L8006D614, L8006D62C, L8006D644, L8006D65C, L8006D674, L8006D6D4, L8006D6F4 + +.text glabel func_8006CCF0 /* 06D8F0 8006CCF0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 06D8F4 8006CCF4 AFBF0024 */ sw $ra, 0x24($sp) @@ -158,21 +167,24 @@ glabel func_8006CCF0 /* 06DB38 8006CF38 1020003A */ beqz $at, .L8006D024 /* 06DB3C 8006CF3C AFA20044 */ sw $v0, 0x44($sp) /* 06DB40 8006CF40 000C6080 */ sll $t4, $t4, 2 -/* 06DB44 8006CF44 3C01800E */ lui $at, %hi(D_800E7154) # $at, 0x800e +/* 06DB44 8006CF44 3C01800E */ lui $at, %hi(jpt_800E7154) # $at, 0x800e /* 06DB48 8006CF48 002C0821 */ addu $at, $at, $t4 -/* 06DB4C 8006CF4C 8C2C7154 */ lw $t4, %lo(D_800E7154)($at) +/* 06DB4C 8006CF4C 8C2C7154 */ lw $t4, %lo(jpt_800E7154)($at) /* 06DB50 8006CF50 00000000 */ nop /* 06DB54 8006CF54 01800008 */ jr $t4 /* 06DB58 8006CF58 00000000 */ nop +glabel L8006CF5C /* 06DB5C 8006CF5C 360D2020 */ ori $t5, $s0, 0x2020 /* 06DB60 8006CF60 10000030 */ b .L8006D024 /* 06DB64 8006CF64 01A08025 */ move $s0, $t5 +glabel L8006CF68 /* 06DB68 8006CF68 3C018012 */ lui $at, %hi(D_80123516) # $at, 0x8012 /* 06DB6C 8006CF6C A0203516 */ sb $zero, %lo(D_80123516)($at) /* 06DB70 8006CF70 0C01B63C */ jal func_8006D8F0 /* 06DB74 8006CF74 2404FFFF */ li $a0, -1 /* 06DB78 8006CF78 1000002B */ b .L8006D028 /* 06DB7C 8006CF7C 8FA40050 */ lw $a0, 0x50($sp) +glabel L8006CF80 /* 06DB80 8006CF80 0C01B0B9 */ jal func_8006C2E4 /* 06DB84 8006CF84 00000000 */ nop /* 06DB88 8006CF88 3C01800E */ lui $at, %hi(D_800DD390) # $at, 0x800e @@ -180,41 +192,49 @@ glabel func_8006CCF0 /* 06DB90 8006CF90 A020D390 */ sb $zero, %lo(D_800DD390)($at) /* 06DB94 8006CF94 10000023 */ b .L8006D024 /* 06DB98 8006CF98 01C08025 */ move $s0, $t6 +glabel L8006CF9C /* 06DB9C 8006CF9C 360F0020 */ ori $t7, $s0, 0x20 /* 06DBA0 8006CFA0 24180001 */ li $t8, 1 /* 06DBA4 8006CFA4 AFB80040 */ sw $t8, 0x40($sp) /* 06DBA8 8006CFA8 1000001E */ b .L8006D024 /* 06DBAC 8006CFAC 01E08025 */ move $s0, $t7 +glabel L8006CFB0 /* 06DBB0 8006CFB0 36190020 */ ori $t9, $s0, 0x20 /* 06DBB4 8006CFB4 24090002 */ li $t1, 2 /* 06DBB8 8006CFB8 AFA90040 */ sw $t1, 0x40($sp) /* 06DBBC 8006CFBC 10000019 */ b .L8006D024 /* 06DBC0 8006CFC0 03208025 */ move $s0, $t9 +glabel L8006CFC4 /* 06DBC4 8006CFC4 360A0020 */ ori $t2, $s0, 0x20 /* 06DBC8 8006CFC8 240B0003 */ li $t3, 3 /* 06DBCC 8006CFCC AFAB0040 */ sw $t3, 0x40($sp) /* 06DBD0 8006CFD0 10000014 */ b .L8006D024 /* 06DBD4 8006CFD4 01408025 */ move $s0, $t2 +glabel L8006CFD8 /* 06DBD8 8006CFD8 360C0020 */ ori $t4, $s0, 0x20 /* 06DBDC 8006CFDC 240D0004 */ li $t5, 4 /* 06DBE0 8006CFE0 AFAD0040 */ sw $t5, 0x40($sp) /* 06DBE4 8006CFE4 1000000F */ b .L8006D024 /* 06DBE8 8006CFE8 01808025 */ move $s0, $t4 +glabel L8006CFEC /* 06DBEC 8006CFEC 360E0020 */ ori $t6, $s0, 0x20 /* 06DBF0 8006CFF0 240F0005 */ li $t7, 5 /* 06DBF4 8006CFF4 AFAF0040 */ sw $t7, 0x40($sp) /* 06DBF8 8006CFF8 1000000A */ b .L8006D024 /* 06DBFC 8006CFFC 01C08025 */ move $s0, $t6 +glabel L8006D000 /* 06DC00 8006D000 36180020 */ ori $t8, $s0, 0x20 /* 06DC04 8006D004 24190006 */ li $t9, 6 /* 06DC08 8006D008 AFB90040 */ sw $t9, 0x40($sp) /* 06DC0C 8006D00C 10000005 */ b .L8006D024 /* 06DC10 8006D010 03008025 */ move $s0, $t8 +glabel L8006D014 /* 06DC14 8006D014 36090020 */ ori $t1, $s0, 0x20 /* 06DC18 8006D018 240A0007 */ li $t2, 7 /* 06DC1C 8006D01C AFAA0040 */ sw $t2, 0x40($sp) /* 06DC20 8006D020 01208025 */ move $s0, $t1 .L8006D024: +glabel L8006D024 /* 06DC24 8006D024 8FA40050 */ lw $a0, 0x50($sp) .L8006D028: /* 06DC28 8006D028 0C030D10 */ jal func_800C3440 @@ -249,15 +269,17 @@ glabel func_8006CCF0 /* 06DC94 8006D094 1020004A */ beqz $at, .L8006D1C0 /* 06DC98 8006D098 AFA20044 */ sw $v0, 0x44($sp) /* 06DC9C 8006D09C 000D6880 */ sll $t5, $t5, 2 -/* 06DCA0 8006D0A0 3C01800E */ lui $at, %hi(D_800E7188) # $at, 0x800e +/* 06DCA0 8006D0A0 3C01800E */ lui $at, %hi(jpt_800E7188) # $at, 0x800e /* 06DCA4 8006D0A4 002D0821 */ addu $at, $at, $t5 -/* 06DCA8 8006D0A8 8C2D7188 */ lw $t5, %lo(D_800E7188)($at) +/* 06DCA8 8006D0A8 8C2D7188 */ lw $t5, %lo(jpt_800E7188)($at) /* 06DCAC 8006D0AC 00000000 */ nop /* 06DCB0 8006D0B0 01A00008 */ jr $t5 /* 06DCB4 8006D0B4 00000000 */ nop +glabel L8006D0B8 /* 06DCB8 8006D0B8 3C018012 */ lui $at, %hi(gIsPaused) # $at, 0x8012 /* 06DCBC 8006D0BC 10000040 */ b .L8006D1C0 /* 06DCC0 8006D0C0 A0203515 */ sb $zero, %lo(gIsPaused)($at) +glabel L8006D0C4 /* 06DCC4 8006D0C4 0C000414 */ jal func_80001050 /* 06DCC8 8006D0C8 00000000 */ nop /* 06DCCC 8006D0CC 0C030C53 */ jal func_800C314C @@ -276,6 +298,7 @@ glabel func_8006CCF0 .L8006D100: /* 06DD00 8006D100 1000002F */ b .L8006D1C0 /* 06DD04 8006D104 01C08025 */ move $s0, $t6 +glabel L8006D108 /* 06DD08 8006D108 0C000414 */ jal func_80001050 /* 06DD0C 8006D10C 00000000 */ nop /* 06DD10 8006D110 0C030C53 */ jal func_800C314C @@ -294,26 +317,31 @@ glabel func_8006CCF0 .L8006D144: /* 06DD44 8006D144 1000001E */ b .L8006D1C0 /* 06DD48 8006D148 01E08025 */ move $s0, $t7 +glabel L8006D14C /* 06DD4C 8006D14C 24180001 */ li $t8, 1 /* 06DD50 8006D150 0C030C53 */ jal func_800C314C /* 06DD54 8006D154 AFB80040 */ sw $t8, 0x40($sp) /* 06DD58 8006D158 36190020 */ ori $t9, $s0, 0x20 /* 06DD5C 8006D15C 10000018 */ b .L8006D1C0 /* 06DD60 8006D160 03208025 */ move $s0, $t9 +glabel L8006D164 /* 06DD64 8006D164 24090006 */ li $t1, 6 /* 06DD68 8006D168 0C030C53 */ jal func_800C314C /* 06DD6C 8006D16C AFA90040 */ sw $t1, 0x40($sp) /* 06DD70 8006D170 360A0020 */ ori $t2, $s0, 0x20 /* 06DD74 8006D174 10000012 */ b .L8006D1C0 /* 06DD78 8006D178 01408025 */ move $s0, $t2 +glabel L8006D17C /* 06DD7C 8006D17C 3C018012 */ lui $at, %hi(gIsPaused) # $at, 0x8012 /* 06DD80 8006D180 1000000F */ b .L8006D1C0 /* 06DD84 8006D184 A0203515 */ sb $zero, %lo(gIsPaused)($at) +glabel L8006D188 /* 06DD88 8006D188 0C008B86 */ jal func_80022E18 /* 06DD8C 8006D18C 24040001 */ li $a0, 1 /* 06DD90 8006D190 3C018012 */ lui $at, %hi(gIsPaused) # $at, 0x8012 /* 06DD94 8006D194 1000000A */ b .L8006D1C0 /* 06DD98 8006D198 A0203515 */ sb $zero, %lo(gIsPaused)($at) +glabel L8006D19C /* 06DD9C 8006D19C 3C01800E */ lui $at, %hi(D_800DD390) # $at, 0x800e /* 06DDA0 8006D1A0 0C000414 */ jal func_80001050 /* 06DDA4 8006D1A4 A020D390 */ sb $zero, %lo(D_800DD390)($at) @@ -324,6 +352,7 @@ glabel func_8006CCF0 /* 06DDB8 8006D1B8 360B0030 */ ori $t3, $s0, 0x30 /* 06DDBC 8006D1BC 01608025 */ move $s0, $t3 .L8006D1C0: +glabel L8006D1C0 /* 06DDC0 8006D1C0 3C048012 */ lui $a0, %hi(D_801211F8) # $a0, 0x8012 /* 06DDC4 8006D1C4 0C01E015 */ jal func_80078054 /* 06DDC8 8006D1C8 248411F8 */ addiu $a0, %lo(D_801211F8) # addiu $a0, $a0, 0x11f8 @@ -612,42 +641,48 @@ glabel func_8006CCF0 /* 06E1D8 8006D5D8 10200095 */ beqz $at, .L8006D830 /* 06E1DC 8006D5DC A2000000 */ sb $zero, ($s0) /* 06E1E0 8006D5E0 0019C880 */ sll $t9, $t9, 2 -/* 06E1E4 8006D5E4 3C01800E */ lui $at, %hi(D_800E71B8) # $at, 0x800e +/* 06E1E4 8006D5E4 3C01800E */ lui $at, %hi(jpt_800E71B8) # $at, 0x800e /* 06E1E8 8006D5E8 00390821 */ addu $at, $at, $t9 -/* 06E1EC 8006D5EC 8C3971B8 */ lw $t9, %lo(D_800E71B8)($at) +/* 06E1EC 8006D5EC 8C3971B8 */ lw $t9, %lo(jpt_800E71B8)($at) /* 06E1F0 8006D5F0 00000000 */ nop /* 06E1F4 8006D5F4 03200008 */ jr $t9 /* 06E1F8 8006D5F8 00000000 */ nop +glabel L8006D5FC /* 06E1FC 8006D5FC 2404000F */ li $a0, 15 /* 06E200 8006D600 2405FFFF */ li $a1, -1 /* 06E204 8006D604 0C01B68A */ jal func_8006DA28 /* 06E208 8006D608 24060001 */ li $a2, 1 /* 06E20C 8006D60C 10000088 */ b .L8006D830 /* 06E210 8006D610 00000000 */ nop +glabel L8006D614 /* 06E214 8006D614 24040011 */ li $a0, 17 /* 06E218 8006D618 24050022 */ li $a1, 34 /* 06E21C 8006D61C 0C01B68A */ jal func_8006DA28 /* 06E220 8006D620 00003025 */ move $a2, $zero /* 06E224 8006D624 10000082 */ b .L8006D830 /* 06E228 8006D628 00000000 */ nop +glabel L8006D62C /* 06E22C 8006D62C 24040014 */ li $a0, 20 /* 06E230 8006D630 24050022 */ li $a1, 34 /* 06E234 8006D634 0C01B68A */ jal func_8006DA28 /* 06E238 8006D638 00003025 */ move $a2, $zero /* 06E23C 8006D63C 1000007C */ b .L8006D830 /* 06E240 8006D640 00000000 */ nop +glabel L8006D644 /* 06E244 8006D644 24040015 */ li $a0, 21 /* 06E248 8006D648 24050022 */ li $a1, 34 /* 06E24C 8006D64C 0C01B68A */ jal func_8006DA28 /* 06E250 8006D650 00003025 */ move $a2, $zero /* 06E254 8006D654 10000076 */ b .L8006D830 /* 06E258 8006D658 00000000 */ nop +glabel L8006D65C /* 06E25C 8006D65C 24040016 */ li $a0, 22 /* 06E260 8006D660 24050022 */ li $a1, 34 /* 06E264 8006D664 0C01B68A */ jal func_8006DA28 /* 06E268 8006D668 00003025 */ move $a2, $zero /* 06E26C 8006D66C 10000070 */ b .L8006D830 /* 06E270 8006D670 00000000 */ nop +glabel L8006D674 /* 06E274 8006D674 0C027B34 */ jal is_drumstick_unlocked /* 06E278 8006D678 AFA00044 */ sw $zero, 0x44($sp) /* 06E27C 8006D67C 10400005 */ beqz $v0, .L8006D694 @@ -674,6 +709,7 @@ glabel func_8006CCF0 /* 06E2C8 8006D6C8 24050016 */ li $a1, 22 /* 06E2CC 8006D6CC 10000058 */ b .L8006D830 /* 06E2D0 8006D6D0 00000000 */ nop +glabel L8006D6D4 /* 06E2D4 8006D6D4 240D0001 */ li $t5, 1 /* 06E2D8 8006D6D8 A20D0000 */ sb $t5, ($s0) /* 06E2DC 8006D6DC 24040017 */ li $a0, 23 @@ -682,6 +718,7 @@ glabel func_8006CCF0 /* 06E2E8 8006D6E8 00003025 */ move $a2, $zero /* 06E2EC 8006D6EC 10000050 */ b .L8006D830 /* 06E2F0 8006D6F0 A2000000 */ sb $zero, ($s0) +glabel L8006D6F4 /* 06E2F4 8006D6F4 24040019 */ li $a0, 25 /* 06E2F8 8006D6F8 2405FFFF */ li $a1, -1 /* 06E2FC 8006D6FC 0C01B68A */ jal func_8006DA28 diff --git a/asm/non_matchings/unknown_066AA0/func_8006DCF8.s b/asm/non_matchings/unknown_066AA0/func_8006DCF8.s index 5d7a9d0b..64b369a1 100644 --- a/asm/non_matchings/unknown_066AA0/func_8006DCF8.s +++ b/asm/non_matchings/unknown_066AA0/func_8006DCF8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E71D8 +.word L8006DF70, L8006E00C, L8006E054, L8006E0E0, L8006DEE8, L8006E0E0, L8006E0E0, L8006E0E0, L8006E0E0, L8006E0E0, L8006E0E0, L8006E0E0, L8006E0E0, L8006DF00 + +.text glabel func_8006DCF8 /* 06E8F8 8006DCF8 3C018012 */ lui $at, %hi(gIsPaused) # $at, 0x8012 /* 06E8FC 8006DCFC 3C0E8012 */ lui $t6, %hi(D_80123514) # $t6, 0x8012 @@ -121,18 +126,20 @@ glabel func_8006DCF8 /* 06EAC4 8006DEC4 2DC1000E */ sltiu $at, $t6, 0xe /* 06EAC8 8006DEC8 10200085 */ beqz $at, .L8006E0E0 /* 06EACC 8006DECC 000E7080 */ sll $t6, $t6, 2 -/* 06EAD0 8006DED0 3C01800E */ lui $at, %hi(D_800E71D8) # $at, 0x800e +/* 06EAD0 8006DED0 3C01800E */ lui $at, %hi(jpt_800E71D8) # $at, 0x800e /* 06EAD4 8006DED4 002E0821 */ addu $at, $at, $t6 -/* 06EAD8 8006DED8 8C2E71D8 */ lw $t6, %lo(D_800E71D8)($at) +/* 06EAD8 8006DED8 8C2E71D8 */ lw $t6, %lo(jpt_800E71D8)($at) /* 06EADC 8006DEDC 00000000 */ nop /* 06EAE0 8006DEE0 01C00008 */ jr $t6 /* 06EAE4 8006DEE4 00000000 */ nop +glabel L8006DEE8 /* 06EAE8 8006DEE8 2404000F */ li $a0, 15 /* 06EAEC 8006DEEC 2405FFFF */ li $a1, -1 /* 06EAF0 8006DEF0 0C01B68A */ jal func_8006DA28 /* 06EAF4 8006DEF4 24060001 */ li $a2, 1 /* 06EAF8 8006DEF8 100000F8 */ b .L8006E2DC /* 06EAFC 8006DEFC 8FBF0024 */ lw $ra, 0x24($sp) +glabel L8006DF00 /* 06EB00 8006DF00 3C088012 */ lui $t0, %hi(D_801234F4) # $t0, 0x8012 /* 06EB04 8006DF04 3C098012 */ lui $t1, %hi(D_80123504) # $t1, 0x8012 /* 06EB08 8006DF08 3C0B8012 */ lui $t3, %hi(D_80123508) # $t3, 0x8012 @@ -161,6 +168,7 @@ glabel func_8006DCF8 /* 06EB64 8006DF64 00402025 */ move $a0, $v0 /* 06EB68 8006DF68 100000DC */ b .L8006E2DC /* 06EB6C 8006DF6C 8FBF0024 */ lw $ra, 0x24($sp) +glabel L8006DF70 /* 06EB70 8006DF70 3C058012 */ lui $a1, %hi(D_80121250) # $a1, 0x8012 /* 06EB74 8006DF74 24A51250 */ addiu $a1, %lo(D_80121250) # addiu $a1, $a1, 0x1250 /* 06EB78 8006DF78 80B80000 */ lb $t8, ($a1) @@ -202,6 +210,7 @@ glabel func_8006DCF8 /* 06EC00 8006E000 00402025 */ move $a0, $v0 /* 06EC04 8006E004 100000B5 */ b .L8006E2DC /* 06EC08 8006E008 8FBF0024 */ lw $ra, 0x24($sp) +glabel L8006E00C /* 06EC0C 8006E00C 3C018012 */ lui $at, %hi(D_801234EC) # $at, 0x8012 /* 06EC10 8006E010 AC2034EC */ sw $zero, %lo(D_801234EC)($at) /* 06EC14 8006E014 3C038012 */ lui $v1, %hi(D_80123500) # $v1, 0x8012 @@ -220,6 +229,7 @@ glabel func_8006DCF8 /* 06EC48 8006E048 00000000 */ nop /* 06EC4C 8006E04C 100000A3 */ b .L8006E2DC /* 06EC50 8006E050 8FBF0024 */ lw $ra, 0x24($sp) +glabel L8006E054 /* 06EC54 8006E054 3C058012 */ lui $a1, %hi(D_80121250) # $a1, 0x8012 /* 06EC58 8006E058 3C018012 */ lui $at, %hi(D_801234EC) # $at, 0x8012 /* 06EC5C 8006E05C 24A51250 */ addiu $a1, %lo(D_80121250) # addiu $a1, $a1, 0x1250 @@ -256,6 +266,7 @@ glabel func_8006DCF8 /* 06ECD8 8006E0D8 10000080 */ b .L8006E2DC /* 06ECDC 8006E0DC 8FBF0024 */ lw $ra, 0x24($sp) .L8006E0E0: +glabel L8006E0E0 /* 06ECE0 8006E0E0 00002025 */ move $a0, $zero /* 06ECE4 8006E0E4 2405FFFF */ li $a1, -1 /* 06ECE8 8006E0E8 0C01B68A */ jal func_8006DA28 diff --git a/asm/unknown_070110.s b/asm/unknown_070110.s index 81043f7b..77e33d0f 100644 --- a/asm/unknown_070110.s +++ b/asm/unknown_070110.s @@ -1,5 +1,5 @@ /* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80065F10 */ +/* RAM_POS: 0x8006F510 */ .section .text diff --git a/src/unknown_066AA0.c b/src/unknown_066AA0.c index a216afb4..efec9482 100644 --- a/src/unknown_066AA0.c +++ b/src/unknown_066AA0.c @@ -1,2298 +1,956 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80065EA0 */ - -#include "types.h" -#include "macros.h" -#include "structs.h" -#include "fast3d.h" - -extern u32 osTvType; - -/************ .rodata ************/ - -const char D_800E6F00[] = "Camera Error: Illegal mode!\n"; -const char D_800E6F20[] = "Camera Error: Illegal player no!\n"; -const char D_800E6F34[] = "cameraPushSprMtx: model stack overflow!!\n"; -const char D_800E6F70[] = "\nCam do 2D sprite called with NULL pointer!"; -const char D_800E6F9C[] = "CamDo2DSprite FrameNo Overflow !!!\n"; -const char D_800E6FC0[] = "cameraPushModelMtx: model stack overflow!!\n"; -const char D_800E6FEC[] = "camPushModelMtx: bsp stack overflow!!\n"; -const char D_800E7010[] = "camPopModelMtx: model stack negative overflow!!\n"; -const char D_800E7048[] = "camPopModelMtx: bsp stack negative overflow!!\n"; - -const char D_800E7078[] = "%x."; -const char D_800E707C[] = "%x "; -const char D_800E7084[] = "\n"; -const char D_800E7088[] = "\n"; -const char D_800E708C[] = "%f "; -const char D_800E7094[] = "\n"; -const char D_800E7098[] = "\n"; - -const FloatLiteral D_800E709C = { 15000.0f }; -const FloatLiteral D_800E70A0 = { 15000.0f }; -const FloatLiteral D_800E70A4 = { 15000.0f }; - -// This is probably a file boundary. -const DoubleLiteral D_800E70A8 = { 0.0 }; - -const char D_800E70B0[] = "LOADLEVEL Error: Level out of range\n"; -const char D_800E70D8[] = "BossLev problem\n"; -const char D_800E70EC[] = "AITABLE Error: Table out of range\n"; -const char D_800E7110[] = "1.1605"; -const char D_800E7118[] = "02/10/97 16:03"; -const char D_800E7128[] = "pmountain"; - -const char D_800E7134[] = "BBB\n"; -const char D_800E713C[] = "CAR"; -const char D_800E7140[] = "HOV"; -const char D_800E7144[] = "PLN"; -const char D_800E7148[] = "Swapping\n"; - -// Jump table in func_8006CCF0 -const u32 D_800E7154[] = { - 0x8006CF68, 0x8006CF5C, 0x8006D024, 0x8006CF80, - 0x8006CF9C, 0x8006D024, 0x8006D024, 0x8006CFB0, - 0x8006CFC4, 0x8006CFD8, 0x8006CFEC, 0x8006D000, - 0x8006D014 -}; - -// Jump table in func_8006CCF0 -const u32 D_800E7188[] = { - 0x8006D0B8, 0x8006D0C4, 0x8006D108, 0x8006D19C, - 0x8006D14C, 0x8006D17C, 0x8006D188, 0x8006D1C0, - 0x8006D1C0, 0x8006D1C0, 0x8006D1C0, 0x8006D164 -}; - -// Jump table in func_8006CCF0 -const u32 D_800E71B8[] = { - 0x8006D5FC, 0x8006D614, 0x8006D62C, 0x8006D644, - 0x8006D65C, 0x8006D674, 0x8006D6D4, 0x8006D6F4, - 0x8006DF70, 0x8006E00C, 0x8006E054, 0x8006E0E0 -}; - -// Jump table in func_8006DCF8 -const u32 D_800E71D8[] = { - 0x8006DEE8, 0x8006E0E0, 0x8006E0E0, 0x8006E0E0, - 0x8006E0E0, 0x8006E0E0, 0x8006E0E0, 0x8006E0E0, - 0x8006E0E0, 0x8006DF00 -}; - - -/*********************************/ - -/************ .data ************/ - -s32 D_800DD060 = 0; // Currently unknown, might be a different type. - -/* Size: 0x34 bytes. */ -typedef struct unk800DD064 { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s32 unk20; - s32 unk24; - s32 unk28; - s32 unk2C; - s32 unk30; -} unk800DD064; - -unk800DD064 D_800DD064[4] = { - { - 0x00, 0x00, 0x140, 0xF0, - 0xA0, 0x78, 0x140, 0xF0, - 0x00, 0x00, 0x13F, 0xEF, 0x00 - }, - { - 0x00, 0x00, 0x140, 0xF0, - 0xA0, 0x78, 0x140, 0xF0, - 0x00, 0x00, 0x13F, 0xEF, 0x00 - }, - { - 0x00, 0x00, 0x140, 0xF0, - 0xA0, 0x78, 0x140, 0xF0, - 0x00, 0x00, 0x13F, 0xEF, 0x00 - }, - { - 0x00, 0x00, 0x140, 0xF0, - 0xA0, 0x78, 0x140, 0xF0, - 0x00, 0x00, 0x13F, 0xEF, 0x00 - } -}; - -// Not sure about the typing here -s16 D_800DD134[10] = { - 0, 0, 0, 0, - 0, -1, -1, 0, - 0, 0 -}; - -// Not sure about the typing here -u16 D_800DD148[160] = { - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0, - 0, 0, 0x01FF, 0 -}; - -f32 D_800DD288[6] = { - 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -281.0f -}; - -f32 D_800DD2A0[6] = { - 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f -}; - -f32 D_800DD2B8[5] = { - 1.0f, 0.0f, 0.0f, 0.0f, 0.0f -}; - -f32 D_800DD2CC[11] = { - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 160.0f -}; - -u8 D_800DD2F8[8] = { - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -s32 D_800DD300 = 0; // Currently unknown, might be a different type. - -s16 D_800DD304 = -1; - -// Remove this when unknown_066AA0 is split. -s32 __FILE_BOUNDARY_PADDING[2] = {0, 0}; - -/** File boundary! The following variables belong to the next file when unknown_066AA0 is split **/ - -s8 D_800DD310 = 0; // Currently unknown, might be a different type. -s8 D_800DD314 = -1; -s8 D_800DD318 = 0; -s32 D_800DD31C = 0; -s32 D_800DD320 = 0x585E; -s32 D_800DD324 = 0x154; -s16 D_800DD328 = 0; -s16 D_800DD32C = 0; - -s8 D_800DD330 = 0; - -// Unused? -char *D_800DD334[6] = { - NULL, NULL, NULL, // These also could just be regular zeroes and not pointers. - D_800E7110, D_800E7118, D_800E7128 -}; - -// Unused? -char gBuildString[40] = "Version 7.7 29/09/97 15.00 L.Schuneman"; - -s8 D_800DD374 = 0; -s32 D_800DD378 = 1; -s32 D_800DD37C = 0; -s32 D_800DD380 = 0; // Currently unknown, might be a different type. -s32 D_800DD384 = 0; -s32 D_800DD388 = 0; // Currently unknown, might be a different type. -s8 D_800DD38C = 0; -u8 D_800DD390 = 0; -s16 D_800DD394 = 0; -u8 D_800DD398 = 0; -s32 D_800DD39C = 0; // Currently unknown, might be a different type. -s8 D_800DD3A0 = 0; -s32 D_800DD3A4 = 0; // Currently unknown, might be a different type. -s32 D_800DD3A8 = 0; // Currently unknown, might be a different type. -s32 D_800DD3AC = 0; // Currently unknown, might be a different type. -s32 D_800DD3B0 = 0x1194; -s32 D_800DD3B4 = 0x1B58; -s32 D_800DD3B8 = 0x2AF8; -s32 D_800DD3BC = 0x2AF8; -s32 D_800DD3C0 = 0x12C; -s32 D_800DD3C4 = 0x258; -s32 D_800DD3C8 = 0x352; -s32 D_800DD3CC = 0x384; -s32 D_800DD3D0 = 0x12C; -s32 D_800DD3D4 = 0x190; -s32 D_800DD3D8 = 0x226; -s32 D_800DD3DC = 0x258; -s32 D_800DD3E0 = 0x14; -s32 D_800DD3E4 = 0x1E; -s32 D_800DD3E8 = 0x28; -s32 D_800DD3EC = 0x32; - -s8 D_800DD3F0 = 0; -s16 D_800DD3F4[8] = { - -32768, 0, 20, 0, - 255, -1, 20, -1 -}; -s32 D_800DD404 = 12; -s32 D_800DD408 = 0x00FFFFFF; -s32 D_800DD40C = 0x001EFFFF; // Unused? - -// Unused? -char *D_800DD410[3] = { - D_800E713C, D_800E7140, D_800E7144 -}; - -// Not sure if this is an array or a struct. -s32 D_800DD41C[2] = { - 0, 0x001EFFFF -}; - -s32 D_800DD424[2] = { - 0, 0x0104FFFF -}; -extern s32 D_800DFD94; - -/*******************************/ - -/* Size: 0x44 bytes */ -typedef struct unk80120AC0 { - s16 unk0; - s16 unk2; - s16 unk4; - u8 pad6[6]; - f32 x_position; - f32 y_position; - f32 z_position; - f32 pad18; - f32 unk1C; - f32 pad20; - f32 unk24; - f32 unk28; - f32 unk2C; - f32 unk30; - s16 unk34; - s16 pad36; - s16 unk38; - s8 pad3A; - s8 unk3B; - u8 pad3C[8]; -} unk80120AC0; - -extern unk80120AC0 D_80120AC0[4]; // Unknown number of entries. -extern unk80120AC0 D_80120AFB[4]; // Unknown number of entries. -extern unk80120AC0 D_80120BD0[4]; // Unknown number of entries. -extern s32 D_80120CE0; -extern s32 D_80120CE4; -extern s32 D_80120CE8; -extern s32 D_80120D08; -extern s32 D_80120D0C; -extern f32 D_80120D10; -extern s8 D_80120D14; -extern u8 D_80120D15; -extern s32 D_80120D18; -extern s32 D_80120D1C; -extern s32 D_80120D6C; -extern s32 D_80120D70[6]; -extern s32 D_80120D88[6]; // Unknown number of entries. -extern s32 D_80120EE0; -extern s32 D_80120F20; -extern s32 D_80120F60; -extern s32 D_80120FE0; -extern s32 D_80120FA0; -extern s32 D_80121060; -extern s32 D_801210A0; -extern s32 D_801210E0; - -/* Size: 5 bytes */ -typedef struct unk80121110 { - u16 unk0; - s8 unk2; - s8 unk3; - s8 unk4; -} unk80121110; -extern unk80121110 D_80121110[2]; // Unknown number of entries -extern u16 D_80121140[2]; // Unknown number of entries. -extern u16 D_80121148[2]; // Unknown number of entries. -extern u8 D_80121150[8]; // Unknown number of entries. -extern s32 D_80121164; - -extern LevelHeader* D_80121168; - -extern s32 D_80121170; -extern s32 D_80121174; - -// Size: 6 bytes -typedef struct unk8012117C { - s8 unk0; - s8 unk1; - s8 unk2; - s8 pad3[3]; -} unk8012117C; -extern unk8012117C *D_8012117C[2]; // Unknown number of entries - -extern s32 D_801211C0; -extern s16 D_801211C8[8]; // Unknown number of entries -extern Gfx *D_801211F0[3]; // Unknown number of entries. -extern Gfx *D_801211F8; -extern s32 D_80121208; -extern s32 D_80121218; -extern s32 D_80121228; -extern s8 D_80121250[16]; // Unknown number of entries -extern s32 D_801234E8; -extern s32 D_801234EC; -extern s32 D_801234F0; -extern s32 D_801234F4; -extern s32 D_801234F8; -extern s32 D_801234FC; -extern s32 D_80123500; -extern s32 D_80123504; -extern s32 D_80123508; -extern Settings *gSettingsPtr; -extern s8 D_80123514; -extern s8 gIsPaused; -extern s8 D_80123516; -extern s32 D_80123518; -extern s32 D_8012351C; -extern s32 D_80123520; -extern u8 D_80123524; -extern u8 D_80123525; -extern u8 D_80123526; -extern s32* D_80123548; // This is actually an OSMesgQueue pointer. -extern s32 D_80123560; - -extern s32 D_A4000000; -extern s32 SP_IMEM; - -void func_800014BC(f32 arg0); -s8* func_8001E29C(s32 arg0); -s32 func_8006A624(s8 arg0); -void func_8006F64C(s32*, f32, f32, f32, f32*, f32*, f32*); -void guPerspectiveF(s32*, s32*, f32, f32, f32, f32, f32); -void func_8006F870(s32*, s32*); -s16 func_80029F18(f32, f32, f32); -void func_8006A50C(void); -void func_8006CB58(s32 arg0, s32 arg1, s32 arg2, s32 arg3); -void func_8006C164(void); -void func_8000E194(void); -f32 sqrtf(f32); -void osSetTime(u64); -unk80120AC0 *func_80069D20(void); -void func_800665E8(s32 arg0); -void func_8001D5E0(f32 arg0, f32 arg1, f32 arg2); -void func_800705F8(s32, f32, f32, f32); -void func_8006ECFC(s32 arg0); - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80065EA0.s") - -void func_80066060(s32 arg0, s32 arg1) { - if (arg0 >= 0 && arg0 < 4) { - D_800DD2F8[arg0] = arg1; - D_80120AC0[arg0].unk3B = arg1; - } -} - -void func_80066098(s8 arg0) { - s8 temp = (arg0 << 24) >> 24; - if (!osTvType) { - D_80120D15 = temp; - } -} -void func_800660C0(void) { - D_80120D18 = 1; -} -void func_800660D0(void) { - D_80120D18 = 0; -} -/* Unused? */ -f32 func_800660DC(void) { - return D_80120D10; -} - -void func_800660EC(f32 arg0) { - if (0.0f < arg0 && arg0 < 90.0f && arg0 != D_80120D10) { - D_80120D10 = arg0; - guPerspectiveF(&D_80120EE0, &D_80120D6C, arg0, 1.33333333f, 10.0f, D_800E70A0.floatLiteral, 1.0f); - func_8006F870(&D_80120EE0, &D_80120FE0); - } -} - -void func_80066194(void) { - guPerspectiveF(&D_80120EE0, &D_80120D6C, 60.0f, 1.33333333f, 10.0f, D_800E70A4.floatLiteral, 1.0f); - func_8006F870(&D_80120EE0, &D_80120FE0); -} - -/* Unused? */ -s32* func_80066204(void) { - return &D_801210A0; -} - -s32 func_80066210(void) { - return D_80120CE0; -} - -s32 func_80066220(void) { - return D_80120CE4; -} - -void func_80066230(s32 arg0, s32 arg1) { - unk80120AC0 *someStruct; - s16 sp2A; - s16 sp28; - s16 sp26; - s16 sp24; - f32 sp20; - f32 sp1C; - f32 sp18; - - func_8006652C(0); - func_800665E8(0); - someStruct = func_80069D20(); - sp2A = someStruct->unk0; - sp28 = someStruct->unk2; - sp26 = someStruct->unk4; - sp20 = someStruct->x_position; - sp1C = someStruct->y_position; - sp18 = someStruct->z_position; - sp24 = someStruct->unk38; - someStruct->unk4 = 0; - someStruct->unk2 = 0; - someStruct->unk0 = -0x8000; - someStruct->unk38 = 0; - someStruct->x_position = 0.0f; - someStruct->y_position = 0.0f; - someStruct->z_position = 0.0f; - func_8001D5E0(0.0f, 0.0f, -1.0f); - func_80066CDC(arg0, arg1); - someStruct->unk38 = sp24; - someStruct->unk0 = sp2A; - someStruct->unk2 = sp28; - someStruct->unk4 = sp26; - someStruct->x_position = sp20; - someStruct->y_position = sp1C; - someStruct->z_position = sp18; -} - -f32 func_80066348(f32 arg0, f32 arg1, f32 arg2) { - s32 phi_v1; - f32 temp_f2, temp_f0, temp_f14; - - phi_v1 = D_80120CE4; - - if (D_80120D14 != 0) { - phi_v1 += 4; - } - - temp_f0 = arg2 - D_80120AC0[phi_v1].z_position; - temp_f2 = arg0 - D_80120AC0[phi_v1].x_position; - temp_f14 = arg1 - D_80120AC0[phi_v1].y_position; - return sqrtf((temp_f0 * temp_f0) + ((temp_f2 * temp_f2) + (temp_f14 * temp_f14))); -} - -void func_800663DC(s32 x_pos, s32 y_pos, s32 z_pos, s32 arg3, s32 arg4, s32 arg5) { - D_80120AC0[D_80120CE4].unk4 = (s16) (arg3 * 0xB6); - D_80120AC0[D_80120CE4].x_position = (f32) x_pos; - D_80120AC0[D_80120CE4].y_position = (f32) y_pos; - D_80120AC0[D_80120CE4].z_position = (f32) z_pos; - D_80120AC0[D_80120CE4].unk2 = (s16) (arg4 * 0xB6); - D_80120AC0[D_80120CE4].unk38 = (u16)0; - D_80120AC0[D_80120CE4].unk24 = 0.0f; - D_80120AC0[D_80120CE4].unk28 = 0.0f; - D_80120AC0[D_80120CE4].unk2C = 0.0f; - D_80120AC0[D_80120CE4].unk30 = 0.0f; - D_80120AC0[D_80120CE4].unk1C = 160.0f; - D_80120AC0[D_80120CE4].unk0 = (s16) (arg5 * 0xB6); - D_80120AC0[D_80120CE4].unk3B = D_800DD2F8[D_80120CE4]; -} - -void func_80066488(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s16 arg5, s16 arg6) { - arg0 += 4; - D_80120AC0[arg0].unk38 = 0; - D_80120AC0[arg0].x_position = arg1; - D_80120AC0[arg0].y_position = arg2; - D_80120AC0[arg0].z_position = arg3; - D_80120AC0[arg0].unk0 = arg4; - D_80120AC0[arg0].unk2 = arg5; - D_80120AC0[arg0].unk4 = arg6; - D_80120AC0[arg0].unk34 = func_80029F18(arg1, arg2, arg3); - D_80120D14 = 1; -} - -s8 func_80066510(void) { - return D_80120D14; -} - -void func_80066520(void) { - D_80120D14 = 0; -} - -s32 func_8006652C(s32 arg0) { - if ((arg0 >= 0) && (arg0 < 4)) { - D_80120CE0 = arg0; - } else { - D_80120CE0 = 0; - } - switch(D_80120CE0) { - case 0: - D_80120CE8 = 1; - break; - case 1: - D_80120CE8 = 2; - break; - case 2: - D_80120CE8 = 3; - break; - case 3: - D_80120CE8 = 4; - break; - } - if (D_80120CE4 >= D_80120CE8) { - D_80120CE4 = 0; - } - return D_80120CE8; -} - -void func_800665E8(s32 arg0) { - if (arg0 >= 0 && arg0 < 4) { - D_80120CE4 = arg0; - } else { - D_80120CE4 = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80066610.s") - -void func_80066818(s32 arg0, s32 arg1) { - if (arg1 != 0) { - D_800DD064[arg0].unk30 |= 1; - } else { - D_800DD064[arg0].unk30 |= 2; - } - D_800DD064[arg0].unk30 &= -5; -} - -void func_80066894(s32 arg0, s32 arg1) { - if (arg1 != 0) { - D_800DD064[arg0].unk30 &= -2; - } else { - D_800DD064[arg0].unk30 |= 4; - } - D_800DD064[arg0].unk30 &= -3; -} - -s32 func_80066910(s32 arg0) { - return D_800DD064[arg0].unk30 & 0x1; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80066940.s") - -void func_80066AA8(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - if (arg1 != 0x8000) { - D_800DD064[arg0].unk10 = arg1; - D_800DD064[arg0].unk30 |= 8; - } else { - D_800DD064[arg0].unk30 &= 0xFFFFFFF7; - } - if (arg2 != 0x8000) { - D_800DD064[arg0].unk10 = arg2; - D_800DD064[arg0].unk30 |= 0x10; - } else { - D_800DD064[arg0].unk30 &= 0xFFFFFFEF; - } - if (arg3 != 0x8000) { - D_800DD064[arg0].unk18 = arg3; - D_800DD064[arg0].unk30 |= 0x20; - } else { - D_800DD064[arg0].unk30 &= 0xFFFFFFDF; - } - if (arg4 != 0x8000) { - D_800DD064[arg0].unk1C = arg4; - D_800DD064[arg0].unk30 |= 0x40; - return; - } - D_800DD064[arg0].unk30 &= 0xFFFFFFBF; -} - -s32 func_80066BA8(s32 arg0, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4) { - *arg1 = D_800DD064[arg0].unk20; - *arg3 = D_800DD064[arg0].unk28; - *arg2 = D_800DD064[arg0].unk24; - *arg4 = D_800DD064[arg0].unk2C; - if ((*arg1 | *arg3 | *arg2 | *arg4) == 0) { - return 0; - } - return 1; -} - -void func_80066C2C(s32 arg0, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4) { - *arg1 = D_800DD064[arg0].unk0; - *arg2 = D_800DD064[arg0].unk4; - *arg3 = D_800DD064[arg0].unk8; - *arg4 = D_800DD064[arg0].unkC; -} - -// Unused? -void func_80066C80(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3) { - u32 temp_v0 = func_8007A520(); - *arg0 = 0; - *arg1 = 0; - *arg2 = temp_v0 & 0xFFFF; - *arg3 = (u32) (temp_v0 >> 0x10); -} - - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80066CDC.s") -#else -// Work in progress! - -void func_80066CDC(Gfx **dlist, s32 *arg1) { - u32 sp58; - u32 sp54; - u32 sp50; - u32 sp4C; - s32 sp34; - s32 sp2C; - u32 temp_a0; - u32 temp_a0_3; - u32 temp_a0_4; - u32 temp_a2; - u32 temp_a3; - u32 temp_a3_2; - u32 temp_t0; - u32 temp_t1_2; - u32 temp_v0; - u32 temp_v0_3; - u32 temp_v0_4; - u32 temp_v1_10; - u32 temp_v1_3; - u32 temp_v1_4; - s32 phi_t1; - s32 phi_v1; - f32 phi_f6; - f32 phi_f18; - f32 phi_f16; - f32 phi_f8; - f32 phi_f6_2; - f32 phi_f18_2; - f32 phi_f8_2; - f32 phi_f16_2; - u32 phi_a1; - f32 phi_f8_3; - f32 phi_f16_3; - f32 phi_f16_4; - u32 phi_t3; - u32 phi_a3_2; - u32 phi_t5; - u32 phi_t4; - - sp34 = D_80120CE4; - phi_t1 = D_80120CE4; - if (func_8000E184() && D_80120CE0 == 0) { - D_80120CE4 = 1; - phi_t1 = 0; - } - temp_v0 = func_8007A520(); - temp_t0 = temp_v0 >> 0x10; - temp_a3 = temp_t0 >> 1; - - if (D_800DD064[phi_t1].unk30 & 1) { - sp2C = D_80120CE4; - D_80120CE4 = phi_t1; - fast3d_cmd( - (*dlist)++, - ((((s32)(D_800DD064[D_80120CE4].unk24 * 4.0f)) & 0xFFF) | 0xED000000) | (((s32)(D_800DD064[D_80120CE4].unk20 * 4.0f)) & 0xFFF) << 0xC, - (((s32)(D_800DD064[D_80120CE4].unk2C * 4.0f)) & 0xFFF) | (((s32)(D_800DD064[D_80120CE4].unk28 * 4.0f)) & 0xFFF) << 0xC - ) - func_80068158(dlist, 0, 0, 0, 0); - D_80120CE4 = sp2C; - if (arg1 != 0) { - func_80067D3C(dlist, arg1); - } - D_80120CE4 = sp34; - return; - } - temp_t1_2 = temp_v0 & 0xFFFF; - phi_v1 = D_80120CE0; - if (D_80120CE0 == 2) { - phi_v1 = 3; - } - temp_a2 = temp_t1_2 >> 1; - sp54 = temp_a2; - sp58 = temp_a3; - if (osTvType == 0) { - sp58 = 0x91; - } - - switch(phi_v1) { - case 0: - phi_t3 = sp58; - if (osTvType == 0) { - phi_t3 = sp58 - 0x12; - } - phi_f16_4 = temp_t0; - if (temp_t0 < 0) { - phi_f16_4 = temp_t0 + 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - 0xED000000, - ((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16_4 * 4.0f)) & 0xFFF) - ) - sp4C = temp_a2; - phi_a3_2 = temp_a2; - break; - case 1: - if (D_80120CE4 == 0) { - temp_v0_4 = temp_t0 >> 2; - phi_t3 = temp_v0_4; - if (osTvType == 0) { - phi_t3 = temp_v0_4 - 0xC; - } - phi_f8_3 = temp_a3 - (temp_t0 >> 7); - if (phi_f8_3 < 0) { - phi_f8_3 += 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - 0xED000000, - ((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8_3 * 4.0f)) & 0xFFF) - ) - } else { - temp_v1_10 = temp_t0 >> 7; - phi_f16_3 = temp_t0 - temp_v1_10; - if (phi_f16_3 < 0) { - phi_f16_3 += 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - (((s32)((temp_a3 + temp_v1_10) * 4.0f)) & 0xFFF) | 0xED000000, - ((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16_3 * 4.0f)) & 0xFFF) - ) - phi_t3 = temp_a3 + (temp_t0 >> 2); - } - sp4C = temp_a2; - phi_a3_2 = temp_a2; - break; - case 2: - if (D_80120CE4 == 0) { - phi_f8_2 = temp_t0; - if (temp_t0 < 0) { - phi_f8_2 = temp_t0 + 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - 0xED000000, - ((((s32)((temp_a2 - (temp_t1_2 >> 8)) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8_2 * 4.0f)) & 0xFFF) - ) - phi_a1 = temp_t1_2 >> 2; - } else { - temp_a0_4 = temp_t1_2 >> 8; - phi_f16_2 = temp_t0; - if (temp_t0 < 0) { - phi_f16_2 = temp_t0 + 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - (((s32)((temp_a2 + temp_a0_4) * 4.0f) & 0xFFF) << 0xC) | 0xED000000, - (((s32)((temp_t1_2 - temp_a0_4) * 4.0f) & 0xFFF) << 0xC) | (((s32)(phi_f16_2 * 4.0f)) & 0xFFF) - ) - phi_a1 = temp_a2 + (temp_t1_2 >> 2); - } - sp4C = phi_a1; - phi_t3 = sp58; - phi_a3_2 = phi_a1; - break; - case 3: - switch(D_80120CE4) { - case 0: - phi_f6_2 = temp_a2 - (temp_t1_2 >> 8); - if (phi_f6_2 < 0) { - phi_f6_2 += 4294967296.0f; - } - phi_f18_2 = temp_a3 - (temp_t0 >> 7); - if (phi_f18_2 < 0) { - phi_f18_2 += 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - ((((s32)(0U * 4.0f) & 0xFFF) << 0xC) | 0xED000000) | (((s32)(0U * 4.0f)) & 0xFFF), - (((s32)(phi_f6_2 * 4.0f) & 0xFFF) << 0xC) | (((s32)(phi_f18_2 * 4.0f)) & 0xFFF) - ) - phi_t5 = 0U; - phi_t4 = 0U; - break; - case 1: - temp_a0_3 = temp_t1_2 >> 8; - phi_f8 = temp_a3 - (temp_t0 >> 7); - if (phi_f8 < 0) { - phi_f8 += 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - ((((s32)((temp_a2 + temp_a0_3) * 4.0f)) & 0xFFF) << 0xC) | 0xED000000, - ((((s32)(((temp_a2 * 2) - temp_a0_3) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8 * 4.0f)) & 0xFFF) - ) - phi_t5 = 0U; - phi_t4 = temp_a2; - break; - case 2: - temp_v1_4 = temp_t0 >> 7; - phi_f16 = (temp_a3 * 2) - temp_v1_4; - if (phi_f16 < 0) { - phi_f16 += 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - (((s32)((temp_a3 + temp_v1_4) * 4.0f)) & 0xFFF) | 0xED000000, - ((((s32)((temp_a2 - (temp_t1_2 >> 8)) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16 * 4.0f)) & 0xFFF) - ) - phi_t5 = temp_a3; - phi_t4 = 0U; - break; - case 3: - temp_a0 = temp_t1_2 >> 8; - temp_v1_3 = temp_t0 >> 7; - phi_f6 = (temp_a2 * 2) - temp_a0; - if (phi_f6 < 0) { - phi_f6 += 4294967296.0f; - } - phi_f18 = (temp_a3 * 2) - temp_v1_3; - if (phi_f18 < 0) { - phi_f18 += 4294967296.0f; - } - fast3d_cmd( - (*dlist)++, - (((((s32)((temp_a2 + temp_a0) * 4.0f)) & 0xFFF) << 0xC) | 0xED000000) | (((s32)((temp_a3 + temp_v1_3) * 4.0f)) & 0xFFF), - ((((s32)(phi_f6 * 4.0f) & 0xFFF)) << 0xC) | (((s32)(phi_f18 * 4.0f)) & 0xFFF) - ) - phi_t5 = temp_a3; - phi_t4 = temp_a2; - break; - default: - phi_t5 = 0; - phi_t4 = 0; - break; - } - temp_v0_3 = phi_t5 + sp58; - temp_a3_2 = phi_t4 + sp54; - phi_t3 = temp_v0_3; - phi_a3_2 = temp_a3_2; - if (osTvType == 0) { - phi_t3 = temp_v0_3 - 6; - phi_a3_2 = temp_a3_2; - if (D_80120CE4 < 2) { - phi_t3 = temp_v0_3 - 0x14; - phi_a3_2 = temp_a3_2; - } - } - break; - default: - phi_t3 = sp50; - phi_a3_2 = sp4C; - break; - } - - if (osTvType == 0) { - phi_a3_2 -= 4; - } - func_80068158(dlist, sp54, sp58, phi_a3_2, phi_t3); - if (arg1 != 0) { - func_80067D3C(dlist, arg1); - } - D_80120CE4 = sp34; -} -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80067A3C.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80067D3C.s") - -void func_80067F20(f32 arg0) { - D_800DD2CC[0] = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80067F2C.s") - -void func_8006807C(Gfx **dlist, s32 *arg1) { - func_8006FE74(&D_80121060, &D_800DD288); - func_8006F768(&D_80121060, &D_80120EE0, &D_80120F20); - func_8006FE74(D_80120D70[0], &D_800DD2A0); - func_8006F768(D_80120D70[0], &D_80120F20, &D_80121060); - func_8006F870(&D_80121060, (s32*)*arg1); // This doesn't look right. Need to check this! - fast3d_cmd((*dlist)++, 0x1000040, (u32)(*arg1 + 0x80000000)) - *arg1 += 0x40; - D_80120D1C = 0; - D_80120D08 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068158.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_800682AC.s") - -void func_80068408(Gfx **dlist, s32 *arg1) { - func_800705F8(D_80120D70[D_80120D1C], 0.0f, 0.0f, 0.0f); - func_8006F768(D_80120D70[D_80120D1C], &D_80120F20, &D_80121060); - func_8006F870(&D_80121060, (s32*)*arg1); // This doesn't look right. Need to check this! - D_80120D88[D_80120D1C] = *arg1; - - fast3d_cmd((*dlist)++, ((((D_80120D08 << 6) & 0xFF) << 0x10) | 0x1000000) | 0x40, (u32)(*arg1 + 0x80000000)) - - *arg1 += 0x40; -} - -void func_80068508(s32 arg0) { - D_80120D0C = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068514.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068BF4.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068FA8.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069484.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069790.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069A40.s") - -unk80120AC0 *func_80069CFC(void) { - return &D_80120AC0[D_80120CE4]; -} - -unk80120AC0 *func_80069D20(void) { - if (D_80120D14 != 0) { - return &D_80120AC0[D_80120CE4 + 4]; - } - return &D_80120AC0[D_80120CE4]; -} - -unk80120AC0 *func_80069D7C(void) { - if (D_80120D14 != 0) { - return D_80120BD0; - } - return D_80120AC0; -} - -s32* func_80069DA4(void) { - return &D_80120FA0; -} - -s32* func_80069DB0(void) { - return &D_80120FE0; -} - -s32* func_80069DBC(void) { - return &D_80120F60; -} - -f32 func_80069DC8(f32 arg0, f32 arg1, f32 arg2) { - f32 sp34; - f32 sp30; - f32 returnVal; - func_8006F64C(&D_80120F60, arg0, arg1, arg2, &sp34, &sp30, &returnVal); - return returnVal; -} - -void func_80069E14(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - f32 temp_f0; - f32 temp_f0_2; - f32 temp_f14; - f32 temp_f2; - s32 i; - - for (i = 0; i <= D_80120CE0; i++) { - temp_f0 = arg0 - D_80120AC0[i].x_position; - temp_f2 = arg1 - D_80120AC0[i].y_position; - temp_f14 = arg2 - D_80120AC0[i].z_position; - temp_f0_2 = sqrtf(((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f14 * temp_f14)); - if (temp_f0_2 < arg3) { - D_80120AC0[i].unk30 = ((arg3 - temp_f0_2) * arg4) / arg3; - } - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069F28.s") - -s32* func_8006A100(void) { - return &D_801210E0; -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A10C.s") -#else - -extern s32 D_800DD300; -extern s32 D_801210F8; -extern s32 D_801210FC; -extern s8 D_80121100; -extern u8 D_80121103; - -// Has regalloc & stack issues. -s32 func_8006A10C(void) { - u8 sp23; - osCreateMesgQueue(&D_801210E0, &D_801210F8, 1); - osSetEventMesg(5, &D_801210E0, D_801210FC); - func_800CCC20(&D_801210E0, &sp23, &D_80121100); - func_800CCFE0(&D_801210E0); - func_8006A434(); - D_800DD300 = 0; - if ((sp23 & 1) && !(D_80121103 & 8)) { - return 0; - } - D_800DD300 = 1; - return -1; -} -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A1C4.s") -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A434.s") - -void func_8006A458(s8 *activePlayers) { - s32 i; - s32 temp = 0; - for(i = 0; i < 4; i++) { - if (activePlayers[i]) { - D_80121150[temp++] = i; - } - } - for(i = 0; i < 4; i++) { - if (!activePlayers[i]) { - D_80121150[temp++] = i; - } - } -} - -u8 func_8006A4F8(s32 arg0) { - return D_80121150[arg0]; -} - -void func_8006A50C(void) { - u8 temp = D_80121150[0]; - D_80121150[0] = D_80121150[1]; - D_80121150[1] = temp; -} - -u16 func_8006A528(s32 arg0) { - return D_80121110[D_80121150[arg0]].unk0; -} - -u16 func_8006A554(s32 arg0) { - return D_80121140[D_80121150[arg0]]; -} - -u16 func_8006A578(s32 arg0) { - return D_80121148[D_80121150[arg0]]; -} - -s32 func_8006A59C(s32 arg0) { - func_8006A624(D_80121110[D_80121150[arg0]].unk2); -} - -s32 func_8006A5E0(s32 arg0) { - func_8006A624(D_80121110[D_80121150[arg0]].unk3); -} - -s32 func_8006A624(s8 arg0) { - if (arg0 < 8 && arg0 >= -7) { - return 0; - } - if (arg0 > 0) { - arg0 -= 8; - if (arg0 >= 0x47) { - arg0 = 0x46; - } - } else { - arg0 += 8; - if (arg0 < -0x46) { - arg0 = -0x46; - } - } - return arg0; -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A6A0.s") -#else -void func_8006A6A0(void) { - D_800DD304 = 0; -} -#endif - -/*!!! FILE BOUNDARY !!!*/ - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A6B0.s") - -s32 func_8006B0AC(s32 arg0) { - if (arg0 > 0 && arg0 < D_80121170) { - return (*D_8012117C)[arg0].unk2 & 0xF; - } - return 0; -} - -s32 func_8006B0F8(s32 arg0) { - if (arg0 > 0 && arg0 < D_80121170) { - s32 temp = (*D_8012117C)[arg0].unk2; - if(temp != 0) { - return (temp >> 4) & 0xF; - } - } - return 1; -} - -s8 func_8006B14C(s32 arg0) { - if (arg0 >= 0 && arg0 < D_80121170) { - return (*D_8012117C)[arg0].unk1; - } - return -1; -} - -s8 func_8006B190(s32 arg0) { - if (arg0 >= 0 && arg0 < D_80121170) { - return (*D_8012117C)[arg0].unk0; - } - return 0; -} - -s32 func_8006B1D4(s32 arg0) { - s8* temp; - - if (arg0 < 0 || arg0 >= D_80121174) { - arg0 = 0; - } - temp = func_8001E29C(0x1B); - - return temp[arg0]; -} - -void func_8006B224(s32* arg0, s32* arg1) { - *arg0 = D_80121170; - *arg1 = D_80121174; -} - -s32 func_8006B240(void) { - return D_800DD31C; -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006B250.s") -#else - -extern s32 *D_80121160; -extern s32 D_800DD314; - -Settings *get_settings(void); -s32 *func_80076C58(s32); -LevelHeader *func_80070C9C(s32, s32); -void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3); -void func_8006C2E4(void); -s16 func_8006C2F0(void); -void func_8006DB20(s32 arg0); -void func_80072708(void); - -// load_level(levelID, numOfPlayers, entrance, vehicle, ???); -void func_8006B250(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - s32 sp48; - s32 sp44; - Settings *settings; - s32 temp_s0_2; - s32 temp_s0_5; - s32 temp_t8_3; - s32 temp_v0_5; - s8 *temp_v0_4; - s32 phi_v1; - s32 phi_v1_2; - s32 phi_v0_2; - s32 phi_s0; - s32 phi_v1_5; - s8 phi_s0_2; - s32 phi_at; - s32 phi_s0_3; - s32 phi_s0_5; - s32 phi_v1_9; - s32 temp, temp2; - - func_80072708(); - if (arg4 == -1) { - arg4 = 0; - } - if (arg1 == -1) { - sp48 = 1; - arg1 = 0; - } else { - sp48 = 0; - } - if (arg1 == 0) { - func_8000318C(0x8); - } else if (arg1 == 1) { - func_8000318C(0xC); - } else { - func_8000318C(0x10); - } - - settings = get_settings(); - D_80121160 = func_80076C58(0x16); - phi_v1 = 0; - while (-1 != D_80121160[phi_v1]) { - phi_v1++; - } - phi_v1--; - if (arg0 >= phi_v1) { - arg0 = 0; - } - temp2 = D_80121160[arg0]; - temp = D_80121160[arg0 + 1] - temp2; - D_80121168 = func_80070C9C(temp, 0xFFFF00FF); - func_80076E68(0x17, D_80121168, temp2, temp); - D_800DD330 = 0; - sp44 = arg0; - if (D_80121168->race_type == 0) { - func_8006C2E4(); - } - if (func_8006C2F0() == 0) { - if (D_800DD32C == 0) { - if (D_80121168->race_type == 8) { - phi_v1_2 = settings->courseFlagsPtr[temp2] & 1; - phi_v0_2 = 0; - if (D_80121168->world == 0 || D_80121168->world == 5) { - phi_v0_2 = 1; - } - if (phi_v1_2 == 0 || phi_v0_2 != 0) { - func_8006C1AC(arg0, arg2, arg3, arg4); - if ((settings->bosses & (1 << settings->worldId)) != 0) { - arg4 = 7; - } else { - arg4 = 3; - } - if (phi_v0_2 != 0) { - arg4 = 0; - if (phi_v1_2 != 0) { - D_800DD330 = (u8)2; - } - } - temp_v0_4 = func_8001E29C(0x43); - phi_s0 = 0; - while(arg0 != temp_v0_4[phi_s0 + 1]) { - phi_s0++; - } - arg0 = temp_v0_4[phi_s0 + 1]; - arg2 = arg4; - } - - } - if (D_80121168->race_type == 5) { - if (D_80121168->world > 0 && D_80121168->world < 5) { - if ((settings->keys & (1 << D_80121168->world)) != 0) { - temp_v0_5 = 0x4000 << (D_80121168->world + 0x1F); - if ((settings->cutsceneFlags & temp_v0_5) == 0) { - func_8006C1AC(arg0, arg2, arg3, arg4); - settings->cutsceneFlags |= temp_v0_5; - arg2 = 0; - arg4 = 5; - arg0 = func_8001E29C(0x44)[D_80121168->world - 1]; - } - } - } - } - if (D_80121168->race_type == 5 && D_80121168->world == 0 && (settings->cutsceneFlags & 0x2000) == 0 && settings->wizpigAmulet >= 4) { - s32 temp_a1 = arg2; - s32 temp_a3 = arg4; - arg4 = 0; - arg2 = 0; - func_8006C1AC(arg0, temp_a1, arg3, temp_a3); - settings->cutsceneFlags |= 0x2000; - arg0 = (s32) func_8001E29C(0x44)[1]; - } - } - } - D_800DD32C = 0; - if (sp44 != arg0) { - func_80071140(D_80121168); - temp2 = D_80121160[arg0]; - temp = D_80121160[arg0 + 1] - temp2; - D_80121168 = func_80070C9C(temp, 0xFFFF00FF); - func_80076E68(0x17, D_80121168, temp2, temp); - } - func_80071140(D_80121160); - func_8006BFC8(&D_80121168->unk20); - func_8000CBC0(); - D_80121164 = arg0; - for (phi_v1_5 = 0; phi_v1_5 < 7; phi_v1_5++) { - if ((s32)D_80121168->unk74[phi_v1_5] != -1) { - D_80121168->unk74[phi_v1_5] = func_8001E29C((s32)D_80121168->unk74[phi_v1_5]); - func_8007F1E8(D_80121168->unk74[phi_v1_5]); - } - } - if (arg4 == 0x64) { - if(get_trophy_race_world_id() != 0 && D_80121168->race_type == 0) { - arg4 = 0; - } else if(is_in_tracks_mode() == 1 && D_80121168->race_type == 0) { - arg4 = 0; - } - } - if (D_80121168->race_type == 0 || D_80121168->race_type == 8) { - D_800DD31C = 1; - } else { - D_800DD31C = 0; - } - if (sp48 != 0 && D_80121168->race_type != 7) { - D_80121168->race_type = 6; - } - func_80000BE0(D_80121168->unkB3); - func_80000CBC(); - func_80031BB8(0x20); - phi_s0_2 = (u8)0; - if (arg3 >= 0 && arg3 < 3) { - phi_s0_2 = D_80121168->unk4F[arg3]; - } - func_80017E74(phi_s0_2); - settings->courseId = arg0; - if (D_80121168->world != -1) { - settings->worldId = D_80121168->world; - } - if (settings->worldId == 0 && settings->worldId > 0) { - D_800DD314 = func_8006DB2C(); - } - if (settings->worldId == 0 && settings->worldId > 0 && D_800DD314 != -1) { - arg3 = D_800DD314; - } - func_8006DB20(arg3); - if (D_80121168->race_type == 5) { - if (settings->worldId > 0) { - temp_s0_5 = 8 << (settings->worldId + 31); - if (settings->worldId == 5) { - if (settings->balloonsPtr[0] >= 47) { - if (settings->ttAmulet >= 4) { - if ((settings->cutsceneFlags & temp_s0_5) == 0) { - settings->cutsceneFlags |= temp_s0_5; - arg4 = 5; - } - } - } - } else { - if (settings->balloonsPtr[settings->worldId] >= 4) { - if ((settings->cutsceneFlags & temp_s0_5) == 0) { - settings->cutsceneFlags |= temp_s0_5; - arg4 = 5; - } - } - temp_t8_3 = temp_s0_5 << 5; - if (settings->balloonsPtr[settings->worldId] >= 8) { - if ((settings->cutsceneFlags & temp_t8_3) == 0) { - settings->cutsceneFlags |= temp_t8_3; - arg4 = 5; - } - } - } - } - } - if (arg1 != 0 && D_80121168->race_type == 0) { - arg4 = 0x64; - } - if (D_80121168->race_type == 0 || ((D_80121168->race_type & 0x40) != 0 && is_in_two_player_adventure(D_80121168->race_type) != 0)) { - D_800DD318 = (u8)1; - arg4 = 0x64; - } else { - D_800DD318 = (u8)0; - } - if (D_80121168->race_type == 0 && sp48 == 0 && func_8000E4C8(arg4) != 0) { - arg4 = 0x64; - } - func_8001E450(arg4); - func_800249F0(D_80121168->geometry, D_80121168->skybox, arg1, arg3, arg2, D_80121168->collectables, D_80121168->unkBA); - if (D_80121168->unk3A == 0 && D_80121168->unk3C == 0 && D_80121168->fogR == 0 && D_80121168->fogG == 0 && D_80121168->fogB == 0) { - phi_s0_3 = 0; - while(phi_s0_3 < 4) { - func_800307BC(phi_s0_3); - phi_s0_3++; - } - } else { - phi_s0_3 = 0; - while(phi_s0_3 < 4) { - func_80030664(phi_s0_3, D_80121168->unk3A, D_80121168->unk3C, (u8)D_80121168->fogR, D_80121168->fogG, D_80121168->fogB); - phi_s0_3++; - } - } - settings = get_settings(); - if (D_80121168->world != -1) { - settings->worldId = D_80121168->world; - } - settings->courseId = arg0; - if (D_80121168->weather_enable > 0) { - func_800AB4A8( - D_80121168->unk92, - D_80121168->weather_enable, - D_80121168->unk96 << 8, - D_80121168->unk98 << 8, - D_80121168->unk9A << 8, - D_80121168->unk94 * 0x101, - D_80121168->unk95 * 0x101 - ); - func_800AB308(-1, -0x200); - } - if (D_80121168->unk49 == -1) { - D_80121168->unkA4 = func_8007AE74(D_80121168->unkA4); - D_80121168->unkA8 = (u16)0; - D_80121168->unkAA = (u16)0; - } - if ((s32)D_80121168->unkAC != -1) { - D_80121168->unkAC = func_8001E29C((s32)D_80121168->unkAC); - func_8007F414(D_80121168->unkAC); - } - func_800660EC((f32)D_80121168->unk9C); - func_80077B34(D_80121168->unk9D, D_80121168->unk9E, D_80121168->unk9F); - func_8007A974(); - func_8007AB24(D_80121168->unk4[arg1]); -} -#endif - -void func_8006BD10(f32 arg0) { - if (D_80121168->music != 0) { - func_800012E8(); - func_80000B34(D_80121168->music); - func_800014BC(arg0); - func_80001074(D_80121168->instruments); - } -} - -s32 func_8006BD88(void) { - return D_80121164; -} - -u8 func_8006BD98(void) { - return D_80121168->race_type; -} - -LevelHeader* func_8006BDB0(void) { - return D_80121168; -} - -/* Unused? */ -u8 func_8006BDC0(void) { - return D_80121170 - 1; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006BDDC.s") - -void func_8006BEFC(void) { - func_8006C164(); - func_80077B34(0, 0, 0); - func_80071140(D_80121168); - func_800049D8(); - func_80001844(); - func_800018E0(); - func_800012E8(); - func_80031B60(); - func_8002C7D4(); - func_80008174(); - func_80000968(0); - if (D_80121168->weather_enable > 0) { - func_800AB35C(); - } - if (D_80121168->unk49 == 0xFF) { - func_8007B2BC(D_80121168->unkA4); - } -} - -extern s32 *D_80121160; -Settings *get_settings(void); -s32 *func_80076C58(s32); - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006BFC8.s") -#else -void func_8006BFC8(s8 *arg0) { - s32 temp, temp2; - s16 phi_v1; - s8 phi_s0 = 0; - - if (!is_in_tracks_mode()) { - Settings *settings = get_settings(); - // Regalloc issue: temp3 should be a3, not v1. - s32 temp3 = settings->courseFlagsPtr[settings->courseId]; - if (temp3 & 2) { - phi_s0 = 1; - } - if (temp3 & 4) { - phi_s0 = 2; - } - } else { - phi_s0 = 3; - } - - if (get_trophy_race_world_id() != 0) { - phi_s0 = 4; - } - - if(is_in_adventure_two()){ - phi_s0 += 5; - } - - phi_s0 = arg0[phi_s0]; - - if ((func_8009C30C() << 6) < 0) { - phi_s0 = 9; - } - if (func_8006DA0C() == 1) { - phi_s0 = 5; - } - D_80121160 = func_80076C58(1); - phi_v1 = 0; - while (-1 != (s32)D_80121160[phi_v1]) { - phi_v1++; - } - phi_v1--; - if (phi_s0 >= phi_v1) { - phi_s0 = 0; - } - temp2 = D_80121160[phi_s0]; - temp = D_80121160[phi_s0 + 1] - temp2; - D_801211C0 = func_80070C9C(temp, 0xFFFF00FF, D_80121160); - func_80076E68(0, D_801211C0, temp2, temp); - func_80071140(D_80121160); -} -#endif - -void func_8006C164(void) { - func_80071140(D_801211C0); -} - -s32 func_8006C18C(void) { - return D_801211C0; -} - -s8 func_8006C19C(void) { - return D_800DD318; -} - -void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - D_801211C8[D_800DD328++] = arg0; - D_801211C8[D_800DD328++] = arg1; - D_801211C8[D_800DD328++] = arg2; - D_801211C8[D_800DD328++] = arg3; -} - -void func_8006C22C(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3) { - s16 temp_v1; - - D_800DD328--; - *arg3 = D_801211C8[D_800DD328]; - D_800DD328--; - temp_v1 = D_801211C8[D_800DD328]; - D_800DD328--; - *arg1 = D_801211C8[D_800DD328]; - D_800DD328--; - *arg0 = D_801211C8[D_800DD328]; - - if (temp_v1 != -1) { - *arg2 = temp_v1; - } - - D_800DD32C = 1; -} - - -void func_8006C2E4(void) { - D_800DD328 = 0; -} - -s16 func_8006C2F0(void) { - return D_800DD328; -} - -s32 func_8006C300(void) { - if (D_800DD330 >= 2) { - D_800DD330 = 1; - return 0; - } else { - return D_800DD330; - } -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/D_8006C330.s") -#else -void func_8006C330(s32 arg0) { - func_8006C3E0(); - D_800DD37C = func_8006A1C4(D_800DD37C, 0); - D_80123520 = 0; - D_801234EC = -1; - while(1) { - if (func_8006EAC0() != 0) { - func_80072708(); - audioStopThread(); - func_800C73BC(); - __osSpSetStatus(0xAAAA82); - func_800CD250(0x1D6); - while(1); // Infinite loop - } - func_8006C60C(); - func_80065E30(); - } - // This infinite loop creates too many nops! Needs to be 0x10 aligned, not 0x20 aligned. -} -#endif - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006C3E0.s") -#else -extern Gfx *D_801211F0; -extern u8 D_800DD374; -extern u8 D_800DD3A0; -extern u16 D_80121260; -extern u8 D_80123538; - -extern s32 D_80123544; -extern s32 D_801234E8; - -void osCreateScheduler(u16*, s32*, s32, u8, s32); -void osScAddClient(u16*, u8*, s32**, s32); - -void func_8006C3E0(void) { - s32 sp24; - - func_80070B30(); - func_800C6170(); - D_800DD374 = 1; - if (func_8006F4EC() != 0) { - D_800DD374 = 0; - } - D_80123514 = 0; - D_80123518 = 0; - - if (osTvType == 0) { - sp24 = 0xE; - } else if (osTvType == 1) { - sp24 = 0; - } else if (osTvType == 2) { - sp24 = 0x1C; - } - - osCreateScheduler(&D_80121260, &D_801234E8, 0xD, sp24, 1); - D_800DD3A0 = 0; - if (func_8006EFB8() == 0) { - D_800DD3A0 = 1; - } - func_8007A310(1, &D_80121260); - func_80076BA0(); - func_80078100(&D_80121260); - audio_init(&D_80121260); - func_80008040(); - D_800DD384 = func_8006A10C(); - func_8007AC70(); - func_8005F850(); - func_8000BF8C(); - func_800B5E88(); - func_800598D0(); - func_800AE530(); - func_800AB1F0(); - func_8006E3BC(); - func_8006EFDC(); - func_800C3C00(); - func_80075B18(); - func_80081218(); - func_800C7350(); - osCreateMesgQueue(&D_80123548, &D_80123544, 1); - osScAddClient(&D_80121260, &D_80123538, &D_80123548, 3); - D_80123560 = 0; - D_80123504 = 0; - D_80123508 = 0; - D_801234E8 = 0; - - // ??? - D_801211F8 = D_801211F0; - fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000) - fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000) - - osSetTime(0); -} -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006C60C.s") - -void func_8006CAE4(s32 arg0, s32 arg1, s32 arg2) { - D_80123500 = arg0 - 1; - if (arg1 == -1) { - D_801234F4 = func_8009C1B0(); - } else { - D_801234F4 = arg1; - } - func_8006CB58(D_801234F4, D_80123500, D_80123504, arg2); -} - -void func_8006CB58(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - func_8006ECFC(arg1); - func_800710B0(0); - func_80065EA0(); - func_800C3048(); - func_8006B250(arg0, arg1, arg2, arg3, D_80123508); - func_8009ECF0(func_80066210()); - func_800AE728(8, 0x10, 0x96, 0x64, 0x32, 0); - func_8001BF20(); - osSetTime(0); - func_800710B0(2); - func_80072298(1); -} - -void func_8006CC14(void) { - func_800710B0(0); - if (D_800DD38C == 0) { - if (D_800DD3F0 != 1) { - func_80077A54(); - } - D_800DD38C = 1; - } - func_8006BEFC(); - func_800C01D8(&D_800DD3F4); - func_800AE270(); - func_800A003C(); - func_800C30CC(); - D_801211F8 = D_801211F0[D_801234E8]; - fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000) - fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000) - func_800710B0(2); -} - -// Has a jump table -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006CCF0.s") - -void func_8006D8A4(void) { - D_800DD390 = 0x2C; - gIsPaused = 0; - func_800945E4(); - func_800C01D8(&D_800DD408); -} - -void func_8006D8E0(s32 arg0) { - D_80123516 = arg0 + 1; -} - -void func_8006D8F0(s32 arg0) { - s32 temp; - if (D_801234EC != 4) { - D_801234F4 = D_80121250[0]; - D_80123504 = 0; - D_80123508 = 0x64; - temp = D_80121250[1]; - if (D_80121250[15] >= 0) { - D_80123504 = D_80121250[15]; - } - if (D_80121250[temp + 8] >= 0) { - D_80123508 = D_80121250[temp + 8]; - } - D_801234F8 = 1; - } -} - -void func_8006D968(s8 *arg0) { - s32 i; - if (D_801234EC != 4) { - D_80121250[0] = D_801234F4; - for(i = 0; i < 2; i++) { - D_80121250[i + 2] = arg0[i + 8]; - D_80121250[i + 4] = arg0[i + 10]; - D_80121250[i + 6] = arg0[i + 12]; - D_80121250[i + 8] = arg0[i + 14]; - D_80121250[i + 10] = arg0[i + 18]; - D_80121250[i + 12] = arg0[i + 20]; - } - D_80121250[14] = arg0[22]; - D_80121250[15] = arg0[23]; - D_801234FC = 1; - } -} - -s32 func_8006DA0C(void) { - return D_801234EC; -} - -/* Unused? */ -void func_8006DA1C(s32 arg0) { - D_801234EC = arg0; -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006DA28.s") -#else - -// For some reason this function is storing arg0 in s0. - -void func_8006DB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); -void func_800813C0(s32); -void func_80004A60(s32, s32); -void MenuInit(s32); - -void func_8006DA28(s32 arg0, s32 arg1, s32 arg2) { - func_8006ECFC(0); - D_801234EC = 1; - D_801234F0 = 1; - func_80004A60(0, 0x7FFF); - func_80004A60(1, 0x7FFF); - func_80004A60(2, 0x7FFF); - func_80065EA0(); - - if (D_80123514 == 0) { - D_80123514 = 0; // Someone at rare: "I know I just checked if this was zero, but I need to be sure!" - if (arg1 < 0) { - D_80123514 = 1; - } else { - func_8006DB3C(arg1, -1, 0, 2, arg2); - } - } - if (arg0 == 0 || arg0 == 1 || arg0 == 2) { - func_800813C0(arg0); - } - MenuInit(arg0); - D_80123504 = 0; -} -#endif - -void func_8006DB14(s32 arg0) { - D_80123518 = arg0; -} - -void func_8006DB20(s32 arg0) { - D_8012351C = arg0; -} - -s32 func_8006DB2C(void) { - return D_80123518; -} - -void func_8006DB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - func_800710B0(0); - func_80065EA0(); - func_800C3048(); - func_8006B250(arg0, arg1, arg2, arg3, arg4); - func_8009ECF0(func_80066210()); - func_800AE728(4, 4, 0x6E, 0x30, 0x20, 0); - func_8001BF20(); - osSetTime(0); - func_800710B0(2); -} - -void func_8006DBE4(void) { - if (D_80123514 == 0) { - D_80123514 = 1; - func_800710B0(0); - func_8006BEFC(); - func_800C01D8(&D_800DD3F4); - func_800AE270(); - func_800A003C(); - func_800C30CC(); - func_800710B0(2); - } - D_80123514 = 0; -} - -void func_8006DC58(s32 arg0) { - if (func_800C73E0() == 0) { - func_80010994(arg0); - particlePtrList_flush(); - func_8001BF20(); - D_80024D54(&D_801211F8, &D_80121208, &D_80121218, &D_80121228, arg0); - func_800C3440(arg0); - func_80078054(&D_801211F8); - func_80077050(&D_801211F8); - func_80077268(&D_801211F8); - } -} - -// Has a jump table -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006DCF8.s") - -void func_8006E2E8(s32 arg0, s32 arg1, s32 arg2) { - if (D_80123514 == 0) { - func_8006DBE4(); - if (func_800C73E0() == 0) { - D_801211F8 = D_801211F0[D_801234E8]; - fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000) - fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000) - } - } - if (arg0 != -1) { - func_8006DB3C(arg0, arg1, 0, 2, arg2); - D_80123514 = (u8)0; - return; - } - D_80123514 = (u8)1; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006E3BC.s") - -void func_8006E5BC(void) { - s32 i, j; - gSettingsPtr->playerCount = func_8009C3C8(); - for (i = 0; i < 8; i++) { - gSettingsPtr->racers[i].best_times = 0; - gSettingsPtr->racers[i].character = func_8009C228(i); - if (gSettingsPtr->playerCount >= 2) { - gSettingsPtr->racers[i].starting_position = i; - } else if (is_in_two_player_adventure()) { - gSettingsPtr->racers[i].starting_position = 5 - i; - } else { - gSettingsPtr->racers[i].starting_position = 7 - i; - } - gSettingsPtr->racers[i].unk7 = 0; - for(j = 0; j < 4; j++) { - gSettingsPtr->racers[i].placements[j] = 0; - } - gSettingsPtr->racers[i].course_time = 0; - for(j = 0; j < 3; j++) { - gSettingsPtr->racers[i].lap_times[j] = 0; - } - } - gSettingsPtr->timeTrialRacer = 0; - gSettingsPtr->unk115[0] = 0; - gSettingsPtr->unk115[1] = 0; - gSettingsPtr->display_times = 0; - gSettingsPtr->worldId = 0; - gSettingsPtr->courseId = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006E770.s") - -void func_8006E994(Settings* settings) { - s32 i; - s32 sp20; - s32 sp1C; - - func_8006B224(&sp1C, &sp20); - settings->newGame = 1; - - for (i = 0; i < sp20; i++) { - settings->balloonsPtr[i] = 0; - } - for(i = 0; i < sp1C; i++) { - settings->courseFlagsPtr[i] = 0; - } - - settings->keys = 0; - settings->unkA = 0; - settings->bosses = 0; - settings->trophies = 0; - settings->cutsceneFlags = 0; - settings->tajFlags = 0; - settings->ttAmulet = 0; - settings->wizpigAmulet = 0; -} - -// Unused? -void func_8006EA58(void) { - func_8006E770(gSettingsPtr, 3); - func_8006E994(gSettingsPtr); -} - -Settings* get_settings(void) { - return gSettingsPtr; -} - -s8 func_8006EAA0(void) { - return gIsPaused; -} - -s8 func_8006EAB0(void) { - return D_80123516; -} - -s32 func_8006EAC0(void) { - if (D_80123560 == 0) { - D_80123560 = (s32) ((osRecvMesg(&D_80123548, NULL, 0) + 1) != 0); - } - return D_80123560; -} - -s32 func_8006EB14(void) { - return D_801234F4; -} - -/* Unused? */ -void func_8006EB24(void) { - D_800DD37C |= 0x01; -} - -/* Unused? */ -void func_8006EB40(void) { - D_800DD37C |= 0x02; -} - -void func_8006EB5C(void) { - D_800DD37C |= 0x03; -} - -void func_8006EB78(s32 arg0) { - D_800DD37C &= -0x301; - D_800DD37C |= (0x04 | ((arg0 & 3) << 8)); -} - -void func_8006EBA8(void) { - D_800DD37C |= 0x08; -} - -void func_8006EBC4(void) { - D_800DD37C |= 0x10; -} - -void func_8006EBE0(void) { - D_800DD37C |= 0x20; -} - -void func_8006EBFC(void) { - D_800DD37C |= 0x30; -} - -void func_8006EC18(s32 arg0) { - D_800DD37C &= -0xC01; - D_800DD37C |= (0x40 | ((arg0 & 3) << 0xA)); -} - -void func_8006EC48(s32 arg0) { - if (D_801234EC == 0 && !is_in_tracks_mode()) { - D_800DD37C &= -0xC01; - D_800DD37C |= (0x40 | ((arg0 & 3) << 0xA)); - } -} - -void func_8006ECAC(s32 arg0) { - D_800DD37C = ((arg0 & 0x03) << 10) | 0x80; -} - -/* Unused? */ -void func_8006ECC4(void) { - D_800DD37C |= 0x100; -} - -void func_8006ECE0(void) { - D_800DD37C |= 0x200; -} - -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006ECFC.s") - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006EFB8.s") -#else -s32 func_8006EFB8(void) { - if (D_A4000000 != -1) { // regalloc issue with D_A4000000 - return 0; - } - return 1; -} -#endif - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006EFDC.s") -#else - -/* Size: 0x40 bytes, I think this might be a 4x4 matrix. */ -typedef struct unk80121200 { - u8 pad0[0x40]; -} unk80121200; - -/* Size: 10 bytes */ -typedef struct unk80121210 { - u8 pad0[10]; -} unk80121210; - -/* Size: 16 bytes */ -typedef struct unk80121220 { - u8 pad0[16]; -} unk80121220; - -extern s32 D_8012350C; - -extern s32 D_800DD3BC; -extern s32 D_800DD3CC; -extern s32 D_800DD3DC; -extern s32 D_800DD3EC; - -extern s32 D_80123528; -extern s32 D_8012352C; -extern s32 D_80123530; -extern s32 D_80123534; - -extern unk80121200 *D_80121200[3]; -extern unk80121210 *D_80121210[3]; -extern unk80121220 *D_80121220[3]; - -void *func_80070C9C(s32, s32); // Allocates memory? - -void func_8006EFDC(void) { - s32 size; - s8* current; - - D_8012350C = 3; - - size = (D_800DD3EC * sizeof(unk80121220)) + - (D_800DD3BC * sizeof(Gfx)) + - (D_800DD3DC * sizeof(unk80121200)) + - (D_800DD3CC * sizeof(unk80121210)); - - current = (s8*)func_80070C9C(size, 0xFF0000FF); - D_801211F0[0] = (Gfx*)current; - current += (D_800DD3BC * sizeof(Gfx)); - D_80121200[0] = (unk80121200*)current; - current += (D_800DD3DC * sizeof(unk80121200)); - D_80121210[0] = (unk80121210*)current; - current += (D_800DD3CC * sizeof(unk80121210)); - D_80121220[0] = (unk80121220*)current; - - current = (s8*)func_80070C9C(size, 0xFFFF00FF); - D_801211F0[1] = (Gfx*)current; - current += (D_800DD3BC * sizeof(Gfx)); - D_80121200[1] = (unk80121200*)current; - current += (D_800DD3DC * sizeof(unk80121200)); - D_80121210[1] = (unk80121210*)current; - current += (D_800DD3CC * sizeof(unk80121210)); - D_80121220[1] = (unk80121220*)current; - - D_80123528 = D_800DD3BC; - D_8012352C = D_800DD3DC; - D_80123530 = D_800DD3EC; - D_80123534 = D_800DD3CC; -} -#endif - -void func_8006F140(s32 arg0) { - if (D_800DD394 == 0) { - D_800DD394 = 0x28; - D_80123524 = 0; - D_80123526 = 0; - if (arg0 == 1) { - func_800C01D8(&D_800DD41C); - } - if (arg0 == 3) { - D_800DD394 = 0x11A; - func_800C01D8(&D_800DD424); - } - if (arg0 == 4) { - D_800DD394 = 0x168; - func_800C01D8(&D_800DD424); - } - if (arg0 == 0) { - D_800DD394 = 2; - } - } -} - -// Unused? -void func_8006F20C(void) { - if (D_800DD394 == 0) { - func_800C01D8(&D_800DD41C); - D_800DD394 = 0x28; - D_80123524 = 1; - } -} - -void func_8006F254(void) { - if (D_800DD394 == 0) { - func_800C01D8(&D_800DD41C); - D_800DD394 = 0x28; - D_80123524 = 2; - } -} - -void func_8006F29C(void) { - if (D_800DD394 == 0) { - if ((gSettingsPtr->trophies & 0xFF) == 0xFF && !(gSettingsPtr->cutsceneFlags & 1) && gSettingsPtr->bosses & 1) { - gSettingsPtr->cutsceneFlags |= 1; - func_800C01D8(&D_800DD41C); - D_800DD394 = 0x28; - D_80123525 = 0x2D; - D_80123524 = 3; - } - } -} - -void func_8006F338(s32 arg0) { - if (D_800DD394 == 0) { - D_80123525 = arg0; - func_800C01D8(&D_800DD41C); - D_800DD394 = 0x28; - D_80123524 = 4; - } -} - -void func_8006F388(u8 arg0) { - D_800DD398 = arg0; -} - -void func_8006F398(void) { - s32 i; - u8 temp; - u8 *first_racer_data; - u8 *second_racer_data; - - func_8006A50C(); - func_8000E194(); - - first_racer_data = (u8*)(gSettingsPtr->racers); - second_racer_data = (u8*)(gSettingsPtr->racers + 1); - - for(i = 0; i < sizeof(Racer); i++) { - temp = first_racer_data[i]; - first_racer_data[i] = second_racer_data[i]; - second_racer_data[i] = temp; - } -} - -void func_8006F42C(void) { - D_800DD3F0 = 2; -} - -void func_8006F43C(void) { - s32 phi_s1 = 0; - s32 phi_s0 = 0; - while(phi_s0 != 4) { - phi_s1 |= func_8006A528(phi_s0); - phi_s0++; - } - if (phi_s1 & 0x1000) { - D_800DFD94 = 1; - } - D_80123520++; - if (D_80123520 >= 8) { - func_8006DA28(0x1A, 0x27, 2); - } -} - -s32 func_8006F4C8(void) { - if (D_800DD384 == -1) { - return 1; - } else { - return 0; - } -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006F4EC.s") -#else -s32 func_8006F4EC(void) { - if (SP_IMEM != 0x17D7) { // Same regalloc issue as func_8006EFB8 - return 0; - } - return 1; -} -#endif +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80065EA0 */ + +#include "types.h" +#include "macros.h" +#include "structs.h" +#include "fast3d.h" + +extern u32 osTvType; + +/************ .rodata ************/ + +const char D_800E6F00[] = "Camera Error: Illegal mode!\n"; +const char D_800E6F20[] = "Camera Error: Illegal player no!\n"; +const char D_800E6F34[] = "cameraPushSprMtx: model stack overflow!!\n"; +const char D_800E6F70[] = "\nCam do 2D sprite called with NULL pointer!"; +const char D_800E6F9C[] = "CamDo2DSprite FrameNo Overflow !!!\n"; +const char D_800E6FC0[] = "cameraPushModelMtx: model stack overflow!!\n"; +const char D_800E6FEC[] = "camPushModelMtx: bsp stack overflow!!\n"; +const char D_800E7010[] = "camPopModelMtx: model stack negative overflow!!\n"; +const char D_800E7048[] = "camPopModelMtx: bsp stack negative overflow!!\n"; + +/*********************************/ + +/************ .data ************/ + +s32 D_800DD060 = 0; // Currently unknown, might be a different type. + +/* Size: 0x34 bytes. */ +typedef struct unk800DD064 { + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; + s32 unk18; + s32 unk1C; + s32 unk20; + s32 unk24; + s32 unk28; + s32 unk2C; + s32 unk30; +} unk800DD064; + +unk800DD064 D_800DD064[4] = { + { + 0x00, 0x00, 0x140, 0xF0, + 0xA0, 0x78, 0x140, 0xF0, + 0x00, 0x00, 0x13F, 0xEF, 0x00 + }, + { + 0x00, 0x00, 0x140, 0xF0, + 0xA0, 0x78, 0x140, 0xF0, + 0x00, 0x00, 0x13F, 0xEF, 0x00 + }, + { + 0x00, 0x00, 0x140, 0xF0, + 0xA0, 0x78, 0x140, 0xF0, + 0x00, 0x00, 0x13F, 0xEF, 0x00 + }, + { + 0x00, 0x00, 0x140, 0xF0, + 0xA0, 0x78, 0x140, 0xF0, + 0x00, 0x00, 0x13F, 0xEF, 0x00 + } +}; + +// Not sure about the typing here +s16 D_800DD134[10] = { + 0, 0, 0, 0, + 0, -1, -1, 0, + 0, 0 +}; + +// Not sure about the typing here +u16 D_800DD148[160] = { + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0, + 0, 0, 0x01FF, 0 +}; + +f32 D_800DD288[6] = { + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -281.0f +}; + +f32 D_800DD2A0[6] = { + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f +}; + +f32 D_800DD2B8[5] = { + 1.0f, 0.0f, 0.0f, 0.0f, 0.0f +}; + +f32 D_800DD2CC[11] = { + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 160.0f +}; + +u8 D_800DD2F8[8] = { + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +s32 D_800DD300 = 0; // Currently unknown, might be a different type. + +s16 D_800DD304 = -1; + +/*******************************/ + +/* Size: 0x44 bytes */ +typedef struct unk80120AC0 { + s16 unk0; + s16 unk2; + s16 unk4; + u8 pad6[6]; + f32 x_position; + f32 y_position; + f32 z_position; + f32 pad18; + f32 unk1C; + f32 pad20; + f32 unk24; + f32 unk28; + f32 unk2C; + f32 unk30; + s16 unk34; + s16 pad36; + s16 unk38; + s8 pad3A; + s8 unk3B; + u8 pad3C[8]; +} unk80120AC0; + +extern unk80120AC0 D_80120AC0[4]; // Unknown number of entries. +extern unk80120AC0 D_80120AFB[4]; // Unknown number of entries. +extern unk80120AC0 D_80120BD0[4]; // Unknown number of entries. +extern s32 D_80120CE0; +extern s32 D_80120CE4; +extern s32 D_80120CE8; +extern s32 D_80120D08; +extern s32 D_80120D0C; +extern f32 D_80120D10; +extern s8 D_80120D14; +extern u8 D_80120D15; +extern s32 D_80120D18; +extern s32 D_80120D1C; +extern s32 D_80120D6C; +extern s32 D_80120D70[6]; +extern s32 D_80120D88[6]; // Unknown number of entries. +extern s32 D_80120EE0; +extern s32 D_80120F20; +extern s32 D_80120F60; +extern s32 D_80120FE0; +extern s32 D_80120FA0; +extern s32 D_80121060; +extern s32 D_801210A0; +extern s32 D_801210E0; + +/* Size: 5 bytes */ +typedef struct unk80121110 { + u16 unk0; + s8 unk2; + s8 unk3; + s8 unk4; +} unk80121110; +extern unk80121110 D_80121110[2]; // Unknown number of entries +extern u16 D_80121140[2]; // Unknown number of entries. +extern u16 D_80121148[2]; // Unknown number of entries. +extern u8 D_80121150[8]; // Unknown number of entries. + +extern s32 D_A4000000; +extern s32 SP_IMEM; + +unk80120AC0 *func_80069D20(void); +void func_800014BC(f32 arg0); +s8* func_8001E29C(s32 arg0); +s32 func_8006A624(s8 arg0); +void func_8006F64C(s32*, f32, f32, f32, f32*, f32*, f32*); +void guPerspectiveF(s32*, s32*, f32, f32, f32, f32, f32); +void func_8006F870(s32*, s32*); +s16 func_80029F18(f32, f32, f32); +void func_8006A50C(void); +void func_800665E8(s32 arg0); +void func_8006CB58(s32 arg0, s32 arg1, s32 arg2, s32 arg3); +void func_8006C164(void); +void func_8000E194(void); +f32 sqrtf(f32); +void osSetTime(u64); +void func_8001D5E0(f32 arg0, f32 arg1, f32 arg2); +void func_800705F8(s32, f32, f32, f32); +void func_8006ECFC(s32 arg0); + + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80065EA0.s") + +void func_80066060(s32 arg0, s32 arg1) { + if (arg0 >= 0 && arg0 < 4) { + D_800DD2F8[arg0] = arg1; + D_80120AC0[arg0].unk3B = arg1; + } +} + +void func_80066098(s8 arg0) { + s8 temp = (arg0 << 24) >> 24; + if (!osTvType) { + D_80120D15 = temp; + } +} +void func_800660C0(void) { + D_80120D18 = 1; +} +void func_800660D0(void) { + D_80120D18 = 0; +} +/* Unused? */ +f32 func_800660DC(void) { + return D_80120D10; +} + +void func_800660EC(f32 arg0) { + if (0.0f < arg0 && arg0 < 90.0f && arg0 != D_80120D10) { + D_80120D10 = arg0; + guPerspectiveF(&D_80120EE0, &D_80120D6C, arg0, 1.33333333f, 10.0f, 15000.0f, 1.0f); + func_8006F870(&D_80120EE0, &D_80120FE0); + } +} + +void func_80066194(void) { + guPerspectiveF(&D_80120EE0, &D_80120D6C, 60.0f, 1.33333333f, 10.0f, 15000.0f, 1.0f); + func_8006F870(&D_80120EE0, &D_80120FE0); +} + +/* Unused? */ +s32* func_80066204(void) { + return &D_801210A0; +} + +s32 func_80066210(void) { + return D_80120CE0; +} + +s32 func_80066220(void) { + return D_80120CE4; +} + +void func_80066230(s32 arg0, s32 arg1) { + unk80120AC0 *someStruct; + s16 sp2A; + s16 sp28; + s16 sp26; + s16 sp24; + f32 sp20; + f32 sp1C; + f32 sp18; + + func_8006652C(0); + func_800665E8(0); + someStruct = func_80069D20(); + sp2A = someStruct->unk0; + sp28 = someStruct->unk2; + sp26 = someStruct->unk4; + sp20 = someStruct->x_position; + sp1C = someStruct->y_position; + sp18 = someStruct->z_position; + sp24 = someStruct->unk38; + someStruct->unk4 = 0; + someStruct->unk2 = 0; + someStruct->unk0 = -0x8000; + someStruct->unk38 = 0; + someStruct->x_position = 0.0f; + someStruct->y_position = 0.0f; + someStruct->z_position = 0.0f; + func_8001D5E0(0.0f, 0.0f, -1.0f); + func_80066CDC(arg0, arg1); + someStruct->unk38 = sp24; + someStruct->unk0 = sp2A; + someStruct->unk2 = sp28; + someStruct->unk4 = sp26; + someStruct->x_position = sp20; + someStruct->y_position = sp1C; + someStruct->z_position = sp18; +} + +f32 func_80066348(f32 arg0, f32 arg1, f32 arg2) { + s32 phi_v1; + f32 temp_f2, temp_f0, temp_f14; + + phi_v1 = D_80120CE4; + + if (D_80120D14 != 0) { + phi_v1 += 4; + } + + temp_f0 = arg2 - D_80120AC0[phi_v1].z_position; + temp_f2 = arg0 - D_80120AC0[phi_v1].x_position; + temp_f14 = arg1 - D_80120AC0[phi_v1].y_position; + return sqrtf((temp_f0 * temp_f0) + ((temp_f2 * temp_f2) + (temp_f14 * temp_f14))); +} + +void func_800663DC(s32 x_pos, s32 y_pos, s32 z_pos, s32 arg3, s32 arg4, s32 arg5) { + D_80120AC0[D_80120CE4].unk4 = (s16) (arg3 * 0xB6); + D_80120AC0[D_80120CE4].x_position = (f32) x_pos; + D_80120AC0[D_80120CE4].y_position = (f32) y_pos; + D_80120AC0[D_80120CE4].z_position = (f32) z_pos; + D_80120AC0[D_80120CE4].unk2 = (s16) (arg4 * 0xB6); + D_80120AC0[D_80120CE4].unk38 = (u16)0; + D_80120AC0[D_80120CE4].unk24 = 0.0f; + D_80120AC0[D_80120CE4].unk28 = 0.0f; + D_80120AC0[D_80120CE4].unk2C = 0.0f; + D_80120AC0[D_80120CE4].unk30 = 0.0f; + D_80120AC0[D_80120CE4].unk1C = 160.0f; + D_80120AC0[D_80120CE4].unk0 = (s16) (arg5 * 0xB6); + D_80120AC0[D_80120CE4].unk3B = D_800DD2F8[D_80120CE4]; +} + +void func_80066488(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s16 arg5, s16 arg6) { + arg0 += 4; + D_80120AC0[arg0].unk38 = 0; + D_80120AC0[arg0].x_position = arg1; + D_80120AC0[arg0].y_position = arg2; + D_80120AC0[arg0].z_position = arg3; + D_80120AC0[arg0].unk0 = arg4; + D_80120AC0[arg0].unk2 = arg5; + D_80120AC0[arg0].unk4 = arg6; + D_80120AC0[arg0].unk34 = func_80029F18(arg1, arg2, arg3); + D_80120D14 = 1; +} + +s8 func_80066510(void) { + return D_80120D14; +} + +void func_80066520(void) { + D_80120D14 = 0; +} + +s32 func_8006652C(s32 arg0) { + if ((arg0 >= 0) && (arg0 < 4)) { + D_80120CE0 = arg0; + } else { + D_80120CE0 = 0; + } + switch(D_80120CE0) { + case 0: + D_80120CE8 = 1; + break; + case 1: + D_80120CE8 = 2; + break; + case 2: + D_80120CE8 = 3; + break; + case 3: + D_80120CE8 = 4; + break; + } + if (D_80120CE4 >= D_80120CE8) { + D_80120CE4 = 0; + } + return D_80120CE8; +} + +void func_800665E8(s32 arg0) { + if (arg0 >= 0 && arg0 < 4) { + D_80120CE4 = arg0; + } else { + D_80120CE4 = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80066610.s") + +void func_80066818(s32 arg0, s32 arg1) { + if (arg1 != 0) { + D_800DD064[arg0].unk30 |= 1; + } else { + D_800DD064[arg0].unk30 |= 2; + } + D_800DD064[arg0].unk30 &= -5; +} + +void func_80066894(s32 arg0, s32 arg1) { + if (arg1 != 0) { + D_800DD064[arg0].unk30 &= -2; + } else { + D_800DD064[arg0].unk30 |= 4; + } + D_800DD064[arg0].unk30 &= -3; +} + +s32 func_80066910(s32 arg0) { + return D_800DD064[arg0].unk30 & 0x1; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80066940.s") + +void func_80066AA8(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + if (arg1 != 0x8000) { + D_800DD064[arg0].unk10 = arg1; + D_800DD064[arg0].unk30 |= 8; + } else { + D_800DD064[arg0].unk30 &= 0xFFFFFFF7; + } + if (arg2 != 0x8000) { + D_800DD064[arg0].unk10 = arg2; + D_800DD064[arg0].unk30 |= 0x10; + } else { + D_800DD064[arg0].unk30 &= 0xFFFFFFEF; + } + if (arg3 != 0x8000) { + D_800DD064[arg0].unk18 = arg3; + D_800DD064[arg0].unk30 |= 0x20; + } else { + D_800DD064[arg0].unk30 &= 0xFFFFFFDF; + } + if (arg4 != 0x8000) { + D_800DD064[arg0].unk1C = arg4; + D_800DD064[arg0].unk30 |= 0x40; + return; + } + D_800DD064[arg0].unk30 &= 0xFFFFFFBF; +} + +s32 func_80066BA8(s32 arg0, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4) { + *arg1 = D_800DD064[arg0].unk20; + *arg3 = D_800DD064[arg0].unk28; + *arg2 = D_800DD064[arg0].unk24; + *arg4 = D_800DD064[arg0].unk2C; + if ((*arg1 | *arg3 | *arg2 | *arg4) == 0) { + return 0; + } + return 1; +} + +void func_80066C2C(s32 arg0, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4) { + *arg1 = D_800DD064[arg0].unk0; + *arg2 = D_800DD064[arg0].unk4; + *arg3 = D_800DD064[arg0].unk8; + *arg4 = D_800DD064[arg0].unkC; +} + +// Unused? +void func_80066C80(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3) { + u32 temp_v0 = func_8007A520(); + *arg0 = 0; + *arg1 = 0; + *arg2 = temp_v0 & 0xFFFF; + *arg3 = (u32) (temp_v0 >> 0x10); +} + + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80066CDC.s") +#else +// Work in progress! + +void func_80066CDC(Gfx **dlist, s32 *arg1) { + u32 sp58; + u32 sp54; + u32 sp50; + u32 sp4C; + s32 sp34; + s32 sp2C; + u32 temp_a0; + u32 temp_a0_3; + u32 temp_a0_4; + u32 temp_a2; + u32 temp_a3; + u32 temp_a3_2; + u32 temp_t0; + u32 temp_t1_2; + u32 temp_v0; + u32 temp_v0_3; + u32 temp_v0_4; + u32 temp_v1_10; + u32 temp_v1_3; + u32 temp_v1_4; + s32 phi_t1; + s32 phi_v1; + f32 phi_f6; + f32 phi_f18; + f32 phi_f16; + f32 phi_f8; + f32 phi_f6_2; + f32 phi_f18_2; + f32 phi_f8_2; + f32 phi_f16_2; + u32 phi_a1; + f32 phi_f8_3; + f32 phi_f16_3; + f32 phi_f16_4; + u32 phi_t3; + u32 phi_a3_2; + u32 phi_t5; + u32 phi_t4; + + sp34 = D_80120CE4; + phi_t1 = D_80120CE4; + if (func_8000E184() && D_80120CE0 == 0) { + D_80120CE4 = 1; + phi_t1 = 0; + } + temp_v0 = func_8007A520(); + temp_t0 = temp_v0 >> 0x10; + temp_a3 = temp_t0 >> 1; + + if (D_800DD064[phi_t1].unk30 & 1) { + sp2C = D_80120CE4; + D_80120CE4 = phi_t1; + fast3d_cmd( + (*dlist)++, + ((((s32)(D_800DD064[D_80120CE4].unk24 * 4.0f)) & 0xFFF) | 0xED000000) | (((s32)(D_800DD064[D_80120CE4].unk20 * 4.0f)) & 0xFFF) << 0xC, + (((s32)(D_800DD064[D_80120CE4].unk2C * 4.0f)) & 0xFFF) | (((s32)(D_800DD064[D_80120CE4].unk28 * 4.0f)) & 0xFFF) << 0xC + ) + func_80068158(dlist, 0, 0, 0, 0); + D_80120CE4 = sp2C; + if (arg1 != 0) { + func_80067D3C(dlist, arg1); + } + D_80120CE4 = sp34; + return; + } + temp_t1_2 = temp_v0 & 0xFFFF; + phi_v1 = D_80120CE0; + if (D_80120CE0 == 2) { + phi_v1 = 3; + } + temp_a2 = temp_t1_2 >> 1; + sp54 = temp_a2; + sp58 = temp_a3; + if (osTvType == 0) { + sp58 = 0x91; + } + + switch(phi_v1) { + case 0: + phi_t3 = sp58; + if (osTvType == 0) { + phi_t3 = sp58 - 0x12; + } + phi_f16_4 = temp_t0; + if (temp_t0 < 0) { + phi_f16_4 = temp_t0 + 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + 0xED000000, + ((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16_4 * 4.0f)) & 0xFFF) + ) + sp4C = temp_a2; + phi_a3_2 = temp_a2; + break; + case 1: + if (D_80120CE4 == 0) { + temp_v0_4 = temp_t0 >> 2; + phi_t3 = temp_v0_4; + if (osTvType == 0) { + phi_t3 = temp_v0_4 - 0xC; + } + phi_f8_3 = temp_a3 - (temp_t0 >> 7); + if (phi_f8_3 < 0) { + phi_f8_3 += 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + 0xED000000, + ((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8_3 * 4.0f)) & 0xFFF) + ) + } else { + temp_v1_10 = temp_t0 >> 7; + phi_f16_3 = temp_t0 - temp_v1_10; + if (phi_f16_3 < 0) { + phi_f16_3 += 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + (((s32)((temp_a3 + temp_v1_10) * 4.0f)) & 0xFFF) | 0xED000000, + ((((s32)(temp_t1_2 * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16_3 * 4.0f)) & 0xFFF) + ) + phi_t3 = temp_a3 + (temp_t0 >> 2); + } + sp4C = temp_a2; + phi_a3_2 = temp_a2; + break; + case 2: + if (D_80120CE4 == 0) { + phi_f8_2 = temp_t0; + if (temp_t0 < 0) { + phi_f8_2 = temp_t0 + 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + 0xED000000, + ((((s32)((temp_a2 - (temp_t1_2 >> 8)) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8_2 * 4.0f)) & 0xFFF) + ) + phi_a1 = temp_t1_2 >> 2; + } else { + temp_a0_4 = temp_t1_2 >> 8; + phi_f16_2 = temp_t0; + if (temp_t0 < 0) { + phi_f16_2 = temp_t0 + 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + (((s32)((temp_a2 + temp_a0_4) * 4.0f) & 0xFFF) << 0xC) | 0xED000000, + (((s32)((temp_t1_2 - temp_a0_4) * 4.0f) & 0xFFF) << 0xC) | (((s32)(phi_f16_2 * 4.0f)) & 0xFFF) + ) + phi_a1 = temp_a2 + (temp_t1_2 >> 2); + } + sp4C = phi_a1; + phi_t3 = sp58; + phi_a3_2 = phi_a1; + break; + case 3: + switch(D_80120CE4) { + case 0: + phi_f6_2 = temp_a2 - (temp_t1_2 >> 8); + if (phi_f6_2 < 0) { + phi_f6_2 += 4294967296.0f; + } + phi_f18_2 = temp_a3 - (temp_t0 >> 7); + if (phi_f18_2 < 0) { + phi_f18_2 += 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + ((((s32)(0U * 4.0f) & 0xFFF) << 0xC) | 0xED000000) | (((s32)(0U * 4.0f)) & 0xFFF), + (((s32)(phi_f6_2 * 4.0f) & 0xFFF) << 0xC) | (((s32)(phi_f18_2 * 4.0f)) & 0xFFF) + ) + phi_t5 = 0U; + phi_t4 = 0U; + break; + case 1: + temp_a0_3 = temp_t1_2 >> 8; + phi_f8 = temp_a3 - (temp_t0 >> 7); + if (phi_f8 < 0) { + phi_f8 += 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + ((((s32)((temp_a2 + temp_a0_3) * 4.0f)) & 0xFFF) << 0xC) | 0xED000000, + ((((s32)(((temp_a2 * 2) - temp_a0_3) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f8 * 4.0f)) & 0xFFF) + ) + phi_t5 = 0U; + phi_t4 = temp_a2; + break; + case 2: + temp_v1_4 = temp_t0 >> 7; + phi_f16 = (temp_a3 * 2) - temp_v1_4; + if (phi_f16 < 0) { + phi_f16 += 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + (((s32)((temp_a3 + temp_v1_4) * 4.0f)) & 0xFFF) | 0xED000000, + ((((s32)((temp_a2 - (temp_t1_2 >> 8)) * 4.0f)) & 0xFFF) << 0xC) | (((s32)(phi_f16 * 4.0f)) & 0xFFF) + ) + phi_t5 = temp_a3; + phi_t4 = 0U; + break; + case 3: + temp_a0 = temp_t1_2 >> 8; + temp_v1_3 = temp_t0 >> 7; + phi_f6 = (temp_a2 * 2) - temp_a0; + if (phi_f6 < 0) { + phi_f6 += 4294967296.0f; + } + phi_f18 = (temp_a3 * 2) - temp_v1_3; + if (phi_f18 < 0) { + phi_f18 += 4294967296.0f; + } + fast3d_cmd( + (*dlist)++, + (((((s32)((temp_a2 + temp_a0) * 4.0f)) & 0xFFF) << 0xC) | 0xED000000) | (((s32)((temp_a3 + temp_v1_3) * 4.0f)) & 0xFFF), + ((((s32)(phi_f6 * 4.0f) & 0xFFF)) << 0xC) | (((s32)(phi_f18 * 4.0f)) & 0xFFF) + ) + phi_t5 = temp_a3; + phi_t4 = temp_a2; + break; + default: + phi_t5 = 0; + phi_t4 = 0; + break; + } + temp_v0_3 = phi_t5 + sp58; + temp_a3_2 = phi_t4 + sp54; + phi_t3 = temp_v0_3; + phi_a3_2 = temp_a3_2; + if (osTvType == 0) { + phi_t3 = temp_v0_3 - 6; + phi_a3_2 = temp_a3_2; + if (D_80120CE4 < 2) { + phi_t3 = temp_v0_3 - 0x14; + phi_a3_2 = temp_a3_2; + } + } + break; + default: + phi_t3 = sp50; + phi_a3_2 = sp4C; + break; + } + + if (osTvType == 0) { + phi_a3_2 -= 4; + } + func_80068158(dlist, sp54, sp58, phi_a3_2, phi_t3); + if (arg1 != 0) { + func_80067D3C(dlist, arg1); + } + D_80120CE4 = sp34; +} +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80067A3C.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80067D3C.s") + +void func_80067F20(f32 arg0) { + D_800DD2CC[0] = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80067F2C.s") + +void func_8006807C(Gfx **dlist, s32 *arg1) { + func_8006FE74(&D_80121060, &D_800DD288); + func_8006F768(&D_80121060, &D_80120EE0, &D_80120F20); + func_8006FE74(D_80120D70[0], &D_800DD2A0); + func_8006F768(D_80120D70[0], &D_80120F20, &D_80121060); + func_8006F870(&D_80121060, (s32*)*arg1); // This doesn't look right. Need to check this! + fast3d_cmd((*dlist)++, 0x1000040, (u32)(*arg1 + 0x80000000)) + *arg1 += 0x40; + D_80120D1C = 0; + D_80120D08 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068158.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_800682AC.s") + +void func_80068408(Gfx **dlist, s32 *arg1) { + func_800705F8(D_80120D70[D_80120D1C], 0.0f, 0.0f, 0.0f); + func_8006F768(D_80120D70[D_80120D1C], &D_80120F20, &D_80121060); + func_8006F870(&D_80121060, (s32*)*arg1); // This doesn't look right. Need to check this! + D_80120D88[D_80120D1C] = *arg1; + + fast3d_cmd((*dlist)++, ((((D_80120D08 << 6) & 0xFF) << 0x10) | 0x1000000) | 0x40, (u32)(*arg1 + 0x80000000)) + + *arg1 += 0x40; +} + +void func_80068508(s32 arg0) { + D_80120D0C = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068514.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068BF4.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80068FA8.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069484.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069790.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069A40.s") + +unk80120AC0 *func_80069CFC(void) { + return &D_80120AC0[D_80120CE4]; +} + +unk80120AC0 *func_80069D20(void) { + if (D_80120D14 != 0) { + return &D_80120AC0[D_80120CE4 + 4]; + } + return &D_80120AC0[D_80120CE4]; +} + +unk80120AC0 *func_80069D7C(void) { + if (D_80120D14 != 0) { + return D_80120BD0; + } + return D_80120AC0; +} + +s32* func_80069DA4(void) { + return &D_80120FA0; +} + +s32* func_80069DB0(void) { + return &D_80120FE0; +} + +s32* func_80069DBC(void) { + return &D_80120F60; +} + +f32 func_80069DC8(f32 arg0, f32 arg1, f32 arg2) { + f32 sp34; + f32 sp30; + f32 returnVal; + func_8006F64C(&D_80120F60, arg0, arg1, arg2, &sp34, &sp30, &returnVal); + return returnVal; +} + +void func_80069E14(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f14; + f32 temp_f2; + s32 i; + + for (i = 0; i <= D_80120CE0; i++) { + temp_f0 = arg0 - D_80120AC0[i].x_position; + temp_f2 = arg1 - D_80120AC0[i].y_position; + temp_f14 = arg2 - D_80120AC0[i].z_position; + temp_f0_2 = sqrtf(((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f14 * temp_f14)); + if (temp_f0_2 < arg3) { + D_80120AC0[i].unk30 = ((arg3 - temp_f0_2) * arg4) / arg3; + } + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_80069F28.s") + +s32* func_8006A100(void) { + return &D_801210E0; +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A10C.s") +#else + +extern s32 D_800DD300; +extern s32 D_801210F8; +extern s32 D_801210FC; +extern s8 D_80121100; +extern u8 D_80121103; + +// Has regalloc & stack issues. +s32 func_8006A10C(void) { + u8 sp23; + osCreateMesgQueue(&D_801210E0, &D_801210F8, 1); + osSetEventMesg(5, &D_801210E0, D_801210FC); + func_800CCC20(&D_801210E0, &sp23, &D_80121100); + func_800CCFE0(&D_801210E0); + func_8006A434(); + D_800DD300 = 0; + if ((sp23 & 1) && !(D_80121103 & 8)) { + return 0; + } + D_800DD300 = 1; + return -1; +} +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A1C4.s") +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A434.s") + +void func_8006A458(s8 *activePlayers) { + s32 i; + s32 temp = 0; + for(i = 0; i < 4; i++) { + if (activePlayers[i]) { + D_80121150[temp++] = i; + } + } + for(i = 0; i < 4; i++) { + if (!activePlayers[i]) { + D_80121150[temp++] = i; + } + } +} + +u8 func_8006A4F8(s32 arg0) { + return D_80121150[arg0]; +} + +void func_8006A50C(void) { + u8 temp = D_80121150[0]; + D_80121150[0] = D_80121150[1]; + D_80121150[1] = temp; +} + +u16 func_8006A528(s32 arg0) { + return D_80121110[D_80121150[arg0]].unk0; +} + +u16 func_8006A554(s32 arg0) { + return D_80121140[D_80121150[arg0]]; +} + +u16 func_8006A578(s32 arg0) { + return D_80121148[D_80121150[arg0]]; +} + +s32 func_8006A59C(s32 arg0) { + func_8006A624(D_80121110[D_80121150[arg0]].unk2); +} + +s32 func_8006A5E0(s32 arg0) { + func_8006A624(D_80121110[D_80121150[arg0]].unk3); +} + +s32 func_8006A624(s8 arg0) { + if (arg0 < 8 && arg0 >= -7) { + return 0; + } + if (arg0 > 0) { + arg0 -= 8; + if (arg0 >= 0x47) { + arg0 = 0x46; + } + } else { + arg0 += 8; + if (arg0 < -0x46) { + arg0 = -0x46; + } + } + return arg0; +} + +void func_8006A6A0(void) { + D_800DD304 = 0; +} diff --git a/src/unknown_06B2B0.c b/src/unknown_06B2B0.c new file mode 100644 index 00000000..a6001659 --- /dev/null +++ b/src/unknown_06B2B0.c @@ -0,0 +1,1324 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x8006A6B0 */ + +#include "types.h" +#include "macros.h" +#include "structs.h" +#include "fast3d.h" + +/************ .rodata ************/ + +const char D_800E70B0[] = "LOADLEVEL Error: Level out of range\n"; +const char D_800E70D8[] = "BossLev problem\n"; +const char D_800E70EC[] = "AITABLE Error: Table out of range\n"; +const char D_800E7110[] = "1.1605"; +const char D_800E7118[] = "02/10/97 16:03"; +const char D_800E7128[] = "pmountain"; + +const char D_800E7134[] = "BBB\n"; +const char D_800E713C[] = "CAR"; +const char D_800E7140[] = "HOV"; +const char D_800E7144[] = "PLN"; +const char D_800E7148[] = "Swapping\n"; + +/*********************************/ + +/************ .data ************/ + +s8 D_800DD310 = 0; // Currently unknown, might be a different type. +s8 D_800DD314 = -1; +s8 D_800DD318 = 0; +s32 D_800DD31C = 0; +s32 D_800DD320 = 0x585E; +s32 D_800DD324 = 0x154; +s16 D_800DD328 = 0; +s16 D_800DD32C = 0; + +s8 D_800DD330 = 0; + +// Unused? +char *D_800DD334[6] = { + NULL, NULL, NULL, // These could be a file boundary. + D_800E7110, D_800E7118, D_800E7128 +}; + +// Unused? +char gBuildString[40] = "Version 7.7 29/09/97 15.00 L.Schuneman"; + +s8 D_800DD374 = 0; +s32 D_800DD378 = 1; +s32 D_800DD37C = 0; +s32 D_800DD380 = 0; // Currently unknown, might be a different type. +s32 D_800DD384 = 0; +s32 D_800DD388 = 0; // Currently unknown, might be a different type. +s8 D_800DD38C = 0; +u8 D_800DD390 = 0; +s16 D_800DD394 = 0; +u8 D_800DD398 = 0; +s32 D_800DD39C = 0; // Currently unknown, might be a different type. +s8 D_800DD3A0 = 0; +s32 D_800DD3A4 = 0; // Currently unknown, might be a different type. +s32 D_800DD3A8 = 0; // Currently unknown, might be a different type. +s32 D_800DD3AC = 0; // Currently unknown, might be a different type. +s32 D_800DD3B0 = 0x1194; +s32 D_800DD3B4 = 0x1B58; +s32 D_800DD3B8 = 0x2AF8; +s32 D_800DD3BC = 0x2AF8; +s32 D_800DD3C0 = 0x12C; +s32 D_800DD3C4 = 0x258; +s32 D_800DD3C8 = 0x352; +s32 D_800DD3CC = 0x384; +s32 D_800DD3D0 = 0x12C; +s32 D_800DD3D4 = 0x190; +s32 D_800DD3D8 = 0x226; +s32 D_800DD3DC = 0x258; +s32 D_800DD3E0 = 0x14; +s32 D_800DD3E4 = 0x1E; +s32 D_800DD3E8 = 0x28; +s32 D_800DD3EC = 0x32; + +s8 D_800DD3F0 = 0; +s16 D_800DD3F4[8] = { + -32768, 0, 20, 0, + 255, -1, 20, -1 +}; +s32 D_800DD404 = 12; +s32 D_800DD408 = 0x00FFFFFF; +s32 D_800DD40C = 0x001EFFFF; // Unused? + +// Unused? +char *D_800DD410[3] = { + D_800E713C, D_800E7140, D_800E7144 +}; + +// Not sure if this is an array or a struct. +s32 D_800DD41C[2] = { + 0, 0x001EFFFF +}; + +s32 D_800DD424[2] = { + 0, 0x0104FFFF +}; + +/*******************************/ + + +extern s32 D_800DFD94; +extern s32 D_80121164; + +extern LevelHeader* D_80121168; + +extern s32 D_80121170; +extern s32 D_80121174; + +// Size: 6 bytes +typedef struct unk8012117C { + s8 unk0; + s8 unk1; + s8 unk2; + s8 pad3[3]; +} unk8012117C; +extern unk8012117C *D_8012117C[2]; // Unknown number of entries + +extern s32 D_801211C0; +extern s16 D_801211C8[8]; // Unknown number of entries +extern Gfx *D_801211F0[3]; // Unknown number of entries. +extern Gfx *D_801211F8; +extern s32 D_80121208; +extern s32 D_80121218; +extern s32 D_80121228; +extern s8 D_80121250[16]; // Unknown number of entries +extern s32 D_801234E8; +extern s32 D_801234EC; +extern s32 D_801234F0; +extern s32 D_801234F4; +extern s32 D_801234F8; +extern s32 D_801234FC; +extern s32 D_80123500; +extern s32 D_80123504; +extern s32 D_80123508; +extern Settings *gSettingsPtr; +extern s8 D_80123514; +extern s8 gIsPaused; +extern s8 D_80123516; +extern s32 D_80123518; +extern s32 D_8012351C; +extern s32 D_80123520; +extern u8 D_80123524; +extern u8 D_80123525; +extern u8 D_80123526; +extern s32* D_80123548; // This is actually an OSMesgQueue pointer. +extern s32 D_80123560; + +void func_800014BC(f32 arg0); +s8* func_8001E29C(s32 arg0); +s32 func_8006A624(s8 arg0); +void func_8006F64C(s32*, f32, f32, f32, f32*, f32*, f32*); +void guPerspectiveF(s32*, s32*, f32, f32, f32, f32, f32); +void func_8006F870(s32*, s32*); +s16 func_80029F18(f32, f32, f32); +void func_8006A50C(void); +void func_800665E8(s32 arg0); +void func_8006CB58(s32 arg0, s32 arg1, s32 arg2, s32 arg3); +void func_8006C164(void); +void func_8000E194(void); +f32 sqrtf(f32); +void osSetTime(u64); +void func_8001D5E0(f32 arg0, f32 arg1, f32 arg2); +void func_800705F8(s32, f32, f32, f32); +void func_8006ECFC(s32 arg0); + + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006A6B0.s") + +s32 func_8006B0AC(s32 arg0) { + if (arg0 > 0 && arg0 < D_80121170) { + return (*D_8012117C)[arg0].unk2 & 0xF; + } + return 0; +} + +s32 func_8006B0F8(s32 arg0) { + if (arg0 > 0 && arg0 < D_80121170) { + s32 temp = (*D_8012117C)[arg0].unk2; + if(temp != 0) { + return (temp >> 4) & 0xF; + } + } + return 1; +} + +s8 func_8006B14C(s32 arg0) { + if (arg0 >= 0 && arg0 < D_80121170) { + return (*D_8012117C)[arg0].unk1; + } + return -1; +} + +s8 func_8006B190(s32 arg0) { + if (arg0 >= 0 && arg0 < D_80121170) { + return (*D_8012117C)[arg0].unk0; + } + return 0; +} + +s32 func_8006B1D4(s32 arg0) { + s8* temp; + + if (arg0 < 0 || arg0 >= D_80121174) { + arg0 = 0; + } + temp = func_8001E29C(0x1B); + + return temp[arg0]; +} + +void func_8006B224(s32* arg0, s32* arg1) { + *arg0 = D_80121170; + *arg1 = D_80121174; +} + + +s32 func_8006B240(void) { + return D_800DD31C; +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006B250.s") +#else + +extern s32 *D_80121160; +extern s32 D_800DD314; + +Settings *get_settings(void); +s32 *func_80076C58(s32); +LevelHeader *func_80070C9C(s32, s32); +void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3); +void func_8006C2E4(void); +s16 func_8006C2F0(void); +void func_8006DB20(s32 arg0); +void func_80072708(void); + +// load_level(levelID, numOfPlayers, entrance, vehicle, ???); +void func_8006B250(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + s32 sp48; + s32 sp44; + Settings *settings; + s32 temp_s0_2; + s32 temp_s0_5; + s32 temp_t8_3; + s32 temp_v0_5; + s8 *temp_v0_4; + s32 phi_v1; + s32 phi_v1_2; + s32 phi_v0_2; + s32 phi_s0; + s32 phi_v1_5; + s8 phi_s0_2; + s32 phi_at; + s32 phi_s0_3; + s32 phi_s0_5; + s32 phi_v1_9; + s32 temp, temp2; + + func_80072708(); + if (arg4 == -1) { + arg4 = 0; + } + if (arg1 == -1) { + sp48 = 1; + arg1 = 0; + } else { + sp48 = 0; + } + if (arg1 == 0) { + func_8000318C(0x8); + } else if (arg1 == 1) { + func_8000318C(0xC); + } else { + func_8000318C(0x10); + } + + settings = get_settings(); + D_80121160 = func_80076C58(0x16); + phi_v1 = 0; + while (-1 != D_80121160[phi_v1]) { + phi_v1++; + } + phi_v1--; + if (arg0 >= phi_v1) { + arg0 = 0; + } + temp2 = D_80121160[arg0]; + temp = D_80121160[arg0 + 1] - temp2; + D_80121168 = func_80070C9C(temp, 0xFFFF00FF); + func_80076E68(0x17, D_80121168, temp2, temp); + D_800DD330 = 0; + sp44 = arg0; + if (D_80121168->race_type == 0) { + func_8006C2E4(); + } + if (func_8006C2F0() == 0) { + if (D_800DD32C == 0) { + if (D_80121168->race_type == 8) { + phi_v1_2 = settings->courseFlagsPtr[temp2] & 1; + phi_v0_2 = 0; + if (D_80121168->world == 0 || D_80121168->world == 5) { + phi_v0_2 = 1; + } + if (phi_v1_2 == 0 || phi_v0_2 != 0) { + func_8006C1AC(arg0, arg2, arg3, arg4); + if ((settings->bosses & (1 << settings->worldId)) != 0) { + arg4 = 7; + } else { + arg4 = 3; + } + if (phi_v0_2 != 0) { + arg4 = 0; + if (phi_v1_2 != 0) { + D_800DD330 = (u8)2; + } + } + temp_v0_4 = func_8001E29C(0x43); + phi_s0 = 0; + while(arg0 != temp_v0_4[phi_s0 + 1]) { + phi_s0++; + } + arg0 = temp_v0_4[phi_s0 + 1]; + arg2 = arg4; + } + + } + if (D_80121168->race_type == 5) { + if (D_80121168->world > 0 && D_80121168->world < 5) { + if ((settings->keys & (1 << D_80121168->world)) != 0) { + temp_v0_5 = 0x4000 << (D_80121168->world + 0x1F); + if ((settings->cutsceneFlags & temp_v0_5) == 0) { + func_8006C1AC(arg0, arg2, arg3, arg4); + settings->cutsceneFlags |= temp_v0_5; + arg2 = 0; + arg4 = 5; + arg0 = func_8001E29C(0x44)[D_80121168->world - 1]; + } + } + } + } + if (D_80121168->race_type == 5 && D_80121168->world == 0 && (settings->cutsceneFlags & 0x2000) == 0 && settings->wizpigAmulet >= 4) { + s32 temp_a1 = arg2; + s32 temp_a3 = arg4; + arg4 = 0; + arg2 = 0; + func_8006C1AC(arg0, temp_a1, arg3, temp_a3); + settings->cutsceneFlags |= 0x2000; + arg0 = (s32) func_8001E29C(0x44)[1]; + } + } + } + D_800DD32C = 0; + if (sp44 != arg0) { + func_80071140(D_80121168); + temp2 = D_80121160[arg0]; + temp = D_80121160[arg0 + 1] - temp2; + D_80121168 = func_80070C9C(temp, 0xFFFF00FF); + func_80076E68(0x17, D_80121168, temp2, temp); + } + func_80071140(D_80121160); + func_8006BFC8(&D_80121168->unk20); + func_8000CBC0(); + D_80121164 = arg0; + for (phi_v1_5 = 0; phi_v1_5 < 7; phi_v1_5++) { + if ((s32)D_80121168->unk74[phi_v1_5] != -1) { + D_80121168->unk74[phi_v1_5] = func_8001E29C((s32)D_80121168->unk74[phi_v1_5]); + func_8007F1E8(D_80121168->unk74[phi_v1_5]); + } + } + if (arg4 == 0x64) { + if(get_trophy_race_world_id() != 0 && D_80121168->race_type == 0) { + arg4 = 0; + } else if(is_in_tracks_mode() == 1 && D_80121168->race_type == 0) { + arg4 = 0; + } + } + if (D_80121168->race_type == 0 || D_80121168->race_type == 8) { + D_800DD31C = 1; + } else { + D_800DD31C = 0; + } + if (sp48 != 0 && D_80121168->race_type != 7) { + D_80121168->race_type = 6; + } + func_80000BE0(D_80121168->unkB3); + func_80000CBC(); + func_80031BB8(0x20); + phi_s0_2 = (u8)0; + if (arg3 >= 0 && arg3 < 3) { + phi_s0_2 = D_80121168->unk4F[arg3]; + } + func_80017E74(phi_s0_2); + settings->courseId = arg0; + if (D_80121168->world != -1) { + settings->worldId = D_80121168->world; + } + if (settings->worldId == 0 && settings->worldId > 0) { + D_800DD314 = func_8006DB2C(); + } + if (settings->worldId == 0 && settings->worldId > 0 && D_800DD314 != -1) { + arg3 = D_800DD314; + } + func_8006DB20(arg3); + if (D_80121168->race_type == 5) { + if (settings->worldId > 0) { + temp_s0_5 = 8 << (settings->worldId + 31); + if (settings->worldId == 5) { + if (settings->balloonsPtr[0] >= 47) { + if (settings->ttAmulet >= 4) { + if ((settings->cutsceneFlags & temp_s0_5) == 0) { + settings->cutsceneFlags |= temp_s0_5; + arg4 = 5; + } + } + } + } else { + if (settings->balloonsPtr[settings->worldId] >= 4) { + if ((settings->cutsceneFlags & temp_s0_5) == 0) { + settings->cutsceneFlags |= temp_s0_5; + arg4 = 5; + } + } + temp_t8_3 = temp_s0_5 << 5; + if (settings->balloonsPtr[settings->worldId] >= 8) { + if ((settings->cutsceneFlags & temp_t8_3) == 0) { + settings->cutsceneFlags |= temp_t8_3; + arg4 = 5; + } + } + } + } + } + if (arg1 != 0 && D_80121168->race_type == 0) { + arg4 = 0x64; + } + if (D_80121168->race_type == 0 || ((D_80121168->race_type & 0x40) != 0 && is_in_two_player_adventure(D_80121168->race_type) != 0)) { + D_800DD318 = (u8)1; + arg4 = 0x64; + } else { + D_800DD318 = (u8)0; + } + if (D_80121168->race_type == 0 && sp48 == 0 && func_8000E4C8(arg4) != 0) { + arg4 = 0x64; + } + func_8001E450(arg4); + func_800249F0(D_80121168->geometry, D_80121168->skybox, arg1, arg3, arg2, D_80121168->collectables, D_80121168->unkBA); + if (D_80121168->unk3A == 0 && D_80121168->unk3C == 0 && D_80121168->fogR == 0 && D_80121168->fogG == 0 && D_80121168->fogB == 0) { + phi_s0_3 = 0; + while(phi_s0_3 < 4) { + func_800307BC(phi_s0_3); + phi_s0_3++; + } + } else { + phi_s0_3 = 0; + while(phi_s0_3 < 4) { + func_80030664(phi_s0_3, D_80121168->unk3A, D_80121168->unk3C, (u8)D_80121168->fogR, D_80121168->fogG, D_80121168->fogB); + phi_s0_3++; + } + } + settings = get_settings(); + if (D_80121168->world != -1) { + settings->worldId = D_80121168->world; + } + settings->courseId = arg0; + if (D_80121168->weather_enable > 0) { + func_800AB4A8( + D_80121168->unk92, + D_80121168->weather_enable, + D_80121168->unk96 << 8, + D_80121168->unk98 << 8, + D_80121168->unk9A << 8, + D_80121168->unk94 * 0x101, + D_80121168->unk95 * 0x101 + ); + func_800AB308(-1, -0x200); + } + if (D_80121168->unk49 == -1) { + D_80121168->unkA4 = func_8007AE74(D_80121168->unkA4); + D_80121168->unkA8 = (u16)0; + D_80121168->unkAA = (u16)0; + } + if ((s32)D_80121168->unkAC != -1) { + D_80121168->unkAC = func_8001E29C((s32)D_80121168->unkAC); + func_8007F414(D_80121168->unkAC); + } + func_800660EC((f32)D_80121168->unk9C); + func_80077B34(D_80121168->unk9D, D_80121168->unk9E, D_80121168->unk9F); + func_8007A974(); + func_8007AB24(D_80121168->unk4[arg1]); +} +#endif + +void func_8006BD10(f32 arg0) { + if (D_80121168->music != 0) { + func_800012E8(); + func_80000B34(D_80121168->music); + func_800014BC(arg0); + func_80001074(D_80121168->instruments); + } +} + +s32 func_8006BD88(void) { + return D_80121164; +} + +u8 func_8006BD98(void) { + return D_80121168->race_type; +} + +LevelHeader* func_8006BDB0(void) { + return D_80121168; +} + +/* Unused? */ +u8 func_8006BDC0(void) { + return D_80121170 - 1; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006BDDC.s") + +void func_8006BEFC(void) { + func_8006C164(); + func_80077B34(0, 0, 0); + func_80071140(D_80121168); + func_800049D8(); + func_80001844(); + func_800018E0(); + func_800012E8(); + func_80031B60(); + func_8002C7D4(); + func_80008174(); + func_80000968(0); + if (D_80121168->weather_enable > 0) { + func_800AB35C(); + } + if (D_80121168->unk49 == 0xFF) { + func_8007B2BC(D_80121168->unkA4); + } +} + +extern s32 *D_80121160; +Settings *get_settings(void); +s32 *func_80076C58(s32); + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006BFC8.s") +#else +void func_8006BFC8(s8 *arg0) { + s32 temp, temp2; + s16 phi_v1; + s8 phi_s0 = 0; + + if (!is_in_tracks_mode()) { + Settings *settings = get_settings(); + // Regalloc issue: temp3 should be a3, not v1. + s32 temp3 = settings->courseFlagsPtr[settings->courseId]; + if (temp3 & 2) { + phi_s0 = 1; + } + if (temp3 & 4) { + phi_s0 = 2; + } + } else { + phi_s0 = 3; + } + + if (get_trophy_race_world_id() != 0) { + phi_s0 = 4; + } + + if(is_in_adventure_two()){ + phi_s0 += 5; + } + + phi_s0 = arg0[phi_s0]; + + if ((func_8009C30C() << 6) < 0) { + phi_s0 = 9; + } + if (func_8006DA0C() == 1) { + phi_s0 = 5; + } + D_80121160 = func_80076C58(1); + phi_v1 = 0; + while (-1 != (s32)D_80121160[phi_v1]) { + phi_v1++; + } + phi_v1--; + if (phi_s0 >= phi_v1) { + phi_s0 = 0; + } + temp2 = D_80121160[phi_s0]; + temp = D_80121160[phi_s0 + 1] - temp2; + D_801211C0 = func_80070C9C(temp, 0xFFFF00FF, D_80121160); + func_80076E68(0, D_801211C0, temp2, temp); + func_80071140(D_80121160); +} +#endif + +void func_8006C164(void) { + func_80071140(D_801211C0); +} + +s32 func_8006C18C(void) { + return D_801211C0; +} + +s8 func_8006C19C(void) { + return D_800DD318; +} + +void func_8006C1AC(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { + D_801211C8[D_800DD328++] = arg0; + D_801211C8[D_800DD328++] = arg1; + D_801211C8[D_800DD328++] = arg2; + D_801211C8[D_800DD328++] = arg3; +} + +void func_8006C22C(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3) { + s16 temp_v1; + + D_800DD328--; + *arg3 = D_801211C8[D_800DD328]; + D_800DD328--; + temp_v1 = D_801211C8[D_800DD328]; + D_800DD328--; + *arg1 = D_801211C8[D_800DD328]; + D_800DD328--; + *arg0 = D_801211C8[D_800DD328]; + + if (temp_v1 != -1) { + *arg2 = temp_v1; + } + + D_800DD32C = 1; +} + + +void func_8006C2E4(void) { + D_800DD328 = 0; +} + +s16 func_8006C2F0(void) { + return D_800DD328; +} + +s32 func_8006C300(void) { + if (D_800DD330 >= 2) { + D_800DD330 = 1; + return 0; + } else { + return D_800DD330; + } +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/D_8006C330.s") +#else +void func_8006C330(s32 arg0) { + func_8006C3E0(); + D_800DD37C = func_8006A1C4(D_800DD37C, 0); + D_80123520 = 0; + D_801234EC = -1; + while(1) { + if (func_8006EAC0() != 0) { + func_80072708(); + audioStopThread(); + func_800C73BC(); + __osSpSetStatus(0xAAAA82); + func_800CD250(0x1D6); + while(1); // Infinite loop + } + func_8006C60C(); + func_80065E30(); + } + // This infinite loop creates too many nops! Needs to be 0x10 aligned, not 0x20 aligned. +} +#endif + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006C3E0.s") +#else +extern Gfx *D_801211F0; +extern u8 D_800DD374; +extern u8 D_800DD3A0; +extern u16 D_80121260; +extern u8 D_80123538; + +extern s32 D_80123544; +extern s32 D_801234E8; + +void osCreateScheduler(u16*, s32*, s32, u8, s32); +void osScAddClient(u16*, u8*, s32**, s32); + +void func_8006C3E0(void) { + s32 sp24; + + func_80070B30(); + func_800C6170(); + D_800DD374 = 1; + if (func_8006F4EC() != 0) { + D_800DD374 = 0; + } + D_80123514 = 0; + D_80123518 = 0; + + if (osTvType == 0) { + sp24 = 0xE; + } else if (osTvType == 1) { + sp24 = 0; + } else if (osTvType == 2) { + sp24 = 0x1C; + } + + osCreateScheduler(&D_80121260, &D_801234E8, 0xD, sp24, 1); + D_800DD3A0 = 0; + if (func_8006EFB8() == 0) { + D_800DD3A0 = 1; + } + func_8007A310(1, &D_80121260); + func_80076BA0(); + func_80078100(&D_80121260); + audio_init(&D_80121260); + func_80008040(); + D_800DD384 = func_8006A10C(); + func_8007AC70(); + func_8005F850(); + func_8000BF8C(); + func_800B5E88(); + func_800598D0(); + func_800AE530(); + func_800AB1F0(); + func_8006E3BC(); + func_8006EFDC(); + func_800C3C00(); + func_80075B18(); + func_80081218(); + func_800C7350(); + osCreateMesgQueue(&D_80123548, &D_80123544, 1); + osScAddClient(&D_80121260, &D_80123538, &D_80123548, 3); + D_80123560 = 0; + D_80123504 = 0; + D_80123508 = 0; + D_801234E8 = 0; + + // ??? + D_801211F8 = D_801211F0; + fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000) + fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000) + + osSetTime(0); +} +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006C60C.s") + +void func_8006CAE4(s32 arg0, s32 arg1, s32 arg2) { + D_80123500 = arg0 - 1; + if (arg1 == -1) { + D_801234F4 = func_8009C1B0(); + } else { + D_801234F4 = arg1; + } + func_8006CB58(D_801234F4, D_80123500, D_80123504, arg2); +} + +void func_8006CB58(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { + func_8006ECFC(arg1); + func_800710B0(0); + func_80065EA0(); + func_800C3048(); + func_8006B250(arg0, arg1, arg2, arg3, D_80123508); + func_8009ECF0(func_80066210()); + func_800AE728(8, 0x10, 0x96, 0x64, 0x32, 0); + func_8001BF20(); + osSetTime(0); + func_800710B0(2); + func_80072298(1); +} + +void func_8006CC14(void) { + func_800710B0(0); + if (D_800DD38C == 0) { + if (D_800DD3F0 != 1) { + func_80077A54(); + } + D_800DD38C = 1; + } + func_8006BEFC(); + func_800C01D8(&D_800DD3F4); + func_800AE270(); + func_800A003C(); + func_800C30CC(); + D_801211F8 = D_801211F0[D_801234E8]; + fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000) + fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000) + func_800710B0(2); +} + +// Has a jump table +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006CCF0.s") + +void func_8006D8A4(void) { + D_800DD390 = 0x2C; + gIsPaused = 0; + func_800945E4(); + func_800C01D8(&D_800DD408); +} + +void func_8006D8E0(s32 arg0) { + D_80123516 = arg0 + 1; +} + +void func_8006D8F0(s32 arg0) { + s32 temp; + if (D_801234EC != 4) { + D_801234F4 = D_80121250[0]; + D_80123504 = 0; + D_80123508 = 0x64; + temp = D_80121250[1]; + if (D_80121250[15] >= 0) { + D_80123504 = D_80121250[15]; + } + if (D_80121250[temp + 8] >= 0) { + D_80123508 = D_80121250[temp + 8]; + } + D_801234F8 = 1; + } +} + +void func_8006D968(s8 *arg0) { + s32 i; + if (D_801234EC != 4) { + D_80121250[0] = D_801234F4; + for(i = 0; i < 2; i++) { + D_80121250[i + 2] = arg0[i + 8]; + D_80121250[i + 4] = arg0[i + 10]; + D_80121250[i + 6] = arg0[i + 12]; + D_80121250[i + 8] = arg0[i + 14]; + D_80121250[i + 10] = arg0[i + 18]; + D_80121250[i + 12] = arg0[i + 20]; + } + D_80121250[14] = arg0[22]; + D_80121250[15] = arg0[23]; + D_801234FC = 1; + } +} + +s32 func_8006DA0C(void) { + return D_801234EC; +} + +/* Unused? */ +void func_8006DA1C(s32 arg0) { + D_801234EC = arg0; +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006DA28.s") +#else + +// For some reason this function is storing arg0 in s0. + +void func_8006DB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); +void func_800813C0(s32); +void func_80004A60(s32, s32); +void MenuInit(s32); + +void func_8006DA28(s32 arg0, s32 arg1, s32 arg2) { + func_8006ECFC(0); + D_801234EC = 1; + D_801234F0 = 1; + func_80004A60(0, 0x7FFF); + func_80004A60(1, 0x7FFF); + func_80004A60(2, 0x7FFF); + func_80065EA0(); + + if (D_80123514 == 0) { + D_80123514 = 0; // Someone at rare: "I know I just checked if this was zero, but I need to be sure!" + if (arg1 < 0) { + D_80123514 = 1; + } else { + func_8006DB3C(arg1, -1, 0, 2, arg2); + } + } + if (arg0 == 0 || arg0 == 1 || arg0 == 2) { + func_800813C0(arg0); + } + MenuInit(arg0); + D_80123504 = 0; +} +#endif + +void func_8006DB14(s32 arg0) { + D_80123518 = arg0; +} + +void func_8006DB20(s32 arg0) { + D_8012351C = arg0; +} + +s32 func_8006DB2C(void) { + return D_80123518; +} + +void func_8006DB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + func_800710B0(0); + func_80065EA0(); + func_800C3048(); + func_8006B250(arg0, arg1, arg2, arg3, arg4); + func_8009ECF0(func_80066210()); + func_800AE728(4, 4, 0x6E, 0x30, 0x20, 0); + func_8001BF20(); + osSetTime(0); + func_800710B0(2); +} + +void func_8006DBE4(void) { + if (D_80123514 == 0) { + D_80123514 = 1; + func_800710B0(0); + func_8006BEFC(); + func_800C01D8(&D_800DD3F4); + func_800AE270(); + func_800A003C(); + func_800C30CC(); + func_800710B0(2); + } + D_80123514 = 0; +} + +void func_8006DC58(s32 arg0) { + if (func_800C73E0() == 0) { + func_80010994(arg0); + particlePtrList_flush(); + func_8001BF20(); + D_80024D54(&D_801211F8, &D_80121208, &D_80121218, &D_80121228, arg0); + func_800C3440(arg0); + func_80078054(&D_801211F8); + func_80077050(&D_801211F8); + func_80077268(&D_801211F8); + } +} + +// Has a jump table +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006DCF8.s") + +void func_8006E2E8(s32 arg0, s32 arg1, s32 arg2) { + if (D_80123514 == 0) { + func_8006DBE4(); + if (func_800C73E0() == 0) { + D_801211F8 = D_801211F0[D_801234E8]; + fast3d_cmd(D_801211F8++, 0xE9000000, 0x00000000) + fast3d_cmd(D_801211F8++, 0xB8000000, 0x00000000) + } + } + if (arg0 != -1) { + func_8006DB3C(arg0, arg1, 0, 2, arg2); + D_80123514 = (u8)0; + return; + } + D_80123514 = (u8)1; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006E3BC.s") + +void func_8006E5BC(void) { + s32 i, j; + gSettingsPtr->playerCount = func_8009C3C8(); + for (i = 0; i < 8; i++) { + gSettingsPtr->racers[i].best_times = 0; + gSettingsPtr->racers[i].character = func_8009C228(i); + if (gSettingsPtr->playerCount >= 2) { + gSettingsPtr->racers[i].starting_position = i; + } else if (is_in_two_player_adventure()) { + gSettingsPtr->racers[i].starting_position = 5 - i; + } else { + gSettingsPtr->racers[i].starting_position = 7 - i; + } + gSettingsPtr->racers[i].unk7 = 0; + for(j = 0; j < 4; j++) { + gSettingsPtr->racers[i].placements[j] = 0; + } + gSettingsPtr->racers[i].course_time = 0; + for(j = 0; j < 3; j++) { + gSettingsPtr->racers[i].lap_times[j] = 0; + } + } + gSettingsPtr->timeTrialRacer = 0; + gSettingsPtr->unk115[0] = 0; + gSettingsPtr->unk115[1] = 0; + gSettingsPtr->display_times = 0; + gSettingsPtr->worldId = 0; + gSettingsPtr->courseId = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006E770.s") + +void func_8006E994(Settings* settings) { + s32 i; + s32 sp20; + s32 sp1C; + + func_8006B224(&sp1C, &sp20); + settings->newGame = 1; + + for (i = 0; i < sp20; i++) { + settings->balloonsPtr[i] = 0; + } + for(i = 0; i < sp1C; i++) { + settings->courseFlagsPtr[i] = 0; + } + + settings->keys = 0; + settings->unkA = 0; + settings->bosses = 0; + settings->trophies = 0; + settings->cutsceneFlags = 0; + settings->tajFlags = 0; + settings->ttAmulet = 0; + settings->wizpigAmulet = 0; +} + +// Unused? +void func_8006EA58(void) { + func_8006E770(gSettingsPtr, 3); + func_8006E994(gSettingsPtr); +} + +Settings* get_settings(void) { + return gSettingsPtr; +} + +s8 func_8006EAA0(void) { + return gIsPaused; +} + +s8 func_8006EAB0(void) { + return D_80123516; +} + +s32 func_8006EAC0(void) { + if (D_80123560 == 0) { + D_80123560 = (s32) ((osRecvMesg(&D_80123548, NULL, 0) + 1) != 0); + } + return D_80123560; +} + +s32 func_8006EB14(void) { + return D_801234F4; +} + +/* Unused? */ +void func_8006EB24(void) { + D_800DD37C |= 0x01; +} + +/* Unused? */ +void func_8006EB40(void) { + D_800DD37C |= 0x02; +} + +void func_8006EB5C(void) { + D_800DD37C |= 0x03; +} + +void func_8006EB78(s32 arg0) { + D_800DD37C &= -0x301; + D_800DD37C |= (0x04 | ((arg0 & 3) << 8)); +} + +void func_8006EBA8(void) { + D_800DD37C |= 0x08; +} + +void func_8006EBC4(void) { + D_800DD37C |= 0x10; +} + +void func_8006EBE0(void) { + D_800DD37C |= 0x20; +} + +void func_8006EBFC(void) { + D_800DD37C |= 0x30; +} + +void func_8006EC18(s32 arg0) { + D_800DD37C &= -0xC01; + D_800DD37C |= (0x40 | ((arg0 & 3) << 0xA)); +} + +void func_8006EC48(s32 arg0) { + if (D_801234EC == 0 && !is_in_tracks_mode()) { + D_800DD37C &= -0xC01; + D_800DD37C |= (0x40 | ((arg0 & 3) << 0xA)); + } +} + +void func_8006ECAC(s32 arg0) { + D_800DD37C = ((arg0 & 0x03) << 10) | 0x80; +} + +/* Unused? */ +void func_8006ECC4(void) { + D_800DD37C |= 0x100; +} + +void func_8006ECE0(void) { + D_800DD37C |= 0x200; +} + +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006ECFC.s") + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006EFB8.s") +#else +s32 func_8006EFB8(void) { + if (D_A4000000 != -1) { // regalloc issue with D_A4000000 + return 0; + } + return 1; +} +#endif + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006EFDC.s") +#else + +/* Size: 0x40 bytes, I think this might be a 4x4 matrix. */ +typedef struct unk80121200 { + u8 pad0[0x40]; +} unk80121200; + +/* Size: 10 bytes */ +typedef struct unk80121210 { + u8 pad0[10]; +} unk80121210; + +/* Size: 16 bytes */ +typedef struct unk80121220 { + u8 pad0[16]; +} unk80121220; + +extern s32 D_8012350C; + +extern s32 D_800DD3BC; +extern s32 D_800DD3CC; +extern s32 D_800DD3DC; +extern s32 D_800DD3EC; + +extern s32 D_80123528; +extern s32 D_8012352C; +extern s32 D_80123530; +extern s32 D_80123534; + +extern unk80121200 *D_80121200[3]; +extern unk80121210 *D_80121210[3]; +extern unk80121220 *D_80121220[3]; + +void *func_80070C9C(s32, s32); // Allocates memory? + +void func_8006EFDC(void) { + s32 size; + s8* current; + + D_8012350C = 3; + + size = (D_800DD3EC * sizeof(unk80121220)) + + (D_800DD3BC * sizeof(Gfx)) + + (D_800DD3DC * sizeof(unk80121200)) + + (D_800DD3CC * sizeof(unk80121210)); + + current = (s8*)func_80070C9C(size, 0xFF0000FF); + D_801211F0[0] = (Gfx*)current; + current += (D_800DD3BC * sizeof(Gfx)); + D_80121200[0] = (unk80121200*)current; + current += (D_800DD3DC * sizeof(unk80121200)); + D_80121210[0] = (unk80121210*)current; + current += (D_800DD3CC * sizeof(unk80121210)); + D_80121220[0] = (unk80121220*)current; + + current = (s8*)func_80070C9C(size, 0xFFFF00FF); + D_801211F0[1] = (Gfx*)current; + current += (D_800DD3BC * sizeof(Gfx)); + D_80121200[1] = (unk80121200*)current; + current += (D_800DD3DC * sizeof(unk80121200)); + D_80121210[1] = (unk80121210*)current; + current += (D_800DD3CC * sizeof(unk80121210)); + D_80121220[1] = (unk80121220*)current; + + D_80123528 = D_800DD3BC; + D_8012352C = D_800DD3DC; + D_80123530 = D_800DD3EC; + D_80123534 = D_800DD3CC; +} +#endif + +void func_8006F140(s32 arg0) { + if (D_800DD394 == 0) { + D_800DD394 = 0x28; + D_80123524 = 0; + D_80123526 = 0; + if (arg0 == 1) { + func_800C01D8(&D_800DD41C); + } + if (arg0 == 3) { + D_800DD394 = 0x11A; + func_800C01D8(&D_800DD424); + } + if (arg0 == 4) { + D_800DD394 = 0x168; + func_800C01D8(&D_800DD424); + } + if (arg0 == 0) { + D_800DD394 = 2; + } + } +} + +// Unused? +void func_8006F20C(void) { + if (D_800DD394 == 0) { + func_800C01D8(&D_800DD41C); + D_800DD394 = 0x28; + D_80123524 = 1; + } +} + +void func_8006F254(void) { + if (D_800DD394 == 0) { + func_800C01D8(&D_800DD41C); + D_800DD394 = 0x28; + D_80123524 = 2; + } +} + +void func_8006F29C(void) { + if (D_800DD394 == 0) { + if ((gSettingsPtr->trophies & 0xFF) == 0xFF && !(gSettingsPtr->cutsceneFlags & 1) && gSettingsPtr->bosses & 1) { + gSettingsPtr->cutsceneFlags |= 1; + func_800C01D8(&D_800DD41C); + D_800DD394 = 0x28; + D_80123525 = 0x2D; + D_80123524 = 3; + } + } +} + +void func_8006F338(s32 arg0) { + if (D_800DD394 == 0) { + D_80123525 = arg0; + func_800C01D8(&D_800DD41C); + D_800DD394 = 0x28; + D_80123524 = 4; + } +} + +void func_8006F388(u8 arg0) { + D_800DD398 = arg0; +} + +void func_8006F398(void) { + s32 i; + u8 temp; + u8 *first_racer_data; + u8 *second_racer_data; + + func_8006A50C(); + func_8000E194(); + + first_racer_data = (u8*)(gSettingsPtr->racers); + second_racer_data = (u8*)(gSettingsPtr->racers + 1); + + for(i = 0; i < sizeof(Racer); i++) { + temp = first_racer_data[i]; + first_racer_data[i] = second_racer_data[i]; + second_racer_data[i] = temp; + } +} + +void func_8006F42C(void) { + D_800DD3F0 = 2; +} + +void func_8006F43C(void) { + s32 phi_s1 = 0; + s32 phi_s0 = 0; + while(phi_s0 != 4) { + phi_s1 |= func_8006A528(phi_s0); + phi_s0++; + } + if (phi_s1 & 0x1000) { + D_800DFD94 = 1; + } + D_80123520++; + if (D_80123520 >= 8) { + func_8006DA28(0x1A, 0x27, 2); + } +} + +s32 func_8006F4C8(void) { + if (D_800DD384 == -1) { + return 1; + } else { + return 0; + } +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_066AA0/func_8006F4EC.s") +#else +s32 func_8006F4EC(void) { + if (SP_IMEM != 0x17D7) { // Same regalloc issue as func_8006EFB8 + return 0; + } + return 1; +} +#endif From c3dede10d52e173ee7c6346ded1962abcffd4b77 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 21:08:07 -0500 Subject: [PATCH 41/66] split unknown_0AEE70 into unknown_0B7A50 --- .../unknown_0AEE70/func_800B7810.s | 89 +++++- src/unknown_0AEE70.c | 281 +++++++----------- src/unknown_0B7A50.c | 45 +++ 3 files changed, 237 insertions(+), 178 deletions(-) create mode 100644 src/unknown_0B7A50.c diff --git a/asm/non_matchings/unknown_0AEE70/func_800B7810.s b/asm/non_matchings/unknown_0AEE70/func_800B7810.s index bf6dc19e..5935d8fb 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B7810.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B7810.s @@ -1,3 +1,84 @@ +.rdata +glabel D_800E8F18 +.asciz " epc\t\t0x%08x\n" +.ascii "\0\0" # padding +glabel D_800E8F28 +.asciz " cause\t\tmmAlloc(%d,0x%8x)\n" +.ascii "\0" # padding +glabel D_800E8F44 +.asciz " object\t\t" +.ascii "\0\0" # padding +glabel D_800E8F50 +.asciz "%s %d " +.ascii "\0" # padding +glabel D_800E8F58 +.asciz "\n" +.ascii "\0\0" # padding +glabel D_800E8F5C +.asciz "\n\n\n\n\n\n\n\n\n\n\n\n\n\n" +.ascii "\0" # padding +glabel D_800E8F6C +.asciz " Fault in thread %d\n" +.ascii "\0\0\0" # padding +glabel D_800E8F84 +.asciz " epc\t\t0x%08x\n" +.ascii "\0\0" # padding +glabel D_800E8F94 +.asciz " cause\t\t0x%08x\n" +glabel D_800E8FA4 +.asciz " sr\t\t0x%08x\n" +.ascii "\0\0\0" # padding +glabel D_800E8FB4 +.asciz " badvaddr\t0x%08x\n" +.ascii "\0\0" # padding +glabel D_800E8FC8 +.asciz " object\t\t" +.ascii "\0\0" # padding +glabel D_800E8FD4 +.asciz "%s %d " +.ascii "\0" # padding +glabel D_800E8FDC +.asciz "\n" +.ascii "\0\0" # padding +glabel D_800E8FE0 +.asciz " at 0x%08x v0 0x%08x v1 0x%08x\n" +glabel D_800E9000 +.asciz " a0 0x%08x a1 0x%08x a2 0x%08x\n" +glabel D_800E9020 +.asciz " a3 0x%08x t0 0x%08x t1 0x%08x\n" +glabel D_800E9040 +.asciz " t2 0x%08x t3 0x%08x t4 0x%08x\n" +glabel D_800E9060 +.asciz " t5 0x%08x t6 0x%08x t7 0x%08x\n" +glabel D_800E9080 +.asciz " s0 0x%08x s1 0x%08x s2 0x%08x\n" +glabel D_800E90A0 +.asciz " s3 0x%08x s4 0x%08x s5 0x%08x\n" +glabel D_800E90C0 +.asciz " s6 0x%08x s7 0x%08x t8 0x%08x\n" +glabel D_800E90E0 +.asciz " t9 0x%08x gp 0x%08x sp 0x%08x\n" +glabel D_800E9100 +.asciz " s8 0x%08x ra 0x%08x\n\n" +.ascii "\0" # padding +glabel D_800E9118 +.asciz " %08x %08x %08x\n" +.ascii "\0" # padding +glabel D_800E912C +.asciz " " +.ascii "\0" # padding +glabel D_800E9130 +.asciz "%04x " +.ascii "\0\0" # padding +glabel D_800E9138 +.asciz "\n" +.ascii "\0\0" # padding + +.late_rodata +glabel jpt_800E913C +.word L800B7898, L800B7C18, L800B7C18, L800B7C18, L800B7C70, L800B7CE4 + +.text glabel func_800B7810 /* 0B8410 800B7810 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 0B8414 800B7814 3C0F800E */ lui $t7, %hi(D_800E302C) # $t7, 0x800e @@ -27,12 +108,13 @@ glabel func_800B7810 /* 0B8474 800B7874 2C410006 */ sltiu $at, $v0, 6 /* 0B8478 800B7878 1020011B */ beqz $at, .L800B7CE8 /* 0B847C 800B787C 00024880 */ sll $t1, $v0, 2 -/* 0B8480 800B7880 3C01800F */ lui $at, %hi(D_800E913C) # $at, 0x800f +/* 0B8480 800B7880 3C01800F */ lui $at, %hi(jpt_800E913C) # $at, 0x800f /* 0B8484 800B7884 00290821 */ addu $at, $at, $t1 -/* 0B8488 800B7888 8C29913C */ lw $t1, %lo(D_800E913C)($at) +/* 0B8488 800B7888 8C29913C */ lw $t1, %lo(jpt_800E913C)($at) /* 0B848C 800B788C 00000000 */ nop /* 0B8490 800B7890 01200008 */ jr $t1 /* 0B8494 800B7894 00000000 */ nop +glabel L800B7898 /* 0B8498 800B7898 444AF800 */ cfc1 $t2, $31 /* 0B849C 800B789C 3C038013 */ lui $v1, %hi(D_80129800) # $v1, 0x8013 /* 0B84A0 800B78A0 35410003 */ ori $at, $t2, 3 @@ -264,6 +346,7 @@ glabel func_800B7810 /* 0B880C 800B7C0C 24849100 */ addiu $a0, %lo(D_800E9100) # addiu $a0, $a0, -0x6f00 /* 0B8810 800B7C10 10000036 */ b .L800B7CEC /* 0B8814 800B7C14 8FBF002C */ lw $ra, 0x2c($sp) +glabel L800B7C18 /* 0B8818 800B7C18 00021880 */ sll $v1, $v0, 2 /* 0B881C 800B7C1C 00621823 */ subu $v1, $v1, $v0 /* 0B8820 800B7C20 00031900 */ sll $v1, $v1, 4 @@ -287,6 +370,7 @@ glabel func_800B7810 /* 0B8864 800B7C64 26100004 */ addiu $s0, $s0, 4 /* 0B8868 800B7C68 10000020 */ b .L800B7CEC /* 0B886C 800B7C6C 8FBF002C */ lw $ra, 0x2c($sp) +glabel L800B7C70 /* 0B8870 800B7C70 000219C0 */ sll $v1, $v0, 7 /* 0B8874 800B7C74 2463FE00 */ addiu $v1, $v1, -0x200 /* 0B8878 800B7C78 3C198013 */ lui $t9, %hi(D_80129BB0) # $t9, 0x8013 @@ -318,6 +402,7 @@ glabel func_800B7810 /* 0B88D8 800B7CD8 00000000 */ nop /* 0B88DC 800B7CDC 10000003 */ b .L800B7CEC /* 0B88E0 800B7CE0 8FBF002C */ lw $ra, 0x2c($sp) +glabel L800B7CE4 /* 0B88E4 800B7CE4 AC600000 */ sw $zero, ($v1) .L800B7CE8: /* 0B88E8 800B7CE8 8FBF002C */ lw $ra, 0x2c($sp) diff --git a/src/unknown_0AEE70.c b/src/unknown_0AEE70.c index 9d468239..e6365b64 100644 --- a/src/unknown_0AEE70.c +++ b/src/unknown_0AEE70.c @@ -4,6 +4,109 @@ #include "types.h" #include "macros.h" +/************ .rodata ************/ + +const char D_800E87F0[] = "\nMaximum limit of %d lens flare switches, per level, has been exceeded."; + +// This is probably a file boundary. +const DoubleLiteral D_800E8838 = { 0.0 }; + +const char D_800E8840[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; +const char D_800E887C[] = "\n\nUnknown particle type in initParticleTrigger %d, Max %d.\n\n"; +const char D_800E88BC[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; +const char D_800E88F8[] = "Sprite Particle buffer is full.\n"; +const char D_800E891C[] = "Triangle Particle buffer is full.\n"; +const char D_800E8940[] = "Rectangle Particle buffer is full.\n"; +const char D_800E8964[] = "Line Particle buffer is full.\n"; +const char D_800E8980[] = "Point Particle buffer is full.\n"; +const char D_800E89A4[] = "\n\nCan't allocate space for unknown particle type."; +const char D_800E89D8[] = "\n\nParticle has been freed twice, this is Super Safe, Honest!\n"; +const char D_800E8A18[] = "\n\nSprite Particle Buffer is empty.\n\n"; +const char D_800E8A40[] = "\n\nTriangle Particle Buffer is empty.\n\n"; +const char D_800E8A68[] = "\n\nRectangle Particle Buffer is empty.\n\n"; +const char D_800E8A90[] = "\n\nLine Particle buffer is empty.\n\n"; +const char D_800E8AB4[] = "\n\nPoint Particle buffer is empty.\n\n"; +const char D_800E8AD8[] = "\n\nCan't deallocate space for unknown particle type.\n\n"; +const char D_800E8B10[] = "\nError :: trigger %x has no reference to point %x"; +const char D_800E8B44[] = "\nError :: particle %x is not indexed correctly in trigger list %x (%d >> %p)"; + +const DoubleLiteral D_800E8B98 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BA0 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BA8 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BB0 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BB8 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BC0 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BC8 = { 0.00001525878906 }; +const DoubleLiteral D_800E8BD0 = { 0.00001525878906 }; +const FloatLiteral D_800E8BD8 = { 0.1f }; + +// Jump table in func_800B2040 +const u32 D_800E8BDC[] = { + 0x800B2250, 0x800B20E0, 0x800B2138, 0x800B2190, + 0x800B21E8 +}; + +const FloatLiteral D_800E8BF0 = { 0.1f }; +const FloatLiteral D_800E8BF4 = { 0.01f }; + +// This is probably another file boundary. +const DoubleLiteral D_800E8BF8 = { 0.0 }; + +const char D_800E8C00[] = "0123456789abcdefghijklmnopqrstuvwxyz"; +const char D_800E8C28[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +const char D_800E8C50[] = ""; +const char D_800E8C54[] = "(null)"; +const char D_800E8C5C[] = "(nil)"; +const char D_800E8C64[] = "*** diPrintf Error *** ---> Out of string space. (Print less text!)\n"; + +// Jump table in func_800B4A40 +const u32 D_800E8CAC[] = { + 0x800B4BA4, 0x800B4BC8, 0x800B4BC8, 0x800B4BBC, + 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, + 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BAC, + 0x800B4BC8, 0x800B4BB4, 0x800B4BC8, 0x800B4BC8, + 0x800B4BC4 +}; + +// Jump table in func_800B4A40 +const u32 D_800E8CF0[] = { + 0x800B4DB0, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DB8, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4D90, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4D98, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, + 0x800B4DC4, 0x800B4DC0 +}; + +// Jump table in func_800B4A40 +const u32 D_800E8D88[] = { + 0x800B52C4, 0x800B5E0C, 0x800B5794, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B4F84, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5E0C, 0x800B5AC4, 0x800B4E38, + 0x800B52C4, 0x800B57A4, 0x800B5794, 0x800B5E0C, + 0x800B4E38, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, + 0x800B5E0C, 0x800B5D78, 0x800B4F64, 0x800B5C8C, + 0x800B5E0C, 0x800B5E0C, 0x800B5B48, 0x800B5E0C, + 0x800B4F44, 0x800B5E0C, 0x800B5E0C, 0x800B4FA4 +}; + +// Jump table in func_800B653C +const u32 D_800E8E58[] = { + 0x800B6658, 0x800B6740, 0x800B6614, 0x800B6634, + 0x800B66CC +}; + +/*********************************/ + /************ .data ************/ // I woundn't be suprised if most of these zeroes are really just null pointers. @@ -163,168 +266,7 @@ u32 D_800E2FB8[] = { 0xB8000000, 0x00000000 }; -s32 D_800E3020 = -1; -s32 D_800E3024 = 0; -s32 D_800E3028 = 0; - -s32 *D_800E302C[3] = { - (s32*)0x800E8F00, (s32*)0x800E8F08, (s32*)0x800E8F10 -}; - /*******************************/ -/************ .rodata ************/ - -const char D_800E87F0[] = "\nMaximum limit of %d lens flare switches, per level, has been exceeded."; - -// This is probably a file boundary. -const DoubleLiteral D_800E8838 = { 0.0 }; - -const char D_800E8840[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; -const char D_800E887C[] = "\n\nUnknown particle type in initParticleTrigger %d, Max %d.\n\n"; -const char D_800E88BC[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; -const char D_800E88F8[] = "Sprite Particle buffer is full.\n"; -const char D_800E891C[] = "Triangle Particle buffer is full.\n"; -const char D_800E8940[] = "Rectangle Particle buffer is full.\n"; -const char D_800E8964[] = "Line Particle buffer is full.\n"; -const char D_800E8980[] = "Point Particle buffer is full.\n"; -const char D_800E89A4[] = "\n\nCan't allocate space for unknown particle type."; -const char D_800E89D8[] = "\n\nParticle has been freed twice, this is Super Safe, Honest!\n"; -const char D_800E8A18[] = "\n\nSprite Particle Buffer is empty.\n\n"; -const char D_800E8A40[] = "\n\nTriangle Particle Buffer is empty.\n\n"; -const char D_800E8A68[] = "\n\nRectangle Particle Buffer is empty.\n\n"; -const char D_800E8A90[] = "\n\nLine Particle buffer is empty.\n\n"; -const char D_800E8AB4[] = "\n\nPoint Particle buffer is empty.\n\n"; -const char D_800E8AD8[] = "\n\nCan't deallocate space for unknown particle type.\n\n"; -const char D_800E8B10[] = "\nError :: trigger %x has no reference to point %x"; -const char D_800E8B44[] = "\nError :: particle %x is not indexed correctly in trigger list %x (%d >> %p)"; - -const DoubleLiteral D_800E8B98 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BA0 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BA8 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BB0 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BB8 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BC0 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BC8 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BD0 = { 0.00001525878906 }; -const FloatLiteral D_800E8BD8 = { 0.1f }; - -// Jump table in func_800B2040 -const u32 D_800E8BDC[] = { - 0x800B2250, 0x800B20E0, 0x800B2138, 0x800B2190, - 0x800B21E8 -}; - -const FloatLiteral D_800E8BF0 = { 0.1f }; -const FloatLiteral D_800E8BF4 = { 0.01f }; - -// This is probably another file boundary. -const DoubleLiteral D_800E8BF8 = { 0.0 }; - -const char D_800E8C00[] = "0123456789abcdefghijklmnopqrstuvwxyz"; -const char D_800E8C28[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -const char D_800E8C50[] = ""; -const char D_800E8C54[] = "(null)"; -const char D_800E8C5C[] = "(nil)"; -const char D_800E8C64[] = "*** diPrintf Error *** ---> Out of string space. (Print less text!)\n"; - -// Jump table in func_800B4A40 -const u32 D_800E8CAC[] = { - 0x800B4BA4, 0x800B4BC8, 0x800B4BC8, 0x800B4BBC, - 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, - 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BAC, - 0x800B4BC8, 0x800B4BB4, 0x800B4BC8, 0x800B4BC8, - 0x800B4BC4 -}; - -// Jump table in func_800B4A40 -const u32 D_800E8CF0[] = { - 0x800B4DB0, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DB8, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4D90, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4D98, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC0 -}; - -// Jump table in func_800B4A40 -const u32 D_800E8D88[] = { - 0x800B52C4, 0x800B5E0C, 0x800B5794, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B4F84, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5AC4, 0x800B4E38, - 0x800B52C4, 0x800B57A4, 0x800B5794, 0x800B5E0C, - 0x800B4E38, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5D78, 0x800B4F64, 0x800B5C8C, - 0x800B5E0C, 0x800B5E0C, 0x800B5B48, 0x800B5E0C, - 0x800B4F44, 0x800B5E0C, 0x800B5E0C, 0x800B4FA4 -}; - -// Jump table in func_800B653C -const u32 D_800E8E58[] = { - 0x800B6658, 0x800B6740, 0x800B6614, 0x800B6634, - 0x800B66CC -}; - -// This is probably another file boundary. -const FloatLiteral D_800E8E6C = { 0.0f }; - -const char D_800E8E70[] = "\nAssertion failed: '%s' in file %s, line %d\n"; -const char D_800E8EA0[] = "\nAssertion failed: '%s' in file %s, line %d\n"; -const char D_800E8ED0[] = ">fault< "; -const char D_800E8EDC[] = "CORE\0\0\0\0"; -const char D_800E8EE8[] = "CORE\0\0\0\0"; -const char D_800E8EF4[] = "CORE\0\0\0\0"; - -const char D_800E8F00[] = "setup"; -const char D_800E8F08[] = "control"; -const char D_800E8F10[] = "print"; - -// EPC (Error program counter?) Lockup display strings, see: https://tcrf.net/Diddy_Kong_Racing#Crash_Debugger -const char D_800E8F18[] = " epc\t\t0x%08x\n"; -const char D_800E8F28[] = " cause\t\tmmAlloc(%d,0x%8x)\n"; -const char D_800E8F44[] = " object\t\t"; -const char D_800E8F50[] = "%s %d "; -const char D_800E8F58[] = "\n"; -const char D_800E8F5C[] = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; -const char D_800E8F6C[] = " Fault in thread %d\n"; -const char D_800E8F84[] = " epc\t\t0x%08x\n"; -const char D_800E8F94[] = " cause\t\t0x%08x\n"; -const char D_800E8FA4[] = " sr\t\t0x%08x\n"; -const char D_800E8FB4[] = " badvaddr\t0x%08x\n"; -const char D_800E8FC8[] = " object\t\t"; -const char D_800E8FD4[] = "%s %d "; -const char D_800E8FDC[] = "\n"; -const char D_800E8FE0[] = " at 0x%08x v0 0x%08x v1 0x%08x\n"; -const char D_800E9000[] = " a0 0x%08x a1 0x%08x a2 0x%08x\n"; -const char D_800E9020[] = " a3 0x%08x t0 0x%08x t1 0x%08x\n"; -const char D_800E9040[] = " t2 0x%08x t3 0x%08x t4 0x%08x\n"; -const char D_800E9060[] = " t5 0x%08x t6 0x%08x t7 0x%08x\n"; -const char D_800E9080[] = " s0 0x%08x s1 0x%08x s2 0x%08x\n"; -const char D_800E90A0[] = " s3 0x%08x s4 0x%08x s5 0x%08x\n"; -const char D_800E90C0[] = " s6 0x%08x s7 0x%08x t8 0x%08x\n"; -const char D_800E90E0[] = " t9 0x%08x gp 0x%08x sp 0x%08x\n"; -const char D_800E9100[] = " s8 0x%08x ra 0x%08x\n\n"; -const char D_800E9118[] = " %08x %08x %08x\n"; -const char D_800E912C[] = " "; -const char D_800E9130[] = "%04x "; -const char D_800E9138[] = "\n"; -// End of EPC lockup strings - -// Jump table in func_800B7810 -const u32 D_800E913C[] = { - 0x800B7898, 0x800B7C18, 0x800B7C18, 0x800B7C18, - 0x800B7C70, 0x800B7CE4 -}; - -/*********************************/ void func_800AE2D8(void); void func_800AE374(void); @@ -445,6 +387,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B22FC.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B263C.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B26E0.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B2FBC.s") + GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3140.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3240.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3358.s") @@ -465,18 +408,4 @@ GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B635C.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B653C.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B695C.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B69FC.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6E50.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6EE0.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6F04.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6F40.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6F50.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/D_800B6FC4.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B70D0.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7144.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B71B0.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7460.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B76B8.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B76DC.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B77D4.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7810.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7D10.s") + diff --git a/src/unknown_0B7A50.c b/src/unknown_0B7A50.c new file mode 100644 index 00000000..4b0f9649 --- /dev/null +++ b/src/unknown_0B7A50.c @@ -0,0 +1,45 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800B6E50 */ + +#include "types.h" +#include "macros.h" + +/************ .rodata ************/ + +const char D_800E8E70[] = "\nAssertion failed: '%s' in file %s, line %d\n"; +const char D_800E8EA0[] = "\nAssertion failed: '%s' in file %s, line %d\n"; +const char D_800E8ED0[] = ">fault< "; +const char D_800E8EDC[] = "CORE\0\0\0\0"; +const char D_800E8EE8[] = "CORE\0\0\0\0"; +const char D_800E8EF4[] = "CORE\0\0\0\0"; + +/*********************************/ + +/************ .data ************/ + +s32 D_800E3020 = -1; +s32 D_800E3024 = 0; +s32 D_800E3028 = 0; + +char *D_800E302C[3] = { + "setup", "control", "print" +}; + +/*******************************/ + + +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6E50.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6EE0.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6F04.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6F40.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B6F50.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/D_800B6FC4.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B70D0.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7144.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B71B0.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7460.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B76B8.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B76DC.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B77D4.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7810.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B7D10.s") From 99b142c11332af8276bc426bea053751421f473e Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 21:16:59 -0500 Subject: [PATCH 42/66] split unknown_0AEE70 into unknown_0B3D40 --- .../unknown_0AEE70/func_800B4A40.s | 46 +++++++- .../unknown_0AEE70/func_800B653C.s | 14 ++- src/unknown_0AEE70.c | 111 ------------------ src/unknown_0B3D40.c | 76 ++++++++++++ 4 files changed, 128 insertions(+), 119 deletions(-) create mode 100644 src/unknown_0B3D40.c diff --git a/asm/non_matchings/unknown_0AEE70/func_800B4A40.s b/asm/non_matchings/unknown_0AEE70/func_800B4A40.s index 9389eb08..41aa2573 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B4A40.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B4A40.s @@ -1,3 +1,12 @@ +.late_rodata +glabel jpt_800E8CAC +.word L800B4BA4, L800B4BC8, L800B4BC8, L800B4BBC, L800B4BC8, L800B4BC8, L800B4BC8, L800B4BC8, L800B4BC8, L800B4BC8, L800B4BC8, L800B4BAC, L800B4BC8, L800B4BB4, L800B4BC8, L800B4BC8, L800B4BC4 +glabel jpt_800E8CF0 +.word L800B4DB0, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DB8, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4D90, L800B4DC4, L800B4DC4, L800B4DC4, L800B4D98, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC0 +glabel jpt_800E8D88 +.word L800B52C4, L800B5E0C, L800B5794, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B4F84, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5AC4, L800B4E38, L800B52C4, L800B57A4, L800B5794, L800B5E0C, L800B4E38, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5D78, L800B4F64, L800B5C8C, L800B5E0C, L800B5E0C, L800B5B48, L800B5E0C, L800B4F44, L800B5E0C, L800B5E0C, L800B4FA4 + +.text glabel func_800B4A40 /* 0B5640 800B4A40 27BDFE48 */ addiu $sp, $sp, -0x1b8 /* 0B5644 800B4A44 AFBF004C */ sw $ra, 0x4c($sp) @@ -88,22 +97,28 @@ glabel func_800B4A40 /* 0B5780 800B4B80 10200011 */ beqz $at, .L800B4BC8 /* 0B5784 800B4B84 256B0001 */ addiu $t3, $t3, 1 /* 0B5788 800B4B88 0018C080 */ sll $t8, $t8, 2 -/* 0B578C 800B4B8C 3C01800F */ lui $at, %hi(D_800E8CAC) # $at, 0x800f +/* 0B578C 800B4B8C 3C01800F */ lui $at, %hi(jpt_800E8CAC) # $at, 0x800f /* 0B5790 800B4B90 00380821 */ addu $at, $at, $t8 -/* 0B5794 800B4B94 8C388CAC */ lw $t8, %lo(D_800E8CAC)($at) +/* 0B5794 800B4B94 8C388CAC */ lw $t8, %lo(jpt_800E8CAC)($at) /* 0B5798 800B4B98 00000000 */ nop /* 0B579C 800B4B9C 03000008 */ jr $t8 /* 0B57A0 800B4BA0 00000000 */ nop +glabel L800B4BA4 /* 0B57A4 800B4BA4 10000008 */ b .L800B4BC8 /* 0B57A8 800B4BA8 24160001 */ li $s6, 1 +glabel L800B4BAC /* 0B57AC 800B4BAC 10000006 */ b .L800B4BC8 /* 0B57B0 800B4BB0 24150001 */ li $s5, 1 +glabel L800B4BB4 /* 0B57B4 800B4BB4 10000004 */ b .L800B4BC8 /* 0B57B8 800B4BB8 24170001 */ li $s7, 1 +glabel L800B4BBC /* 0B57BC 800B4BBC 10000002 */ b .L800B4BC8 /* 0B57C0 800B4BC0 241E0001 */ li $fp, 1 +glabel L800B4BC4 /* 0B57C4 800B4BC4 240C0030 */ li $t4, 48 .L800B4BC8: +glabel L800B4BC8 /* 0B57C8 800B4BC8 91630000 */ lbu $v1, ($t3) /* 0B57CC 800B4BCC 24010020 */ li $at, 32 /* 0B57D0 800B4BD0 1061FFE9 */ beq $v1, $at, .L800B4B78 @@ -225,14 +240,16 @@ glabel func_800B4A40 /* 0B596C 800B4D6C 10200015 */ beqz $at, .L800B4DC4 /* 0B5970 800B4D70 256B0001 */ addiu $t3, $t3, 1 /* 0B5974 800B4D74 0019C880 */ sll $t9, $t9, 2 -/* 0B5978 800B4D78 3C01800F */ lui $at, %hi(D_800E8CF0) # $at, 0x800f +/* 0B5978 800B4D78 3C01800F */ lui $at, %hi(jpt_800E8CF0) # $at, 0x800f /* 0B597C 800B4D7C 00390821 */ addu $at, $at, $t9 -/* 0B5980 800B4D80 8C398CF0 */ lw $t9, %lo(D_800E8CF0)($at) +/* 0B5980 800B4D80 8C398CF0 */ lw $t9, %lo(jpt_800E8CF0)($at) /* 0B5984 800B4D84 00000000 */ nop /* 0B5988 800B4D88 03200008 */ jr $t9 /* 0B598C 800B4D8C 00000000 */ nop +glabel L800B4D90 /* 0B5990 800B4D90 1000000C */ b .L800B4DC4 /* 0B5994 800B4D94 24060001 */ li $a2, 1 +glabel L800B4D98 /* 0B5998 800B4D98 10A00003 */ beqz $a1, .L800B4DA8 /* 0B599C 800B4D9C 00000000 */ nop /* 0B59A0 800B4DA0 10000008 */ b .L800B4DC4 @@ -240,12 +257,16 @@ glabel func_800B4A40 .L800B4DA8: /* 0B59A8 800B4DA8 10000006 */ b .L800B4DC4 /* 0B59AC 800B4DAC 24050001 */ li $a1, 1 +glabel L800B4DB0 /* 0B59B0 800B4DB0 10000004 */ b .L800B4DC4 /* 0B59B4 800B4DB4 24040001 */ li $a0, 1 +glabel L800B4DB8 /* 0B59B8 800B4DB8 10000002 */ b .L800B4DC4 /* 0B59BC 800B4DBC 24050001 */ li $a1, 1 +glabel L800B4DC0 /* 0B59C0 800B4DC0 24040001 */ li $a0, 1 .L800B4DC4: +glabel L800B4DC4 /* 0B59C4 800B4DC4 91630000 */ lbu $v1, ($t3) /* 0B59C8 800B4DC8 24010068 */ li $at, 104 /* 0B59CC 800B4DCC 1061FFE5 */ beq $v1, $at, .L800B4D64 @@ -270,12 +291,13 @@ glabel func_800B4A40 /* 0B5A14 800B4E14 102003FD */ beqz $at, .L800B5E0C /* 0B5A18 800B4E18 A3B3019A */ sb $s3, 0x19a($sp) /* 0B5A1C 800B4E1C 000E7080 */ sll $t6, $t6, 2 -/* 0B5A20 800B4E20 3C01800F */ lui $at, %hi(D_800E8D88) # $at, 0x800f +/* 0B5A20 800B4E20 3C01800F */ lui $at, %hi(jpt_800E8D88) # $at, 0x800f /* 0B5A24 800B4E24 002E0821 */ addu $at, $at, $t6 -/* 0B5A28 800B4E28 8C2E8D88 */ lw $t6, %lo(D_800E8D88)($at) +/* 0B5A28 800B4E28 8C2E8D88 */ lw $t6, %lo(jpt_800E8D88)($at) /* 0B5A2C 800B4E2C 00000000 */ nop /* 0B5A30 800B4E30 01C00008 */ jr $t6 /* 0B5A34 800B4E34 00000000 */ nop +glabel L800B4E38 /* 0B5A38 800B4E38 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B5A3C 800B4E3C 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B5A40 800B4E40 2407000A */ li $a3, 10 @@ -350,6 +372,7 @@ glabel func_800B4A40 /* 0B5B38 800B4F38 AFAE0188 */ sw $t6, 0x188($sp) /* 0B5B3C 800B4F3C 10000046 */ b .L800B5058 /* 0B5B40 800B4F40 AFAF018C */ sw $t7, 0x18c($sp) +glabel L800B4F44 /* 0B5B44 800B4F44 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B5B48 800B4F48 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B5B4C 800B4F4C 2407000A */ li $a3, 10 @@ -358,6 +381,7 @@ glabel func_800B4A40 /* 0B5B58 800B4F58 00009025 */ move $s2, $zero /* 0B5B5C 800B4F5C 10000018 */ b .L800B4FC0 /* 0B5B60 800B4F60 27BF017B */ addiu $ra, $sp, 0x17b +glabel L800B4F64 /* 0B5B64 800B4F64 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B5B68 800B4F68 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B5B6C 800B4F6C 24070008 */ li $a3, 8 @@ -366,6 +390,7 @@ glabel func_800B4A40 /* 0B5B78 800B4F78 00009025 */ move $s2, $zero /* 0B5B7C 800B4F7C 10000010 */ b .L800B4FC0 /* 0B5B80 800B4F80 27BF017B */ addiu $ra, $sp, 0x17b +glabel L800B4F84 /* 0B5B84 800B4F84 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B5B88 800B4F88 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B5B8C 800B4F8C 24070010 */ li $a3, 16 @@ -374,6 +399,7 @@ glabel func_800B4A40 /* 0B5B98 800B4F98 00009025 */ move $s2, $zero /* 0B5B9C 800B4F9C 10000008 */ b .L800B4FC0 /* 0B5BA0 800B4FA0 27BF017B */ addiu $ra, $sp, 0x17b +glabel L800B4FA4 /* 0B5BA4 800B4FA4 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B5BA8 800B4FA8 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B5BAC 800B4FAC 24070010 */ li $a3, 16 @@ -601,6 +627,7 @@ glabel func_800B4A40 /* 0B5EB8 800B52B8 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B5EBC 800B52BC 100002D6 */ b .L800B5E18 /* 0B5EC0 800B52C0 00000000 */ nop +glabel L800B52C4 /* 0B5EC4 800B52C4 3C0F800E */ lui $t7, %hi(D_800E2EF0) # $t7, 0x800e /* 0B5EC8 800B52C8 8DEF2EF0 */ lw $t7, %lo(D_800E2EF0)($t7) /* 0B5ECC 800B52CC 00002825 */ move $a1, $zero @@ -951,10 +978,12 @@ glabel func_800B4A40 /* 0B6388 800B5788 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B638C 800B578C 100001A2 */ b .L800B5E18 /* 0B6390 800B5790 00000000 */ nop +glabel L800B5794 /* 0B6394 800B5794 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B6398 800B5798 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B639C 800B579C 1000019E */ b .L800B5E18 /* 0B63A0 800B57A0 00000000 */ nop +glabel L800B57A4 /* 0B63A4 800B57A4 3C19800E */ lui $t9, %hi(D_800E2EF0) # $t9, 0x800e /* 0B63A8 800B57A8 8F392EF0 */ lw $t9, %lo(D_800E2EF0)($t9) /* 0B63AC 800B57AC 4620A306 */ mov.d $f12, $f20 @@ -1190,6 +1219,7 @@ glabel func_800B4A40 /* 0B66B8 800B5AB8 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B66BC 800B5ABC 100000D6 */ b .L800B5E18 /* 0B66C0 800B5AC0 00000000 */ nop +glabel L800B5AC4 /* 0B66C4 800B5AC4 26310003 */ addiu $s1, $s1, 3 /* 0B66C8 800B5AC8 2401FFFC */ li $at, -4 /* 0B66CC 800B5ACC 02217824 */ and $t7, $s1, $at @@ -1228,6 +1258,7 @@ glabel func_800B4A40 /* 0B673C 800B5B3C 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B6740 800B5B40 100000B5 */ b .L800B5E18 /* 0B6744 800B5B44 00000000 */ nop +glabel L800B5B48 /* 0B6748 800B5B48 26310003 */ addiu $s1, $s1, 3 /* 0B674C 800B5B4C 2401FFFC */ li $at, -4 /* 0B6750 800B5B50 0221C824 */ and $t9, $s1, $at @@ -1320,6 +1351,7 @@ glabel func_800B4A40 /* 0B6880 800B5C80 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B6884 800B5C84 10000064 */ b .L800B5E18 /* 0B6888 800B5C88 00000000 */ nop +glabel L800B5C8C /* 0B688C 800B5C8C 26310003 */ addiu $s1, $s1, 3 /* 0B6890 800B5C90 2401FFFC */ li $at, -4 /* 0B6894 800B5C94 02217824 */ and $t7, $s1, $at @@ -1386,6 +1418,7 @@ glabel func_800B4A40 /* 0B696C 800B5D6C 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B6970 800B5D70 10000029 */ b .L800B5E18 /* 0B6974 800B5D74 00000000 */ nop +glabel L800B5D78 /* 0B6978 800B5D78 1080000A */ beqz $a0, .L800B5DA4 /* 0B697C 800B5D7C 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B6980 800B5D80 26310003 */ addiu $s1, $s1, 3 @@ -1428,6 +1461,7 @@ glabel func_800B4A40 /* 0B6A04 800B5E04 10000004 */ b .L800B5E18 /* 0B6A08 800B5E08 00000000 */ nop .L800B5E0C: +glabel L800B5E0C /* 0B6A0C 800B5E0C 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B6A10 800B5E10 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B6A14 800B5E14 00000000 */ nop diff --git a/asm/non_matchings/unknown_0AEE70/func_800B653C.s b/asm/non_matchings/unknown_0AEE70/func_800B653C.s index 5e6c866e..1a0e2d90 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B653C.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B653C.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8E58 +.word L800B6658, L800B6740, L800B6614, L800B6634, L800B66CC + +.text glabel func_800B653C /* 0B713C 800B653C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 0B7140 800B6540 AFBF0044 */ sw $ra, 0x44($sp) @@ -35,9 +40,9 @@ glabel func_800B653C /* 0B71BC 800B65BC 2DC10005 */ sltiu $at, $t6, 5 /* 0B71C0 800B65C0 102000AE */ beqz $at, .L800B687C /* 0B71C4 800B65C4 000E7080 */ sll $t6, $t6, 2 -/* 0B71C8 800B65C8 3C01800F */ lui $at, %hi(D_800E8E58) # $at, 0x800f +/* 0B71C8 800B65C8 3C01800F */ lui $at, %hi(jpt_800E8E58) # $at, 0x800f /* 0B71CC 800B65CC 002E0821 */ addu $at, $at, $t6 -/* 0B71D0 800B65D0 8C2E8E58 */ lw $t6, %lo(D_800E8E58)($at) +/* 0B71D0 800B65D0 8C2E8E58 */ lw $t6, %lo(jpt_800E8E58)($at) /* 0B71D4 800B65D4 00000000 */ nop /* 0B71D8 800B65D8 01C00008 */ jr $t6 /* 0B71DC 800B65DC 00000000 */ nop @@ -56,6 +61,7 @@ glabel func_800B653C /* 0B7208 800B6608 00000000 */ nop /* 0B720C 800B660C 1000009C */ b .L800B6880 /* 0B7210 800B6610 02A02025 */ move $a0, $s5 +glabel L800B6614 /* 0B7214 800B6614 3C018012 */ lui $at, %hi(D_80127CB4) # $at, 0x8012 /* 0B7218 800B6618 3C058012 */ lui $a1, %hi(D_8011FFF0) # $a1, 0x8012 /* 0B721C 800B661C 94A57CD0 */ lhu $a1, %lo(D_80127CD0)($a1) @@ -64,6 +70,7 @@ glabel func_800B653C /* 0B7228 800B6628 00001825 */ move $v1, $zero /* 0B722C 800B662C 1000009D */ b .L800B68A4 /* 0B7230 800B6630 24A5FFF0 */ addiu $a1, %lo(D_8011FFF0) # addiu $a1, $a1, -0x10 +glabel L800B6634 /* 0B7234 800B6634 240F0001 */ li $t7, 1 /* 0B7238 800B6638 3C018012 */ lui $at, %hi(D_80127CB4) # $at, 0x8012 /* 0B723C 800B663C 3C058012 */ lui $a1, %hi(D_8011FFF0) # $a1, 0x8012 @@ -73,6 +80,7 @@ glabel func_800B653C /* 0B724C 800B664C 24030001 */ li $v1, 1 /* 0B7250 800B6650 10000094 */ b .L800B68A4 /* 0B7254 800B6654 24A5FFF0 */ addiu $a1, %lo(D_8011FFF0) # addiu $a1, $a1, -0x10 +glabel L800B6658 /* 0B7258 800B6658 8FD80000 */ lw $t8, ($fp) /* 0B725C 800B665C 92040000 */ lbu $a0, ($s0) /* 0B7260 800B6660 92050001 */ lbu $a1, 1($s0) @@ -103,6 +111,7 @@ glabel func_800B653C /* 0B72C0 800B66C0 96440000 */ lhu $a0, ($s2) /* 0B72C4 800B66C4 10000077 */ b .L800B68A4 /* 0B72C8 800B66C8 24A5FFF0 */ addiu $a1, %lo(D_8011FFF0) # addiu $a1, $a1, -0x10 +glabel L800B66CC /* 0B72CC 800B66CC 8FC90000 */ lw $t1, ($fp) /* 0B72D0 800B66D0 92040000 */ lbu $a0, ($s0) /* 0B72D4 800B66D4 92050001 */ lbu $a1, 1($s0) @@ -133,6 +142,7 @@ glabel func_800B653C /* 0B7334 800B6734 96440000 */ lhu $a0, ($s2) /* 0B7338 800B6738 1000005A */ b .L800B68A4 /* 0B733C 800B673C 24A5FFF0 */ addiu $a1, %lo(D_8011FFF0) # addiu $a1, $a1, -0x10 +glabel L800B6740 /* 0B7340 800B6740 8FCC0000 */ lw $t4, ($fp) /* 0B7344 800B6744 02A02025 */ move $a0, $s5 /* 0B7348 800B6748 15800008 */ bnez $t4, .L800B676C diff --git a/src/unknown_0AEE70.c b/src/unknown_0AEE70.c index e6365b64..45e78427 100644 --- a/src/unknown_0AEE70.c +++ b/src/unknown_0AEE70.c @@ -49,62 +49,6 @@ const u32 D_800E8BDC[] = { const FloatLiteral D_800E8BF0 = { 0.1f }; const FloatLiteral D_800E8BF4 = { 0.01f }; -// This is probably another file boundary. -const DoubleLiteral D_800E8BF8 = { 0.0 }; - -const char D_800E8C00[] = "0123456789abcdefghijklmnopqrstuvwxyz"; -const char D_800E8C28[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -const char D_800E8C50[] = ""; -const char D_800E8C54[] = "(null)"; -const char D_800E8C5C[] = "(nil)"; -const char D_800E8C64[] = "*** diPrintf Error *** ---> Out of string space. (Print less text!)\n"; - -// Jump table in func_800B4A40 -const u32 D_800E8CAC[] = { - 0x800B4BA4, 0x800B4BC8, 0x800B4BC8, 0x800B4BBC, - 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, - 0x800B4BC8, 0x800B4BC8, 0x800B4BC8, 0x800B4BAC, - 0x800B4BC8, 0x800B4BB4, 0x800B4BC8, 0x800B4BC8, - 0x800B4BC4 -}; - -// Jump table in func_800B4A40 -const u32 D_800E8CF0[] = { - 0x800B4DB0, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DB8, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4D90, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4D98, 0x800B4DC4, 0x800B4DC4, 0x800B4DC4, - 0x800B4DC4, 0x800B4DC0 -}; - -// Jump table in func_800B4A40 -const u32 D_800E8D88[] = { - 0x800B52C4, 0x800B5E0C, 0x800B5794, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B4F84, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5E0C, 0x800B5AC4, 0x800B4E38, - 0x800B52C4, 0x800B57A4, 0x800B5794, 0x800B5E0C, - 0x800B4E38, 0x800B5E0C, 0x800B5E0C, 0x800B5E0C, - 0x800B5E0C, 0x800B5D78, 0x800B4F64, 0x800B5C8C, - 0x800B5E0C, 0x800B5E0C, 0x800B5B48, 0x800B5E0C, - 0x800B4F44, 0x800B5E0C, 0x800B5E0C, 0x800B4FA4 -}; - -// Jump table in func_800B653C -const u32 D_800E8E58[] = { - 0x800B6658, 0x800B6740, 0x800B6614, 0x800B6634, - 0x800B66CC -}; - /*********************************/ /************ .data ************/ @@ -231,40 +175,6 @@ s32 D_800E2EC4[10] = { }; s32 D_800E2EEC = 0x100; -s32 D_800E2EF0 = 0; - -u8 D_800E2EF4[196] = { - 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0F, 0x11, 0x15, 0x17, 0x1F, 0x21, 0x27, 0x29, 0x2B, 0x2D, 0x2F, - 0x31, 0x33, 0x35, 0x38, 0x3A, 0x3F, 0x41, 0x43, 0x45, 0x48, 0x4A, 0x4B, 0x4D, 0x50, 0x52, 0x56, - 0x58, 0x5B, 0x5D, 0x62, 0x64, 0x68, 0x6A, 0x6F, 0x71, 0x76, 0x78, 0x7D, 0x7F, 0x84, 0x86, 0x8B, - 0x8D, 0x92, 0x94, 0x96, 0x98, 0x9A, 0x9D, 0xA2, 0xA5, 0xA9, 0xAB, 0xB0, 0xB3, 0xB8, 0x00, 0x01, - 0x00, 0x09, 0x0B, 0x11, 0x13, 0x19, 0x1B, 0x21, 0x23, 0x29, 0x2B, 0x31, 0x33, 0x38, 0x3A, 0x41, - 0x43, 0x49, 0x4B, 0x4C, 0x4E, 0x53, 0x55, 0x5B, 0x5D, 0x62, 0x64, 0x6B, 0x6D, 0x73, 0x75, 0x7B, - 0x7D, 0x83, 0x85, 0x8B, 0x8D, 0x93, 0x95, 0x9B, 0x9D, 0xA3, 0xA5, 0xAA, 0xAC, 0xB2, 0xB4, 0xBC, - 0xBE, 0xC4, 0xC6, 0xCC, 0xCE, 0xD3, 0xD5, 0xD7, 0xD9, 0xDC, 0xDE, 0xE0, 0xE2, 0xE7, 0xE9, 0xEF, - 0x00, 0x01, 0x03, 0x08, 0x09, 0x0F, 0x11, 0x16, 0x18, 0x1D, 0x1F, 0x24, 0x26, 0x28, 0x2A, 0x2F, - 0x31, 0x36, 0x38, 0x39, 0x3B, 0x3D, 0x3F, 0x43, 0x45, 0x46, 0x48, 0x4F, 0x51, 0x56, 0x58, 0x5D, - 0x5F, 0x64, 0x66, 0x6B, 0x6C, 0x70, 0x72, 0x77, 0x79, 0x7C, 0x7E, 0x82, 0x84, 0x89, 0x8B, 0x92, - 0x94, 0x99, 0x9B, 0xA0, 0xA2, 0xA6, 0xA8, 0xAB, 0xAD, 0xAE, 0xB0, 0xB3, 0xB5, 0xB9, 0xB5, 0xB9, - 0x00, 0x00, 0x00, 0x00 -}; - -// Fast3D (F3DDKR) display list -u32 D_800E2FB8[] = { - 0xE7000000, 0x00000000, - 0xBA001402, 0x00000000, - 0xBA001001, 0x00000000, - 0xBA000E02, 0x00000000, - 0xBA001102, 0x00000000, - 0xBA001301, 0x00000000, - 0xBA000C02, 0x00002000, - 0xBA000903, 0x00000C00, - 0xB9000002, 0x00000000, - 0xB900031D, 0x00504240, - 0xFB000000, 0xFFFFFFFF, - 0xFA000000, 0x00000000, - 0xB8000000, 0x00000000 -}; /*******************************/ @@ -388,24 +298,3 @@ GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B263C.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B26E0.s") GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B2FBC.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3140.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3240.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3358.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B34B0.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3564.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3740.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3E64.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4668.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B46BC.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4940.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4A08.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4A40.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B5E88.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B5EDC.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B5F78.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B62B4.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B635C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B653C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B695C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B69FC.s") - diff --git a/src/unknown_0B3D40.c b/src/unknown_0B3D40.c new file mode 100644 index 00000000..8fd5c389 --- /dev/null +++ b/src/unknown_0B3D40.c @@ -0,0 +1,76 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800B3140 */ + +#include "types.h" +#include "macros.h" + +/************ .data ************/ + +s32 D_800E2EF0 = 0; + +u8 D_800E2EF4[196] = { + 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0F, 0x11, 0x15, 0x17, 0x1F, 0x21, 0x27, 0x29, 0x2B, 0x2D, 0x2F, + 0x31, 0x33, 0x35, 0x38, 0x3A, 0x3F, 0x41, 0x43, 0x45, 0x48, 0x4A, 0x4B, 0x4D, 0x50, 0x52, 0x56, + 0x58, 0x5B, 0x5D, 0x62, 0x64, 0x68, 0x6A, 0x6F, 0x71, 0x76, 0x78, 0x7D, 0x7F, 0x84, 0x86, 0x8B, + 0x8D, 0x92, 0x94, 0x96, 0x98, 0x9A, 0x9D, 0xA2, 0xA5, 0xA9, 0xAB, 0xB0, 0xB3, 0xB8, 0x00, 0x01, + 0x00, 0x09, 0x0B, 0x11, 0x13, 0x19, 0x1B, 0x21, 0x23, 0x29, 0x2B, 0x31, 0x33, 0x38, 0x3A, 0x41, + 0x43, 0x49, 0x4B, 0x4C, 0x4E, 0x53, 0x55, 0x5B, 0x5D, 0x62, 0x64, 0x6B, 0x6D, 0x73, 0x75, 0x7B, + 0x7D, 0x83, 0x85, 0x8B, 0x8D, 0x93, 0x95, 0x9B, 0x9D, 0xA3, 0xA5, 0xAA, 0xAC, 0xB2, 0xB4, 0xBC, + 0xBE, 0xC4, 0xC6, 0xCC, 0xCE, 0xD3, 0xD5, 0xD7, 0xD9, 0xDC, 0xDE, 0xE0, 0xE2, 0xE7, 0xE9, 0xEF, + 0x00, 0x01, 0x03, 0x08, 0x09, 0x0F, 0x11, 0x16, 0x18, 0x1D, 0x1F, 0x24, 0x26, 0x28, 0x2A, 0x2F, + 0x31, 0x36, 0x38, 0x39, 0x3B, 0x3D, 0x3F, 0x43, 0x45, 0x46, 0x48, 0x4F, 0x51, 0x56, 0x58, 0x5D, + 0x5F, 0x64, 0x66, 0x6B, 0x6C, 0x70, 0x72, 0x77, 0x79, 0x7C, 0x7E, 0x82, 0x84, 0x89, 0x8B, 0x92, + 0x94, 0x99, 0x9B, 0xA0, 0xA2, 0xA6, 0xA8, 0xAB, 0xAD, 0xAE, 0xB0, 0xB3, 0xB5, 0xB9, 0xB5, 0xB9, + 0x00, 0x00, 0x00, 0x00 +}; + +// Fast3D (F3DDKR) display list +u32 D_800E2FB8[] = { + 0xE7000000, 0x00000000, + 0xBA001402, 0x00000000, + 0xBA001001, 0x00000000, + 0xBA000E02, 0x00000000, + 0xBA001102, 0x00000000, + 0xBA001301, 0x00000000, + 0xBA000C02, 0x00002000, + 0xBA000903, 0x00000C00, + 0xB9000002, 0x00000000, + 0xB900031D, 0x00504240, + 0xFB000000, 0xFFFFFFFF, + 0xFA000000, 0x00000000, + 0xB8000000, 0x00000000 +}; + +/*******************************/ + +/************ .rodata ************/ + +const char D_800E8C00[] = "0123456789abcdefghijklmnopqrstuvwxyz"; +const char D_800E8C28[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +const char D_800E8C50[] = ""; +const char D_800E8C54[] = "(null)"; +const char D_800E8C5C[] = "(nil)"; +const char D_800E8C64[] = "*** diPrintf Error *** ---> Out of string space. (Print less text!)\n"; + +/*********************************/ + +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3140.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3240.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3358.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B34B0.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3564.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3740.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B3E64.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4668.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B46BC.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4940.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4A08.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B4A40.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B5E88.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B5EDC.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B5F78.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B62B4.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B635C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B653C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B695C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0AEE70/func_800B69FC.s") From 12344c75b8f6c2c932b3ba1289e813da74f46369 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 21:20:01 -0500 Subject: [PATCH 43/66] Moved rodata from C to GLOBAL_ASM in unknown_0AEE70 --- .../unknown_0AEE70/func_800B0010.s | 11 ++++++++++ .../unknown_0AEE70/func_800B03C0.s | 7 +++++++ .../unknown_0AEE70/func_800B1130.s | 9 ++++++++ .../unknown_0AEE70/func_800B2040.s | 14 +++++++++++-- .../unknown_0AEE70/func_800B26E0.s | 7 +++++++ src/unknown_0AEE70.c | 21 +------------------ 6 files changed, 47 insertions(+), 22 deletions(-) diff --git a/asm/non_matchings/unknown_0AEE70/func_800B0010.s b/asm/non_matchings/unknown_0AEE70/func_800B0010.s index 83432b3c..ba972710 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B0010.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B0010.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E8B98 +.double 0.00001525878906 +glabel D_800E8BA0 +.double 0.00001525878906 +glabel D_800E8BA8 +.double 0.00001525878906 +glabel D_800E8BB0 +.double 0.00001525878906 + +.text glabel func_800B0010 /* 0B0C10 800B0010 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0B0C14 800B0014 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_0AEE70/func_800B03C0.s b/asm/non_matchings/unknown_0AEE70/func_800B03C0.s index de934ee8..60a68c6a 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B03C0.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B03C0.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E8BB8 +.double 0.00001525878906 +glabel D_800E8BC0 +.double 0.00001525878906 + +.text glabel func_800B03C0 /* 0B0FC0 800B03C0 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0B0FC4 800B03C4 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_0AEE70/func_800B1130.s b/asm/non_matchings/unknown_0AEE70/func_800B1130.s index bd02c90c..59eb5756 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B1130.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B1130.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E8BC8 +.double 0.00001525878906 +glabel D_800E8BD0 +.double 0.00001525878906 +glabel D_800E8BD8 +.float 0.1 + +.text glabel func_800B1130 /* 0B1D30 800B1130 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0B1D34 800B1134 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_0AEE70/func_800B2040.s b/asm/non_matchings/unknown_0AEE70/func_800B2040.s index 3a2ec19f..2a641f99 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B2040.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B2040.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8BDC +.word L800B2250, L800B20E0, L800B2138, L800B2190, L800B21E8 + +.text glabel func_800B2040 /* 0B2C40 800B2040 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0B2C44 800B2044 AFBF0014 */ sw $ra, 0x14($sp) @@ -14,9 +19,9 @@ glabel func_800B2040 /* 0B2C6C 800B206C 2C410005 */ sltiu $at, $v0, 5 /* 0B2C70 800B2070 10200077 */ beqz $at, .L800B2250 /* 0B2C74 800B2074 00027080 */ sll $t6, $v0, 2 -/* 0B2C78 800B2078 3C01800F */ lui $at, %hi(D_800E8BDC) # $at, 0x800f +/* 0B2C78 800B2078 3C01800F */ lui $at, %hi(jpt_800E8BDC) # $at, 0x800f /* 0B2C7C 800B207C 002E0821 */ addu $at, $at, $t6 -/* 0B2C80 800B2080 8C2E8BDC */ lw $t6, %lo(D_800E8BDC)($at) +/* 0B2C80 800B2080 8C2E8BDC */ lw $t6, %lo(jpt_800E8BDC)($at) /* 0B2C84 800B2084 00000000 */ nop /* 0B2C88 800B2088 01C00008 */ jr $t6 /* 0B2C8C 800B208C 00000000 */ nop @@ -42,6 +47,7 @@ glabel func_800B2040 /* 0B2CD4 800B20D4 AC2F2CB8 */ sw $t7, %lo(D_800E2CB8)($at) /* 0B2CD8 800B20D8 1000005D */ b .L800B2250 /* 0B2CDC 800B20DC A4A0002C */ sh $zero, 0x2c($a1) +glabel L800B20E0 /* 0B2CE0 800B20E0 3C02800E */ lui $v0, %hi(D_800E2CA0) # $v0, 0x800e /* 0B2CE4 800B20E4 8C422CA0 */ lw $v0, %lo(D_800E2CA0)($v0) /* 0B2CE8 800B20E8 00000000 */ nop @@ -65,6 +71,7 @@ glabel func_800B2040 /* 0B2D2C 800B212C AC392CA0 */ sw $t9, %lo(D_800E2CA0)($at) /* 0B2D30 800B2130 10000047 */ b .L800B2250 /* 0B2D34 800B2134 A4A0002C */ sh $zero, 0x2c($a1) +glabel L800B2138 /* 0B2D38 800B2138 3C02800E */ lui $v0, %hi(D_800E2CAC) # $v0, 0x800e /* 0B2D3C 800B213C 8C422CAC */ lw $v0, %lo(D_800E2CAC)($v0) /* 0B2D40 800B2140 00000000 */ nop @@ -88,6 +95,7 @@ glabel func_800B2040 /* 0B2D84 800B2184 AC292CAC */ sw $t1, %lo(D_800E2CAC)($at) /* 0B2D88 800B2188 10000031 */ b .L800B2250 /* 0B2D8C 800B218C A4A0002C */ sh $zero, 0x2c($a1) +glabel L800B2190 /* 0B2D90 800B2190 3C02800E */ lui $v0, %hi(D_800E2CC4) # $v0, 0x800e /* 0B2D94 800B2194 8C422CC4 */ lw $v0, %lo(D_800E2CC4)($v0) /* 0B2D98 800B2198 00000000 */ nop @@ -111,6 +119,7 @@ glabel func_800B2040 /* 0B2DDC 800B21DC AC2B2CC4 */ sw $t3, %lo(D_800E2CC4)($at) /* 0B2DE0 800B21E0 1000001B */ b .L800B2250 /* 0B2DE4 800B21E4 A4A0002C */ sh $zero, 0x2c($a1) +glabel L800B21E8 /* 0B2DE8 800B21E8 3C0C800E */ lui $t4, %hi(D_800E2CD0) # $t4, 0x800e /* 0B2DEC 800B21EC 8D8C2CD0 */ lw $t4, %lo(D_800E2CD0)($t4) /* 0B2DF0 800B21F0 00A02025 */ move $a0, $a1 @@ -139,6 +148,7 @@ glabel func_800B2040 /* 0B2E48 800B2248 AC4F0000 */ sw $t7, ($v0) /* 0B2E4C 800B224C A4A0002C */ sh $zero, 0x2c($a1) .L800B2250: +glabel L800B2250 /* 0B2E50 800B2250 8FBF0014 */ lw $ra, 0x14($sp) .L800B2254: /* 0B2E54 800B2254 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_0AEE70/func_800B26E0.s b/asm/non_matchings/unknown_0AEE70/func_800B26E0.s index 6a4798b0..91327220 100644 --- a/asm/non_matchings/unknown_0AEE70/func_800B26E0.s +++ b/asm/non_matchings/unknown_0AEE70/func_800B26E0.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E8BF0 +.float 0.1 +glabel D_800E8BF4 +.float 0.01 + +.text glabel func_800B26E0 /* 0B32E0 800B26E0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 0B32E4 800B26E4 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/src/unknown_0AEE70.c b/src/unknown_0AEE70.c index 45e78427..13357142 100644 --- a/src/unknown_0AEE70.c +++ b/src/unknown_0AEE70.c @@ -8,7 +8,7 @@ const char D_800E87F0[] = "\nMaximum limit of %d lens flare switches, per level, has been exceeded."; -// This is probably a file boundary. +// File Boundary! Not sure where the split occurs. Need to split when that gets figured out. const DoubleLiteral D_800E8838 = { 0.0 }; const char D_800E8840[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; @@ -30,25 +30,6 @@ const char D_800E8AD8[] = "\n\nCan't deallocate space for unknown particle type. const char D_800E8B10[] = "\nError :: trigger %x has no reference to point %x"; const char D_800E8B44[] = "\nError :: particle %x is not indexed correctly in trigger list %x (%d >> %p)"; -const DoubleLiteral D_800E8B98 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BA0 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BA8 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BB0 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BB8 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BC0 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BC8 = { 0.00001525878906 }; -const DoubleLiteral D_800E8BD0 = { 0.00001525878906 }; -const FloatLiteral D_800E8BD8 = { 0.1f }; - -// Jump table in func_800B2040 -const u32 D_800E8BDC[] = { - 0x800B2250, 0x800B20E0, 0x800B2138, 0x800B2190, - 0x800B21E8 -}; - -const FloatLiteral D_800E8BF0 = { 0.1f }; -const FloatLiteral D_800E8BF4 = { 0.01f }; - /*********************************/ /************ .data ************/ From e1e96469a356834b96a211ba826c743f3f7478e2 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 21:33:12 -0500 Subject: [PATCH 44/66] split unknown_0B8920 into unknown_0C4800 --- .../unknown_0B8920/func_800C45A4.s | 15 +- src/unknown_0B8920.c | 518 +----------------- src/unknown_0C4800.c | 515 +++++++++++++++++ 3 files changed, 529 insertions(+), 519 deletions(-) create mode 100644 src/unknown_0C4800.c diff --git a/asm/non_matchings/unknown_0B8920/func_800C45A4.s b/asm/non_matchings/unknown_0B8920/func_800C45A4.s index 02e0c6d5..0c0c54fe 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C45A4.s +++ b/asm/non_matchings/unknown_0B8920/func_800C45A4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E9360 +.word L800C4A88, L800C4A78, L800C4AD0, L800C4AE8, L800C4ADC, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4AE8, L800C4A6C + +.text glabel func_800C45A4 /* 0C51A4 800C45A4 27BDFF78 */ addiu $sp, $sp, -0x88 /* 0C51A8 800C45A8 AFB50028 */ sw $s5, 0x28($sp) @@ -308,19 +313,22 @@ glabel func_800C45A4 /* 0C5648 800C4A48 2DE10018 */ sltiu $at, $t7, 0x18 /* 0C564C 800C4A4C 10200026 */ beqz $at, .L800C4AE8 /* 0C5650 800C4A50 000F7880 */ sll $t7, $t7, 2 -/* 0C5654 800C4A54 3C01800F */ lui $at, %hi(D_800E9360) # $at, 0x800f +/* 0C5654 800C4A54 3C01800F */ lui $at, %hi(jpt_800E9360) # $at, 0x800f /* 0C5658 800C4A58 002F0821 */ addu $at, $at, $t7 -/* 0C565C 800C4A5C 8C2F9360 */ lw $t7, %lo(D_800E9360)($at) +/* 0C565C 800C4A5C 8C2F9360 */ lw $t7, %lo(jpt_800E9360)($at) /* 0C5660 800C4A60 00000000 */ nop /* 0C5664 800C4A64 01E00008 */ jr $t7 /* 0C5668 800C4A68 00000000 */ nop +glabel L800C4A6C /* 0C566C 800C4A6C 956E0024 */ lhu $t6, 0x24($t3) /* 0C5670 800C4A70 10000050 */ b .L800C4BB4 /* 0C5674 800C4A74 020E8021 */ addu $s0, $s0, $t6 +glabel L800C4A78 /* 0C5678 800C4A78 95790022 */ lhu $t9, 0x22($t3) /* 0C567C 800C4A7C 86500020 */ lh $s0, 0x20($s2) /* 0C5680 800C4A80 1000004C */ b .L800C4BB4 /* 0C5684 800C4A84 03F9F821 */ addu $ra, $ra, $t9 +glabel L800C4A88 /* 0C5688 800C4A88 864F0020 */ lh $t7, 0x20($s2) /* 0C568C 800C4A8C 95620026 */ lhu $v0, 0x26($t3) /* 0C5690 800C4A90 020F7023 */ subu $t6, $s0, $t7 @@ -341,13 +349,16 @@ glabel func_800C45A4 /* 0C56C4 800C4AC4 03198023 */ subu $s0, $t8, $t9 /* 0C56C8 800C4AC8 1000003A */ b .L800C4BB4 /* 0C56CC 800C4ACC 00000000 */ nop +glabel L800C4AD0 /* 0C56D0 800C4AD0 956F0022 */ lhu $t7, 0x22($t3) /* 0C56D4 800C4AD4 10000037 */ b .L800C4BB4 /* 0C56D8 800C4AD8 03EFF821 */ addu $ra, $ra, $t7 +glabel L800C4ADC /* 0C56DC 800C4ADC 86500020 */ lh $s0, 0x20($s2) /* 0C56E0 800C4AE0 10000034 */ b .L800C4BB4 /* 0C56E4 800C4AE4 00000000 */ nop .L800C4AE8: +glabel L800C4AE8 /* 0C56E8 800C4AE8 956E0024 */ lhu $t6, 0x24($t3) /* 0C56EC 800C4AEC 10000031 */ b .L800C4BB4 /* 0C56F0 800C4AF0 020E8021 */ addu $s0, $s0, $t6 diff --git a/src/unknown_0B8920.c b/src/unknown_0B8920.c index 945947a4..5585f4f1 100644 --- a/src/unknown_0B8920.c +++ b/src/unknown_0B8920.c @@ -5,17 +5,6 @@ #include "macros.h" #include "libultra_internal.h" -#define OS_PIM_STACKSIZE 4096 - -extern u32 __osPiAccessQueueEnabled; //__osPiAccessQueueEnabled -extern OSDevMgr __osPiDevMgr; -extern u8 piThreadStack[OS_PIM_STACKSIZE];//piThreadStack -extern OSThread piThread; //piThread -extern OSMesgQueue piEventQueue; //piEventQueue -extern OSMesg piEventBuf[1]; //piEventBuf -extern OSMesgQueue piAccessQueue; //piAccessQueue -void __osDevMgrMain(void); - /************ .data ************/ s32* D_800E3040 = NULL; @@ -289,44 +278,11 @@ s32 D_800E3678 = 0; s32 D_800E367C = 0; s32 D_800E3680 = 1; + s32 D_800E3684 = 0; // Unused? s32 D_800E3688 = 0; // Unused? s32 D_800E368C = 0; // Unused? -// Fast3D (F3DDKR) display list -u32 D_800E3690[] = { - 0xE7000000, 0x00000000, - 0xBA001001, 0x00000000, - 0xBA000E02, 0x00000000, - 0xB9000002, 0x00000000, - 0xB6000000, 0x00010001, - 0xE7000000, 0x00000000, - 0xB8000000, 0x00000000, - 0xFC5616AC, 0x112CFE7F, - 0xEF000C0F, 0x00504240, - 0xFCFFFFFF, 0xFFFEFB7D, - 0xEF000C0F, 0x00504240 -}; - -s8 D_800E36E8 = 0; - -// Descending powers of 10 -s32 D_800E36EC[9] = { - 1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10 -}; - -s8 D_800E3710[48] = { - 4, 0, 0, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 0, 4, 0, - 0, 4, 1, -4, 1, 1, -4, 1, -2, 2, 1, -2, 1, -1, 4, 1, - -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -OSDevMgr __osPiDevMgr = { 0, NULL, NULL, NULL, NULL, NULL, NULL }; - -u8* D_800E3760 = NULL; -u8* D_800E3764 = NULL; -u8* gzip_inflate_input = NULL; -u8* gzip_inflate_output = NULL; /*******************************/ @@ -382,20 +338,6 @@ const u32 D_800E9330[] = { 0x800C3B88, 0x800C3BA0 }; -// This is probably a file boundary. -const DoubleLiteral D_800E9358 = { 0.0 }; - -// Jump table in func_800C45A4 -const u32 D_800E9360[] = { - 0x800C4A88, 0x800C4A78, 0x800C4AD0, 0x800C4AE8, - 0x800C4ADC, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, - 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, - 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, - 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, - 0x800C4AE8, 0x800C4AE8, 0x800C4AE8, 0x800C4A6C -}; - - /*********************************/ /************ .bss ************/ @@ -406,52 +348,6 @@ extern s8 D_8012A788; extern u8 D_8012A789; extern u16 D_8012A7B6; extern s32* D_8012A7C8; -extern s32 D_8012A7E0; - -/* Size: 0x28 bytes */ -typedef struct unk8012A7E8_24 { - u8 unk00; - u8 unk01; - u8 pad02[0x1A]; - struct unk8012A7E8_24* unk1C; -} unk8012A7E8_24; - -/* Size: 0x28 bytes */ -typedef struct unk8012A7E8 { - s16 unk0; - s16 unk2; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; - s16 unkC; - s16 unkE; - s8 unk10; - s8 unk11; - s8 unk12; - s8 unk13; - s8 unk14; - s8 unk15; - s8 unk16; - s8 unk17; - s8 unk18; - s8 unk19; - s8 unk1A; - s8 unk1B; - s8 unk1C; - s8 unk1D; - u16 unk1E; - s16 unk20; - s16 unk22; - unk8012A7E8_24 *unk24; -} unk8012A7E8; - -extern unk8012A7E8 (*D_8012A7E8)[1]; -extern s32 D_8012A7F0; -extern s8 D_8012A7F4; -extern s32 D_8012AAD8; -extern u32 gzip_num_bits; -extern u32 gzip_bit_buffer; /*****************************/ @@ -660,415 +556,3 @@ s32 func_800C3400(void) { GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3440.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3564.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C38B4.s") - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3C00.s") -#else - -extern u32* D_8012A7E4; -void func_800C3C00(void){ - s32 i; - D_8012A7E4 = func_80076C58(44); - D_8012A7E0 = *(D_8012A7E4++); - for(i = 0; i< D_8012A7E0; i++){ - D_8012A7E0[] - } -} -#endif - - -void func_800C4164(s32 arg0) { - D_8012A7F0 = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C4170.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C422C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C42EC.s") - -void func_800C4384(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - (*D_8012A7E8)[0].unk14 = arg0; - (*D_8012A7E8)[0].unk15 = arg1; - (*D_8012A7E8)[0].unk16 = arg2; - (*D_8012A7E8)[0].unk17 = arg3; - (*D_8012A7E8)[0].unk1C = arg4; -} - -void func_800C43CC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - (*D_8012A7E8)[0].unk18 = arg0; - (*D_8012A7E8)[0].unk19 = arg1; - (*D_8012A7E8)[0].unk1A = arg2; - (*D_8012A7E8)[0].unk1B = arg3; -} - -void func_800C45A4(s32, unk8012A7E8*, s32, s32, f32); - -// Unused? -void func_800C4404(s32 arg0, s32 arg1, s32 arg2) { - func_800C45A4(arg0, *D_8012A7E8, arg1, arg2, 1.0f); -} - -// This function is OK -void func_800C4440(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - unk8012A7E8 *temp = &(*D_8012A7E8)[0]; - temp->unk0 = (arg1 == -0x8000) ? temp->unkC >> 1 : arg1; - temp->unk2 = (arg2 == -0x8000) ? temp->unkE >> 1 : arg2; - func_800C45A4(arg0, temp, arg3, arg4, 1.0f); -} - -void func_800C44C0(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - if (arg1 >= 0) { - if(arg1 < 8){ - unk8012A7E8 *temp = &D_8012A7E8[arg1]; - func_800C45A4(arg0, temp, arg2, arg3, 1.0f); - } - } -} - -void func_800C4510(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { - if (arg1 >= 0 && arg1 < 8) { - unk8012A7E8 *temp = &D_8012A7E8[arg1]; - temp->unk0 = (arg2 == -0x8000) ? temp->unkC >> 1 : arg2; - temp->unk2 = (arg3 == -0x8000) ? temp->unkE >> 1 : arg3; - func_800C45A4(arg0, temp, arg4, arg5, 1.0f); - } -} - -// Has a jump table -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C45A4.s") - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C4DA0.s") - -void func_800C4EDC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - if (arg0 > 0 && arg0 < 8) { - // How is temp supposed to be setup for all of these functions? This is driving me nuts. - unk8012A7E8 *temp = &D_8012A7E8[arg0]; // Issue with temp - temp->unk0 = 0; - temp->unk2 = 0; - if (arg1 < arg3) { - temp->unk4 = (s16) arg1; - temp->unk8 = (s16) arg3; - } else { - temp->unk8 = (s16) arg1; - temp->unk4 = (s16) arg3; - } - if (arg2 < arg4) { - temp->unk6 = (s16) arg2; - temp->unkA = (s16) arg4; - } else { - temp->unkA = (s16) arg2; - temp->unk6 = (s16) arg4; - } - temp->unkC = (temp->unk8 - temp->unk4) + 1; - temp->unkE = (temp->unkA - temp->unk6) + 1; - } -} - -void func_800C4F7C(s32 arg0, s32 arg1) { - if (arg0 >= 0 && arg0 < 8) { - unk8012A7E8 *temp = &D_8012A7E8[arg0]; - if (arg1 < D_8012A7E0) { - temp->unk1D = arg1; - } - } -} - - -void func_800C4FBC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - if (arg0 > 0 && arg0 < 8) { - unk8012A7E8 *temp = &D_8012A7E8[arg0]; - temp->unk10 = arg1; - temp->unk11 = arg2; - temp->unk12 = arg3; - temp->unk13 = arg4; - } -} - -void func_800C5000(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { - unk8012A7E8 *temp; - if (arg0 <= 0 || arg0 >= 8) { - return; - } - temp = &D_8012A7E8[arg0]; - temp->unk14 = arg1; - temp->unk15 = arg2; - temp->unk16 = arg3; - temp->unk17 = arg4; - temp->unk1C = arg5; -} - -void func_800C5050(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - unk8012A7E8 *temp; - if (arg0 <= 0 || arg0 >= 8) { - return; - } - temp = &D_8012A7E8[arg0]; // Issue with temp - temp->unk18 = arg1; - temp->unk19 = arg2; - temp->unk1A = arg3; - temp->unk1B = arg4; -} - -// Unused? -void func_800C5094(s32 arg0, s32 arg1, s32 arg2) { - unk8012A7E8 *temp; - if (arg0 <= 0 || arg0 >= 8) { - return; - } - temp = &D_8012A7E8[arg0]; // Issue with temp - temp->unk20 += arg1; - temp->unk22 += arg2; -} - -// Unused? -void func_800C50D8(s32 arg0) { - unk8012A7E8 *temp; - if (arg0 <= 0 || arg0 >= 8) { - return; - } - temp = &D_8012A7E8[arg0]; // Issue with temp - temp->unk20 = 0; - temp->unk22 = 0; -} - -// Unused? -// This function is OK -void func_800C510C(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - func_800C5168(arg0, (*D_8012A7E8)[arg0].unk0, (*D_8012A7E8)[arg0].unk2, arg1, arg2, arg3); -} - - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5168.s") -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5494.s") -#else -void func_800C5494(s32 arg0){ - unk8012A7E8 *tmp2 = &(*D_8012A7E8)[arg0]; - unk8012A7E8_24 *tmp = tmp2->unk24; - if(tmp == NULL) - return; - - while(tmp){ - tmp->unk01 = 255; - tmp = tmp->unk1C; - } - tmp2->unk24 = NULL; -} - -void func_800C54E8(s32 arg0, s16* arg1, u16 arg2, u16 arg3){ - s16 t4; - s16 a3 = arg3; - if(arg1 == 0 || (*D_8012A7E8)[arg0].unk19 == 255) - return; - t4 = arg1[6]; - switch(arg3){ - case 4: //L800C55E4; - arg1[6] = 0; - arg1[7] = 0; - return; - case 1: //L800C554C; - a3 = arg3*1; - break; - case 2: //L800C5564; - default: //L800C5564; - break; - - } - arg1[6] += arg2; - arg1[7] += a3; -} -#endif - - -void func_800C55F4(s32 arg0) { - (*D_8012A7E8)[arg0].unk1E |= 0x8000; -} - -void func_800C5620(s32 arg0) { - (*D_8012A7E8)[arg0].unk1E &= 0x7FFF; -} - -// Unused? -void func_800C564C(s32 arg0) { - (*D_8012A7E8)[arg0].unk1E |= 0x0001; -} - -// Unused? -void func_800C5678(s32 arg0) { - (*D_8012A7E8)[arg0].unk1E &= 0xFFFE; -} - -// Unused? -void func_800C56A4(s32 arg0) { - (*D_8012A7E8)[arg0].unk1E |= 0x4000; -} - -void func_800C56D0(s32 arg0) { - (*D_8012A7E8)[arg0].unk1E &= 0xBFFF; -} - -void func_800C56FC(s32 arg0, s32 arg1, s32 arg2) { - s32 i; - - if (D_800E36E8 != 0) { - D_8012A7F4--; - if (D_8012A7F4 == 0) { - func_8009E9A8(); - D_800E36E8 = 0; - } - } - - for(i = 1; i < 8; i++) { - if ((*D_8012A7E8)[i].unk1E & 0x8000) { - if ((*D_8012A7E8)[i].unk1E & 0x4000) { - func_800C5B58(arg0, arg1, arg2, i); - } else { - func_800C5B58(arg0, 0, 0, i); - } - } - } -} - -#if 1 -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C580C.s") -#else - -// sprintf like function, but only for decimal integers (%d). -void func_800C580C(char** outString, s32 number) { - char digit; - s32 i; - s32 hasDigit; // boolean - s32 div; - - // Check for a negative number - if (number < 0) { - **outString = '-'; - number = -number; - (*outString)++; - } - - // Loop through digit places. - for(i = 0; i < 9; i++){ - hasDigit = 0; - digit = '0'; - if (number >= D_800E36EC[i]) { - div = number / D_800E36EC[i]; - hasDigit = 1; - digit = '0' + div; - number -= div * D_800E36EC[i]; - } - if (hasDigit) { - **outString = digit; - (*outString)++; - } - } - - // One's digit place - **outString = '0' + number; - (*outString)++; -} -#endif - -//GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5AA0.s") -void func_800C5AA0(Gfx **dlist, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - u32 temp_v0 = func_8007A520(); - if (arg3 >= 0 && arg1 < (temp_v0 & 0xFFFF) && arg4 >= 0 && arg2 < (temp_v0 >> 16)) { - if (arg1 < 0) { - arg1 = 0; - } - if (arg2 < 0) { - arg2 = 0; - } - gDPFillRectangle((*dlist)++, arg1, arg2, arg3, arg4); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5B58.s") - -void func_800C580C(char**, s32); - -void func_800C5F60(unsigned char *input, char *output, s32 number) { - while (*input != '\0') { - if ('~' == *input) { // ~ is equivalent to a %d. - // output the number as part of the string - func_800C580C(&output, number); - input++; - } else { - *output = *input; - input++; - output++; - } - } - *output = '\0'; // null terminator -} - -void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt) -{ - u32 savedMask; - OSPri oldPri; - OSPri myPri; - if (!__osPiDevMgr.active) - { - osCreateMesgQueue(cmdQ, cmdBuf, cmdMsgCnt); - osCreateMesgQueue(&piEventQueue, (OSMesg*)&piEventBuf, 1); - if (!__osPiAccessQueueEnabled) - __osPiCreateAccessQueue(); - osSetEventMesg(OS_EVENT_PI, &piEventQueue, (OSMesg)0x22222222); - oldPri = -1; - myPri = osGetThreadPri(NULL); - if (myPri < pri) - { - oldPri = myPri; - osSetThreadPri(NULL, pri); - } - savedMask = __osDisableInt(); - __osPiDevMgr.active = 1; - __osPiDevMgr.thread = &piThread; - __osPiDevMgr.cmdQueue = cmdQ; - __osPiDevMgr.evtQueue = &piEventQueue; - __osPiDevMgr.acsQueue = &piAccessQueue; - __osPiDevMgr.dma = osPiRawStartDma; - __osPiDevMgr.edma = osEPiRawStartDma; - - osCreateThread(&piThread, 0, __osDevMgrMain, &__osPiDevMgr, &piThreadStack[OS_PIM_STACKSIZE], pri); - osStartThread(&piThread); - __osRestoreInt(savedMask); - if (oldPri != -1) - { - osSetThreadPri(NULL, oldPri); - } - } -} - - -void func_800C6170(void) { - D_800E3760 = func_80070C9C(0x2800, 0xFF); - D_800E3764 = func_80070C9C(0x10, 0xFF); -} - -// Returns the little-endian value from a byte array. -s32 byteswap32(u8* arg0) { - s32 value; - value = *arg0++; - value |= (*arg0++ << 8); - value |= (*arg0++ << 16); - value |= (*arg0++ << 24); - return value; -} - -s32 func_800C61DC(s32 arg0, s32 arg1) { - func_80076E68(arg0, D_800E3764, arg1, 8); - return byteswap32(D_800E3764); -} - -s32 gzip_inflate_block(void); - -u8* func_800C6218(u8* arg0, u8* arg1) { - gzip_inflate_input = arg0 + 5; // The compression header is 5 bytes. - gzip_inflate_output = arg1; - gzip_num_bits = 0; - gzip_bit_buffer = 0; - while(gzip_inflate_block() != 0) {} // Keep calling gzip_inflate_block() until it returns 0. - return arg1; -} - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/gzip_huft_build.s") diff --git a/src/unknown_0C4800.c b/src/unknown_0C4800.c new file mode 100644 index 00000000..f0f25f09 --- /dev/null +++ b/src/unknown_0C4800.c @@ -0,0 +1,515 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800C3C00 */ + +#include "types.h" +#include "macros.h" +#include "libultra_internal.h" + +#define OS_PIM_STACKSIZE 4096 + +extern u32 __osPiAccessQueueEnabled; //__osPiAccessQueueEnabled +extern OSDevMgr __osPiDevMgr; +extern u8 piThreadStack[OS_PIM_STACKSIZE];//piThreadStack +extern OSThread piThread; //piThread +extern OSMesgQueue piEventQueue; //piEventQueue +extern OSMesg piEventBuf[1]; //piEventBuf +extern OSMesgQueue piAccessQueue; //piAccessQueue +void __osDevMgrMain(void); + +/************ .data ************/ + +// Fast3D (F3DDKR) display list +u32 D_800E3690[] = { + 0xE7000000, 0x00000000, + 0xBA001001, 0x00000000, + 0xBA000E02, 0x00000000, + 0xB9000002, 0x00000000, + 0xB6000000, 0x00010001, + 0xE7000000, 0x00000000, + 0xB8000000, 0x00000000, + 0xFC5616AC, 0x112CFE7F, + 0xEF000C0F, 0x00504240, + 0xFCFFFFFF, 0xFFFEFB7D, + 0xEF000C0F, 0x00504240 +}; + +s8 D_800E36E8 = 0; + +// Descending powers of 10 +s32 D_800E36EC[9] = { + 1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10 +}; + +s8 D_800E3710[48] = { + 4, 0, 0, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 0, 4, 0, + 0, 4, 1, -4, 1, 1, -4, 1, -2, 2, 1, -2, 1, -1, 4, 1, + -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +OSDevMgr __osPiDevMgr = { 0, NULL, NULL, NULL, NULL, NULL, NULL }; + +u8* D_800E3760 = NULL; +u8* D_800E3764 = NULL; +u8* gzip_inflate_input = NULL; +u8* gzip_inflate_output = NULL; + +/*******************************/ + +extern s32 D_8012A7E0; + +/* Size: 0x28 bytes */ +typedef struct unk8012A7E8_24 { + u8 unk00; + u8 unk01; + u8 pad02[0x1A]; + struct unk8012A7E8_24* unk1C; +} unk8012A7E8_24; + +/* Size: 0x28 bytes */ +typedef struct unk8012A7E8 { + s16 unk0; + s16 unk2; + s16 unk4; + s16 unk6; + s16 unk8; + s16 unkA; + s16 unkC; + s16 unkE; + s8 unk10; + s8 unk11; + s8 unk12; + s8 unk13; + s8 unk14; + s8 unk15; + s8 unk16; + s8 unk17; + s8 unk18; + s8 unk19; + s8 unk1A; + s8 unk1B; + s8 unk1C; + s8 unk1D; + u16 unk1E; + s16 unk20; + s16 unk22; + unk8012A7E8_24 *unk24; +} unk8012A7E8; + +extern unk8012A7E8 (*D_8012A7E8)[1]; +extern s32 D_8012A7F0; +extern s8 D_8012A7F4; +extern s32 D_8012AAD8; +extern u32 gzip_num_bits; +extern u32 gzip_bit_buffer; + + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3C00.s") +#else + +extern u32* D_8012A7E4; +void func_800C3C00(void){ + s32 i; + D_8012A7E4 = func_80076C58(44); + D_8012A7E0 = *(D_8012A7E4++); + for(i = 0; i< D_8012A7E0; i++){ + D_8012A7E0[] + } +} +#endif + + +void func_800C4164(s32 arg0) { + D_8012A7F0 = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C4170.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C422C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C42EC.s") + +void func_800C4384(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + (*D_8012A7E8)[0].unk14 = arg0; + (*D_8012A7E8)[0].unk15 = arg1; + (*D_8012A7E8)[0].unk16 = arg2; + (*D_8012A7E8)[0].unk17 = arg3; + (*D_8012A7E8)[0].unk1C = arg4; +} + +void func_800C43CC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + (*D_8012A7E8)[0].unk18 = arg0; + (*D_8012A7E8)[0].unk19 = arg1; + (*D_8012A7E8)[0].unk1A = arg2; + (*D_8012A7E8)[0].unk1B = arg3; +} + +void func_800C45A4(s32, unk8012A7E8*, s32, s32, f32); + +// Unused? +void func_800C4404(s32 arg0, s32 arg1, s32 arg2) { + func_800C45A4(arg0, *D_8012A7E8, arg1, arg2, 1.0f); +} + +void func_800C4440(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + unk8012A7E8 *temp = &(*D_8012A7E8)[0]; + temp->unk0 = (arg1 == -0x8000) ? temp->unkC >> 1 : arg1; + temp->unk2 = (arg2 == -0x8000) ? temp->unkE >> 1 : arg2; + func_800C45A4(arg0, temp, arg3, arg4, 1.0f); +} + +void func_800C44C0(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { + if (arg1 >= 0) { + if(arg1 < 8){ + unk8012A7E8 *temp = &D_8012A7E8[arg1]; + func_800C45A4(arg0, temp, arg2, arg3, 1.0f); + } + } +} + +void func_800C4510(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { + if (arg1 >= 0 && arg1 < 8) { + unk8012A7E8 *temp = &D_8012A7E8[arg1]; + temp->unk0 = (arg2 == -0x8000) ? temp->unkC >> 1 : arg2; + temp->unk2 = (arg3 == -0x8000) ? temp->unkE >> 1 : arg3; + func_800C45A4(arg0, temp, arg4, arg5, 1.0f); + } +} + +// Has a jump table +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C45A4.s") + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C4DA0.s") + +void func_800C4EDC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + if (arg0 > 0 && arg0 < 8) { + // How is temp supposed to be setup for all of these functions? This is driving me nuts. + unk8012A7E8 *temp = &D_8012A7E8[arg0]; // Issue with temp + temp->unk0 = 0; + temp->unk2 = 0; + if (arg1 < arg3) { + temp->unk4 = (s16) arg1; + temp->unk8 = (s16) arg3; + } else { + temp->unk8 = (s16) arg1; + temp->unk4 = (s16) arg3; + } + if (arg2 < arg4) { + temp->unk6 = (s16) arg2; + temp->unkA = (s16) arg4; + } else { + temp->unkA = (s16) arg2; + temp->unk6 = (s16) arg4; + } + temp->unkC = (temp->unk8 - temp->unk4) + 1; + temp->unkE = (temp->unkA - temp->unk6) + 1; + } +} + +void func_800C4F7C(s32 arg0, s32 arg1) { + if (arg0 >= 0 && arg0 < 8) { + unk8012A7E8 *temp = &D_8012A7E8[arg0]; + if (arg1 < D_8012A7E0) { + temp->unk1D = arg1; + } + } +} + + +void func_800C4FBC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + if (arg0 > 0 && arg0 < 8) { + unk8012A7E8 *temp = &D_8012A7E8[arg0]; + temp->unk10 = arg1; + temp->unk11 = arg2; + temp->unk12 = arg3; + temp->unk13 = arg4; + } +} + +void func_800C5000(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { + unk8012A7E8 *temp; + if (arg0 <= 0 || arg0 >= 8) { + return; + } + temp = &D_8012A7E8[arg0]; + temp->unk14 = arg1; + temp->unk15 = arg2; + temp->unk16 = arg3; + temp->unk17 = arg4; + temp->unk1C = arg5; +} + +void func_800C5050(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + unk8012A7E8 *temp; + if (arg0 <= 0 || arg0 >= 8) { + return; + } + temp = &D_8012A7E8[arg0]; // Issue with temp + temp->unk18 = arg1; + temp->unk19 = arg2; + temp->unk1A = arg3; + temp->unk1B = arg4; +} + +// Unused? +void func_800C5094(s32 arg0, s32 arg1, s32 arg2) { + unk8012A7E8 *temp; + if (arg0 <= 0 || arg0 >= 8) { + return; + } + temp = &D_8012A7E8[arg0]; // Issue with temp + temp->unk20 += arg1; + temp->unk22 += arg2; +} + +// Unused? +void func_800C50D8(s32 arg0) { + unk8012A7E8 *temp; + if (arg0 <= 0 || arg0 >= 8) { + return; + } + temp = &D_8012A7E8[arg0]; // Issue with temp + temp->unk20 = 0; + temp->unk22 = 0; +} + +// Unused? +// This function is OK +void func_800C510C(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { + func_800C5168(arg0, (*D_8012A7E8)[arg0].unk0, (*D_8012A7E8)[arg0].unk2, arg1, arg2, arg3); +} + + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5168.s") +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5494.s") +#else +void func_800C5494(s32 arg0){ + unk8012A7E8 *tmp2 = &(*D_8012A7E8)[arg0]; + unk8012A7E8_24 *tmp = tmp2->unk24; + if(tmp == NULL) + return; + + while(tmp){ + tmp->unk01 = 255; + tmp = tmp->unk1C; + } + tmp2->unk24 = NULL; +} + +void func_800C54E8(s32 arg0, s16* arg1, u16 arg2, u16 arg3){ + s16 t4; + s16 a3 = arg3; + if(arg1 == 0 || (*D_8012A7E8)[arg0].unk19 == 255) + return; + t4 = arg1[6]; + switch(arg3){ + case 4: //L800C55E4; + arg1[6] = 0; + arg1[7] = 0; + return; + case 1: //L800C554C; + a3 = arg3*1; + break; + case 2: //L800C5564; + default: //L800C5564; + break; + + } + arg1[6] += arg2; + arg1[7] += a3; +} +#endif + + +void func_800C55F4(s32 arg0) { + (*D_8012A7E8)[arg0].unk1E |= 0x8000; +} + +void func_800C5620(s32 arg0) { + (*D_8012A7E8)[arg0].unk1E &= 0x7FFF; +} + +// Unused? +void func_800C564C(s32 arg0) { + (*D_8012A7E8)[arg0].unk1E |= 0x0001; +} + +// Unused? +void func_800C5678(s32 arg0) { + (*D_8012A7E8)[arg0].unk1E &= 0xFFFE; +} + +// Unused? +void func_800C56A4(s32 arg0) { + (*D_8012A7E8)[arg0].unk1E |= 0x4000; +} + +void func_800C56D0(s32 arg0) { + (*D_8012A7E8)[arg0].unk1E &= 0xBFFF; +} + +void func_800C56FC(s32 arg0, s32 arg1, s32 arg2) { + s32 i; + + if (D_800E36E8 != 0) { + D_8012A7F4--; + if (D_8012A7F4 == 0) { + func_8009E9A8(); + D_800E36E8 = 0; + } + } + + for(i = 1; i < 8; i++) { + if ((*D_8012A7E8)[i].unk1E & 0x8000) { + if ((*D_8012A7E8)[i].unk1E & 0x4000) { + func_800C5B58(arg0, arg1, arg2, i); + } else { + func_800C5B58(arg0, 0, 0, i); + } + } + } +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C580C.s") +#else + +// sprintf like function, but only for decimal integers (%d). +void func_800C580C(char** outString, s32 number) { + char digit; + s32 i; + s32 hasDigit; // boolean + s32 div; + + // Check for a negative number + if (number < 0) { + **outString = '-'; + number = -number; + (*outString)++; + } + + // Loop through digit places. + for(i = 0; i < 9; i++){ + hasDigit = 0; + digit = '0'; + if (number >= D_800E36EC[i]) { + div = number / D_800E36EC[i]; + hasDigit = 1; + digit = '0' + div; + number -= div * D_800E36EC[i]; + } + if (hasDigit) { + **outString = digit; + (*outString)++; + } + } + + // One's digit place + **outString = '0' + number; + (*outString)++; +} +#endif + +//GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5AA0.s") +void func_800C5AA0(Gfx **dlist, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + u32 temp_v0 = func_8007A520(); + if (arg3 >= 0 && arg1 < (temp_v0 & 0xFFFF) && arg4 >= 0 && arg2 < (temp_v0 >> 16)) { + if (arg1 < 0) { + arg1 = 0; + } + if (arg2 < 0) { + arg2 = 0; + } + gDPFillRectangle((*dlist)++, arg1, arg2, arg3, arg4); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C5B58.s") + +void func_800C580C(char**, s32); + +void func_800C5F60(unsigned char *input, char *output, s32 number) { + while (*input != '\0') { + if ('~' == *input) { // ~ is equivalent to a %d. + // output the number as part of the string + func_800C580C(&output, number); + input++; + } else { + *output = *input; + input++; + output++; + } + } + *output = '\0'; // null terminator +} + +void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt) +{ + u32 savedMask; + OSPri oldPri; + OSPri myPri; + if (!__osPiDevMgr.active) + { + osCreateMesgQueue(cmdQ, cmdBuf, cmdMsgCnt); + osCreateMesgQueue(&piEventQueue, (OSMesg*)&piEventBuf, 1); + if (!__osPiAccessQueueEnabled) + __osPiCreateAccessQueue(); + osSetEventMesg(OS_EVENT_PI, &piEventQueue, (OSMesg)0x22222222); + oldPri = -1; + myPri = osGetThreadPri(NULL); + if (myPri < pri) + { + oldPri = myPri; + osSetThreadPri(NULL, pri); + } + savedMask = __osDisableInt(); + __osPiDevMgr.active = 1; + __osPiDevMgr.thread = &piThread; + __osPiDevMgr.cmdQueue = cmdQ; + __osPiDevMgr.evtQueue = &piEventQueue; + __osPiDevMgr.acsQueue = &piAccessQueue; + __osPiDevMgr.dma = osPiRawStartDma; + __osPiDevMgr.edma = osEPiRawStartDma; + + osCreateThread(&piThread, 0, __osDevMgrMain, &__osPiDevMgr, &piThreadStack[OS_PIM_STACKSIZE], pri); + osStartThread(&piThread); + __osRestoreInt(savedMask); + if (oldPri != -1) + { + osSetThreadPri(NULL, oldPri); + } + } +} + + +void func_800C6170(void) { + D_800E3760 = func_80070C9C(0x2800, 0xFF); + D_800E3764 = func_80070C9C(0x10, 0xFF); +} + +// Returns the little-endian value from a byte array. +s32 byteswap32(u8* arg0) { + s32 value; + value = *arg0++; + value |= (*arg0++ << 8); + value |= (*arg0++ << 16); + value |= (*arg0++ << 24); + return value; +} + +s32 func_800C61DC(s32 arg0, s32 arg1) { + func_80076E68(arg0, D_800E3764, arg1, 8); + return byteswap32(D_800E3764); +} + +s32 gzip_inflate_block(void); + +u8* func_800C6218(u8* arg0, u8* arg1) { + gzip_inflate_input = arg0 + 5; // The compression header is 5 bytes. + gzip_inflate_output = arg1; + gzip_num_bits = 0; + gzip_bit_buffer = 0; + while(gzip_inflate_block() != 0) {} // Keep calling gzip_inflate_block() until it returns 0. + return arg1; +} + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/gzip_huft_build.s") From 88030792e92ee2277831dd4bbea972364497425e Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 21:44:56 -0500 Subject: [PATCH 45/66] split unknown_0B8920 into unknown_0C0D70 --- .../unknown_0B8920/func_800C01D8.s | 16 +- .../unknown_0B8920/func_800C0494.s | 13 +- .../unknown_0B8920/func_800C05C8.s | 20 +- .../unknown_0B8920/func_800C1EE8.s | 5 + .../unknown_0B8920/func_800C38B4.s | 19 +- src/unknown_0B8920.c | 296 ------------------ src/unknown_0C0D70.c | 272 ++++++++++++++++ 7 files changed, 337 insertions(+), 304 deletions(-) create mode 100644 src/unknown_0C0D70.c diff --git a/asm/non_matchings/unknown_0B8920/func_800C01D8.s b/asm/non_matchings/unknown_0B8920/func_800C01D8.s index 9ac29611..576a2ec8 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C01D8.s +++ b/asm/non_matchings/unknown_0B8920/func_800C01D8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E92D0 +.word L800C0310, L800C0320, L800C0370, L800C03C0, L800C03D0, L800C0420, L800C0470 + +.text glabel func_800C01D8 /* 0C0DD8 800C01D8 3C0E800E */ lui $t6, %hi(D_800E31A0) # $t6, 0x800e /* 0C0DDC 800C01DC 8DCE31A0 */ lw $t6, %lo(D_800E31A0)($t6) @@ -74,16 +79,18 @@ glabel func_800C01D8 /* 0C0EEC 800C02EC 10200062 */ beqz $at, .L800C0478 /* 0C0EF0 800C02F0 A0AD0000 */ sb $t5, ($a1) /* 0C0EF4 800C02F4 000E7080 */ sll $t6, $t6, 2 -/* 0C0EF8 800C02F8 3C01800F */ lui $at, %hi(D_800E92D0) # $at, 0x800f +/* 0C0EF8 800C02F8 3C01800F */ lui $at, %hi(jpt_800E92D0) # $at, 0x800f /* 0C0EFC 800C02FC 002E0821 */ addu $at, $at, $t6 -/* 0C0F00 800C0300 8C2E92D0 */ lw $t6, %lo(D_800E92D0)($at) +/* 0C0F00 800C0300 8C2E92D0 */ lw $t6, %lo(jpt_800E92D0)($at) /* 0C0F04 800C0304 00000000 */ nop /* 0C0F08 800C0308 01C00008 */ jr $t6 /* 0C0F0C 800C030C 00000000 */ nop +glabel L800C0310 /* 0C0F10 800C0310 0C0301E0 */ jal func_800C0780 /* 0C0F14 800C0314 00000000 */ nop /* 0C0F18 800C0318 10000057 */ b .L800C0478 /* 0C0F1C 800C031C 00000000 */ nop +glabel L800C0320 /* 0C0F20 800C0320 3C02800E */ lui $v0, %hi(D_800E32D0) # $v0, 0x800e /* 0C0F24 800C0324 3C0F800E */ lui $t7, %hi(D_800E32A0) # $t7, 0x800e /* 0C0F28 800C0328 3C18800E */ lui $t8, %hi(D_800E32AC) # $t8, 0x800e @@ -104,6 +111,7 @@ glabel func_800C01D8 /* 0C0F64 800C0364 24060008 */ li $a2, 8 /* 0C0F68 800C0368 10000043 */ b .L800C0478 /* 0C0F6C 800C036C 00000000 */ nop +glabel L800C0370 /* 0C0F70 800C0370 3C02800E */ lui $v0, %hi(D_800E32D0) # $v0, 0x800e /* 0C0F74 800C0374 3C08800E */ lui $t0, %hi(D_800E32A0) # $t0, 0x800e /* 0C0F78 800C0378 3C09800E */ lui $t1, %hi(D_800E32AC) # $t1, 0x800e @@ -124,10 +132,12 @@ glabel func_800C01D8 /* 0C0FB4 800C03B4 24060008 */ li $a2, 8 /* 0C0FB8 800C03B8 1000002F */ b .L800C0478 /* 0C0FBC 800C03BC 00000000 */ nop +glabel L800C03C0 /* 0C0FC0 800C03C0 0C030575 */ jal func_800C15D4 /* 0C0FC4 800C03C4 00000000 */ nop /* 0C0FC8 800C03C8 1000002B */ b .L800C0478 /* 0C0FCC 800C03CC 00000000 */ nop +glabel L800C03D0 /* 0C0FD0 800C03D0 3C02800E */ lui $v0, %hi(D_800E34F8) # $v0, 0x800e /* 0C0FD4 800C03D4 3C0B800E */ lui $t3, %hi(D_800E349C) # $t3, 0x800e /* 0C0FD8 800C03D8 3C0C800E */ lui $t4, %hi(D_800E3440) # $t4, 0x800e @@ -148,6 +158,7 @@ glabel func_800C01D8 /* 0C1014 800C0414 24060050 */ li $a2, 80 /* 0C1018 800C0418 10000017 */ b .L800C0478 /* 0C101C 800C041C 00000000 */ nop +glabel L800C0420 /* 0C1020 800C0420 3C02800E */ lui $v0, %hi(D_800E3338) # $v0, 0x800e /* 0C1024 800C0424 3C0E800E */ lui $t6, %hi(D_800E330C) # $t6, 0x800e /* 0C1028 800C0428 3C0F800E */ lui $t7, %hi(D_800E3318) # $t7, 0x800e @@ -168,6 +179,7 @@ glabel func_800C01D8 /* 0C1064 800C0464 24060006 */ li $a2, 6 /* 0C1068 800C0468 10000003 */ b .L800C0478 /* 0C106C 800C046C 00000000 */ nop +glabel L800C0470 /* 0C1070 800C0470 0C030990 */ jal func_800C2640 /* 0C1074 800C0474 00000000 */ nop .L800C0478: diff --git a/asm/non_matchings/unknown_0B8920/func_800C0494.s b/asm/non_matchings/unknown_0B8920/func_800C0494.s index 0a06d3ac..8017b168 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C0494.s +++ b/asm/non_matchings/unknown_0B8920/func_800C0494.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E92EC +.word L800C056C, L800C0580, L800C0580, L800C0594, L800C0580, L800C0580, L800C05A8 + +.text glabel func_800C0494 /* 0C1094 800C0494 3C03800E */ lui $v1, %hi(D_800E31A4) # $v1, 0x800e /* 0C1098 800C0498 246331A4 */ addiu $v1, %lo(D_800E31A4) # addiu $v1, $v1, 0x31a4 @@ -52,27 +57,31 @@ glabel func_800C0494 /* 0C1148 800C0548 2D610007 */ sltiu $at, $t3, 7 /* 0C114C 800C054C 1020001A */ beqz $at, .L800C05B8 /* 0C1150 800C0550 000B5880 */ sll $t3, $t3, 2 -/* 0C1154 800C0554 3C01800F */ lui $at, %hi(D_800E92EC) # $at, 0x800f +/* 0C1154 800C0554 3C01800F */ lui $at, %hi(jpt_800E92EC) # $at, 0x800f /* 0C1158 800C0558 002B0821 */ addu $at, $at, $t3 -/* 0C115C 800C055C 8C2B92EC */ lw $t3, %lo(D_800E92EC)($at) +/* 0C115C 800C055C 8C2B92EC */ lw $t3, %lo(jpt_800E92EC)($at) /* 0C1160 800C0560 00000000 */ nop /* 0C1164 800C0564 01600008 */ jr $t3 /* 0C1168 800C0568 00000000 */ nop +glabel L800C056C /* 0C116C 800C056C 0C03020D */ jal func_800C0834 /* 0C1170 800C0570 00000000 */ nop /* 0C1174 800C0574 3C03800E */ lui $v1, %hi(D_800E31AC) # $v1, 0x800e /* 0C1178 800C0578 1000000F */ b .L800C05B8 /* 0C117C 800C057C 246331AC */ addiu $v1, %lo(D_800E31AC) # addiu $v1, $v1, 0x31ac +glabel L800C0580 /* 0C1180 800C0580 0C03044C */ jal func_800C1130 /* 0C1184 800C0584 00000000 */ nop /* 0C1188 800C0588 3C03800E */ lui $v1, %hi(D_800E31AC) # $v1, 0x800e /* 0C118C 800C058C 1000000A */ b .L800C05B8 /* 0C1190 800C0590 246331AC */ addiu $v1, %lo(D_800E31AC) # addiu $v1, $v1, 0x31ac +glabel L800C0594 /* 0C1194 800C0594 0C0307BA */ jal func_800C1EE8 /* 0C1198 800C0598 00000000 */ nop /* 0C119C 800C059C 3C03800E */ lui $v1, %hi(D_800E31AC) # $v1, 0x800e /* 0C11A0 800C05A0 10000005 */ b .L800C05B8 /* 0C11A4 800C05A4 246331AC */ addiu $v1, %lo(D_800E31AC) # addiu $v1, $v1, 0x31ac +glabel L800C05A8 /* 0C11A8 800C05A8 0C0309E8 */ jal func_800C27A0 /* 0C11AC 800C05AC 00000000 */ nop /* 0C11B0 800C05B0 3C03800E */ lui $v1, %hi(D_800E31AC) # $v1, 0x800e diff --git a/asm/non_matchings/unknown_0B8920/func_800C05C8.s b/asm/non_matchings/unknown_0B8920/func_800C05C8.s index ea38afa7..37b63e40 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C05C8.s +++ b/asm/non_matchings/unknown_0B8920/func_800C05C8.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E9308 +.float 1.4 +glabel D_800E930C +.float 1.2 +glabel jpt_800E9310 +.word L800C0680, L800C0694, L800C06A8, L800C06BC, L800C06D0, L800C06E4, L800C06F8 + +.text glabel func_800C05C8 /* 0C11C8 800C05C8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0C11CC 800C05CC 3C0E800E */ lui $t6, %hi(D_800E31AC) # $t6, 0x800e @@ -41,42 +50,49 @@ glabel func_800C05C8 /* 0C125C 800C065C 2F010007 */ sltiu $at, $t8, 7 /* 0C1260 800C0660 10200028 */ beqz $at, .L800C0704 /* 0C1264 800C0664 0018C080 */ sll $t8, $t8, 2 -/* 0C1268 800C0668 3C01800F */ lui $at, %hi(D_800E9310) # $at, 0x800f +/* 0C1268 800C0668 3C01800F */ lui $at, %hi(jpt_800E9310) # $at, 0x800f /* 0C126C 800C066C 00380821 */ addu $at, $at, $t8 -/* 0C1270 800C0670 8C389310 */ lw $t8, %lo(D_800E9310)($at) +/* 0C1270 800C0670 8C389310 */ lw $t8, %lo(jpt_800E9310)($at) /* 0C1274 800C0674 00000000 */ nop /* 0C1278 800C0678 03000008 */ jr $t8 /* 0C127C 800C067C 00000000 */ nop +glabel L800C0680 /* 0C1280 800C0680 02002025 */ move $a0, $s0 /* 0C1284 800C0684 0C030282 */ jal func_800C0A08 /* 0C1288 800C0688 02202825 */ move $a1, $s1 /* 0C128C 800C068C 1000001E */ b .L800C0708 /* 0C1290 800C0690 02002025 */ move $a0, $s0 +glabel L800C0694 /* 0C1294 800C0694 02002025 */ move $a0, $s0 /* 0C1298 800C0698 0C0304F9 */ jal func_800C13E4 /* 0C129C 800C069C 02202825 */ move $a1, $s1 /* 0C12A0 800C06A0 10000019 */ b .L800C0708 /* 0C12A4 800C06A4 02002025 */ move $a0, $s0 +glabel L800C06A8 /* 0C12A8 800C06A8 02002025 */ move $a0, $s0 /* 0C12AC 800C06AC 0C030537 */ jal func_800C14DC /* 0C12B0 800C06B0 02202825 */ move $a1, $s1 /* 0C12B4 800C06B4 10000014 */ b .L800C0708 /* 0C12B8 800C06B8 02002025 */ move $a0, $s0 +glabel L800C06BC /* 0C12BC 800C06BC 02002025 */ move $a0, $s0 /* 0C12C0 800C06C0 0C03089D */ jal func_800C2274 /* 0C12C4 800C06C4 02202825 */ move $a1, $s1 /* 0C12C8 800C06C8 1000000F */ b .L800C0708 /* 0C12CC 800C06CC 02002025 */ move $a0, $s0 +glabel L800C06D0 /* 0C12D0 800C06D0 02002025 */ move $a0, $s0 /* 0C12D4 800C06D4 0C0308FE */ jal func_800C23F8 /* 0C12D8 800C06D8 02202825 */ move $a1, $s1 /* 0C12DC 800C06DC 1000000A */ b .L800C0708 /* 0C12E0 800C06E0 02002025 */ move $a0, $s0 +glabel L800C06E4 /* 0C12E4 800C06E4 02002025 */ move $a0, $s0 /* 0C12E8 800C06E8 0C030952 */ jal func_800C2548 /* 0C12EC 800C06EC 02202825 */ move $a1, $s1 /* 0C12F0 800C06F0 10000005 */ b .L800C0708 /* 0C12F4 800C06F4 02002025 */ move $a0, $s0 +glabel L800C06F8 /* 0C12F8 800C06F8 02002025 */ move $a0, $s0 /* 0C12FC 800C06FC 0C030A3A */ jal func_800C28E8 /* 0C1300 800C0700 02202825 */ move $a1, $s1 diff --git a/asm/non_matchings/unknown_0B8920/func_800C1EE8.s b/asm/non_matchings/unknown_0B8920/func_800C1EE8.s index 7cfd2e95..75e4cc35 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C1EE8.s +++ b/asm/non_matchings/unknown_0B8920/func_800C1EE8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E932C +.float 1.2 + +.text glabel func_800C1EE8 /* 0C2AE8 800C1EE8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 0C2AEC 800C1EEC 3C03800E */ lui $v1, %hi(D_800E31B0) # $v1, 0x800e diff --git a/asm/non_matchings/unknown_0B8920/func_800C38B4.s b/asm/non_matchings/unknown_0B8920/func_800C38B4.s index 841ded4e..8563d063 100644 --- a/asm/non_matchings/unknown_0B8920/func_800C38B4.s +++ b/asm/non_matchings/unknown_0B8920/func_800C38B4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E9330 +.word L800C3958, L800C3984, L800C3A30, L800C3AA8, L800C3ADC, L800C3B00, L800C3B2C, L800C3B50, L800C3B88, L800C3BA0 + +.text glabel func_800C38B4 /* 0C44B4 800C38B4 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 0C44B8 800C38B8 AFB3002C */ sw $s3, 0x2c($sp) @@ -35,12 +40,13 @@ glabel func_800C38B4 /* 0C4534 800C3934 2DE1000A */ sltiu $at, $t7, 0xa /* 0C4538 800C3938 1020009E */ beqz $at, .L800C3BB4 /* 0C453C 800C393C 000F7880 */ sll $t7, $t7, 2 -/* 0C4540 800C3940 3C01800F */ lui $at, %hi(D_800E9330) # $at, 0x800f +/* 0C4540 800C3940 3C01800F */ lui $at, %hi(jpt_800E9330) # $at, 0x800f /* 0C4544 800C3944 002F0821 */ addu $at, $at, $t7 -/* 0C4548 800C3948 8C2F9330 */ lw $t7, %lo(D_800E9330)($at) +/* 0C4548 800C3948 8C2F9330 */ lw $t7, %lo(jpt_800E9330)($at) /* 0C454C 800C394C 00000000 */ nop /* 0C4550 800C3950 01E00008 */ jr $t7 /* 0C4554 800C3954 00000000 */ nop +glabel L800C3958 /* 0C4558 800C3958 92050001 */ lbu $a1, 1($s0) /* 0C455C 800C395C 26310002 */ addiu $s1, $s1, 2 /* 0C4560 800C3960 24040001 */ li $a0, 1 @@ -52,6 +58,7 @@ glabel func_800C38B4 /* 0C4578 800C3978 92020000 */ lbu $v0, ($s0) /* 0C457C 800C397C 1000008E */ b .L800C3BB8 /* 0C4580 800C3980 28410003 */ slti $at, $v0, 3 +glabel L800C3984 /* 0C4584 800C3984 92090001 */ lbu $t1, 1($s0) /* 0C4588 800C3988 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 /* 0C458C 800C398C AE490004 */ sw $t1, 4($s2) @@ -97,6 +104,7 @@ glabel func_800C38B4 /* 0C4624 800C3A24 92020000 */ lbu $v0, ($s0) /* 0C4628 800C3A28 10000063 */ b .L800C3BB8 /* 0C462C 800C3A2C 28410003 */ slti $at, $v0, 3 +glabel L800C3A30 /* 0C4630 800C3A30 92050001 */ lbu $a1, 1($s0) /* 0C4634 800C3A34 24040001 */ li $a0, 1 /* 0C4638 800C3A38 AE450014 */ sw $a1, 0x14($s2) @@ -127,6 +135,7 @@ glabel func_800C38B4 /* 0C469C 800C3A9C 92020000 */ lbu $v0, ($s0) /* 0C46A0 800C3AA0 10000045 */ b .L800C3BB8 /* 0C46A4 800C3AA4 28410003 */ slti $at, $v0, 3 +glabel L800C3AA8 /* 0C46A8 800C3AA8 920C0001 */ lbu $t4, 1($s0) /* 0C46AC 800C3AAC 00000000 */ nop /* 0C46B0 800C3AB0 15800003 */ bnez $t4, .L800C3AC0 @@ -142,6 +151,7 @@ glabel func_800C38B4 /* 0C46D0 800C3AD0 92020000 */ lbu $v0, ($s0) /* 0C46D4 800C3AD4 10000038 */ b .L800C3BB8 /* 0C46D8 800C3AD8 28410003 */ slti $at, $v0, 3 +glabel L800C3ADC /* 0C46DC 800C3ADC 920E0001 */ lbu $t6, 1($s0) /* 0C46E0 800C3AE0 26310002 */ addiu $s1, $s1, 2 /* 0C46E4 800C3AE4 AE4E0028 */ sw $t6, 0x28($s2) @@ -151,6 +161,7 @@ glabel func_800C38B4 /* 0C46F4 800C3AF4 92020000 */ lbu $v0, ($s0) /* 0C46F8 800C3AF8 1000002F */ b .L800C3BB8 /* 0C46FC 800C3AFC 28410003 */ slti $at, $v0, 3 +glabel L800C3B00 /* 0C4700 800C3B00 8E58002C */ lw $t8, 0x2c($s2) /* 0C4704 800C3B04 92190001 */ lbu $t9, 1($s0) /* 0C4708 800C3B08 26310002 */ addiu $s1, $s1, 2 @@ -162,6 +173,7 @@ glabel func_800C38B4 /* 0C4720 800C3B20 92020000 */ lbu $v0, ($s0) /* 0C4724 800C3B24 10000024 */ b .L800C3BB8 /* 0C4728 800C3B28 28410003 */ slti $at, $v0, 3 +glabel L800C3B2C /* 0C472C 800C3B2C 920A0001 */ lbu $t2, 1($s0) /* 0C4730 800C3B30 26310002 */ addiu $s1, $s1, 2 /* 0C4734 800C3B34 AE4A0030 */ sw $t2, 0x30($s2) @@ -171,6 +183,7 @@ glabel func_800C38B4 /* 0C4744 800C3B44 92020000 */ lbu $v0, ($s0) /* 0C4748 800C3B48 1000001B */ b .L800C3BB8 /* 0C474C 800C3B4C 28410003 */ slti $at, $v0, 3 +glabel L800C3B50 /* 0C4750 800C3B50 828C0000 */ lb $t4, ($s4) /* 0C4754 800C3B54 2404003C */ li $a0, 60 /* 0C4758 800C3B58 15800007 */ bnez $t4, .L800C3B78 @@ -186,12 +199,14 @@ glabel func_800C38B4 /* 0C477C 800C3B7C 26310002 */ addiu $s1, $s1, 2 /* 0C4780 800C3B80 1000000C */ b .L800C3BB4 /* 0C4784 800C3B84 26100002 */ addiu $s0, $s0, 2 +glabel L800C3B88 /* 0C4788 800C3B88 92180001 */ lbu $t8, 1($s0) /* 0C478C 800C3B8C 26310002 */ addiu $s1, $s1, 2 /* 0C4790 800C3B90 A2D80000 */ sb $t8, ($s6) /* 0C4794 800C3B94 92020002 */ lbu $v0, 2($s0) /* 0C4798 800C3B98 10000006 */ b .L800C3BB4 /* 0C479C 800C3B9C 26100002 */ addiu $s0, $s0, 2 +glabel L800C3BA0 /* 0C47A0 800C3BA0 92190001 */ lbu $t9, 1($s0) /* 0C47A4 800C3BA4 26310002 */ addiu $s1, $s1, 2 /* 0C47A8 800C3BA8 A2B90000 */ sb $t9, ($s5) diff --git a/src/unknown_0B8920.c b/src/unknown_0B8920.c index 5585f4f1..1990f103 100644 --- a/src/unknown_0B8920.c +++ b/src/unknown_0B8920.c @@ -101,188 +101,6 @@ s32 *D_800E3190 = NULL; s32 *D_800E3194 = NULL; s32 D_800E3198 = 0; s32 D_800E319C = 0; -s32 D_800E31A0 = 0; -s32 D_800E31A4 = 0; -s32 D_800E31A8 = 0; -s32 D_800E31AC = 0; -s32 D_800E31B0 = 0; -s32 D_800E31B4 = 0; -s32 D_800E31B8 = 0; -s32 D_800E31BC = 0; -s32 D_800E31C0 = 0; -s32 D_800E31C4 = 0; -s32 D_800E31C8 = 0; -s32 D_800E31CC = 0; -s32 D_800E31D0[2] = { 0, 0 }; - -// Fast3D (F3DDKR) display list -u32 D_800E31D8[] = { - 0xE7000000, 0x00000000, - 0xBA001402, 0x00000000, - 0xBA001001, 0x00000000, - 0xBA000E02, 0x00000000, - 0xBA001102, 0x00000000, - 0xBA001301, 0x00000000, - 0xBA000C02, 0x00002000, - 0xBA000903, 0x00000C00, - 0xB9000002, 0x00000000, - 0xB900031D, 0x00504340, - 0xB8000000, 0x00000000 -}; - -s16 D_800E3230[28] = { - 0xFE20, 0x0078, 0xFEC0, 0x0078, 0xFF60, 0x0078, 0x0000, 0x0078, - 0x00A0, 0x0078, 0x0140, 0x0078, 0x01E0, 0x0078, 0xFE20, 0xFF88, - 0xFEC0, 0xFF88, 0xFF60, 0xFF88, 0x0000, 0xFF88, 0x00A0, 0xFF88, - 0x0140, 0xFF88, 0x01E0, 0xFF88 -}; - -s16 D_800E3268[28] = { - 0xFF60, 0x0168, 0xFF60, 0x00F0, 0xFF60, 0x0078, 0xFF60, 0x0000, - 0xFF60, 0xFF88, 0xFF60, 0xFF10, 0xFF60, 0xFF10, 0x00A0, 0x0168, - 0x00A0, 0x00F0, 0x00A0, 0x0078, 0x00A0, 0x0000, 0x00A0, 0xFF88, - 0x00A0, 0xFF10, 0x00A0, 0xFF10 -}; - -s8 D_800E32A0[12] = { - 0x00, 0x02, 0x04, 0x0E, 0x10, 0x12, 0x08, 0x0A, - 0x0C, 0x16, 0x18, 0x1A -}; - -s8 D_800E32AC[12] = { - 0x04, 0x06, 0x08, 0x12, 0x14, 0x16, 0x04, 0x06, - 0x08, 0x12, 0x14, 0x16 -}; - -s8 D_800E32B8[24] = { - 0, 3, 1, 1, 3, 4, 1, 4, - 2, 2, 4, 5, 6, 9, 7, 7, - 9, 10, 7, 10, 8, 8, 10, 11 -}; - -s8 D_800E32D0[12] = { - -1, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, -1 -}; - -s16 D_800E32DC[24] = { - 0xFCE0, 0x0078, 0xFE20, 0x0078, 0xFF60, 0x0078, 0x00A0, 0x0078, - 0x01E0, 0x0078, 0x0320, 0x0078, 0xFCE0, 0xFF88, 0xFE20, 0xFF88, - 0xFF60, 0xFF88, 0x00A0, 0xFF88, 0x01E0, 0xFF88, 0x0320, 0xFF88 -}; - -s8 D_800E330C[12] = { - 0, 2, 4, 12, 14, 8, 10, 18, 20, 22, 0, 0 -}; - -s8 D_800E3318[12] = { - 4, 6, 8, 16, 18, 4, 6, 14, 16, 18, 0, 0 -}; - -s8 D_800E3324[20] = { - 0, 1, 3, 1, 3, 4, 1, 4, 2, 5, 7, 8, 5, 8, 6, 6, 8, 9, 0, 0 -}; - -s8 D_800E3338[12] = { - -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0 -}; - -s16 D_800E3344[126] = { - 0xFF60, 0x00A0, 0xFF70, 0x00A0, 0xFF80, 0x00A0, 0xFF90, 0x00A0, - 0xFFA0, 0x00A0, 0xFFB0, 0x00A0, 0xFFC0, 0x00A0, 0xFFD0, 0x00A0, - 0xFFE0, 0x00A0, 0xFFF0, 0x00A0, 0x0000, 0x00A0, 0x0010, 0x00A0, - 0x0020, 0x00A0, 0x0030, 0x00A0, 0x0040, 0x00A0, 0x0050, 0x00A0, - 0x0060, 0x00A0, 0x0070, 0x00A0, 0x0080, 0x00A0, 0x0090, 0x00A0, - 0x00A0, 0x00A0, 0xFF60, 0xFF38, 0xFF70, 0xFF60, 0xFF80, 0xFF74, - 0xFF90, 0xFF7E, 0xFFA0, 0xFF74, 0xFFB0, 0xFF38, 0xFFC0, 0xFF10, - 0xFFD0, 0xFEFC, 0xFFE0, 0xFEF2, 0xFFF0, 0xFEFC, 0x0000, 0xFF24, - 0x0010, 0xFF2E, 0x0020, 0xFF38, 0x0030, 0xFF2E, 0x0040, 0xFF24, - 0x0050, 0xFEFC, 0x0060, 0xFEF2, 0x0070, 0xFEFC, 0x0080, 0xFF24, - 0x0090, 0xFF60, 0x00A0, 0xFF74, 0xFF60, 0xFEE8, 0xFF70, 0xFEE8, - 0xFF80, 0xFEE8, 0xFF90, 0xFEE8, 0xFFA0, 0xFEE8, 0xFFB0, 0xFEE8, - 0xFFC0, 0xFEE8, 0xFFD0, 0xFEE8, 0xFFE0, 0xFEE8, 0xFFF0, 0xFEE8, - 0x0000, 0xFEE8, 0x0010, 0xFEE8, 0x0020, 0xFEE8, 0x0030, 0xFEE8, - 0x0040, 0xFEE8, 0x0050, 0xFEE8, 0x0060, 0xFEE8, 0x0070, 0xFEE8, - 0x0080, 0xFEE8, 0x0090, 0xFEE8, 0x00A0, 0xFEE8 -}; - -s8 D_800E3440[92] = { - 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, - 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x0E, - 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1A, 0x1C, - 0x1E, 0x20, 0x22, 0x24, 0x26, 0x28, 0x1A, 0x1C, - 0x1E, 0x20, 0x22, 0x24, 0x26, 0x28, 0x00, 0x02, - 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x54, 0x56, - 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x0E, 0x10, - 0x12, 0x14, 0x16, 0x18, 0x1A, 0x62, 0x64, 0x66, - 0x68, 0x6A, 0x6C, 0x6E, 0x1A, 0x1C, 0x1E, 0x20, - 0x22, 0x24, 0x26, 0x28, 0x6E, 0x70, 0x72, 0x74, - 0x76, 0x78, 0x7A, 0x7C -}; - -s8 D_800E349C[92] = { - 0x2A, 0x2C, 0x2E, 0x30, 0x32, 0x34, 0x36, 0x38, - 0x54, 0x56, 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, - 0x38, 0x3A, 0x3C, 0x3E, 0x40, 0x42, 0x44, 0x62, - 0x64, 0x66, 0x68, 0x6A, 0x6C, 0x6E, 0x44, 0x46, - 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x52, 0x6E, 0x70, - 0x72, 0x74, 0x76, 0x78, 0x7A, 0x7C, 0x54, 0x56, - 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x54, 0x56, - 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x62, 0x64, - 0x66, 0x68, 0x6A, 0x6C, 0x6E, 0x62, 0x64, 0x66, - 0x68, 0x6A, 0x6C, 0x6E, 0x6E, 0x70, 0x72, 0x74, - 0x76, 0x78, 0x7A, 0x7C, 0x6E, 0x70, 0x72, 0x74, - 0x76, 0x78, 0x7A, 0x7C -}; - -s8 D_800E34F8[92] = { - 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, - 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -s8 D_800E3554[244] = { - 0, 8, 9, 0, 9, 1, 1, 9, 10, 1, 10, 2, 2, 10, 11, 2, - 11, 3, 3, 11, 12, 3, 12, 4, 4, 12, 13, 4, 13, 5, 5, 13, - 14, 5, 14, 6, 6, 14, 15, 6, 15, 7, 0, 7, 8, 0, 8, 1, - 1, 8, 9, 1, 9, 2, 2, 9, 10, 2, 10, 3, 3, 10, 11, 3, - 11, 4, 4, 11, 12, 4, 12, 5, 5, 12, 13, 5, 13, 6, 0, 8, - 9, 0, 9, 1, 1, 9, 10, 1, 10, 2, 2, 10, 11, 2, 11, 3, - 3, 11, 12, 3, 12, 4, 4, 12, 13, 4, 13, 5, 5, 13, 14, 5, - 14, 6, 6, 14, 15, 6, 15, 7, 0, 8, 9, 0, 9, 1, 1, 9, - 10, 1, 10, 2, 2, 10, 11, 2, 11, 3, 3, 11, 12, 3, 12, 4, - 4, 12, 13, 4, 13, 5, 5, 13, 14, 5, 14, 6, 6, 14, 15, 6, - 15, 7, 0, 7, 8, 0, 8, 1, 1, 8, 9, 1, 9, 2, 2, 9, - 10, 2, 10, 3, 3, 10, 11, 3, 11, 4, 4, 11, 12, 4, 12, 5, - 5, 12, 13, 5, 13, 6, 0, 8, 9, 0, 9, 1, 1, 9, 10, 1, - 10, 2, 2, 10, 11, 2, 11, 3, 3, 11, 12, 3, 12, 4, 4, 12, - 13, 4, 13, 5, 5, 13, 14, 5, 14, 6, 6, 14, 15, 6, 15, 7, - 0, 0, 0, 0 -}; - -// Fast3D (F3DDKR) display list -u32 D_800E3648[] = { - 0xE7000000, 0x00000000, - 0xB6000000, 0x00010000, - 0xFCFFFFFF, 0xFFFE793C, - 0xEF080C0F, 0x00504340, - 0xB8000000, 0x00000000 -}; - -s8 D_800E3670 = 0; -s16 D_800E3674 = 0; -s32 D_800E3678 = 0; -s32 D_800E367C = 0; - -s32 D_800E3680 = 1; - -s32 D_800E3684 = 0; // Unused? -s32 D_800E3688 = 0; // Unused? -s32 D_800E368C = 0; // Unused? - /*******************************/ @@ -305,49 +123,12 @@ const FloatLiteral D_800E92BC = { 89128.961f }; const FloatLiteral D_800E92C0 = { 6.5333333f }; const FloatLiteral D_800E92C4 = { 89128.961f }; -// This is probably a file boundary. -const DoubleLiteral D_800E92C8 = { 0.0 }; - -// Jump table in func_800C01D8 -const u32 D_800E92D0[] = { - 0x800C0310, 0x800C0320, 0x800C0370, 0x800C03C0, - 0x800C03D0, 0x800C0420, 0x800C0470 -}; - -// Jump table in func_800C0494 -const u32 D_800E92EC[] = { - 0x800C056C, 0x800C0580, 0x800C0580, 0x800C0594, - 0x800C0580, 0x800C0580, 0x800C05A8 -}; - -const FloatLiteral D_800E9308 = { 1.4f }; -const FloatLiteral D_800E930C = { 1.2f }; - -// Jump table in func_800C05C8 -const u32 D_800E9310[] = { - 0x800C0680, 0x800C0694, 0x800C06A8, 0x800C06BC, - 0x800C06D0, 0x800C06E4, 0x800C06F8 -}; - -const FloatLiteral D_800E932C = { 1.2f }; - -// Jump table in func_800C38B4 -const u32 D_800E9330[] = { - 0x800C3958, 0x800C3984, 0x800C3A30, 0x800C3AA8, - 0x800C3ADC, 0x800C3B00, 0x800C3B2C, 0x800C3B50, - 0x800C3B88, 0x800C3BA0 -}; - /*********************************/ /************ .bss ************/ extern s32 D_8012A0D8; extern s32 D_8012A0DC; -extern s8 D_8012A788; -extern u8 D_8012A789; -extern u16 D_8012A7B6; -extern s32* D_8012A7C8; /*****************************/ @@ -479,80 +260,3 @@ GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800BF524.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800BF634.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800BFE98.s") GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800BFFDC.s") - -void func_800C0170(void) { - D_800E31A0 = 1; -} - -void func_800C0180(void) { - D_800E31A0 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C018C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C01D8.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0494.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C05C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0724.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0780.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0834.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0A08.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0B00.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C1130.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C13E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C14DC.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C15D4.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C1EE8.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2274.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C23F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2548.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2640.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C27A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C28E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C29F0.s") - -void func_800C2AB4(void) { - func_80071140(D_8012A7C8); - D_8012A7B6 = (u16)0; - func_800C5620(6); - func_800C5494(6); -} - - -void func_800C2AF4(s32 arg0) { - D_800E3680 = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2B00.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2D6C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2F1C.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3048.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C30CC.s") - -void func_800C3140(s32 arg0) { - D_800E3674 = arg0; -} - -void func_800C314C(void) { - D_800E3678 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3158.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C31EC.s") - -s32 func_800C3400(void) { - s32 result = 0; - if (D_800E3670 != 0) { - if (D_8012A789 != 0) { - result = 1; - if (D_8012A788 != 0) { - result = 2; - } - } - } - return result; -} - - -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3440.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3564.s") -GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C38B4.s") diff --git a/src/unknown_0C0D70.c b/src/unknown_0C0D70.c new file mode 100644 index 00000000..717f0453 --- /dev/null +++ b/src/unknown_0C0D70.c @@ -0,0 +1,272 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800C0170 */ + +#include "types.h" +#include "macros.h" + +/************ .data ************/ + +s32 D_800E31A0 = 0; +s32 D_800E31A4 = 0; +s32 D_800E31A8 = 0; +s32 D_800E31AC = 0; +s32 D_800E31B0 = 0; +s32 D_800E31B4 = 0; +s32 D_800E31B8 = 0; +s32 D_800E31BC = 0; +s32 D_800E31C0 = 0; +s32 D_800E31C4 = 0; +s32 D_800E31C8 = 0; +s32 D_800E31CC = 0; +s32 D_800E31D0[2] = { 0, 0 }; + +// Fast3D (F3DDKR) display list +u32 D_800E31D8[] = { + 0xE7000000, 0x00000000, + 0xBA001402, 0x00000000, + 0xBA001001, 0x00000000, + 0xBA000E02, 0x00000000, + 0xBA001102, 0x00000000, + 0xBA001301, 0x00000000, + 0xBA000C02, 0x00002000, + 0xBA000903, 0x00000C00, + 0xB9000002, 0x00000000, + 0xB900031D, 0x00504340, + 0xB8000000, 0x00000000 +}; + +s16 D_800E3230[28] = { + 0xFE20, 0x0078, 0xFEC0, 0x0078, 0xFF60, 0x0078, 0x0000, 0x0078, + 0x00A0, 0x0078, 0x0140, 0x0078, 0x01E0, 0x0078, 0xFE20, 0xFF88, + 0xFEC0, 0xFF88, 0xFF60, 0xFF88, 0x0000, 0xFF88, 0x00A0, 0xFF88, + 0x0140, 0xFF88, 0x01E0, 0xFF88 +}; + +s16 D_800E3268[28] = { + 0xFF60, 0x0168, 0xFF60, 0x00F0, 0xFF60, 0x0078, 0xFF60, 0x0000, + 0xFF60, 0xFF88, 0xFF60, 0xFF10, 0xFF60, 0xFF10, 0x00A0, 0x0168, + 0x00A0, 0x00F0, 0x00A0, 0x0078, 0x00A0, 0x0000, 0x00A0, 0xFF88, + 0x00A0, 0xFF10, 0x00A0, 0xFF10 +}; + +s8 D_800E32A0[12] = { + 0x00, 0x02, 0x04, 0x0E, 0x10, 0x12, 0x08, 0x0A, + 0x0C, 0x16, 0x18, 0x1A +}; + +s8 D_800E32AC[12] = { + 0x04, 0x06, 0x08, 0x12, 0x14, 0x16, 0x04, 0x06, + 0x08, 0x12, 0x14, 0x16 +}; + +s8 D_800E32B8[24] = { + 0, 3, 1, 1, 3, 4, 1, 4, + 2, 2, 4, 5, 6, 9, 7, 7, + 9, 10, 7, 10, 8, 8, 10, 11 +}; + +s8 D_800E32D0[12] = { + -1, -1, 0, -1, -1, 0, 0, -1, -1, 0, -1, -1 +}; + +s16 D_800E32DC[24] = { + 0xFCE0, 0x0078, 0xFE20, 0x0078, 0xFF60, 0x0078, 0x00A0, 0x0078, + 0x01E0, 0x0078, 0x0320, 0x0078, 0xFCE0, 0xFF88, 0xFE20, 0xFF88, + 0xFF60, 0xFF88, 0x00A0, 0xFF88, 0x01E0, 0xFF88, 0x0320, 0xFF88 +}; + +s8 D_800E330C[12] = { + 0, 2, 4, 12, 14, 8, 10, 18, 20, 22, 0, 0 +}; + +s8 D_800E3318[12] = { + 4, 6, 8, 16, 18, 4, 6, 14, 16, 18, 0, 0 +}; + +s8 D_800E3324[20] = { + 0, 1, 3, 1, 3, 4, 1, 4, 2, 5, 7, 8, 5, 8, 6, 6, 8, 9, 0, 0 +}; + +s8 D_800E3338[12] = { + -1, -1, 0, -1, 0, 0, -1, 0, -1, -1, 0, 0 +}; + +s16 D_800E3344[126] = { + 0xFF60, 0x00A0, 0xFF70, 0x00A0, 0xFF80, 0x00A0, 0xFF90, 0x00A0, + 0xFFA0, 0x00A0, 0xFFB0, 0x00A0, 0xFFC0, 0x00A0, 0xFFD0, 0x00A0, + 0xFFE0, 0x00A0, 0xFFF0, 0x00A0, 0x0000, 0x00A0, 0x0010, 0x00A0, + 0x0020, 0x00A0, 0x0030, 0x00A0, 0x0040, 0x00A0, 0x0050, 0x00A0, + 0x0060, 0x00A0, 0x0070, 0x00A0, 0x0080, 0x00A0, 0x0090, 0x00A0, + 0x00A0, 0x00A0, 0xFF60, 0xFF38, 0xFF70, 0xFF60, 0xFF80, 0xFF74, + 0xFF90, 0xFF7E, 0xFFA0, 0xFF74, 0xFFB0, 0xFF38, 0xFFC0, 0xFF10, + 0xFFD0, 0xFEFC, 0xFFE0, 0xFEF2, 0xFFF0, 0xFEFC, 0x0000, 0xFF24, + 0x0010, 0xFF2E, 0x0020, 0xFF38, 0x0030, 0xFF2E, 0x0040, 0xFF24, + 0x0050, 0xFEFC, 0x0060, 0xFEF2, 0x0070, 0xFEFC, 0x0080, 0xFF24, + 0x0090, 0xFF60, 0x00A0, 0xFF74, 0xFF60, 0xFEE8, 0xFF70, 0xFEE8, + 0xFF80, 0xFEE8, 0xFF90, 0xFEE8, 0xFFA0, 0xFEE8, 0xFFB0, 0xFEE8, + 0xFFC0, 0xFEE8, 0xFFD0, 0xFEE8, 0xFFE0, 0xFEE8, 0xFFF0, 0xFEE8, + 0x0000, 0xFEE8, 0x0010, 0xFEE8, 0x0020, 0xFEE8, 0x0030, 0xFEE8, + 0x0040, 0xFEE8, 0x0050, 0xFEE8, 0x0060, 0xFEE8, 0x0070, 0xFEE8, + 0x0080, 0xFEE8, 0x0090, 0xFEE8, 0x00A0, 0xFEE8 +}; + +s8 D_800E3440[92] = { + 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, + 0x0E, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x0E, + 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1A, 0x1C, + 0x1E, 0x20, 0x22, 0x24, 0x26, 0x28, 0x1A, 0x1C, + 0x1E, 0x20, 0x22, 0x24, 0x26, 0x28, 0x00, 0x02, + 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x54, 0x56, + 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x0E, 0x10, + 0x12, 0x14, 0x16, 0x18, 0x1A, 0x62, 0x64, 0x66, + 0x68, 0x6A, 0x6C, 0x6E, 0x1A, 0x1C, 0x1E, 0x20, + 0x22, 0x24, 0x26, 0x28, 0x6E, 0x70, 0x72, 0x74, + 0x76, 0x78, 0x7A, 0x7C +}; + +s8 D_800E349C[92] = { + 0x2A, 0x2C, 0x2E, 0x30, 0x32, 0x34, 0x36, 0x38, + 0x54, 0x56, 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, + 0x38, 0x3A, 0x3C, 0x3E, 0x40, 0x42, 0x44, 0x62, + 0x64, 0x66, 0x68, 0x6A, 0x6C, 0x6E, 0x44, 0x46, + 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x52, 0x6E, 0x70, + 0x72, 0x74, 0x76, 0x78, 0x7A, 0x7C, 0x54, 0x56, + 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x54, 0x56, + 0x58, 0x5A, 0x5C, 0x5E, 0x60, 0x62, 0x62, 0x64, + 0x66, 0x68, 0x6A, 0x6C, 0x6E, 0x62, 0x64, 0x66, + 0x68, 0x6A, 0x6C, 0x6E, 0x6E, 0x70, 0x72, 0x74, + 0x76, 0x78, 0x7A, 0x7C, 0x6E, 0x70, 0x72, 0x74, + 0x76, 0x78, 0x7A, 0x7C +}; + +s8 D_800E34F8[92] = { + 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, + 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +s8 D_800E3554[244] = { + 0, 8, 9, 0, 9, 1, 1, 9, 10, 1, 10, 2, 2, 10, 11, 2, + 11, 3, 3, 11, 12, 3, 12, 4, 4, 12, 13, 4, 13, 5, 5, 13, + 14, 5, 14, 6, 6, 14, 15, 6, 15, 7, 0, 7, 8, 0, 8, 1, + 1, 8, 9, 1, 9, 2, 2, 9, 10, 2, 10, 3, 3, 10, 11, 3, + 11, 4, 4, 11, 12, 4, 12, 5, 5, 12, 13, 5, 13, 6, 0, 8, + 9, 0, 9, 1, 1, 9, 10, 1, 10, 2, 2, 10, 11, 2, 11, 3, + 3, 11, 12, 3, 12, 4, 4, 12, 13, 4, 13, 5, 5, 13, 14, 5, + 14, 6, 6, 14, 15, 6, 15, 7, 0, 8, 9, 0, 9, 1, 1, 9, + 10, 1, 10, 2, 2, 10, 11, 2, 11, 3, 3, 11, 12, 3, 12, 4, + 4, 12, 13, 4, 13, 5, 5, 13, 14, 5, 14, 6, 6, 14, 15, 6, + 15, 7, 0, 7, 8, 0, 8, 1, 1, 8, 9, 1, 9, 2, 2, 9, + 10, 2, 10, 3, 3, 10, 11, 3, 11, 4, 4, 11, 12, 4, 12, 5, + 5, 12, 13, 5, 13, 6, 0, 8, 9, 0, 9, 1, 1, 9, 10, 1, + 10, 2, 2, 10, 11, 2, 11, 3, 3, 11, 12, 3, 12, 4, 4, 12, + 13, 4, 13, 5, 5, 13, 14, 5, 14, 6, 6, 14, 15, 6, 15, 7, + 0, 0, 0, 0 +}; + +// Fast3D (F3DDKR) display list +u32 D_800E3648[] = { + 0xE7000000, 0x00000000, + 0xB6000000, 0x00010000, + 0xFCFFFFFF, 0xFFFE793C, + 0xEF080C0F, 0x00504340, + 0xB8000000, 0x00000000 +}; + +s8 D_800E3670 = 0; +s16 D_800E3674 = 0; +s32 D_800E3678 = 0; +s32 D_800E367C = 0; +s32 D_800E3680 = 1; + +/*******************************/ + +/************ .bss ************/ + +extern s8 D_8012A788; +extern u8 D_8012A789; +extern u16 D_8012A7B6; +extern s32* D_8012A7C8; + +/*****************************/ + +void func_800C0170(void) { + D_800E31A0 = 1; +} + +void func_800C0180(void) { + D_800E31A0 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C018C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C01D8.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0494.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C05C8.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0724.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0780.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0834.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0A08.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C0B00.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C1130.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C13E4.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C14DC.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C15D4.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C1EE8.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2274.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C23F8.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2548.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2640.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C27A0.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C28E8.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C29F0.s") + +void func_800C2AB4(void) { + func_80071140(D_8012A7C8); + D_8012A7B6 = (u16)0; + func_800C5620(6); + func_800C5494(6); +} + + +void func_800C2AF4(s32 arg0) { + D_800E3680 = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2B00.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2D6C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C2F1C.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3048.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C30CC.s") + +void func_800C3140(s32 arg0) { + D_800E3674 = arg0; +} + +void func_800C314C(void) { + D_800E3678 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3158.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C31EC.s") + +s32 func_800C3400(void) { + s32 result = 0; + if (D_800E3670 != 0) { + if (D_8012A789 != 0) { + result = 1; + if (D_8012A788 != 0) { + result = 2; + } + } + } + return result; +} + + +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3440.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C3564.s") +GLOBAL_ASM("asm/non_matchings/unknown_0B8920/func_800C38B4.s") From 6ea6204c631b5c2752c819e314be58e26f1abcd1 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Fri, 4 Jun 2021 21:45:46 -0500 Subject: [PATCH 46/66] Moved rodata from C to GLOBAL_ASM in unknown_0B8920 --- .../unknown_0B8920/func_800B82B4.s | 7 +++++++ .../unknown_0B8920/func_800BF634.s | 19 +++++++++++++++++++ src/unknown_0B8920.c | 11 ----------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/asm/non_matchings/unknown_0B8920/func_800B82B4.s b/asm/non_matchings/unknown_0B8920/func_800B82B4.s index fa0f7406..ddd79fb5 100644 --- a/asm/non_matchings/unknown_0B8920/func_800B82B4.s +++ b/asm/non_matchings/unknown_0B8920/func_800B82B4.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E92A0 +.float 10000.0 +glabel D_800E92A4 +.float -10000.0 + +.text glabel func_800B82B4 /* 0B8EB4 800B82B4 27BDFF90 */ addiu $sp, $sp, -0x70 /* 0B8EB8 800B82B8 AFBF0044 */ sw $ra, 0x44($sp) diff --git a/asm/non_matchings/unknown_0B8920/func_800BF634.s b/asm/non_matchings/unknown_0B8920/func_800BF634.s index b5319fca..3ea08062 100644 --- a/asm/non_matchings/unknown_0B8920/func_800BF634.s +++ b/asm/non_matchings/unknown_0B8920/func_800BF634.s @@ -1,3 +1,22 @@ +.late_rodata +glabel D_800E92A8 +.float 6.64 +glabel D_800E92AC +.float 89128.961 +glabel D_800E92B0 +.float 6.5333333 +glabel D_800E92B4 +.float 89128.961 +glabel D_800E92B8 +.float 6.64 +glabel D_800E92BC +.float 89128.961 +glabel D_800E92C0 +.float 6.5333333 +glabel D_800E92C4 +.float 89128.961 + +.text glabel func_800BF634 /* 0C0234 800BF634 3C03800E */ lui $v1, %hi(D_800E3190) # $v1, 0x800e /* 0C0238 800BF638 24633190 */ addiu $v1, %lo(D_800E3190) # addiu $v1, $v1, 0x3190 diff --git a/src/unknown_0B8920.c b/src/unknown_0B8920.c index 1990f103..155b07b4 100644 --- a/src/unknown_0B8920.c +++ b/src/unknown_0B8920.c @@ -112,17 +112,6 @@ const char D_800E91E4[] = "\nError :: can not remove a wave swell object which d const char D_800E9228[] = "\nError :: more than eight swells overlap on column %d."; const char D_800E9260[] = "\nError :: can not add another wave swell, reached limit of %d."; -const FloatLiteral D_800E92A0 = { 10000.0f }; -const FloatLiteral D_800E92A4 = { -10000.0f }; -const FloatLiteral D_800E92A8 = { 6.64f }; -const FloatLiteral D_800E92AC = { 89128.961f }; -const FloatLiteral D_800E92B0 = { 6.5333333f }; -const FloatLiteral D_800E92B4 = { 89128.961f}; -const FloatLiteral D_800E92B8 = { 6.64f }; -const FloatLiteral D_800E92BC = { 89128.961f }; -const FloatLiteral D_800E92C0 = { 6.5333333f }; -const FloatLiteral D_800E92C4 = { 89128.961f }; - /*********************************/ /************ .bss ************/ From af39526564a4f4b69dce21ea3bbf56808a1910d7 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 02:08:35 -0500 Subject: [PATCH 47/66] Moved rodata from C to GLOBAL_ASM in unknown_09F8F0 --- .../unknown_09F8F0/func_8009F034.s | 26 +++++++ .../unknown_09F8F0/func_800A0EB4.s | 17 ++++- .../unknown_09F8F0/func_800A1248.s | 5 ++ .../unknown_09F8F0/func_800A14F0.s | 7 ++ .../unknown_09F8F0/func_800A1E48.s | 5 ++ .../unknown_09F8F0/func_800A277C.s | 29 ++++++++ .../unknown_09F8F0/func_800A3884.s | 5 ++ .../unknown_09F8F0/func_800A5F18.s | 11 +++ .../unknown_09F8F0/func_800A6254.s | 18 ++++- .../unknown_09F8F0/func_800A6E30.s | 14 +++- .../unknown_09F8F0/func_800A7520.s | 11 +++ .../unknown_09F8F0/func_800A8474.s | 20 ++++++ .../unknown_09F8F0/func_800AA600.s | 8 +++ src/unknown_09F8F0.c | 72 ------------------- 14 files changed, 170 insertions(+), 78 deletions(-) diff --git a/asm/non_matchings/unknown_09F8F0/func_8009F034.s b/asm/non_matchings/unknown_09F8F0/func_8009F034.s index da6653b2..81f7bf5f 100644 --- a/asm/non_matchings/unknown_09F8F0/func_8009F034.s +++ b/asm/non_matchings/unknown_09F8F0/func_8009F034.s @@ -1,3 +1,29 @@ +.late_rodata +glabel D_800E86A8 +.double 0.6 +glabel D_800E86B0 +.double 1.2 +glabel D_800E86B8 +.float 263.0 +glabel D_800E86BC +.float 259.0 +glabel D_800E86C0 +.float 265.0 +.word 0 # padding +glabel D_800E86C8 +.double 1.2 +glabel D_800E86D0 +.double 0.6 +glabel D_800E86D8 +.double 1.2 +glabel D_800E86E0 +.double 0.6 +glabel D_800E86E8 +.double 1.2 +glabel D_800E86F0 +.double 0.6 + +.text glabel func_8009F034 /* 09FC34 8009F034 27BDFF68 */ addiu $sp, $sp, -0x98 /* 09FC38 8009F038 AFBF0064 */ sw $ra, 0x64($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A0EB4.s b/asm/non_matchings/unknown_09F8F0/func_800A0EB4.s index f1a250ab..db1eea20 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A0EB4.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A0EB4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E86F8 +.word L800A0F28, L800A0F38, L800A0F48, L800A0F58, L800A0F6C, L800A0F80, L800A0F94, L800A0FAC + +.text glabel func_800A0EB4 /* 0A1AB4 800A0EB4 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0A1AB8 800A0EB8 3C0E800E */ lui $t6, %hi(D_800E2790) # $t6, 0x800e @@ -22,45 +27,53 @@ glabel func_800A0EB4 /* 0A1B04 800A0F04 1020002D */ beqz $at, .L800A0FBC /* 0A1B08 800A0F08 26100420 */ addiu $s0, $s0, 0x420 /* 0A1B0C 800A0F0C 00094880 */ sll $t1, $t1, 2 -/* 0A1B10 800A0F10 3C01800F */ lui $at, %hi(D_800E86F8) # $at, 0x800f +/* 0A1B10 800A0F10 3C01800F */ lui $at, %hi(jpt_800E86F8) # $at, 0x800f /* 0A1B14 800A0F14 00290821 */ addu $at, $at, $t1 -/* 0A1B18 800A0F18 8C2986F8 */ lw $t1, %lo(D_800E86F8)($at) +/* 0A1B18 800A0F18 8C2986F8 */ lw $t1, %lo(jpt_800E86F8)($at) /* 0A1B1C 800A0F1C 00000000 */ nop /* 0A1B20 800A0F20 01200008 */ jr $t1 /* 0A1B24 800A0F24 00000000 */ nop +glabel L800A0F28 /* 0A1B28 800A0F28 240A0021 */ li $t2, 33 /* 0A1B2C 800A0F2C A60A0006 */ sh $t2, 6($s0) /* 0A1B30 800A0F30 10000025 */ b .L800A0FC8 /* 0A1B34 800A0F34 A6000000 */ sh $zero, ($s0) +glabel L800A0F38 /* 0A1B38 800A0F38 240B0020 */ li $t3, 32 /* 0A1B3C 800A0F3C A60B0006 */ sh $t3, 6($s0) /* 0A1B40 800A0F40 10000021 */ b .L800A0FC8 /* 0A1B44 800A0F44 A6000000 */ sh $zero, ($s0) +glabel L800A0F48 /* 0A1B48 800A0F48 240C001F */ li $t4, 31 /* 0A1B4C 800A0F4C A60C0006 */ sh $t4, 6($s0) /* 0A1B50 800A0F50 1000001D */ b .L800A0FC8 /* 0A1B54 800A0F54 A6000000 */ sh $zero, ($s0) +glabel L800A0F58 /* 0A1B58 800A0F58 24028000 */ li $v0, -32768 /* 0A1B5C 800A0F5C 240D0021 */ li $t5, 33 /* 0A1B60 800A0F60 A60D0006 */ sh $t5, 6($s0) /* 0A1B64 800A0F64 10000018 */ b .L800A0FC8 /* 0A1B68 800A0F68 A6020000 */ sh $v0, ($s0) +glabel L800A0F6C /* 0A1B6C 800A0F6C 24028000 */ li $v0, -32768 /* 0A1B70 800A0F70 240E0020 */ li $t6, 32 /* 0A1B74 800A0F74 A60E0006 */ sh $t6, 6($s0) /* 0A1B78 800A0F78 10000013 */ b .L800A0FC8 /* 0A1B7C 800A0F7C A6020000 */ sh $v0, ($s0) +glabel L800A0F80 /* 0A1B80 800A0F80 24028000 */ li $v0, -32768 /* 0A1B84 800A0F84 2418001F */ li $t8, 31 /* 0A1B88 800A0F88 A6180006 */ sh $t8, 6($s0) /* 0A1B8C 800A0F8C 1000000E */ b .L800A0FC8 /* 0A1B90 800A0F90 A6020000 */ sh $v0, ($s0) +glabel L800A0F94 /* 0A1B94 800A0F94 24028000 */ li $v0, -32768 /* 0A1B98 800A0F98 2419001E */ li $t9, 30 /* 0A1B9C 800A0F9C A6190006 */ sh $t9, 6($s0) /* 0A1BA0 800A0FA0 A6020000 */ sh $v0, ($s0) /* 0A1BA4 800A0FA4 10000008 */ b .L800A0FC8 /* 0A1BA8 800A0FA8 A6020002 */ sh $v0, 2($s0) +glabel L800A0FAC /* 0A1BAC 800A0FAC 240F001E */ li $t7, 30 /* 0A1BB0 800A0FB0 A60F0006 */ sh $t7, 6($s0) /* 0A1BB4 800A0FB4 10000004 */ b .L800A0FC8 diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1248.s b/asm/non_matchings/unknown_09F8F0/func_800A1248.s index c6e2fe47..0e52959f 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A1248.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A1248.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E8718 +.float 275.0 + +.text glabel func_800A1248 /* 0A1E48 800A1248 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 0A1E4C 800A124C AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A14F0.s b/asm/non_matchings/unknown_09F8F0/func_800A14F0.s index 7f4c82e7..76e44600 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A14F0.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A14F0.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E8720 +.double 66.0 +glabel D_800E8728 +.double 66.0 + +.text glabel func_800A14F0 /* 0A20F0 800A14F0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 0A20F4 800A14F4 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1E48.s b/asm/non_matchings/unknown_09F8F0/func_800A1E48.s index 124cf062..3d690a9b 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A1E48.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A1E48.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E8730 +.double 66.0 + +.text glabel func_800A1E48 /* 0A2A48 800A1E48 27BDFF78 */ addiu $sp, $sp, -0x88 /* 0A2A4C 800A1E4C AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A277C.s b/asm/non_matchings/unknown_09F8F0/func_800A277C.s index b8356939..b0a9a997 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A277C.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A277C.s @@ -1,3 +1,32 @@ +.rdata +glabel D_800E8640 +.asciz "CAN'T" +.ascii "\0\0" # padding +glabel D_800E8648 +.asciz "SAVE" +.ascii "\0\0\0" # padding +glabel D_800E8650 +.asciz "GHOST" +.ascii "\0\0" # padding +glabel D_800E8658 +.asciz " CONTROLLER" +glabel D_800E8664 +.asciz "PAK" +glabel D_800E8668 +.asciz "FULL" +.ascii "\0\0\0" # padding +glabel D_800E8670 +.asciz " CONTROLLER" +glabel D_800E867C +.asciz "PAK" +glabel D_800E8680 +.asciz "DAMAGED" + +.late_rodata +glabel D_800E8738 +.double 1.2 + +.text glabel func_800A277C /* 0A337C 800A277C 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 0A3380 800A2780 AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A3884.s b/asm/non_matchings/unknown_09F8F0/func_800A3884.s index 72417d27..380861d2 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A3884.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A3884.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E8740 +.float 25744.0 + +.text glabel func_800A3884 /* 0A4484 800A3884 3C0E8012 */ lui $t6, %hi(D_80126D37) # $t6, 0x8012 /* 0A4488 800A3888 91CE6D37 */ lbu $t6, %lo(D_80126D37)($t6) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A5F18.s b/asm/non_matchings/unknown_09F8F0/func_800A5F18.s index 077d0ac4..b3e64648 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A5F18.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A5F18.s @@ -1,3 +1,14 @@ +.rdata +glabel D_800E8688 +.asciz "RACE" +.ascii "\0\0\0" # padding +glabel D_800E8690 +.asciz "LAP" +glabel D_800E8694 +.asciz "DID NOT FINISH" +.ascii "\0" # padding + +.text glabel func_800A5F18 /* 0A6B18 800A5F18 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0A6B1C 800A5F1C 3C078012 */ lui $a3, %hi(D_80126CDC) # $a3, 0x8012 diff --git a/asm/non_matchings/unknown_09F8F0/func_800A6254.s b/asm/non_matchings/unknown_09F8F0/func_800A6254.s index 850b9374..7541e545 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A6254.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A6254.s @@ -1,3 +1,12 @@ +.late_rodata +glabel jpt_800E8744 +.word L800A63D8, L800A691C, L800A6BCC, L800A6CA4, L800A6D68 +glabel D_800E8758 +.double 1.1 +glabel D_800E8760 +.double 1.1 + +.text glabel func_800A6254 /* 0A6E54 800A6254 27BDFF90 */ addiu $sp, $sp, -0x70 /* 0A6E58 800A6258 AFBF0014 */ sw $ra, 0x14($sp) @@ -92,12 +101,13 @@ glabel func_800A6254 /* 0A6FB4 800A63B4 2F210005 */ sltiu $at, $t9, 5 /* 0A6FB8 800A63B8 10200278 */ beqz $at, .L800A6D9C /* 0A6FBC 800A63BC 0019C880 */ sll $t9, $t9, 2 -/* 0A6FC0 800A63C0 3C01800F */ lui $at, %hi(D_800E8744) # $at, 0x800f +/* 0A6FC0 800A63C0 3C01800F */ lui $at, %hi(jpt_800E8744) # $at, 0x800f /* 0A6FC4 800A63C4 00390821 */ addu $at, $at, $t9 -/* 0A6FC8 800A63C8 8C398744 */ lw $t9, %lo(D_800E8744)($at) +/* 0A6FC8 800A63C8 8C398744 */ lw $t9, %lo(jpt_800E8744)($at) /* 0A6FCC 800A63CC 00000000 */ nop /* 0A6FD0 800A63D0 03200008 */ jr $t9 /* 0A6FD4 800A63D4 00000000 */ nop +glabel L800A63D8 /* 0A6FD8 800A63D8 8FAA005C */ lw $t2, 0x5c($sp) /* 0A6FDC 800A63DC 240C007F */ li $t4, 127 /* 0A6FE0 800A63E0 314B0040 */ andi $t3, $t2, 0x40 @@ -460,6 +470,7 @@ glabel func_800A6254 /* 0A7510 800A6910 8FAD0038 */ lw $t5, 0x38($sp) /* 0A7514 800A6914 10000123 */ b .L800A6DA4 /* 0A7518 800A6918 A1CD017C */ sb $t5, 0x17c($t6) +glabel L800A691C /* 0A751C 800A691C 8FA40074 */ lw $a0, 0x74($sp) /* 0A7520 800A6920 804505FD */ lb $a1, 0x5fd($v0) /* 0A7524 800A6924 00047880 */ sll $t7, $a0, 2 @@ -644,6 +655,7 @@ glabel func_800A6254 /* 0A77C0 800A6BC0 00E02025 */ move $a0, $a3 /* 0A77C4 800A6BC4 10000078 */ b .L800A6DA8 /* 0A77C8 800A6BC8 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800A6BCC /* 0A77CC 800A6BCC 804B05FB */ lb $t3, 0x5fb($v0) /* 0A77D0 800A6BD0 8FAC0074 */ lw $t4, 0x74($sp) /* 0A77D4 800A6BD4 240FFF88 */ li $t7, -120 @@ -702,6 +714,7 @@ glabel func_800A6254 /* 0A7898 800A6C98 00E02025 */ move $a0, $a3 /* 0A789C 800A6C9C 10000042 */ b .L800A6DA8 /* 0A78A0 800A6CA0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800A6CA4 /* 0A78A4 800A6CA4 8FAF005C */ lw $t7, 0x5c($sp) /* 0A78A8 800A6CA8 24010040 */ li $at, 64 /* 0A78AC 800A6CAC 15E10003 */ bne $t7, $at, .L800A6CBC @@ -754,6 +767,7 @@ glabel func_800A6254 /* 0A795C 800A6D5C 00E02025 */ move $a0, $a3 /* 0A7960 800A6D60 10000011 */ b .L800A6DA8 /* 0A7964 800A6D64 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800A6D68 /* 0A7968 800A6D68 84EC0000 */ lh $t4, ($a3) /* 0A796C 800A6D6C 806D000C */ lb $t5, 0xc($v1) /* 0A7970 800A6D70 240F0005 */ li $t7, 5 diff --git a/asm/non_matchings/unknown_09F8F0/func_800A6E30.s b/asm/non_matchings/unknown_09F8F0/func_800A6E30.s index e6bab691..fd0301f3 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A6E30.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A6E30.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E8768 +.word L800A6E70, L800A6F3C, L800A7014, L800A70D4, L800A7158 + +.text glabel func_800A6E30 /* 0A7A30 800A6E30 3C088012 */ lui $t0, %hi(D_80126CDC) # $t0, 0x8012 /* 0A7A34 800A6E34 25086CDC */ addiu $t0, %lo(D_80126CDC) # addiu $t0, $t0, 0x6cdc @@ -9,12 +14,13 @@ glabel func_800A6E30 /* 0A7A4C 800A6E4C 2DC10005 */ sltiu $at, $t6, 5 /* 0A7A50 800A6E50 102000CA */ beqz $at, .L800A717C /* 0A7A54 800A6E54 000E7080 */ sll $t6, $t6, 2 -/* 0A7A58 800A6E58 3C01800F */ lui $at, %hi(D_800E8768) # $at, 0x800f +/* 0A7A58 800A6E58 3C01800F */ lui $at, %hi(jpt_800E8768) # $at, 0x800f /* 0A7A5C 800A6E5C 002E0821 */ addu $at, $at, $t6 -/* 0A7A60 800A6E60 8C2E8768 */ lw $t6, %lo(D_800E8768)($at) +/* 0A7A60 800A6E60 8C2E8768 */ lw $t6, %lo(jpt_800E8768)($at) /* 0A7A64 800A6E64 00000000 */ nop /* 0A7A68 800A6E68 01C00008 */ jr $t6 /* 0A7A6C 800A6E6C 00000000 */ nop +glabel L800A6E70 /* 0A7A70 800A6E70 3C03800E */ lui $v1, %hi(D_800E2770) # $v1, 0x800e /* 0A7A74 800A6E74 24632770 */ addiu $v1, %lo(D_800E2770) # addiu $v1, $v1, 0x2770 /* 0A7A78 800A6E78 240F007F */ li $t7, 127 @@ -71,6 +77,7 @@ glabel func_800A6E30 /* 0A7B30 800A6F30 24180001 */ li $t8, 1 /* 0A7B34 800A6F34 10000091 */ b .L800A717C /* 0A7B38 800A6F38 A33801DA */ sb $t8, 0x1da($t9) +glabel L800A6F3C /* 0A7B3C 800A6F3C 00051880 */ sll $v1, $a1, 2 /* 0A7B40 800A6F40 00651823 */ subu $v1, $v1, $a1 /* 0A7B44 800A6F44 804401DD */ lb $a0, 0x1dd($v0) @@ -127,6 +134,7 @@ glabel func_800A6E30 /* 0A7C08 800A7008 24E701C0 */ addiu $a3, $a3, 0x1c0 /* 0A7C0C 800A700C 1000005C */ b .L800A7180 /* 0A7C10 800A7010 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800A7014 /* 0A7C14 800A7014 805801DB */ lb $t8, 0x1db($v0) /* 0A7C18 800A7018 240A0003 */ li $t2, 3 /* 0A7C1C 800A701C 0305C821 */ addu $t9, $t8, $a1 @@ -181,6 +189,7 @@ glabel func_800A6E30 /* 0A7CC8 800A70C8 244701C0 */ addiu $a3, $v0, 0x1c0 /* 0A7CCC 800A70CC 1000002C */ b .L800A7180 /* 0A7CD0 800A70D0 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800A70D4 /* 0A7CD4 800A70D4 0005C880 */ sll $t9, $a1, 2 /* 0A7CD8 800A70D8 0325C823 */ subu $t9, $t9, $a1 /* 0A7CDC 800A70DC 0019C880 */ sll $t9, $t9, 2 @@ -215,6 +224,7 @@ glabel func_800A6E30 /* 0A7D4C 800A714C 244701C0 */ addiu $a3, $v0, 0x1c0 /* 0A7D50 800A7150 1000000B */ b .L800A7180 /* 0A7D54 800A7154 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800A7158 /* 0A7D58 800A7158 3C03800E */ lui $v1, %hi(D_800E2770) # $v1, 0x800e /* 0A7D5C 800A715C 24632770 */ addiu $v1, %lo(D_800E2770) # addiu $v1, $v1, 0x2770 /* 0A7D60 800A7160 240BFFFF */ li $t3, -1 diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7520.s b/asm/non_matchings/unknown_09F8F0/func_800A7520.s index 0ebd5a62..cf4681b5 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A7520.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A7520.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E8780 +.double 0.04687 +glabel D_800E8788 +.double 682.6583 +glabel D_800E8790 +.double 0.18 +glabel D_800E8798 +.double 0.04687 + +.text glabel func_800A7520 /* 0A8120 800A7520 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0A8124 800A7524 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A8474.s b/asm/non_matchings/unknown_09F8F0/func_800A8474.s index 70564f01..4917c93b 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A8474.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A8474.s @@ -1,3 +1,23 @@ +.late_rodata +glabel D_800E87A0 +.double 1.1 +glabel D_800E87A8 +.float 181.5 +.word 0 # padding +glabel D_800E87B0 +.double 66.0 +glabel D_800E87B8 +.double 66.0 +glabel D_800E87C0 +.double 1.1 +glabel D_800E87C8 +.double 1.2 +glabel D_800E87D0 +.float 0.8 +glabel D_800E87D4 +.float 1.2 + +.text glabel func_800A8474 /* 0A9074 800A8474 27BDFEA0 */ addiu $sp, $sp, -0x160 /* 0A9078 800A8478 AFBF003C */ sw $ra, 0x3c($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800AA600.s b/asm/non_matchings/unknown_09F8F0/func_800AA600.s index 111c35b2..48d40b05 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800AA600.s +++ b/asm/non_matchings/unknown_09F8F0/func_800AA600.s @@ -1,3 +1,11 @@ +.late_rodata +glabel D_800E87D8 +.float 1.1 +.word 0 # Padding +glabel D_800E87E0 +.double 1.1 + +.text glabel func_800AA600 /* 0AB200 800AA600 27BDFF48 */ addiu $sp, $sp, -0xb8 /* 0AB204 800AA604 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/src/unknown_09F8F0.c b/src/unknown_09F8F0.c index 906fb16d..416ec7a0 100644 --- a/src/unknown_09F8F0.c +++ b/src/unknown_09F8F0.c @@ -367,78 +367,6 @@ s16 D_800E2C98[4] = { /*******************************/ -/************ .rodata ************/ - -const char D_800E8640[] = "CAN'T"; -const char D_800E8648[] = "SAVE"; -const char D_800E8650[] = "GHOST"; -const char D_800E8658[] = " CONTROLLER"; -const char D_800E8664[] = "PAK"; -const char D_800E8668[] = "FULL"; -const char D_800E8670[] = " CONTROLLER"; -const char D_800E867C[] = "PAK"; -const char D_800E8680[] = "DAMAGED"; -const char D_800E8688[] = "RACE"; -const char D_800E8690[] = "LAP"; -const char D_800E8694[] = "DID NOT FINISH"; - -const DoubleLiteral D_800E86A8 = { 0.6 }; -const DoubleLiteral D_800E86B0 = { 1.2 }; -const FloatLiteral D_800E86B8 = { 263.0f }; -const FloatLiteral D_800E86BC = { 259.0f }; -const FloatLiteral D_800E86C0 = { 265.0f }; -const DoubleLiteral D_800E86C8 = { 1.2 }; -const DoubleLiteral D_800E86D0 = { 0.6 }; -const DoubleLiteral D_800E86D8 = { 1.2 }; -const DoubleLiteral D_800E86E0 = { 0.6 }; -const DoubleLiteral D_800E86E8 = { 1.2 }; -const DoubleLiteral D_800E86F0 = { 0.6 }; - -// Jump table in func_800A0EB4 -const u32 D_800E86F8[] = { - 0x800A0F28, 0x800A0F38, 0x800A0F48, 0x800A0F58, - 0x800A0F6C, 0x800A0F80, 0x800A0F94, 0x800A0FAC -}; - -const FloatLiteral D_800E8718 = { 275.0f }; -const DoubleLiteral D_800E8720 = { 66.0 }; -const DoubleLiteral D_800E8728 = { 66.0 }; -const DoubleLiteral D_800E8730 = { 66.0 }; -const DoubleLiteral D_800E8738 = { 1.2 }; -const FloatLiteral D_800E8740 = { 25744.0f }; - -// Jump table in func_800A6254 -const u32 D_800E8744[] = { - 0x800A63D8, 0x800A691C, 0x800A6BCC, 0x800A6CA4, - 0x800A6D68 -}; - -const DoubleLiteral D_800E8758 = { 1.1 }; -const DoubleLiteral D_800E8760 = { 1.1 }; - -// Jump table in func_800A6E30 -const u32 D_800E8768[] = { - 0x800A6E70, 0x800A6F3C, 0x800A7014, 0x800A70D4, - 0x800A7158 -}; - -const DoubleLiteral D_800E8780 = { 0.04687 }; -const DoubleLiteral D_800E8788 = { 682.6583 }; -const DoubleLiteral D_800E8790 = { 0.18 }; -const DoubleLiteral D_800E8798 = { 0.04687 }; -const DoubleLiteral D_800E87A0 = { 1.1 }; -const FloatLiteral D_800E87A8 = { 181.5f }; -const DoubleLiteral D_800E87B0 = { 66.0 }; -const DoubleLiteral D_800E87B8 = { 66.0 }; -const DoubleLiteral D_800E87C0 = { 1.1 }; -const DoubleLiteral D_800E87C8 = { 1.2 }; -const FloatLiteral D_800E87D0 = { 0.8f }; -const FloatLiteral D_800E87D8 = { 1.2f }; -const FloatLiteral D_800E87E0 = { 1.1f }; -const DoubleLiteral D_800E87E8 = { 1.1 }; - -/*********************************/ - /************ .bss ************/ extern u8 D_80126CD0; From 24c825cc1c95a8cdec4f6cec880257ea60d3dd1a Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:32:58 -0500 Subject: [PATCH 48/66] Moved rodata from C to GLOBAL_ASM in unknown_061D30 --- .../unknown_061D30/__CSPHandleMIDIMsg.s | 17 ++++++- .../unknown_061D30/__CSPHandleNextSeqEvent.s | 14 +++++- .../unknown_061D30/__CSPVoiceHandler.s | 25 +++++++++- src/unknown_061D30.c | 48 ------------------- 4 files changed, 50 insertions(+), 54 deletions(-) diff --git a/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s b/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s index 274affe9..d775e367 100644 --- a/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s +++ b/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E6CE0 +.word L80063068, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L80062C38, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800630C0, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L8006319C, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800636E0, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L80063124, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L800637CC, L80063714 + +.text glabel __CSPHandleMIDIMsg /* 063700 80062B00 27BDFF28 */ addiu $sp, $sp, -0xd8 /* 063704 80062B04 AFBF003C */ sw $ra, 0x3c($sp) @@ -77,12 +82,13 @@ glabel __CSPHandleMIDIMsg /* 063814 80062C14 2DC10061 */ sltiu $at, $t6, 0x61 /* 063818 80062C18 102002EC */ beqz $at, .L800637CC /* 06381C 80062C1C 000E7080 */ sll $t6, $t6, 2 -/* 063820 80062C20 3C01800E */ lui $at, %hi(D_800E6CE0) # $at, 0x800e +/* 063820 80062C20 3C01800E */ lui $at, %hi(jpt_800E6CE0) # $at, 0x800e /* 063824 80062C24 002E0821 */ addu $at, $at, $t6 -/* 063828 80062C28 8C2E6CE0 */ lw $t6, %lo(D_800E6CE0)($at) +/* 063828 80062C28 8C2E6CE0 */ lw $t6, %lo(jpt_800E6CE0)($at) /* 06382C 80062C2C 00000000 */ nop /* 063830 80062C30 01C00008 */ jr $t6 /* 063834 80062C34 00000000 */ nop +glabel L80062C38 /* 063838 80062C38 1260010C */ beqz $s3, .L8006306C /* 06383C 80062C3C 93A500CA */ lbu $a1, 0xca($sp) /* 063840 80062C40 8E4F002C */ lw $t7, 0x2c($s2) @@ -359,6 +365,7 @@ glabel __CSPHandleMIDIMsg /* 063C5C 8006305C 00000000 */ nop /* 063C60 80063060 100001DB */ b .L800637D0 /* 063C64 80063064 8FBF003C */ lw $ra, 0x3c($sp) +glabel L80063068 /* 063C68 80063068 93A500CA */ lbu $a1, 0xca($sp) .L8006306C: /* 063C6C 8006306C 02402025 */ move $a0, $s2 @@ -383,6 +390,7 @@ glabel __CSPHandleMIDIMsg /* 063CB4 800630B4 26050004 */ addiu $a1, $s0, 4 /* 063CB8 800630B8 100001C5 */ b .L800637D0 /* 063CBC 800630BC 8FBF003C */ lw $ra, 0x3c($sp) +glabel L800630C0 /* 063CC0 800630C0 93A500CA */ lbu $a1, 0xca($sp) /* 063CC4 800630C4 02402025 */ move $a0, $s2 /* 063CC8 800630C8 0C002A13 */ jal __lookupVoice @@ -408,6 +416,7 @@ glabel __CSPHandleMIDIMsg /* 063D18 80063118 00403825 */ move $a3, $v0 /* 063D1C 8006311C 100001AC */ b .L800637D0 /* 063D20 80063120 8FBF003C */ lw $ra, 0x3c($sp) +glabel L80063124 /* 063D24 80063124 8E500064 */ lw $s0, 0x64($s2) /* 063D28 80063128 00000000 */ nop /* 063D2C 8006312C 120001A8 */ beqz $s0, .L800637D0 @@ -440,6 +449,7 @@ glabel __CSPHandleMIDIMsg /* 063D90 80063190 00000000 */ nop /* 063D94 80063194 1000018E */ b .L800637D0 /* 063D98 80063198 8FBF003C */ lw $ra, 0x3c($sp) +glabel L8006319C /* 063D9C 8006319C 93B100CA */ lbu $s1, 0xca($sp) /* 063DA0 800631A0 24010007 */ li $at, 7 /* 063DA4 800631A4 1221002E */ beq $s1, $at, .L80063260 @@ -808,6 +818,7 @@ glabel __CSPHandleMIDIMsg /* 0642D4 800636D4 00000000 */ nop /* 0642D8 800636D8 1000003D */ b .L800637D0 /* 0642DC 800636DC 8FBF003C */ lw $ra, 0x3c($sp) +glabel L800636E0 /* 0642E0 800636E0 8E420020 */ lw $v0, 0x20($s2) /* 0642E4 800636E4 93AF00CA */ lbu $t7, 0xca($sp) /* 0642E8 800636E8 844C0000 */ lh $t4, ($v0) @@ -821,6 +832,7 @@ glabel __CSPHandleMIDIMsg /* 064308 80063708 02803025 */ move $a2, $s4 /* 06430C 8006370C 10000030 */ b .L800637D0 /* 064310 80063710 8FBF003C */ lw $ra, 0x3c($sp) +glabel L80063714 /* 064314 80063714 00071880 */ sll $v1, $a3, 2 /* 064318 80063718 8E4B0060 */ lw $t3, 0x60($s2) /* 06431C 8006371C 00671821 */ addu $v1, $v1, $a3 @@ -871,6 +883,7 @@ glabel __CSPHandleMIDIMsg /* 0643C4 800637C4 1600FFF0 */ bnez $s0, .L80063788 /* 0643C8 800637C8 00000000 */ nop .L800637CC: +glabel L800637CC /* 0643CC 800637CC 8FBF003C */ lw $ra, 0x3c($sp) .L800637D0: /* 0643D0 800637D0 8FB00028 */ lw $s0, 0x28($sp) diff --git a/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s b/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s index 84b3e8cf..b87cc7dc 100644 --- a/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s +++ b/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E6C90 +.word L80062A90, L80062AF0, L80062AA8, L80062AC0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AE8, L80062AE8, L80062AE8 + +.text glabel __CSPHandleNextSeqEvent /* 06363C 80062A3C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 063640 80062A40 AFBF001C */ sw $ra, 0x1c($sp) @@ -14,24 +19,27 @@ glabel __CSPHandleNextSeqEvent /* 06366C 80062A6C 2DE10014 */ sltiu $at, $t7, 0x14 /* 063670 80062A70 1020001F */ beqz $at, .L80062AF0 /* 063674 80062A74 000F7880 */ sll $t7, $t7, 2 -/* 063678 80062A78 3C01800E */ lui $at, %hi(D_800E6C90) # $at, 0x800e +/* 063678 80062A78 3C01800E */ lui $at, %hi(jpt_800E6C90) # $at, 0x800e /* 06367C 80062A7C 002F0821 */ addu $at, $at, $t7 -/* 063680 80062A80 8C2F6C90 */ lw $t7, %lo(D_800E6C90)($at) +/* 063680 80062A80 8C2F6C90 */ lw $t7, %lo(jpt_800E6C90)($at) /* 063684 80062A84 00000000 */ nop /* 063688 80062A88 01E00008 */ jr $t7 /* 06368C 80062A8C 00000000 */ nop +glabel L80062A90 /* 063690 80062A90 0C018AC0 */ jal __CSPHandleMIDIMsg /* 063694 80062A94 02002025 */ move $a0, $s0 /* 063698 80062A98 0C018A73 */ jal __CSPPostNextSeqEvent /* 06369C 80062A9C 02002025 */ move $a0, $s0 /* 0636A0 80062AA0 10000014 */ b .L80062AF4 /* 0636A4 80062AA4 8FBF001C */ lw $ra, 0x1c($sp) +glabel L80062AA8 /* 0636A8 80062AA8 0C018DFB */ jal __CSPHandleMetaMsg /* 0636AC 80062AAC 02002025 */ move $a0, $s0 /* 0636B0 80062AB0 0C018A73 */ jal __CSPPostNextSeqEvent /* 0636B4 80062AB4 02002025 */ move $a0, $s0 /* 0636B8 80062AB8 1000000E */ b .L80062AF4 /* 0636BC 80062ABC 8FBF001C */ lw $ra, 0x1c($sp) +glabel L80062AC0 /* 0636C0 80062AC0 24180002 */ li $t8, 2 /* 0636C4 80062AC4 AE18002C */ sw $t8, 0x2c($s0) /* 0636C8 80062AC8 24190010 */ li $t9, 16 @@ -42,9 +50,11 @@ glabel __CSPHandleNextSeqEvent /* 0636DC 80062ADC 26040048 */ addiu $a0, $s0, 0x48 /* 0636E0 80062AE0 10000004 */ b .L80062AF4 /* 0636E4 80062AE4 8FBF001C */ lw $ra, 0x1c($sp) +glabel L80062AE8 /* 0636E8 80062AE8 0C018A73 */ jal __CSPPostNextSeqEvent /* 0636EC 80062AEC 02002025 */ move $a0, $s0 .L80062AF0: +glabel L80062AF0 /* 0636F0 80062AF0 8FBF001C */ lw $ra, 0x1c($sp) .L80062AF4: /* 0636F4 80062AF4 8FB00018 */ lw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s b/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s index c87b2c10..88aa62ce 100644 --- a/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s +++ b/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E6C30 +.word L8006247C, L80062978, L800626F8, L80062978, L80062978, L800624AC, L800624FC, L8006270C, L80062978, L8006248C, L80062720, L80062978, L80062924, L80062944, L80062968, L80062788, L800627AC, L80062880, L80062978, L80062978, L80062978, L800626F8, L80062564, L80062668 + +.text glabel __CSPVoiceHandler /* 063008 80062408 27BDFF80 */ addiu $sp, $sp, -0x80 /* 06300C 8006240C AFBE0038 */ sw $fp, 0x38($sp) @@ -23,16 +28,18 @@ glabel __CSPVoiceHandler /* 063058 80062458 2DE10018 */ sltiu $at, $t7, 0x18 /* 06305C 8006245C 10200146 */ beqz $at, .L80062978 /* 063060 80062460 000F7880 */ sll $t7, $t7, 2 -/* 063064 80062464 3C01800E */ lui $at, %hi(D_800E6C30) # $at, 0x800e +/* 063064 80062464 3C01800E */ lui $at, %hi(jpt_800E6C30) # $at, 0x800e /* 063068 80062468 002F0821 */ addu $at, $at, $t7 -/* 06306C 8006246C 8C2F6C30 */ lw $t7, %lo(D_800E6C30)($at) +/* 06306C 8006246C 8C2F6C30 */ lw $t7, %lo(jpt_800E6C30)($at) /* 063070 80062470 00000000 */ nop /* 063074 80062474 01E00008 */ jr $t7 /* 063078 80062478 00000000 */ nop +glabel L8006247C /* 06307C 8006247C 0C018A8F */ jal __CSPHandleNextSeqEvent /* 063080 80062480 02402025 */ move $a0, $s2 /* 063084 80062484 1000013D */ b .L8006297C /* 063088 80062488 8FA50048 */ lw $a1, 0x48($sp) +glabel L8006248C /* 06308C 8006248C 24180009 */ li $t8, 9 /* 063090 80062490 A7B8006C */ sh $t8, 0x6c($sp) /* 063094 80062494 8E46005C */ lw $a2, 0x5c($s2) @@ -41,6 +48,7 @@ glabel __CSPVoiceHandler /* 0630A0 800624A0 03C02825 */ move $a1, $fp /* 0630A4 800624A4 10000135 */ b .L8006297C /* 0630A8 800624A8 8FA50048 */ lw $a1, 0x48($sp) +glabel L800624AC /* 0630AC 800624AC 8E50003C */ lw $s0, 0x3c($s2) /* 0630B0 800624B0 8E440014 */ lw $a0, 0x14($s2) /* 0630B4 800624B4 0C03262C */ jal alSynStopVoice @@ -62,6 +70,7 @@ glabel __CSPVoiceHandler /* 0630F0 800624F0 02002825 */ move $a1, $s0 /* 0630F4 800624F4 10000121 */ b .L8006297C /* 0630F8 800624F8 8FA50048 */ lw $a1, 0x48($sp) +glabel L800624FC /* 0630FC 800624FC 8E50003C */ lw $s0, 0x3c($s2) /* 063100 80062500 24090001 */ li $t1, 1 /* 063104 80062504 8E110010 */ lw $s1, 0x10($s0) @@ -89,6 +98,7 @@ glabel __CSPVoiceHandler /* 063158 80062558 02603825 */ move $a3, $s3 /* 06315C 8006255C 10000107 */ b .L8006297C /* 063160 80062560 8FA50048 */ lw $a1, 0x48($sp) +glabel L80062564 /* 063164 80062564 8E540040 */ lw $s4, 0x40($s2) /* 063168 80062568 8E590078 */ lw $t9, 0x78($s2) /* 06316C 8006256C 8E51003C */ lw $s1, 0x3c($s2) @@ -157,6 +167,7 @@ glabel __CSPVoiceHandler /* 06325C 8006265C 02603025 */ move $a2, $s3 /* 063260 80062660 100000C6 */ b .L8006297C /* 063264 80062664 8FA50048 */ lw $a1, 0x48($sp) +glabel L80062668 /* 063268 80062668 8E540040 */ lw $s4, 0x40($s2) /* 06326C 8006266C 8E590078 */ lw $t9, 0x78($s2) /* 063270 80062670 8E51003C */ lw $s1, 0x3c($s2) @@ -193,16 +204,19 @@ glabel __CSPVoiceHandler /* 0632EC 800626EC 02603025 */ move $a2, $s3 /* 0632F0 800626F0 100000A2 */ b .L8006297C /* 0632F4 800626F4 8FA50048 */ lw $a1, 0x48($sp) +glabel L800626F8 /* 0632F8 800626F8 8FA50048 */ lw $a1, 0x48($sp) /* 0632FC 800626FC 0C018AC0 */ jal __CSPHandleMIDIMsg /* 063300 80062700 02402025 */ move $a0, $s2 /* 063304 80062704 1000009D */ b .L8006297C /* 063308 80062708 8FA50048 */ lw $a1, 0x48($sp) +glabel L8006270C /* 06330C 8006270C 8FA50048 */ lw $a1, 0x48($sp) /* 063310 80062710 0C018DFB */ jal __CSPHandleMetaMsg /* 063314 80062714 02402025 */ move $a0, $s2 /* 063318 80062718 10000098 */ b .L8006297C /* 06331C 8006271C 8FA50048 */ lw $a1, 0x48($sp) +glabel L80062720 /* 063320 80062720 864E003C */ lh $t6, 0x3c($s2) /* 063324 80062724 8E510064 */ lw $s1, 0x64($s2) /* 063328 80062728 A64E0032 */ sh $t6, 0x32($s2) @@ -230,6 +244,7 @@ glabel __CSPVoiceHandler /* 06337C 8006277C 02202025 */ move $a0, $s1 /* 063380 80062780 1000007E */ b .L8006297C /* 063384 80062784 8FA50048 */ lw $a1, 0x48($sp) +glabel L80062788 /* 063388 80062788 8E48002C */ lw $t0, 0x2c($s2) /* 06338C 8006278C 24010001 */ li $at, 1 /* 063390 80062790 11010079 */ beq $t0, $at, .L80062978 @@ -239,6 +254,7 @@ glabel __CSPVoiceHandler /* 0633A0 800627A0 02402025 */ move $a0, $s2 /* 0633A4 800627A4 10000075 */ b .L8006297C /* 0633A8 800627A8 8FA50048 */ lw $a1, 0x48($sp) +glabel L800627AC /* 0633AC 800627AC 8E59002C */ lw $t9, 0x2c($s2) /* 0633B0 800627B0 24010002 */ li $at, 2 /* 0633B4 800627B4 17210070 */ bne $t9, $at, .L80062978 @@ -297,6 +313,7 @@ glabel __CSPVoiceHandler .L80062878: /* 063478 80062878 1000003F */ b .L80062978 /* 06347C 8006287C AE40002C */ sw $zero, 0x2c($s2) +glabel L80062880 /* 063480 80062880 8E59002C */ lw $t9, 0x2c($s2) /* 063484 80062884 24010001 */ li $at, 1 /* 063488 80062888 1721003B */ bne $t9, $at, .L80062978 @@ -341,6 +358,7 @@ glabel __CSPVoiceHandler /* 063518 80062918 03C02825 */ move $a1, $fp /* 06351C 8006291C 10000017 */ b .L8006297C /* 063520 80062920 8FA50048 */ lw $a1, 0x48($sp) +glabel L80062924 /* 063524 80062924 9250003C */ lbu $s0, 0x3c($s2) /* 063528 80062928 8E4D0060 */ lw $t5, 0x60($s2) /* 06352C 8006292C 02150019 */ multu $s0, $s5 @@ -349,6 +367,7 @@ glabel __CSPVoiceHandler /* 063538 80062938 01AE7821 */ addu $t7, $t5, $t6 /* 06353C 8006293C 1000000E */ b .L80062978 /* 063540 80062940 A1EC0008 */ sb $t4, 8($t7) +glabel L80062944 /* 063544 80062944 8E58003C */ lw $t8, 0x3c($s2) /* 063548 80062948 8E450020 */ lw $a1, 0x20($s2) /* 06354C 8006294C AE580018 */ sw $t8, 0x18($s2) @@ -358,11 +377,13 @@ glabel __CSPVoiceHandler /* 06355C 8006295C 02402025 */ move $a0, $s2 /* 063560 80062960 10000006 */ b .L8006297C /* 063564 80062964 8FA50048 */ lw $a1, 0x48($sp) +glabel L80062968 /* 063568 80062968 8E45003C */ lw $a1, 0x3c($s2) /* 06356C 8006296C 02402025 */ move $a0, $s2 /* 063570 80062970 0C002B38 */ jal __initFromBank /* 063574 80062974 AE450020 */ sw $a1, 0x20($s2) .L80062978: +glabel L80062978 /* 063578 80062978 8FA50048 */ lw $a1, 0x48($sp) .L8006297C: /* 06357C 8006297C 0C0324B4 */ jal alEvtqNextEvent diff --git a/src/unknown_061D30.c b/src/unknown_061D30.c index 095e4eb7..c4cf8bdc 100644 --- a/src/unknown_061D30.c +++ b/src/unknown_061D30.c @@ -8,54 +8,6 @@ const char D_800E6C20[] = "CSP: oh oh \n"; -// Jump table in __CSPVoiceHandler -const u32 D_800E6C30[] = { - 0x8006247C, 0x80062978, 0x800626F8, 0x80062978, - 0x80062978, 0x800624AC, 0x800624FC, 0x8006270C, - 0x80062978, 0x8006248C, 0x80062720, 0x80062978, - 0x80062924, 0x80062944, 0x80062968, 0x80062788, - 0x800627AC, 0x80062880, 0x80062978, 0x80062978, - 0x80062978, 0x800626F8, 0x80062564, 0x80062668 -}; - -// Jump table in __CSPHandleNextSeqEvent -const u32 D_800E6C90[] = { - 0x80062A90, 0x80062AF0, 0x80062AA8, 0x80062AC0, - 0x80062AF0, 0x80062AF0, 0x80062AF0, 0x80062AF0, - 0x80062AF0, 0x80062AF0, 0x80062AF0, 0x80062AF0, - 0x80062AF0, 0x80062AF0, 0x80062AF0, 0x80062AF0, - 0x80062AF0, 0x80062AE8, 0x80062AE8, 0x80062AE8 -}; - -// Jump table in __CSPHandleMIDIMsg -const u32 D_800E6CE0[] = { - 0x80063068, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x80062C38, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800630C0, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x8006319C, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800636E0, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x80063124, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x800637CC, 0x800637CC, 0x800637CC, 0x800637CC, - 0x80063714 -}; - /*********************************/ GLOBAL_ASM("asm/non_matchings/unknown_061D30/alCSPNew.s") From b0e4a1ad38bf7d6efe831146d0cb3c61bede804f Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:37:37 -0500 Subject: [PATCH 49/66] Moved rodata from C to GLOBAL_ASM in unknown_07AF10 --- .../unknown_07AF10/func_8007A310.s | 11 +++++++++++ .../unknown_07AF10/func_8007A550.s | 17 +++++++++++++++-- src/unknown_07AF10.c | 11 ----------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/asm/non_matchings/unknown_07AF10/func_8007A310.s b/asm/non_matchings/unknown_07AF10/func_8007A310.s index 01b7a56a..da0544af 100644 --- a/asm/non_matchings/unknown_07AF10/func_8007A310.s +++ b/asm/non_matchings/unknown_07AF10/func_8007A310.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E7AFC +.float 1.21212125 +glabel D_800E7B00 +.float 1.1 +glabel D_800E7B04 +.float 1.33333333 +glabel D_800E7B08 +.float 1.33333333 + +.text glabel func_8007A310 /* 07AF10 8007A310 3C028000 */ lui $v0, %hi(osTvType) # $v0, 0x8000 /* 07AF14 8007A314 8C420300 */ lw $v0, %lo(osTvType)($v0) diff --git a/asm/non_matchings/unknown_07AF10/func_8007A550.s b/asm/non_matchings/unknown_07AF10/func_8007A550.s index 35120eb0..3aefb1b6 100644 --- a/asm/non_matchings/unknown_07AF10/func_8007A550.s +++ b/asm/non_matchings/unknown_07AF10/func_8007A550.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E7B0C +.word L8007A5AC, L8007A5D0, L8007A658, L8007A6C0, L8007A728, L8007A750, L8007A778, L8007A7A0 + +.text glabel func_8007A550 /* 07B150 8007A550 3C028000 */ lui $v0, %hi(osTvType) # $v0, 0x8000 /* 07B154 8007A554 8C420300 */ lw $v0, %lo(osTvType)($v0) @@ -16,14 +21,15 @@ glabel func_8007A550 .L8007A584: /* 07B184 8007A584 3C0E8012 */ lui $t6, %hi(D_801262CC) # $t6, 0x8012 /* 07B188 8007A588 8DCE62CC */ lw $t6, %lo(D_801262CC)($t6) -/* 07B18C 8007A58C 3C01800E */ lui $at, %hi(D_800E7B0C) # $at, 0x800e +/* 07B18C 8007A58C 3C01800E */ lui $at, %hi(jpt_800E7B0C) # $at, 0x800e /* 07B190 8007A590 31CF0007 */ andi $t7, $t6, 7 /* 07B194 8007A594 000F7880 */ sll $t7, $t7, 2 /* 07B198 8007A598 002F0821 */ addu $at, $at, $t7 -/* 07B19C 8007A59C 8C2F7B0C */ lw $t7, %lo(D_800E7B0C)($at) +/* 07B19C 8007A59C 8C2F7B0C */ lw $t7, %lo(jpt_800E7B0C)($at) /* 07B1A0 8007A5A0 00000000 */ nop /* 07B1A4 8007A5A4 01E00008 */ jr $t7 /* 07B1A8 8007A5A8 00000000 */ nop +glabel L8007A5AC /* 07B1AC 8007A5AC 0003C080 */ sll $t8, $v1, 2 /* 07B1B0 8007A5B0 0303C021 */ addu $t8, $t8, $v1 /* 07B1B4 8007A5B4 3C19800E */ lui $t9, %hi(D_800E3900) # $t9, 0x800e @@ -33,6 +39,7 @@ glabel func_8007A550 /* 07B1C4 8007A5C4 03192021 */ addu $a0, $t8, $t9 /* 07B1C8 8007A5C8 1000007D */ b .L8007A7C0 /* 07B1CC 8007A5CC 00000000 */ nop +glabel L8007A5D0 /* 07B1D0 8007A5D0 3C04800E */ lui $a0, %hi(D_800E4620) # $a0, 0x800e /* 07B1D4 8007A5D4 14400004 */ bnez $v0, .L8007A5E8 /* 07B1D8 8007A5D8 24844620 */ addiu $a0, %lo(D_800E4620) # addiu $a0, $a0, 0x4620 @@ -70,6 +77,7 @@ glabel func_8007A550 /* 07B24C 8007A64C 00A02025 */ move $a0, $a1 /* 07B250 8007A650 1000005B */ b .L8007A7C0 /* 07B254 8007A654 00000000 */ nop +glabel L8007A658 /* 07B258 8007A658 3C04800E */ lui $a0, %hi(D_800E4620) # $a0, 0x800e /* 07B25C 8007A65C 14400004 */ bnez $v0, .L8007A670 /* 07B260 8007A660 24844620 */ addiu $a0, %lo(D_800E4620) # addiu $a0, $a0, 0x4620 @@ -98,6 +106,7 @@ glabel func_8007A550 /* 07B2B4 8007A6B4 AC82003C */ sw $v0, 0x3c($a0) /* 07B2B8 8007A6B8 10000041 */ b .L8007A7C0 /* 07B2BC 8007A6BC 00000000 */ nop +glabel L8007A6C0 /* 07B2C0 8007A6C0 3C04800E */ lui $a0, %hi(D_800E4710) # $a0, 0x800e /* 07B2C4 8007A6C4 14400004 */ bnez $v0, .L8007A6D8 /* 07B2C8 8007A6C8 24844710 */ addiu $a0, %lo(D_800E4710) # addiu $a0, $a0, 0x4710 @@ -126,6 +135,7 @@ glabel func_8007A550 /* 07B31C 8007A71C AC82003C */ sw $v0, 0x3c($a0) /* 07B320 8007A720 10000027 */ b .L8007A7C0 /* 07B324 8007A724 00000000 */ nop +glabel L8007A728 /* 07B328 8007A728 00035880 */ sll $t3, $v1, 2 /* 07B32C 8007A72C 01635821 */ addu $t3, $t3, $v1 /* 07B330 8007A730 000B5900 */ sll $t3, $t3, 4 @@ -136,6 +146,7 @@ glabel func_8007A550 /* 07B344 8007A744 018D2021 */ addu $a0, $t4, $t5 /* 07B348 8007A748 1000001D */ b .L8007A7C0 /* 07B34C 8007A74C 00000000 */ nop +glabel L8007A750 /* 07B350 8007A750 00037080 */ sll $t6, $v1, 2 /* 07B354 8007A754 01C37021 */ addu $t6, $t6, $v1 /* 07B358 8007A758 000E7100 */ sll $t6, $t6, 4 @@ -146,6 +157,7 @@ glabel func_8007A550 /* 07B36C 8007A76C 01F82021 */ addu $a0, $t7, $t8 /* 07B370 8007A770 10000013 */ b .L8007A7C0 /* 07B374 8007A774 00000000 */ nop +glabel L8007A778 /* 07B378 8007A778 0003C880 */ sll $t9, $v1, 2 /* 07B37C 8007A77C 0323C821 */ addu $t9, $t9, $v1 /* 07B380 8007A780 0019C900 */ sll $t9, $t9, 4 @@ -156,6 +168,7 @@ glabel func_8007A550 /* 07B394 8007A794 01092021 */ addu $a0, $t0, $t1 /* 07B398 8007A798 10000009 */ b .L8007A7C0 /* 07B39C 8007A79C 00000000 */ nop +glabel L8007A7A0 /* 07B3A0 8007A7A0 00035080 */ sll $t2, $v1, 2 /* 07B3A4 8007A7A4 01435021 */ addu $t2, $t2, $v1 /* 07B3A8 8007A7A8 000A5100 */ sll $t2, $t2, 4 diff --git a/src/unknown_07AF10.c b/src/unknown_07AF10.c index 3a109177..0e7ba2df 100644 --- a/src/unknown_07AF10.c +++ b/src/unknown_07AF10.c @@ -43,17 +43,6 @@ const char D_800E7A68[] = "640 by 480 Anti-aliased, Interlaced.\n"; const char D_800E7A90[] = "640 by 480 Point sampled, Interlaced, De-flickered.\n"; const char D_800E7AC8[] = "640 by 480 Anti-aliased, Interlaced, De-flickered.\n"; -const FloatLiteral D_800E7AFC = { 1.21212125f }; -const FloatLiteral D_800E7B00 = { 1.1f }; -const FloatLiteral D_800E7B04 = { 1.33333333f }; -const FloatLiteral D_800E7B08 = { 1.33333333f }; - -// Jump table in func_8007A550 -const u32 D_800E7B0C[] = { - 0x8007A5AC, 0x8007A5D0, 0x8007A658, 0x8007A6C0, - 0x8007A728, 0x8007A750, 0x8007A778, 0x8007A7A0 -}; - /*********************************/ /************ .bss ************/ From b835ec3ffdb1bf26305a92f2c80bbea29074fbad Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:39:54 -0500 Subject: [PATCH 50/66] Moved rodata from C to GLOBAL_ASM in unknown_003260 --- asm/non_matchings/unknown_003260/_handleEvent.s | 15 +++++++++++++-- src/unknown_003260.c | 10 +--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/asm/non_matchings/unknown_003260/_handleEvent.s b/asm/non_matchings/unknown_003260/_handleEvent.s index 3995b4a2..ad930044 100644 --- a/asm/non_matchings/unknown_003260/_handleEvent.s +++ b/asm/non_matchings/unknown_003260/_handleEvent.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E4BB0 +.word L800035C4, L80003A0C, L80004090, L80003B2C, L80004090, L80004090, L80004090, L80003C8C, L80004090, L80004090, L80004090, L80004090, L80004090, L80004090, L80004090, L80003BA4 + +.text glabel _handleEvent /* 004070 80003470 27BDFF30 */ addiu $sp, $sp, -0xd0 /* 004074 80003474 AFBE0038 */ sw $fp, 0x38($sp) @@ -84,12 +89,13 @@ glabel _handleEvent /* 0041A0 800035A0 2D210010 */ sltiu $at, $t1, 0x10 /* 0041A4 800035A4 102002BA */ beqz $at, .L80004090 /* 0041A8 800035A8 00094880 */ sll $t1, $t1, 2 -/* 0041AC 800035AC 3C01800E */ lui $at, %hi(D_800E4BB0) # $at, 0x800e +/* 0041AC 800035AC 3C01800E */ lui $at, %hi(jpt_800E4BB0) # $at, 0x800e /* 0041B0 800035B0 00290821 */ addu $at, $at, $t1 -/* 0041B4 800035B4 8C294BB0 */ lw $t1, %lo(D_800E4BB0)($at) +/* 0041B4 800035B4 8C294BB0 */ lw $t1, %lo(jpt_800E4BB0)($at) /* 0041B8 800035B8 00000000 */ nop /* 0041BC 800035BC 01200008 */ jr $t1 /* 0041C0 800035C0 00000000 */ nop +glabel L800035C4 /* 0041C4 800035C4 9222003F */ lbu $v0, 0x3f($s1) /* 0041C8 800035C8 24010005 */ li $at, 5 /* 0041CC 800035CC 10410004 */ beq $v0, $at, .L800035E0 @@ -386,6 +392,7 @@ glabel _handleEvent /* 004604 80003A04 100001A3 */ b .L80004094 /* 004608 80003A08 01601025 */ move $v0, $t3 .L80003A0C: +glabel L80003A0C /* 00460C 80003A0C 24011000 */ li $at, 4096 .L80003A10: /* 004610 80003A10 14610006 */ bne $v1, $at, .L80003A2C @@ -466,6 +473,7 @@ glabel _handleEvent .L80003B24: /* 004724 80003B24 1000015B */ b .L80004094 /* 004728 80003B28 306202D1 */ andi $v0, $v1, 0x2d1 +glabel L80003B2C /* 00472C 80003B2C 8EAA0008 */ lw $t2, 8($s5) /* 004730 80003B30 922B003F */ lbu $t3, 0x3f($s1) /* 004734 80003B34 A22A003C */ sb $t2, 0x3c($s1) @@ -500,6 +508,7 @@ glabel _handleEvent /* 004798 80003B98 304D02D1 */ andi $t5, $v0, 0x2d1 /* 00479C 80003B9C 1000013D */ b .L80004094 /* 0047A0 80003BA0 01A01025 */ move $v0, $t5 +glabel L80003BA4 /* 0047A4 80003BA4 C6A40008 */ lwc1 $f4, 8($s5) /* 0047A8 80003BA8 9229003F */ lbu $t1, 0x3f($s1) /* 0047AC 80003BAC E624002C */ swc1 $f4, 0x2c($s1) @@ -566,6 +575,7 @@ glabel _handleEvent /* 004880 80003C80 304902D1 */ andi $t1, $v0, 0x2d1 /* 004884 80003C84 10000103 */ b .L80004094 /* 004888 80003C88 01201025 */ move $v0, $t1 +glabel L80003C8C /* 00488C 80003C8C 8EB80008 */ lw $t8, 8($s5) /* 004890 80003C90 922E003F */ lbu $t6, 0x3f($s1) /* 004894 80003C94 A6380034 */ sh $t8, 0x34($s1) @@ -835,6 +845,7 @@ glabel _handleEvent /* 004C88 80004088 10000002 */ b .L80004094 /* 004C8C 8000408C 01A01025 */ move $v0, $t5 .L80004090: +glabel L80004090 /* 004C90 80004090 306202D1 */ andi $v0, $v1, 0x2d1 .L80004094: /* 004C94 80004094 8FA30074 */ lw $v1, 0x74($sp) diff --git a/src/unknown_003260.c b/src/unknown_003260.c index dbfc6a6b..9df9b310 100644 --- a/src/unknown_003260.c +++ b/src/unknown_003260.c @@ -113,15 +113,7 @@ const char D_800E4B34[] = "Sound state allocate failed - sndId %d\n"; const char D_800E4B5C[] = "Don't worry - game should cope OK\n"; const char D_800E4B80[] = "WARNING: Attempt to stop NULL sound aborted\n"; -// Jump table for _handleEvent -const u32 D_800E4BB0[] = { - 0x800035C4, 0x80003A0C, 0x80004090, 0x80003B2C, - 0x80004090, 0x80004090, 0x80004090, 0x80003C8C, - 0x80004090, 0x80004090, 0x80004090, 0x80004090, - 0x80004090, 0x80004090, 0x80004090, 0x80003BA4 -}; - -/*******************************/ +/*********************************/ /************ .bss ************/ From 96a06170b963d738281f4911ad88db2b2a361f79 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:42:47 -0500 Subject: [PATCH 51/66] Moved rodata from C to GLOBAL_ASM in unknown_05DCD0 --- .../unknown_05DCD0/func_8005D0D0.s | 11 +++++++ .../unknown_05DCD0/func_8005D820.s | 29 +++++++++++++++++-- src/unknown_05DCD0.c | 23 --------------- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s b/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s index b593bc98..e4eaaede 100644 --- a/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s +++ b/asm/non_matchings/unknown_05DCD0/func_8005D0D0.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E6A30 +.double 0.3 +glabel D_800E6A38 +.double -0.1 +glabel D_800E6A40 +.double 0.1 +glabel D_800E6A48 +.double 700.0 + +.text glabel func_8005D0D0 /* 05DCD0 8005D0D0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 05DCD4 8005D0D4 AFA40060 */ sw $a0, 0x60($sp) diff --git a/asm/non_matchings/unknown_05DCD0/func_8005D820.s b/asm/non_matchings/unknown_05DCD0/func_8005D820.s index 57b4e74f..f523bf35 100644 --- a/asm/non_matchings/unknown_05DCD0/func_8005D820.s +++ b/asm/non_matchings/unknown_05DCD0/func_8005D820.s @@ -1,3 +1,22 @@ +.late_rodata +glabel D_800E6A50 +.double 0.3 +glabel D_800E6A58 +.double -0.3 +glabel D_800E6A60 +.double 0.27 +glabel D_800E6A68 +.double 0.45 +glabel jpt_800E6A70 +.word L8005DBEC, L8005DC10, L8005DC48, L8005DC64, L8005DCBC, L8005DCE8 +glabel D_800E6A88 +.double -0.1 +glabel D_800E6A90 +.double 0.1 +glabel D_800E6A98 +.double 700.0 + +.text glabel func_8005D820 /* 05E420 8005D820 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 05E424 8005D824 AFA40060 */ sw $a0, 0x60($sp) @@ -249,12 +268,13 @@ glabel func_8005D820 .L8005DBCC: /* 05E7CC 8005DBCC 1020004F */ beqz $at, .L8005DD0C /* 05E7D0 8005DBD0 00037880 */ sll $t7, $v1, 2 -/* 05E7D4 8005DBD4 3C01800E */ lui $at, %hi(D_800E6A70) # $at, 0x800e +/* 05E7D4 8005DBD4 3C01800E */ lui $at, %hi(jpt_800E6A70) # $at, 0x800e /* 05E7D8 8005DBD8 002F0821 */ addu $at, $at, $t7 -/* 05E7DC 8005DBDC 8C2F6A70 */ lw $t7, %lo(D_800E6A70)($at) +/* 05E7DC 8005DBDC 8C2F6A70 */ lw $t7, %lo(jpt_800E6A70)($at) /* 05E7E0 8005DBE0 00000000 */ nop /* 05E7E4 8005DBE4 01E00008 */ jr $t7 /* 05E7E8 8005DBE8 00000000 */ nop +glabel L8005DBEC /* 05E7EC 8005DBEC C612000C */ lwc1 $f18, 0xc($s0) /* 05E7F0 8005DBF0 460061A1 */ cvt.d.s $f6, $f12 /* 05E7F4 8005DBF4 46009121 */ cvt.d.s $f4, $f18 @@ -264,6 +284,7 @@ glabel func_8005D820 /* 05E804 8005DC04 24040002 */ li $a0, 2 /* 05E808 8005DC08 10000041 */ b .L8005DD10 /* 05E80C 8005DC0C E60A000C */ swc1 $f10, 0xc($s0) +glabel L8005DC10 /* 05E810 8005DC10 921801CD */ lbu $t8, 0x1cd($s0) /* 05E814 8005DC14 24040002 */ li $a0, 2 /* 05E818 8005DC18 14980006 */ bne $a0, $t8, .L8005DC34 @@ -279,6 +300,7 @@ glabel func_8005D820 /* 05E83C 8005DC3C 46023201 */ sub.s $f8, $f6, $f2 /* 05E840 8005DC40 10000033 */ b .L8005DD10 /* 05E844 8005DC44 E608000C */ swc1 $f8, 0xc($s0) +glabel L8005DC48 /* 05E848 8005DC48 C60A000C */ lwc1 $f10, 0xc($s0) /* 05E84C 8005DC4C 24190002 */ li $t9, 2 /* 05E850 8005DC50 46025481 */ sub.s $f18, $f10, $f2 @@ -286,6 +308,7 @@ glabel func_8005D820 /* 05E858 8005DC58 E612000C */ swc1 $f18, 0xc($s0) /* 05E85C 8005DC5C 1000002C */ b .L8005DD10 /* 05E860 8005DC60 24040002 */ li $a0, 2 +glabel L8005DC64 /* 05E864 8005DC64 920B01CD */ lbu $t3, 0x1cd($s0) /* 05E868 8005DC68 24010004 */ li $at, 4 /* 05E86C 8005DC6C 1561000A */ bne $t3, $at, .L8005DC98 @@ -309,6 +332,7 @@ glabel func_8005D820 /* 05E8B0 8005DCB0 E612000C */ swc1 $f18, 0xc($s0) /* 05E8B4 8005DCB4 10000016 */ b .L8005DD10 /* 05E8B8 8005DCB8 24040002 */ li $a0, 2 +glabel L8005DCBC /* 05E8BC 8005DCBC C604000C */ lwc1 $f4, 0xc($s0) /* 05E8C0 8005DCC0 46006021 */ cvt.d.s $f0, $f12 /* 05E8C4 8005DCC4 46200200 */ add.d $f8, $f0, $f0 @@ -320,6 +344,7 @@ glabel func_8005D820 /* 05E8DC 8005DCDC 24040002 */ li $a0, 2 /* 05E8E0 8005DCE0 1000000B */ b .L8005DD10 /* 05E8E4 8005DCE4 E612000C */ swc1 $f18, 0xc($s0) +glabel L8005DCE8 /* 05E8E8 8005DCE8 C604000C */ lwc1 $f4, 0xc($s0) /* 05E8EC 8005DCEC 46006021 */ cvt.d.s $f0, $f12 /* 05E8F0 8005DCF0 46200200 */ add.d $f8, $f0, $f0 diff --git a/src/unknown_05DCD0.c b/src/unknown_05DCD0.c index 5836dd7f..64c60118 100644 --- a/src/unknown_05DCD0.c +++ b/src/unknown_05DCD0.c @@ -22,29 +22,6 @@ s16 D_800DCE20[16] = { /*******************************/ -/************ .rodata ************/ - -const DoubleLiteral D_800E6A30 = { 0.3 }; -const DoubleLiteral D_800E6A38 = { -0.1 }; -const DoubleLiteral D_800E6A40 = { 0.1 }; -const DoubleLiteral D_800E6A48 = { 700.0 }; -const DoubleLiteral D_800E6A50 = { 0.3 }; -const DoubleLiteral D_800E6A58 = { -0.3 }; -const DoubleLiteral D_800E6A60 = { 0.27 }; -const DoubleLiteral D_800E6A68 = { 0.45 }; - -// Jump table in func_8005D820 -const u32 D_800E6A70[] = { - 0x8005DBEC, 0x8005DC10, 0x8005DC48, 0x8005DC64, - 0x8005DCBC, 0x8005DCE8 -}; - -const DoubleLiteral D_800E6A88 = { -0.1 }; -const DoubleLiteral D_800E6A90 = { 0.1 }; -const DoubleLiteral D_800E6A98 = { 700.0 }; - -/*********************************/ - GLOBAL_ASM("asm/non_matchings/unknown_05DCD0/func_8005D0D0.s") GLOBAL_ASM("asm/non_matchings/unknown_05DCD0/func_8005D820.s") GLOBAL_ASM("asm/non_matchings/unknown_05DCD0/func_8005E204.s") From 63543288ae93377101a079e8cbb9f3a9b067ff0d Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:48:34 -0500 Subject: [PATCH 52/66] Moved rodata from C to GLOBAL_ASM in unknown_0255E0 --- .../unknown_0255E0/func_8002581C.s | 5 +++ .../unknown_0255E0/func_80026070.s | 7 ++++ .../unknown_0255E0/func_80026430.s | 9 +++++ .../unknown_0255E0/func_80027568.s | 7 ++++ .../unknown_0255E0/func_80028FAC.s | 5 +++ .../unknown_0255E0/func_8002A5F8.s | 5 +++ .../unknown_0255E0/func_8002A900.s | 17 ++++++++-- .../unknown_0255E0/func_8002C0C4.s | 6 ++++ .../unknown_0255E0/func_8002DE30.s | 5 +++ .../unknown_0255E0/func_8002E234.s | 9 +++++ .../unknown_0255E0/func_8002F440.s | 7 ++++ .../unknown_0255E0/func_8002FA64.s | 5 +++ src/unknown_0255E0.c | 34 ------------------- 13 files changed, 85 insertions(+), 36 deletions(-) diff --git a/asm/non_matchings/unknown_0255E0/func_8002581C.s b/asm/non_matchings/unknown_0255E0/func_8002581C.s index 3a7450b4..6013280d 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002581C.s +++ b/asm/non_matchings/unknown_0255E0/func_8002581C.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5E60 +.double 250.0 + +.text glabel func_8002581C /* 02641C 8002581C 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 026420 80025820 3C0E8012 */ lui $t6, %hi(D_8011D474) # $t6, 0x8012 diff --git a/asm/non_matchings/unknown_0255E0/func_80026070.s b/asm/non_matchings/unknown_0255E0/func_80026070.s index a0c6a027..61967b04 100644 --- a/asm/non_matchings/unknown_0255E0/func_80026070.s +++ b/asm/non_matchings/unknown_0255E0/func_80026070.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5E68 +.double -300.0 +glabel D_800E5E70 +.double 300.0 + +.text glabel func_80026070 /* 026C70 80026070 27BDFF70 */ addiu $sp, $sp, -0x90 /* 026C74 80026074 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_0255E0/func_80026430.s b/asm/non_matchings/unknown_0255E0/func_80026430.s index fb4c4e40..34a25dd3 100644 --- a/asm/non_matchings/unknown_0255E0/func_80026430.s +++ b/asm/non_matchings/unknown_0255E0/func_80026430.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5E78 +.double 300.0 +glabel D_800E5E80 +.double -300.0 +glabel D_800E5E88 +.double -300.0 + +.text glabel func_80026430 /* 027030 80026430 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 027034 80026434 3C0E8012 */ lui $t6, %hi(D_8011D49E) # $t6, 0x8012 diff --git a/asm/non_matchings/unknown_0255E0/func_80027568.s b/asm/non_matchings/unknown_0255E0/func_80027568.s index 112bbbc0..b064a279 100644 --- a/asm/non_matchings/unknown_0255E0/func_80027568.s +++ b/asm/non_matchings/unknown_0255E0/func_80027568.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5E90 +.double -0.1 +glabel D_800E5E98 +.double -0.1 + +.text glabel func_80027568 /* 028168 80027568 27BDFF18 */ addiu $sp, $sp, -0xe8 /* 02816C 8002756C AFBF0044 */ sw $ra, 0x44($sp) diff --git a/asm/non_matchings/unknown_0255E0/func_80028FAC.s b/asm/non_matchings/unknown_0255E0/func_80028FAC.s index 37f70df5..69e0bce7 100644 --- a/asm/non_matchings/unknown_0255E0/func_80028FAC.s +++ b/asm/non_matchings/unknown_0255E0/func_80028FAC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5EA0 +.double 1000.0 + +.text glabel func_80028FAC /* 029BAC 80028FAC 27BDFE90 */ addiu $sp, $sp, -0x170 /* 029BB0 80028FB0 AFBF003C */ sw $ra, 0x3c($sp) diff --git a/asm/non_matchings/unknown_0255E0/func_8002A5F8.s b/asm/non_matchings/unknown_0255E0/func_8002A5F8.s index da903827..00355b84 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002A5F8.s +++ b/asm/non_matchings/unknown_0255E0/func_8002A5F8.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5EA8 +.double 1000.0 + +.text glabel func_8002A5F8 /* 02B1F8 8002A5F8 27BDFF88 */ addiu $sp, $sp, -0x78 /* 02B1FC 8002A5FC AFB30040 */ sw $s3, 0x40($sp) diff --git a/asm/non_matchings/unknown_0255E0/func_8002A900.s b/asm/non_matchings/unknown_0255E0/func_8002A900.s index 7ce2076d..c752834e 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002A900.s +++ b/asm/non_matchings/unknown_0255E0/func_8002A900.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5EB0 +.double 0.8 +glabel D_800E5EB8 +.double 255.0 +glabel jpt_800E5EC0 +.word L8002AB40, L8002AB40, L8002AB54, L8002AB40, L8002AB40, L8002AB54, L8002AB40, L8002AB54, L8002AB2C, L8002AB54, L8002AB54, L8002AB54, L8002AB58, L8002AB54, L8002AB54, L8002AB54, L8002AB54, L8002AB54, L8002AB54, L8002AB54, L8002AB40, L8002AB54, L8002AB40, L8002AB54, L8002AB54, L8002AB54, L8002AB54, L8002AB58, L8002AB54, L8002AB54, L8002AB58, L8002AB40 + +.text glabel func_8002A900 /* 02B500 8002A900 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 02B504 8002A904 AFBF0034 */ sw $ra, 0x34($sp) @@ -123,9 +132,9 @@ glabel func_8002A900 /* 02B6D4 8002AAD4 2D610020 */ sltiu $at, $t3, 0x20 /* 02B6D8 8002AAD8 1020001E */ beqz $at, .L8002AB54 /* 02B6DC 8002AADC 000B5880 */ sll $t3, $t3, 2 -/* 02B6E0 8002AAE0 3C01800E */ lui $at, %hi(D_800E5EC0) # $at, 0x800e +/* 02B6E0 8002AAE0 3C01800E */ lui $at, %hi(jpt_800E5EC0) # $at, 0x800e /* 02B6E4 8002AAE4 002B0821 */ addu $at, $at, $t3 -/* 02B6E8 8002AAE8 8C2B5EC0 */ lw $t3, %lo(D_800E5EC0)($at) +/* 02B6E8 8002AAE8 8C2B5EC0 */ lw $t3, %lo(jpt_800E5EC0)($at) /* 02B6EC 8002AAEC 00000000 */ nop /* 02B6F0 8002AAF0 01600008 */ jr $t3 /* 02B6F4 8002AAF4 00000000 */ nop @@ -143,19 +152,23 @@ glabel func_8002A900 /* 02B720 8002AB20 000E7A03 */ sra $t7, $t6, 8 /* 02B724 8002AB24 1000000C */ b .L8002AB58 /* 02B728 8002AB28 A08F0039 */ sb $t7, 0x39($a0) +glabel L8002AB2C /* 02B72C 8002AB2C 8C820064 */ lw $v0, 0x64($a0) /* 02B730 8002AB30 00000000 */ nop /* 02B734 8002AB34 905801F7 */ lbu $t8, 0x1f7($v0) /* 02B738 8002AB38 10000007 */ b .L8002AB58 /* 02B73C 8002AB3C A0980039 */ sb $t8, 0x39($a0) +glabel L8002AB40 /* 02B740 8002AB40 8C820064 */ lw $v0, 0x64($a0) /* 02B744 8002AB44 00000000 */ nop /* 02B748 8002AB48 90590042 */ lbu $t9, 0x42($v0) /* 02B74C 8002AB4C 10000002 */ b .L8002AB58 /* 02B750 8002AB50 A0990039 */ sb $t9, 0x39($a0) .L8002AB54: +glabel L8002AB54 /* 02B754 8002AB54 A0850039 */ sb $a1, 0x39($a0) .L8002AB58: +glabel L8002AB58 /* 02B758 8002AB58 3C028012 */ lui $v0, %hi(D_8011D0F8) # $v0, 0x8012 /* 02B75C 8002AB5C 3C038012 */ lui $v1, %hi(D_8011D128) # $v1, 0x8012 /* 02B760 8002AB60 C492000C */ lwc1 $f18, 0xc($a0) diff --git a/asm/non_matchings/unknown_0255E0/func_8002C0C4.s b/asm/non_matchings/unknown_0255E0/func_8002C0C4.s index 44448e78..bbc62e62 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002C0C4.s +++ b/asm/non_matchings/unknown_0255E0/func_8002C0C4.s @@ -1,3 +1,9 @@ +.rdata +glabel D_800E5E38 +.asciz "ERROR!! TrackMem overflow .. %d\n" +.ascii "\0\0\0" # padding + +.text glabel func_8002C0C4 /* 02CCC4 8002C0C4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 02CCC8 8002C0C8 AFB2001C */ sw $s2, 0x1c($sp) diff --git a/asm/non_matchings/unknown_0255E0/func_8002DE30.s b/asm/non_matchings/unknown_0255E0/func_8002DE30.s index 9dabff30..a6d02aad 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002DE30.s +++ b/asm/non_matchings/unknown_0255E0/func_8002DE30.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5F40 +.double 0.2 + +.text glabel func_8002DE30 /* 02EA30 8002DE30 27BDFF68 */ addiu $sp, $sp, -0x98 /* 02EA34 8002DE34 444EF800 */ cfc1 $t6, $31 diff --git a/asm/non_matchings/unknown_0255E0/func_8002E234.s b/asm/non_matchings/unknown_0255E0/func_8002E234.s index e8034f28..e6d4a0d5 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002E234.s +++ b/asm/non_matchings/unknown_0255E0/func_8002E234.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E5F48 +.float 1.4 +glabel D_800E5F4C +.float 0.714 +glabel D_800E5F50 +.float 0.005 + +.text glabel func_8002E234 /* 02EE34 8002E234 27BDFF00 */ addiu $sp, $sp, -0x100 /* 02EE38 8002E238 444EF800 */ cfc1 $t6, $31 diff --git a/asm/non_matchings/unknown_0255E0/func_8002F440.s b/asm/non_matchings/unknown_0255E0/func_8002F440.s index b916ec5c..e4c226f5 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002F440.s +++ b/asm/non_matchings/unknown_0255E0/func_8002F440.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E5F54 +.float 1.4142 +glabel D_800E5F58 +.float 0.005 + +.text glabel func_8002F440 /* 030040 8002F440 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 030044 8002F444 3C0C8012 */ lui $t4, %hi(D_8011D0C4) # $t4, 0x8012 diff --git a/asm/non_matchings/unknown_0255E0/func_8002FA64.s b/asm/non_matchings/unknown_0255E0/func_8002FA64.s index 3c8e2675..321cafeb 100644 --- a/asm/non_matchings/unknown_0255E0/func_8002FA64.s +++ b/asm/non_matchings/unknown_0255E0/func_8002FA64.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E5F5C +.float 0.99 + +.text glabel func_8002FA64 /* 030664 8002FA64 27BDFF88 */ addiu $sp, $sp, -0x78 /* 030668 8002FA68 3C038012 */ lui $v1, %hi(D_8011C230) # $v1, 0x8012 diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index 4695fa7d..efbade6a 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -129,40 +129,6 @@ s8 D_800DC92C[24] = { const char D_800E5DF0[] = "TT CAM"; const char D_800E5DF8[] = "Solid Clipping x0=x1 Error!!!\n"; const char D_800E5E10[] = "TrackGetHeight() - Overflow!!!\n"; -const char D_800E5E38[] = "ERROR!! TrackMem overflow .. %d\n"; - -const DoubleLiteral D_800E5E60 = { 250.0 }; -const DoubleLiteral D_800E5E68 = { -300.0 }; -const DoubleLiteral D_800E5E70 = { 300.0 }; -const DoubleLiteral D_800E5E78 = { 300.0 }; -const DoubleLiteral D_800E5E80 = { -300.0 }; -const DoubleLiteral D_800E5E88 = { -300.0 }; -const DoubleLiteral D_800E5E90 = { -0.1 }; -const DoubleLiteral D_800E5E98 = { -0.1 }; -const DoubleLiteral D_800E5EA0 = { 1000.0 }; -const DoubleLiteral D_800E5EA8 = { 1000.0 }; -const DoubleLiteral D_800E5EB0 = { 0.8 }; -const DoubleLiteral D_800E5EB8 = { 255.0 }; - -// Jump table in func_8002A900 -const u32 D_800E5EC0[] = { - 0x8002AB40, 0x8002AB40, 0x8002AB54, 0x8002AB40, - 0x8002AB40, 0x8002AB54, 0x8002AB40, 0x8002AB54, - 0x8002AB2C, 0x8002AB54, 0x8002AB54, 0x8002AB54, - 0x8002AB58, 0x8002AB54, 0x8002AB54, 0x8002AB54, - 0x8002AB54, 0x8002AB54, 0x8002AB54, 0x8002AB54, - 0x8002AB40, 0x8002AB54, 0x8002AB40, 0x8002AB54, - 0x8002AB54, 0x8002AB54, 0x8002AB54, 0x8002AB58, - 0x8002AB54, 0x8002AB54, 0x8002AB58, 0x8002AB40 -}; - -const DoubleLiteral D_800E5F40 = { 0.2 }; -const FloatLiteral D_800E5F48 = { 1.4f }; -const FloatLiteral D_800E5F4C = { 0.714f }; -const FloatLiteral D_800E5F50 = { 0.005f }; -const FloatLiteral D_800E5F54 = { 1.4142f }; -const FloatLiteral D_800E5F58 = { 0.005f }; -const FloatLiteral D_800E5F5C = { 0.99f }; /*********************************/ From 51dac5f9fc6efd0eee10fbd511154869809a5ea2 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:51:30 -0500 Subject: [PATCH 53/66] Moved rodata from C to GLOBAL_ASM in unknown_079F50 --- asm/non_matchings/unknown_079F50/__scSchedule.s | 12 ++++++++++-- asm/non_matchings/unknown_079F50/func_80079B44.s | 5 +++++ src/unknown_079F50.c | 11 +---------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/asm/non_matchings/unknown_079F50/__scSchedule.s b/asm/non_matchings/unknown_079F50/__scSchedule.s index a494d917..ec4d8aeb 100644 --- a/asm/non_matchings/unknown_079F50/__scSchedule.s +++ b/asm/non_matchings/unknown_079F50/__scSchedule.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E7970 +.word L8007A2A4, L8007A248, L8007A1BC, L8007A2A4, L8007A2A4, L8007A248, L8007A248 + +.text glabel __scSchedule /* 07ACD4 8007A0D4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 07ACD8 8007A0D8 AFB10018 */ sw $s1, 0x18($sp) @@ -55,12 +60,13 @@ glabel __scSchedule /* 07AD98 8007A198 2DE10007 */ sltiu $at, $t7, 7 /* 07AD9C 8007A19C 10200041 */ beqz $at, .L8007A2A4 /* 07ADA0 8007A1A0 000F7880 */ sll $t7, $t7, 2 -/* 07ADA4 8007A1A4 3C01800E */ lui $at, %hi(D_800E7970) # $at, 0x800e +/* 07ADA4 8007A1A4 3C01800E */ lui $at, %hi(jpt_800E7970) # $at, 0x800e /* 07ADA8 8007A1A8 002F0821 */ addu $at, $at, $t7 -/* 07ADAC 8007A1AC 8C2F7970 */ lw $t7, %lo(D_800E7970)($at) +/* 07ADAC 8007A1AC 8C2F7970 */ lw $t7, %lo(jpt_800E7970)($at) /* 07ADB0 8007A1B0 00000000 */ nop /* 07ADB4 8007A1B4 01E00008 */ jr $t7 /* 07ADB8 8007A1B8 00000000 */ nop +glabel L8007A1BC /* 07ADBC 8007A1BC 8E180004 */ lw $t8, 4($s0) /* 07ADC0 8007A1C0 30EA0002 */ andi $t2, $a3, 2 /* 07ADC4 8007A1C4 33190020 */ andi $t9, $t8, 0x20 @@ -98,6 +104,7 @@ glabel __scSchedule /* 07AE3C 8007A23C AE390268 */ sw $t9, 0x268($s1) /* 07AE40 8007A240 10000018 */ b .L8007A2A4 /* 07AE44 8007A244 AE200270 */ sw $zero, 0x270($s1) +glabel L8007A248 /* 07AE48 8007A248 8E020004 */ lw $v0, 4($s0) /* 07AE4C 8007A24C 30EC0002 */ andi $t4, $a3, 2 /* 07AE50 8007A250 304B0002 */ andi $t3, $v0, 2 @@ -123,6 +130,7 @@ glabel __scSchedule /* 07AE9C 8007A29C AE380268 */ sw $t8, 0x268($s1) /* 07AEA0 8007A2A0 AE200270 */ sw $zero, 0x270($s1) .L8007A2A4: +glabel L8007A2A4 /* 07AEA4 8007A2A4 10670004 */ beq $v1, $a3, .L8007A2B8 /* 07AEA8 8007A2A8 8FBF001C */ lw $ra, 0x1c($sp) /* 07AEAC 8007A2AC 1000FF8F */ b .L8007A0EC diff --git a/asm/non_matchings/unknown_079F50/func_80079B44.s b/asm/non_matchings/unknown_079F50/func_80079B44.s index 3db1ca16..65f60a7a 100644 --- a/asm/non_matchings/unknown_079F50/func_80079B44.s +++ b/asm/non_matchings/unknown_079F50/func_80079B44.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E796C +.float 468750.0 + +.text glabel func_80079B44 /* 07A744 80079B44 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 07A748 80079B48 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/src/unknown_079F50.c b/src/unknown_079F50.c index ae78025d..4558e128 100644 --- a/src/unknown_079F50.c +++ b/src/unknown_079F50.c @@ -105,14 +105,6 @@ const char D_800E7928[] = "\toutput_buff_size\t\t= %u\n"; const char D_800E7944[] = "\tdata_ptr\t\t= %p\n"; const char D_800E7958[] = "\tdata_size\t\t= %u\n"; -const FloatLiteral D_800E796C = { 468750.0f }; - -// Jump table in __scSchedule -const u32 D_800E7970[] = { - 0x8007A2A4, 0x8007A248, 0x8007A1BC, 0x8007A2A4, - 0x8007A2A4, 0x8007A248, 0x8007A248 -}; - /*********************************/ extern OSViMode D_800E3900[];//osViModeTable; @@ -211,7 +203,6 @@ extern f32 D_800DE744; extern f32 D_800DE748; extern f32 D_800DE74C; extern u32 D_800DE750; -extern f32 D_800E796C; extern u32 D_80126124; void func_80079B44(OSSched *sc){ OSScTask *t, *sp = 0, *dp = 0; @@ -232,7 +223,7 @@ void func_80079B44(OSSched *sc){ if(delta < 0){ tmp1 += 4294967296.0; } - D_800DE74C = tmp1*60.0f/D_800E796C; + D_800DE74C = tmp1*60.0f/468750.0f; D_800DE744 = D_800DE744 + D_800DE74C; if(D_800DE740 < D_800DE74C){ D_800DE740 = D_800DE74C; From 4bc93e4dcba1cb8e032ee4e3c3723e58fb32f946 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 14:59:17 -0500 Subject: [PATCH 54/66] Split unknown_05F690 into unknown_05FF10 & unknown_060450 --- src/unknown_05F690.c | 48 ++------------------------------------------ src/unknown_05FF10.c | 28 ++++++++++++++++++++++++++ src/unknown_060450.c | 37 ++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 46 deletions(-) create mode 100644 src/unknown_05FF10.c create mode 100644 src/unknown_060450.c diff --git a/src/unknown_05F690.c b/src/unknown_05F690.c index c09fcd4a..b71535c8 100644 --- a/src/unknown_05F690.c +++ b/src/unknown_05F690.c @@ -6,24 +6,13 @@ /************ .data ************/ -s16 D_800DCE60[16] = { +s16 D_800DCE60[14] = { 0x022C, 0x00A5, 0x00A6, 0x0057, 0x0051, 0x006D, 0x0052, 0x00F8, 0x00F9, 0x0227, 0x0228, 0x002E, - 0x002F, 0x0030, 0x0000, 0x0000 + 0x002F, 0x0030 }; - -s16 D_800DCE80[16] = { - 0x022C, 0x00A5, 0x00A6, 0x0057, - 0x0051, 0x006D, 0x0052, 0x00F8, - 0x00F9, 0x0227, 0x0228, 0x002E, - 0x002F, 0x0030, 0x0000, 0x0000 -}; - -s32 D_800DCEA0 = 116315; -s32 D_800DCEA4 = 1980; - /*******************************/ /************ .rodata ************/ @@ -42,39 +31,6 @@ const u32 D_800E6AD0[] = { const DoubleLiteral D_800E6AE8 = { -0.1 }; const DoubleLiteral D_800E6AF0 = { 0.1 }; -// This is probably just file boundary padding. -const DoubleLiteral D_800E6AF8 = { 0.0 }; - -const DoubleLiteral D_800E6B00 = { 0.3 }; -const DoubleLiteral D_800E6B08 = { -0.3 }; -const DoubleLiteral D_800E6B10 = { 0.4 }; - -// This is another file boundary. -const DoubleLiteral D_800E6B18 = { 0.0 }; - -// I am not sure where these go. It is hard to tell without any glabels. -// Need to figure out which file handles creating models. -const char D_800E6B20[] = "Error: Model no. out of range on load. !!\n"; -const char D_800E6B4C[] = "TEXTURE ERROR!!\n%d,%d\n"; -const char D_800E6B64[] = "Error: Model table overflow!!\n"; -const char D_800E6B84[] = "WARNING :: createModelInstance called with NULL pointer\n"; -const char D_800E6BC0[] = "ModFreeModel : NULL mod_inst!!\n"; -const char D_800E6BE0[] = "MOD Error: Tryed to deallocate non-existent model!!\n"; - /*********************************/ GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005EA90.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F310.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F850.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F99C.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005FCD0.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005FF40.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060058.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8006017C.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060910.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060AC8.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060C58.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060EA8.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_800619F4.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80061A00.s") -GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80061C0C.s") diff --git a/src/unknown_05FF10.c b/src/unknown_05FF10.c new file mode 100644 index 00000000..71aeb2ca --- /dev/null +++ b/src/unknown_05FF10.c @@ -0,0 +1,28 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x8005F310 */ + +#include "types.h" +#include "macros.h" + + +/************ .data ************/ + +s16 D_800DCE80[14] = { + 0x022C, 0x00A5, 0x00A6, 0x0057, + 0x0051, 0x006D, 0x0052, 0x00F8, + 0x00F9, 0x0227, 0x0228, 0x002E, + 0x002F, 0x0030 +}; + +/*******************************/ + +/************ .rodata ************/ + +const DoubleLiteral D_800E6B00 = { 0.3 }; +const DoubleLiteral D_800E6B08 = { -0.3 }; +const DoubleLiteral D_800E6B10 = { 0.4 }; + +/*********************************/ + + +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F310.s") \ No newline at end of file diff --git a/src/unknown_060450.c b/src/unknown_060450.c new file mode 100644 index 00000000..abb9907f --- /dev/null +++ b/src/unknown_060450.c @@ -0,0 +1,37 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x8005F850 */ + +#include "types.h" +#include "macros.h" + +/************ .data ************/ + +s32 D_800DCEA0 = 116315; +s32 D_800DCEA4 = 1980; + +/*******************************/ + +/************ .rodata ************/ + +const char D_800E6B20[] = "Error: Model no. out of range on load. !!\n"; +const char D_800E6B4C[] = "TEXTURE ERROR!!\n%d,%d\n"; +const char D_800E6B64[] = "Error: Model table overflow!!\n"; +const char D_800E6B84[] = "WARNING :: createModelInstance called with NULL pointer\n"; +const char D_800E6BC0[] = "ModFreeModel : NULL mod_inst!!\n"; +const char D_800E6BE0[] = "MOD Error: Tryed to deallocate non-existent model!!\n"; + +/*********************************/ + +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F850.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F99C.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005FCD0.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005FF40.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060058.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8006017C.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060910.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060AC8.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060C58.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80060EA8.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_800619F4.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80061A00.s") +GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_80061C0C.s") \ No newline at end of file From 721887a4d99c2db738097af67e7604fd0c7bc9c3 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 15:00:16 -0500 Subject: [PATCH 55/66] Moved rodata from C to GLOBAL_ASM in unknown_05F690 --- .../unknown_05F690/func_8005EA90.s | 27 +++++++++++++++++-- src/unknown_05F690.c | 18 ------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/asm/non_matchings/unknown_05F690/func_8005EA90.s b/asm/non_matchings/unknown_05F690/func_8005EA90.s index 962ac2f9..11c123e4 100644 --- a/asm/non_matchings/unknown_05F690/func_8005EA90.s +++ b/asm/non_matchings/unknown_05F690/func_8005EA90.s @@ -1,3 +1,20 @@ +.late_rodata +glabel D_800E6AB0 +.double 0.3 +glabel D_800E6AB8 +.double -0.3 +glabel D_800E6AC0 +.double 0.4 +glabel D_800E6AC8 +.double 0.45 +glabel jpt_800E6AD0 +.word L8005EE9C, L8005EEC0, L8005EEF8, L8005EF14, L8005EF6C, L8005EF98 +glabel D_800E6AE8 +.double -0.1 +glabel D_800E6AF0 +.double 0.1 + +.text glabel func_8005EA90 /* 05F690 8005EA90 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 05F694 8005EA94 AFA40040 */ sw $a0, 0x40($sp) @@ -264,12 +281,13 @@ glabel func_8005EA90 .L8005EE7C: /* 05FA7C 8005EE7C 1020004F */ beqz $at, .L8005EFBC /* 05FA80 8005EE80 00035880 */ sll $t3, $v1, 2 -/* 05FA84 8005EE84 3C01800E */ lui $at, %hi(D_800E6AD0) # $at, 0x800e +/* 05FA84 8005EE84 3C01800E */ lui $at, %hi(jpt_800E6AD0) # $at, 0x800e /* 05FA88 8005EE88 002B0821 */ addu $at, $at, $t3 -/* 05FA8C 8005EE8C 8C2B6AD0 */ lw $t3, %lo(D_800E6AD0)($at) +/* 05FA8C 8005EE8C 8C2B6AD0 */ lw $t3, %lo(jpt_800E6AD0)($at) /* 05FA90 8005EE90 00000000 */ nop /* 05FA94 8005EE94 01600008 */ jr $t3 /* 05FA98 8005EE98 00000000 */ nop +glabel L8005EE9C /* 05FA9C 8005EE9C C606000C */ lwc1 $f6, 0xc($s0) /* 05FAA0 8005EEA0 460072A1 */ cvt.d.s $f10, $f14 /* 05FAA4 8005EEA4 46003221 */ cvt.d.s $f8, $f6 @@ -279,6 +297,7 @@ glabel func_8005EA90 /* 05FAB4 8005EEB4 24040002 */ li $a0, 2 /* 05FAB8 8005EEB8 10000041 */ b .L8005EFC0 /* 05FABC 8005EEBC E606000C */ swc1 $f6, 0xc($s0) +glabel L8005EEC0 /* 05FAC0 8005EEC0 920C01CD */ lbu $t4, 0x1cd($s0) /* 05FAC4 8005EEC4 24040002 */ li $a0, 2 /* 05FAC8 8005EEC8 148C0006 */ bne $a0, $t4, .L8005EEE4 @@ -294,6 +313,7 @@ glabel func_8005EA90 /* 05FAEC 8005EEEC 460C2181 */ sub.s $f6, $f4, $f12 /* 05FAF0 8005EEF0 10000033 */ b .L8005EFC0 /* 05FAF4 8005EEF4 E606000C */ swc1 $f6, 0xc($s0) +glabel L8005EEF8 /* 05FAF8 8005EEF8 C608000C */ lwc1 $f8, 0xc($s0) /* 05FAFC 8005EEFC 240D0002 */ li $t5, 2 /* 05FB00 8005EF00 460C4281 */ sub.s $f10, $f8, $f12 @@ -301,6 +321,7 @@ glabel func_8005EA90 /* 05FB08 8005EF08 E60A000C */ swc1 $f10, 0xc($s0) /* 05FB0C 8005EF0C 1000002C */ b .L8005EFC0 /* 05FB10 8005EF10 24040002 */ li $a0, 2 +glabel L8005EF14 /* 05FB14 8005EF14 920E01CD */ lbu $t6, 0x1cd($s0) /* 05FB18 8005EF18 24010004 */ li $at, 4 /* 05FB1C 8005EF1C 15C1000A */ bne $t6, $at, .L8005EF48 @@ -324,6 +345,7 @@ glabel func_8005EA90 /* 05FB60 8005EF60 E606000C */ swc1 $f6, 0xc($s0) /* 05FB64 8005EF64 10000016 */ b .L8005EFC0 /* 05FB68 8005EF68 24040002 */ li $a0, 2 +glabel L8005EF6C /* 05FB6C 8005EF6C C608000C */ lwc1 $f8, 0xc($s0) /* 05FB70 8005EF70 46007021 */ cvt.d.s $f0, $f14 /* 05FB74 8005EF74 46200100 */ add.d $f4, $f0, $f0 @@ -335,6 +357,7 @@ glabel func_8005EA90 /* 05FB8C 8005EF8C 24040002 */ li $a0, 2 /* 05FB90 8005EF90 1000000B */ b .L8005EFC0 /* 05FB94 8005EF94 E608000C */ swc1 $f8, 0xc($s0) +glabel L8005EF98 /* 05FB98 8005EF98 C60A000C */ lwc1 $f10, 0xc($s0) /* 05FB9C 8005EF9C 46007021 */ cvt.d.s $f0, $f14 /* 05FBA0 8005EFA0 46200180 */ add.d $f6, $f0, $f0 diff --git a/src/unknown_05F690.c b/src/unknown_05F690.c index b71535c8..89ef6864 100644 --- a/src/unknown_05F690.c +++ b/src/unknown_05F690.c @@ -15,22 +15,4 @@ s16 D_800DCE60[14] = { /*******************************/ -/************ .rodata ************/ - -const DoubleLiteral D_800E6AB0 = { 0.3 }; -const DoubleLiteral D_800E6AB8 = { -0.3 }; -const DoubleLiteral D_800E6AC0 = { 0.4 }; -const DoubleLiteral D_800E6AC8 = { 0.45 }; - -// Jump table in func_8005EA90 -const u32 D_800E6AD0[] = { - 0x8005EE9C, 0x8005EEC0, 0x8005EEF8, 0x8005EF14, - 0x8005EF6C, 0x8005EF98 -}; - -const DoubleLiteral D_800E6AE8 = { -0.1 }; -const DoubleLiteral D_800E6AF0 = { 0.1 }; - -/*********************************/ - GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005EA90.s") From 807b4ee29b71b340d26051b278bd8c3b83e5d776 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 15:03:18 -0500 Subject: [PATCH 56/66] Moved rodata from C to GLOBAL_ASM in unknown_05FF10 --- asm/non_matchings/unknown_05F690/func_8005F310.s | 9 +++++++++ src/unknown_05FF10.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/asm/non_matchings/unknown_05F690/func_8005F310.s b/asm/non_matchings/unknown_05F690/func_8005F310.s index b6276a4f..5cf32d49 100644 --- a/asm/non_matchings/unknown_05F690/func_8005F310.s +++ b/asm/non_matchings/unknown_05F690/func_8005F310.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E6B00 +.double 0.3 +glabel D_800E6B08 +.double -0.3 +glabel D_800E6B10 +.double 0.4 + +.text glabel func_8005F310 /* 05FF10 8005F310 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 05FF14 8005F314 AFA40040 */ sw $a0, 0x40($sp) diff --git a/src/unknown_05FF10.c b/src/unknown_05FF10.c index 71aeb2ca..27129541 100644 --- a/src/unknown_05FF10.c +++ b/src/unknown_05FF10.c @@ -16,13 +16,4 @@ s16 D_800DCE80[14] = { /*******************************/ -/************ .rodata ************/ - -const DoubleLiteral D_800E6B00 = { 0.3 }; -const DoubleLiteral D_800E6B08 = { -0.3 }; -const DoubleLiteral D_800E6B10 = { 0.4 }; - -/*********************************/ - - GLOBAL_ASM("asm/non_matchings/unknown_05F690/func_8005F310.s") \ No newline at end of file From 04f1246fe6dbd5119873457ac0940571ad00214b Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 15:06:48 -0500 Subject: [PATCH 57/66] Updated rodata_move.py --- tools/python/rodata_move.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index 7a98fb2e..0390b1e8 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -12,6 +12,9 @@ C_JMPTABLE_REGEX = r"(?:(?:D_)|0x)[0-9A-Fa-f]{8}" NO_OUTPUT = False # If True, then no files will be changed. ONLY_THE_FIRST_ASM_FILE = False # If True, then only one asm file will be changed. +#ASM_DIRECTORY = 'asm/non_matchings/' +ASM_DIRECTORY = 'lib/asm/non_matchings/' + def getMatches(string, regex): out = [] matches = re.finditer(regex, string, re.MULTILINE) @@ -36,7 +39,7 @@ def getLineType(line): return 0 def getAsmFileReferenceForLabel(filename, label): - searchLabel = 'asm/non_matchings/'+filename + searchLabel = ASM_DIRECTORY + filename possibleFiles = [] search = os.popen('fgrep -r "' + label + '"').read().split('\n') for line in search: From 6f12152b2b711416144552a27e5f27db2a43db6e Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 15:17:20 -0500 Subject: [PATCH 58/66] Moved rodata from C to GLOBAL_ASM in lib/unknown_0CA9A0 --- .../unknown_0CA9A0/alEnvMixerPull.s | 29 +++++++++++++++-- .../unknown_0CA9A0/alResampleParam.s | 15 +++++++-- .../unknown_0CA9A0/alResamplePull.s | 7 ++++ .../unknown_0CA9A0/func_800CAC5C.s | 9 ++++++ .../unknown_0CA9A0/func_800CB2D4.s | 5 +++ lib/src/unknown_0CA9A0.c | 32 ------------------- tools/asm_processor/build.py | 3 +- 7 files changed, 63 insertions(+), 37 deletions(-) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s b/lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s index 0223ecb5..fd46b47c 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s @@ -1,3 +1,22 @@ +.rdata +glabel D_800E9560 +.asciz "samples >= 0" +.ascii "\0\0\0" # padding +glabel D_800E9570 +.asciz "env.c" +.ascii "\0\0" # padding +glabel D_800E9578 +.asciz "samples <= AL_MAX_RSP_SAMPLES" +.ascii "\0\0" # padding +glabel D_800E9598 +.asciz "env.c" +.ascii "\0\0" # padding + +.late_rodata +glabel jpt_800E95B0 +.word L800CA870, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA8C4, L800CA460, L800CA460, L800CA22C, L800CA7A8, L800CA828, L800CA460 + +.text glabel alEnvMixerPull /* 0CACD0 800CA0D0 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 0CACD4 800CA0D4 AFBF001C */ sw $ra, 0x1c($sp) @@ -86,12 +105,13 @@ glabel alEnvMixerPull /* 0CAE08 800CA208 102001AE */ beqz $at, .L800CA8C4 /* 0CAE0C 800CA20C 00000000 */ nop /* 0CAE10 800CA210 000C6080 */ sll $t4, $t4, 2 -/* 0CAE14 800CA214 3C01800F */ lui $at, %hi(D_800E95B0) # $at, 0x800f +/* 0CAE14 800CA214 3C01800F */ lui $at, %hi(jpt_800E95B0) # $at, 0x800f /* 0CAE18 800CA218 002C0821 */ addu $at, $at, $t4 -/* 0CAE1C 800CA21C 8C2C95B0 */ lw $t4, %lo(D_800E95B0)($at) +/* 0CAE1C 800CA21C 8C2C95B0 */ lw $t4, %lo(jpt_800E95B0)($at) /* 0CAE20 800CA220 00000000 */ nop /* 0CAE24 800CA224 01800008 */ jr $t4 /* 0CAE28 800CA228 00000000 */ nop +glabel L800CA22C /* 0CAE2C 800CA22C 8FAD0058 */ lw $t5, 0x58($sp) /* 0CAE30 800CA230 00000000 */ nop /* 0CAE34 800CA234 8DAE003C */ lw $t6, 0x3c($t5) @@ -240,6 +260,7 @@ glabel alEnvMixerPull .L800CA458: /* 0CB058 800CA458 10000134 */ b .L800CA92C /* 0CB05C 800CA45C 00000000 */ nop +glabel L800CA460 /* 0CB060 800CA460 8FB8006C */ lw $t8, 0x6c($sp) /* 0CB064 800CA464 8FA8005C */ lw $t0, 0x5c($sp) /* 0CB068 800CA468 8FA40058 */ lw $a0, 0x58($sp) @@ -460,6 +481,7 @@ glabel alEnvMixerPull /* 0CB39C 800CA79C ADF90038 */ sw $t9, 0x38($t7) /* 0CB3A0 800CA7A0 10000062 */ b .L800CA92C /* 0CB3A4 800CA7A4 00000000 */ nop +glabel L800CA7A8 /* 0CB3A8 800CA7A8 8FAD0058 */ lw $t5, 0x58($sp) /* 0CB3AC 800CA7AC 00000000 */ nop /* 0CB3B0 800CA7B0 8DAC003C */ lw $t4, 0x3c($t5) @@ -493,6 +515,7 @@ glabel alEnvMixerPull /* 0CB41C 800CA81C 01002025 */ move $a0, $t0 /* 0CB420 800CA820 10000042 */ b .L800CA92C /* 0CB424 800CA824 00000000 */ nop +glabel L800CA828 /* 0CB428 800CA828 8FAF006C */ lw $t7, 0x6c($sp) /* 0CB42C 800CA82C 8FAD005C */ lw $t5, 0x5c($sp) /* 0CB430 800CA830 8FA40058 */ lw $a0, 0x58($sp) @@ -511,6 +534,7 @@ glabel alEnvMixerPull /* 0CB464 800CA864 01802025 */ move $a0, $t4 /* 0CB468 800CA868 10000030 */ b .L800CA92C /* 0CB46C 800CA86C 00000000 */ nop +glabel L800CA870 /* 0CB470 800CA870 3C0A800E */ lui $t2, %hi(alGlobals) # $t2, 0x800e /* 0CB474 800CA874 8D4A3780 */ lw $t2, %lo(alGlobals)($t2) /* 0CB478 800CA878 00000000 */ nop @@ -533,6 +557,7 @@ glabel alEnvMixerPull /* 0CB4BC 800CA8BC 1000001B */ b .L800CA92C /* 0CB4C0 800CA8C0 00000000 */ nop .L800CA8C4: +glabel L800CA8C4 /* 0CB4C4 800CA8C4 8FAF006C */ lw $t7, 0x6c($sp) /* 0CB4C8 800CA8C8 8FAD005C */ lw $t5, 0x5c($sp) /* 0CB4CC 800CA8CC 8FA40058 */ lw $a0, 0x58($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s b/lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s index a587bdec..bbe73705 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alResampleParam.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E9600 +.word L800CC0C0, L800CC150, L800CC150, L800CC0C8, L800CC150, L800CC150, L800CC134, L800CC144, L800CC104 + +.text glabel alResampleParam /* 0CCC90 800CC090 24AEFFFF */ addiu $t6, $a1, -1 /* 0CCC94 800CC094 27BDFFD8 */ addiu $sp, $sp, -0x28 @@ -6,13 +11,15 @@ glabel alResampleParam /* 0CCCA0 800CC0A0 1020002B */ beqz $at, .L800CC150 /* 0CCCA4 800CC0A4 00803825 */ move $a3, $a0 /* 0CCCA8 800CC0A8 000E7080 */ sll $t6, $t6, 2 -/* 0CCCAC 800CC0AC 3C01800F */ lui $at, %hi(D_800E9600) # $at, 0x800f +/* 0CCCAC 800CC0AC 3C01800F */ lui $at, %hi(jpt_800E9600) # $at, 0x800f /* 0CCCB0 800CC0B0 002E0821 */ addu $at, $at, $t6 -/* 0CCCB4 800CC0B4 8C2E9600 */ lw $t6, %lo(D_800E9600)($at) +/* 0CCCB4 800CC0B4 8C2E9600 */ lw $t6, %lo(jpt_800E9600)($at) /* 0CCCB8 800CC0B8 01C00008 */ jr $t6 /* 0CCCBC 800CC0BC 00000000 */ nop +glabel L800CC0C0 /* 0CCCC0 800CC0C0 10000029 */ b .L800CC168 /* 0CCCC4 800CC0C4 ACE60000 */ sw $a2, ($a3) +glabel L800CC0C8 /* 0CCCC8 800CC0C8 8CE40000 */ lw $a0, ($a3) /* 0CCCCC 800CC0CC 44802000 */ mtc1 $zero, $f4 /* 0CCCD0 800CC0D0 240F0001 */ li $t7, 1 @@ -28,6 +35,7 @@ glabel alResampleParam /* 0CCCF8 800CC0F8 00000000 */ nop /* 0CCCFC 800CC0FC 1000001B */ b .L800CC16C /* 0CCD00 800CC100 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800CC104 /* 0CCD04 800CC104 8CE40000 */ lw $a0, ($a3) /* 0CCD08 800CC108 24180001 */ li $t8, 1 /* 0CCD0C 800CC10C ACF80030 */ sw $t8, 0x30($a3) @@ -40,14 +48,17 @@ glabel alResampleParam /* 0CCD28 800CC128 00000000 */ nop /* 0CCD2C 800CC12C 1000000F */ b .L800CC16C /* 0CCD30 800CC130 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800CC134 /* 0CCD34 800CC134 AFA6001C */ sw $a2, 0x1c($sp) /* 0CCD38 800CC138 C7A6001C */ lwc1 $f6, 0x1c($sp) /* 0CCD3C 800CC13C 1000000A */ b .L800CC168 /* 0CCD40 800CC140 E4E60018 */ swc1 $f6, 0x18($a3) +glabel L800CC144 /* 0CCD44 800CC144 24080001 */ li $t0, 1 /* 0CCD48 800CC148 10000007 */ b .L800CC168 /* 0CCD4C 800CC14C ACE8001C */ sw $t0, 0x1c($a3) .L800CC150: +glabel L800CC150 /* 0CCD50 800CC150 8CE40000 */ lw $a0, ($a3) /* 0CCD54 800CC154 50800005 */ beql $a0, $zero, .L800CC16C /* 0CCD58 800CC158 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s b/lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s index d6965aea..913eafb3 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/alResamplePull.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E9628 +.double 1.99996 +glabel D_800E9630 +.float 1.99996 + +.text glabel alResamplePull /* 0CCD7C 800CC17C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 0CCD80 800CC180 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/func_800CAC5C.s b/lib/asm/non_matchings/unknown_0CA9A0/func_800CAC5C.s index 7dbcf758..f9ac2f19 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/func_800CAC5C.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/func_800CAC5C.s @@ -1,3 +1,12 @@ +.rdata +glabel D_800E95A0 +.asciz "source" +.ascii "\0" # padding +glabel D_800E95A8 +.asciz "env.c" +.ascii "\0\0" # padding + +.text glabel func_800CAC5C /* 0CB85C 800CAC5C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 0CB860 800CAC60 AFBF001C */ sw $ra, 0x1c($sp) diff --git a/lib/asm/non_matchings/unknown_0CA9A0/func_800CB2D4.s b/lib/asm/non_matchings/unknown_0CA9A0/func_800CB2D4.s index 1d6e1baa..e054b24f 100644 --- a/lib/asm/non_matchings/unknown_0CA9A0/func_800CB2D4.s +++ b/lib/asm/non_matchings/unknown_0CA9A0/func_800CB2D4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E95F8 +.double 65535.0 + +.text glabel func_800CB2D4 /* 0CBED4 800CB2D4 27BDFFF0 */ addiu $sp, $sp, -0x10 /* 0CBED8 800CB2D8 8FAE0020 */ lw $t6, 0x20($sp) diff --git a/lib/src/unknown_0CA9A0.c b/lib/src/unknown_0CA9A0.c index d92dbe42..38ba6f31 100644 --- a/lib/src/unknown_0CA9A0.c +++ b/lib/src/unknown_0CA9A0.c @@ -4,38 +4,6 @@ #include "types.h" #include "macros.h" -/************ .rodata ************/ - -const char D_800E9560[] = "samples >= 0"; -const char D_800E9570[] = "env.c"; -const char D_800E9578[] = "samples <= AL_MAX_RSP_SAMPLES"; -const char D_800E9598[] = "env.c"; -const char D_800E95A0[] = "source"; -const char D_800E95A8[] = "env.c"; - -// Jump table in alEnvMixerPull -const u32 D_800E95B0[] = { - 0x800CA870, 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, - 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, - 0x800CA8C4, 0x800CA8C4, 0x800CA8C4, 0x800CA460, - 0x800CA460, 0x800CA22C, 0x800CA7A8, 0x800CA828, - 0x800CA460 -}; - -const DoubleLiteral D_800E95F8 = { 65535.0 }; - -// Jump table in alResampleParam -const u32 D_800E9600[] = { - 0x800CC0C0, 0x800CC150, 0x800CC150, 0x800CC0C8, - 0x800CC150, 0x800CC150, 0x800CC134, 0x800CC144, - 0x800CC104 -}; - -const DoubleLiteral D_800E9628 = { 1.99996 }; -const FloatLiteral D_800E9630 = { 1.99996f }; - -/*********************************/ - GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alFilterNew.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvMixerPull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA9A0/alEnvmixerParam.s") diff --git a/tools/asm_processor/build.py b/tools/asm_processor/build.py index 239c3443..396c3829 100755 --- a/tools/asm_processor/build.py +++ b/tools/asm_processor/build.py @@ -32,7 +32,8 @@ opt_flags = [x for x in compile_args if x in ['-g3', '-g', '-O1', '-O2', '-frame preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c', delete=False) try: - if '-O2' in opt_flags: + # Only want to apply -mips1 flag to the main source files. Not the lib files. + if ('-O2' in opt_flags) and (not 'lib/' in in_file): opt_flags.append('-mips1') asmproc_flags = opt_flags + [in_file, '--input-enc', 'utf-8', '--output-enc', 'euc-jp'] compile_cmdline = compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name] From 239f47535dbee40e44695eb6b19fb73e83c85cd7 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 15:24:07 -0500 Subject: [PATCH 59/66] Moved rodata from C to GLOBAL_ASM in lib/unknown_0D43F0 --- .../non_matchings/unknown_0D43F0/_Printf.s | 10 ++++++++ .../non_matchings/unknown_0D43F0/_Putfld.s | 17 +++++++++++-- lib/src/unknown_0D43F0.c | 25 ------------------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/lib/asm/non_matchings/unknown_0D43F0/_Printf.s b/lib/asm/non_matchings/unknown_0D43F0/_Printf.s index 54a3b70e..19c52165 100644 --- a/lib/asm/non_matchings/unknown_0D43F0/_Printf.s +++ b/lib/asm/non_matchings/unknown_0D43F0/_Printf.s @@ -1,3 +1,13 @@ +.rdata +glabel D_800E96C0 +.asciz "hlL" +glabel D_800E96C4 +.asciz " +-#0" +.ascii "\0\0" # padding +glabel D_800E96CC +.word 1, 2, 4, 8, 16, 0 + +.text glabel _Printf /* 0D4B10 800D3F10 27BDFF20 */ addiu $sp, $sp, -0xe0 /* 0D4B14 800D3F14 AFB70034 */ sw $s7, 0x34($sp) diff --git a/lib/asm/non_matchings/unknown_0D43F0/_Putfld.s b/lib/asm/non_matchings/unknown_0D43F0/_Putfld.s index f2aa5b98..430cb6d7 100644 --- a/lib/asm/non_matchings/unknown_0D43F0/_Putfld.s +++ b/lib/asm/non_matchings/unknown_0D43F0/_Putfld.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E96E4 +.word L800D3C08, L800D3EE8, L800D3C08, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3AB8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3910, L800D3948, L800D3C08, L800D3C08, L800D3C08, L800D3EE8, L800D3948, L800D3EE8, L800D3EE8, L800D3EE8, L800D3EE8, L800D3D6C, L800D3AB8, L800D3E3C, L800D3EE8, L800D3EE8, L800D3E84, L800D3EE8, L800D3AB8, L800D3EE8, L800D3EE8, L800D3AB8 + +.text glabel _Putfld /* 0D44A0 800D38A0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0D44A4 800D38A4 AFA50020 */ sw $a1, 0x20($sp) @@ -17,9 +22,9 @@ glabel _Putfld /* 0D44DC 800D38DC 2DE10034 */ sltiu $at, $t7, 0x34 /* 0D44E0 800D38E0 10200181 */ beqz $at, .L800D3EE8 /* 0D44E4 800D38E4 000F7880 */ sll $t7, $t7, 2 -/* 0D44E8 800D38E8 3C01800F */ lui $at, %hi(D_800E96E4) # $at, 0x800f +/* 0D44E8 800D38E8 3C01800F */ lui $at, %hi(jpt_800E96E4) # $at, 0x800f /* 0D44EC 800D38EC 002F0821 */ addu $at, $at, $t7 -/* 0D44F0 800D38F0 8C2F96E4 */ lw $t7, %lo(D_800E96E4)($at) +/* 0D44F0 800D38F0 8C2F96E4 */ lw $t7, %lo(jpt_800E96E4)($at) /* 0D44F4 800D38F4 01E00008 */ jr $t7 /* 0D44F8 800D38F8 00000000 */ nop .L800D38FC: @@ -28,6 +33,7 @@ glabel _Putfld /* 0D4504 800D3904 8E18000C */ lw $t8, 0xc($s0) /* 0D4508 800D3908 10000178 */ b .L800D3EEC /* 0D450C 800D390C 8E0E000C */ lw $t6, 0xc($s0) +glabel L800D3910 /* 0D4510 800D3910 8CD80000 */ lw $t8, ($a2) /* 0D4514 800D3914 2401FFFC */ li $at, -4 /* 0D4518 800D3918 27190003 */ addiu $t9, $t8, 3 @@ -42,6 +48,7 @@ glabel _Putfld /* 0D453C 800D393C 270E0001 */ addiu $t6, $t8, 1 /* 0D4540 800D3940 1000016F */ b .L800D3F00 /* 0D4544 800D3944 AE0E000C */ sw $t6, 0xc($s0) +glabel L800D3948 /* 0D4548 800D3948 92020034 */ lbu $v0, 0x34($s0) /* 0D454C 800D394C 2401006C */ li $at, 108 /* 0D4550 800D3950 5441000D */ bnel $v0, $at, .L800D3988 @@ -143,6 +150,7 @@ glabel _Putfld /* 0D46AC 800D3AAC AE0F0008 */ sw $t7, 8($s0) /* 0D46B0 800D3AB0 10000114 */ b .L800D3F04 /* 0D46B4 800D3AB4 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800D3AB8 /* 0D46B8 800D3AB8 92020034 */ lbu $v0, 0x34($s0) /* 0D46BC 800D3ABC 2401006C */ li $at, 108 /* 0D46C0 800D3AC0 5441000D */ bnel $v0, $at, .L800D3AF8 @@ -235,6 +243,7 @@ glabel _Putfld /* 0D47FC 800D3BFC AE0F0008 */ sw $t7, 8($s0) /* 0D4800 800D3C00 100000C0 */ b .L800D3F04 /* 0D4804 800D3C04 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800D3C08 /* 0D4808 800D3C08 920E0034 */ lbu $t6, 0x34($s0) /* 0D480C 800D3C0C 2401004C */ li $at, 76 /* 0D4810 800D3C10 55C10019 */ bnel $t6, $at, .L800D3C78 @@ -338,6 +347,7 @@ glabel _Putfld /* 0D4960 800D3D60 AE0E0008 */ sw $t6, 8($s0) /* 0D4964 800D3D64 10000067 */ b .L800D3F04 /* 0D4968 800D3D68 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800D3D6C /* 0D496C 800D3D6C 92020034 */ lbu $v0, 0x34($s0) /* 0D4970 800D3D70 24010068 */ li $at, 104 /* 0D4974 800D3D74 5441000C */ bnel $v0, $at, .L800D3DA8 @@ -393,6 +403,7 @@ glabel _Putfld /* 0D4A30 800D3E30 8E0F002C */ lw $t7, 0x2c($s0) /* 0D4A34 800D3E34 10000032 */ b .L800D3F00 /* 0D4A38 800D3E38 AF0F0000 */ sw $t7, ($t8) +glabel L800D3E3C /* 0D4A3C 800D3E3C 8CD90000 */ lw $t9, ($a2) /* 0D4A40 800D3E40 2401FFFC */ li $at, -4 /* 0D4A44 800D3E44 02002025 */ move $a0, $s0 @@ -411,6 +422,7 @@ glabel _Putfld /* 0D4A78 800D3E78 AE0E0008 */ sw $t6, 8($s0) /* 0D4A7C 800D3E7C 10000021 */ b .L800D3F04 /* 0D4A80 800D3E80 8FBF0014 */ lw $ra, 0x14($sp) +glabel L800D3E84 /* 0D4A84 800D3E84 8CD80000 */ lw $t8, ($a2) /* 0D4A88 800D3E88 2401FFFC */ li $at, -4 /* 0D4A8C 800D3E8C 27190003 */ addiu $t9, $t8, 3 @@ -438,6 +450,7 @@ glabel _Putfld /* 0D4AE0 800D3EE0 10000007 */ b .L800D3F00 /* 0D4AE4 800D3EE4 AE18000C */ sw $t8, 0xc($s0) .L800D3EE8: +glabel L800D3EE8 /* 0D4AE8 800D3EE8 8E0E000C */ lw $t6, 0xc($s0) .L800D3EEC: /* 0D4AEC 800D3EEC 00EEC821 */ addu $t9, $a3, $t6 diff --git a/lib/src/unknown_0D43F0.c b/lib/src/unknown_0D43F0.c index 7357a8d6..af16b492 100644 --- a/lib/src/unknown_0D43F0.c +++ b/lib/src/unknown_0D43F0.c @@ -12,30 +12,5 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/alCopy.s") char D_800E48C0[36] = " "; char D_800E48E4[32] = "00000000000000000000000000000000"; -/************ .rodata ************/ - -const char D_800E96C0[] = "hlL"; -const char D_800E96C4[] = " +-#0"; -const int D_800E96CC[] = { 1, 2, 4, 8, 16, 0 }; - -// Jump table in _Putfld -const u32 D_800E96E4[] = { - 0x800D3C08, 0x800D3EE8, 0x800D3C08, 0x800D3EE8, - 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, - 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, - 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, - 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3AB8, - 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, - 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, - 0x800D3EE8, 0x800D3EE8, 0x800D3910, 0x800D3948, - 0x800D3C08, 0x800D3C08, 0x800D3C08, 0x800D3EE8, - 0x800D3948, 0x800D3EE8, 0x800D3EE8, 0x800D3EE8, - 0x800D3EE8, 0x800D3D6C, 0x800D3AB8, 0x800D3E3C, - 0x800D3EE8, 0x800D3EE8, 0x800D3E84, 0x800D3EE8, - 0x800D3AB8, 0x800D3EE8, 0x800D3EE8, 0x800D3AB8 -}; - -/*********************************/ - GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Putfld.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D43F0/_Printf.s") \ No newline at end of file From f594ae8bebf223347a68dfe4de57fe6c69664e0a Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 16:40:12 -0500 Subject: [PATCH 60/66] Moved rodata from C to GLOBAL_ASM in lib/unknown_0D3160 --- Makefile | 1 + .../unknown_0CCF90/guPerspectiveF.s | 5 +++ .../unknown_0D3160/__osDevMgrMain.s | 15 ++++++-- lib/src/unknown_0D3160.c | 34 ------------------- lib/src/unknown_0D3360.c | 29 ++++++++++++++++ 5 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 lib/src/unknown_0D3360.c diff --git a/Makefile b/Makefile index d7f0ca6d..b9eb4931 100755 --- a/Makefile +++ b/Makefile @@ -272,6 +272,7 @@ $(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D29F0.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0CDE90.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D3160.o: OPT_FLAGS := -O1 +$(BUILD_DIR)/lib/src/unknown_0D3360.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0D5EC0.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/unknown_0C9C90.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 $(BUILD_DIR)/lib/src/osCreateThread.o : OPT_FLAGS := -O1 diff --git a/lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s b/lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s index c40711e2..a593c03f 100644 --- a/lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s +++ b/lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E9640 +.double 0.017453292222222222 + +.text glabel guPerspectiveF /* 0CD520 800CC920 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0CD524 800CC924 44867000 */ mtc1 $a2, $f14 diff --git a/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s b/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s index 90b4a7d3..85ec3a1a 100644 --- a/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s +++ b/lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s @@ -1,3 +1,8 @@ +.late_rodata +glabel jpt_800E9650 +.word L800D2A70, L800D2964, L800D29A4, L800D2A90, L800D2A90, L800D29E0, L800D2A28 + +.text glabel __osDevMgrMain /* 0D3360 800D2760 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0D3364 800D2764 AFA40040 */ sw $a0, 0x40($sp) @@ -131,11 +136,12 @@ glabel __osDevMgrMain /* 0D3544 800D2944 10200052 */ beqz $at, .L800D2A90 /* 0D3548 800D2948 00000000 */ nop /* 0D354C 800D294C 00084080 */ sll $t0, $t0, 2 -/* 0D3550 800D2950 3C01800F */ lui $at, %hi(D_800E9650) # $at, 0x800f +/* 0D3550 800D2950 3C01800F */ lui $at, %hi(jpt_800E9650) # $at, 0x800f /* 0D3554 800D2954 00280821 */ addu $at, $at, $t0 -/* 0D3558 800D2958 8C289650 */ lw $t0, %lo(D_800E9650)($at) +/* 0D3558 800D2958 8C289650 */ lw $t0, %lo(jpt_800E9650)($at) /* 0D355C 800D295C 01000008 */ jr $t0 /* 0D3560 800D2960 00000000 */ nop +glabel L800D2964 /* 0D3564 800D2964 8FAC002C */ lw $t4, 0x2c($sp) /* 0D3568 800D2968 27A50034 */ addiu $a1, $sp, 0x34 /* 0D356C 800D296C 24060001 */ li $a2, 1 @@ -152,6 +158,7 @@ glabel __osDevMgrMain /* 0D3598 800D2998 00000000 */ nop /* 0D359C 800D299C 1000003E */ b .L800D2A98 /* 0D35A0 800D29A0 AFA20030 */ sw $v0, 0x30($sp) +glabel L800D29A4 /* 0D35A4 800D29A4 8FAB002C */ lw $t3, 0x2c($sp) /* 0D35A8 800D29A8 27A50034 */ addiu $a1, $sp, 0x34 /* 0D35AC 800D29AC 24060001 */ li $a2, 1 @@ -167,6 +174,7 @@ glabel __osDevMgrMain /* 0D35D4 800D29D4 8DA70010 */ lw $a3, 0x10($t5) /* 0D35D8 800D29D8 1000002F */ b .L800D2A98 /* 0D35DC 800D29DC AFA20030 */ sw $v0, 0x30($sp) +glabel L800D29E0 /* 0D35E0 800D29E0 8FAA002C */ lw $t2, 0x2c($sp) /* 0D35E4 800D29E4 27A50034 */ addiu $a1, $sp, 0x34 /* 0D35E8 800D29E8 24060001 */ li $a2, 1 @@ -185,6 +193,7 @@ glabel __osDevMgrMain /* 0D361C 800D2A1C 00000000 */ nop /* 0D3620 800D2A20 1000001D */ b .L800D2A98 /* 0D3624 800D2A24 AFA20030 */ sw $v0, 0x30($sp) +glabel L800D2A28 /* 0D3628 800D2A28 8FAC002C */ lw $t4, 0x2c($sp) /* 0D362C 800D2A2C 27A50034 */ addiu $a1, $sp, 0x34 /* 0D3630 800D2A30 24060001 */ li $a2, 1 @@ -203,6 +212,7 @@ glabel __osDevMgrMain /* 0D3664 800D2A64 00000000 */ nop /* 0D3668 800D2A68 1000000B */ b .L800D2A98 /* 0D366C 800D2A6C AFA20030 */ sw $v0, 0x30($sp) +glabel L800D2A70 /* 0D3670 800D2A70 8FAE003C */ lw $t6, 0x3c($sp) /* 0D3674 800D2A74 00003025 */ move $a2, $zero /* 0D3678 800D2A78 8DC40004 */ lw $a0, 4($t6) @@ -212,6 +222,7 @@ glabel __osDevMgrMain /* 0D3688 800D2A88 10000003 */ b .L800D2A98 /* 0D368C 800D2A8C AFAA0030 */ sw $t2, 0x30($sp) .L800D2A90: +glabel L800D2A90 /* 0D3690 800D2A90 240FFFFF */ li $t7, -1 /* 0D3694 800D2A94 AFAF0030 */ sw $t7, 0x30($sp) .L800D2A98: diff --git a/lib/src/unknown_0D3160.c b/lib/src/unknown_0D3160.c index 3d95cfc6..e754a52f 100644 --- a/lib/src/unknown_0D3160.c +++ b/lib/src/unknown_0D3160.c @@ -6,19 +6,6 @@ #include "libultra_internal.h" #include "hardware.h" -/************ .rodata ************/ - -const DoubleLiteral D_800E9640 = { 0.017453292222222222 }; -const DoubleLiteral D_800E9648 = { 0.0 }; // This is probably a file boundary. This file needs to be split. - -// Jump table in __osDevMgrMain -const u32 D_800E9650[] = { - 0x800D2A70, 0x800D2964, 0x800D29A4, 0x800D2A90, - 0x800D2A90, 0x800D29E0, 0x800D2A28 -}; - -/*********************************/ - GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDisableInt.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osRestoreInt.s") @@ -49,24 +36,3 @@ s32 osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) } GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/osEPiRawStartDma.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osViInit.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/alSynDelete.s") - -void __osDequeueThread(OSThread **queue, OSThread *t) -{ - register OSThread *pred; - register OSThread *succ; - pred = (OSThread *)queue; //this is actually legit.. - succ = pred->next; - while (succ != NULL) - { - if (succ == t) - { - pred->next = t->next; - return; - } - pred = succ; - succ = pred->next; - } -} \ No newline at end of file diff --git a/lib/src/unknown_0D3360.c b/lib/src/unknown_0D3360.c new file mode 100644 index 00000000..687ccda5 --- /dev/null +++ b/lib/src/unknown_0D3360.c @@ -0,0 +1,29 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800D2760 */ + +#include "types.h" +#include "macros.h" +#include "libultra_internal.h" +#include "hardware.h" + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osDevMgrMain.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/__osViInit.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3160/alSynDelete.s") + +void __osDequeueThread(OSThread **queue, OSThread *t) +{ + register OSThread *pred; + register OSThread *succ; + pred = (OSThread *)queue; //this is actually legit.. + succ = pred->next; + while (succ != NULL) + { + if (succ == t) + { + pred->next = t->next; + return; + } + pred = succ; + succ = pred->next; + } +} From e14b59689f1fe41ef044d5a6d3a7626969b8365a Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 16:44:35 -0500 Subject: [PATCH 61/66] Moved rodata from C to GLOBAL_ASM in lib/unknown_0CA730 --- lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s | 7 +++++++ lib/src/unknown_0CA730.c | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s b/lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s index 5a4c3e6c..a7b3073a 100644 --- a/lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s +++ b/lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E9550 +.double -0.0 +glabel D_800E9558 +.double -0.0 + +.text glabel __f_to_ll /* 0CA74C 800C9B4C 46006109 */ trunc.l.s $f4, $f12 /* 0CA750 800C9B50 44222000 */ dmfc1 $v0, $f4 diff --git a/lib/src/unknown_0CA730.c b/lib/src/unknown_0CA730.c index 8a7aee72..1d48aaaa 100644 --- a/lib/src/unknown_0CA730.c +++ b/lib/src/unknown_0CA730.c @@ -4,14 +4,6 @@ #include "types.h" #include "macros.h" -/************ .rodata ************/ - -// In __f_to_ll -const DoubleLiteral D_800E9550 = { -0.0 }; -const DoubleLiteral D_800E9558 = { -0.0 }; - -/*********************************/ - GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA730/__d_to_ll.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA730/__f_to_ll.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA730/__ll_to_f.s") From 17de52bff78f8a339511d9c0ccba469f501fc8dd Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 16:49:19 -0500 Subject: [PATCH 62/66] Moved rodata from C to GLOBAL_ASM in lib/unknown_0CA530 --- lib/asm/non_matchings/unknown_0C86A0/func_800C8284.s | 5 +++++ lib/asm/non_matchings/unknown_0C86A0/func_800C8380.s | 5 +++++ lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s | 7 +++++++ lib/src/unknown_0CA530.c | 9 --------- tools/python/rodata_move.py | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C8284.s b/lib/asm/non_matchings/unknown_0C86A0/func_800C8284.s index b7b7375f..98084e6a 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C8284.s +++ b/lib/asm/non_matchings/unknown_0C86A0/func_800C8284.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E94B0 +.double 1000000.0 + +.text glabel func_800C8284 /* 0C8E84 800C8284 8C8E0000 */ lw $t6, ($a0) /* 0C8E88 800C8288 44856000 */ mtc1 $a1, $f12 diff --git a/lib/asm/non_matchings/unknown_0C86A0/func_800C8380.s b/lib/asm/non_matchings/unknown_0C86A0/func_800C8380.s index ea7cab8e..9879f4f0 100644 --- a/lib/asm/non_matchings/unknown_0C86A0/func_800C8380.s +++ b/lib/asm/non_matchings/unknown_0C86A0/func_800C8380.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E94B8 +.double 1000000.0 + +.text glabel func_800C8380 /* 0C8F80 800C8380 44852000 */ mtc1 $a1, $f4 /* 0C8F84 800C8384 44864000 */ mtc1 $a2, $f8 diff --git a/lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s b/lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s index f2e114f5..c37de39c 100644 --- a/lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s +++ b/lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E94C0 +.float 1.0005778075 +glabel D_800E94C4 +.float 0.999422551 + +.text glabel alCents2Ratio /* 0CA5E0 800C99E0 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 0CA5E4 800C99E4 44811000 */ mtc1 $at, $f2 diff --git a/lib/src/unknown_0CA530.c b/lib/src/unknown_0CA530.c index 839d1f1b..0c6bbb03 100644 --- a/lib/src/unknown_0CA530.c +++ b/lib/src/unknown_0CA530.c @@ -4,15 +4,6 @@ #include "types.h" #include "macros.h" -/************ .rodata ************/ - -const DoubleLiteral D_800E94B0 = { 1000000.0 }; -const DoubleLiteral D_800E94B8 = { 1000000.0 }; -const FloatLiteral D_800E94C0 = { 1.0005778075f }; -const FloatLiteral D_800E94C4 = { 0.999422551f }; - -/*********************************/ - GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/alSynFreeVoice.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/alCents2Ratio.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CA530/osSetIntMask.s") diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index 0390b1e8..450fdd44 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -12,8 +12,8 @@ C_JMPTABLE_REGEX = r"(?:(?:D_)|0x)[0-9A-Fa-f]{8}" NO_OUTPUT = False # If True, then no files will be changed. ONLY_THE_FIRST_ASM_FILE = False # If True, then only one asm file will be changed. -#ASM_DIRECTORY = 'asm/non_matchings/' -ASM_DIRECTORY = 'lib/asm/non_matchings/' +ASM_DIRECTORY = 'asm/non_matchings/' +#ASM_DIRECTORY = 'lib/asm/non_matchings/' def getMatches(string, regex): out = [] From 4874527823ba4192a9593c91e760bfedea7537f5 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 17:05:54 -0500 Subject: [PATCH 63/66] split unknown_005740 into unknown_008C40 & unknown_00B8E0 --- src/unknown_005740.c | 74 +------------------------------------ src/unknown_008C40.c | 70 +++++++++++++++++++++++++++++++++++ src/unknown_00B8E0.c | 28 ++++++++++++++ tools/python/rodata_move.py | 3 +- 4 files changed, 100 insertions(+), 75 deletions(-) create mode 100644 src/unknown_008C40.c create mode 100644 src/unknown_00B8E0.c diff --git a/src/unknown_005740.c b/src/unknown_005740.c index d9026334..0a69ce4c 100644 --- a/src/unknown_005740.c +++ b/src/unknown_005740.c @@ -9,8 +9,6 @@ s8 D_800DC6D0 = 1; // Currently unknown, might be a u8. s32 D_800DC6D4 = 0; // Currently unknown, might be a different type. s32 D_800DC6D8 = 1; // Currently unknown, might be a different type. -s32 D_800DC6DC = 0; // Currently unknown, might be a different type. -s32 D_800DC6E0 = 0; // Currently unknown, might be a different type. /*******************************/ @@ -55,32 +53,7 @@ const FloatLiteral D_800E4CF0 = { 1500.0f }; const FloatLiteral D_800E4CF4 = { 0.05f }; const DoubleLiteral D_800E4CF8 = { 0.001 }; -const char D_800E4D00[] = "OUT OF AUDIO POINTS\n"; -const char D_800E4D18[] = "amAudioLineAddVertex: Exceeded maximum number of lines (%d)\n"; -const char D_800E4D58[] = "amAudioLineAddVertex: Exceeded maximum number of line vertices (%d)\n"; -const char D_800E4DA0[] = "amReverbLineAddVertex: Exceeded maximum number of lines (%d)\n"; -const char D_800E4DE0[] = "amReverbLineAddVertex: Exceeded maximum number of line vertices (%d)\n"; -const char D_800E4E28[] = "Audio line definition error (less than 2 vertices on line %d)\n"; -const char D_800E4E68[] = "Audio line definition error (line=%d, vertex=%d)\n"; -const char D_800E4E9C[] = "Reverb line definition error (less than 2 vertices on line %d)\n"; -const char D_800E4EDC[] = "Reverb line definition error (line=%d, vertex=%d)\n"; - -const FloatLiteral D_800E4F10 = { -100000.0f }; -const FloatLiteral D_800E4F14 = { 999999.0f }; -const DoubleLiteral D_800E4F18 = { -100000.0 }; -const DoubleLiteral D_800E4F20 = { -100000.0 }; - -const u32 filePadding[2] = { 0, 0 }; // unknown_005740 needs to be split. - -const char D_800E4F30[] = "Exceeded voice limit of %d (%d)\n"; - -/*******************************/ - -/************ .bss ************/ - -extern s8 D_8011AC18; - -/*******************************/ +/*********************************/ GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80004B40.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800050D0.s") @@ -91,52 +64,7 @@ GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80006AC8.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80006BFC.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80006FC8.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80007FA4.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008040.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008140.s") -void func_80008168(void) { - D_8011AC18 = 0; -} -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008174.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008438.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800090C0.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800092A8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009558.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800095E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800096D8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800096F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000974C.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800098A4.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009968.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800099EC.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009AB4.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009B7C.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009D6C.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A2E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A414.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__mapVoice.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__unmapVoice.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__lookupVoice.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__lookupSoundQuick.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsVol.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsDelta.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsPan.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__seqpReleaseVoice.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__voiceNeedsNoteKill.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__initFromBank.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__setInstChanState.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__resetPerfChanState.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__initChanState.s") -GLOBAL_ASM("asm/non_matchings/unknown_005740/__seqpStopOsc.s") -/* Unknown Size */ -typedef struct unk8000B010 { - u8 unk00[0x70]; - s8 unk70; -} unk8000B010; - -void func_8000B010(unk8000B010 *arg0, s8 arg1) { - arg0->unk70 = arg1; -} diff --git a/src/unknown_008C40.c b/src/unknown_008C40.c new file mode 100644 index 00000000..d7c4d185 --- /dev/null +++ b/src/unknown_008C40.c @@ -0,0 +1,70 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80008040 */ + +#include "types.h" +#include "macros.h" + +/************ .data ************/ + +s32 D_800DC6E0 = 0; // Currently unknown, might be a different type. + +/*******************************/ + +/************ .rodata ************/ + +const char D_800E4D00[] = "OUT OF AUDIO POINTS\n"; +const char D_800E4D18[] = "amAudioLineAddVertex: Exceeded maximum number of lines (%d)\n"; +const char D_800E4D58[] = "amAudioLineAddVertex: Exceeded maximum number of line vertices (%d)\n"; +const char D_800E4DA0[] = "amReverbLineAddVertex: Exceeded maximum number of lines (%d)\n"; +const char D_800E4DE0[] = "amReverbLineAddVertex: Exceeded maximum number of line vertices (%d)\n"; +const char D_800E4E28[] = "Audio line definition error (less than 2 vertices on line %d)\n"; +const char D_800E4E68[] = "Audio line definition error (line=%d, vertex=%d)\n"; +const char D_800E4E9C[] = "Reverb line definition error (less than 2 vertices on line %d)\n"; +const char D_800E4EDC[] = "Reverb line definition error (line=%d, vertex=%d)\n"; + +const FloatLiteral D_800E4F10 = { -100000.0f }; +const FloatLiteral D_800E4F14 = { 999999.0f }; +const DoubleLiteral D_800E4F18 = { -100000.0 }; +const DoubleLiteral D_800E4F20 = { -100000.0 }; + +/*********************************/ + +/************ .bss ************/ + +extern s8 D_8011AC18; + +/*******************************/ + +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008040.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008140.s") + +void func_80008168(void) { + D_8011AC18 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008174.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80008438.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800090C0.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800092A8.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009558.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800095E8.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800096D8.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800096F8.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000974C.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800098A4.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009968.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800099EC.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009AB4.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009B7C.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80009D6C.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A2E8.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/func_8000A414.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__mapVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__unmapVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__lookupVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__lookupSoundQuick.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsVol.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsDelta.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__vsPan.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__seqpReleaseVoice.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__voiceNeedsNoteKill.s") diff --git a/src/unknown_00B8E0.c b/src/unknown_00B8E0.c new file mode 100644 index 00000000..687bf054 --- /dev/null +++ b/src/unknown_00B8E0.c @@ -0,0 +1,28 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x8000ACE0 */ + +#include "types.h" +#include "macros.h" + +/************ .rodata ************/ + +const char D_800E4F30[] = "Exceeded voice limit of %d (%d)\n"; + +/*********************************/ + +GLOBAL_ASM("asm/non_matchings/unknown_005740/__initFromBank.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__setInstChanState.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__resetPerfChanState.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__initChanState.s") +GLOBAL_ASM("asm/non_matchings/unknown_005740/__seqpStopOsc.s") + +/* Unknown Size */ +typedef struct unk8000B010 { + u8 unk00[0x70]; + s8 unk70; +} unk8000B010; + +void func_8000B010(unk8000B010 *arg0, s8 arg1) { + arg0->unk70 = arg1; +} + diff --git a/tools/python/rodata_move.py b/tools/python/rodata_move.py index 450fdd44..374d6006 100755 --- a/tools/python/rodata_move.py +++ b/tools/python/rodata_move.py @@ -39,11 +39,10 @@ def getLineType(line): return 0 def getAsmFileReferenceForLabel(filename, label): - searchLabel = ASM_DIRECTORY + filename possibleFiles = [] search = os.popen('fgrep -r "' + label + '"').read().split('\n') for line in search: - if searchLabel in line: + if ASM_DIRECTORY in line: asmfilePath = line.split(':')[0] if asmfilePath not in possibleFiles: possibleFiles.append(asmfilePath) From 36786363e3616a6ec7469cb14d264c2292011057 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 17:08:18 -0500 Subject: [PATCH 64/66] Moved rodata from C to GLOBAL_ASM in unknown_005740 & unknown_008C40 --- .../unknown_005740/func_80004B40.s | 5 ++ .../unknown_005740/func_80005254.s | 27 +++++++++++ .../unknown_005740/func_80005D08.s | 15 ++++++ .../unknown_005740/func_800063EC.s | 14 ++++++ .../unknown_005740/func_80006BFC.s | 14 ++++++ .../unknown_005740/func_80006FC8.s | 22 +++++++++ .../unknown_005740/func_80007FA4.s | 5 ++ .../unknown_005740/func_80008174.s | 5 ++ .../unknown_005740/func_80008438.s | 5 ++ .../unknown_005740/func_800099EC.s | 5 ++ .../unknown_005740/func_80009AB4.s | 5 ++ src/unknown_005740.c | 47 ------------------- src/unknown_008C40.c | 5 -- 13 files changed, 122 insertions(+), 52 deletions(-) diff --git a/asm/non_matchings/unknown_005740/func_80004B40.s b/asm/non_matchings/unknown_005740/func_80004B40.s index 81262600..7ab0bf38 100644 --- a/asm/non_matchings/unknown_005740/func_80004B40.s +++ b/asm/non_matchings/unknown_005740/func_80004B40.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E4BF0 +.float 10000.0 + +.text glabel func_80004B40 /* 005740 80004B40 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 005744 80004B44 AFB30024 */ sw $s3, 0x24($sp) diff --git a/asm/non_matchings/unknown_005740/func_80005254.s b/asm/non_matchings/unknown_005740/func_80005254.s index 4ddaf169..3e248ea7 100644 --- a/asm/non_matchings/unknown_005740/func_80005254.s +++ b/asm/non_matchings/unknown_005740/func_80005254.s @@ -1,3 +1,30 @@ +.late_rodata +glabel D_800E4BF8 +.double 0.4 +glabel D_800E4C00 +.float 10000.0 +.word 0 # Padding +glabel D_800E4C08 +.double 0.05 +glabel D_800E4C10 +.double 0.95 +glabel D_800E4C18 +.double 0.13 +glabel D_800E4C20 +.double 0.3 +glabel D_800E4C28 +.double 0.02 +glabel D_800E4C30 +.double 0.01 +glabel D_800E4C38 +.float 0.4 +.word 0 # Padding +glabel D_800E4C40 +.double 0.005 +glabel D_800E4C48 +.double -0.1 + +.text glabel func_80005254 /* 005E54 80005254 27BDFF60 */ addiu $sp, $sp, -0xa0 /* 005E58 80005258 3C088012 */ lui $t0, %hi(D_80119C3C) # $t0, 0x8012 diff --git a/asm/non_matchings/unknown_005740/func_80005D08.s b/asm/non_matchings/unknown_005740/func_80005D08.s index 05f957f2..7047a012 100644 --- a/asm/non_matchings/unknown_005740/func_80005D08.s +++ b/asm/non_matchings/unknown_005740/func_80005D08.s @@ -1,3 +1,18 @@ +.late_rodata +glabel D_800E4C50 +.double 0.05 +glabel D_800E4C58 +.double 0.95 +glabel D_800E4C60 +.double 0.3 +glabel D_800E4C68 +.double 6.5534 +glabel D_800E4C70 +.float 6.5534 +glabel D_800E4C74 +.float 10000.0 + +.text glabel func_80005D08 /* 006908 80005D08 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 00690C 80005D0C AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_005740/func_800063EC.s b/asm/non_matchings/unknown_005740/func_800063EC.s index 218a95b5..0729b783 100644 --- a/asm/non_matchings/unknown_005740/func_800063EC.s +++ b/asm/non_matchings/unknown_005740/func_800063EC.s @@ -1,3 +1,17 @@ +.late_rodata +glabel D_800E4C78 +.float 10000.0 +.word 0 # Padding +glabel D_800E4C80 +.double 0.05 +glabel D_800E4C88 +.double 0.95 +glabel D_800E4C90 +.double 6.5534 +glabel D_800E4C98 +.float 6.5534 + +.text glabel func_800063EC /* 006FEC 800063EC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 006FF0 800063F0 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_005740/func_80006BFC.s b/asm/non_matchings/unknown_005740/func_80006BFC.s index f2584eaa..5f2c3a84 100644 --- a/asm/non_matchings/unknown_005740/func_80006BFC.s +++ b/asm/non_matchings/unknown_005740/func_80006BFC.s @@ -1,3 +1,17 @@ +.late_rodata +glabel D_800E4CA0 +.double 1731.23404 +glabel D_800E4CA8 +.double 0.8 +glabel D_800E4CB0 +.float 0.8 +.word 0 # Padding +glabel D_800E4CB8 +.double -0.8 +glabel D_800E4CC0 +.float -0.8 + +.text glabel func_80006BFC /* 0077FC 80006BFC 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 007800 80006C00 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_005740/func_80006FC8.s b/asm/non_matchings/unknown_005740/func_80006FC8.s index 29e715a6..25ceb63c 100644 --- a/asm/non_matchings/unknown_005740/func_80006FC8.s +++ b/asm/non_matchings/unknown_005740/func_80006FC8.s @@ -1,3 +1,25 @@ +.late_rodata +glabel D_800E4CC4 +.float 2250000.0 +glabel D_800E4CC8 +.double 0.05 +glabel D_800E4CD0 +.float 1500.0 +glabel D_800E4CD4 +.float 0.05 +glabel D_800E4CD8 +.double 0.05 +glabel D_800E4CE0 +.float 2250000.0 +.word 0 # Padding +glabel D_800E4CE8 +.double 0.8 +glabel D_800E4CF0 +.float 1500.0 +glabel D_800E4CF4 +.float 0.05 + +.text glabel func_80006FC8 /* 007BC8 80006FC8 27BDFF38 */ addiu $sp, $sp, -0xc8 /* 007BCC 80006FCC AFB70064 */ sw $s7, 0x64($sp) diff --git a/asm/non_matchings/unknown_005740/func_80007FA4.s b/asm/non_matchings/unknown_005740/func_80007FA4.s index 0424bf4f..b8609c7a 100644 --- a/asm/non_matchings/unknown_005740/func_80007FA4.s +++ b/asm/non_matchings/unknown_005740/func_80007FA4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E4CF8 +.double 0.001 + +.text glabel func_80007FA4 /* 008BA4 80007FA4 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 008BA8 80007FA8 44818000 */ mtc1 $at, $f16 diff --git a/asm/non_matchings/unknown_005740/func_80008174.s b/asm/non_matchings/unknown_005740/func_80008174.s index 65187b3d..4870cfb1 100644 --- a/asm/non_matchings/unknown_005740/func_80008174.s +++ b/asm/non_matchings/unknown_005740/func_80008174.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E4F10 +.float -100000.0 + +.text glabel func_80008174 /* 008D74 80008174 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 008D78 80008178 3C038012 */ lui $v1, %hi(D_80119C4C) # $v1, 0x8012 diff --git a/asm/non_matchings/unknown_005740/func_80008438.s b/asm/non_matchings/unknown_005740/func_80008438.s index a4cb6510..39392fb4 100644 --- a/asm/non_matchings/unknown_005740/func_80008438.s +++ b/asm/non_matchings/unknown_005740/func_80008438.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E4F14 +.float 999999.0 + +.text glabel func_80008438 /* 009038 80008438 27BDFD98 */ addiu $sp, $sp, -0x268 /* 00903C 8000843C AFBF006C */ sw $ra, 0x6c($sp) diff --git a/asm/non_matchings/unknown_005740/func_800099EC.s b/asm/non_matchings/unknown_005740/func_800099EC.s index 02b48784..27e196d5 100644 --- a/asm/non_matchings/unknown_005740/func_800099EC.s +++ b/asm/non_matchings/unknown_005740/func_800099EC.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E4F18 +.double -100000.0 + +.text glabel func_800099EC /* 00A5EC 800099EC 308E00FF */ andi $t6, $a0, 0xff /* 00A5F0 800099F0 000E7880 */ sll $t7, $t6, 2 diff --git a/asm/non_matchings/unknown_005740/func_80009AB4.s b/asm/non_matchings/unknown_005740/func_80009AB4.s index 483ace52..46efb78d 100644 --- a/asm/non_matchings/unknown_005740/func_80009AB4.s +++ b/asm/non_matchings/unknown_005740/func_80009AB4.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E4F20 +.double -100000.0 + +.text glabel func_80009AB4 /* 00A6B4 80009AB4 308E00FF */ andi $t6, $a0, 0xff /* 00A6B8 80009AB8 000E7880 */ sll $t7, $t6, 2 diff --git a/src/unknown_005740.c b/src/unknown_005740.c index 0a69ce4c..822e6f36 100644 --- a/src/unknown_005740.c +++ b/src/unknown_005740.c @@ -12,49 +12,6 @@ s32 D_800DC6D8 = 1; // Currently unknown, might be a different type. /*******************************/ -/************ .rodata ************/ - -const FloatLiteral D_800E4BF0 = { 10000.0f }; -const DoubleLiteral D_800E4BF8 = { 0.4 }; -const FloatLiteral D_800E4C00 = { 10000.0f }; -const DoubleLiteral D_800E4C08 = { 0.05 }; -const DoubleLiteral D_800E4C10 = { 0.95 }; -const DoubleLiteral D_800E4C18 = { 0.13 }; -const DoubleLiteral D_800E4C20 = { 0.3 }; -const DoubleLiteral D_800E4C28 = { 0.02 }; -const DoubleLiteral D_800E4C30 = { 0.01 }; -const FloatLiteral D_800E4C38 = { 0.4f }; -const DoubleLiteral D_800E4C40 = { 0.005 }; -const DoubleLiteral D_800E4C48 = { -0.1 }; -const DoubleLiteral D_800E4C50 = { 0.05 }; -const DoubleLiteral D_800E4C58 = { 0.95 }; -const DoubleLiteral D_800E4C60 = { 0.3 }; -const DoubleLiteral D_800E4C68 = { 6.5534 }; -const FloatLiteral D_800E4C70 = { 6.5534f }; -const FloatLiteral D_800E4C74 = { 10000.0f }; -const FloatLiteral D_800E4C78 = { 10000.0f }; -const DoubleLiteral D_800E4C80 = { 0.05 }; -const DoubleLiteral D_800E4C88 = { 0.95 }; -const DoubleLiteral D_800E4C90 = { 6.5534 }; -const FloatLiteral D_800E4C98 = { 6.5534f }; -const DoubleLiteral D_800E4CA0 = { 1731.23404 }; -const DoubleLiteral D_800E4CA8 = { 0.8 }; -const FloatLiteral D_800E4CB0 = { 0.8f }; -const DoubleLiteral D_800E4CB8 = { -0.8 }; -const FloatLiteral D_800E4CC0 = { -0.8f }; -const FloatLiteral D_800E4CC4 = { 2250000.0f }; -const DoubleLiteral D_800E4CC8 = { 0.05 }; -const FloatLiteral D_800E4CD0 = { 1500.0f }; -const FloatLiteral D_800E4CD4 = { 0.05f }; -const DoubleLiteral D_800E4CD8 = { 0.05 }; -const FloatLiteral D_800E4CE0 = { 2250000.0f }; -const DoubleLiteral D_800E4CE8 = { 0.8 }; -const FloatLiteral D_800E4CF0 = { 1500.0f }; -const FloatLiteral D_800E4CF4 = { 0.05f }; -const DoubleLiteral D_800E4CF8 = { 0.001 }; - -/*********************************/ - GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80004B40.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_800050D0.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80005254.s") @@ -64,7 +21,3 @@ GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80006AC8.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80006BFC.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80006FC8.s") GLOBAL_ASM("asm/non_matchings/unknown_005740/func_80007FA4.s") - - - - diff --git a/src/unknown_008C40.c b/src/unknown_008C40.c index d7c4d185..a09bd988 100644 --- a/src/unknown_008C40.c +++ b/src/unknown_008C40.c @@ -22,11 +22,6 @@ const char D_800E4E68[] = "Audio line definition error (line=%d, vertex=%d)\n"; const char D_800E4E9C[] = "Reverb line definition error (less than 2 vertices on line %d)\n"; const char D_800E4EDC[] = "Reverb line definition error (line=%d, vertex=%d)\n"; -const FloatLiteral D_800E4F10 = { -100000.0f }; -const FloatLiteral D_800E4F14 = { 999999.0f }; -const DoubleLiteral D_800E4F18 = { -100000.0 }; -const DoubleLiteral D_800E4F20 = { -100000.0 }; - /*********************************/ /************ .bss ************/ From c5018c62cae9ff60250dc585cf51ff27f3cae581 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 17:16:50 -0500 Subject: [PATCH 65/66] Moved rodata from C to GLOBAL_ASM in unknown_05CEF0, _05F0C0, _065D30, and _072E50 --- asm/non_matchings/unknown_05CEF0/func_8005C364.s | 11 +++++++++++ asm/non_matchings/unknown_05F0C0/func_8005E4C0.s | 7 +++++++ .../unknown_065D30/__timeToSamplesNoRound.s | 5 +++++ asm/non_matchings/unknown_072E50/func_80072578.s | 5 +++++ asm/non_matchings/unknown_072E50/func_80072718.s | 7 +++++++ asm/non_matchings/unknown_072E50/func_80074EB8.s | 6 ++++++ asm/non_matchings/unknown_072E50/func_80075000.s | 9 +++++++++ asm/non_matchings/unknown_072E50/func_800753D8.s | 9 +++++++++ asm/non_matchings/unknown_072E50/func_800756D4.s | 6 ++++++ src/unknown_05CEF0.c | 9 --------- src/unknown_05F0C0.c | 8 -------- src/unknown_065D30.c | 7 ------- src/unknown_072E50.c | 10 ---------- 13 files changed, 65 insertions(+), 34 deletions(-) diff --git a/asm/non_matchings/unknown_05CEF0/func_8005C364.s b/asm/non_matchings/unknown_05CEF0/func_8005C364.s index 246d154c..7d3bd883 100644 --- a/asm/non_matchings/unknown_05CEF0/func_8005C364.s +++ b/asm/non_matchings/unknown_05CEF0/func_8005C364.s @@ -1,3 +1,14 @@ +.late_rodata +glabel D_800E6A10 +.double 0.3 +glabel D_800E6A18 +.double -0.1 +glabel D_800E6A20 +.double 0.1 +glabel D_800E6A28 +.double 700.0 + +.text glabel func_8005C364 /* 05CF64 8005C364 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 05CF68 8005C368 AFA40058 */ sw $a0, 0x58($sp) diff --git a/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s b/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s index ea9a0676..19701edb 100644 --- a/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s +++ b/asm/non_matchings/unknown_05F0C0/func_8005E4C0.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E6AA0 +.double 0.3 +glabel D_800E6AA8 +.double 700.0 + +.text glabel func_8005E4C0 /* 05F0C0 8005E4C0 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 05F0C4 8005E4C4 AFA40058 */ sw $a0, 0x58($sp) diff --git a/asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s b/asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s index bf5dba42..c59c988d 100644 --- a/asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s +++ b/asm/non_matchings/unknown_065D30/__timeToSamplesNoRound.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E6EC0 +.double 1000000.0 + +.text glabel __timeToSamplesNoRound /* 066354 80065754 8C8E0044 */ lw $t6, 0x44($a0) /* 066358 80065758 44852000 */ mtc1 $a1, $f4 diff --git a/asm/non_matchings/unknown_072E50/func_80072578.s b/asm/non_matchings/unknown_072E50/func_80072578.s index 463e240b..2e2f24f5 100644 --- a/asm/non_matchings/unknown_072E50/func_80072578.s +++ b/asm/non_matchings/unknown_072E50/func_80072578.s @@ -1,3 +1,8 @@ +.late_rodata +glabel D_800E77E0 +.double 0.1 + +.text glabel func_80072578 /* 073178 80072578 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 07317C 8007257C 3C198012 */ lui $t9, %hi(D_801241E4) # $t9, 0x8012 diff --git a/asm/non_matchings/unknown_072E50/func_80072718.s b/asm/non_matchings/unknown_072E50/func_80072718.s index c65125f9..3a54a123 100644 --- a/asm/non_matchings/unknown_072E50/func_80072718.s +++ b/asm/non_matchings/unknown_072E50/func_80072718.s @@ -1,3 +1,10 @@ +.late_rodata +glabel D_800E77E8 +.double 3.6 +glabel D_800E77F0 +.double 490.0 + +.text glabel func_80072718 /* 073318 80072718 27BDFF88 */ addiu $sp, $sp, -0x78 /* 07331C 8007271C AFBE0048 */ sw $fp, 0x48($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80074EB8.s b/asm/non_matchings/unknown_072E50/func_80074EB8.s index 3dd1f1ae..a6e39c7c 100644 --- a/asm/non_matchings/unknown_072E50/func_80074EB8.s +++ b/asm/non_matchings/unknown_072E50/func_80074EB8.s @@ -1,3 +1,9 @@ +.rdata +glabel D_800E7768 +.asciz "DKRACING-GHOSTS\0" +.ascii "\0\0\0" # padding + +.text glabel func_80074EB8 /* 075AB8 80074EB8 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 075ABC 80074EBC AFA60048 */ sw $a2, 0x48($sp) diff --git a/asm/non_matchings/unknown_072E50/func_80075000.s b/asm/non_matchings/unknown_072E50/func_80075000.s index af6d8596..d1da6c0b 100644 --- a/asm/non_matchings/unknown_072E50/func_80075000.s +++ b/asm/non_matchings/unknown_072E50/func_80075000.s @@ -1,3 +1,12 @@ +.rdata +glabel D_800E777C +.asciz "DKRACING-GHOSTS\0" +.ascii "\0\0\0" # padding +glabel D_800E7790 +.asciz "DKRACING-GHOSTS\0" +.ascii "\0\0\0" # padding + +.text glabel func_80075000 /* 075C00 80075000 27BDFF88 */ addiu $sp, $sp, -0x78 /* 075C04 80075004 AFBF0034 */ sw $ra, 0x34($sp) diff --git a/asm/non_matchings/unknown_072E50/func_800753D8.s b/asm/non_matchings/unknown_072E50/func_800753D8.s index d38c03fe..d6639ec9 100644 --- a/asm/non_matchings/unknown_072E50/func_800753D8.s +++ b/asm/non_matchings/unknown_072E50/func_800753D8.s @@ -1,3 +1,12 @@ +.rdata +glabel D_800E77A4 +.asciz "DKRACING-GHOSTS\0" +.ascii "\0\0\0" # padding +glabel D_800E77B8 +.asciz "DKRACING-GHOSTS\0" +.ascii "\0\0\0" # padding + +.text glabel func_800753D8 /* 075FD8 800753D8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 075FDC 800753DC AFBF001C */ sw $ra, 0x1c($sp) diff --git a/asm/non_matchings/unknown_072E50/func_800756D4.s b/asm/non_matchings/unknown_072E50/func_800756D4.s index b464ae60..48ce3b2f 100644 --- a/asm/non_matchings/unknown_072E50/func_800756D4.s +++ b/asm/non_matchings/unknown_072E50/func_800756D4.s @@ -1,3 +1,9 @@ +.rdata +glabel D_800E77CC +.asciz "DKRACING-GHOSTS\0" +.ascii "\0\0\0" # padding + +.text glabel func_800756D4 /* 0762D4 800756D4 27BDFF90 */ addiu $sp, $sp, -0x70 /* 0762D8 800756D8 AFBF003C */ sw $ra, 0x3c($sp) diff --git a/src/unknown_05CEF0.c b/src/unknown_05CEF0.c index 71f76806..d9f998b9 100644 --- a/src/unknown_05CEF0.c +++ b/src/unknown_05CEF0.c @@ -15,15 +15,6 @@ s16 D_800DCDE0[16] = { /*******************************/ -/************ .rodata ************/ - -const DoubleLiteral D_800E6A10 = { 0.3 }; -const DoubleLiteral D_800E6A18 = { -0.1 }; -const DoubleLiteral D_800E6A20 = { 0.1 }; -const DoubleLiteral D_800E6A28 = { 700.0 }; - -/*********************************/ - GLOBAL_ASM("asm/non_matchings/unknown_05CEF0/func_8005C2F0.s") GLOBAL_ASM("asm/non_matchings/unknown_05CEF0/func_8005C364.s") GLOBAL_ASM("asm/non_matchings/unknown_05CEF0/func_8005CA78.s") diff --git a/src/unknown_05F0C0.c b/src/unknown_05F0C0.c index 1e3f3db7..09ce122c 100644 --- a/src/unknown_05F0C0.c +++ b/src/unknown_05F0C0.c @@ -15,12 +15,4 @@ s16 D_800DCE40[16] = { /*******************************/ -/************ .rodata ************/ - -// In func_8005E4C0 -const DoubleLiteral D_800E6AA0 = { 0.3 }; -const DoubleLiteral D_800E6AA8 = { 700.0 }; - -/*********************************/ - GLOBAL_ASM("asm/non_matchings/unknown_05F0C0/func_8005E4C0.s") diff --git a/src/unknown_065D30.c b/src/unknown_065D30.c index 2d897500..7d56eca1 100644 --- a/src/unknown_065D30.c +++ b/src/unknown_065D30.c @@ -4,13 +4,6 @@ #include "types.h" #include "macros.h" -/************ .rodata ************/ - -// In __timeToSamplesNoRound -const DoubleLiteral D_800E6EC0 = { 1000000.0 }; - -/*********************************/ - GLOBAL_ASM("asm/non_matchings/unknown_065D30/alSynNew.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/alAudioFrame.s") GLOBAL_ASM("asm/non_matchings/unknown_065D30/__allocParam.s") diff --git a/src/unknown_072E50.c b/src/unknown_072E50.c index 585fced0..693f5141 100644 --- a/src/unknown_072E50.c +++ b/src/unknown_072E50.c @@ -47,16 +47,6 @@ const char D_800E7728[] = "WARNING : No Eprom\n"; const char D_800E773C[] = "DKRACING-GHOSTS\0"; const char D_800E7750[] = "warning: corrupt ghost\n"; -const char D_800E7768[] = "DKRACING-GHOSTS\0"; -const char D_800E777C[] = "DKRACING-GHOSTS\0"; -const char D_800E7790[] = "DKRACING-GHOSTS\0"; -const char D_800E77A4[] = "DKRACING-GHOSTS\0"; -const char D_800E77B8[] = "DKRACING-GHOSTS\0"; -const char D_800E77CC[] = "DKRACING-GHOSTS\0"; - -const DoubleLiteral D_800E77E0 = { 0.1 }; -const DoubleLiteral D_800E77E8 = { 3.6 }; -const DoubleLiteral D_800E77F0 = { 490.0 }; /*********************************/ From c1337fb0d31fca707144447d01302a123b44f83e Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 17:29:47 -0500 Subject: [PATCH 66/66] Moved rodata from C to GLOBAL_ASM in unknown_001050, _080500, and _0AEE70 --- asm/non_matchings/unknown_001050/func_800015F8.s | 9 +++++++++ include/types.h | 8 -------- src/unknown_001050.c | 7 +------ src/unknown_080500.c | 6 +++--- src/unknown_0AEE70.c | 4 ++-- 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/asm/non_matchings/unknown_001050/func_800015F8.s b/asm/non_matchings/unknown_001050/func_800015F8.s index b2760604..ed4b0ed9 100644 --- a/asm/non_matchings/unknown_001050/func_800015F8.s +++ b/asm/non_matchings/unknown_001050/func_800015F8.s @@ -1,3 +1,12 @@ +.late_rodata +glabel D_800E49E0 +.float 46875.0 +glabel D_800E49E4 +.float 46875.0 +glabel D_800E49E8 +.float 120000.0 + +.text glabel func_800015F8 /* 0021F8 800015F8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0021FC 800015FC AFBF0014 */ sw $ra, 0x14($sp) diff --git a/include/types.h b/include/types.h index a6ff2f94..04b872e3 100644 --- a/include/types.h +++ b/include/types.h @@ -39,12 +39,4 @@ typedef s32 ptrdiff_t; //#include //#endif -// Temporary until all the appropriate functions are decompiled. -typedef struct FloatLiteral { - float floatLiteral; -} FloatLiteral; -typedef struct DoubleLiteral { - double doubleLiteral; -} DoubleLiteral; - #endif diff --git a/src/unknown_001050.c b/src/unknown_001050.c index af6dcb31..6c4e397e 100644 --- a/src/unknown_001050.c +++ b/src/unknown_001050.c @@ -43,11 +43,6 @@ const char D_800E4950[] = "amSndPlay: Illegal sound effects table index\n"; const char D_800E4980[] = "amSndPlayDirect: Somebody tried to play illegal sound %d\n"; const char D_800E49BC[] = "Invalid midi sequence index\n"; -const FloatLiteral D_800E49DC = { 60000000.0f }; -const FloatLiteral D_800E49E0 = { 46875.0f }; -const FloatLiteral D_800E49E4 = { 46875.0f }; -const FloatLiteral D_800E49E8 = { 120000.0f }; - /*********************************/ /************ .bss ************/ @@ -549,7 +544,7 @@ void func_800014BC(f32 arg0) { void musicSetTempo(s32 tempo){ if(tempo != 0){ f32 inv_tempo = (1.0f/tempo); - alCSPSetTempo(gMusicPlayer,(s32)(inv_tempo*D_800E49DC.floatLiteral)); + alCSPSetTempo(gMusicPlayer,(s32)(inv_tempo * 60000000.0f)); D_80115D30 = tempo; } } diff --git a/src/unknown_080500.c b/src/unknown_080500.c index 757c92af..51e3078a 100644 --- a/src/unknown_080500.c +++ b/src/unknown_080500.c @@ -739,8 +739,8 @@ s32 D_800E0968 = 0; s32 D_800E096C = 0; s32 D_800E0970 = 0; s32 D_800E0974 = 0; -const FloatLiteral D_800E7D04 = { 0.5f }; -f32* D_800E0978 = &D_800E7D04; +const f32 D_800E7D04[1] = { 0.5f }; // .rodata +f32* D_800E0978 = D_800E7D04; // .data s32 D_800E097C = 0; s32 D_800E0980 = 0; s32 D_800E0984 = 0; @@ -2174,7 +2174,7 @@ void func_80086A48(s32 arg0) { temp = D_80126BD4; temp2 = D_80126BE4; while (arg0 > 0) { - temp3 = D_800E8414.floatLiteral; + temp3 = 0.1f; if (D_80126A08 > 0) { D_80126BDC = D_80126BDC + temp3 * (temp - D_80126BDC); } diff --git a/src/unknown_0AEE70.c b/src/unknown_0AEE70.c index 13357142..813ec141 100644 --- a/src/unknown_0AEE70.c +++ b/src/unknown_0AEE70.c @@ -8,8 +8,8 @@ const char D_800E87F0[] = "\nMaximum limit of %d lens flare switches, per level, has been exceeded."; -// File Boundary! Not sure where the split occurs. Need to split when that gets figured out. -const DoubleLiteral D_800E8838 = { 0.0 }; +// File Boundary! Not sure where the split occurs though. +const int D_800E8838[2] = { 0, 0 }; const char D_800E8840[] = "\n\nUnknown trigger type in initParticleTrigger %d, Max %d.\n\n"; const char D_800E887C[] = "\n\nUnknown particle type in initParticleTrigger %d, Max %d.\n\n";