Skip to main content

Kai's GameCube Toolkit enabling C/C++ code injection into .dol executables.

Project description

About Freighter

Freighter is command-line based toolkit for setting up and building C/C++ projects using devkitPro for injecting custom code into GameCube/Wii DOL executables. This is a heavily modified fork of Yoshi2's C-Kit that add features such as:

  • Project management using TOML configuration files
  • Incremental build support utilizing multiprocessing
  • Generating .bnr file to customize the banner that is read from Dolphin and the GameCube BIOS.

Installation

Ensure you are using the latest version of Python 3.11 or greater -> https://www.python.org/downloads/

This package is made available through PyPi:

  • Windows: py -m pip install freighter
  • Unix & Such: python3 -m pip install freighter

Reccommendations

  • Window's Terminal: Supports ANSI color codes and unicode emoji characters that Freighter uses to colorize the console ouput.
  • VSCode: Personal perferred code editor that is feature rich thanks to the community.
  • Ghidra: A GameCube modder's best friend

Command Line

After installation open your cli of choice and enter freighter

Options

-help : Shows the help prompt.

-new <Project Name> [Path]: Generates a new project at the current working directory with the specified project name.

-build <Project Name> [Profile]: Builds the project with the selected profile.
Defaults to first profile in the config if no arguments are passed.

-import : Opens a filedialog to import a project directory into Freighter's ProjectManager.

-clean : Removes all temporary files and resets the cache. Useful if Freighter throws an error about missing symbols if the filecache becomes bad.

-verbose : Print verbose information to the console

-debug : Print debug and verbose information to the console

-reset : Reconfigures your UserEnvironment.toml

Project Configuration

Freighter uses TOML configuration format your modding projects. You can generate a new project by using freighter new ProjectName

ProjectConfig.toml

ProjectName = "MyProject"
[BannerConfig]
BannerImage = "banner.png"
Title = "GameTitle"
GameName = "GameTitle"
Maker = "MyOrganization"
ShortMaker = "MyOrganization"
Description = "This is my game's description!"
OutputPath = "build/files/opening.bnr"


[Profiles.Debug]
GameID = "FREI01"
InjectionAddress = 0x0
InputDolFile = "main.dol"
OutputDolFile = "build/sys/main.dol"
IncludeFolders = ["source"]
SourceFolders = ["includes"]
SDA = 0x0
SDA2 = 0x0
GeckoFolder = "gecko"
SymbolsFolder = "symbols"
LinkerScripts = []
TemporaryFilesFolder = "temp"
InputSymbolMap = ""
OutputSymbolMapPaths = []
StringHooks = {}
IgnoredSourceFiles = []
IgnoredGeckoFiles = []
IgnoreHooks = []
DiscardLibraryObjects = []
DiscardSections = []
CompilerArgs = []
GCCArgs = []
GPPArgs = []
LDArgs = []

Credits

Yoshi2 (RenolY2): The OG who made C-kit who made alot of the tools for Pikmin 2 and MKDD. He helped raise baby Kai when he was first learning hex and figuring out how pointers worked. He made a ton of tools that operate on Gamecube era gamefiles and really made the modding scene pop off. Thank you!

Minty Meeo: He has made alot of great changes to C-kit such as relocating the stack frame and cleaning up the code for injection hooks.

Yoshifirebird: This man helped me a TON way back when I was first learning C++. He was the one who had the original idea of using the #pragma keyword so Freighter could preprocess the source file to extract the symbol name and the hook injection address. This is a great feature because you can write the injection address inline with your code that you can easily copy paste into Ghidra to

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freighter-0.3.2.dev5.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

freighter-0.3.2.dev5-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file freighter-0.3.2.dev5.tar.gz.

File metadata

  • Download URL: freighter-0.3.2.dev5.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for freighter-0.3.2.dev5.tar.gz
Algorithm Hash digest
SHA256 c1ee08689b5dca497a0b45709e6b2ec200b39d6f3175df7f8003d1c3e77f32ff
MD5 6b71326bde831e1479ece1592988ab2e
BLAKE2b-256 000e9dfc65e59db1c8f2c0521c23ca0d9f32f525cfc181d138d03d4b55fee4b0

See more details on using hashes here.

File details

Details for the file freighter-0.3.2.dev5-py3-none-any.whl.

File metadata

File hashes

Hashes for freighter-0.3.2.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 03ac03780331fc93715fc5feeaaa55705d120d97d8dde7d019dceabc9f137f4f
MD5 65461226d659e3245bbd5d8b87b6329b
BLAKE2b-256 db7d182f1f94c2cd54122beadfa1a92d42ba4971565e5fd50b86da61f35bcbee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page