From d6c5d32cd37d9d4aa3e0417ddc215bdbfcdaa1c0 Mon Sep 17 00:00:00 2001 From: Dillon Pentz Date: Mon, 27 Mar 2023 18:11:10 +1300 Subject: [PATCH] [jak2] add pal decomp support (#2434) Unsure what hacks or type casts might eventually be needed for the PAL version, but these changes are enough to get things to extract and run the game (though the extract phase requires iso_data to be in a jak2_pal folder, but the build still looks for jak2 in iso_data and decompiler_out). --- decompiler/config/jak2/jak2_config.jsonc | 15 ++++++++++++++- decompiler/config/jak2/pal/hacks.jsonc | 1 + decompiler/config/jak2/pal/label_types.jsonc | 1 + decompiler/config/jak2/pal/type_casts.jsonc | 1 + scripts/tasks/update-env.py | 3 ++- 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 decompiler/config/jak2/pal/hacks.jsonc create mode 100644 decompiler/config/jak2/pal/label_types.jsonc create mode 100644 decompiler/config/jak2/pal/type_casts.jsonc diff --git a/decompiler/config/jak2/jak2_config.jsonc b/decompiler/config/jak2/jak2_config.jsonc index 7e350e23da..59e17d5e06 100644 --- a/decompiler/config/jak2/jak2_config.jsonc +++ b/decompiler/config/jak2/jak2_config.jsonc @@ -127,5 +127,18 @@ // set to true to apply patch files "apply_patches": true, // what to patch an object to and what the patch file is - "object_patches": {} + "object_patches": {}, + "version_overrides": { + "ntsc_v1": {}, + "pal": { + "game_name": "jak2_pal", + "expected_elf_name": "SCES_516.08", + "is_pal": true, + "type_casts_merge_file": "decompiler/config/jak2/pal/type_casts.jsonc", + "label_types_merge_file": "decompiler/config/jak2/pal/label_types.jsonc", + "hacks_merge_file": "decompiler/config/jak2/pal/hacks.jsonc", + "obj_file_name_map_file": "goal_src/jak2/build/all_objs.json", + "object_patches": {} + } + } } diff --git a/decompiler/config/jak2/pal/hacks.jsonc b/decompiler/config/jak2/pal/hacks.jsonc new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/decompiler/config/jak2/pal/hacks.jsonc @@ -0,0 +1 @@ +{} diff --git a/decompiler/config/jak2/pal/label_types.jsonc b/decompiler/config/jak2/pal/label_types.jsonc new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/decompiler/config/jak2/pal/label_types.jsonc @@ -0,0 +1 @@ +{} diff --git a/decompiler/config/jak2/pal/type_casts.jsonc b/decompiler/config/jak2/pal/type_casts.jsonc new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/decompiler/config/jak2/pal/type_casts.jsonc @@ -0,0 +1 @@ +{} diff --git a/scripts/tasks/update-env.py b/scripts/tasks/update-env.py index 071d927ec9..6255b66a31 100644 --- a/scripts/tasks/update-env.py +++ b/scripts/tasks/update-env.py @@ -49,7 +49,8 @@ decomp_config_version_map = { "ntscjp": "jp" }, "jak2": { - "ntscv1": "ntsc_v1" + "ntscv1": "ntsc_v1", + "pal": "pal" } }