Loading…
← BACK TO ARCHIVE

Compose in 32 bits, present in 8: the CastaliaOS renderer

The entire CastaliaOS 98 PE interface composes into a 32-bit XRGB back buffer and presents to 8- or 16-bit hardware as dirty rectangles. No dithering, no palette search, no alpha.

DESCLASIFICADO · CASTALIAOS 98 PETC 02:47:18 · LIVELAT 41.368° · LON -89.465° · PRINCETON● REC

Windows XP’s glossy chrome cost a GPU with acceleration. We wanted it on a Pentium II with VESA and 4 MB of VRAM, drawn entirely in software. The solution is three counterintuitive decisions, all born from the same question: what can this machine actually afford?

Decision 1: always compose in 32 bits

Everything draws into ONE 32-bit XRGB back buffer in system RAM. It sounds ruinously expensive for the era and it is the opposite: the drawing code is format-independent and there is no dithering anywhere. Gradients, bevels and shadows are computed once, clean. Only the present() step converts to the hardware’s real format.

At 8bpp we use a 3-3-2 palette: three bits of red, three of green, two of blue. Converting a 32-bit pixel is a shift and a mask — zero table lookups, zero «nearest color»: it is the three lines of gfx_pack_index_332(). At 16bpp, straight RGB565. And only dirty rectangles get converted: a click repaints a window, not a screen.

There is no per-pixel alpha in the whole system. Icons use a magenta color key; shadows are a cheap read-modify-write on the edge strips.

Decision 3: ban alpha

Per-pixel transparency is the luxury a period machine cannot afford. So it does not exist: icons and cursors use a 1-bit magenta color key, and window shadows are a cheap darkening of the edge strips. The eye is fooled exactly the same, and it fits the budget. 457 host checks, run under both gcc and clang on every push, make sure no commit breaks the conversion.

The file manager with its blue task pane: gradients, bevels and shadows composited in 32 bits and presented at 16bpp. Not one pixel of alpha in the whole scene.
The file manager with its blue task pane: gradients, bevels and shadows composited in 32 bits and presented at 16bpp. Not one pixel of alpha in the whole scene.

D. ABELLÁN · FOUNDER · PRINCETON, IL · 2026.04.22

// ARCHIVO
RELATED FILES
EXPEDIENTES VINCULADOS
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_◆