Loading…
TS-SYS-04 // FREEDOS · DOS/4GW · WIN9X/XP

CastaliaOS 98 PE

CastaliaOS 98 PE (“Powerful Edition”) is an original desktop inspired by late-90s computing — beveled buttons, glossy title bars, a Start menu, an Explorer with a friendly blue task pane — written from scratch in portable C89. It boots on FreeDOS as a 32-bit flat protected-mode program hosted by DOS/4GW. No Microsoft code, artwork, or branding anywhere in it.

← BACK TO SYSTEMS
The 90s desktop. Zero Microsoft code.
PUBLIC PREVIEW · v0.1.0-preview1FreeDOS · DOS/4GWVS Windows 98 SE
69,694LINES OF C
147.C FILES
7,609TESTS
20+APPS
FREE · OPEN SOURCE (MIT)DOWNLOAD v0.1.0-preview1 (opens in a new tab)SOURCE ON GITHUB (opens in a new tab)SPEC SHEETcastalia-98-pe-v0.1.0-preview1.zip · 2026-08-19 · PRE-RELEASE
SONYTRINITRON
DESKTOPComposited desktop, taskbar and pager
SWITCH CHANNELS TO SEE MORE

Key facts: CastaliaOS 98 PE

CastaliaOS 98 PE is an original Windows 98/XP-inspired desktop for FreeDOS, written from scratch in C89: a 32-bit protected-mode program (DOS/4GW) with a Start menu, a file explorer, twenty-seven applications and four virtual desktops, and not one line of Microsoft code.

What it is
Windows 98-style graphical desktop for FreeDOS
Platform
FreeDOS · DOS/4GW
Requirements
FreeDOS + DOS/4GW · VESA/VBE video (800×600 or 640×480) · 8 MB memory budget · mouse
Status
PUBLIC PREVIEW · v0.1.0-preview1
Latest release
v0.1.0-preview1 · pre-release
Released
2026-08-19
Price
Free
01 // WHAT IT IS

The system, no marketing

DESKTOP · 32-BIT

The desktops of the late 90s had a particular magic: instant, tactile, legible. Beveled buttons you could almost press. A Start menu. A file explorer with a friendly blue task pane. You always knew where you were. CastaliaOS began as a simple question — could you build that feeling from scratch, legally clean, inside a period machine’s budget? — and today it is 69,694 lines of C.

Rather than mod an existing OS or theme a modern one, CastaliaOS is written from the platform layer up in portable C89. A strict rule shaped everything: nothing above the platform layer may touch the hardware. That single constraint makes it portable — the same stack compiles under gcc and clang against a headless backend — and disciplined: every subsystem has a clean _init / _shutdown pair and is tested in isolation. 7,609 unit checks, in 58 suites, run on modern Linux, with no DOS and no emulator, in under a second.

The entire UI composites into one 32-bit XRGB back buffer in system RAM; only the present() step converts the dirty rectangles down to the real hardware depth — a 3-3-2 palette at 8bpp or RGB565 at 16bpp. The result: glossy chrome, drop shadows and animations that still fit inside the budget of a Pentium II with 4 MB of VRAM. At idle the desktop takes 3.7 MB, under half of its 8 MB budget.

Every pixel, every window, written by hand — and when something does not exist yet, the system itself opens a window to tell you.
02 // WHAT IT DOES

What you can do with it

9 CAPABILITIES
/01

START MENU, AND ALL OF IT BY KEYBOARD

A two-column Start panel — Programs; Places and System — with a glossy header and a Log Off / Shut Down footer. Esc or Ctrl+Esc opens it, and the arrows move within and between columns. The rest too: Alt+Tab in most-recently-used order, Alt+F4, and a window menu on Alt+Space that moves and resizes with the arrow keys. No mouse required if you do not want one.

/02

FOUR VIRTUAL DESKTOPS

Switch instantly with Ctrl+Left/Right; windows keep their state and geometry, a 1-2-3-4 pager lives in the taskbar, and the window menu sends a window to whichever desktop you name. Plus edge snapping with a live preview outline — something Windows 98 SE never had.

/03

XP-STYLE FILE MANAGER

