You are browsing as a guest. Sign up (or log in) to start making projects!

15h 41m 32s logged

Devlog 05 - The Return: Giving pefiaOS a real kernel

This update was mostly focused on replacing a lot of the “fake OS” parts with real operating system infrastructure.

The biggest milestone was getting interrupts working. I added my own GDT, built an IDT with exception and IRQ handlers, remapped the PIC, programmed the PIT to 100 Hz, and implemented kernel threads with a handwritten x86 context switch. The scheduler is still cooperative because the heap and window manager aren’t thread safe enough for preemption yet, but background threads can finally run independently.

I also wrote an ATA PIO driver capable of reading and writing real IDE disks using LBA28 addressing. On top of that I rewrote the VFS into a writable, heap-backed filesystem, so applications can now create, modify and delete files instead of relying on a compile-time file table. Persistence is still missing, but FAT32 can now be built on top of the driver.

The desktop gained a lot of new functionality too. The code editor now supports syntax highlighting and line numbers, the terminal gained proper filesystem commands like mkdir, touch, rm, cat, echo > file, and ps, and I added both C and Python-style interpreters using the same recursive descent expression engine.

Graphics also received a major upgrade. The desktop now runs at 1920x1080 and I replaced the old 1-bit bitmap font with grayscale anti-aliased glyphs generated from Consolas. The renderer blends glyph coverage into the framebuffer, making text much easier to read without changing any existing layouts.

I also improved the desktop itself with window snapping, a scrollable Start menu, a live Settings app for themes and system settings, interactive browser text inputs, and a number of browser rendering improvements including larger page support and faster text drawing.

The hardest part was getting all these systems working together. Interrupts initially caused repeated triple faults because my descriptor tables were wrong, the scheduler had to coexist with the existing window manager, and changing the VFS meant updating almost every built-in application.

To make sure nothing regressed, I added a boot self-test that verifies the interpreter, writable VFS, scheduler, timer interrupts and ATA disk driver every time the OS starts.

Things I’d love people to test:

  • Open multiple windows and try snapping them around the desktop.
  • Use the terminal to create, edit and delete files.
  • Open the code editor and test syntax highlighting.
  • Try typing into browser text inputs.
  • Change the desktop theme and accent colour in Settings.

This update doesn’t add one huge feature, but it lays the groundwork for the next major milestones: paging, user-mode processes, ELF loading, and a persistent filesystem.

0
40

Comments 0

No comments yet. Be the first!