[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 } '''