Help:Game Patches

Help page
Revision as of 16:54, 23 January 2021 by HerrHulaHoop (talk | contribs) (Added some documentation on patch structure)

This page aims to provide all information relating to RPCS3's patch system.

  • the Main subpage lists the current PPU patches available for RPCS3's game patching system.
  • the SPU subpage lists the general-use SPU patches available for RPCS3's game patching system.
  • the Canary subpage lists patches that are severely buggy, in-development, or circumvent emulation bugs. These patches are not shipped with RPCS3's patch download functionality.

Using game patches

The simplest way to enables patches in RPCS3 is as follows:

  1. Boot RPCS3
  2. Select Manage > Game Patches to access the Patch Manager.
  3. Click the Download latest patches button and the emulator will automatically fetch the latest version of available patches.
  4. Navigate to the patch you wish to enable and tick the checkbox corresponding to the patch. You may want to tick the check box Only show owned games to make navigation simpler.
  5. Click Save and boot the game.

Manually adding custom patches

There are many patches that aren't shipped with the automatic download facility due to them being canary patches, privately-shared patches, or otherwise missing from the Wiki. These patches can be added to RPCS3 in the following manner:

  1. Open your preferred text editor (e.g: VSCode, Sublime, Notepad++).
  2. Add the line Version: 1.2 to the top of the file. Do not paste anything else on this line. Hit Enter and move to the next line.
  3. Paste your custom patch that from the Canary page or any other source. Ensure that the formatting for these patches are perfect, as the emulator will ignore the patch if it detects any formatting deficiencies.
  4. Click Save and name the file imported_patch.yml. Do NOT change the capitalization or use any other name, RPCS3 will not be able to apply the patches.
  5. Save the file in relevant location:
    Windows: \patches\
    Linux: ~/.config/rpcs3/patches/
  6. Navigate to the Patch Manager as mentioned before and tick the checkbox corresponding to the patch you wish to apply.

How to identify the PPU/SPU executable hash

This section is meant for adept users who wish to apply a patch to a different game version. Do not try to edit any of the patches unless you know what you are doing. Please note that you will also have to edit the Title ID and game version information for the modified patch to be applied by the emulator.

To identify the executable hash, follow the instructions mentioned here:

  1. Boot the game for a minute and then close the emulator.
  2. Open RPCS3.log (or just RPCS3 with the Notepad icon).
  3. Search for the string PPU executable hash:.
  4. Copy the value that looks like PPU-b8c34f774adb367761706a7f685d4f8d9d355426. This is the PPU hash of your game.
  5. Open patch.yml with any text editor (e.g: VSCode, Sublime, Notepad++).
  6. Find the existing patch that you wish to modify and copy it to imported_patch.yml. Ensure that you also copy over any anchors that the patch relies on.
  7. Find the existing PPU hash in the patch and replace the same with the PPU hash you obtained in Step 4.

Please note that some games may have multiple PPU executable hashes, and it is up to you to figure out the correct hash to be copied. Also, the same method can be used to extract SPU executable hashes by searching for SPU executable hash: in Step 3.

Patch format

Below are the various types of patch structures that can be used in RPCS3. It starts with the basic format and then showcases various other complex structures that can be used. In case of any doubts, you can refer to over 100 patches present in our patch repository for guidance.

Parameters

The following are the valid parameters of the Patch structure (required entries are in bold):

  • PPU/SPU executable hash - This is the 40 character unique to help identify the game's executable file. It will have the prefix PPU- or SPU-. Please find the instructions to identify the hash here.
  • PatchName - This field needs to be replaced with the name of the patch (e.g. 60FPS patch, Disable MLAA, Infinite Ammo, etc.).
  • GameName - This field needs to be replaced with the name of the game (e.g. Persona 5, The Last of Us, etc.). To the extent possible, ensure that this matches to the title of game page on the wiki. Deviation on account of special editions or demos are allowed and will be reviewed on a case-to-case basis. In case of a global patch that is to be applied to all games, mention All.
  • GameID - This field needs to be replaced with the Serial of the game (e.g. BLUS23053, NPEB54673, etc.).
  • GameVersion - This field needs to be replaced with the version number of the game as follows:
    • Actual version - If you are sure of the version number of your game, mention the same (for e.g. v1.01 is to be written as 01.01).
    • All - If you are unsure of the version and the game has only a single known version, mention All.
  • Author - Fill in the name of the authors of the patch.
  • Notes - Fill in any relevant information that needs to be communicated to the user of the patches. Any special settings or drawbacks to the patches needs to be mentioned here.
  • Group - This field is used when there are multiple patches for a game that cannot be enabled at the same time. Using the same Group for these patches will ensure that only one can be enabled at a time (for e.g. mention FPS when both 60FPS and 120FPS patches are available for the same game). This only applies to patches present under the same PPU/SPU executable hash.
  • Patch Version - Fill in the version number of the patch (for e.g. v1.1 is to be written as 1.1). This version number needs to be incremented every time a significant change has been made.
  • Patch - This field will contain the actual patch code.
  • Anchors - This field can be used to when the same patch code is to be used for multiple patches. A unique AnchorDesc needs to be declared and then called in the Patch field of every patch that uses it. Please see an example of its use in the formats below.

Standard format

PPU-0000000000000000000000000000000000000000:
  PatchName:
    Games:
      "GameName":
        GameID: [ GameVersion ]
    Author: 
    Notes: 
    Patch Version: 
    Patch:
      - [ Patch ]

Using anchor (for large patches)

Anchors:
  AnchorDesc: &AnchorDesc
    - [ Patch ]

PPU-0000000000000000000000000000000000000000:
  PatchName:
    Games:
      "GameName":
        GAME00000: [ GameVersion ]
    Author: 
    Notes: 
    Patch Version: 
    Patch:
      - [ load, *AnchorDesc ]

Multiple GameIDs and Patches

PPU-0000000000000000000000000000000000000000:
  PatchName1:
    Games:
      "GameName":
        GAME00000: [ GameVersion ]
        GAME00001: [ GameVersion ]
    Author: 
    Notes: 
    Group: 
    Patch Version: 
    Patch:
      - [ Patch ]
  PatchName2:
    Games:
      "GameName":
        GAME00000: [ GameVersion ]
        GAME00001: [ GameVersion ]
    Author: 
    Notes: 
    Group: 
    Patch Version: 
    Patch:
      - [ Patch ]