From 17de52bff78f8a339511d9c0ccba469f501fc8dd Mon Sep 17 00:00:00 2001 From: David Benepe Date: Sat, 5 Jun 2021 16:49:19 -0500 Subject: [PATCH] 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 = []