moon2 2 days ago

These things are way better to see than stupid AI. It’s not going to “sell”, but it’s a tech person being creative and doing their craft.

I used to study a lot of hobbyist OS development in my late teens. It was awesome, I still try doing small kernels from time to time (last one was a RISCV small kernel that printed a message to my partner).

  • joexbayer 2 days ago

    Thanks! It’s really liberating not having to worry about selling, marketing etc. Only reinvent the wheel till new ideas come. :D

    • anonzzzies a day ago

      I did that all my life: no unicorns but if you do enough things, some will sell auto (once any traction happens I sell: I don't like running a company, I like building stuff). Without all this stress and grifting. Granted, I was lucky that my hobby in 2000 turned out to be worth millions, but it still works fine 25 years later.

  • mvkel 21 hours ago

    It's weird to characterize ai categorically as "stupid" when, until it was wrapped with clever UX, it was an entirely academic pursuit (craft), with little to no money in it.

  • bobxmax a day ago

    little hobby gadgets much more interesting than the most ridiculous technology in human history

sarkron 2 days ago

This is great! What would you do differently if you started again today? What are your thoughts on language suitability for the lower level parts (ie. Sticking to c or a simple subset of c++ or any of the newer languages)?

Given the myriad of resources available, how did you manage to keep the project engaging rather than copying others people code?

  • joexbayer 2 days ago

    Thanks for the feedback! I think the biggest thing I’d do different is to have a plan. I just started out with the goal of doing the basic hello world OS, and that’s it. But then I kept adding new things, adding more and more working on multiple things at the same time. Which has lead to some technical debt I’m still trying to fix. I’d also try to be less UNIX dependent.

    Regarding language, I love C for its basic syntax and “straight to the point” style. Maybe I’d consider some other languages for userspace applications.

    A goal for me from the start was always that I wanted to write everything myself, no porting of any software, and for me that’s the entire point of the project. I mostly adhered to the rule of copy ideas not code.

    • 90s_dev 2 days ago

      I'm not sure it's a bad thing to not necessarily have a plan. Intuition is the hidden sister of logic, both children of reason, and we don't always see her because she's often behind the scenes doing all the work.

      Technical debt is as sure as death and taxes. Good software grows over time, like a person growing up. Sometimes you have parts that are needed for a time but not permanently, like baby teeth. That's what technical debt is like.

      Other times there are parts that are absolutely ideal long term, but it's a long time before they even make sense. And sometimes things only develop much later than we expect, like wisdom teeth. These are software features that won't make sense until you write the thing that you don't realize yet is only temporary.

      I have the same goal of writing everything myself from scratch. It's a very important goal to me for a reason I don't fully understand yet.

      Congrats on writing an entire OS, and getting it booting on real hardware! That must be such a rewarding feeling in its own right, even if no one understood how. And it looks so very cool.

      You've given me more motivation to announce my project soon. Maybe next week. Thanks.

      Have you played around with Zig yet? I hear that would be a good replacement for C here. Did you have any thoughts on porting your OS to that, or did you have any branches some Zig code made its way into?

      • joexbayer 2 days ago

        I’d love to hear about you project! Seeing what other people make is a big inspiration. I have not tried Zig, for the kernel I don’t think anything will beat C for me personally. But for userspace applications I’d love to try it!

    • ayaros a day ago

      Regarding a plan, I often feel the same way about my own project. There are a number of systems I've rewritten multiple times, and I can't help but think much of that would have been unnecessary if I had been more tedious about diagramming out my needs and requirements beforehand. Other times I wonder if I would have gotten this far had I planned things out... It's the age old question of "would I have started this project if I had known how much time and effort it would have taken?"

      Each approach has a clear set of pros and cons, as others have explored in this thread. In the end, I think what ultimately matters is whether we're satisfied (and proud) of a project after a significant amount of progress has been made.

      I also took the "I want to write everything myself" approach with my project since I wanted it to be a demonstration of my abilities. I wanted to prove to myself and others I could create a project of significant size and scope. It seems like this often means working without libraries and having to reinvent the wheel over and over again. It's tedious, but it certainly adds to the satisfaction you get as you look over your work and think "this is truly mine; I did this."

      And yes, copy ideas, not code, is one of those things I do my best to adhere to. Sometimes, at least with JS, you run into problems, look into solutions, and it turns out there's really only one sensible way to do something; what you end up writing feels like a boilerplate solution to the problem. I often find myself going back and forth through search results from places like Stack Overflow and trying to siphon out the best techniques and ideas from multiple examples to mesh together into some usable code in a style I prefer.

      Finally, since I failed to say this eariler, congrats on your project! I'm gonna have to try it out as soon as I get some extra time.

    • keyle 2 days ago

      I'd like to second the mention of plan vs. no plan.

      Having no plan is often better when you're facing a deep pit of work, pick at it every now and again, whatever you feel like working on that day.

      vs. having a clear Todo list that is longer than a DNA chain and just giving on it after item 5 because 6 is boring.

      Oh, and congrats, looks great.

      • stevage 2 days ago

        I find it very hard to maintain enthusiasm and momentum on side projects if there is a plan. It just feels like work.

        • joexbayer 2 days ago

          I guess yeah, a full plan would perhaps make it like work. I guess I meant more like an idea of what the goal is. So I could better plan the features.

          • stevage 2 days ago

            Ah yeah, at least a set of design goals and non goals.

            • exe34 a day ago

              An anti-plan: things I will never implement.

    • ummonk a day ago

      Curious about the less UNIX dependent part - did you find the UNIX model (everything is a file - or more accurately everything is a serial connection) to be a poor abstraction for a hobby OS?

      • joexbayer a day ago

        Oh, I really like UNIXes abstractions and use alot of them in my OS. What I meant was, because I use GCC for compiling, ld for linking, ar for archives etc, I noticed that I got really bound to the C way of UNIX. Or maybe POXIS would be more appropriate. It did “force” me into some design decisions which I did not like. Or even just the way I wrote C is so UNIX / Linux like. Wish I tried to branch out more, especially considering how different Windows C is.

ayaros 2 days ago

I think the default system font should be a more condensed variant; it would make the system look much more refined. There are a number of areas where it's clear you need more horizontal space for characters. Each character should have less width, and there should be as little space between the characters as possible - just a single pixel ought to be enough at the font size and resolution you're using.

I don't know anything about your font system; I'm assuming it's fixed width bitmap fonts? I don't know how hard it would be to make these changes within your codebase so if it's too much work then don't worry about it.

I've been building a web OS site from scratch for a while now (not as technically impressive as what you're doing) and I just got through a total rewrite of the font classes, so it's at the top of my mind.

  • joexbayer 2 days ago

    I agree my current font is very sub optimal. It’s basically still the original font I got working when I started out. I have looked into rendering proper fonts, so it’s on my todo list. Just have been neglecting it.

    • 90s_dev 2 days ago

      I had the same problem, I made a 3x4 font that was just barely servicable for the initial project to show text on screen. It was my first (and only) font I ever made! Eventually I needed lower-case, so I turned those into lower-case and made a 3x5 variant for uppercase. It's still not ideal, and I'm sure when I announce my project, people will complain about it. So I've prepared to say "it's a stop-gap solution to make the OS servicable, but we can make more fonts."

      I think people skimming a project often just don't quite get how much we pour into our projects, and how very much it cost us. But it's okay, they don't have to understand just how cool it is what we made. At least we know.

      When I saw your video of your project, I was thinking to myself, "wow, that's incredibly cool, and I can relate to the steps he's doing!" Just trying to be the voice here of someone who thought that way, in case there are no others.

      • JdeBP a day ago

        One answer to that is to ensure that you accept plugged-in font files via some well-known format like FreeBSD's "vt" font file format, BDF, or GNU UniFont's HEX format; and then just let people get on with picking their own fonts. (-:

        Such as https://robey.lag.net/2010/01/23/tiny-monospace-font.html for example.

    • JdeBP 2 days ago

      One can really get bogged down in fonts. (-:

      http://jdebp.uk./Softwares/nosh/guide/terminal-resources.htm...

      If you want a quick improvement over that 8by8 IBM ROM font, I suggest two things:

      1. Switch to a 16by16 square.

      2. For the ASCII range, go with one of the old home computer fonts, rather than IBM ROMs. Viznut has .hex files for Commodore PET and BBC Micro graphics modes squirrelled away inside Unscii.

      I've done the work of upscaling the 8by8 PET font to 16by16, and it works quite nicely as a monospace square font. These old home computer fonts were of course designed to. Whereas in the world of VGA you're soon in trouble with glyphs designed for 9by16.

      • joexbayer 2 days ago

        Appreciate your response! Will have a look at 16by16 fonts.

    • o11c 2 days ago

      Supporting variable-width fonts is pretty easy on its own (if bit-packing, you might wish to store them vertically), but does complicate combining characters (remember, they go in different places and may need to make the new character larger).

      For vector fonts, the interesting question is "if I render this at a different resolution and then scale it, will it line up?" which fundamentally has no answer that can satisfy everyone. Most other difficulties are merely a Small Matter of Coding (and providing appropriate APIs).

      • joexbayer 2 days ago

        Thanks for the info! Will have to look more into.

        • peterfirefly 16 hours ago

          The old Macs had some beautiful bitmapped variable-width fonts -- and a relatively simple font file format.

  • throw-qqqqq 2 days ago

    Tough crowd!

    - “Look, I wrote an operating system!”

    - “Meh the font is weak”

    Peak HN IMO :D

    • cyberpunk2066 a day ago

      The fact that the OP built an entire hobby OS complete enough to have windowing and font rendering, and got it booting off his vintage notebook, is extremely impressive, and much more so than the ChatGPT frontends and Chrome reskins that HN usually enthusiastically updoots.

    • alganet 2 days ago

      The power of the crowd compells you.

      The power of the crowd compells you.

      The power of the crowd compells you.

    • ayaros a day ago

      I meant it as sincere constructive criticism! :) <3

      • throw-qqqqq a day ago

        Yeah I thought as much. Sorry for the bad joke, it was not my intention to accuse or offend anyone. The discussion on fonts continued into cool technical areas like bitmapping!

        My point was: I would not expect such a response anywhere else but HN :)

        Someone in the crowd was already there and is wearing the t-shirt - that’s why I come here <3

    • 7bit 2 days ago

      So what? Someone is not allowed to give constructive criticism?

      • throw-qqqqq 2 days ago

        I tried to make a joke, please don’t take it seriously :)

        • selimthegrim 2 days ago

          They didn't say anything about fonts to Terry Davis

