Show HN: GentleOS – A pair of hobby OSes for vintage 32-bit and 16-bit PCs (github.com)
77 points by luke8086 2 days ago
Hello HN,
I've been working on a simple OS for tinkering and running bare metal apps on vintage PCs.
Since I couldn't quite decide whether to target pure 16-bit, or slightly more capable 32-bit machines, I ended up with two separate versions:
- GentleOS/32 (https://github.com/luke8086/gentleos32) works on i386+, requires 4MB of RAM and VGA display supporting 640x480x16 mode or any 256-color VESA mode.
- GentleOS/16 (https://github.com/luke8086/gentleos) works on 80186+, requires less than 192KB of RAM and a CGA display supporting 320x200x4 mode.
You can find more details in the repos.
iamnothere a day ago
This is great, thanks for releasing your work. Very impressive.
You may get some interest from others in the retrocomputing/permacomputing sphere if you implement an Uxn emulator; it is extremely simple and can run on very limited hardware. https://100r.co/site/uxn.html
Vintage hardware would be a great host for Uxn programs, so I suspect this would generate some excitement.
luke8086 5 hours ago
Thank you so much! Somehow I haven't heard about Uxn before, but it seems very cool and I'll definitely look into it.
iamnothere 4 hours ago
You’re welcome. You’d probably appreciate its focus on long-term stability; the authors wanted an environment for their software that would ensure code could stay frozen in a working state forever. The only thing that may need updates is the VM, as the host OS and userland will shift over time, but the VM is designed to be exceptionally easy to implement and maintain. That comes at the cost of some capabilities, but they were specifically aiming for simpler software, so it works out.
sandos 7 hours ago
Heh, the "small virtual machine" was NOT a lie! Is that less than 200 lines? Very nice!
Now I feel like integrating that into various things....
j1greene 2 hours ago
Does this OS (either the 16 bit or 32 bit version) require apps built for it, or is it compatible with DOS or Windows 3.x or any other OS.
aktau 3 hours ago
I clicked around in the kernel section and the other commenters highlighting the simplicity weren't lying. It's beautiful in its simplicity.
Seeing the screenshots I was kind of expecting this was a pre-emptive multi-tasking OS (forgetting what I read in the submission).
Things that thus surprised me on a cursory look:
- noticed krn_main() ends with `while (1);` [1]. I would've expected a "schedule" call or something. I assume there's no real busy loop burning CPU, maybe it's never meant to reach this code?
- I'm reminded of the "bare metal OS" when I see one of the apps call `krn_\*` functions directly [2].
[1]: https://github.com/luke8086/gentleos32/blob/main/kernel/main...[2]: https://github.com/luke8086/gentleos32/blob/ea691f14635c023d...
luke8086 an hour ago
Thanks, so glad people like the code! I keep looking for ways to make it simpler and more obvious.
> - noticed krn_main() ends with `while (1);` [1]. I would've expected a "schedule" call or something. I assume there's no real busy loop burning CPU, maybe it's never meant to reach this code?
Yeah, `gui_main()` takes over and is not supposed to return, so the code is unreachable. The loop is just an old idiom used in such places (e.g. [1]), though I've now replaced it with a comment and a call to `halt()` to better convey the intention.
> - I'm reminded of the "bare metal OS" when I see one of the apps call `krn_*` functions directly [2].
Yeah... but at least the kernel doesn't call the apps... which it could ;^)
[1] https://github.com/freebsd/freebsd-src/blob/main/sys/x86/x86...