Tprrt's Blog

Embedded Linux, Zephyr RTOS, open-source hardware, Linux gaming, retro gaming, and competitive fitness

Dec 31, 2025

Open-Source Game Engines for Retro Consoles

8-bit and 16-bit Consoles

Game Boy Color (GBC)

GB Studio

GB Studio is a visual game editor for making Game Boy games without writing code. Its drag-and-drop interface covers RPGs, adventure games, platformers and shooters.

Key Features:

  • Visual scene editor
  • Built-in sprite and background editors
  • Integrated music tracker
  • Event system for complex game logic
  • Exports to actual GB/GBC ROMs that run on real hardware
  • Cross-platform support (Linux, Windows, macOS)

License: MIT

Links: GitHub | Website | Documentation

GBDK-2020

GBDK-2020 is a fork of the Game Boy Development Kit that adds C99 support and a newer toolchain.

Key Features:

  • C99 compiler
  • ROM banking support for large games
  • Libraries for sprites, backgrounds, and sound
  • Compatible with both Game Boy and Game Boy Color

License: Various (mostly permissive)

Links: GitHub | API Documentation

Game Boy Advance (GBA)

Butano

Butano is a C++17 game engine built on devkitARM. It abstracts the hardware while leaving the system's capabilities reachable.

Key Features:

  • Sprite management with affine transformations
  • Regular and affine background layers
  • Audio support (DMG and DirectSound)
  • Scene management system
  • GBA-optimized math utilities

License: zlib License

Links: GitHub | Documentation

Tonclib

Tonclib is the long-standing GBA library. It is less actively developed but stable, and comes with the Tonc tutorial, one of the best-documented resources for GBA development.

Key Features:

  • Advanced sprite and background management
  • Mode 7 (affine) support for pseudo-3D effects
  • Built-in text rendering

License: MIT-like (custom permissive)

Links: GitHub | Tonc Tutorial

Nintendo DS (NDS)

NightFox's Lib

NightFox's Lib is a high-level 2D game library built on libnds.

Key Features:

  • Sprite engine with rotation and scaling
  • Tiled background support
  • Collision detection
  • 2D and 3D text rendering
  • Sound and MOD music playback
  • File system access

License: MIT

Links: GitHub

libnds + devkitARM

libnds is the official devkitPro library, with low-level access to all DS features. It requires knowing the hardware.

Key Features:

  • Complete hardware access to both screens
  • 2D and 3D graphics support
  • Touchscreen and button input
  • WiFi networking support
  • FAT file system access
  • Audio subsystem control

License: zlib License

Links: GitHub | Documentation | Examples

Nintendo 3DS

citro2d / citro3d

The citro libraries are the official devkitPro solution for 3DS development, with hardware-accelerated 2D and 3D graphics.

Key Features:

  • Hardware-accelerated rendering via PICA200 GPU
  • 2D sprite batching (citro2d)
  • Full 3D graphics pipeline (citro3d)
  • Shader support
  • Stereoscopic 3D rendering
  • Text rendering

License: zlib License

Links: citro3d | citro2d | Documentation | Examples

Super Nintendo (SNES)

PVSnesLib

PVSnesLib is a C library for the Super Nintendo.

Key Features:

  • Sprite management (OAM)
  • Background and tilemap support
  • Mode 7 support for rotation and scaling
  • Sound driver integration
  • Gamepad input handling
  • DMA and HDMA operations

License: MIT

Links: GitHub | Wiki

libSFX

libSFX is a macro assembler framework for SNES development.

Key Features:

  • Assembly-first with C support
  • Super FX (GSU) support
  • Music and sound effects
  • Steeper learning curve

License: MIT

Links: GitHub | Wiki

Sega Mega Drive / Genesis

SGDK (Sega Genesis Development Kit)

SGDK is the most widely used framework for Mega Drive homebrew, with an active community and extensive documentation.

Key Features:

  • Sprite engine with hardware scrolling
  • Multiple background plane support
  • VDP (video display processor) management
  • Z80 sound driver with XGM music format
  • DMA operations
  • Built-in collision detection
  • ResComp resource compiler for assets

License: MIT

Links: GitHub | Wiki | Forums