eggy 2 days ago

Congrats! Looks great coming from someone who had a Commodore PET 2001 in 1977. I have been toying with KolibriOS and MenuetOSx64, but I would sure like to try rolling my own OS. You did it! Keep truckin'!

  • joexbayer 2 days ago

    Thanks! Appreciate the encouragement!

byte_0 2 days ago

Just adding this comment to say congratulations and how impressed I am by your project! I've been an OS Dev fan since my teens and it feels great to see this achievement come to life. I am a little curious to know how the graphics subsystem is initialized. I wish you the best of success.

Hashex129542 a day ago

Hi, I'm in this field about decades and trying to learn OS development. I've an idea of FASM, NASM, FASM-G. But I need to study the output of assembler program. So I can understand how the OS is actually works in the binary level. Do you learned opcodes for the particular architecture? What did you for device driver programs? Can you please list out the steps to develop my own OS.

  • joexbayer a day ago

    I think the two best places to learn about it is the osdev forum and osdev wiki. There are so many useful resources to get you started there.

    There are some tutorials out there too, but a lot of them have bugs and you basically recreate their OS.

    Regarding studying opcodes, I never went that deep, closest I got was looking them up for my C compiler, so I know the most common basic ones.

    https://forum.osdev.org/ https://wiki.osdev.org/Expanded_Main_Page

    • peterfirefly 16 hours ago

      An x86 disassembler is not that hard, as long as you stick to a single mode and ignore the SIMD alphabet soup.

      You have a short loop that scans through the prefixes, checks for a REX prefix (if you handle 64-bit mode), reads the opcode (1-3 bytes), reads the MOD/RM byte if there is one (use a table lookup), reads the SIB byte if there is one (table), reads offset if there is one (table), reads immediate if there is one (table).

      It's probably easiest if you use an "expanded/normalized" opcode internally so the 1-3 opcode bytes + the 3 extra bits from some MOD/RM bytes + prefix info (for certain SIMD instructions) map to a single 16-bit opcode (likely around a couple hundred to a thousand opcodes in total).

      You have a table that maps those to mnemonics + operand info. You have some tables that map 0-7 (or 0-15) to AL/AH/... and AX/BX/CX/... and CS/DS/ES/... and various system registers.

      Not that much code all in all. Several tables. You can squeeze them and bit pack them to your heart's content if you want.

      Once you have that, a simple assembler isn't so hard.

    • Hashex129542 a day ago

      I understood. Thank you very much for the information. It's definitely much helpful to me.

