S-NES-BOY is a Learning & Development Framework for three Nintendo systems: NES (Nintendo Entertainment System), SNES (Super Nintendo Entertainment System), and Game Boy (DMG/CGB).
This framework provides a complete learning and development environment organized around three independent system trees. Each system has its own comprehensive documentation, production-ready templates, and working examples. System-specific content is strictly isolated to maintain clarity and focus.
- NES (Nintendo Entertainment System)
- SNES (Super Nintendo Entertainment System)
- Game Boy (DMG/CGB)
Comprehensive hardware-accurate documentation lives under docs/:
docs/nes/- Complete NES learning path: fundamentals, advanced topics, core concepts, techniques, cheatsheets, tooling, and referencesdocs/snes/- Complete SNES learning path: getting started, hardware documentation (CPU, PPU, DMA, audio, memory), programming guides (initialization, game loop, rendering, input), techniques (Mode 7, HDMA effects), and referencesdocs/gameboy/- Complete Game Boy learning path: fundamentals, advanced topics, core concepts, cheatsheets, references, and gold-standard examples
Each system documentation tree is written in hardware terms, is self-contained, and provides a complete learning path from basics to advanced development. SNES documentation follows a three-processor architecture structure (65816 CPU, S-PPU, SPC700 audio).
Hardware schematic diagrams for console and cartridge circuits:
schematics/nes/- NES console and cartridge schematic diagrams (KiCad and PDF)schematics/snes/- SNES console and cartridge schematic diagrams (PDF)schematics/gb/- Game Boy schematics (directory structure ready)
These schematics provide circuit-level documentation essential for understanding hardware behavior, developing accurate emulators, and creating hardware projects.
Production-ready development templates live under templates/:
templates/nes/- Complete NES development template that builds valid iNES ROMs with proper hardware initialization (matches hello_world pattern)templates/snes/- Complete SNES development template that boots correctly on real hardware with proper 65816 native mode setup, DMA utilities, and SPC700 boot codetemplates/gb/- Complete Game Boy development template that builds valid.gbROMs with correct cartridge headers
Each template provides a complete, hardware-accurate starting point for development with a consistent structure: build, src, assets, linker, headers, macros, tools, config, and rom directories.
Working example projects live under examples/:
examples/nes/hello_world- NES text rendering example demonstrating hardware initialization and PPU usage (matches canonical nes-hello pattern)examples/nes/vdelay_example- Variable delay routine demonstrating cycle-accurate timing (29-65535 cycles)examples/nes/prng_6502_example- Complete PRNG example demonstrating all three PRNG widths (16, 24, and 32-bit) with separate seed storageexamples/nes/hex_string_example- Hex string macro example demonstrating multibyte constant definitionexamples/nes/nrom_example- Complete NROM template with sprite system, DMC-safe controller reading, and game loopexamples/nes/snrom_example- Complete SNROM/MMC1 template with bank switching and inter-bank function callsexamples/nes/nes-basic-controls- Basic controller input handling exampleexamples/nes/nes-basic-graphics- Basic graphics rendering exampleexamples/nes/nes-basic-sound- Basic audio programming exampleexamples/nes/nes-birthday-blast- Complete game exampleexamples/nes/fds/- Famicom Disk System examples and tests (5 FDS programs)
examples/snes/hello_world- Minimal SNES program demonstrating text rendering, native mode entry, and PPU setupexamples/snes/move_sprite- Modular sprite movement example with controller input, DMA OAM updates, and auto-joypad readingexamples/snes/bounce_sprite- Modular bouncing sprite example with automatic physics and boundary collision detectionexamples/snes/lorom-template- Complete LoROM template with audio support (SPC700, Pently music engine), sprite/background graphics, and asset conversion tools
examples/gameboy/hello_world- Game Boy text rendering example demonstrating LCD initialization and tile rendering
These examples serve as learning resources, demonstrating correct hardware initialization, text rendering, timing patterns, sprite systems, input handling, and basic program structure for each system.
Comprehensive test ROM collections for verifying hardware behavior, emulator accuracy, and code correctness live under tests/:
tests/nes/- NES test ROMs: CPU tests, PPU tests, APU tests, mapper tests, timing tests, and specialized tests (64+ test directories)tests/snes/- SNES test ROMs: hardware validation tests and test demos for CPU, PPU, DMA/HDMA, audio, memory, Mode 7, color math, and graphics (12+ test demos)tests/gb/- Game Boy test ROMs (directory structure ready)
These test ROMs are authoritative tools for:
- Hardware behavior verification
- Emulator accuracy testing
- Code correctness validation
- Timing edge case discovery
See tests/nes/README.md for detailed information about NES test ROMs. See tests/snes/README.md for detailed information about SNES test demos.
See GETTINGSTARTED.md for installation and environment setup instructions.
To use the NES template:
cd templates/nes
make
make runTo use the SNES template:
cd templates/snes
make
make runTo use the Game Boy template:
cd templates/gb
make
make runKey top-level files:
README.md- Framework overviewCHANGELOG.md- Framework historyCONTRIBUTING.md- Contribution guidelinesCODE_OF_CONDUCT.md- Community standardsLICENSE- LicenseGETTINGSTARTED.md- Environment setup and first steps
All framework content is self-contained. Documentation, examples, and tests are fully integrated into the repository structure.
- Hardware-first: All explanations start from hardware behavior, not abstractions
- Learning-focused: Documentation provides clear learning paths from fundamentals to advanced topics
- Development-ready: Templates and examples are production-ready starting points
- Assembly-aware: Assembly language is the foundation; higher-level concepts build from there
- Deterministic: Cycle counts, timing, and hardware constraints are precisely documented
- System isolation: Each system's documentation, templates, and examples are completely self-contained
This framework consists of four integrated components:
- Comprehensive Documentation - Complete learning paths for each system with hardware-accurate explanations
- Development Templates - Production-ready starting points for new projects with proper hardware initialization
- Working Examples - Reference implementations demonstrating correct patterns and hardware usage
- Test ROMs - Authoritative test suites for hardware verification and emulator validation
- ✅ Complete documentation structure (47 markdown files)
- ✅ Production-ready template (matches hello_world pattern)
- ✅ 11+ working examples (all build with ca65/cc65)
- ✅ 64+ test ROM directories (467 assembly files)
- ✅ Comprehensive Makefile build system
- ✅ All content integrated and self-contained
- ✅ Complete documentation structure (three-processor architecture)
- ✅ Production-ready template with DMA utilities and SPC700 boot
- ✅ 4 working examples (including modular sprite examples)
- ✅ 12+ test demos (CPU, PPU, DMA, audio, Mode 7, graphics)
- ✅ Comprehensive Makefile build system
- ✅ Documentation structure
- ✅ Basic template structure
- ✅ 1 working example
- ⏳ Test ROMs (directory structure ready)
For contribution details, see CONTRIBUTING.md. For external references, see the per-system docs/<system>/REFERENCES.md files.