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 5, 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 5, 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 5, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie
gsos wrote on Today, 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 Today, 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 5, 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 5, by Dividebysandwich

User metadata
Rank Newbie
Rank
Newbie
gsos wrote on Today, 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.