ummonk 2 days ago

That is so awesome! I'd really like to see more people bringing back the spirit of early computing with much more tinkering at the computer rather than app level.

I've been thinking about doing a long term hobby project of creating a personal computer - one where I create the entire software stack myself and can know the provenance of every bit that goes into the system (though I can't do the same with the hardware, unless I can get enough performance out of an FPGA to run everything on it).

Until now it seemed unrealistic but you proved it's possible! And looks like you're even implementing a hobby C compiler: https://github.com/joexbayer/C-Compiler

  • joexbayer a day ago

    Thanks! Yes, knowing that you’ve written everything from high up in userspace down to the drivers is a great feeling! But also a debugging hell…

    The C compiler is built for the OS, and works inside it. The project became just so big that I wanted to take it out of the OS repo. Especially because it works on Linux too.

badmonster 2 days ago

Could you elaborate on how this compiler interacts with the operating system? Specifically, how does it handle features like structs, and what are the current limitations or planned enhancements in this area?

  • joexbayer 2 days ago

    There is no magic interaction between the compiler and OS. It simples compiles to the same machine code (i386) and uses interrupts for system calls. Structs are handled as a memory region with a size based on its members, and the member access is simply an offset into that region.

    Current it has lots of limitations such as only int and char, no switch statements etc. The biggest change from default C, is allowing functions in structs and implicit passing a struct to a function if it’s a struct function. You can read more here:

    https://github.com/joexbayer/C-Compiler