Neo Geo

NGDK (Neo Geo Development Kit)

NGDK brings C development to the Neo Geo arcade platform and AES home console.

Key Features:

  • C framework for Neo Geo development
  • Sprite system management
  • Background and fix layer handling
  • Input handling for arcade controls
  • Sound support (Z80 + YM2610)
  • Asset conversion tools
  • Example games included

License: Custom permissive

Links: GitHub | Wiki

PC Engine / TurboGrafx-16

HuC (Hudson C Compiler)

HuC is the classic PC Engine C compiler, still maintained by the community.

Key Features:

  • C compiler for PC Engine
  • Support for HuCard and CD-ROM²
  • PSG sound support
  • Sprite management
  • Background and tilemap support
  • ADPCM audio for CD games
  • Standard C library subset

License: BSD-like

Links: GitHub

Squirrel (HuDK)

Squirrel (HuDK) is a newer alternative to HuC.

Key Features:

  • CD-ROM support

License: Open source

Links: GitHub

Fifth and Sixth Generation Consoles

Sony PlayStation 1 (PS1)

PSn00bSDK

PSn00bSDK is a lightweight open-source PS1 SDK, a free alternative to the old Psy-Q SDK.

Key Features:

  • Hardware 3D graphics (GTE) support
  • 2D sprite and primitive rendering
  • CD-ROM file system access
  • SPU sound support with ADPCM and XA audio
  • Memory card management
  • Controller input (standard and analog)
  • Serial I/O support

License: MPL 2.0

Links: GitHub | Wiki | Examples

Sega Saturn

Jo Engine

Jo Engine is a high-level 2D and 3D game engine for the Saturn.

Key Features:

  • High-level API for 2D and 3D
  • Sprite engine with scaling and rotation
  • 3D model support with converter tools
  • Audio support (PCM, CD audio)
  • Save game management
  • Collision detection
  • Map and tilemap support
  • USB dev cart support for rapid testing
  • Video tutorials available

License: MIT

Links: GitHub | Website | Wiki

Yaul

Yaul is a replacement for the old Sega Basic Library, aimed at developers who want low-level Saturn access.

Key Features:

  • VDP1 and VDP2 support
  • SCU DMA operations
  • CD block support
  • SCSP (sound) support
  • USB dev cart support

License: BSD

Links: GitHub | Documentation

Nintendo 64

libdragon

libdragon is the open-source N64 SDK, an alternative to the official Nintendo one.

Key Features:

  • 3D graphics via RDP/RSP
  • Audio subsystem support
  • Controller input
  • ROM file system
  • Hardware sprites

License: Unlicense (public domain)

Links: GitHub | Documentation

Sega Dreamcast

KallistiOS (KOS)

KallistiOS is the de facto standard for Dreamcast homebrew.

Key Features:

  • Complete OS-like framework
  • 2D and 3D graphics (PowerVR)
  • Network support (modem, broadband adapter)
  • VMU (Visual Memory Unit) support
  • Input device support
  • CD-ROM file system (ISO9660)
  • AICA SPU audio support
  • Threading and multitasking
  • USB development support

License: BSD-style

Links: GitHub | Documentation | Forums

Additional KOS libraries include GLdc (OpenGL-like API) and SDL ports, making cross-platform development easier.

Sony PlayStation 2 (PS2)

PS2SDK

PS2SDK gives access to the PlayStation 2 hardware.

Key Features:

  • Graphics Synthesizer (GS) support for 2D/3D
  • Emotion Engine and I/O Processor access
  • Vector Unit (VU) programming
  • Sound library (audsrv)
  • USB and network support
  • Memory card management
  • DVD file system access

License: BSD/Academic Free License

Links: GitHub | Website | Examples

Nintendo GameCube / Wii

devkitPPC + libogc

The devkitPro toolchain for GameCube and Wii, with libogc.

Key Features:

  • Official devkitPro toolchain
  • Full hardware access for both systems
  • GX 3D graphics library
  • ASND audio library
  • Controller support (PAD/WPAD)
  • Network library
  • USB and SD card storage
  • DVD reading
  • Homebrew Channel integration (Wii)

