OVERLAPPING WINDOWS
Drag, resize, minimize, maximize and shade (roll-up). Double-click a title bar to maximize, right where your muscle memory expects it. Cascade (F5) and tile (F6) included.
Castalia 92 is the Windows 95 every 386 owner dreamed of in 1992: a complete graphical desktop — overlapping windows, a taskbar and Start button, a Recycle Bin, thirty-plus built-in programs, fourteen games, eighteen color themes and a demoscene screensaver — that boots from DOS on a 386SX with VGA. It asks for 1 MB of RAM and is designed for 4. It is free, MIT-licensed, and written in period-correct C89.
Castalia 92 is a Windows 95-style graphical desktop for DOS: overlapping windows, a taskbar with a Start button, a Recycle Bin, eighteen themes and thirty-plus programs and games, in a single .EXE written in C89 that boots from DOS on a 386SX with 1 MB of RAM.
The constraint is the point. Castalia 92 targets a real-mode 386SX with VGA and 4 MB of RAM — the 1 MB minimum is checked at start-up and reported politely at the DOS prompt — and it is built almost entirely with the tools and rules of that era: no DOS extender, no protected mode, no floating point, no external libraries. If a 1992 machine cannot run it, it does not ship.
“Everyone who owned a 386 remembers the day Windows 95 arrived and their machine could not run it,” said Dave Abellán, creator of Castalia 92. “Castalia 92 is for that machine. It is the desktop 1992 deserved: the whole Windows 95 feeling — the taskbar, the themes, the little startup chime.”
The trick is VGA Mode 13h (320×200, 256 colors): a full off-screen back buffer composited in system memory and presented with partial blits — the compositor tracks damage, so a click repaints a window, not the screen. Title bars sweep a reserved 32-entry DAC gradient ramp, the iconic navy-to-sky bloom. Staying in memory has a price, and the project measured it on a real 386SX/16: with the desktop up, 14 KB of conventional memory was left. Since October, before it launches a DOS program the shell hands its buffers back — about 200 KB in Mode 13h with a wallpaper — and rebuilds them on return; for a big game, started through CASTSHEL from a shortcut marked freemem=true, it unloads entirely.
The Windows 95 your 386 was promised and never got — three years early, in a single .EXE.
Drag, resize, minimize, maximize and shade (roll-up). Double-click a title bar to maximize, right where your muscle memory expects it. Cascade (F5) and tile (F6) included.
A taskbar with one button per window, a tray speaker icon, a live clock and the Start button (yes, “Inicio”: the studio is Spanish, and so is the castle on the crest). A cascading Start menu with flyouts and per-item icons.
The media player: WAV as real digital audio on a Sound Blaster, a Covox Speech Thing or a Disney Sound Source on the printer port (or PWM tricks on the bare PC speaker), plus polyphonic MIDI with General-MIDI voices on an AdLib/OPL2 FM chip. LCD strip, spectrum analyzer with peak caps, playlists.
A live animated dashboard: a hardware readout with status LEDs, an oscilloscope, an LED clock, charging memory/disk gauges and a BIOS equipment strip. Total RAM comes from CMOS and the FPU is actually probed, not read off the BIOS.
A six-test suite (integer, memory, video kernels) indexed against a 386SX/16 — using the counts a real one returned, not DOSBox's — with a composite CASTALIA SCORE and a machine-class verdict, drawn as animated bars.
Eighteen complete schemes restyling every pixel of chrome — classic, moncloa, matrix, redmond, hotdog, sunset, sakura, dos… — live-previewed in Settings and cross-faded via a DAC ramp when applied.
Minesweeper, klondike with a winning cascade, Reversi, snake, breakout, falling blocks, ten-floor sokoban, sound memory, Lights Out, fifteen, tic-tac-toe, Pong, 2048 and Corral, the build-a-fence, trap-the-balls puzzle. All with sound effects and persistent high scores.
Start with CASTSHEL instead of CASTALIA, mark a shortcut freemem=true, and Castalia unloads itself completely to give a big DOS game all of conventional memory, then returns when the game exits.
Delete in the Disk Cabinet moves a file into its drive's hidden RECYCLED folder — the one Windows 95 used — and records where it came from. The Recycle Bin gathers every drive's bin and restores (recreating missing folders), deletes for good, or empties. Floppies, network drives and Shift+Del delete outright.
Context menus in the Disk Cabinet: Open, Rename, Delete, Properties. File Properties with live Read-only, Hidden, Archive and System boxes; Drive Properties with label, type and the tilted pie chart; and Date/Time, a calendar and a ticking clock that set DOS's own, one double-click away on the tray clock.
The Shut Down dialog offers shut down, restart — flushing the DOS and SMARTDRV caches, then a warm boot — or return to MS-DOS. First it asks about unsaved work, including Settings applied live that have not reached the INI yet.
Since 0.55 the whole shell works from the keyboard: F7, F3 and F2 for new, load and save in the editors, Space to tag files in the Disk Cabinet, type-ahead, and a shared file picker that climbs up to the drive list so you can save to a floppy.

VGA 320×200×256 with a full back buffer in system memory, presented with partial blits: the compositor tracks damage and clips every primitive to the region it is about to send, so a taskbar clock tick changes exactly 72 pixels (measured under DOSBox). Mode 12h (640×480×16) fully supported with planar drawing.
The scene is cached: uncovering a window restores pixels from cache instead of recomputing the wallpaper. Cross-fades (themes, screensaver, shutdown) are DAC ramps — free at 320×200.
Everything animated is fixed-point integer arithmetic on one shared 256-entry sine table. The voxel uses a per-column y-buffer; the corridor is a DDA raycaster with a 16×16 bit-packed map (the whole level costs 32 bytes).
Real mode gives one 64 KB near-data segment (DGROUP) and it fills fast; CI reads the linker map and fails the build past 56 KB. Large tables — sine LUTs, textures, the MIDI buffer — live in far memory by design, and the ones only a single window uses (the screensaver, the benchmark, the file search) are borrowed from DOS when it opens and handed back when it closes.
CI boots the compiled .EXE in DOSBox over Xvfb and captures the screen with ImageMagick: the images come from the same build that ships, not from a reimplementation.
GitHub Actions builds the real 16-bit binaries with Open Watcom 2.0 (pinned to one snapshot, medium model, warnings fatal) on every push, and checks DGROUP stays under 56 KB.
Twelve cases drive the real shell and assert on what is left on the disk — saving, tagging, the Recycle Bin, a full disk — one of them at cycles=1100, about a 386SX/16. The GIF, ICO and INI parsers are also fed hostile files under ASan and UBSan.
A lint enforces the house C89 style and another script keeps the Makefile, BUILD.BAT and linker script in lock-step. On every merge CI commits the fresh binary back into release/, so the download never lags the source.
Pure C89 across 67 modules, without a single vendored external library. Source included; redistribute it with your coverage, cover-mount CDs included.
Not one external library. No extender, no protected mode, no floating point. Just C89 and direct VGA.
If a 1992 machine cannot run it, it does not ship. The constraint is the point, not an obstacle.
Tombatossals Softworks LLC. Small, frequent releases on the way to 1.0.
It is a graphical operating environment: a desktop shell that runs on top of DOS. It does not replace DOS; it puts windows, a taskbar, themes and thirty-plus programs on top, and steps aside when you launch a game that needs the memory.
Devlogs, patches and launches, straight to your inbox. Zero spam, zero analytics, no automated list: to unsubscribe, just hit reply.