Getting started
Documentation · Next: Integration
From a fresh SDK checkout to two consoles exchanging positions.
Get the SDK
Clone the public repository and select the release used by your game:
git clone https://github.com/supercanocoder/canoflash-sdk.git
cd canoflash-sdk
git checkout v1.0.0
Alternatively, download and extract the v1.0.0 source archive. The SDK, examples and documentation are included; Butano is installed separately.
Install the toolchain
Install devkitPro's GBA development tools, including devkitARM and gbafix.
Follow the devkitPro installation instructions
for your operating system. You also need make in the build shell.
A typical macOS/Linux installation uses:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM="$DEVKITPRO/devkitARM"
"$DEVKITARM/bin/arm-none-eabi-gcc" --version
Use your actual paths. On Windows, use the environment provided by your devkitPro installation rather than copying Unix paths.
For Butano examples, also install Python 3 and Butano following
Butano's setup guide.
LIBBUTANO must point to the directory containing butano.mak:
export LIBBUTANO=/path/to/butano/butano
test -f "$LIBBUTANO/butano.mak"
python3 --version
All following commands run from the root of this SDK checkout. No sibling ESP32, web backend or ROM project is needed to build the examples.
Configure the device and game
- Configure Wi-Fi on each CanoFlash and link it to its owner's account.
- Install firmware compatible with this SDK. See Compatibility.
- Register a game in the online-games section of your CanoFlash dashboard.
- Put its key in the local example configuration.
The game key identifies the game; the device authenticates the player. Do not copy account passwords or device tokens into a ROM.
Build
Plain C:
make -C examples/hello_world
Output: examples/hello_world/hello_world.gba.
Butano:
make -C examples/hello_world_butano LIBBUTANO="$LIBBUTANO" -j2
Output: examples/hello_world_butano/hello_world_butano.gba.
Lobby interface:
make -C examples/lobby LIBBUTANO="$LIBBUTANO" -j2
Output: examples/lobby/lobby.gba. Press A on the title screen to connect.
The two smaller examples connect automatically.
After changing the key, clean and rebuild your chosen example:
make -C examples/hello_world clean
make -C examples/hello_world
For Butano, supply the same LIBBUTANO setting to clean and build.
Load and test
Load the same example on both consoles, each with its own CanoFlash. The supplied Makefiles build cartridge-format ROMs for a compatible flashcart or loader. They do not produce a dedicated multiboot executable.
Loading a ROM through CanoFlash and compiling a multiboot-format program are different operations. The lobby has also been exercised through the project's CanoFlash loading workflow. Whether another ROM can be loaded that way depends on its size, memory layout and the loader; the SDK itself does not upload ROMs.
With the plain C example:
- The connecting indicator runs while the session opens.
- The first console waits in a public two-seat room.
- The second joins if the key, parameters and capacity match.
- The master requests the playing state; both consoles then show movement.
- Move with the D-pad and check the other console receives your position.
One console can verify connection and room creation. A second is needed for data exchange. An emulator helps with rendering and ROM debugging, but does not replace CanoFlash hardware for end-to-end network tests.
Move into your own game
Copy the two SDK files or vendor this folder, then follow Integration. Record the SDK revision and device firmware used.
Before sharing a ROM, test missing hardware, failed connection, leaving a room, and Wi-Fi recovery as well as successful play. See hardware validation.
