First post, by gsos
Years ago I started a personal project to learn how kernels work at their core. My initial goals and principles were
1) Try to use absolute minimum of ASM
2) Try to make the logic as clear as possible (educational)
3) Work from the philosophy that "programming languages are to CPU/MEM, what Kernel is to the machine/peripherals".
The last point is that a kernel should abstract the details of a machine into an API that allows usage of the machine as it interacts with humans in a portable form, just like programming languages do this for the machine as it computes.
See my readme https://github.com/gerben-stavenga/RetroOS/bl … 8e505/README.md from 2023.
It became a working prototype kernel over my summer time off, but development stalled like it happens a lot with hobby os's. I had plans to have the kernel run 16,32 and 64 bit code and support old dos games.
Over the last months, I immersed myself in doing agentic coding projects to learn what is possible and I decided to pick up my kernel work. I had AI port it to rust which is what I have been coding in the last couple of years and which is well suited for OS dev. Using LLM allowed me to aggressively refactor and try out some new designs.
I pushed further on the design principles I started from and could really isolate the core of the kernel into a form where it became a rust trait/lib, that could either be implemented by the actual core-arch or by an interpreter. Using this I could build a kernel on top of it utilizing AI to implement syscall API's. I chose to do legacy DOS and Linux. Very quickly I could get some games working which made the project very fun.
https://www.youtube.com/watch?v=Clh45xUpZNY
I ended up with a project that might be of some interest for the vogons community. It's basically a near fully compatible DOS OS. The kernel can be compiled against arch-metal and be installed on your computer to play natively (or run using qemu/bochs/86box), or it can be compiled against arch-interp (based on unicorn / qemu tcg) and it works like a dosbox app.
It tries to be as retro as possible, so on legacy bios machines with legacy soundblaster you can play the games natively utilizing vga/sound blaster directly. If you have a machine without a sound blaster it can emulate it over ac97 or hda. If you have a modern uefi without legacy bios it can emulate vga as well. Vga emulation and hda emulation is still work in progress and there are rough edges and some bugs, but it's in a state where one can start playing for real.
Previously I posted on vogons and it got removed because it violated rules around AI. I got a message on my youtube from a vogons visitor who expressed interest.,this incentivized me to try to post once more. Obviously I used AI to get my OS to a state where it presents some interesting capabilities. Filling in DOS int 21 syscalls or DPMI API in 30 min is just such a relief, allowing me to focus on design / architecture while seeing results. I know AI is a touchy subject, but I believe this project still to be of interest to this community.