License: Various (permissive)

Links: GitHub | Documentation | Examples | devkitPro

Sony PlayStation Portable (PSP)

PSPSDK

PSPSDK is the homebrew SDK for the PSP.

Key Features:

  • 3D graphics (GU library) with hardware acceleration
  • 2D sprite rendering
  • Multi-format audio support
  • WiFi and networking
  • USB support
  • Memory Stick access
  • Save data management
  • MP3, AAC playback

License: BSD/GPL

Links: GitHub | Forums | Examples

PlayStation Vita

Vita SDK

Vita SDK is the homebrew SDK for Sony's Vita.

Key Features:

  • OpenGL ES-like graphics
  • Touch screen support
  • Accelerometer and gyroscope
  • Camera support
  • Network and WiFi
  • Trophy system support
  • Save data management
  • Multi-format audio

License: Various

Links: GitHub | Website | Documentation | Examples

Xbox (Original)

nxdk

nxdk is a clean-room Xbox SDK with no Microsoft code.

Key Features:

  • Direct3D 8-like graphics API
  • Audio support
  • Controller input
  • Network support
  • Hard drive access
  • SDL port available

License: Various (LGPL/MIT)

Links: GitHub | Wiki | Examples

Development Tools and Workflow

DevkitPro Toolchain

Many frameworks (GBA, DS, 3DS, GameCube/Wii) require the devkitPro toolchain, which runs on Linux:

  • Website
  • Getting Started Guide
  • Includes devkitARM, devkitPPC, and associated libraries
  • Available via pacman (devkitPro package manager) on Fedora

Graphics Tools

These tools are free, open-source and run on Linux:

Pixel Art Editors:

  • Pixelorama (MIT): Modern pixel art editor with animation support, built with Godot. An Aseprite alternative. Website
  • LibreSprite (GPL v2): Fork of old GPL Aseprite with familiar interface. Website
  • GrafX2 (GPL v2): Inspired by Deluxe Paint, excellent for retro graphics. Website
  • Piskel (Apache 2.0): Web-based and offline pixel art editor. Website

Tilemap Editor:

  • Tiled (GPL v2/BSD): Industry-standard tilemap editor. Website

General Graphics:

  • GIMP (GPL v3+): Full-featured image editor. Website

Music and Sound Tools

All tools below are free, open-source and run on Linux:

Chiptune (Hardware Chip Emulation):

  • Furnace (GPL v2+): Multi-system chiptune tracker supporting 60+ sound chips (NES, SNES, Genesis, Game Boy, etc.). Available on Flathub. GitHub

Module Trackers (Sample-based):

  • MilkyTracker (GPL v3): FastTracker II-inspired tracker for MOD/XM formats. Website
  • Schism Tracker (GPL v2): Impulse Tracker clone for S3M/IT formats. Website

NES/Famicom Specific:

  • FamiStudio (MIT): DAW-style NES/Famicom music editor with expansion chip support. Available on Flathub. Website

Audio Editor:

  • Audacity (GPL v2/v3): Multi-track audio editor and recorder. Website

Emulators for Testing

All emulators below are open-source and Linux-compatible:

  • mGBA: Game Boy Advance - Website
  • DeSmuME: Nintendo DS - Website
  • Citra: Nintendo 3DS - Website
  • bsnes: Super Nintendo - GitHub
  • Genesis Plus GX: Sega Mega Drive - GitHub
  • Mednafen: Multi-system (PC Engine, PS1, Saturn, etc.) - Website
  • DuckStation: PlayStation 1 - GitHub
  • PCSX2: PlayStation 2 - Website
  • Dolphin: GameCube/Wii - Website
  • PPSSPP: PlayStation Portable - Website
  • Vita3K: PlayStation Vita - Website
  • Flycast: Sega Dreamcast - GitHub
  • Mupen64Plus: Nintendo 64 - Website
  • xemu: Original Xbox - Website

Recommendations by Experience Level

Beginner-Friendly

8-bit/16-bit:

  • GB Studio (GBC): Visual editor, no coding required
  • GBDK-2020 (GBC): Simple C development
  • SGDK (Mega Drive): Excellent documentation and community