A navigable address bar, a blue task pane (File and Folder Tasks / Other Places / Details), Details, Tiles and Icons views with live thumbnails, two panes with drag-and-drop between them, and file associations: a .BMP opens Paint, a .CSV the spreadsheet, a .WAV the player. Find walks down through subdirectories, matches a name or the text inside a file, and tells you which line. The Recycle Bin puts every file back in the folder it came from.

/04

MORE THAN TWENTY APPLICATIONS, ALL REAL

File Manager, Notepad, CastaliaWrite (word processor), CastaliaSheet (spreadsheet with formulas), Paint, Calculator, Media Player, Clock, Calendar & Agenda, Character Map, Console, Benchmark Suite, Task Manager, Disk Usage, File Compare, Network, Theme Editor, Viewer, Log Viewer, Control Center, System Information, Help and four games: Mines, Solitaire, FreeCell and Reversi. Each one opens a window with working code behind it, not a mockup.

/05

WHEN SOMETHING DOES NOT EXIST, IT SAYS SO

The system ships app_planned_open(): an entry that is not implemented yet opens a window telling you which phase it is scheduled for. Today no Start menu entry needs it — every one opens a real application — but the rule stays: we would rather show an honest notice than a fake feature, and that rule governs this page too.

/06

FIVE THEMES AND AN EDITOR

Castalia Classic, Storm Gray, Forest Green, High Contrast and Aurora (XP), a glossy blue built from a 100% original palette, each recoloring the whole environment live. The Theme Editor reaches every color the shell draws with, with an RGB mixer and a live miniature of the desktop, and saves the result as a plain-text INI. The 16- and 256-color modes are one INI line away.

/07

.CAPP ADD-ONS

Packages with CRC-32 and a defensive validator, discovered at boot and executed behind a versioned ABI (CappHostApi). They appear in the Start menu like any other program. The release ships two sample add-ons you can read: HELLO and CLOCK.

/08

CRASH BOUNDARY + SAFE MODE

A fatal error writes a crash record and leaves a boot-dirty flag; if boot fails twice, CBOOT starts a high-contrast Safe Mode. Settings live in a plain-text CASTALIA.INI you can repair from DOS with any editor, and if it is deleted or corrupted, the next boot restores the last good copy.

/09

AN INSTALLER THAT KEEPS YOUR SETTINGS

INSTALL.EXE installs and uninstalls: it backs up CONFIG.SYS and AUTOEXEC.BAT and adds a boot entry that never doubles up. In the source it can now repair and upgrade as well, and no mode overwrites CASTALIA.INI, saved themes or your documents. Those two modes landed after preview1: the published ZIP does not carry them yet.

03 // HOST-BUILD SCREENSHOTS · 800×600

More than twenty applications, four desktops, zero Microsoft

100% original artwork and UI · composited by the in-house software renderer
04 // ARCHITECTURE

How it's built inside

INTERNALS
01

SIX-LAYER ARCHITECTURE

Platform → System → Graphics → Window Manager → UI Toolkit → Shell → Apps. Only the platform layer touches the machine (VESA/VBE, mouse via INT 33h, keyboard via INT 16h), and it does so behind a single header — plat.h — with two interchangeable implementations: the DOS backend and a headless host.

02

IN-HOUSE SOFTWARE RENDERER

Clipped primitives, Win9x bevels, gradients, drop shadows, color-keyed blitting, a BMP codec and bitmap fonts. Composites into a 32-bit XRGB back buffer and presents dirty rectangles at 3-3-2 (8bpp) or RGB565 (16bpp), with no dithering and no per-pixel alpha anywhere in the system.

03

WINDOW MANAGER & TOOLKIT

A fixed pool of top-level windows, z-order, focus, non-client frames, four virtual desktops and snapping. The toolkit: buttons, checkboxes, radios, list boxes, menus, a text edit control, modal dialogs and an Open / Save As dialog every app shares, all hand-written.

04

.CAPP EXTENSIBILITY

Add-ons packaged with CRC-32 and discovered at boot; valid ones are indexed and appear in the launcher. Their code runs behind a versioned ABI (CappHostApi) without touching the shell or the hardware.

