go back
← Back

NOOVEX9 — Off the Floor at 1MB

Log entry 03 · 12 min · NoovexOS Project
NOOVEX9 V46 (VESA / GPU)

The current line. The single biggest structural change was getting the kernel off the floor.

The 1MB relocation

The stage-2 bootloader was rewritten in GAS assembly to switch into 32-bit protected mode and relocate the kernel from its low staging address at 0x10000 up to 0x100000 — the 1MB mark — before jumping in. It copies a full 1MB, so it covers any kernel size up to the limit without needing to know the exact figure. This booted, and it lifted the ceiling from 512KB to 560KB (573,440 bytes).

The roads that didn't work

Two serious attempts to go past 560KB, both dead ends, both worth recording so nobody walks down them again:

Stage B — the unreal-mode chunked loader

Intended to load past the 640KB barrier in chunks. Abandoned. The BIOS clobbers unreal-mode segment registers during disk reads. That's the root cause; there's no way around it from the loader.

The 1152-sector bump

Twice attempted, twice reverted, tested on real hardware both times. 1152 sectors is 576KB, which ends the kernel exactly at 0xA0000, colliding with BIOS/EBDA scratch and video memory. It compiles. It builds. It does not boot.

The flat UI redesign

A full visual overhaul, driven by a reference aesthetic: split-screen layouts, white backgrounds, blue accents, rounded card rows.

  • 24 theme colours plus 15 boot-chrome colours installed into previously unused palette slots 216-254.
  • The setup wizard rewritten as a five-page keyboard-driven flow — logo, step indicators, language, region, account creation, appearance, completion. Kept keyboard-only for an unglamorous reason: mouse polling would have cost more bytes than were available.
  • Sign-in screen rebuilt centred — large clock and date, avatar, name, password pill with a blue arrow button, wordmark at the bottom.
  • Settings re-skinned with a navigation rail, account chip, search box, and fifteen categorised rows.

The Settings icons deserve a footnote. All fifteen categories had been drawing the same generic dot. Each got its own glyph — monitor, globe, Bluetooth rune, brush, padlock, sun, speaker, person, clock, platters, battery, shield, windows, download, info — implemented as an 8×8 1bpp table scaled by pixel replication. Cost: about 120 bytes of rodata, versus the ~2KB that fifteen hand-coded shape routines would have needed. When you're working with three kilobytes of headroom, that arithmetic is the whole job.

The bug hunt

  • 38 palette-truncation sites — 24-bit RGB constants passed to functions expecting a palette index, silently truncated to a single byte. All 38 fixed during the redesign.
  • A JPEG decoder that overwrites its own BSS state. Safe at desktop time, fatal at boot time. New rule: any boot-time image must be a pre-quantized bitmap, never a decoder output.
  • A DSK/NVMe address collision.
  • Weak entropy sourcing for TLS.
  • A latent stride bug in the wallpaper renderers that only worked by coincidence, because one image's width happened to divide by 8.

The wallpapers

Three backgrounds — the NOS logo, an eagle, and a sunset city skyline. Eagle became the default. Setting it as default surfaced a deeper bug than expected: two separate wallpaper-load points still carried a stale clamp that rejected the new wallpapers outright on boot. And the setup wizard was writing the appearance setting to CMOS byte 0x3A, the same byte as the wallpaper, clobbering it. And 0x3E was doing double duty for both scroll speed and background style. One cosmetic complaint, three overlapping config bugs underneath.

Recent work

  • Desktop rubber-band selection — click empty desktop, drag, get the translucent blue rectangle, and icons the box touches light up.
  • NVIDIA GPU identification. Not a driver — an identifier. It decodes the PCI device ID into a real model name (Kepler through Ada) and reads PMC_BOOT_0 at BAR0 offset 0x0 to report the actual architecture. It says plainly that acceleration needs signed firmware and that VESA is what's actually drawing.
  • A danger-zone command set, in the spirit of "you own this machine":
    wipe os              erase everything — files, account, settings, CMOS
    sudo wipe config     delete NVXCONF.SYS, reset to defaults on reboot
    sudo reset account   wipe the user, force the setup wizard again
    sudo format nvxfs    erase all files, fresh filesystem
    These do real things to real disk. No confirmation nannying.
  • The codebase reorganised into a proper project — kernel/, boot/, uefi/, lib/crypto/, lib/codec/, gui/, assets/, apps/sdk/, build/, docs/ — verified byte-for-byte identical output to the old flat layout.