cyberpunk2066 2 days ago

Easily one of the most impressive passion projects I've seen here in a long time. Out of curiosity, why did you opt to write your own C compiler?

  • joexbayer 2 days ago

    Had a rule for myself that I wanted to write everything myself, and it had always been a “goal” of mine to build one. So it just kinda fit together

    • fuzzfactor 16 hours ago

      Really worthwhile goal no matter what anybody says :)

      Did a little testing myself.

      Tried it on some bare metal, looks pretty good.

      There were two phases, wouldn't fit in a single comment.

      Wrote RetrOS-32.img to a blank SSD and it boots in CSM/Legacy mode.

      That's a nice milestone right there :)

      This was on a tiny Lenovo desktop about as old as an x240. These are low-power, run on the same Thinkpad A/C adapter, so there are some similarities to a laptop.

      But the cursor wasn't very responsive and wouldn't come down below the very top rows either so could not sign in. Using mainstream wired mouse & kybd. (The PC has 8GB memory, in the login box it showed the nominal 15mb, but extended memory was a negative number, about 8GB itself.)

      Then I remembered things like the x240 often have a touchpad that is recognized as a PS/2 mouse, not USB. Moved the SSD to an old tower that has a PS/2 mouse and kybd and then could sign on. Cursor was still quite a bit sluggish, but it worked. This one has 12GB memory and the reported extended was about 464mb so it looked realistic in the login box.

      It boots! It works nominally! It's some kind of Golden IMG already, so congratulations!

      Back at the Lenovo I do boot to DOS from time to time, and I enable Legacy USB in the BIOS so I can use the USB mouse for DOS which had no concept of USB. After booting DOS, if I want to use the mouse I still have to load DOS mouse drivers, just like the 1980's but this firmware setting fools the old pre-USB DOS mouse driver so it will handle the USB mouse & kybd that people are using now. This setting has been there for ages since the PS/2 sockets on PC's started becoming scarce. Checked the BIOS, and Legacy USB was enabled the whole time.

      However, on this Lenovo there was an additional setting, for "USB Virtual KBC Support". I don't know if I ever saw this along with Legacy USB settings in one BIOS, up to now would have assumed they were both the same thing but using different terminology. This setting was not only disabled by default, the text says this one auto-disables once an XHCI driver has been loaded. Then definitely found it to auto-disable after booting Windows.

      Enabled Virtual KBC, booted to RetrOS and the USB mouse could log in. More sluggish cursor than on the PS/2 machine though.

      Plus there were some untyped characters that would sometimes appear when logging in, or admin would duplicate itself so username said adminadmin after you typed in the password below.

      Still has a huge negative number in the login box for extended mem, that was not a show-stopper, mem appears normal when looking at the system stats once logged in.

      I would now imagine this Virtual KBC setting emulates how mouse & kybd are presented to a VM?

      Interesting finding that DOS does not require this setting for a USB mouse to work on bare metal, but RetrOS does.

      Have not put it through its paces thoroughly, focusing on the bare metal aspect.

      • fuzzfactor 16 hours ago

        Second phase began examination of sector structure using DMDE 3.6. A very good aid for understanding boot structure, which I hardly ever use for data recovery but it will do that too. Like other hex editors, hex appears on the left, ASCII on the right. But that's only in "Hexadecimal/Text" Mode which is the default, and you're naturally looking at sector 0 to start with when you open an IMG in DMDE. Scroll down for all the rest of the sectors as far as the eye can see. The different Modes correctly "interpret" only a handful of particular sectors that are expected to conform to that mode. When a non-default Mode is chosen correctly for a key sector, you are presented with a template showing fundamental structures underlying the partitions, filesystems, and/or OS, according to that mode. You can also directly edit these essential parameters on the template and it will update the hex accordingly, but it needs to be right.

        Key sectors containing things like the Partition Table, or a bootsector (Boot Record) are also supposed to be ones that do not change whether or not there is an OS (or any files) in the filesystem or not.

        Break that down a little bit, a partition table should not change whether or not the partition(s) are formatted or completely blank. Not supposed to matter whether you are going to use the partition for DOS, Windows, Linux or whatever.

        Then a bootsector doesn't even exist until its partition is formatted to begin with, then it reflects the "geometry" that the formatting process seemed to think was best for that filesystem based on the information it had available.

        Neither of these should change after that, and be completely independent of whether there are any files in the filesystem.

        It's probably best to build on as firm a foundation completely consistent with regular old PC's and it really looks like this is going pretty well using FAT16.

        Once you have copied the IMG to a SSD, you could look at either IMG or hardware in DMDE and see the same thing. You do have to kind of figure I checked the IMG for potential bootability before I did anything on bare metal ;)

        It is intriguing. There were other anticipated possibilities for an IMG to be bootable, like floppy mode or "large floppy" mode, which start with only a bootsector located at sector 0, no partition table is needed since there is never more than one partition.

        Sector 0 right now is reminiscent of a FAT16 bootsector, looking at it in "FAT/FAT32/NTFS Boot Record" Mode, it displays real well. With FAT, you will see there are two different entries for Total Sectors.

        By the time FAT16 came around, the upper Total had already been deprecated. You are using it for a full total of 65535 sectors which works so far but it should be in the lower Total Sectors entry for this template on FAT16. The upper entry should be 0 instead.

        Then interestingly, looking at sector 0 in Partition Table mode, you do have a (un-needed at this time) partition table, in the usual position within the final bytes of sector 0. The 65535 total sectors are independently designated there (same total as above in the bootsector code that takes up the bulk of the bytes in sector 0 above) but there is no CHS geometry in place, and DMDE flags a "Relative Sector" of 0 as incorrect because it's expected to always be something other than 0. There's a number of structural features that can cause DMDE to flag them other than this too.

        With sector 0 in DMDE you hit Editor > Partiton Table and all you're seeing interpreted is the last dozens of bytes of sector 0, it's only meaningful if there actually is a partition table in sector 0. There would be a maximum of 4 primary partitions in place. You can change this part all you want without having an effect on the code existing in the earlier bytes of sector 0 (such as an MBR ordinarily). But if you've got partitions the partition table better be sensible or it could fail to point directly to where the target code is.

        No real partitions at this point so you can just go into Edit Mode and zero out the top primary partition line:

        80 0E 0 0 0 0 0 0 0 65535

        You have to hit File > Apply Changes. Then the partiton table is completely gone. And it will still boot just the same.

        Random finding; there's a gfx_destory_window in sector 284 that looks like a typo.

        Nothing in the OS should ever be hardcoded to rely on specific sectors, instead everything needs to be relative to the "Hidden Sectors" in the FAT which determine the offset which is the actual bootsector location for a primary partition.

        The bootloader needs to be independent, and the OS itself needs to function regardless of what sector its partition starts on.

        • fuzzfactor 15 hours ago

          Final thoughts, I would try this:

          Start with a zeroed SSD, open it in DMDE, hit Editor > Partition Table and there is nothing but zeros as expected. Type in this, analogously to the above:

          80 0E 0 32 33 4 52 48 2048 65536

          Also manually put the required AA55 signature at the final 2 bytes. Apply Changes. You have just partitioned it a very mainstream way.

          The Relative Sector value shown is supposed to be incorporated into the bootsector at that position as the Hidden Sector offset, which it uses to find its way into the filesystem.

          Therefore ideally after you copy the IMG to the SSD starting at sector 2048 (rather than starting at the now-proven, wonderful sector 0), it would be like any other OS on any other partition, with your functional bootsector right there on 2048 where the partition table expects it to be, the only thing to change is your original "Hidden Sectors" of 0 so that is what to edit.

          In DMDE Partition Table view, double click on the 80 0E...2048... line and it will take you to sector 2048 as expected, plus autointerpret it as a bootsector, displaying the correct template for FAT bootsectors.

          Edit > Edit Mode and where it says Hidden Sectors 0, carefully change that to 2048. Drive Number is supposed to be 80 most of the time too. Apply Changes. The partition should be self-contained now. All you should need to do is boot to it.

          You will still need a Master Boot Record (MBR) within the first 440 bytes of sector 0 as usual, which can interpret the partition table and jump to the designated Active partition whose bootsector at 2048 will take over from there. Regardless of whether the OS was originally "installed" to a volume starting at 2048, it needs to be able to work after recovery to a different sized volume which starts at something different like sector 512000 for instance some other time too.

          I copy a current MBR from a working bootable MBR-layout USB, bytes 0-439 to the SSD.

          And we're off to the races on a real partition.

          The success was however, limited. After choosing a resolution, no more display :(

          There is mostly no code yet in the 65535-sector 32mb volume, only sectors 0 - 3097 in this IMG are nonzero so far. This is normal at this scale.

          Getting it going does seem to depend on specific code always existing somewhere in sectors 1 - 3097 rather than the OS relying on the Hidden Sectors offset within its own bootsector to find that same code located further beyond 2048. This is easy to have happen since hidden sectors has always been zero. VMs tend to abstract this since they are not on real partitions, and they don't always want to make it easy to move to bare metal anyway.

          However there is really nothing wrong if the specific bootloader for this OS is permanently stored outside the filesystem at this time and/or at a hard-coded address for the time being, Grub did that sometimes so it would be outside the filesystem and not touched by DOS or Windows normally. I wanted to see if the OS itself can be easily relocated as an IMG to any partition within reach of FAT16. Formatted or not the IMG will overwrite what was there so you get your familiar format parameters and the only thing you're supposed to need to edit is the hidden sectors to match where the partition actually starts when it is different than original. But that didn't quite do it.

          So next, additionally copied IMG sectors 1 - 2000 to the SSD starting at sector 1 of the SSD. (Didn't want to overwrite sector 0 with its new partiton table & MBR, nor the other good code now starting at 2048, which didn't leave enough room for all 3097 sectors of data in the IMG to fit in that space any more.) Incidentally, 3097 sectors is only about 1.5+ mb in the whole OS at this point, if it could be trimmed to 2880 sectors it would fit on a regular 1.44mb floppy. Partitons-R-not-us at all for that. Well, you've pretty much accomlished that and more on USB so it really is something to be proud of.

          Sectors 1-2000 are completely outside the filesystem as I have it partitioned now.

          Now it works, regular Windows MBR on sector 0 finds the Active partition like normal, jumps to 2048 as indicated by the partition table as expected, where it first encounters your bootsector/loader? code and proceeds nominally from there. No more failure of display. Any dependency on code being located in the original dev sectors 1-2000 is fulfilled now because a copy of it is there too, regardless of it being outside the current filesystem which now starts at 2048.

          Appears to work with only sectors 1-1000 in place too. I would maybe leave the bootloader in that position and make sure the OS can do its thing starting at 2048 (everything relative to the hidden sectors value within your bootsector, at the time) without relying on any sectors below 2048 after the kernel has loaded.

          At this point I should be able to reformat my FAT16 SSD partition using MS-DOS, which will not only clear off the RetrOS, but also rejigger the parameters seen on the template to be completely conventional, I would expect quite a bit different since yours are not very mainstream values. No problem if that's what your OS likes right now. Then I could easily copy io.sys, msdos.sys, and command.com (in that order can be best) to the freshly formatted partition and DOS would boot fine in its familiar landscape, never touching your code in sectors 1-1000 since that's not in the filesystem and not routinely accessed by DOS. When I was done with DOS, then I could copy your IMG back starting at 2048 again, and it would boot right up, without any experimentation, since the code it occasionally depends on is still there somewhere between 1-1000.

          So you're ready to switch over to bare metal like this and tie up the loose ends in the real world!

          In the long run you want your own simple bootloader to be a file on your filesystem that your bootsector simply seeks after the standard generic stuff jumps to your bootsector, and never depend on anything in earlier sectors than your bootsector after that.

          Whatever OS you put on a partition, fundamentally it should be able to exist as just a bunch of stored files unless you boot to it.

          Another milestone will be when you can just copy the files of your OS to a regular FAT16 volume that was formatted using MS-DOS itself. Do not skip this step. Even 20-year old Windows XP FAT16 is no substitute, and Linux is also non-ideal. Plus different sized partitions than 32mb will need to be taken in stride. The only thing that needs to be special is the bootsector itself, mainly the part that seeks your OS bootloader file specifically.

          Use the mainstream old generic stuff to lead to your bootsector, use DMDE to craft a custom bootsector easily for any partition when needed without having to write your own Format routine, and concentrate on the OS functioning well within its own volume anywhere like the best of them!

          • joexbayer 7 hours ago

            I’m overwhelmed with the effort you put into making my OS run! I really appreciate it! Will take some time to through it all in detail. But a lot of the partitions and filesystem parts of the OS was simply to be able to mount the image in Linux and copy over files. Initially my OS and bootloader didn’t need partitions. As you noticed currently the kernel is not part of the filesystem, but is prepended. The entire partition / boot system is very shaky, so a lot more work will have to go into making it stable. Thanks again for all your comments and efforts. Will try to implement and research as much as possible of the parts you touched on! Thanks!

velcrovan 2 days ago

Is there any chance of booting this on a raspberry pi someday?

I'd love a non-linux minimal single-user OS that boots in <1 second

  • incanus77 2 days ago

    While I share the sentiment (and have been noodling with similar projects), unfortunately the minimum is around 4 seconds as the VideoCore chip is what boots first, then after about 4 seconds hands things over to the ARM chip, which can effectively boot instantly with this sort of OS.

  • pavlov 2 days ago

    It’s written for the i386 CPU architecture while Raspberry Pi is ARM, so it would need to be ported.

    What about Haiku OS? It’s supposed to be for that exact use case…

    • velcrovan 2 days ago

      I don't think Haiku runs on raspberry pi either.

  • 800xl 2 days ago

    Have you checked out RISC OS already?

jcooper23241 a day ago

Looks great! I wanted to try it on my old 2010 computer but I can't find it anymore... these days things are always getting rid of old stuff, keep it up!

rnd0 2 days ago

It's interesting that a few of these projects seem to be reaching milestones at the same time. It's reassuring to see that there are people out there who are still working on this deep of a level with computers and sharing their results with us.

Rock on!

  • joexbayer 2 days ago

    Yes! Love seeing other OS projects on here, always inspiring!

jean553 18 hours ago

Amazing work! I tried a few years ago to write my own OS, seeing what you have achieved is very impressive and inspiring. Congrats!

  • joexbayer 18 hours ago

    Thanks! I’d encourage you to continue! Took alot of breaks myself, but chipping away at it is really rewarding.

pjmlp 2 days ago

I see some Turbo C/QBasic love on that editor.

Kudos for the project.

  • joexbayer 2 days ago

    Hehe, yeah was a Turbo was a big inspiration for the textmode editor.

peterfirefly 16 hours ago

Your æ and ø keys are swapped.

  • joexbayer 7 hours ago

    Oh, didn’t notice that lmao!

    • peterfirefly 15 minutes ago

      Det er hvad der sker når man har et norsk tastatur...

nopelynopington 2 days ago

Nice! I was just thinking about an old eee pc I have somewhere and how I might revive it. What's the performance like?

  • joexbayer 2 days ago

    I have an old eee pc myself! Tested it on that one too, performance is alright, not really optimized but since it’s so “basic” compared to real OSes it should be quite fast. Bigger problems are bugs and lack of functionality for real hardware. (Userspace applications are only available on the QEMU images.

methuselah_in 2 days ago

Congrats a great work. Your machine still looks neat as well. Taken care well.

  • joexbayer a day ago

    Yeah, love that machine! Thanks!

sevensor 2 days ago

Ooh, I have a sweet R31 I might try this out with, if it's not too old!

enqk 2 days ago

Congrats on running on real hardware, rather than something like qemu!

firesteelrain 2 days ago

Great job! How did you get started in this ? Seems like a lot to figure out on your own

  • joexbayer 2 days ago

    It started after finishing the operating systems class in university. The class was really “on rails” and I wanted to do my own thing.

intalentive a day ago

>The password for admin is 'admin'

Brb, hacking your thinkpad

trollbridge a day ago

I'd love to see more of this - eventually there will be some new OS concept, as opposed to everything just being a rehash of the same old ideas from the 1970s. (For reference, the VAX 11/780 was announced in 1977, and we run on fundamentally the same model of hardware today. Nothing particularly exciting or different than VMS or UNIX is being used in today's operating systems.)

An example of a radically different way to think is TempleOS.

xyst 2 days ago

I wish I could spare time like this to work passion projects.

Forget practicality.

Forget "go to market" strategy.

Forget target fit.

Just build and learn.

  • joexbayer 2 days ago

    Yeah! It’s really refreshing, not having to think about it actually being “used” or the market. Simply just for fun and learning.

  • anyfoo 2 days ago

    Out of curiosity, why can’t you spare time? I’d be pretty lost without my hobby projects (one of them was a toy OS, but that stopped when low level OS development became my actual job), ever since I was a kid.

kzrdude 2 days ago

Will it be big and professional like GNU? :)

  • joexbayer 2 days ago

    Oh I doubt that, probably will never be even close. But, it was never the goal to create a “real” product. Just a hobby project for myself to tinker with.

    • kzrdude a day ago

      Great, good luck :) It was a reference to the original Linux announcement in 1991,

      > I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu)

      • joexbayer a day ago

        Ahh embarrassed I did not pick up on that.