// QUALITY & VERIFICATION

7,609 checks green, and a clear line between proven and promised

Honest engineering: nothing above the platform touches the hardware, so the same stack unit-tests on a modern host before it ships to DOS. The repository consistently separates what is proven on host, what is verified in an emulator, and what has still never touched physical hardware.
01

Strict C89 lint

Every portable source goes through tools/c89_lint.sh with Watcom-style rules, so the DOS build never breaks on a gcc extension.

02

7,609 checks and 74 scenes

58 host suites: strings, regions, INI, color, the installer, the ARP/IPv4/ICMP/UDP stack, the spreadsheet, Paint, and the parsers fed deliberately damaged input. And make demos drives 74 scenes through real windows and checks what they changed. 0 failures.

03

gcc + clang matrix in CI

Every push builds with both compilers, runs the tests, renders the desktop headlessly and uploads the resulting BMP as an artifact. Another job boots the /kernel-lab image under QEMU.

04

DOS build via Open Watcom

A dedicated CI job really compiles with Open Watcom and produces CASTALIA.EXE, CBOOT.EXE and INSTALL.EXE: a 32-bit protected-mode binary hosted by DOS/4GW. The release workflow packs them into the ZIP you download.

SPECIFICATIONS · Full spec sheet
PLATFORM
FreeDOS + DOS/4GW · 32-bit protected mode
DESIGN TARGET
Pentium II ~400 MHz · Intel 440BX · 128 MB
VIDEO
VESA/VBE · 800×600×16 → 640×480×16 → 640×480×8
OUTPUT
8bpp (3-3-2 palette) or 16bpp (RGB565) · no dithering
INPUT
Mouse INT 33h · keyboard INT 16h
MEMORY
3.7 MB at idle · 8 MB budget
AUDIO
Sound Blaster DAC or PC Speaker · optional · on DOS, cues only for now
NETWORK
DOS packet driver · transmit only, for now
VERIFIED ON
Headless host · FreeDOS under QEMU · never on real hardware
CODEBASE
69,694 lines of C across 218 files · C89
DOWNLOAD
1.2 MB ZIP · DOS4GW.EXE included · FreeDOS not
LICENSE
MIT · original code and artwork
// ORIGINAL & CLEAN

Inspired by an era, not copied from a product

Everything in CastaliaOS is original code and artwork: the name, the castle crest, the Aurora theme, the procedural icons and every one of its applications. The only three third-party components in the entire tree are logged with source and license in THIRD_PARTY_NOTICES.md.
CODE & ARTMIT

The whole stack — renderer, window manager, toolkit, shell and apps — is original: 69,694 lines of C, without a single TODO or FIXME left in the code.

MICROSOFT0 bytes

No code, artwork or branding. It is a tribute to the aesthetic, not a copy of a product.

THIRD PARTY3 components

DOS4GW (the extender, redistributed under a license held by Tombatossals Softworks LLC), the Tango icons (Public Domain) and the Spleen font (BSD-2). Both assets are optional: one INI line puts you back on 100% original art.

DEPENDENCIESZero

No third-party runtime dependencies. Settings in a plain-text CASTALIA.INI you can repair from DOS with any editor.

05 // STATUS & ROADMAP

Where it is and where it goes

