sgdkx
๐ฏ๐ต ๆฅๆฌ่ช็ README ใฏใใกใใใ่ฆงใใ ใใใ
This tool is under active development. Use at your own risk!
sgdkx is a CLI tool to support development with SGDK (Sega Genesis Development Kit).
Installation
Install sgdkx (via cargo)
Required Tools (macOS)
The following tools are required. You can install them with Homebrew:
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:
-
sgdkxShow 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 uninstallUninstall SGDK, remove configuration, and also delete any emulators (Gens/BlastEm) installed viasetup-emuat the paths recorded in config.toml. -
sgdkx docIf SGDK documentation exists, it will be opened in your browser.
Experimental Features
-
sgdkx web-export [--rom <path>] [--dir <parent-dir>][Experimental] 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). You can then serve this directory to play your game in a browser. -
sgdkx web-server [--dir <directory>] [--port <port>][Experimental] Serve theweb-exportdirectory with a built-in HTTP server (with COOP/COEP headers for WASM compatibility). By default, serves theweb-exportdirectory onlocalhost:8080. You can change the directory and port with options. Example:sgdkx web-server --dir web-export --port 9000
Simple Example
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.