mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
47 lines
1.2 KiB
TOML
47 lines
1.2 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 empty implementations)
|
|
stubs = ["printf", "malloc", "free", "memcpy", "memset", "strncpy", "sprintf"]
|
|
|
|
# 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
|
|
}
|
|
'''
|