Fifth/Sixth Generation:

  • PSn00bSDK (PS1): lightweight API
  • Jo Engine (Saturn): High-level engine with tutorials
  • PSPSDK (PSP): stable, documented

Intermediate

8-bit/16-bit:

  • Butano (GBA): C++17, documented
  • PVSnesLib (SNES): Comprehensive library
  • NightFox's Lib (DS): High-level 2D development

Fifth/Sixth Generation:

  • KallistiOS (Dreamcast): Mature ecosystem
  • devkitPPC (GC/Wii): Official toolchain
  • Vita SDK (Vita): Active community

Advanced

8-bit/16-bit:

  • libSFX (SNES): Assembly-first, highly optimized
  • citro3d (3DS): Direct hardware access
  • libnds (DS): Low-level control

Fifth/Sixth Generation:

  • PS2SDK (PS2): Complex but powerful
  • Yaul (Saturn): Modern low-level library
  • libdragon (N64): RDP/RSP programming
  • nxdk (Xbox): Direct3D 8 development

Community Resources

General Communities:

  • NESDev Forums: Multi-platform retro development - Forums
  • GBAtemp: DS/3DS homebrew - Website
  • devkitPro Discord: Nintendo handheld development

Platform-Specific:

  • GBADev: Game Boy Advance - Website
  • PSXDev: PlayStation 1 - Website
  • PS2Dev Forums: PS2, PSP - Forums
  • DCEmulation: Dreamcast - Website
  • SegaXtreme: Saturn, Mega Drive - Website
  • N64brew: Nintendo 64 - Website
  • GC-Forever: GameCube/Wii - Website
  • r/vitahacks: PS Vita homebrew

Conclusion

Everything here is free and open-source, from the SDKs to the pixel editors and music trackers, and runs on Linux. The range goes from a no-code Game Boy puzzle game in GB Studio to assembly-optimized code for the PlayStation 2's Emotion Engine.

May your sprites never flicker.

posted at 10:00  · 9 min read  ·   ·  gamedev  retro  homebrew  console  open-source  article

Mar 11, 2025

Retro Console Hardware Comparison

CPU and Memory Architecture

Processor Specifications

Console CPU Clock Speed
Game Boy Custom Sharp LR35902 4.19 MHz
Game Boy Color Custom Sharp Z80 8 MHz
NES Ricoh 2A03 (MOS 6502) 1.79 MHz (NTSC) / 1.66 MHz (PAL)
SNES Ricoh 5A22 (65C816-based) 3.58 MHz (max)
PC Engine HuC6280 (MOS 6502-based) 7.16 MHz
Neo Geo Motorola 68000 + Zilog Z80 12 MHz + 4 MHz
Game Boy Adv. ARM7TDMI 16.78 MHz
Nintendo DS ARM946E-S + ARM7 67 MHz + 33 MHz
Nintendo 3DS Dual-Core ARM11 MPCore 268 MHz
Wii IBM PowerPC "Broadway" 729 MHz
PSP MIPS R4000-based CPU 333 MHz
Switch NVIDIA Tegra X1 (ARM Cortex-A57) 1.02 GHz

Memory Configurations

Console RAM
Game Boy 8 KB
Game Boy Color 32 KB + 16 KB VRAM
NES 2 KB + 2 KB VRAM
SNES 128 KB + 64 KB VRAM
PC Engine 8 KB + 64 KB VRAM
Neo Geo 64 KB + 68 KB VRAM
Game Boy Adv. 256 KB + 96 KB VRAM
Nintendo DS 4 MB + 656 KB VRAM
Nintendo 3DS 128 MB + 6 MB VRAM
Wii 88 MB (24 MB + 64 MB GDDR3)
PSP 32 MB (PSP-1000) / 64 MB (PSP-2000+)
Switch 4 GB LPDDR4

Key Observations:

RAM grew from kilobytes to gigabytes, roughly a million-fold. The NES had 2 KB of main RAM; the Switch has 4 GB.

2D Graphics Capabilities

Early consoles used dedicated 2D hardware with hardware sprites and tile-based rendering.

Color Depth and Palette

