This repository contains game patches for Xenia Canary.
- Download the zip file.
- Open Xenia Canary.
- Click
Open
>Show content directory...
- Go up one folder.
- Delete
patches
folder if present. - Open
game-patches.zip
and extractpatches
to the directory that containscontent
. - Continue to enabling patches.
apply_patches
must be set to true
in the Xenia Canary config!
To enable patches, open the .patch.toml file that corresponds to your game in a text editor (Notepad, VSCode, VSCodium, Notepad++, etc.), and change is_enabled
from false
to true
.
present_letterbox
must be changed from true
to false
!
These patches do not increase resolution!
While most aspect ratio patches are 21:9 (3440/1440), they can be changed to other aspect ratios as well;
- Divide your monitor's resolution width by height (i.e. 3440/1440)
- Convert the result to hex.
- Change the value to
0x########
replacing########
with the hex value.
Framerates higher than 60 FPS require vsync to be changed from true to false in the Xenia Canary config.
If the above sections didn't help, you can try the following:
-
Make sure you followed Enabling patches.
-
Try deleting all of your patches and updating them.
-
Try commenting out the
hash
of the patch like so:# Add # before hash hash = "################" # like this #hash = "################"
This isn't guaranteed to work, and may cause crashes.
Hashes are used to verify the correct version of a game is being patched, and this bypasses it.If the game has multiple modules you will need to get the hash(es)
- Memory Breakpoints can be set in Cheat Engine or MSVC with
emit_source_annotations = true
. This will give annotations in disassembly. - Cheat Engine 7.2+ includes Big Endian types, but they must be enabled;
- Click
Edit
>Options
>Extra Custom Types
and check all of them.
- Click
- Go to
Scan Settings
and enableMEM_MAPPED
. - Change 'Memory Scan Options' to:
All Start 100000000
Stop 200000000
- This may change depending on the programs you have running.
- Once you find a value you can attach Cheat Engine's debugger to see what reads/writes to that address.
This will show an xex address when a breakpoint is hit, although there is currently no way to set a breakpoint on execution within the Xenia Debugger.
- Cheat Engine
- Ghidra
- IDA Pro
- Text editors:
- Recommended but optional:
- ESLint TOML plugin
- Visual Studio Code/VSCodium extensions:
- To make things easier, put Xenia Canary in the directory that contains
/patches
and run it withportable.txt
.
- Patch must be named
Title ID - Game Title.patch.toml
and be in/patches
.
For example, a patch file for Blue Dragon must be called4D5307DF - Blue Dragon.patch.toml
. - If you are making a patch for a game that already has a file, then add to it*
- Only exception being if you're patching a different module.
- Submitting patches:
- No whitespace.
- Lowercase hex for address/value hex, uppercase for title ID/hash/media ID.
- Set
log_level
to at least2
(default) in the Xenia Canary config; See How to use for location. - Run the game at least once.
- Close Xenia Canary.
- Obtain module hash/title ID/title name;
- Search Ctrl+F for
Module hash:
inxenia.log
You should see something like:i> ######## Module \Device\Cdrom0\default.xex: Module Hash: ################
- Patches can have multiple executables/hashes. Only leave the hash(es) you're using uncommented: https://github.com/xenia-canary/game-patches/blob/95f51801048dc6e95675581e3fcf8fcdfc3e5544/patches/454108D8%20-%20Army%20of%20Two%20The%2040th%20Day.patch.toml#L3-L6
- Search Ctrl+F for
[[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" |
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