From eacb7bfc55c2c5cec3bf0f397f02c242360e5b4a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 3 Apr 2021 19:29:56 +0900 Subject: [PATCH] Fixing func_80025F44 (#250) * Fixing func_80025F44 in us and jp * revert JP * Webhook test --- src/code_1060_len_310.c | 13 +++++++---- src/jp/main_1060.c | 2 -- .../code_1060_len_310/func_80025F44.s | 23 +++++++++++++++++++ ver/us/splat.yaml | 2 +- 4 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 ver/us/asm/nonmatchings/code_1060_len_310/func_80025F44.s diff --git a/src/code_1060_len_310.c b/src/code_1060_len_310.c index 92e701e6e7..e4c45f6a3e 100644 --- a/src/code_1060_len_310.c +++ b/src/code_1060_len_310.c @@ -79,9 +79,14 @@ u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) { return 1; } -extern const char D_80097D30[]; -//const char D_80097D30[] = "File:%s Line:%d %s \n\0\0\0"; -void func_80025F44(char* arg0, char* file, s32 line, char* arg3) { - func_80025CFC(D_80097D30, file, line, arg0); +// Nop issue with the rodata string +#ifdef NON_MATCHING +void func_80025F44(char* arg0, char* file, s32 line) { + func_80025CFC("File:%s Line:%d %s \n", file, line, arg0); PANIC(); } +#else +INCLUDE_ASM(void, "code_1060_len_310", func_80025F44, char* arg0, char* file, s32 line); +#endif + + diff --git a/src/jp/main_1060.c b/src/jp/main_1060.c index ff8e176be1..fe9640b1d4 100644 --- a/src/jp/main_1060.c +++ b/src/jp/main_1060.c @@ -79,9 +79,7 @@ u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) { return 1; } - extern const char D_80097D10[]; // "File:%s Line:%d %s \n\0\0\0" - void func_80025F44(char* arg0, char* file, s32 line, char* arg3) { func_80025CFC(D_80097D10, file, line, arg0); PANIC(); diff --git a/ver/us/asm/nonmatchings/code_1060_len_310/func_80025F44.s b/ver/us/asm/nonmatchings/code_1060_len_310/func_80025F44.s new file mode 100644 index 0000000000..6eb63ff317 --- /dev/null +++ b/ver/us/asm/nonmatchings/code_1060_len_310/func_80025F44.s @@ -0,0 +1,23 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +.section .rodata + +glabel D_80097D30 +.ascii "File:%s Line:%d %s \n" + +.section .text + +glabel func_80025F44 +/* 1344 80025F44 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 1348 80025F48 AFBF0010 */ sw $ra, 0x10($sp) +/* 134C 80025F4C 0080382D */ daddu $a3, $a0, $zero +/* 1350 80025F50 3C048009 */ lui $a0, %hi(D_80097D30) +/* 1354 80025F54 24847D30 */ addiu $a0, $a0, %lo(D_80097D30) +/* 1358 80025F58 0C00973F */ jal func_80025CFC +/* 135C 80025F5C 00000000 */ nop +.L80025F60: +/* 1360 80025F60 080097D8 */ j .L80025F60 +/* 1364 80025F64 00000000 */ nop +/* 1368 80025F68 00000000 */ nop +/* 136C 80025F6C 00000000 */ nop diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 237368e327..7f705c9ce5 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -268,7 +268,7 @@ segments: - [0x6FA70, data] # has scripts? - [0x70E30, .data, battle/battle] - [0x71430, data] - - [0x73130, rodata, code_1060_len_310] + - [0x73130, .rodata, code_1060_len_310] - [0x73148, .rodata, code_1b40_len_20b0] - [0x73160, .rodata, code_43F0] - [0x73200, .rodata, code_6e40_len_500]