4 EDITIONS
v0.1.0-preview1TODAY · PUBLIC PREVIEWThe most recent public release, from August 19, 2026: a 1.2 MB ZIP with CASTALIA.EXE, CBOOT.EXE, INSTALL.EXE, the DOS4GW.EXE extender and both icon packs, built by CI with Open Watcom. What has reached the source since — the installer’s repair and upgrade modes — waits for the next one.
Phases 1–3Done, short of the hardwareBoot, windows and explorer, applications and installer: done in the repository backlog except for the first boot on the real machine and a few partial items — the File Manager’s drive selector on DOS, controls that still live inside a single app, DOS program profiles. The DOS track really boots on FreeDOS under QEMU — VESA 800×600×16, INT 21h clock, INT 16h keyboard, INT 33h mouse with CuteMouse.
Phase 4Under way · no real hardware yetPolish and hardware hardening. The polish is nearly all there — a VESA linear framebuffer, 16- and 256-color themes, Sound Blaster, repaint-cost passes. What is still open is what matters most: it has never run on a physical machine, and the period QA matrix — PS/2, VESA modes, IDE, CD, audio — is listed as pending in the repository itself. On DOS, PCM does not play yet either: the Media Player stays silent until DMA streaming lands.
Phase 5Nearly doneThe package ecosystem: the .CAPP format, the versioned ABI, the loader, the SDK headers, the theme editor and the help viewer are done. What is missing is a catalog to discover, install and update add-ons.
Phase 6ResearchNetworking, halfway: ARP, IPv4, ICMP and UDP already work and are tested on host, but on DOS the receive path is missing, and TCP comes after it. The CASTSHL.EXE companion for Win98 SE, not started. And /kernel-lab, at milestone 4 of 8: a two-stage NASM boot that reaches 32-bit protected mode with GDT/IDT, remapped PICs and real IRQ0/IRQ1 under QEMU, deliberately isolated from the product.
// AVAILABILITY
PREVIEW1 (FREE)FREEDOS ZIP · DOS4GW INCLUDEDSAMPLE .CAPP ADD-ONSSOURCE · OPEN SOURCE
06 // QUESTIONS

Reasonable doubts

7 QUESTIONS

Neither, exactly. It is not a skin on a modern OS: it is a complete from-scratch graphics stack — software renderer, window manager, toolkit, shell and twenty-seven applications — in 69,694 lines of C89. But it is not a kernel either: it runs as a 32-bit protected-mode program on FreeDOS, hosted by the DOS/4GW extender. The native kernel does exist, in /kernel-lab, as explicitly separate research.

// PASS IT ON

Know someone who still has the machine?

PLAIN LINKS · NO TRACKERS
  1. 7,609

    UNIT CHECKS

    The same stack unit-tests on a modern host before it ships to DOS: 7,609 checks, all green.
  2. 32 → 8

    BITS PER PIXEL

    The whole interface composes in 32-bit XRGB and is presented at 8 or 16 bits through dirty rectangles, with no dithering.
  3. 69,694

    LINES OF ORIGINAL C

    69,694 lines of original C — renderer, window manager, toolkit, shell and apps — and no Microsoft code, artwork or branding anywhere in it.

GET IT RUNNING

YOU GET castalia-98-pe-v0.1.0-preview1.zip

  1. Download the preview1 ZIP. It is a preview: verified on FreeDOS under QEMU, never yet on real hardware.
  2. Copy the CASTALIA folder to the root of a FreeDOS drive and run C:\CASTALIA\BIN\INSTALL.EXE, or start it without installing through CBOOT.EXE.
  3. DOS4GW.EXE is included; FreeDOS is not, you supply it. It needs VESA at 800×600.
DOWNLOAD v0.1.0-preview1 (opens in a new tab)

README BADGE

Runs on FreeDOS · CastaliaOS 98 PE
[![Runs on FreeDOS · CastaliaOS 98 PE](https://tombasoft.com/badges/castalia98.svg)](https://tombasoft.com/en/software/castalia98/)

A static image on this server: no script, no counter, nothing that tracks. Or download it and host it yourself.

REAL HARDWARE

Running it on real hardware?

Send us a photo: the machine, the setup, the screen. We read all of it.

If it earned one, a star is how other people find a small repository.

// NEXT SYSTEMC-128 WorkSpaceDESKTOP · 8-BIT · VS GEOS 128
TRANSMISSION · BY EMAIL// SUBSCRIBE

Get on the mailing list.

Devlogs, patches and launches, straight to your inbox. Zero spam, zero analytics, no automated list: to unsubscribe, just hit reply.

9DEVLOGS PUBLISHEDSINCE 2026
2LANGUAGESES · EN
0SPAM · TRACKINGEVER

NO TRACKING100%
PRIVACY100%
FREQUENCY2-3/MONTH
// NO AUTOMATED LIST// 0 ANALYTICS// REPLY TO LEAVE// HOSTED IN VIRGINIA