Console Graphics Processor Displayable Colors
Game Boy Custom Sharp LR35902 4 shades of gray
Game Boy Color Custom Sharp Z80 32,768, 56 max
NES PPU (2C02 or 2C03) 52, 25 max
SNES S-PPU 32,768, 256 max
PC Engine HuC6270A VDC 512, 482 max
Neo Geo Custom LSPC2-A2 65,536, 4,096 max
Game Boy Adv. Custom 2D Core 32,768, 512 max
Nintendo DS 2D/3D Graphics Engine 32,768, 4,096 max
Nintendo 3DS PICA200 GPU 16.8 million
Wii ATI Hollywood GPU 16.8 million
PSP Sony CXD2962GG + Media 16.8 million
Switch NVIDIA Tegra X1 16.8 million

Sprite Capabilities

Console Sprite Size Max Sprites on Screen
Game Boy 8x8 or 8x16 px 40 sprites, max 10 per line
Game Boy Color 8x8 or 8x16 px 40 sprites, max 10 per line
NES 8x8 or 8x16 px 64 sprites, max 8 per line
SNES Up to 64x64 px 128 sprites, max 32 per line
PC Engine 16x16 px 64 sprites, max 16 per line
Neo Geo Up to 16x512 px 380 sprites, no strict limit
Game Boy Adv. Up to 64x64 px 128 sprites, max 32 per line
Nintendo DS Up to 64x64 px 128 sprites, max 32 per line
Nintendo 3DS Variable Sprite handling via 3D engine
Wii Variable Sprite handling via 3D engine
PSP Variable Sprite handling via 3D engine
Switch Variable Sprite handling via 3D engine

Key Observations:

Sprite-per-line limits constrained 8-bit and 16-bit consoles, and developers had to manage sprite placement to avoid flicker. The Neo Geo's large sprites (up to 16x512 pixels) and high sprite count suited arcade-style action games.

Video Output Specifications

Display Characteristics

Console Resolution Refresh Rate Aspect Ratio
Game Boy 160x144 59.7 Hz 10:9
Game Boy Color 160x144 59.7 Hz 10:9
NES 256x240 60 Hz (NTSC) 50 Hz (PAL) 4:3
SNES 256x224 512x448i 60 Hz (NTSC) 50 Hz (PAL) 4:3
PC Engine 256x224 59.94 Hz 4:3
Neo Geo 320x224 59.18 Hz 4:3
Game Boy Adv. 240x160 59.7 Hz 3:2
Nintendo DS 256x192 (per screen) 59.8 Hz 4:3
Nintendo 3DS 400x240 (top) 320x240 (bottom) 60 Hz 5:3 (top) 4:3 (bottom)
Wii 640x480 60 Hz 4:3 or 16:9
PSP 480x272 60 Hz 16:9
Switch 1280x720 (Handheld) 1920x1080 (Docked) 60 Hz 16:9

Key Observations:

Resolution went from the Game Boy's 160x144 to 1920x1080 on a docked Switch. Most classic consoles targeted NTSC's 60 Hz or PAL's 50 Hz. The shift from 4:3 to 16:9 came around the PSP/Wii generation.

Audio Capabilities

Sound Architecture

Console Sound Channels Sample Rate
Game Boy 4 (2 square, 1 wave, 1 noise) ~8 kHz
Game Boy Color 4 (same as GB) ~8 kHz
NES 5 (2 pulse, 1 triangle, 1 noise, 1 DPCM) ~21.3 kHz (NTSC) ~17.3 kHz (PAL)
SNES 8 PCM 32 kHz
PC Engine 6 PCM ~7.16 kHz to ~20 kHz
Neo Geo 4 FM, 3 PSG, ADPCM-A, ADPCM-B ~15.7 kHz (ADPCM-A) ~18.5 kHz (ADPCM-B)
Game Boy Adv. 6 (2 direct PCM + 4 PSG) 32 kHz
Nintendo DS 16 PCM 32 kHz
Nintendo 3DS 24 PCM 32 kHz
Wii 64 PCM 48 kHz
PSP 32 PCM 44.1 kHz
Switch 32 PCM 48 kHz

Audio Output

