Skip to content

About

The official patch repository for ShadPS4 is customized for SharpEmu.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

301 Commits

Folders and files

Repository files navigation

PS4 Game Patches

Community game patches for PlayStation 4 games, for use with SharpEmu.

Patch files are stored in orbis_patches. Each XML lists the supported title IDs, game versions, target executables and patch authors.

Available Patches

Game Game Versions Patch File
BlazeRush 01.00 BlazeRush.xml
Bloodborne 01.09 Bloodborne.xml
Bloodborne Network Test 01.00 BloodborneNetworkTest.xml
Blue Rider 01.00 BlueRider.xml
Burnout Paradise Remastered 01.03 BurnoutParadiseRemastered.xml
Catherine: Full Body 01.00, 01.01 Catherine_FullBody.xml
Crash Bandicoot 4: It's About Time 01.00, 01.05 CrashBandicoot4.xml
Crash Team Racing Nitro-Fueled 01.21 CrashTeamRacingNitroFueled.xml
Dark Souls III 01.15 DarkSoulsIII-Orbis.xml
Dead Nation: Apocalypse Edition 01.03 DeadNation.xml
Detroit: Become Human 01.08 DetroitBecomeHuman.xml
Driveclub 01.28 Driveclub.xml
Geometry Wars³: Dimensions 01.03 GeometryWarsDimensions.xml
God of War III Remastered 01.02 God_of_War_III_Remastered.xml
Grand Theft Auto V 01.00, 01.57 GrandTheftAutoV.xml
Gran Turismo 7 01.70 GranTurismo7.xml
Gran Turismo SPORT 01.69 GranTurismoSport.xml
Gravity Rush 2 01.11 GravityRush2.xml
Hatsune Miku: Project DIVA Future Tone mask HatsuneMiku_ProjectDIVAFutureTone.xml
Horizon Zero Dawn 01.00, 01.54 HorizonZeroDawn.xml
inFAMOUS First Light 01.04 InfamousFirstLight.xml
inFAMOUS Second Son 01.07 InfamousSecondSon.xml
Journey 01.01 Journey.xml
Knack 01.00 Knack.xml
LEGO Dimensions 01.00, 01.23, 01.24 LEGODimensions.xml
Little Big Planet 3 01.28 LittleBigPlanet3.xml
Metaphor: ReFantazio 01.13 MetaphorRefantazio.xml
Minecraft Dungeons 01.00, 01.29 MinecraftDungeons.xml
My First Gran Turismo 01.00, 01.01 MyFirstGranTurismo.xml
Natsuki Chronicles 01.00 NatsukiChronicles.xml
NHL 19 01.60 NHL19.xml
Persona 3: Dancing in Moonlight 01.00 Persona3_DancingInMoonlight.xml
Persona 4: Dancing All Night 01.00 Persona4_DancingAllNight.xml
Persona 5: Dancing in Starlight 01.00 Persona5_DancingInStarlight.xml
Persona 5 Royal 01.02 Persona5_Royal.xml
P.T; PT 01.00 PT.xml
Ratchet and Clank 01.09 Ratchet_and_Clank.xml
Sakura Wars 01.01 SakuraWars.xml
Sonic Racing: CrossWorlds 01.00, 01.41 SonicRacingCrossworlds.xml
Shadow of the Colossus 01.01 SotC.xml
The Last Guardian 01.03 TheLastGuardian.xml
The Last of Us Remastered 01.00, 01.11 TheLastOfUsRemastered.xml
The Order 1886 01.02 TheOrder1886.xml
The Quarry 01.00, 01.07 TheQuarry.xml
The Witcher 3 01.00, 04.06 TheWitcher3.xml
Uncharted: The Lost Legacy 01.00, 01.09 UnchartedTheLostLegacy.xml
Uncharted: The Nathan Drake Collection 01.00, 01.02 UnchartedTheNathanDrakeCollection.xml
Until Dawn 01.00, 01.03 UntilDawn.xml
Windjammers 2 01.03 Windjammers2.xml
Yoku's Island Express 01.02 YokusIslandExpress.xml

A listed patch is not a guarantee of compatibility with every emulator build; check its target version before using it.

