No install, no BIOS files, no flashcart. The original 2011 ROM running on DeSmuME compiled to WebAssembly.
A Nintendo DS homebrew game of bataille navale, written in C++ with PAlib and Maxmod over three weeks in August and September 2011.
It was my first game, and my first real program.
The ROM (BattleShipsDS.nds) is the v0.8 build from 16 September 2011, 20:48. It runs on real hardware via a flashcart, or in an emulator such as melonDS or DeSmuME.
Standard French Battleship rules: five ships, seventeen cells total.
| Ship | Length |
|---|---|
| Torpilleur | 2 |
| Sous-marin | 3 |
| Contre-torpilleur | 3 |
| Croiseur | 4 |
| Porte-avions | 5 |
Place your fleet with the d-pad on the top screen, then fire at the enemy grid with the stylus on the bottom screen. First to sink all seventeen cells wins.
Controls: A place ship · L/R rotate · B undo last placement (experimental, and it means it) · Start quit to menu · stylus to fire.
Historical interest only. This needs devkitARM plus PAlib, which was discontinued around 2011 and is long gone from modern toolchains. gfx/bin/ holds the graphics data already converted by PAGfx (a Windows tool that shipped with PAlib), so those don't need regenerating, which is fortunate, because regenerating them is no longer straightforward.
build.bat # compile (Windows, devkitPro environment)
clean.bat # clean
source/ main, App, SplashScreen, Menu, Game (972 lines of C++)
include/ matching headers
gfx/ source PNGs, PAGfx config, converted binaries
audio/ 4 tracker modules + 8 WAV effects
Kept as-is rather than fixed. The point of this repo is the artifact, not the software.
- Undo (
B) clears one grid cell too many when undoing the contre-torpilleur or the croiseur. It sizes the clear from the ship in hand rather than the ship being removed, so it can erase a cell belonging to an already-placed ship while that ship's sprite stays on screen. Your board then has 16 hittable cells instead of 17, and since defeat requires 17 enemy hits, you become unloseable. The same code can index past the end of a[10][10]array. - Undoing the porte-avions leaves half its sprite stranded on screen. The guard uses
nbrBoatPlayer == 5, unreachable inside awhile (nbrBoatPlayer < 5)loop. - Undo doesn't restore the previous ship's orientation, so the sprite can render vertical while the logic treats it as horizontal.
- The Controls screen says "Press X to rotate". The code reads
L/R. - Releasing the stylus on empty space in the menu starts the game.
- The Manual page reads, in full: "Not avaible for the moment / I'm to lazy to write it immediately ;)"
Also loose is spelled that way everywhere: in the code, in the asset filenames, and on the defeat screen, which reads "Looser...".
There was never a git repo in 2011; I wrote this in vim on a Compaq Evo D510 and kept it in a folder. The commits here were reconstructed in 2026 from the original file modification times, which survived intact. The dates and the order of work are real. The commits are not.
Code and artwork are mine, except the battleship on the title screen and the Tux on the splash screen. Music comes from The Mod Archive and sound effects from FindSound, as credited in-game; they are not mine to license. gfx/PAGfx.exe shipped with PAlib.