Console Audio Processor Audio Output
Game Boy Custom Sharp LR35902 Mono
Game Boy Color Custom Sharp Z80 Mono
NES Ricoh 2A03 (NTSC) / Ricoh 2A07 (PAL) Mono
SNES Sony SPC700 + DSP Stereo
PC Engine HuC6280 PSG Mono
Neo Geo Yamaha YM2610 Stereo
Game Boy Adv. Custom 2D Core Stereo
Nintendo DS 2D/3D Graphics Engine Stereo
Nintendo 3DS PICA200 GPU Stereo
Wii ATI Hollywood GPU Stereo / DPL II
PSP Sony CXD2962GG + Media Stereo
Switch NVIDIA Tegra X1 Stereo / DPL IIx

Key Observations:

The SNES had 8-channel PCM audio at 32 kHz. Output went from mono to stereo in the 16-bit generation, and the Wii and Switch support Dolby Pro Logic surround encoding.

Special Graphics Features

Hardware Effects by Console

Game Boy / Game Boy Color:

  • No special graphics modes beyond basic tile and sprite rendering

NES:

  • Attribute Tables (Limited Tile Coloring)
  • CHR-ROM for Tile-Based Graphics

SNES:

  • Mode 7: Affine transformations for scaling and rotation, enabling pseudo-3D effects (used in games like F-Zero and Super Mario Kart)
  • Windowing Effects: Variable transparency regions
  • HDMA (Horizontal Direct Memory Access): Per-scanline effects
  • Color Math: Hardware addition/subtraction for transparency and lighting effects

PC Engine:

  • No special graphics modes beyond standard tile/sprite capabilities

Neo Geo:

  • Hardware Scaling for sprites
  • Line Scroll: Independent line offsets for parallax effects
  • Raster Effects: Per-scanline modifications

Game Boy Advance:

  • Affine Transformation: Mode 7-like scaling and rotation
  • Mosaic Effect: Hardware pixelation for special effects
  • Alpha Blending: Multi-layer transparency
  • Object Priority: Hardware Z-ordering for sprites and backgrounds

Nintendo DS:

  • 3D Rendering: Hardware-accelerated 3D graphics engine
  • Extended Affine Transformations: Advanced 2D rotation and scaling
  • Fog Effects: Depth-based atmospheric effects
  • Multiple Background Layers: Up to 4 background layers with independent scrolling

Nintendo 3DS:

  • Stereoscopic 3D: Glasses-free autostereoscopic 3D display
  • Advanced Shader Support: Programmable vertex and fragment shaders
  • GPU-Accelerated Rendering: PICA200 graphics processor

Wii:

  • GPU Effects: Programmable shaders, bloom, motion blur
  • Texture Mapping: Advanced texture filtering and mipmapping
  • Bump Mapping: Per-pixel lighting simulation
  • Hardware Anti-Aliasing: Multi-sample anti-aliasing (MSAA)

PSP:

  • Hardware Transform & Lighting (T&L): Vertex processing on GPU
  • Texture Compression: Efficient VRAM usage
  • Advanced Alpha Blending: Complex transparency effects

Switch:

  • Advanced Shaders: Physically-Based Rendering (PBR)
  • Hardware-Accelerated Global Illumination: Realistic lighting
  • HDR (High Dynamic Range): Expanded color and brightness range
  • Post-Processing Effects: Depth of field, screen-space ambient occlusion (SSAO), temporal anti-aliasing

Key Observations:

SNES Mode 7 gave 2D hardware pseudo-3D effects. The move from fixed-function 2D hardware to 3D GPUs came around the Nintendo DS/PSP generation, and the Switch supports physically-based rendering and post-processing comparable to a gaming PC.

Conclusion

From the Game Boy's 4.19 MHz processor and 8 KB of RAM to the Switch's 1+ GHz quad-core CPU and 4 GB of RAM, each generation gained roughly an order of magnitude. For homebrew developers, the per-system limits (sprite counts, scanline restrictions, memory budgets) decide what is feasible and shape how the code is written, from a Game Boy game with 40 sprites and 4 shades to a Switch title with advanced shaders.

posted at 10:00  · 7 min read  ·   ·  hardware  retro  console  comparison  technical  article