8 ms·
Show HN: A simple Unix-like operating system that runs Doom
- mysterydip 7y agoLove the test case "but can you run Doom on it?" Great work! Personally I'd like to see a homebrew OS that attempts some kind of compatibility with 16-bit Windows, with some modern design/conveniences (sortof a ReactOS for the 3.11 world). It seems like people make either 8 bit or 32 bit OSes. Maybe I'm not searching the right terms. Anyone know of anything, or a starting point?
- oso2k 7y agoHX DOS Extender can run some 16-bit and 32-bit Windows apps in a MS-DOS or even FreeDOS environment. https://github.com/Baron-von-Riedesel/HX https://github.com/Baron-von-Riedesel/HX https://web.archive.org/web/20141003032346/http://www.japheth.de/ https://web.archive.org/web/20141003032346/http://www.japhet...
- ryacko 7y agoThere is no copy protection for 16-bit Windows. And 16-bit emulators exist.
- mysterydip 7y agoI wasn't asking about an emulator or how to pirate Windows. I was asking if there are any 16 bit homebrew OSes (with Windows compatibility a plus). Emulation might be a starting point, though. Do you have a link to any?
- ryacko 7y agohttps://github.com/otya128/winevdm https://github.com/otya128/winevdm
- cbluth 7y agoDoesn't dosbox do this?
- jacobush 7y agoAFAIK you can run 16 bit Windows programs in Wine.
- tsukurimashou 7y agoYes I was about to give that advice, Wine handles 16 bit games pretty well
- mysterydip 7y agoThanks, I'll check it out for some ideas!
- ozkl 7y agoThanks! I was going to go similar path you mentioned. Not 16-bit but in a way that is exe-like binaries and development with Visual Studio. But it seemed to me that it is easier to support ELF binaries. And OSDev has great articles about elf files, binutils, cross-compilers, etc..
- mysterydip 7y agocan't believe I never checked OSDev before... what a trove of info! I'll spend a while digesting there, thanks!
- unixhero 7y agoAnd deeper down the rabbithole: http://wikichip.org http://wikichip.org
- jackvalentine 7y agoDoesn't really address any of your questions, but may serve as a starting point: https://hackernoon.com/win3mu-part-1-why-im-writing-a-16-bit-windows-emulator-2eae946c935d https://hackernoon.com/win3mu-part-1-why-im-writing-a-16-bit...
- mysterydip 7y agoThat's an interesting approach and might work, thanks!
- jackvalentine 7y agoI personally couldn't get it to run, which was quite a disappointment!
- taneq 7y agoIt's a pretty traditional "Hell, O World" program these days. ;)
- deleted 7y ago[deleted]
- AlexDragusin 7y agoHaving lua on it is a great way to help spark more interest! Good call.
- ozkl 7y agoYeah, and Lua is also great at dependencies. It doesn't depend anything :)
- ferCats99 7y agoall i need, thanks
- mruts 7y agoNice work! But one question, what’s up with the naming scheme? Some functions are camel case, other are not. It seems like variables are camel case, but not all of them. And types are whatever it’s called when you capitalize each word, but some have underscores. What’s the reasoning?
- ozkl 7y agoThanks! In fact, I prefer camel case for functions. You must be saying this for HashTable and List functions. I came from C++ world (where i name classes Pascal case and functions camel case). I wanted to group HashTable functions together like a class and named them that way. Yeah, it ended up being inconsistent unfortunately. I named structs in PascalCase.
- tinktank 7y agoThis is awesome. How long did it take you and how familiar were you with the low-level details before you started?
- ozkl 7y agoThanks. I think it would take 8 months night works. But it took longer because of breaks. I was always interested in low-level stuff especially about syscalls (how they jump to kernel from userspace). So, I was familiar with syscall internals and memory protection. But I learnt all including how paging is done in x86 when I was writing Soso thanks to OSDev.
- eterps 7y agoAny books or other resources you used for guidance?
- akling 7y agoNice job ozkl! Cool to see another OS being built in Qt Creator :) Your generic DOOM looks really easy-to-port, gonna try it ASAP: https://github.com/ozkl/doomgeneric https://github.com/ozkl/doomgeneric
- ozkl 7y agoThanks! Yeah it is my favorite editor and the os is entirely written in it :) In fact, doomgeneric is created just for Soso in order to port easily.
- corysama 7y agoNice. Reminds me of the opengl32.dll's that were made to be only just enough to run GLQuake. What made 4Mb pages easier than 4Kb?
- ozkl 7y agoBy using 4Mb pages, we can skip one step which is page tables. In other words, Page Directory points directly to a 4Mb Page Frame. In 4Kb mechanism, Page Directory points to a Page Table which then points to a 4Kb Page Frame.
- rblatz 7y agoThis is cool, based on the title I was expecting http://psdoom.sourceforge.net/ http://psdoom.sourceforge.net/
- shscs911 7y agoExactly. I read the title as `A simple Unix-like operating system that runs on Doom`
- e12e 7y agoNice. Why 32bit, not 64bit? I don't program much assembler - but after seeing how much simpler (sane) 64bit is (amd64), I'd have to be really motivated to do a hobby project in 16 or 32bit (for x86). So curious about that choice in today's hw world, where you'd have to hunt for real 32bit x86 hw.
- Arelius 7y agoI'd like to hear from OP also. But in my experience, x86 documentation is much more wide spread and available esp regarding system startup.
- ozkl 7y agoI chose x86 because I wanted to try the os in my ancient PCs like a Celeron 333MHz. And articles I was reading at the start was for 32bit.
- e12e 7y agoThat makes sense. It's been so long since I've seen a 32bit x86 (apart from single board industrial type stuff) - that I didn't really consider anyone would keep one around... Then again, we do have our old commodore vic 20 in a cupboard somewhere...
- tracker1 7y agoIIRC, you can't run 16bit apps in x86-64 without virtualization.
- tsar_nikolai 7y agoBut can it run Do... ...oh wait. Cool project!
- zoom6628 7y agoThis looks like awesome work. Will be studying the source to learn about how it works. Serious code envy for people who take the time and effort to build OS'es like this. Could see this having potential on SBCs and usage in IOT/PLC applications.
- wmu 7y agoThat's really nice, I enjoyed reading the code.
- thsealienbstrds 7y agoPure awesome