Using Patches in SharpEmu

  1. Right-click the game in the library and select Patches.
  2. Click Download patches. SharpEmu checks the title ID and installed game version, then downloads only matching XML files from this repository.
  3. A dialog confirms completion, or explicitly reports that no compatible patch was found. Downloads are not enabled automatically.
  4. Select a patch to read its author, notes and target version, then tick its checkbox to enable it.
  5. Start the game. If it was already running, close it before changing patches.

You can also download XML files manually from orbis_patches and copy them into user/patches/ next to the SharpEmu executable. For example:

SharpEmu/
  user/
    patches/
      Bloodborne.xml
      TheLastGuardian.xml

Version-specific patches appear only when they match the installed game version. AppVer="mask" entries are shown as All versions (pattern matching). Selections are saved per title ID and also apply when launching through the CLI. Both folder-based games and .zar archives use the same patch settings.

Patches are disabled by default and modify loaded memory, not your game files or archives. Updating a patch's contents requires enabling it again. Only enable patches you trust.

Developing Patches

Work from the executable for the exact title ID and game version you want to support. You can inspect it in Ghidra or IDA and edit the XML with a text editor such as Visual Studio Code or VSCodium.

Record the address base used for your patch in ImageBase; do not assume a fixed base for every game. SharpEmu calculates each write as the loaded executable's first loadable segment address plus Address - ImageBase. The resulting range must be inside a loadable segment of the executable named by AppElf.

Imported PS4 patches explicitly use ImageBase="0x00400000", matching the original virtual-address convention of this collection. Their addresses and replacement values are preserved. Keep that base when editing those addresses; new patches must record the base used by their own target executable.

Submission Guidelines

Add files as orbis_patches/GameTitle.xml. If a game already has a file, add your patch to that file. Keep the original author credits and provide:

  • TitleID: the supported CUSA title IDs.
  • Title, Name, Author and Note: the game, patch name, creator and any instructions or warnings.
  • AppVer: the exact game version, such as 01.09, or mask when every line is pattern-based.
  • PatchVer: the patch revision, separate from the game version.
  • AppElf: the executable to patch, usually eboot.bin.
  • ImageBase: the base address used when creating the patch addresses.

Use English game names for filenames, uppercase title IDs and lowercase hex for addresses and byte values. Submit byte strings without spaces for consistency. Keep separate Metadata entries for different target versions or executables. Validate your patch on the exact game version before submitting.

The download index patches.json is generated from XML TitleID and AppVer fields, not game filenames. CI updates it automatically when patches are added, changed or removed on main. To regenerate or check it locally:

python scripts/update_index.py
python scripts/update_index.py --check

Patch Types

This reference covers the types listed by PS-Game-Patch. All eleven types below are supported by the current SharpEmu patch loader. Use a SharpEmu build containing typed and pattern-based patch support; the initial patch manager supported only bytes.

Type Purpose Value Example SharpEmu Support
byte 8-bit integer write 0x12 Yes
bytes16 16-bit integer write 0x1234 Yes
bytes32 32-bit integer write 0x12345678 Yes
bytes64 64-bit integer write 0x123456789abcdef0 Yes
bytes Raw hexadecimal byte sequence 0102030405060708 Yes
float32 Single-precision floating-point write 1.0 Yes
float64 Double-precision floating-point write 1.0 Yes
utf8 Null-terminated UTF-8 text write Hello World Yes
utf16 Null-terminated UTF-16LE text write Hello World Yes
mask Pattern search with wildcard bytes and an Offset aa bb ?? dd Yes
mask_jump32 Pattern search followed by a 32-bit branch; uses Target, Size and Offset aa bb ?? dd Yes

SharpEmu's current rules are:

  • Integer values accept decimal notation or hexadecimal with 0x, # or $. Negative values use two's complement. Out-of-range values are rejected instead of being truncated. Integers and floats are written in little-endian order.
  • Floats use a decimal point regardless of the host language and must be finite and within range. utf8 and utf16 encode the literal XML text without a BOM and append a null terminator automatically. Unicode characters are supported; use bytes for custom encodings or termination.
  • bytes, mask and mask_jump32 replacement values contain a nonempty, even-length hexadecimal byte sequence without a prefix.
  • Address and ImageBase are hexadecimal, optionally prefixed with 0x. Omitting ImageBase treats Address as an offset from the first loadable segment of the executable.
  • A patch may contain at most 4,096 lines and 1 MiB of replacement bytes in total, including generated branches and padding. Raw bytes lines are not restricted to the upstream 255-byte limit. XML files are limited to 4,194,304 characters.
  • Normally, AppVer must identify the installed game version. AppVer="mask" permits any version, but requires every line to use mask or mask_jump32.
  • Fixed-address lines accept Type, Address and Value. Pattern lines also accept Offset; mask_jump32 additionally requires Target and Size. Invalid types, values or extra line attributes reject the whole patch.

