Tinyjoypad_SDL

A Port of the attiny85, Tinyjoypad games to SDL2/3 and Playdate


Project maintained by joyrider3774 Hosted on GitHub Pages — Theme by mattgraham

TinyJoypad → SDL

A native SDL3 port bringing 33 games, originally written for the TinyJoypad ATtiny85 + SSD1306 128x64 OLED handheld, behind one shared game-select menu, running as a plain desktop executable - no emulator required.

Two more ports also live in this same repo, alongside the primary SDL3 port in src/sdl3/, all three sharing one src/gameworld/ codebase (all 33 games, the menu, the shims):

See CLAUDE.md’s “Directory layout / multi-port structure” section for the full writeup on how this multi-port layout works, and for what a future fourth port would need to add.

The game logic itself is already-ported, already-bug-fixed C, carried over by converting only the small amount of nonstandard Vircon32 C-dialect syntax it depended on back into standard C (array declaration order, int[]-as-string → char*, bare struct Tagtypedef struct) - the actual game code, and the whole bug-fix history behind it, is unchanged. Every per-game bug already found and fixed there (the byte-truncation/ shift-wraparound/signed-sentinel/RNG-range/logical-shift family of dialect bugs, plus dozens of genuine game-logic bugs found via real play) applies here too, since it’s the same C.

The platform layer itself - window/input/audio/rendering, the menu, the CLI, and the presentation effects below - is new, built directly against SDL3, reusing infrastructure and technique from the same author’s crisp-game-lib-portable-sdl project (cglpSDL3.c) where it fit: the CInput abstraction, the audio oscillator shape, and the glow/CRT/pixel- grid presentation effects (rebuilt around GPU textures rather than ported verbatim - see CLAUDE.md for why).

This port was built with the help of Claude AI (Anthropic) - the platform layer, the dialect conversion, every bug found during the port, and the optimization/verification passes documented in CLAUDE.md/ OPTIMIZATIONS.md were all done through an AI-assisted development workflow.

Building

Requires CMake and a C compiler (developed against MinGW-w64/GCC on Windows; nothing in the source is Windows-specific beyond the -mwindows linker flag, which only suppresses the console window and is skipped on non-Windows).

This repo has no top-level CMakeLists.txt - each port under src/ (src/sdl3/ and src/sdl2/) is its own standalone CMake project, built from inside its own directory:

cd src/sdl3          # or: cd src/sdl2
cmake -B build -G Ninja -DUSE_VENDORED_SDL=1
cmake --build build

Running

Identical CLI/behavior on both ports - examples below use the SDL3 binary, substitute TinyjoypadSDL2 (from src/sdl2/build/) for the SDL2 one.

./TinyjoypadSDL3           # opens the menu
./TinyjoypadSDL3 -g "TINY INVADERS"   # launches a game directly by title
./TinyjoypadSDL3 -list     # prints every game's title, then exits
./TinyjoypadSDL3 -help     # full command-line reference

See -help for the complete flag list (window size/fullscreen, -ns to skip audio, -fps for a live FPS overlay, -nd to uncap the framerate, -s to force software rendering instead of the default GPU-accelerated one, -ms to batch-capture a gameplay screenshot of every game, -joy to write a .joy stub file per game for external frontends, and a .joy file itself as a positional argument to launch straight into that game).

Controls

Action Keyboard Gamepad
Move / navigate menu Arrow keys D-pad or left stick
Fire / confirm / A X South button (A on Xbox)
Fire2 / B (only Tiny Minez - instant flag toggle) C East button (B on Xbox)
Start / pause / quit-confirmation dialog Escape Start or Back
Cycle glow / CRT scanlines / pixel-grid effect G West button (X on Xbox)
Toggle fullscreen F3 -
Volume down / up PageDown / PageUp Left/Right shoulder
Mute / unmute sound S North button (Y on Xbox)

The quit-confirmation dialog (Start, mid-game) freezes the current game and asks YES/NO before returning to the menu - unless the game was launched directly (-g <NAME> or a .joy file), in which case there’s no menu to return to, so Start quits the app immediately instead, with no dialog. The glow/CRT/pixel-grid cycle is a single button stepping through 5 combinations (none → pixel-grid+glow → pixel-grid → CRT scanlines → glow alone → back to none) and only has any visible effect during actual gameplay, not on the menu screen. Fullscreen/volume/ mute work everywhere (menu and in-game) and are logged to the console on every change, since there’s no on-screen indicator for them; -f/-ns on the command line still cover fullscreen/no-sound at launch time.

Games

Game (in-cartridge title) Original Author License Source
NumberPlace Obono MIT TinyJoypadWorks
2048 Obono MIT TinyJoypadWorks
HollowSeeker Obono MIT TinyJoypadWorks
Tiny Invaders Daniel C / Sven B GPLv3 Tiny-invaders-v4.2
Tiny Minez Sven B / Lorandil GPLv3 TinyMinez
Tiny Dungeon Sven B / Lorandil MIT TinyDungeon
Tiny Lander Roger Buehler (tscha70) GPLv3 TinyLanderV1.0
Tiny Pinball Daniel C GPLv3 tinyjoypad.com
Tiny Pacman Daniel C GPLv3 tinyjoypad.com
Tiny Bomber Daniel C GPLv3 tinyjoypad.com
Tiny Doc Daniel C GPLv3 tinyjoypad.com
Tiny Bert Daniel C GPLv3 tinyjoypad.com
Tiny Tris Daniel C GPLv3 tinyjoypad.com
Tiny Arkanoid Daniel Champagne GPLv3 tinyjoypad.com
Tiny Trick Daniel C GPLv3 tinyjoypad.com
Tiny Missile Daniel C GPLv3 tinyjoypad.com
Tiny Bike Daniel C GPLv3 tinyjoypad.com
Tiny Arena Daniel C GPLv3 tinyjoypad.com
Tiny Gilbert Daniel C GPLv3 tinyjoypad.com
Tiny Pipe Daniel C GPLv3 tinyjoypad.com
Tiny Morpion Daniel C GPLv3 tinyjoypad.com
Tiny Plaque Daniel C GPLv3 tinyjoypad.com
Tiny SQuest Daniel C GPLv3 tinyjoypad.com
Tiny DDug Daniel C GPLv3 tinyjoypad.com
Wren Rollercoaster Andy Jackson Non-commercial, with attribution Attiny-Arduino-Games
Frogger Andy Jackson (art: @senkunmusashi) Non-commercial, with attribution Attiny-Arduino-Games
Bat Bonanza Andy Jackson Non-commercial, with attribution Attiny-Arduino-Games
Stacker Andy Jackson Non-commercial, with attribution Attiny-Arduino-Games
UFO Ilya Titov Non-commercial, with attribution AttinyArcade
Oroboros Ilya Titov Non-commercial, with attribution AttinyArcade
Run Dude Run Ilya Titov Non-commercial, with attribution AttinyArcade
Four in a Row Unknown None specified tiny-handheld
Dino Game tiny-handheld project (original) None specified tiny-handheld

Credits

License

This project is GPLv3 (LICENSE.txt), for the same reason: at least one ported game (Tiny Invaders v4.2) is itself GPLv3, and combining GPLv3 code into one executable makes the whole executable a GPLv3 combined work. This covers this project’s own new code (both the SDL3 and SDL2 platform layers, the shared menu, the presentation effects) - each individual game’s own original license/attribution is preserved unmodified in its own header comment in src/gameworld/games/.

See also