gitroom 2 days ago

been messing with old laptops myself so i get it - hitting a milestone like this feels way better when its your own code running for real

WD-42 a day ago

Incredible work! Congratulations

01-_- 19 hours ago

great project! congratulations

globnomulous 2 days ago

Congrats on hitting the milestone! This is exactly the kind of work I want to see on HN: passion projects just for the sake of making something, not advertisements, market news, or AI bullshit.

  • joexbayer 2 days ago

    Thanks! The feedback has been amazing. Motivates me to do more!

mrrogot69 2 days ago

Cool OS! Love the old style thinkpads.

  • jmclnx 2 days ago

    Yes, look very cool, very nice work!

glitchc 2 days ago

This is incredible work, congrats!

  • joexbayer 2 days ago

    Thanks! Been my main hobby project since university, appreciate it!

mouse_ 2 days ago

fun usage of recursion in your factorial function on the third screenshot

  • joexbayer 2 days ago

    Hehe, had to write some test programs. That’s one of them.

ahmedfromtunis 2 days ago

Let me guess, you're trying to dethrone Microsoft, aren't you?! Well, good luck with that!

Just kidding. This is really impressive.

There are two types of people that I think of as gods: drummers (but not the bad ones) and OS developers (even the bad ones).

Congrats!

joshbaptiste 2 days ago

Oh man I wish such big accomplishments were documented on video like Andreas Kling did with SerenityOS https://www.youtube.com/@awesomekling .. learned a lot from his videos

  • joexbayer 2 days ago

    Yeah… kinda wish that too in hindsight. I have screenshots of the entire development process from the very start, and of course my git history. Never thought I’d get this far.

helf 2 days ago

Oh this is cool! I have a couple of 386/486 machines that would be fun to test on.

Are you planning on cardbus/pcmcia support and wifi?

  • joexbayer 2 days ago

    WiFi is definitely on my todo list! Already have written some C WiFi code, just need to find time to writer the driver.

betimsl 2 days ago

I think you could easily give the UI a refresh, modernize it a bit :)

  • joexbayer 2 days ago

    Oh I’d love to, but good UI is apparently my biggest weakness. I’ve rewritten it so many times. And I’m probably gonna rewrite it soon again.