3 releases
Uses new Rust 2024
| 0.2.3 | Jul 22, 2025 |
|---|---|
| 0.2.2 | Jul 22, 2025 |
| 0.2.1 | Jul 22, 2025 |
#1022 in Command line utilities
105KB
2K
SLoC
sgdkx
๐ฏ๐ต ๆฅๆฌ่ช็ README ใฏใใกใใใ่ฆงใใ ใใใ
sgdkx is a CLI tool to support development with SGDK (Sega Genesis Development Kit).
Installation
Install sgdkx (via cargo)
cargo install sgdkx
Required Tools (macOS)
The following tools are required. You can install them with Homebrew:
brew install make openjdk compiledb
brew tap gcenx/wine
brew install --cask --no-quarantine wine-crossover
brew install doxygen # options
gitis usually pre-installed, but if not, install it withbrew install git.- Running
sgdkxwith no command will perform an environment check and show if all required tools are installed.
Usage
Main commands:
-
sgdkx
Show environment check, SGDK/emulator configuration, and help message. -
sgdkx setup [--version <version>]
Download and install SGDK (Sega Genesis Development Kit).
You can specify the version with--version(default: master).
The--versionoption accepts a branch name, tag, or commit ID.
Examples:--version V2.11for tag V2.11--version ef9292c0for commit ID ef9292c0 The SGDK path and version are saved in config.toml.
Additionally, if doxygen is installed and SGDK documentation does not exist, documentation will be generated automatically.
-
sgdkx setup-emu [gens|blastem]
Download and install an emulator (Gens or BlastEm).
The path to the emulator is saved in config.toml. -
sgdkx new <project_name>
Create a new project from the SGDK sample. -
sgdkx run [--emulator <gens|blastem>] [--rom <path>]
Run the ROM file with the specified emulator (default: gens or installed emulator).
You can specify the emulator with--emulatorand the ROM file path with--rom(default:out/rom.bin). -
sgdkx uninstall
Uninstall SGDK, remove configuration, and also delete any emulators (Gens/BlastEm) installed viasetup-emuat the paths recorded in config.toml. -
sgdkx doc
If SGDK documentation exists, it will be opened in your browser.
Experimental Features
-
sgdkx setup-webDownload a web emulator template for playing your ROM in a browser. -
sgdkx web-export [--rom <path>] [--dir <parent-dir>]Export your ROM and a web emulator template for browser-based play. This command copies a web emulator template (HTML/JS/WASM) and your ROM into a newweb-exportdirectory under the specified parent directory (default: current directory). -
sgdkx web-server [--dir <directory>] [--port <port>]Serve theweb-exportdirectory using a built-in HTTP server (with COOP/COEP headers for WASM compatibility). By default, it serves theweb-exportdirectory atlocalhost:8080. You can change the directory and port using the options. Example:sgdkx web-server --dir web-export --port 9000
Simple Example
sgdkx setup --version v2.11 # stable
sgdkx setup-emu
sgdkx new your_project
cd your_project
make
sgdkx run
Reference: Output when run without any command
Unofficial tools for SGDK workflow
Usage: sgdkx [COMMAND]
Commands:
setup Setup SGDK for development
doc Show SGDK documentation status
setup-emu Setup emulator for running ROM files
new Create a new SGDK project
run Run ROM file with emulator
uninstall Uninstall SGDK installation and configuration
web-export Export ROM and web emulator template for web deployment
web-server Serve web-export directory with HTTP server (with COOP/COEP headers)
open Open SGDK installation directory
setup-web Setup web export template
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
๐ฉบ sgdkx Environment Check
โ
git: /opt/homebrew/bin/git
โ
make: /usr/bin/make
โ
java: /opt/homebrew/opt/openjdk/bin/java
โ
compiledb: /opt/homebrew/bin/compiledb
โ
doxygen: /opt/homebrew/bin/doxygen
โ
wine: /opt/homebrew/bin/wine
๐ sgdkx Configuration: /Users/[user]/.sgdkx/data/config.toml
SGDK Path : /Users/[user]/.sgdkx/data/SGDK
Version : v2.11
Commit ID : ef9292c03fe33a2f8af3a2589ab856a53dcef35c
Gens Path : /Users/[user]/.sgdkx/data/gens/gens.exe
blastem Path: Not installed
๐ SGDK documentation: /Users/[user]/.sgdkx/data/SGDK/doc/html/index.html
Acknowledgements / Dependencies
Special thanks to these excellent projects.
Notes
- This tool is under active development.
- This tool has not been thoroughly tested on Linux platforms. Linux users should proceed with caution.
Dependencies
~26โ45MB
~693K SLoC