Pokey aims to seamlessly integrate custom C and C++ code into existing games. Custom code is loaded by a game-specific runtime, which can be injected directly into the dol natively or used as a code.
Pokey supports extending game classes with proper multiple inheritance and virtual function support. Programmers can effortlessly write C++ classes for new game elements as they were intended to be written.
The runtime must load the compiled code file. Runtime 2.0 also comes with Universal Bootstrap, allowing a PAL dol to boot on other region discs. A demo project that implements the patch files and much more has been included (see section below).
The project configuration file (project.json
) ties everything together, including: the module registration list, global includes, the path to external symbols, and the static base to link code at.
The library folder houses module-independent code and external precompiled object files which will be compiled and linked when building. The library build.json
file directs this process.
Pokey projects are divided into modules. Each module must have a module.json
file, which enumerates source files to build and (optional) additional includes.
To build a project:
pokey_frontend.py <project_path> [debug|release]
In any source file, to insert a call (bl) to a defined function:
PokeyCall(dest, symbol);
To branch (b):
PokeyBranch(dest, symbol);
To write a 32 bit value:
PokeyWrite32(dest, value);
PokeyWritePointer(dest, value);
More information can be found on Kamek's page.
An easy to follow, C demo project has been provided. This project is for the PAL release of Mario Kart Wii. A more sophisticated, C++ project using Pokey can be found here.
- Pokey runs on Python 3
- Code is linked with Kamek by Treeki
- Code is compiled with Freescale CodeWarrior Special Edition for MPC55xx/MPC56xx v2.10