File Patcher

Cheat Sheet

Patch File Structure (.pf)

[META]
Author   = YourName
Credits  = YourName & site if you got it from a webpage
Info     = Description shown to user.
Region   = NTSC | NTSC-J | PAL | MULTI
Title    = Game Title
TitleID  = 4D530064
Type     = Widescreen Patch

Options

[OPTIONS]
ApplyGenericPatch = True
CanPatchISO = True
PatchAttacher = True
CheckFile = file|offset|bytes|error label

Sections

[CP] Copy Files Skipped on ISO

; Backup original before patching
default.xbe|default_orig.xbe

; Absolute path to absolute path
E:\TDATA\4d530064\$u\default.xbe|E:\TDATA\4d530064\$u\default_orig.xbe

; Absolute src, bare dest resolves next to src
E:\TDATA\4d530064\$u\default_orig.xbe|default.xbe

[HR] Hex Replace ISO supported

; filename | count | old_hex | new_hex
default.xbe|1|ABAAAA3F|388EE33F

; Multiple replacements in one line
default.xbe|1|0F8560010000|909090909090|1|164200ABAAAA3F|164200388EE33F

[OF] Offset Patch ISO supported

; filename | offset | new_bytes
default.xbe|1A3F|388EE33F

[MV] Move Files Skipped on ISO

old_name.xbe|new_name.xbe

[RN] Rename Files Skipped on ISO

old_name.xbe|new_name.xbe

[RM] Remove Files / Folders Skipped on ISO

dashupdate.xbe
old_folder\

[SM] Supported Media Skipped on ISO

default.xbe|C00001FF

[SR] Supported Region Skipped on ISO

default.xbe|80000007

[EX] Exclusions

; Exclude from all operations
default_orig.xbe

; Exclude from CP only, still processed by HR/OF/SM etc.
default.xbe|skipcopy

; Exclude from all operations (explicit)
some_file.xbe|normal

Wildcards

[CP]
*.xbe|*_orig.xbe

[HR]
*.xbe|1|ABAAAA3F|388EE33F

ISO Game Support

_iso_bytes_backup_dnd.pf

Custom Order

[CO] Custom Order ISO supported

Run operations in any order, including multiple of the same type. Each line starts with the operation prefix followed by the same format as the corresponding section.

rn|default.xbe|defaultws.xbe
cp|defaultws.xbe|defaultws_orig.xbe
hr|defaultws.xbe|1|ABAAAA3F|388EE33F|1|90909090|CCCCCCCC
rn|defaultws.xbe|default-renamed.xbe
rm|dashupdate.xbe
of|default.xbe|502981|54AD0800

Normal Execution Order

1[EX] exclude
2[CP] copy / restore
3Internal generic patch
4[MV] move
5[HR] hex replace
6[OF] offset patch
7[SM] media
8[SR] region
9[RM] remove
10[RN] rename
11[CO] custom order

Example Patches:

Long Audio Filenames Fix (True Crime - New York City)

[META]
Author = Rocky5
Credits = Rocky5
Info = Long audio filenames fix
Region = MULTI
Title = True Crime - New York City
TitleID = 41560045
Type = HDD Protection Patch

[OPTIONS]
ApplyGenericPatch = True
CanPatchISO = False

[HR]
data\ScriptDev\VO_CI_Cabby*.tag|1|57697665735F4275735F4D656469756D44616D6167655F3031|57697665735F4275735F4D656469756D443000000000000000|1|57697665735F4275735F4D656469756D44616D6167655F3032|57697665735F4275735F4D656469756D443100000000000000|1|57697665735F4275735F4D656469756D44616D6167655F3033|57697665735F4275735F4D656469756D443200000000000000|1|57697665735F4275735F4D656469756D44616D6167655F3034|57697665735F4275735F4D656469756D443400000000000000|1|57697665735F4275735F4D656469756D44616D6167655F3035|57697665735F4275735F4D656469756D443400000000000000|1|57697665735F4275735F4D656469756D44616D6167655F3036|57697665735F4275735F4D656469756D443500000000000000

[RN]
data\NPCVO\CI_Cabby\MissionVOs\CI_Cabby_Discomfort_Wives_Bus_MediumDa.wma|data\NPCVO\CI_Cabby\MissionVOs\CI_Cabby_Discomfort_Wives_Bus_MediumD0.wma

Force NTSC Video Mode (Super Monkey Ball: Deluxe)

[META]
Author = Rocky5
Credits = Rocky5
Info = Force NTSC video mode for all regions supported
Region = MULTI
Title = Super Monkey Ball: Deluxe
TitleID = 53450038
Type = Game Fix

[OPTIONS]
ApplyGenericPatch = True
CanPatchISO = True

[CP]
default.xbe|default_orig.xbe

[HR]
; Disable Security Failure (just return)
default.xbe|1|81EC040C0000|C3EC040C0000

; Force video path to JPN video
; NTSC
default.xbe|1|112E004874264874|112E0048EB264874

; JPN
default.xbe|1|48742148742383E8|48742148EB2383E8

; PAL
default.xbe|1|472E004874214874|472E0048EB214874

Widescreen Patch (Top Spin)

[META]
Author = Esppiral
Credits = Esppiral - https://discord.gg/8wKbXuqp
Info = Patches in widescreen aspect ratio.[CR][CR]If patching an ISO just run as normal.
Region = MULTI
Title = Top Spin
TitleID = 4D530035
Type = Widescreen Patch

[OPTIONS]
ApplyGenericPatch = True
CanPatchISO = True

[CP]
*.xbe|*_orig.xbe

[HR]
*.xbe|1|ABAAAA3F|398EE33F

[EX]
; keep out of [CP] backup
downloader.xbe|skipcopy