VOGONS


First post, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie

Hey there, I thought I had a user on here but apparently not, so completely new account it is 😉

About a year ago I started working on a pure Rust DOS emulator, basically for giggles. I'm lending a hand with the dosbox-staging project but I always wanted to get DOS a bit more rusty. I got to the point where simple DOS programs worked, basic EGA and VGA graphics worked, I could run things like Norton Commander, Quick Basic and some realmode games and had almost the entire 286 and 287 instruction set working. At a certain point I got stuck at several issues that were extremely difficult to diagnose with logfiles and bespoke x86 debugging tools. Up to that point most of the code was handwritten or transcribed from existing sources. Using iced-x86 was a big help to get going for sure, but I was stuck for quite a while. Things like NC1-3 worked fine but NC4 and up did not because overlays were broken. After some time of stagnation I thought, why not give this a HTTP/WS debug API and then let an LLM figure out where I got stuck?

So yeah, here's Rust-DOS, a new DOS emulator with the following features:

  • 386 and 486 with fpu and realmode + protected mode support with dynamic recompilation
  • Hercules, CGA, EGA, VGA, early SVGA support
  • Soundblaster, GUS, MT32 (via Munt), covox speech thing, disney sound source, and host midi out support
  • Disk drive noises and disk speed emulation (I contributed that to dosbox-staging's recent release too)
  • Web-based debug UI
  • Runs native and in a webbrowser as WASM
  • Built-in config UI can change most things on the fly (even the graphics adapter)
  • Audio effects (reverb, chorus), mixer, screen recording, gamepad and joystick support and much more
  • GPLv2 licensed

rust-dos-descent-tour.gif

Website with live demo and downloads is at https://rust-dos.com
Github: https://github.com/dividebysandwich/rust-dos

Disclaimer: As mentioned above, while the groundwork was hand-coded, both local and cloud hosted LLMs were used for the recent development.

Reply 1 of 19, by gsos

User metadata
Rank Newbie
Rank
Newbie

Very nice. I wonder if we can share rust libraries for emulating different parts of the DOS system (SB/GUS/General midi/PIC/PIT/VOODOO), RetroOS in hosted mode (where apps are run using TCG engine through unicorn rust binding) is very similar. Btw, I assume that you just emulate the protected mode instructions and just emulate dos extenders instead of providing a dos extender (long time ago dosbox had it). I wanted to add hercules so I'll look if your can be integrated.

Reply 2 of 19, by cloverskull

User metadata
Rank Member
Rank
Member

Super cool. Can this run headless, for textmode only applications? Use case is to run BBS doors for my telnet BBS.

Reply 3 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie
gsos wrote on 2026-09-25, 18:50:

Very nice. I wonder if we can share rust libraries for emulating different parts of the DOS system (SB/GUS/General midi/PIC/PIT/VOODOO), RetroOS in hosted mode (where apps are run using TCG engine through unicorn rust binding) is very similar. Btw, I assume that you just emulate the protected mode instructions and just emulate dos extenders instead of providing a dos extender (long time ago dosbox had it). I wanted to add hercules so I'll look if your can be integrated.

I don't provide my own extender, no. Still have to finish DPMS.
And yeah totally, though I didn't do a great job separating things into different crates. But after some cleanup, sure!

cloverskull wrote on 2026-09-25, 18:54:

Super cool. Can this run headless, for textmode only applications? Use case is to run BBS doors for my telnet BBS.

It can absolutely run completely headless, though you'd have to get the text output via websocket or HTTP.

Reply 4 of 19, by gsos

User metadata
Rank Newbie
Rank
Newbie

You can try hookup https://github.com/gerben-stavenga/RetroOS/tr … rd_party/voodoo to get voodoo support. I was hoping to get, as part of the effort of making dos compatible OS, freestanding rust crates for emulating the classical hardware not-entangled with the system so that others can easily reuse it. It's easy to have the device emulation quickly be tangled up with the specifics of the emulator/OS and making it non reusable.

Reply 5 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie
gsos wrote on 2026-09-25, 19:26:

You can try hookup https://github.com/gerben-stavenga/RetroOS/tr … rd_party/voodoo to get voodoo support. I was hoping to get, as part of the effort of making dos compatible OS, freestanding rust crates for emulating the classical hardware not-entangled with the system so that others can easily reuse it. It's easy to have the device emulation quickly be tangled up with the specifics of the emulator/OS and making it non reusable.

I've seen RetroOS, really cool! You should absolutely add some screenshots or an animated gif so people can see what it does 😄

Before I get to something like voodoo, I'd have to add pentium support which isn't in yet.

Reply 6 of 19, by gsos

User metadata
Rank Newbie
Rank
Newbie

of course focus on getting pentium emulated. I wished while working on retroos there were more libraries available that would be directly working and tested. LLM's really change the way we can work with computers. If we make well structured libraries that emulate different devices with minimal dependencies (no_std etc..) we can really go into a state where weekend projects are capable of producing systems that used to take years to make.

I'm interested in your dynrec, my goal is running dos programs natively on modern x86/x64, but it is in VM86 which mean some programs don't work. I was thinking about emulation for some parts of a programs that behave bad (often due to interrupt flags or switching to pmode manually).

Reply 7 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie

@gsos If you want to reuse my recompiler you'll sadly also have to take my x86 core as well as the target architecture code (I recompile to x86_64 and aarch64). Even if I crate-ify everything this will not change. But of course you can plonk it into your LLM and have it copy/paste as needed.

@cloverskull If you want to give it a try, using

/api/screen/text?format=text

gives you the emulator output in text format at any time.

To start headless you do something like this:

(SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy ./rust-dos --no-config -d /home/user/dos --debug-server >/dev/null 2>&1 &) 

And to send input and get the screen output:

H=localhost:8086; J='-H content-type:application/json'; curl -s $J -XPOST -d '{"text":"nc\n"}' $H/api/input/type; sleep 2; curl -s "$H/api/screen/text?format=text"

Reply 8 of 19, by The Solutor

User metadata
Rank Member
Rank
Member

It's funny to see that Rust-DOS and RetroOS, in th current status, seem the antimatter of each other.

With the former, with a consistent GUI, easy usability, nice refinements like the CRT shader and so on, but a still incomplete under the hood, and the latter with a good engine that already runs a good share of programs, no question asked, but with additional work required on the simplicity of use, settings, GUI and alike.

Even Volkov Commander 405, one of the few things that refused to work on RetroOS, worked at first attempt on RustDOS, the perfect antimatter 😀

In short you should really cooperate, because your skills looks perfectly complementary and only partly overlapping.

Reply 9 of 19, by gsos

User metadata
Rank Newbie
Rank
Newbie

It's more antimatter in its philosophy. Rust-DOS is very much an emulator in the dosbox lineage, while RetroOS is more an exercise in operating systems.

By emulating everything (including cpu) its easier to build a system so identical in its behavior that near 100% compatibility is possible (dosbox clearly proves that).

RetroOS focusses on providing an operating system (like freedos) that is modern in design (fully protected and isolated) but is still a DOS, while executing the apps directly on the cpu and, when possible, give direct (but safe) access to hardware (vga, sound blaster, ...). The problem here is that intel screwed up in the instruction design where VM86 instruction and PM instructions don't behave completely identical to the original. The behavioral differences are small enough that most code keeps working.

I also made some mistakes in DOS. I was unaware of MCB, ListOfLists and other internal dos structures and my DOS implementation was just allocating memory or keeping file tables internally in the kernel. Of course lots of programs where looking directly into dos structures, so MCB was bolted on. I'm looking at this repo for inspiration to refactor.

Reply 10 of 19, by The Solutor

User metadata
Rank Member
Rank
Member
gsos wrote on Yesterday, 15:51:

It's more antimatter in its philosophy. Rust-DOS is very much an emulator in the dosbox lineage, while RetroOS is more an exercise in operating systems.

Sure, Is pretty clear to me how they differs philosophically, but I was talking somewhat more about humans than computers.

And coders are humans, with their preferences, strength, weakness, priorities and so on. And with a good use of respective strength often is possible that 1+1=3, maybe 4 😉

Reply 11 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie

v0.6.0 is out. Release notes: https://github.com/dividebysandwich/rust-dos/ … ases/tag/v0.6.0

Lots of new features, Windows 3.11 works (no doubt lots of issues with specific applications still, and 640x480 only for now):

qu2jm2.png

there's savestates...

ib36yx.png

You can now import GOG games, MAKEIMG is implemented and has a UI too...

xobvus.png

Lots of performance and UI improvements...

m9cx61.png

And here's a sneak preview of the next version:

u0nkaz.png

raa7zs.png

Reply 12 of 19, by The Solutor

User metadata
Rank Member
Rank
Member

Great.

P.S. for the record seems that the 2X/3X/.. windows is not working in Win8.1 / Server 2012R2 (both updated to Sept 2026)

It's OK in win 10

Reply 13 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie
The Solutor wrote on Today, 09:47:

P.S. for the record seems that the 2X/3X/.. windows is not working in Win8.1 / Server 2012R2 (both updated to Sept 2026)

Sounds like an SDL issue... what's your graphics device/driver?

Reply 14 of 19, by The Solutor

User metadata
Rank Member
Rank
Member
Dividebysandwich wrote on Today, 10:20:

Sounds like an SDL issue... what's your graphics device/driver?

It's an AMD Vega 11 (Integrated GPU in Ryzen 5 2400G)

For the record I tried 8.1 with the basic MS display driver --> the program crashes on start (something unexpected even picky multimedia things like WMC work well with it)

I tried Win7 --> the program won't start because doesn't like something in bcryptprimitives.dll

I tried Win 8.1 with the oldest driver I know it works (Nov 2019) --> and nothing changed, everything works (including full screen) but no window magnification.

Edit:

Out of curiosity tested other things as well

W8.1 and W8.0 in a VM so using a different driver than Radeon. --->same as on baremetal

W10 on baremetal (older releases like 15.11 and 1703) --> everything is OK

Reply 15 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie

Hmm... I admit I can't really judge how relevant Win7 and 8 are these days. This is of course a biased view from someone who completely stopped using Windows about 2.5 years ago. Win7 support is probably not going to happen given the fact that I'd have to replace several well-tested crates with something bespoke. I can look into Win8 but I'd just like to know (honest question, not sarcasm) whether this is worth spending time on.

Reply 16 of 19, by The Solutor

User metadata
Rank Member
Rank
Member
Dividebysandwich wrote on Today, 13:19:

Hmm... I admit I can't really judge how relevant Win7 and 8 are these days. This is of course a biased view from someone who completely stopped using Windows about 2.5 years ago. Win7 support is probably not going to happen given the fact that I'd have to replace several well-tested crates with something bespoke. I can look into Win8 but I'd just like to know (honest question, not sarcasm) whether this is worth spending time on.

Not realy my pet bug, just an info I provided after I noticed it, I have 15 OSes at my disposal, not counting VMs, so not a problem for me.

But asking on a Retrocomputing oriented forum, how relevant is an OS like Win7 that got its final update in january of the current year is a bit of a stretch...

Lat alone w8 and w8.1 that will get their final updates in the next november.

So, while I'm not criticizing, and I understand your arguments which are valid, I had expected that a DOS emulator was working regardless the architecture, and even in XP...

Reply 17 of 19, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie
The Solutor wrote on Today, 13:36:

But asking on a Retrocomputing oriented forum, how relevant is an OS like Win7 that got its final update in january of the current year is a bit of a stretch...
Lat alone w8 and w8.1 that will get their final updates in the next november.

That's because Windows ages, but DOS is forever 😉
Joking aside, I get your point. I'll see what I can do.

The Solutor wrote on Today, 13:36:

So, while I'm not criticizing, and I understand your arguments which are valid, I had expected that a DOS emulator was working regardless the architecture, and even in XP...

Not necessarily. XP is a good example: While there has been work done on getting Rust programs compiled for Windows XP in the Rust9x project, I personally don't want to get into that as it is a *lot* of work and no guarantee of success. I can imagine that several dependencies that wrap C code will just not work under XP. I've been doing Rust development targeting the Mega65, but that took the work of a special project that enabled that target - and by no means do all crates work on there. So bottom line is, Rust-DOS is a modern DOS emulator, and it doesn't automatically support any host OS version.

That said, the scaling issue on Win8 should be fixable, and perhaps Win7 can be made to work as well.

Reply 18 of 19, by The Solutor

User metadata
Rank Member
Rank
Member

Yes, while I'm not a coder,I guessed that Rust can be a double edged sword, like most of the very modern things.

That said running perfectly on a 11 Y/O OS like W10 1511 is already something of remarkable, even things like .net 4.8 (and related programs) don't work there, at least officially.

Thanks for listening my two cents, anyway. 😉