OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
Examples

All 41 OpenSNES example programs with annotated source code. More...

Files

file  main.c
 Hot-swapping APU programs at runtime — apuReset() in action.
file  main.c
 Family 8 (Audio) · rung 8.9 — echo / reverb from the S-DSP.
file  main.c
 Hardware vibrato — one voice's output modulates another's pitch.
file  main.c
 Drum loop from the DSP noise generator — no samples at all.
file  main.c
 Tracker music playback with transport controls via SNESMOD.
file  main.c
 Large soundbank music playback (>32KB, multi-bank LoROM).
file  main.c
 Sound effect playback with pitch control via SNESMOD.
file  main.c
 Soundboard — the audio v2 engine driven entirely from C.
file  main.c
 Speech synthesis — the SNES says "OPEN SNES".
file  main.c
 Mode 0 parallax scrolling with four independent 2bpp backgrounds.
file  main.c
 Static 16-color background display in Mode 1 (4bpp).
file  main.c
 Mode 1 BG3 high-priority overlay for HUD-style layering.
file  main.c
 LZ77-compressed tile loading with LZSS decompression to VRAM.
file  main.c
 Backgrounds — Mode 2 offset-per-tile: per-column scroll from BG3.
file  main.c
 Mode 3 full-color (256-color, 8bpp) background with assembly DMA loader.
file  main.c
 Mode 5 hi-resolution background display.
file  main.c
 Hi-res text — BG Mode 5 + interlace (512 horizontal pixels).
file  main.c
 Aim, distance, and angle showcase for <snes/math.h>.
file  main.c
 AABB and tile-based collision detection with visual feedback.
file  main.c
 16.16 fixed-point orbit demo (B5 capstone)
file  main.c
 Game skeleton — the smallest complete game: title -> play -> over.
file  main.c
 Game math & UI, rung — panel HUD: a status box that survives a dialog.
file  main.c
 Random number generation demo.
file  main.c
 Scene stack demo — title → counter → pause overlay.
file  main.c
 VBlank frame counter display, written against the gameloop framework.
file  main.c
 DSP-1 pseudo-3D: a cube tumbling in 3D, rotated by the coprocessor.
file  main.c
 SA-1 boot diagnostic (Phase 1).
file  main.c
 SA-1 Murmuration Demo — 128 dots in Lissajous sine patterns.
file  main.c
 SuperFX 3D — auto-rotating wireframe cube (2-axis rotation).
file  main.c
 SuperFX (GSU) Hello World — boot diagnostic.
file  main.c
 Direct color — the pixel byte IS the color (CGWSEL bit 0).
file  main.c
 "9-bit" gradient — brightness-dithered backdrop, two HDMA channels
file  main.c
 HiColor — 1792 colors on screen from a 4bpp background.
file  main.c
 "3840 colors" — RGB channel-split blend across two backgrounds
file  main.c
 Colour, rung 6b — palette cycling: animate without touching a pixel.
file  main.c
 Colour, rung 6c.2 — shadow & tint: recolour a whole scene at once.
file  main.c
 Color addition transparency between two background layers.
file  main.c
 Fundamentals — how a glyph is drawn: hand-coded 2bpp font tiles.
file  main.c
 Breakout game with brick collision, paddle physics, and level cycling.
file  main.c
 Side-scrolling platformer with scroll streaming and SNESMOD audio.
file  main.c
 Scrolling platformer with object engine and enemy AI.
file  main.c
 Mode 7 flying — a Pilotwings-style demo (#4, part 2).
file  main.c
 Mode 7 racing — an F-Zero-style mini game (#4, part 1).
file  main.c
 RPG template (#7) — Tiled-driven overworld with dialog boxes.
file  main.c
 shmup_1942 — S5: bullets, collision and enemy destruction
file  main.c
 Tetris with 3-layer BG architecture, DAS input, and SNESMOD audio.
file  main.c
 HDMA-driven per-scanline backdrop color gradient.
file  main.c
 Interactive showcase of all four HDMA library helper effects.
file  main.c
 Indirect HDMA — 32-band backdrop gradient from a pointer table.
file  main.c
 HDMA-driven sinusoidal wave distortion on background.
file  main.c
 Raw HDMA table in C — per-scanline wave, krom-style.
file  main.c
 Single controller input display.
file  main.c
 SNES mouse input with cursor sprite, buttons, and sensitivity.
file  main.c
 Family 4 (Input) · rung 4.2 — drive a sprite with the pad.
file  main.c
 SNES Super Scope light gun detection, calibration, and firing.
file  main.c
 Two-player simultaneous input with independent sprites.
file  main.c
 Tilemap-based sprite engine with 32x32 and 64x64 map modes.
file  main.c
 Scrolling map with animated sprite character.
file  main.c
 Platformer with diagonal slope collision detection.
file  main.c
 Tiled map editor integration with the map scrolling engine.
file  main.c
 HiROM memory mapping mode with 64KB bank access.
file  main.c
 SRAM battery-backed save with multiple save slots.
file  main.c
 Mode 7 perspective with HDMA split-screen (F-Zero style).
file  main.c
 Rotating Mode 7 perspective — full matrix driven by 4 HDMA channels.
file  main.c
 Mode 7 rotation and scaling demo.
file  main.c
 Two-layer parallax scrolling with player sprite.
file  main.c
 Mixed scrolling with fixed and auto-scrolling background layers.
file  main.c
 HDMA-driven parallax scrolling with three speed zones.
file  main.c
 Direction-based sprite animation with horizontal flip.
file  main.c
 Dynamic metasprite engine demo — multi-tile characters with VRAM streaming.
file  main.c
 Dynamic sprite engine with per-frame VRAM tile streaming.
file  main.c
 Metasprite composition with switchable OBJ size modes.
file  main.c
 Display a single static 32x32 sprite.
file  main.c
 Interactive demo of all six SNES OBJ size modes.
file  main.c
 Sprites showcase — a bouncing swarm, and the OAM throughput ceiling.
file  main.c
 Family 1 (Text) · rung 1.1 — print a string with the built-in font.
file  main.c
 Family 1 (Text) · rung 1.4 — move a message across the screen.
file  main.c
 Screen fade in/out using INIDISP brightness control.
file  main.c
 Mosaic and fade screen transition effects.
file  main.c
 Semi-transparent darkened rectangle via HDMA windows and color math.
file  main.c
 HDMA-driven triangle window masking on selectable BG layers.
file  main.c
 Multi-window HDMA — both windows' edges driven per scanline.

Detailed Description

All 41 OpenSNES example programs with annotated source code.

Each example demonstrates specific SNES hardware concepts. The source files include @par SNES Concepts (what hardware features are used), @par What to Observe (what to look for in the emulator), and @par Modules Used (which library modules to link).

Browse by category: Browse Examples by Category

By Topic

Getting Started

Backgrounds

Sprites

Effects

Input

Audio

  • Music — Tracker playback via SPC700
  • Sound Effects — Standalone SFX with pitch control

Maps

Memory

  • HiROM — 64KB bank memory mapping
  • Save Game — SRAM battery-backed save slots

Games

  • Breakout — Complete game with collision and palette cycling
  • LikeMario — Platformer with scroll streaming and physics
  • Map & Objects — Map engine with enemy AI
  • Tetris — State machine, DAS input, HDMA effects

Basics