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-preview3FreeDOS · DOS/4GWVS Windows 98 SE
18,462LINES OF C
93.C FILES
457TESTS
10APPS
FREE · OPEN SOURCE (MIT)
SONYTRINITRON
DESKTOPComposited desktop, taskbar and pager
SWITCH CHANNELS TO SEE MORE
01 // WHAT IT IS
The system, no marketing
DESKTOP · FREEDOS

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 turned into 18,462 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. 457 unit checks run on modern Linux, with no DOS and no emulator, in seconds.

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.

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
8 CAPACIDADES
/01

START-STYLE LAUNCHER

A Start menu with a glossy header, icons and full keyboard navigation (Esc / Ctrl+Esc, arrows + Enter). 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, and a 1-2-3-4 pager lives in the taskbar. Plus window snapping and tiling — 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), drag-and-drop with a floating ghost, a two-pane commander mode and a safe delete-to-Trash. The Find button runs a genuinely recursive name search: it walks down through subdirectories and hands back up to 128 matches with their relative paths.

/04

TEN APPLICATIONS, ALL REAL

File Manager, Notepad, Calculator, Log Viewer, Control Center, Task Manager, Paint-lite, Viewer (BMP + hex dump), System Information and Mines. Ten windows that open code, not mockups.

/05

WHEN SOMETHING DOES NOT EXIST, IT SAYS SO

The system ships app_planned_open(): press an entry that is not implemented yet and a window opens telling you which phase it is scheduled for. We would rather show an honest notice than a fake feature — and that rule governs this page too.

/06

FIVE LIVE THEMES

Castalia Classic, Storm Gray, Forest Green, High Contrast and Aurora (XP), a glossy blue built from a 100% original palette. The whole environment recolors live; the 16-color EGA mode is 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). The release folder 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 offers a high-contrast recovery profile. Settings live in a plain-text CASTALIA.INI you can repair from DOS with any editor.

03 // HOST-BUILD SCREENSHOTS · 800×600
Ten 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 and modal dialogs, 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
457 tests 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

457 host unit tests

Safe strings, rectangles and regions, INI, 3-3-2/565/EGA-16 color packing, the BMP codec, snapping, the clipboard, the network parser, the .CAPP loader and Mines logic. 457 checks, 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 you can inspect.

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 that boots on FreeDOS under QEMU.

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
AUDIO
Sound Blaster DAC or PC Speaker · optional
NETWORK
DOS packet driver · transmit only, for now
VERIFIED ON
Headless host · QEMU · Bochs · never on real hardware
CODEBASE
18,462 lines of C across 93 files · C89
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 icons and every one of the ten 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. It is 18,462 lines of C: you can read it in a weekend.

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), 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.

CREATED BY · Dave Abellán · Claudio di Castello◆ github.com/Tombatossals-Softworks-LLC/CastaliaOS-98
05 // STATUS & ROADMAP
Where it is and where it goes
4 EDICIONES
v0.1.0-preview3TODAY · MVPThe most recent public release. A composited, bootable desktop: themeable shell, window manager, toolkit, four desktops, snapping, ten applications, an installer and .CAPP add-ons. 457 tests green and the Open Watcom build verified in CI.
Phases 1–3ClosedBoot, windows and explorer, applications and installer: marked done in the repository backlog and reproducible by compiling. 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 4Next · not startedReal-hardware hardening. The most important item on the roadmap is still open: it has never run on a physical machine. The period QA matrix — a real S3 Trio3D BIOS, PS/2 timing, IDE, the keyboard-controller reset pulse — is listed as pending in the repository itself.
Phase 6ResearchThe receive path and the ARP/IP/UDP/TCP stack over the packet driver, the CASTSHL.EXE companion for Win98 SE, and /kernel-lab: a two-stage NASM boot sector that already reaches 32-bit protected mode with GDT/IDT and real IRQ0/IRQ1 under QEMU, deliberately isolated from the product.
// AVAILABILITY
PREVIEW3 (FREE)RELEASE FOLDER FOR FREEDOSSAMPLE .CAPP ADD-ONSSOURCE · OPEN SOURCE
06 // QUESTIONS
Reasonable doubts
6 PREGUNTAS

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 ten applications — in 18,462 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.

// SIGUIENTE SISTEMAC-128 WorkSpaceDESKTOP · COMMODORE 128 · VS GEOS 128
CHANNEL #0x4C7A · ON AIRREC ● TC 02:47:18SIGNAL ▮▮▮▮▮ 100% · AES-256
TRANSMISSION · ENCRYPTED// SUBSCRIBE

Subscribe to the encrypted channel.

Devlogs, patches and internal leaks. Zero spam, zero analytics. Just what matters, when it matters.

9DEVLOGS PUBLISHEDSINCE 2025
2LANGUAGESES · EN
0SPAM · TRACKINGEVER
// AGENT_INTAKEv3.07
JOIN DISCORD
OPENING YOUR MAIL CLIENT · confirm the send
CIFRADO100%
PRIVACIDAD100%
FRECUENCIA2-3/MES
// AES-256// 0 ANALYTICS// REPLY TO LEAVE// HOSTED IN VIRGINIA
// SIGNED · PRINCETON · ILLINOIS · 2025▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮ ▮END_OF_TRANSMISSION_◆