Pattern Matching and Branches

For mask, Address is a whitespace-separated signature, not a number. Use two-digit hexadecimal bytes and ? or ?? for wildcard bytes. Signatures must contain 1-255 bytes and at least one fixed byte. Offset is a signed decimal offset from the first match; it defaults to zero.

Searches visit the target ELF's loadable segments in address order, never scan unrelated mappings or gaps, and never match across segment boundaries. Lines are resolved in XML order, so later searches see replacements staged by earlier lines. Missing matches or invalid write ranges abort the whole patch before anything is written.

For mask_jump32, Target is another signature locating the code cave, not a numeric address. Both searches and both write ranges must be in executable segments. Size is the number of bytes replaced at the source, from 5 to 256. The loader writes an E9 rel32 branch with NOP padding, puts the Value payload at the code cave, then appends an E9 rel32 branch back to source plus Size. The source and code cave must not overlap, and both displacements must fit in a signed 32-bit integer. Choose a unique code-cave signature, verify there is space for the payload plus five return bytes, and ensure Size covers whole instructions. The loader does not relocate overwritten instructions for you.

All writes are validated before they are committed. If a write fails, prior writes, including the source branch and payload, are rolled back.

Example Patch

The following adapts the upstream example to SharpEmu's typed writes. The IDs and addresses are placeholders, not a patch for a real game. Replace them with verified values before use. XML comments are allowed.

<?xml version="1.0" encoding="utf-8"?>
<Patch>
    <TitleID>
        <ID>CUSA00001</ID>
        <ID>CUSA00002</ID>
    </TitleID>
    <Metadata Title="Example Game"
              Name="Example Patch"
              Note="Describe the effect and any warnings here."
              Author="Your Name"
              PatchVer="1.0"
              AppVer="01.09"
              ImageBase="0x00400000"
              AppElf="eboot.bin">
        <PatchList>
            <!-- Supported: eight raw bytes at offset 0x10. -->
            <Line Type="bytes" Address="0x00400010" Value="0102030405060708"/>
            <Line Type="byte" Address="0x00400018" Value="255"/>
            <Line Type="bytes16" Address="0x0040001a" Value="0x1234"/>
            <Line Type="bytes32" Address="0x0040001c" Value="0x12345678"/>
            <Line Type="bytes64" Address="0x00400020" Value="0x0123456789abcdef"/>
            <Line Type="float32" Address="0x00400028" Value="1.5"/>
            <Line Type="float64" Address="0x00400030" Value="2.5"/>
            <!-- Text types append the correct null terminator automatically. -->
            <Line Type="utf8" Address="0x00400040" Value="Hello World"/>
            <Line Type="utf16" Address="0x00400060" Value="Hello World"/>
        </PatchList>
    </Metadata>
</Patch>

This separate pattern example also uses fictional signatures. The mask replacement removes its own signature, while mask_jump32 redirects a source to a code cave and back:

<?xml version="1.0" encoding="utf-8"?>
<Patch>
    <TitleID><ID>CUSA00001</ID></TitleID>
    <Metadata Title="Example Game"
              Name="Pattern Example"
              Note="Fictional signatures; replace before use."
              Author="Your Name"
              PatchVer="1.0"
              AppVer="mask"
              AppElf="eboot.bin">
        <PatchList>
            <Line Type="mask" Address="48 8b ?? ?? 85 c0" Value="31c090909090"/>
            <Line Type="mask_jump32" Address="01 23 45 67 89"
                  Target="cc cc cc cc cc cc cc" Size="8" Value="31c0"/>
        </PatchList>
    </Metadata>
</Patch>

Credits

This collection is adapted from the original community XML patches in shadPS4's patch repository. Original author credits are preserved in each XML file. This repository contains PS4 XML patches only.

The patch format reference and examples follow PS-Game-Patch and the upstream format documentation, with SharpEmu's behavior and validation rules identified. Installation, development, repository layout, and download-index instructions match the PS5 patch collection, with PS4 title IDs, versions, and address bases.

About

The official patch repository for ShadPS4 is customized for SharpEmu.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages