From 36786363e3616a6ec7469cb14d264c2292011057 Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 17:08:18 -0500 Subject: [PATCH] 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 ************/