项目介绍

xenia-canary/game-patches 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,目前获得 628 个 Star、236 次 Fork。

仓库全名
xenia-canary/game-patches
Star 数
628
Fork 数
236
未关闭 Issue
45

README 摘要

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. These are NOT actual games or Title Updates! Read Xenia's Quickstart to get games. Installing/Updating 0. Prerequisites Latest Xenia Canary experimental. Patches aren't supported on master or outdated versions of Xenia Canary. 1. Download…

完整内容见 GitHub 原始 README 或本页 。

常见问题

game-patches 用什么语言开发?

主要使用 Python 编写,目前有 628 个 Star。

如何获取 game-patches 的源码?

可以直接克隆仓库:git clone https://github.com/xenia-canary/game-patches.git,默认分支为 main;安装与运行步骤见仓库 README。

game-patches 最近还在维护吗?

仓库最近一次更新为 3 周前,当前有 45 个未关闭 Issue;Star 数为 628,可作为社区活跃度的参考。

关于

Game patches for the Xenia emulator

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
1129
价值分
448
活跃状态
活跃

README

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 7z.
  3. Go to where xenia_canary.exe is.
  4. Delete patches folder if present (backup if needed).
  5. Open game-patches.7z 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
    • Latest Xenia Canary experimental
      • Patches aren’t supported on master or outdated versions of Xenia Canary.
    • The right version of the game e.g. Title Update (TU).
      • DON’T change the hash unless you know what you’re doing. Expect crashes or the patch to not work if you do this.
    • apply_patches set to true (default) in the Xenia Canary config.
  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
  • present_letterbox must be changed from true to false!
  • Aspect ratio 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 unless not specified or specified otherwise;
    1. Divide your monitor’s resolution width by height (i.e. 3440/1440)
    2. Convert the result to hex.
    3. Change the value to 0x######## replacing ######## with the hex value.
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

  • 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.
  • Go to Scan Settings and enable MEM_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.

Creating a patch

Prerequisites

Guidelines

  • Patch must be named Title ID - Game Title.patch.toml and be in /patches.
    For example, a patch file for Blue Dragon must be called 4D5307DF - 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.
    • Uppercase hex for title ID/hash/media ID, lowercase for address/value hex.
    • Pull requests and patches must be in English except where appropriate like the game’s name or referencing something within the code.

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): https://redump.info/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

评论

暂无评论