summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/SOUE01/splits.txt7
-rw-r--r--configure.py776
-rw-r--r--include/common.h4
-rw-r--r--include/nw4r/ut/ut_TextWriterBase.h4
-rw-r--r--include/rvl/OS/OS.h3
-rw-r--r--include/rvl/OS/OSError.h5
-rw-r--r--include/rvl/OS/OSHardware.h5
-rw-r--r--include/rvl/OS/OSUtf.h3
-rw-r--r--include/sized_string.h1
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h6
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h5
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h9
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h6
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h3
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c9
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c4
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c4
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h33
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h4
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c8
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp309
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/__mem.c83
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c4
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Src/runtime.c2
-rw-r--r--src/nw4r/lyt/lyt_textBox.cpp1
27 files changed, 1007 insertions, 295 deletions
diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt
index 89ad7021..0c7fa8bd 100644
--- a/config/SOUE01/splits.txt
+++ b/config/SOUE01/splits.txt
@@ -1013,9 +1013,6 @@ toBeSorted/d_underground.cpp:
.text start:0x8018B800 end:0x8018B874 align:16
.ctors start:0x804DB7E0 end:0x804DB7E4
-d/d_pouch.cpp:
- .text start:0x80189FA0 end:0x8018B4A4
-
d/a/d_a_fish_mgr_base.cpp:
.text start:0x8018B880 end:0x8018BFC8 align:16
.ctors start:0x804DB7E4 end:0x804DB7E8
@@ -1398,7 +1395,7 @@ s/s_Math.cpp:
s/s_Phase.cpp:
.text start:0x802DEEB0 end:0x802DEF74 align:16
-toBeSorted/print.cpp:
+s/s_Print.cpp:
.text start:0x802DEF80 end:0x802DF0E4 align:16
c/c_counter.cpp:
@@ -2010,7 +2007,7 @@ d/col/cc/d_cc_d.cpp:
.text start:0x80353B50 end:0x80354298 align:16
.data start:0x80548340 end:0x80548580
-d/col/cc/d_cc_list.cpp:
+toBeSorted/col/cc/d_cc_list.cpp:
.text start:0x803542A0 end:0x803543C8 align:16
toBeSorted/col/cc/unk_flag_check.cpp:
diff --git a/configure.py b/configure.py
index f066e933..179167bf 100644
--- a/configure.py
+++ b/configure.py
@@ -260,6 +260,25 @@ cflags_egg = [
# nw4r flags
cflags_nw4r = [*cflags_base, "-ipa file", "-fp_contract off", ""]
+cflags_hbm = [
+ # TODO
+ *cflags_base,
+]
+
+# TRK flags, copied from TP
+cflags_trk = [
+ *cflags_base,
+ "-use_lmw_stmw on",
+ "-rostr",
+ "-str reuse",
+ "-gccinc",
+ "-common off",
+ "-inline deferred,auto",
+ "-char signed",
+ "-sdata 0",
+ "-sdata2 0",
+]
+
# REL flags
cflags_rel = [
*cflags_framework,
@@ -306,6 +325,26 @@ def nw4rLib(lib_name, objects, extra_cflags=[]):
}
+def JSystemLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
+ return {
+ "lib": lib_name,
+ # probably?
+ "mw_version": "Wii/1.5",
+ "cflags": cflags_framework,
+ "progress_category": "jsystem",
+ "host": False,
+ "objects": objects,
+ }
+
+
+# RVL SDK flags
+cflags_rvl = [
+ *cflags_base,
+ "-enc SJIS",
+ "-fp_contract off",
+ "-ipa file",
+]
+
Matching = True
NonMatching = False
Equivalent = (
@@ -318,7 +357,7 @@ def MatchingFor(*versions):
return config.version in versions
-config.warn_missing_config = False
+config.warn_missing_config = True
config.warn_missing_source = False
config.libs = [
{
@@ -329,8 +368,36 @@ config.libs = [
"progress_category": "game",
"host": False,
"objects": [
- Object(Matching, "d/flag/flag_managers.cpp"),
- Object(NonMatching, "toBeSorted/special_item_drop_mgr.cpp"),
+ Object(NonMatching, "toBeSorted/d_lib.cpp"),
+ Object(NonMatching, "toBeSorted/unk_sorajima_list.cpp"),
+ Object(NonMatching, "toBeSorted/mpls.cpp"),
+ Object(NonMatching, "toBeSorted/mdl_base.cpp"),
+ Object(NonMatching, "toBeSorted/d_assert.cpp"),
+ Object(NonMatching, "toBeSorted/d_jstudio.cpp"),
+ Object(Matching, "toBeSorted/save_file.cpp"),
+ Object(NonMatching, "toBeSorted/file_manager.cpp"),
+ Object(NonMatching, "toBeSorted/save_manager.cpp"),
+ Object(NonMatching, "toBeSorted/save_requests.cpp"),
+ Object(NonMatching, "toBeSorted/d_d2d.cpp"),
+ Object(NonMatching, "toBeSorted/d_d3d.cpp"),
+ Object(
+ Matching, "toBeSorted/d_scn_callback.cpp", extra_cflags=["-opt noloop"]
+ ),
+ Object(NonMatching, "toBeSorted/d_unk_proc.cpp"),
+ Object(NonMatching, "toBeSorted/d_shadow.cpp"),
+ Object(NonMatching, "toBeSorted/d_unk_mdl_stuff_1.cpp"),
+ Object(NonMatching, "toBeSorted/d_unk_mdl_stuff_2.cpp"),
+ Object(NonMatching, "toBeSorted/blur_and_palette_manager.cpp"),
+ Object(NonMatching, "toBeSorted/d_effects_1.cpp"),
+ Object(NonMatching, "toBeSorted/d_effects_2.cpp"),
+ Object(NonMatching, "toBeSorted/sound_info.cpp"),
+ Object(NonMatching, "d/a/d_a_base.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_base.cpp"),
+ Object(NonMatching, "d/a/e/d_a_e_base.cpp"),
+ Object(NonMatching, "d/a/npc/d_a_npc.cpp"),
+ Object(NonMatching, "toBeSorted/d_npc_common.cpp"),
+ Object(NonMatching, "d/a/npc/d_a_ordinary_npc.cpp"),
+ Object(NonMatching, "d/d_ac_npc_kyui.cpp"),
Object(Matching, "d/d_base.cpp"),
Object(NonMatching, "d/d_carry.cpp"),
Object(Matching, "d/d_cc.cpp"),
@@ -339,51 +406,68 @@ config.libs = [
Object(NonMatching, "d/d_dylink.cpp"),
Object(Matching, "d/d_fader.cpp"),
Object(Matching, "d/d_font_manager.cpp"),
+ Object(NonMatching, "d/d_gfx.cpp"),
Object(Matching, "d/d_heap.cpp"),
+ Object(NonMatching, "d/d_main.cpp"),
+ Object(NonMatching, "d/d_pad.cpp"),
+ Object(NonMatching, "d/d_pad_player.cpp"),
+ Object(NonMatching, "d/d_player.cpp"),
Object(Matching, "d/d_rawarchive.cpp"),
Object(Matching, "d/d_scene.cpp"),
+ Object(NonMatching, "d/d_state.cpp"),
Object(Matching, "d/d_stage_parse.cpp"),
Object(NonMatching, "d/d_sys.cpp"),
- Object(NonMatching, "toBeSorted/sound_info.cpp"),
+ Object(NonMatching, "d/d_sys_init.cpp"),
Object(Matching, "toBeSorted/arc_callback_handler.cpp"),
- Object(NonMatching, "d/a/d_a_base.cpp"),
- Object(NonMatching, "d/a/d_a_item.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_base.cpp"),
- Object(NonMatching, "d/a/npc/d_a_npc.cpp"),
- Object(NonMatching, "d/a/npc/d_a_ordinary_npc.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_bomb.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_arrow.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_boomerang.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_fairy.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_tbox.cpp"),
- Object(NonMatching, "d/a/obj/d_a_obj_time_area.cpp"),
- Object(Matching, "d/a/obj/d_a_obj_switch.cpp"),
- Object(Matching, "d/a/obj/d_a_obj_water_spout.cpp"),
- Object(Matching, "d/tg/d_t_switch.cpp"),
+ Object(NonMatching, "d/d_video.cpp"),
+ Object(NonMatching, "d/d_cursor_hit_check.cpp"),
+ Object(NonMatching, "toBeSorted/d_rumble.cpp"),
+ Object(NonMatching, "toBeSorted/string_util.cpp"),
+ Object(NonMatching, "toBeSorted/cx_util.cpp"),
+ Object(NonMatching, "toBeSorted/area_math.cpp"),
+ Object(NonMatching, "toBeSorted/deg_angle_util.cpp"),
+ Object(NonMatching, "toBeSorted/reload_color_fader.cpp"),
Object(Matching, "toBeSorted/arc_managers/current_stage_arc_manager.cpp"),
Object(Matching, "toBeSorted/arc_managers/oarc_manager.cpp"),
+ Object(NonMatching, "toBeSorted/arc_managers/oarc_control.cpp"),
Object(Matching, "toBeSorted/arc_managers/layout_arc_manager.cpp"),
+ Object(NonMatching, "toBeSorted/arc_managers/layout_arc_control.cpp"),
+ Object(NonMatching, "toBeSorted/base_tables.cpp"),
+ Object(NonMatching, "toBeSorted/unk_vec_math.cpp"),
+ Object(NonMatching, "toBeSorted/unk_mdl_cc.cpp"),
+ Object(NonMatching, "toBeSorted/d_camera.cpp"),
+ Object(NonMatching, "toBeSorted/d_event_1.cpp"),
+ Object(NonMatching, "toBeSorted/unk_map_cam.cpp"),
+ Object(NonMatching, "toBeSorted/unk_vec_math_event.cpp"),
Object(NonMatching, "toBeSorted/attention.cpp"),
+ Object(NonMatching, "toBeSorted/d_t_camera.cpp"),
Object(Matching, "toBeSorted/dowsing_target.cpp"),
- Object(NonMatching, "toBeSorted/time_area_mgr.cpp"),
- Object(NonMatching, "toBeSorted/nand_request_thread.cpp"),
- Object(Matching, "toBeSorted/save_file.cpp"),
- Object(Matching, "toBeSorted/counters/counter.cpp"),
- Object(NonMatching, "toBeSorted/counters/counters.cpp"),
- Object(Matching, "toBeSorted/counters/rupee_counter.cpp"),
- Object(Matching, "toBeSorted/counters/arrow_counter.cpp"),
- Object(Matching, "toBeSorted/counters/bomb_counter.cpp"),
- Object(Matching, "toBeSorted/counters/tear_counter.cpp"),
- Object(Matching, "toBeSorted/counters/slingshot_seed_counter.cpp"),
- Object(Matching, "toBeSorted/counters/key_piece_counter.cpp"),
- Object(Matching, "toBeSorted/counters/extra_wallet_counter.cpp"),
- Object(NonMatching, "d/d_cursor_hit_check.cpp"),
+ Object(NonMatching, "toBeSorted/d_event_2.cpp"),
+ Object(NonMatching, "toBeSorted/d_event_director.cpp"),
+ Object(NonMatching, "toBeSorted/minigame_mgr.cpp"),
+ Object(NonMatching, "toBeSorted/salvage_mgr.cpp"),
+ Object(NonMatching, "toBeSorted/d_path.cpp"),
+ Object(NonMatching, "toBeSorted/d_area.cpp"),
Object(Matching, "d/lyt/d2d.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_draw_mark.cpp"),
Object(NonMatching, "d/lyt/d_textbox.cpp"),
Object(Matching, "d/lyt/d_window.cpp"),
Object(Matching, "d/d_textunk.cpp"),
Object(NonMatching, "d/d_textwindow_unk.cpp"),
Object(NonMatching, "d/d_tag_processor.cpp"),
+ Object(NonMatching, "toBeSorted/time_area_mgr.cpp"),
+ Object(NonMatching, "toBeSorted/nand_request_thread.cpp"),
+ Object(NonMatching, "toBeSorted/unk_gfx.cpp"),
+ Object(Matching, "d/flag/flag_managers.cpp"),
+ Object(NonMatching, "toBeSorted/bigboss_model_math_stuff.cpp"),
+ Object(NonMatching, "toBeSorted/actor_event_flow_manager_related.cpp"),
+ Object(NonMatching, "d/d_lyt_base.cpp"),
+ Object(NonMatching, "toBeSorted/unk_npc_path_stuff_1.cpp"),
+ Object(NonMatching, "toBeSorted/unk_npc_path_stuff_2.cpp"),
+ Object(NonMatching, "toBeSorted/unk_bird_stuff.cpp"),
+ Object(NonMatching, "toBeSorted/timekeeper.cpp"),
+ Object(NonMatching, "toBeSorted/special_item_drop_mgr.cpp"),
+ Object(NonMatching, "toBeSorted/d_particle.cpp"),
Object(Matching, "d/lyt/meter/d_lyt_meter.cpp"),
Object(NonMatching, "d/lyt/meter/d_lyt_meter_unk.cpp"),
Object(Matching, "d/lyt/meter/d_lyt_meter_a_btn.cpp"),
@@ -409,6 +493,7 @@ config.libs = [
Object(Matching, "d/lyt/d_lyt_common_a_btn.cpp"),
Object(Matching, "d/lyt/d_lyt_common_icon_material.cpp"),
Object(Matching, "d/lyt/d_lyt_common_icon_item.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_target_bird.cpp"),
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window.cpp"),
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp"),
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_common.cpp"),
@@ -419,7 +504,7 @@ config.libs = [
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_wood.cpp"),
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_stone.cpp"),
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_demo.cpp"),
- Object(NonMatching, "d/lyt/d_lyt_simple_window.cpp"),
+ Object(NonMatching, "d/lyt/msg_window/d_lyt_simple_window.cpp"),
Object(Matching, "d/lyt/d_lyt_auto_caption.cpp"),
Object(Matching, "d/lyt/d_lyt_auto_explain.cpp"),
Object(NonMatching, "d/lyt/d_lyt_map_capture.cpp"),
@@ -429,35 +514,125 @@ config.libs = [
Object(Matching, "d/lyt/d_lyt_area_caption.cpp"),
Object(Matching, "d/lyt/d_lyt_wipe.cpp"),
Object(NonMatching, "d/lyt/d_lyt_help.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_system_window.cpp"),
Object(Matching, "d/lyt/d_lyt_bird_gauge.cpp"),
Object(Matching, "d/lyt/d_lyt_sky_gauge.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_deposit_stock.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_deposit_box.cpp"),
Object(NonMatching, "d/lyt/d_lyt_boss_gauge.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_pause_back.cpp"),
Object(NonMatching, "d/lyt/d_lyt_pause_disp_00.cpp"),
Object(NonMatching, "d/lyt/d_lyt_pause_disp_01.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_pause_info.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_pause_text.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_save_msg_window.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_util_items.cpp"),
+ Object(Matching, "d/lyt/d_lyt_common_arrow.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_common_title.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_cursor_stick.cpp"),
+ Object(NonMatching, "toBeSorted/fi_context.cpp"),
+ Object(NonMatching, "toBeSorted/item_mdl_name.cpp"),
+ Object(Matching, "toBeSorted/counters/counter.cpp"),
+ Object(NonMatching, "toBeSorted/counters/counters.cpp"),
+ Object(Matching, "toBeSorted/counters/rupee_counter.cpp"),
+ Object(Matching, "toBeSorted/counters/arrow_counter.cpp"),
+ Object(Matching, "toBeSorted/counters/bomb_counter.cpp"),
+ Object(Matching, "toBeSorted/counters/tear_counter.cpp"),
+ Object(Matching, "toBeSorted/counters/slingshot_seed_counter.cpp"),
+ Object(Matching, "toBeSorted/counters/key_piece_counter.cpp"),
+ Object(Matching, "toBeSorted/counters/extra_wallet_counter.cpp"),
+ Object(NonMatching, "toBeSorted/item_mdl.cpp"),
+ Object(NonMatching, "toBeSorted/unk_screen_effect.cpp"),
+ Object(NonMatching, "toBeSorted/revision_info.cpp"),
+ Object(NonMatching, "d/a/d_a_bullet_base.cpp"),
Object(Matching, "d/lyt/d_lyt_fader.cpp"),
Object(Matching, "d/lyt/d_screen_fader.cpp"),
+ Object(NonMatching, "d/a/d_a_bird_base.cpp"),
+ Object(NonMatching, "d/a/d_a_door_base.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_map_popup.cpp"),
+ Object(NonMatching, "d/d_pouch.cpp"),
+ Object(NonMatching, "toBeSorted/d_beacon.cpp"),
+ Object(NonMatching, "toBeSorted/d_underground.cpp"),
+ Object(NonMatching, "d/a/d_a_fish_mgr_base.cpp"),
+ Object(NonMatching, "d/a/d_a_fish_base.cpp"),
+ Object(NonMatching, "toBeSorted/sword_proj_effect_list.cpp"),
Object(NonMatching, "d/a/d_a_insect.cpp"),
+ Object(NonMatching, "toBeSorted/unk_save_time.cpp"),
+ Object(NonMatching, "d/a/d_a_salbage_obj.cpp"),
+ Object(NonMatching, "d/a/d_a_salbage_npc.cpp"),
+ Object(NonMatching, "toBeSorted/d_unk_pad.cpp"),
+ Object(NonMatching, "toBeSorted/goddess_chest_counter.cpp"),
+ Object(NonMatching, "toBeSorted/misc_actor.cpp"),
+ Object(NonMatching, "toBeSorted/d_hbm"),
Object(NonMatching, "d/d_stage_mgr.cpp"),
Object(NonMatching, "d/d_last.cpp"),
+ Object(NonMatching, "d/d_camera.cpp"),
+ Object(NonMatching, "d/d_light_obj.cpp"),
+ Object(NonMatching, "d/tg/d_t_weather.cpp"),
Object(NonMatching, "d/d_message.cpp"),
Object(NonMatching, "d/d_stage.cpp"),
+ Object(NonMatching, "d/d_stage_select.cpp"),
Object(Matching, "d/d_room.cpp"),
- Object(NonMatching, "d/d_cs_base.cpp"),
- Object(NonMatching, "d/d_cs_game.cpp"),
+ Object(NonMatching, "d/tg/d_t_vr_box.cpp"),
Object(Matching, "d/d_sc_title.cpp"),
Object(NonMatching, "d/d_sc_game.cpp"),
- Object(Matching, "d/lyt/d_lyt_common_arrow.cpp"),
- Object(NonMatching, "toBeSorted/file_manager.cpp"),
- Object(NonMatching, "toBeSorted/save_manager.cpp"),
- Object(NonMatching, "toBeSorted/d_d3d.cpp"),
- Object(
- Matching,
- "toBeSorted/d_scn_callback.cpp",
- extra_cflags=["-opt noloop"],
- ),
- Object(NonMatching, "toBeSorted/d_unk_proc.cpp"),
- Object(NonMatching, "toBeSorted/blur_and_palette_manager.cpp"),
+ Object(NonMatching, "d/d_cs_base.cpp"),
+ Object(NonMatching, "d/d_cs_game.cpp"),
+ Object(NonMatching, "d/a/d_a_player.cpp"),
+ Object(NonMatching, "d/a/d_a_item.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_bomb.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_arrow.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_boomerang.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_fairy.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_tbox.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_time_area.cpp"),
+ Object(Matching, "d/a/obj/d_a_obj_switch.cpp"),
+ Object(NonMatching, "d/d_thp_player.cpp"),
+ Object(NonMatching, "d/tg/d_t_alldie.cpp"),
+ Object(NonMatching, "d/tg/d_t_view_clip.cpp"),
+ Object(Matching, "d/tg/d_t_switch.cpp"),
+ Object(NonMatching, "d/tg/d_t_mass_object.cpp"),
+ Object(NonMatching, "d/tg/d_t_camera.cpp"),
+ Object(NonMatching, "d/tg/d_t_event.cpp"),
+ Object(NonMatching, "d/tg/d_t_event_f.cpp"),
+ Object(NonMatching, "d/tg/d_tk_event.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_npc_inv.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_npc_tke.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_npc_str.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_pause.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_game_over.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_save_mgr.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_drop_line.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_force_line.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_enemy_icon.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_mini_game.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_meter_suiryu_score.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_meter_suiryu_score_comp.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_boss_caption.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_demo_dowsing.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_shop.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_deposit.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_demo_title.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_end_roll.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_bullet.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_npc_ken_talk.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_jstudio_act.cpp"),
+ Object(NonMatching, "toBeSorted/d_a_jstudio_sys.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_control_game.cpp"),
+ Object(NonMatching, "d/lyt/d_lyt_control_title.cpp"),
+ Object(NonMatching, "d/tg/d_t_map_area.cpp"),
+ Object(NonMatching, "d/tg/d_t_truck_rails.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_force_sign.cpp"),
+ Object(NonMatching, "d/tg/d_t_force_get_flag.cpp"),
+ Object(Matching, "d/a/obj/d_a_obj_water_spout.cpp"),
+ Object(NonMatching, "d/tg/d_t_siren_tag.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_spore.cpp"),
+ Object(NonMatching, "d/tg/d_t_genki_mgr.cpp"),
+ Object(NonMatching, "d/a/obj/d_a_obj_water_mark.cpp"),
+ Object(NonMatching, "toBeSorted/d_sc_e3_title.cpp"),
+ Object(NonMatching, "toBeSorted/d_sc_e3_game_end.cpp"),
Object(Matching, "DynamicLink.cpp"),
+ Object(NonMatching, "toBeSorted/d_thp.cpp"),
],
},
{
@@ -506,8 +681,41 @@ config.libs = [
Object(Matching, "d/col/bg/d_bg_w_sv.cpp"),
Object(NonMatching, "d/col/bg/d_bg_w_time.cpp"),
Object(Matching, "d/col/cc/d_cc_d.cpp"),
+ Object(NonMatching, "toBeSorted/col/cc/d_cc_list.cpp"),
+ Object(NonMatching, "toBeSorted/col/cc/unk_flag_check.cpp"),
Object(Matching, "d/col/cc/d_cc_mass_s.cpp"),
Object(NonMatching, "d/col/cc/d_cc_s.cpp"),
+ Object(NonMatching, "toBeSorted/col/cc/misc_unks.cpp"),
+ ],
+ },
+ {
+ "lib": "sound",
+ "mw_version": "Wii/1.5",
+ "cflags": cflags_framework,
+ "scratch_preset_id": 169,
+ "progress_category": "game",
+ "host": False,
+ "objects": [
+ # These are very low quality splits since nobody has figured
+ # out enough detail. Need to look into nw4r::snd first
+ Object(NonMatching, "d/snd/d_snd.cpp"),
+ Object(NonMatching, "d/snd/d_snd_actor.cpp"),
+ Object(NonMatching, "d/snd/d_snd_engine.cpp"),
+ Object(NonMatching, "d/snd/d_snd_unk_component_1.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_bgm.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk1.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk3.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_enemy.cpp"),
+ Object(NonMatching, "d/snd/d_snd_unk_component_2.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_effect.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_5.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_6.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_7.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_8.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_9.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_10.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_11.cpp"),
+ Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_12.cpp"),
],
},
{
@@ -518,6 +726,9 @@ config.libs = [
"progress_category": "core",
"host": False,
"objects": [
+ Object(NonMatching, "c/c_counter.cpp"),
+ Object(NonMatching, "c/c_mem.cpp"),
+ Object(NonMatching, "c/c_lib.cpp"),
Object(Matching, "c/c_list.cpp"),
Object(NonMatching, "c/c_math.cpp"),
Object(NonMatching, "c/c_rand.cpp"),
@@ -547,20 +758,89 @@ config.libs = [
Object(NonMatching, "m/m3d/m_bmdl.cpp"),
Object(Matching, "m/m3d/m_calc_ratio.cpp"),
Object(Matching, "m/m3d/m_fanm.cpp"),
+ Object(NonMatching, "m/m3d/m_global.cpp"),
Object(Matching, "m/m3d/m_mdl.cpp"),
Object(NonMatching, "m/m3d/m_shadow.cpp"),
Object(Matching, "m/m3d/m_scnleaf.cpp"),
Object(Matching, "m/m3d/m_smdl.cpp"),
+ Object(NonMatching, "m/m3d/m_state.cpp"),
Object(Matching, "m/m2d.cpp"),
Object(Matching, "m/m_allocator.cpp"),
Object(Matching, "m/m_angle.cpp"),
+ Object(NonMatching, "m/m_color.cpp"),
Object(Matching, "m/m_color_fader.cpp"),
Object(Matching, "m/m_dvd.cpp"),
Object(Matching, "m/m_fader.cpp"),
Object(Matching, "m/m_fader_base.cpp"),
+ Object(NonMatching, "m/m_frustum.cpp"),
Object(Matching, "m/m_heap.cpp"),
Object(NonMatching, "m/m_mtx.cpp"),
Object(Matching, "m/m_pad.cpp"),
+ Object(NonMatching, "m/m_quat.cpp"),
+ Object(NonMatching, "m/m_thread.cpp"),
+ Object(NonMatching, "m/m_vec.cpp"),
+ ],
+ },
+ {
+ "lib": "hbm",
+ # no idea
+ "mw_version": "Wii/1.0",
+ "cflags": cflags_hbm,
+ "progress_category": "hbm",
+ "host": False,
+ "objects": [
+ Object(NonMatching, "hbm/homebutton/HBMFrameController.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMAnmController.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMGUIManager.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMController.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMRemoteSpk.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMAxSound.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMCommon.cpp"),
+ Object(NonMatching, "hbm/homebutton/HBMBase.cpp"),
+ Object(NonMatching, "hbm/sound/mix.cpp"),
+ Object(NonMatching, "hbm/sound/syn.cpp"),
+ Object(NonMatching, "hbm/sound/synctrl.cpp"),
+ Object(NonMatching, "hbm/sound/synenv.cpp"),
+ Object(NonMatching, "hbm/sound/synmix.cpp"),
+ Object(NonMatching, "hbm/sound/synpitch.cpp"),
+ Object(NonMatching, "hbm/sound/synsample.cpp"),
+ Object(NonMatching, "hbm/sound/synvoice.cpp"),
+ Object(NonMatching, "hbm/sound/seq.cpp"),
+ ],
+ },
+ {
+ # TODO: Split up further
+ "lib": "hbm",
+ # no idea
+ "mw_version": "Wii/1.0",
+ "cflags": cflags_nw4r,
+ "progress_category": "nw4r",
+ "host": False,
+ "objects": [
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_animation.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_arcResourceAccessor.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_bounding.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_common.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_drawInfo.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_group.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_layout.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_material.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_pane.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_picture.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_resourceAccessor.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_textBox.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/lyt/lyt_window.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/math/math_triangular.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_binaryFileFormat.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_CharStrmReader.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_CharWriter.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_Font.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_LinkList.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_list.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_ResFont.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_ResFontBase.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_TagProcessorBase.cpp"),
+ Object(NonMatching, "hbm/nw4hbm/ut/ut_TextWriterBase.cpp"),
],
},
{
@@ -584,6 +864,7 @@ config.libs = [
"progress_category": "core",
"host": False,
"objects": [
+ Object(NonMatching, "s/s_Assert.cpp"),
Object(Matching, "s/s_Crc.cpp"),
Object(Matching, "s/s_Math.cpp"),
Object(Matching, "s/s_FPhase.cpp"),
@@ -591,6 +872,7 @@ config.libs = [
Object(Matching, "s/s_StateMethod.cpp"),
Object(Matching, "s/s_StateMethodUsr_FI.cpp"),
Object(Matching, "s/s_Phase.cpp"),
+ Object(NonMatching, "s/s_Print.cpp"),
],
},
{
@@ -601,24 +883,11 @@ config.libs = [
"progress_category": "core",
"host": False,
"objects": [
+ Object(NonMatching, "f/f_ba_helper.cpp"),
Object(Matching, "f/f_base.cpp"),
Object(Matching, "f/f_list.cpp"),
Object(Matching, "f/f_manager.cpp"),
- ],
- },
- {
- "lib": "Runtime.PPCEABI.H",
- "mw_version": "Wii/1.6",
- "cflags": cflags_runtime,
- "progress_category": "core",
- "host": False,
- "objects": [
- Object(
- Matching, "PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c"
- ),
- Object(
- Matching, "PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp"
- ),
+ Object(NonMatching, "f/f_tree.cpp"),
],
},
# NW4R
@@ -936,28 +1205,374 @@ config.libs = [
Object(Matching, "egg/util/eggException.cpp"),
],
),
- # {
- # "lib": "MSL_C",
- # "mw_version": "GC/1.3.2",
- # "cflags": cflags_runtime,
- # "host": False,
- # "objects": [
- # ],
- # },
- # {
- # "lib": "TRK_MINNOW_DOLPHIN",
- # "mw_version": "GC/1.3.2",
- # "cflags": cflags_runtime,
- # "host": False,
- # "objects": [
- # ],
- # },
+ JSystemLib(
+ "JParticle",
+ [
+ Object(NonMatching, "JSystem/JParticle/JPAResourceManager.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAResource.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPABaseShape.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAExtraShape.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAChildShape.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAExTexShape.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPADynamicsBlock.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAFieldBlock.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAKeyBlock.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPATexture.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAResourceLoader.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAEmitterManager.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAEmitter.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAParticle.cpp"),
+ Object(NonMatching, "JSystem/JParticle/JPAMath.cpp"),
+ Object(NonMatching, "JSystem/JSupport/JSUList.cpp"),
+ ],
+ ),
+ JSystemLib(
+ "JGadget",
+ [
+ Object(NonMatching, "JSystem/JGadget/binary.cpp"),
+ Object(NonMatching, "JSystem/JGadget/linklist.cpp"),
+ Object(NonMatching, "JSystem/JGadget/std-vector.cpp"),
+ ],
+ ),
+ JSystemLib(
+ "JStudio",
+ [
+ Object(NonMatching, "JSystem/JStudio/JStudio/ctb.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/functionvalue.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/fvb.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/fvb-data-parse.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/jstudio-control.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/jstudio-math.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/jstudio-object.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/object-id.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/stb.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio/stb-data-parse.cpp"),
+ ],
+ ),
+ JSystemLib(
+ "JStudio_JStage",
+ [
+ Object(NonMatching, "JSystem/JStudio/JStudio_JStage/control.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio_JStage/object-actor.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio_JStage/object-camera.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio_JStage/object-light.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio_JStage/object-message.cpp"),
+ # this one is hard to identify
+ Object(NonMatching, "toBeSorted/JSystem/unk_jstage_maybe.cpp"),
+ ],
+ ),
+ JSystemLib(
+ "JStudio_JParticle",
+ [
+ Object(NonMatching, "JSystem/JStudio/JStudio_JParticle/control.cpp"),
+ Object(
+ NonMatching, "JSystem/JStudio/JStudio_JParticle/object-particle.cpp"
+ ),
+ ],
+ ),
+ JSystemLib(
+ "JStudio_JAudio2",
+ [
+ Object(NonMatching, "JSystem/JStudio/JStudio_JAudio2/control.cpp"),
+ Object(NonMatching, "JSystem/JStudio/JStudio_JAudio2/object-sound.cpp"),
+ ],
+ ),
+ {
+ "lib": "RVL_SDK",
+ "mw_version": "Wii/1.0",
+ "cflags": cflags_rvl,
+ "progress_category": "sdk",
+ "host": False,
+ "objects": [
+ Object(NonMatching, "RVL_SDK/thp/THPDec.c"),
+ Object(NonMatching, "RVL_SDK/thp/THPAudio.c"),
+ Object(NonMatching, "RVL_SDK/kpr/KPR.c"),
+ Object(NonMatching, "RVL_SDK/ai/AI.c"),
+ Object(NonMatching, "RVL_SDK/arc/ARC.c"),
+ Object(NonMatching, "RVL_SDK/ax/AX.c"),
+ Object(NonMatching, "RVL_SDK/os/OS.c"),
+ Object(NonMatching, "RVL_SDK/exi/EXI.c"),
+ Object(NonMatching, "RVL_SDK/si/SI.c"),
+ Object(NonMatching, "RVL_SDK/vi/VI.c"),
+ Object(NonMatching, "RVL_SDK/mtx/MTX.c"),
+ Object(NonMatching, "RVL_SDK/gx/GX.c"),
+ Object(NonMatching, "RVL_SDK/dvd/DVD.c"),
+ Object(NonMatching, "RVL_SDK/mem/MEM.c"),
+ Object(NonMatching, "RVL_SDK/dsp/DSP.c"),
+ Object(NonMatching, "RVL_SDK/es/ES.c"),
+ Object(NonMatching, "RVL_SDK/cx/CX.c"),
+ Object(NonMatching, "RVL_SDK/nand/NAND.c"),
+ Object(NonMatching, "RVL_SDK/sc/SC.c"),
+ Object(NonMatching, "RVL_SDK/wpad/WPAD.c"),
+ Object(NonMatching, "RVL_SDK/kpad/KPAD.c"),
+ Object(NonMatching, "RVL_SDK/usb/USB.c"),
+ Object(NonMatching, "RVL_SDK/bte/BTE.c"),
+ Object(NonMatching, "RVL_SDK/ipc/IPC.c"),
+ Object(NonMatching, "RVL_SDK/fs/FS.c"),
+ Object(NonMatching, "RVL_SDK/euart/EUART.c"),
+ Object(NonMatching, "RVL_SDK/wenc/WENC.c"),
+ Object(NonMatching, "RVL_SDK/tpl/TPL.c"),
+ Object(NonMatching, "NdevExi2A/DebuggerDriver.c"),
+ Object(NonMatching, "NdevExi2A/exi2.c"),
+ ],
+ },
+ {
+ "lib": "Runtime.PPCEABI.H",
+ # no idea
+ "mw_version": "Wii/1.5",
+ "cflags": cflags_runtime,
+ "progress_category": "runtime",
+ "host": False,
+ "objects": [
+ Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/__mem.c"),
+ Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/__va_arg.c"),
+ Object(
+ Matching, "PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c"
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/Runtime/Src/NMWException.cp",
+ extra_cflags=["-Cpp_exceptions on"],
+ ),
+ Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/ptmf.c"),
+ Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/runtime.c"),
+ Object(
+ Matching, "PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp"
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c",
+ extra_cflags=["-str reuse,nopool,readonly"],
+ ),
+ ],
+ },
+ {
+ "lib": "MSL_C",
+ # no idea
+ "mw_version": "Wii/1.5",
+ "cflags": cflags_runtime,
+ "progress_category": "runtime",
+ "host": False,
+ "objects": [
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c",
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c"
+ ),
+ Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c"),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c"
+ ),
+ Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wmem.c"),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wprintf.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wstring.c"
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c"
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/secure_error.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/math_sun.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log10.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log10.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c",
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c",
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c"
+ ),
+ Object(
+ NonMatching,
+ "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c",
+ ),
+ Object(
+ NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c"
+ ),
+ ],
+ },
+ {
+ "lib": "TRK_MINNOW_DOLPHIN",
+ # no idea
+ "mw_version": "Wii/1.5",
+ "cflags": cflags_trk,
+ "progress_category": "runtime",
+ "host": False,
+ "objects": [
+ # TODO, just here for progress tracking, split further
+ Object(NonMatching, "toBeSorted/TRK.c"),
+ ],
+ },
# Begin RELs
{
"lib": "REL",
- "mw_version": "Wii/1.6",
+ "mw_version": "Wii/1.5",
"cflags": cflags_rel,
- "progress_category": "core",
+ "progress_category": "runtime",
"host": False,
"objects": [
Object(Matching, "REL/executor.c"),
@@ -1942,7 +2557,10 @@ config.progress_categories = [
ProgressCategory("game", "SS Game Code"),
ProgressCategory("egg", "EGG Code"),
ProgressCategory("nw4r", "NW4R Code"),
- ProgressCategory("rvl", "Wii Specific Code"),
+ ProgressCategory("runtime", "Compiler Runtime and Library"),
+ ProgressCategory("sdk", "Revolution SDK"),
+ ProgressCategory("jsystem", "JSystem"),
+ ProgressCategory("hbm", "Home Button Menu"),
]
config.progress_each_module = args.verbose
diff --git a/include/common.h b/include/common.h
index 2a6bddb0..97a31a58 100644
--- a/include/common.h
+++ b/include/common.h
@@ -109,10 +109,6 @@ typedef int BOOL;
typedef unsigned char byte_t;
-#ifdef __CWCC__
-typedef unsigned long size_t;
-#endif
-
typedef u8 undefined1;
typedef u16 undefined2;
typedef u32 undefined4;
diff --git a/include/nw4r/ut/ut_TextWriterBase.h b/include/nw4r/ut/ut_TextWriterBase.h
index 277e3033..f5f9f35e 100644
--- a/include/nw4r/ut/ut_TextWriterBase.h
+++ b/include/nw4r/ut/ut_TextWriterBase.h
@@ -1,11 +1,11 @@
#ifndef NW4R_UT_TEXT_WRITER_BASE_H
#define NW4R_UT_TEXT_WRITER_BASE_H
-#include "nw4r/math.h"
+
#include "nw4r/types_nw4r.h"
#include "nw4r/ut/ut_CharWriter.h"
#include "nw4r/ut/ut_TagProcessorBase.h"
#include "stdio.h"
-#include "wchar.h"
+#include "wprintf.h"
namespace nw4r {
namespace ut {
diff --git a/include/rvl/OS/OS.h b/include/rvl/OS/OS.h
index 32d3a78c..5784393f 100644
--- a/include/rvl/OS/OS.h
+++ b/include/rvl/OS/OS.h
@@ -65,6 +65,9 @@ typedef struct OSIOSRev {
typedef void (*OSExceptionHandler)(u8 type, OSContext *ctx);
+#define OSRoundUp32B(x) (((u32)(x) + 32 - 1) & ~(32 - 1))
+#define OSRoundDown32B(x) (((u32)(x)) & ~(32 - 1))
+
extern BOOL __OSInIPL;
extern BOOL __OSInNandBoot;
extern BOOL __OSIsGcam;
diff --git a/include/rvl/OS/OSError.h b/include/rvl/OS/OSError.h
index d3150d68..918ca5e8 100644
--- a/include/rvl/OS/OSError.h
+++ b/include/rvl/OS/OSError.h
@@ -4,14 +4,13 @@
#include "__va_arg.h"
#include "common.h"
+#include "RVL/OS/OSContext.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-// Forward declarations
-typedef struct OSContext OSContext;
-
#define OSError(...) OSPanic(__FILE__, __LINE__, __VA_ARGS__)
#define OSAssert(exp, ...) \
if (!(exp)) \
diff --git a/include/rvl/OS/OSHardware.h b/include/rvl/OS/OSHardware.h
index 898eae50..66aa0cbf 100644
--- a/include/rvl/OS/OSHardware.h
+++ b/include/rvl/OS/OSHardware.h
@@ -4,15 +4,14 @@
// #include "rvl/OS/OSAddress.h"
#include "common.h"
#include "rvl/OS/OSThread.h"
+#include "rvl/OS/OSContext.h"
+#include "rvl/OS/OSExec.h"
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct OSContext OSContext;
-typedef struct OSExecParams OSExecParams;
-
/**
* For more details, see:
* https://www.gc-forever.com/yagcd/chap4.html#sec4
diff --git a/include/rvl/OS/OSUtf.h b/include/rvl/OS/OSUtf.h
index aa863340..f688a43a 100644
--- a/include/rvl/OS/OSUtf.h
+++ b/include/rvl/OS/OSUtf.h
@@ -1,6 +1,9 @@
#ifndef RVL_SDK_OS_UTF_H
#define RVL_SDK_OS_UTF_H
+
#include "common.h"
+#include "wchar.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/sized_string.h b/include/sized_string.h
index c0670728..391eefdc 100644
--- a/include/sized_string.h
+++ b/include/sized_string.h
@@ -4,6 +4,7 @@
#include "__va_arg.h"
#include "common.h"
#include "string.h"
+#include "wstring.h"
extern "C" bool strequals(const char *a, const char *b);
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h
index 6e399f53..9514154a 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h
@@ -2,6 +2,7 @@
#define _MSL_COMMON_ANSI_FILES_H
#include "stddef.h"
+#include "wchar.h"
#ifdef __cplusplus
extern "C" {
@@ -13,9 +14,6 @@ extern "C" {
typedef unsigned long __file_handle;
typedef unsigned long fpos_t;
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
#define set_error(file) \
do { \
@@ -126,4 +124,4 @@ void __close_all(void);
};
#endif
-#endif /* _MSL_COMMON_ANSI_FILES_H */ \ No newline at end of file
+#endif /* _MSL_COMMON_ANSI_FILES_H */
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h
index 55110c72..b89fe460 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h
@@ -99,4 +99,4 @@ public:
} // namespace std
#endif
-#endif \ No newline at end of file
+#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h
index d999b6ea..e4a5fdf2 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h
@@ -1,7 +1,8 @@
#ifndef _MSL_COMMON_MBSTRING_H
#define _MSL_COMMON_MBSTRING_H
-#include "wchar_io.h"
+#include "wchar.h"
+#include "stddef.h"
#ifdef __cplusplus
extern "C" {
@@ -13,4 +14,4 @@ size_t wcstombs(char* dst, const wchar_t* src, size_t n);
}
#endif
-#endif /* _MSL_COMMON_MBSTRING_H */ \ No newline at end of file
+#endif /* _MSL_COMMON_MBSTRING_H */
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h
index 961bc74d..4e083ae4 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h
@@ -1,15 +1,14 @@
#ifndef MSL_WCHAR_H
#define MSL_WCHAR_H
-#include "common.h"
-#include "limits.h"
-#include "mbstring.h"
-#include "wprintf.h"
-#include "wstring.h"
#ifdef __cplusplus
extern "C" {
#endif
+#ifndef __cplusplus
+typedef unsigned short wchar_t;
+#endif
+
#define WCHAR_MIN SHRT_MIN
#define WCHAR_MAX USHRT_MAX
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h
index 999db811..a2f546c3 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h
@@ -3,10 +3,6 @@
#include "ansi_files.h"
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-
int fwide(FILE* file, int mode);
-#endif /* _MSL_COMMON_WCHAR_IO_H */ \ No newline at end of file
+#endif /* _MSL_COMMON_WCHAR_IO_H */
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h
index cd808eb1..f8026464 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h
@@ -4,6 +4,8 @@
#include "__va_arg.h"
#include "common.h"
+#include "wchar.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h
index 316f3a59..e8a3699e 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h
@@ -1,6 +1,9 @@
#ifndef MSL_WSTRING_H
#define MSL_WSTRING_H
+
#include "common.h"
+#include "wchar.h"
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c
index 77ddf8ef..04423f91 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c
@@ -15,9 +15,6 @@
#define TARGET_FLOAT_MANT_BITS (TARGET_FLOAT_MANT_DIG - TARGET_FLOAT_IMPLICIT_J_BIT)
#define TARGET_FLOAT_EXP_BITS (TARGET_FLOAT_BITS - TARGET_FLOAT_MANT_BITS - 1)
-#define PTRDIFF __typeof__((char*)0 - (char*)0)
-typedef PTRDIFF ptrdiff_t;
-
enum justification_options { left_justification, right_justification, zero_fill };
enum sign_options { only_minus, sign_always, space_holder };
@@ -1007,7 +1004,7 @@ static int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* Wr
if (format.argument_options == long_double_argument) {
long_double_num = va_arg(arg, long double);
} else {
- long_double_num = va_arg(arg, f64);
+ long_double_num = va_arg(arg, double);
}
if (!(buff_ptr = float2str(long_double_num, buff + 512, format))) {
@@ -1022,7 +1019,7 @@ static int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* Wr
if (format.argument_options == long_double_argument) {
long_double_num = va_arg(arg, long double);
} else {
- long_double_num = va_arg(arg, f64);
+ long_double_num = va_arg(arg, double);
}
if (!(buff_ptr = double2hex(long_double_num, buff + 512, format))) {
@@ -1262,4 +1259,4 @@ int sprintf(char* s, const char* format, ...) {
va_list args;
va_start(args, format);
return vsnprintf(s, 0xFFFFFFFF, format, args);
-} \ No newline at end of file
+}
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c
index fb139480..ba3a59db 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c
@@ -110,7 +110,7 @@
* to produce the hexadecimal values shown.
*/
-#include "types.h"
+#include "common.h"
#include "errno.h"
#include "math.h"
@@ -404,4 +404,4 @@ double __ieee754_pow(x, y) double x, y;
#endif /* defined(_DOUBLE_IS_32BITS) */
-// EOF e_pow.c \ No newline at end of file
+// EOF e_pow.c
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c
index b727148c..c6a405ea 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c
@@ -1,5 +1,5 @@
#include "uart_console_io_gcn.h"
-#include "dolphin/os.h"
+#include "rvl/os.h"
int InitializeUART(size_t);
int WriteUARTN(unsigned char*, size_t);
@@ -38,4 +38,4 @@ int __write_console(__file_handle handle, unsigned char* buffer, size_t* count,
/* 8036919C-803691A4 363ADC 0008+00 0/0 1/0 0/0 .text __close_console */
int __close_console(__file_handle handle) {
return 0;
-} \ No newline at end of file
+}
diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h b/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h
new file mode 100644
index 00000000..7ec6b8f7
--- /dev/null
+++ b/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h
@@ -0,0 +1,33 @@
+#ifndef MWCPLUSLIB_H
+#define MWCPLUSLIB_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CTORARG_TYPE int
+#define CTORARG_PARTIAL (0)
+#define CTORARG_COMPLETE (1)
+
+#define CTORCALL_COMPLETE(ctor, objptr) (((void (*)(void*, CTORARG_TYPE))ctor)(objptr, CTORARG_COMPLETE))
+
+#define DTORARG_TYPE int
+
+#define DTORCALL_COMPLETE(dtor, objptr) (((void (*)(void*, DTORARG_TYPE))dtor)(objptr, -1))
+
+typedef void* ConstructorDestructor;
+
+extern void __construct_array(void* ptr, ConstructorDestructor ctor, ConstructorDestructor dtor, size_t size, size_t n);
+extern void __destroy_arr(void* block, ConstructorDestructor* dtor, size_t size, size_t n);
+extern void* __construct_new_array(void* block, ConstructorDestructor ctor, ConstructorDestructor dtor_arg, size_t size, size_t n);
+extern void __destroy_new_array(void* block, ConstructorDestructor dtor);
+extern void __destroy_new_array2();
+extern void __destroy_new_array3();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MWCPLUSLIB_H */
diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h b/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h
index a11aea38..7ce2ad4c 100644
--- a/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h
+++ b/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h
@@ -10,8 +10,4 @@ typedef struct __ptmf {
} f_data;
} __ptmf;
-const __ptmf __ptmf_null;
-long __ptmf_test(__ptmf *ptmf);
-void __ptmf_cmpr(register __ptmf *this, register __ptmf *other);
-void __ptmf_scall(...);
#endif /* PTMF_H */
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c b/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c
index 269cbef9..d4e5ac25 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c
+++ b/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c
@@ -3,7 +3,7 @@
* Description:
*/
-#include "dolphin/os.h"
+#include "RVL/OS.h"
inline static void InitDefaultHeap(void) {
void* arenaLo;
@@ -18,8 +18,8 @@ inline static void InitDefaultHeap(void) {
arenaLo = OSInitAlloc(arenaLo, arenaHi, 1);
OSSetArenaLo(arenaLo);
- arenaLo = OSRoundUpPtr(arenaLo, 0x20);
- arenaHi = OSRoundDownPtr(arenaHi, 0x20);
+ arenaLo = (void*)OSRoundUp32B(arenaLo);
+ arenaHi = (void*)OSRoundDown32B(arenaHi);
OSSetCurrentHeap(OSCreateHeap(arenaLo, arenaHi));
OSSetArenaLo(arenaLo = arenaHi);
@@ -32,4 +32,4 @@ void __sys_free(void* p) {
}
OSFreeToHeap(__OSCurrHeap, p);
-} \ No newline at end of file
+}
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp b/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp
index f665dbbf..3285b3eb 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp
+++ b/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp
@@ -1,121 +1,218 @@
-//
-// Generated By: dol2asm
-// Translation Unit: NMWException
-//
-
#include "NMWException.h"
-#include "stddef.h"
-#include "dol2asm.h"
+#include "MWCPlusLib.h"
-//
-// Types:
-//
+typedef void (*unexpected_handler)();
+unexpected_handler set_unexpected(unexpected_handler handler);
+void unexpected();
-struct __partial_array_destructor {
- /* 80361E5C */ ~__partial_array_destructor();
-};
+typedef void (*terminate_handler)();
+terminate_handler set_terminate(terminate_handler handler);
+void terminate();
-//
-// Forward References:
-//
-
-#pragma section "extabindex_"
-extern void* const data_8000569C[8];
-extern "C" void __destroy_new_array();
-extern "C" void __destroy_arr();
-extern "C" void __construct_array();
-extern "C" void __dt__26__partial_array_destructorFv();
-extern "C" void __construct_new_array();
-
-//
-// External References:
-//
-
-#pragma section "extab_"
-extern "C" extern void* const _section_symbol_extab[18];
-extern "C" void __dl__FPv();
-extern "C" void __dla__FPv();
-
-//
-// Declarations:
-//
-
-/* 80361C6C-80361CE8 35C5AC 007C+00 2/0 11/11 3/3 .text __destroy_new_array */
-void __destroy_new_array() {
- // NONMATCHING
-}
+#define ARRAY_HEADER_SIZE 16
-/* 80361CE8-80361D60 35C628 0078+00 1/0 58/58 350/350 .text __destroy_arr */
-void __destroy_arr() {
- // NONMATCHING
+extern "C" {
+extern void abort();
}
-/* 80361D60-80361E5C 35C6A0 00FC+00 1/0 98/98 461/461 .text __construct_array */
-void __construct_array() {
- // NONMATCHING
+namespace std {
+static void dthandler() { abort(); }
+
+static terminate_handler thandler = dthandler;
+
+static void duhandler() { terminate(); }
+
+static unexpected_handler uhandler = duhandler;
+
+extern terminate_handler set_terminate(terminate_handler handler) {
+ terminate_handler old = thandler;
+ thandler = handler;
+ return old;
}
-/* 80361E5C-80361F14 35C79C 00B8+00 1/0 1/0 0/0 .text __dt__26__partial_array_destructorFv */
-__partial_array_destructor::~__partial_array_destructor() {
- // NONMATCHING
+extern void terminate() { thandler(); }
+
+extern unexpected_handler set_unexpected(unexpected_handler handler) {
+ unexpected_handler old = uhandler;
+ uhandler = handler;
+ return old;
}
-/* 80361F14-80362018 35C854 0104+00 1/0 28/28 13/13 .text __construct_new_array */
-void __construct_new_array() {
- // NONMATCHING
+extern void unexpected() { uhandler(); }
+} // namespace std
+
+extern char __throw_catch_compare(const char* throwtype, const char* catchtype, long* offset_result) {
+ const char *cptr1, *cptr2;
+
+ *offset_result = 0;
+
+ if ((cptr2 = catchtype) == 0) {
+ return true;
+ }
+
+ cptr1 = throwtype;
+
+ if (*cptr2 == 'P') {
+ cptr2++;
+ if (*cptr2 == 'C')
+ cptr2++;
+ if (*cptr2 == 'V')
+ cptr2++;
+ if (*cptr2 == 'v') {
+ if (*cptr1 == 'P' || *cptr1 == '*') {
+ return true;
+ }
+ }
+ cptr2 = catchtype;
+ }
+
+ switch (*cptr1) {
+ case '*':
+ case '!':
+ if (*cptr1++ != *cptr2++)
+ return false;
+ for (;;) {
+ if (*cptr1 == *cptr2++) {
+ if (*cptr1++ == '!') {
+ long offset;
+
+ for (offset = 0; *cptr1 != '!';) {
+ offset = offset * 10 + *cptr1++ - '0';
+ }
+ *offset_result = offset;
+ return true;
+ }
+ } else {
+ while (*cptr1++ != '!') { }
+ while (*cptr1++ != '!') { }
+ if (*cptr1 == 0)
+ return false;
+
+ cptr2 = catchtype + 1;
+ }
+ }
+ return false;
+ }
+
+ while ((*cptr1 == 'P' || *cptr1 == 'R') && *cptr1 == *cptr2) {
+ cptr1++;
+ cptr2++;
+
+ if (*cptr2 == 'C') {
+ if (*cptr1 == 'C')
+ cptr1++;
+ cptr2++;
+ }
+ if (*cptr1 == 'C')
+ return false;
+
+ if (*cptr2 == 'V') {
+ if (*cptr1 == 'V')
+ cptr1++;
+ cptr2++;
+ }
+ if (*cptr1 == 'V')
+ return false;
+ }
+
+ for (; *cptr1 == *cptr2; cptr1++, cptr2++) {
+ if (*cptr1 == 0)
+ return true;
+ }
+
+ return false;
}
-/* ############################################################################################## */
-/* 80005660-8000566C -00001 000C+00 1/0 0/0 0/0 .extabindex @206 */
-SECTION_EXTABINDEX static void* const lit_206[3] = {
- (void*)__destroy_new_array,
- (void*)0x0000007C,
- (void*)&_section_symbol_extab,
+class __partial_array_destructor {
+private:
+ void* p;
+ size_t size;
+ size_t n;
+ ConstructorDestructor dtor;
+
+public:
+ size_t i;
+
+ __partial_array_destructor(void* array, size_t elementsize, size_t nelements, ConstructorDestructor destructor) {
+ p = array;
+ size = elementsize;
+ n = nelements;
+ dtor = destructor;
+ i = n;
+ }
+
+ ~__partial_array_destructor() {
+ char* ptr;
+
+ if (i < n && dtor) {
+ for (ptr = (char*)p + size * i; i > 0; i--) {
+ ptr -= size;
+ DTORCALL_COMPLETE(dtor, ptr);
+ }
+ }
+ }
};
-/* 8000566C-80005678 -00001 000C+00 0/0 0/0 0/0 .extabindex @211 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_211[3] = {
- (void*)__destroy_arr,
- (void*)0x00000078,
- (void*)(((char*)&_section_symbol_extab) + 0x8),
-};
-#pragma pop
-
-/* 80005678-80005684 -00001 000C+00 0/0 0/0 0/0 .extabindex @232 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_232[3] = {
- (void*)__construct_array,
- (void*)0x000000FC,
- (void*)(((char*)&_section_symbol_extab) + 0x10),
-};
-#pragma pop
-
-/* 80005684-80005690 -00001 000C+00 0/0 0/0 0/0 .extabindex @240 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_240[3] = {
- (void*)__dt__26__partial_array_destructorFv,
- (void*)0x000000B8,
- (void*)(((char*)&_section_symbol_extab) + 0x28),
-};
-#pragma pop
-
-/* 80005690-8000569C -00001 000C+00 0/0 0/0 0/0 .extabindex @263 */
-#pragma push
-#pragma force_active on
-SECTION_EXTABINDEX static void* const lit_263[3] = {
- (void*)__construct_new_array,
- (void*)0x00000104,
- (void*)(((char*)&_section_symbol_extab) + 0x30),
-};
-#pragma pop
-
-/* 8000569C-800056BC -00001 0020+00 1/0 1/1 0/0 .extabindex None */
-SECTION_EXTABINDEX extern void* const data_8000569C[8] = {
- (void*)&lit_206, (void*)&data_8000569C, (void*)__destroy_new_array,
- (void*)0x000003AC, (void*)NULL, (void*)NULL,
- (void*)NULL, (void*)NULL,
-}; \ No newline at end of file
+extern void* __construct_new_array(void* block, ConstructorDestructor ctor, ConstructorDestructor dtor, size_t size, size_t n) {
+ char* ptr;
+
+ if ((ptr = (char*)block) != 0L) {
+ size_t* p = (size_t*)ptr;
+
+ p[0] = size;
+ p[1] = n;
+ ptr += ARRAY_HEADER_SIZE;
+
+ if (ctor) {
+ __partial_array_destructor pad(ptr, size, n, dtor);
+ char* p;
+
+ for (pad.i = 0, p = (char*)ptr; pad.i < n; pad.i++, p += size) {
+ CTORCALL_COMPLETE(ctor, p);
+ }
+ }
+ }
+ return ptr;
+}
+
+extern void __construct_array(void* ptr, ConstructorDestructor ctor, ConstructorDestructor dtor, size_t size, size_t n) {
+ __partial_array_destructor pad(ptr, size, n, dtor);
+ char* p;
+
+ for (pad.i = 0, p = (char*)ptr; pad.i < n; pad.i++, p += size) {
+ CTORCALL_COMPLETE(ctor, p);
+ }
+}
+
+extern void __destroy_arr(void* block, ConstructorDestructor* dtor, size_t size, size_t n) {
+ char* p;
+
+ for (p = (char*)block + size * n; n > 0; n--) {
+ p -= size;
+ DTORCALL_COMPLETE(dtor, p);
+ }
+}
+
+extern void __destroy_new_array(void* block, ConstructorDestructor dtor) {
+ if (block) {
+ if (dtor) {
+ size_t i, objects, objectsize;
+ char* p;
+
+ objectsize = *(size_t*)((char*)block - ARRAY_HEADER_SIZE);
+ objects = ((size_t*)((char*)block - ARRAY_HEADER_SIZE))[1];
+ p = (char*)block + (objectsize * objects);
+
+ for (i = 0; i < objects; i++) {
+ p -= objectsize;
+ DTORCALL_COMPLETE(dtor, p);
+ }
+ }
+
+ ::operator delete[]((char*)block - ARRAY_HEADER_SIZE);
+ }
+}
+
+void __destroy_new_array2(void) {}
+
+void __destroy_new_array3(void) {}
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c b/src/PowerPC_EABI_Support/Runtime/Src/__mem.c
index 082bdc1f..4d958060 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c
+++ b/src/PowerPC_EABI_Support/Runtime/Src/__mem.c
@@ -1,54 +1,30 @@
-#include "dol2asm.h"
-#include "dolphin.h"
+#include "stddef.h"
-/* 800035C0-800035E4 0004C0 0024+00 0/0 12/12 0/0 .init TRK_memcpy */
-SECTION_INIT void *TRK_memcpy(void *dst, const void *src, size_t n) {
- const unsigned char *s = (const unsigned char *)src - 1;
- unsigned char *d = (unsigned char *)dst - 1;
-
- n++;
- while (--n != 0) {
- *++d = *++s;
- }
- return dst;
-}
-
-/* 80003590-800035C0 000490 0030+00 0/0 1/1 0/0 .init TRK_memset */
-SECTION_INIT void *TRK_memset(void *dst, int val, size_t n) {
- TRK_fill_mem(dst, val, n);
-
- return dst;
-}
-
-/* 80003540-80003590 000440 0050+00 1/1 63/63 6/6 .init memcpy */
-SECTION_INIT void *memcpy(void *dst, const void *src, size_t n) {
- const unsigned char *s;
- unsigned char *d;
+void* memcpy(void* dst, const void* src, size_t n) {
+ const unsigned char* s;
+ unsigned char* d;
if ((unsigned long)src >= (unsigned long)dst) {
- s = (const unsigned char *)src - 1;
- d = (unsigned char *)dst - 1;
+ s = (const unsigned char*)src - 1;
+ d = (unsigned char*)dst - 1;
n++;
- while (--n != 0) {
+ while (--n != 0)
*++d = *++s;
- }
} else {
- s = (const unsigned char *)src + n;
- d = (unsigned char *)dst + n;
+ s = (const unsigned char*)src + n;
+ d = (unsigned char*)dst + n;
n++;
- while (--n != 0) {
+ while (--n != 0)
*--d = *--s;
- }
}
return dst;
}
-/* 80003488-80003540 000388 00B8+00 1/1 0/0 0/0 .init __fill_mem */
-SECTION_INIT void __fill_mem(void *dst, int val, size_t n) {
+void __fill_mem(void* dst, int val, size_t n) {
unsigned long v = (unsigned char)val;
unsigned long i;
- ((unsigned char *)dst) = ((unsigned char *)dst) - 1;
+ ((unsigned char*)dst) = ((unsigned char*)dst) - 1;
if (n >= 32) {
i = (~(unsigned long)dst) & 3;
@@ -57,28 +33,27 @@ SECTION_INIT void __fill_mem(void *dst, int val, size_t n) {
n -= i;
do {
- *++(((unsigned char *)dst)) = v;
+ *++(((unsigned char*)dst)) = v;
} while (--i);
}
- if (v) {
+ if (v)
v |= v << 24 | v << 16 | v << 8;
- }
- ((unsigned long *)dst) = ((unsigned long *)(((unsigned char *)dst) + 1)) - 1;
+ ((unsigned long*)dst) = ((unsigned long*)(((unsigned char*)dst) + 1)) - 1;
i = n >> 5;
if (i) {
do {
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
- *++((unsigned long *)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
+ *++((unsigned long*)dst) = v;
} while (--i);
}
@@ -86,26 +61,24 @@ SECTION_INIT void __fill_mem(void *dst, int val, size_t n) {
if (i) {
do {
- *++((unsigned long *)dst) = v;
+ *++((unsigned long*)dst) = v;
} while (--i);
}
- ((unsigned char *)dst) = ((unsigned char *)(((unsigned long *)dst) + 1)) - 1;
+ ((unsigned char*)dst) = ((unsigned char*)(((unsigned long*)dst) + 1)) - 1;
n &= 3;
}
- if (n) {
+ if (n)
do {
- *++((unsigned char *)dst) = v;
+ *++((unsigned char*)dst) = v;
} while (--n);
- }
return;
}
-/* 80003458-80003488 000358 0030+00 1/1 55/55 137/137 .init memset */
-SECTION_INIT void *memset(void *dst, int val, size_t n) {
+void* memset(void* dst, int val, size_t n) {
__fill_mem(dst, val, n);
return dst;
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c b/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c
index e5f6449b..fbc9eaaa 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c
+++ b/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c
@@ -38,7 +38,7 @@ void* __va_arg(_va_list_struct* list, int type) {
} else {
*reg = 8;
addr = list->input_arg_area;
- addr = (char*)(((u32)(addr) + ((size)-1)) & ~((size)-1));
+ addr = (char*)(((unsigned int)(addr) + ((size)-1)) & ~((size)-1));
list->input_arg_area = addr + size;
}
@@ -47,4 +47,4 @@ void* __va_arg(_va_list_struct* list, int type) {
}
return addr;
-} \ No newline at end of file
+}
diff --git a/src/PowerPC_EABI_Support/Runtime/Src/runtime.c b/src/PowerPC_EABI_Support/Runtime/Src/runtime.c
index 6b0aad3f..a3ba7f1e 100644
--- a/src/PowerPC_EABI_Support/Runtime/Src/runtime.c
+++ b/src/PowerPC_EABI_Support/Runtime/Src/runtime.c
@@ -1,4 +1,4 @@
-#include "dolphin.h"
+#include "common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/nw4r/lyt/lyt_textBox.cpp b/src/nw4r/lyt/lyt_textBox.cpp
index 9be924d7..4eeb8ff9 100644
--- a/src/nw4r/lyt/lyt_textBox.cpp
+++ b/src/nw4r/lyt/lyt_textBox.cpp
@@ -4,6 +4,7 @@
#include "nw4r/lyt/lyt_layout.h"
#include "nw4r/lyt/lyt_material.h"
#include "nw4r/ut.h" // IWYU pragma: export
+#include "wstring.h"
namespace nw4r {
namespace lyt {