This guide will get you from zero to running your first SNES ROM in about 10 minutes.
| I want to make SNES games | I want to contribute to the SDK | |
|---|---|---|
| What | Download the pre-built SDK, write C code, build ROMs | Clone the repo, modify compiler/library/tools |
| Prerequisites | make + text editor | clang, cmake, git, python3 |
| Time to start | ~5 minutes | ~15 minutes |
| Go to | Path A: Game Developer | Path B: SDK Developer |
You want to write SNES games in C. The SDK is already compiled — you just need to download it, write code, and run make.
You only need make (the build tool) and an emulator. No compiler installation required — the SDK ships with its own cross-compiler.
macOS:
Linux (Ubuntu/Debian):
Linux (Fedora):
Windows:
pacman -S makePick one (Mesen is recommended for debugging):
| Emulator | Best For | Download |
|---|---|---|
| Mesen | Debugging, accuracy | mesen.ca |
| bsnes | Cycle accuracy | GitHub releases |
| Snes9x | Performance | snes9x.com |
Download the latest release for your platform from the GitHub Releases page:
| Platform | File |
|---|---|
| Linux x86_64 | opensnes_<version>_linux_x86_64.zip |
| Linux aarch64 | opensnes_<version>_linux_aarch64.zip |
| macOS arm64 | opensnes_<version>_darwin_arm64.zip |
| Windows x86_64 | opensnes_<version>_windows_x86_64.zip |
Extract the archive somewhere permanent (e.g., ~/opensnes or C:\opensnes).
The SDK comes with pre-built example ROMs:
You should see "Hello World!" on screen.
Create a new directory anywhere on your machine:
Create two files:
Makefile:
main.c:
Build and run:
That's it — you're making SNES games.
You want to modify the compiler, library, tools, or build system itself. This requires building the entire SDK from source.
You need a full C/C++ development environment.
macOS:
Linux (Ubuntu/Debian):
Linux (Fedora):
Windows:
This takes a few minutes. Expected output:
See CLAUDE.md for architecture details and coding conventions.
Explore by complexity:
| Level | Examples | What You'll Learn |
|---|---|---|
| Beginner | text/hello_world, text/text_test | Console output, text formatting |
| Intermediate | graphics/sprites/simple_sprite, input/two_players | Sprites, controller input |
| Advanced | graphics/backgrounds/mode7, audio/snesmod_music | Mode 7, tracker music |
| Expert | games/breakout, games/likemario | Complete game structure |
| SA-1 Coprocessor | memory/sa1_hello, memory/sa1_starfield | 10.74 MHz second CPU (tutorial) |
| SuperFX (GSU) | memory/superfx_hello, memory/superfx_3d | RISC coprocessor, 3D rendering (tutorial) |
Browse all examples:
| Topic | Guide |
|---|---|
| Graphics & Backgrounds | tutorials/graphics.md |
| Sprites & Animation | tutorials/sprites.md, tutorials/animation.md |
| Scrolling & Parallax | tutorials/scrolling.md |
| Collision Detection | tutorials/collision.md |
| Input Handling | tutorials/input.md |
| Audio & Music | tutorials/audio.md |
| Game States | tutorials/game_states.md |
| SA-1 Coprocessor | tutorials/sa1.md |
Install build tools (see prerequisites for your path above).
You forgot --recursive when cloning. Fix it:
Run make from the SDK root first — the library must be compiled before examples:
Your ROM built but doesn't display anything. Common causes:
setScreenOn() callWaitForVBlank() in main loopLIB_MODULES — check that you include all needed modulesSee TROUBLESHOOTING.md for more solutions.
This is usually a compiler limitation. Check:
u32/s32? Prefer u16/s16 when possibleu8, u16, s16, u32 types from snes.h (not int or long)