Skip to content

Commit

Permalink
[decompiler] jak 1 PAL demo support + couple fixes (#934)
Browse files Browse the repository at this point in the history
* add configs

* final fixes

* Update main.gc

* fix "NO-XGO" gen bug

* oops grr
  • Loading branch information
ManDude authored Oct 23, 2021
1 parent 8a0ff96 commit 20e5f67
Show file tree
Hide file tree
Showing 13 changed files with 14,890 additions and 5 deletions.
3 changes: 2 additions & 1 deletion decompiler/ObjectFile/ObjectFileDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ std::string ObjectFileDB::generate_obj_listing() {
std::string dgos = "[";
for (auto& y : x.dgo_names) {
assert(y.length() >= 5);
dgos += "\"" + y.substr(0, y.length() - 4) + "\", ";
std::string new_str = y == "NO-XGO" ? y : y.substr(0, y.length() - 4);
dgos += "\"" + new_str + "\", ";
}
dgos.pop_back();
dgos.pop_back();
Expand Down
6 changes: 6 additions & 0 deletions decompiler/config/jak1_ntsc_black_label/var_names.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3643,5 +3643,11 @@
}
},

"(method 15 level)": {
"vars": {
"v1-5": ["s5-1", "(inline-array box8s)"]
}
},

"aaaaaaaaaaaaaaaaaaaaaaa": {}
}
81 changes: 81 additions & 0 deletions decompiler/config/jak1_sced.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"game_version": 1,

// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": [],

////////////////////////////
// CODE ANALYSIS OPTIONS
////////////////////////////

// set to true to generate plain .asm files with MIPS disassembly, with no fancy decompilation.
// this is fast and should succeed 100% of the time.
"disassemble_code": false,

// Run the decompiler
"decompile_code": true,

////////////////////////////
// DATA ANALYSIS OPTIONS
////////////////////////////

// set to true to generate plain .asm files for data files.
// this will display most data as hex, but will add labels/references/type pointers/strings
// this generates a huge amount of output if you run it on the entire game.
"disassemble_data": false,

// unpack textures to assets folder
"process_tpages": false,
// unpack game text to assets folder
"process_game_text": false,
// unpack game count to assets folder
"process_game_count": false,

///////////////////////////
// WEIRD OPTIONS
///////////////////////////

// these options are used rarely and should usually be left at false

// output a file type_defs.gc which is used for the types part of all-types.gc
"regenerate_all_types": false,

// generate the symbol_map.json file.
// this is a guess at where each symbol is first defined/used.
"generate_symbol_definition_map": false,

// debug option for instruction decoder
"write_hex_near_instructions": false,

// experimental tool to extract linked lists used for region scripting in Jak 2 and Jak 3.
"write_scripts": false,

// hex dump of code/data files.
"hexdump_code": false,
"hexdump_data": false,
// dump raw obj files
"dump_objs": false,
// print control flow graph
"print_cfgs": false,

// set to true for PAL versions. this will forcefully skip files that have some data missing at the end.
"is_pal": false,

////////////////////////////
// CONFIG FILES
////////////////////////////

"type_casts_file": "decompiler/config/jak1_sced/type_casts.jsonc",
"anonymous_function_types_file": "decompiler/config/jak1_sced/anonymous_function_types.jsonc",
"var_names_file": "decompiler/config/jak1_sced/var_names.jsonc",
"label_types_file": "decompiler/config/jak1_sced/label_types.jsonc",
"stack_structures_file": "decompiler/config/jak1_sced/stack_structures.jsonc",
"hacks_file": "decompiler/config/jak1_sced/hacks.jsonc",
"inputs_file": "decompiler/config/jak1_sced/inputs.jsonc",

// optional: a predetermined object file name map from a file.
// this will make decompilation naming consistent even if you only run on some objects.
"obj_file_name_map_file": "decompiler/config/jak1_sced/all_objs.json"
}
1,516 changes: 1,516 additions & 0 deletions decompiler/config/jak1_sced/all_objs.json

Large diffs are not rendered by default.

Loading

0 comments on commit 20e5f67

Please sign in to comment.