mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
043bf3bf8d
* feat: split runtime code in small files to be easy to develop * feat: split stubs in inl files * feat: function auto link function treat functions with underscore as same as without underscore * feat: remove underscore prefix from stubs * feat: thread and flags refactor * feat: propagate request stop feat: some elf validation on runtime * feat: remove Z7 compiler options feat: added a literal float case error on vu * fix: fix critical recompiler error on marking pc calls * feat: better system interrupt refactor: small refactor on thread system * feat: stubs implements for resident evil code veronica * feat: merge fileio * feat: stub by address * feat: codegen now auto-routes J/JAL callssites with known relocation symbols to syscalls/stubs
58 lines
1.4 KiB
TOML
58 lines
1.4 KiB
TOML
[general]
|
|
# Path to input ELF file
|
|
input = "path/to/your/ps2_game.elf"
|
|
|
|
# Path to output directory
|
|
output = "output/"
|
|
|
|
# Single file output mode (false for one file per function)
|
|
single_file_output = false
|
|
|
|
# Path to runtime header (optional)
|
|
runtime_header = "include/ps2_runtime.h"
|
|
|
|
# Functions to stub (these will generate wrappers to runtime syscall/stub handlers when names match)
|
|
# You can also bind stripped functions by address with "handler@0xADDRESS".
|
|
stubs = [
|
|
"printf",
|
|
"malloc",
|
|
"free",
|
|
"memcpy",
|
|
"memset",
|
|
"strncpy",
|
|
"sprintf",
|
|
# "sceCdRead@0x00123456",
|
|
# "SifLoadModule@0x00127890",
|
|
]
|
|
|
|
# Functions to skip (these will not be recompiled)
|
|
skip = ["abort", "exit", "_exit"]
|
|
|
|
# Patches to apply during recompilation
|
|
[patches]
|
|
# Individual instruction patches
|
|
instructions = [
|
|
{ address = "0x100004", value = "0x00000000" }, # NOP an instruction
|
|
{ address = "0x100104", value = "0x24040000" }, # Change an immediate value
|
|
]
|
|
|
|
# Function hook patches (not yet implemented)
|
|
[[patches.hook]]
|
|
function = "printf"
|
|
code = '''
|
|
// Custom printf implementation
|
|
void printf(uint8_t* rdram, R5900Context* ctx) {
|
|
// Implementation here
|
|
}
|
|
'''
|
|
|
|
# Function replacement patches (not yet implemented)
|
|
[[patches.func]]
|
|
address = "0x100000"
|
|
code = '''
|
|
// Custom implementation for function at 0x100000
|
|
void func_00100000(uint8_t* rdram, R5900Context* ctx) {
|
|
// Implementation here
|
|
}
|
|
'''
|