From 60a9cf9edfabc344048e76ffde2027c041b92784 Mon Sep 17 00:00:00 2001 From: Rainchus Date: Thu, 1 Aug 2024 16:00:30 -0500 Subject: [PATCH] wip extra w07 board rel --- .gitignore | 5 ++++- config/GMPE01_00/build.sha1 | 1 + config/GMPE01_00/config.yml | 5 +++++ config/GMPE01_00/rels/w07Dll/splits.txt | 3 +++ config/GMPE01_00/rels/w07Dll/symbols.txt | 2 ++ configure | 1 - configure.py | 12 ++++++++++++ include/game/board/main.h | 1 + include/game/gamework_data.h | 4 ++-- include/ovl_table.h | 3 ++- src/REL/mstory4Dll/main.c | 3 ++- src/game/board/main.c | 4 ++++ 12 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 config/GMPE01_00/rels/w07Dll/splits.txt create mode 100644 config/GMPE01_00/rels/w07Dll/symbols.txt delete mode 100644 configure diff --git a/.gitignore b/.gitignore index 81558d47..dd592e4b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,7 @@ orig/*/* !orig/*/.gitkeep /*.txt ctx.c -tools/output/* \ No newline at end of file +tools/output/* +rels_to_mod.py +orig/root +*.iso \ No newline at end of file diff --git a/config/GMPE01_00/build.sha1 b/config/GMPE01_00/build.sha1 index 0c205375..cd58622f 100644 --- a/config/GMPE01_00/build.sha1 +++ b/config/GMPE01_00/build.sha1 @@ -91,6 +91,7 @@ f9e8d9c4581d44488adaffa3d46d9bc835d4f9bd build/GMPE01_00/w03Dll/w03Dll.rel 821126eeb7054150744b925cc4cb06c751ddcefd build/GMPE01_00/w04Dll/w04Dll.rel d29f7ccadcba23c8446d05101c4efa5caba26dfd build/GMPE01_00/w05Dll/w05Dll.rel d11a7a6d44189ba8d1e3a7168ea640ea9f2152fe build/GMPE01_00/w06Dll/w06Dll.rel +f1ad7b5a5198a14d34141b28c654bc1704c9dcd9 build/GMPE01_00/w07Dll/w07Dll.rel 54bb23228b04c5aaa6aa7c8ca1f846baec5a1f2c build/GMPE01_00/w10Dll/w10Dll.rel 98cc41456afa9e1ccbb8e03718b8d3cb64e4e86f build/GMPE01_00/w20Dll/w20Dll.rel b888f2c6703e680699ff8c59ad9200b9d78d30a1 build/GMPE01_00/w21Dll/w21Dll.rel diff --git a/config/GMPE01_00/config.yml b/config/GMPE01_00/config.yml index 8e687a60..bd07ac13 100644 --- a/config/GMPE01_00/config.yml +++ b/config/GMPE01_00/config.yml @@ -471,6 +471,11 @@ modules: symbols: config/GMPE01_00/rels/w06Dll/symbols.txt splits: config/GMPE01_00/rels/w06Dll/splits.txt links: [] +- object: orig/GMPE01_00/files/dll/w07Dll.rel + hash: f1ad7b5a5198a14d34141b28c654bc1704c9dcd9 + symbols: config/GMPE01_00/rels/w07Dll/symbols.txt + splits: config/GMPE01_00/rels/w07Dll/splits.txt + links: [] - object: orig/GMPE01_00/files/dll/w10Dll.rel hash: 54bb23228b04c5aaa6aa7c8ca1f846baec5a1f2c symbols: config/GMPE01_00/rels/w10Dll/symbols.txt diff --git a/config/GMPE01_00/rels/w07Dll/splits.txt b/config/GMPE01_00/rels/w07Dll/splits.txt new file mode 100644 index 00000000..e787a0ee --- /dev/null +++ b/config/GMPE01_00/rels/w07Dll/splits.txt @@ -0,0 +1,3 @@ +Sections: + .ctors type:rodata align:4 + .dtors type:rodata align:4 diff --git a/config/GMPE01_00/rels/w07Dll/symbols.txt b/config/GMPE01_00/rels/w07Dll/symbols.txt new file mode 100644 index 00000000..120e2d17 --- /dev/null +++ b/config/GMPE01_00/rels/w07Dll/symbols.txt @@ -0,0 +1,2 @@ +_ctors = .ctors:0x00000000; // type:label scope:global +_dtors = .dtors:0x00000000; // type:label scope:global diff --git a/configure b/configure deleted file mode 100644 index 965a9b7f..00000000 --- a/configure +++ /dev/null @@ -1 +0,0 @@ -python3 configure.py "$@" \ No newline at end of file diff --git a/configure.py b/configure.py index 08d6561b..9386391b 100644 --- a/configure.py +++ b/configure.py @@ -1541,6 +1541,18 @@ config.libs = [ Object(Matching, "REL/w06Dll/bowser.c"), }, ), + Rel( + "w07Dll", # Custom Board + objects={ + Object(Matching, "REL/board_executor.c"), + # Object(Matching, "REL/w07Dll/main.c"), + # Object(Matching, "REL/w06Dll/mg_item.c"), + # Object(Matching, "REL/w06Dll/mg_coin.c"), + # Object(Matching, "REL/w06Dll/fire.c"), + # Object(Matching, "REL/w06Dll/bridge.c"), + # Object(Matching, "REL/w06Dll/bowser.c"), + }, + ), Rel( "w10Dll", # Tutorial board objects={ diff --git a/include/game/board/main.h b/include/game/board/main.h index 2b4d84cc..6a6870fd 100644 --- a/include/game/board/main.h +++ b/include/game/board/main.h @@ -15,6 +15,7 @@ #define BOARD_ID_TUTORIAL 6 //TUTORIAL_BOARD #define BOARD_ID_EXTRA1 7 //MEGA_BOARD_MAYHEM #define BOARD_ID_EXTRA2 8 //MINI_BOARD_MAD_DASH +#define BOARD_ID_CUSTOM 9 //Custom Test Board #define BOARD_FABS(value) ((value < 0) ? -(value) : (value)) diff --git a/include/game/gamework_data.h b/include/game/gamework_data.h index 5376c63e..26dcc030 100644 --- a/include/game/gamework_data.h +++ b/include/game/gamework_data.h @@ -34,8 +34,8 @@ typedef struct system_state { /* 0x06 */ u8 star_flag; /* 0x07 */ u8 star_total; /* 0x08 */ struct { - u8 star_pos : 3; - u8 board : 5; + u16 star_pos : 3; + u16 board : 10; //double board count }; /* 0x09 */ s8 last5_effect; /* 0x0A */ s8 player_curr; diff --git a/include/ovl_table.h b/include/ovl_table.h index 4f66a2d2..148e2295 100644 --- a/include/ovl_table.h +++ b/include/ovl_table.h @@ -96,4 +96,5 @@ OVL_DEFINE(OVL_W06, "dll/w06dll.rel") OVL_DEFINE(OVL_W10, "dll/w10dll.rel") OVL_DEFINE(OVL_W20, "dll/w20dll.rel") OVL_DEFINE(OVL_W21, "dll/w21dll.rel") -OVL_DEFINE(OVL_ZTAR, "dll/ztardll.rel") \ No newline at end of file +OVL_DEFINE(OVL_ZTAR, "dll/ztardll.rel") +OVL_DEFINE(OVL_W07, "dll/w07Dll.rel") \ No newline at end of file diff --git a/src/REL/mstory4Dll/main.c b/src/REL/mstory4Dll/main.c index 1fa909da..fd94bb3a 100644 --- a/src/REL/mstory4Dll/main.c +++ b/src/REL/mstory4Dll/main.c @@ -161,7 +161,8 @@ void fn_1_EC(void) OVL_W04, OVL_W05, OVL_W06, - OVL_W10 + OVL_W10, + OVL_W07 }; WipeColorSet(255, 255, 255); WipeCreate(WIPE_MODE_IN, WIPE_TYPE_NORMAL, -1); diff --git a/src/game/board/main.c b/src/game/board/main.c index 9aaa66a1..af788a8c 100644 --- a/src/game/board/main.c +++ b/src/game/board/main.c @@ -157,6 +157,10 @@ void BoardObjectSetup(BoardFunc create, BoardFunc destroy) case OVL_W21: GWSystem.board = BOARD_ID_EXTRA2; break; + + case OVL_W07: + GWSystem.board = BOARD_ID_CUSTOM; + break; } }