From e804f78fb399a92baeb137e0e21a5c0312f324ca Mon Sep 17 00:00:00 2001 From: dbalatoni13 Date: Fri, 15 Nov 2024 04:12:57 +0100 Subject: [PATCH] Split and matched nisDll --- config/GMPE01_00/rels/nisDll/splits.txt | 3 +++ config/GMPE01_00/rels/nisDll/symbols.txt | 2 +- configure.py | 6 ++++++ src/REL/nisDll/main.c | 21 +++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/REL/nisDll/main.c diff --git a/config/GMPE01_00/rels/nisDll/splits.txt b/config/GMPE01_00/rels/nisDll/splits.txt index ac3125d0..d512c836 100644 --- a/config/GMPE01_00/rels/nisDll/splits.txt +++ b/config/GMPE01_00/rels/nisDll/splits.txt @@ -3,3 +3,6 @@ Sections: .ctors type:rodata align:4 .dtors type:rodata align:4 .data type:data align:8 + +REL/nisDll/main.c: + .text start:0x00000000 end:0x0000017C diff --git a/config/GMPE01_00/rels/nisDll/symbols.txt b/config/GMPE01_00/rels/nisDll/symbols.txt index 1143328c..8cabd560 100644 --- a/config/GMPE01_00/rels/nisDll/symbols.txt +++ b/config/GMPE01_00/rels/nisDll/symbols.txt @@ -1,4 +1,4 @@ -fn_1_0 = .text:0x00000000; // type:function size:0x68 +ObjectSetup = .text:0x00000000; // type:function size:0x68 fn_1_68 = .text:0x00000068; // type:function size:0x2C _prolog = .text:0x00000094; // type:function size:0x9C scope:global _epilog = .text:0x00000130; // type:function size:0x4C scope:global diff --git a/configure.py b/configure.py index f9ba9bf9..c9a29b4f 100644 --- a/configure.py +++ b/configure.py @@ -1386,6 +1386,12 @@ config.libs = [ Object(NonMatching, "REL/mstoryDll/save.c"), }, ), + Rel( + "nisDll", + objects={ + Object(Matching, "REL/nisDll/main.c") + }, + ), Rel( "option", objects={ diff --git a/src/REL/nisDll/main.c b/src/REL/nisDll/main.c new file mode 100644 index 00000000..a50c5b18 --- /dev/null +++ b/src/REL/nisDll/main.c @@ -0,0 +1,21 @@ +#include "game/object.h" + +void fn_1_68(omObjData *object); + +void ObjectSetup(void) +{ + Process *process = omInitObjMan(0xA, 0x2000); + omObjData *object = omAddObjEx(process, 0, 0, 0, -1, fn_1_68); + u32 *work = object->work; +} + +void fn_1_68(omObjData *object) +{ + s8 *work = (s8 *)object->work; + if (*work != 0) { + (void)work; + return; + } +} + +#include "src/REL/executor.c"