xenia-canary / game-patches

Game patches for the Xenia emulator
375 stars 199 forks source link
game-modding game-mods game-reversing modding modding-games reverse-engineering xbox xbox-360 xbox360 xenia

Xenia Canary Game Patches

This repository contains game patches for Xenia Canary.\ Plugin documentation can be found here.

Non-patch questions belong on the Xenia Discord server.

Game Patches Discord

These are NOT actual games or Title Updates!
Read Xenia's Quickstart to get games.

Installing/Updating

  1. Prerequisites
  2. Download this zip.
  3. Go to where xenia_canary.exe is.
  4. Delete patches folder if present (backup if needed).
  5. Open game-patches.zip and extract patches in the same directory as xenia_canary.exe. The folder structure should look like this:
    └─── Xenia Canary
        |  ...
        │  xenia_canary.exe
        |  ...
        └─── patches
                ...
                584111F7 - Minecraft (XBLA, TU0).patch.toml
                ...
  6. Continue to the section below.

How to use

  1. Prerequisites
  2. Open the .patch.toml file that corresponds to your game in a text editor (Notepad, VSCode, VSCodium, Notepad++, etc.)
  3. Change is_enabled from false to true. For example, to enable a 60 FPS patch:

    [[patch]]
        name = "60 FPS"
        desc = "Description"
        author = "Author"
        is_enabled = false
    
        [[patch.be8]]
            address = 0x########
            value = 0x##

    becomes

    [[patch]]
        name = "60 FPS"
        desc = "Description"
        author = "Author"
        is_enabled = true
    
        [[patch.be8]]
            address = 0x########
            value = 0x##

If you see [Patches Applied] in the title bar then the patch(es) applied successfully.

Don't change the hash of existing patches. If your version of the game is different then the patch(es) need to be ported to that version.

Notes about aspect ratio patches

Note about framerate patches

Framerates above 60 FPS require vsync to be changed from true to false in the Xenia Canary config.


Setting up Cheat Engine

Creating a patch

Prerequisites

Guidelines

How to get the module hash and filename:

  1. Don't change the hash of existing patches. If your version of the game is different then the patch(es) need to be ported to that version.
  2. Set log_level to at least 2 (default) in the Xenia Canary config; See How to use for location.
  3. Run the game at least once.
  4. Close Xenia Canary.
  5. Obtain module hash/title ID/title name;

Patch types

[[patch.*]] Info Value (example)
be8 Hex, 1 byte 0x00
be16 Hex, 2 bytes 0x0000
be32 Hex, 4 bytes 0x00000000
be64 Hex, 8 bytes 0x0000000000000000
array Hex, any size "0x##*"
f32 Float, single 1.0
f64 Float, double 1.0
string String, UTF-8 "string"
u16string String, UTF-16 "string"

Example patch

title_name = "Game Title"
title_id = "1234ABCD" # AB-1234
hash = "################" # Module the hash applies to (i.e. default.xex)
          # Can be an array if applicable:
hash = [
  "################"     # See above
]
#media_id = "1234ABCD" # Optionally you can add a redump link; Disc (Region): http://redump.org/disc/1234
#                        Can also be an array if applicable:
#media_id = [
#  "1234ABCD"          # See above
#]
# Title ID, hash, and media ID must be uppercase.

[[patch]]
  name = "Patch name"
  author = "Me"
  desc = "Patch description" # Description is optional
  is_enabled = false         # Must be false for PRs

# [[patch.*]]
#  For example, be8:
  [[patch.be8]]
    address = 0x82000000 # Tends to start with 0x8, always 4 bytes
    value = 0x00
#  Address and value hex must be lowercase.
#   string:
  [[patch.string]]
    address = 0x82000000 # Tends to start with 0x8, always 4 bytes
    value = "string"
# End of file newline