C++ and the DOS toolchain
The game is a 16-bit real-mode DOS program, compiled with Borland C++ 3.1 for the 8086/8088 instruction set. A Docker environment runs the compiler through DOSBox and provides repeatable builds and headless tests.
The architecture separates VGA drawing, puzzle data, game control, menus and sound. The browser runs the same executable distributed in the DOS archive.
Browse the C++ source ↗
Planar VGA graphics
Standard VGA mode 12h provides 640 × 480 pixels and 16 colors. Pixels live in four bit planes. The graphics class writes directly to VGA memory and programs the palette through the DAC.
Bitmap fonts, compact clue digits and masked drawing routines keep the display readable. Selector movement redraws the affected borders; entering a digit redraws its cell. These choices reduce video-memory work on slower processors.
Read the VGA implementation ↗
Packed assets and puzzles
Graphics are stored in KAKURO.DAT, puzzles in PUZZLES.DAT, and audio in SOUND.DAT. The DOS distribution contains these packs alongside the executable.
The indexed puzzle archive encodes cells in five bits and uses byte run-length encoding when it saves space. Graphics also use run-length encoding. Python tools generate the packs from the editable source assets.
Read the puzzle packer ↗
Sound and browser emulation
The DOS sound class supports AdLib, Sound Blaster FM and MPU-401 General MIDI. MPU-401 playback needs a connected General MIDI synthesizer.
This website uses a self-hosted js-dos / DOSBox WebAssembly runtime to emulate the CPU, VGA and FM sound. Browser audio supports AdLib and Sound Blaster FM. Emulator downloads are pinned and checksummed when the site is built.
Read the website builder ↗