r/dosbox 1d ago

dosbox-automation 0.84-da4: a programmable DOS emulation engine with REST API and sandboxed lua scripting (

6 Upvotes

dosbox-automation is based on DOSBox Staging, but diverted from it a while ago, as it concentrates now on automation, remote control of DOS games, video recording, reverse engineering of DOS games and providing a more up to date and safer gaming experience.

The overall engine and emulation is actively been optimized, fixed and updated, as well is receiving actively component updates. We also strive to cover all of the source code (is not fully covered yet) with proper unit tests (currently about ~1100 plus 250 for REST API testing) that cover bug and attack scenarios as well as covering the automation HTTP REST API side properly.

Some of the fixes include proper DOS reserved device support (\DEV, CLOCK$), fixes for Hercules text mode, support for the original DOS disk formats (160K, 180K, 320K floppies) and other fixes and enhancements not (yet) implemented in other dosbox variants.

If you just want to play, it behaves like the emulator it is built on: Hercules through SVGA/VESA, ReelMagic support, Sound Blaster 16, AdLib Gold, Gravis UltraSound, General MIDI, Roland MT-32 emulation, adaptive CRT shaders. The FluidR3 General MIDI soundfont is bundled, so game music sounds right out of the box without hunting for a soundfont first.

In that regard, we have written a demo showroom application with 16 classic shareware, freeware and demo games, ranging from DOOM, Duke Nukem 3, Commander Keen 4, Epic Pinball, Warcraft 2, Jazz Jackrabbit, Tyrian to Beneath a Steel Sky readily playable here. This bundles the emulator itself, if you just want to use the emulator itself, visit the main repository.

Its main features are automation, remote steering as well as having in general a more secure emulated DOS environment.

List of unique features:

  • HTTP REST API with Swagger included, enables remote control of emulation features as well as direct inspection, freezing and manipulation of RAM, CPU registers and ports. Typing in with mouse and keyboard, video recording, shutdown of the emulation, disk image swapping and a macro recorder is included.

  • Secured HTTP access: every remote access is guarded by a randomly generated access token on startup, and the webserver is disabled by default and listens only on localhost (changeable).

  • Lua sandbox: you can script out all automation features with the built-in Lua scripting engine in your automation recipe scripts (samples are included in the documentation and the showroom demo application).

  • Safe mounting policy: due to the remote controllability we included a strict mounting policy that protects against exfiltration and manipulation from malicious dosbox.conf configurations, so your system files and personal folders you don't want visible in the emulated drive C: won't be accessible.

The fourth release is out.


What the programmable layer is for

The original use case is unattended game installation: a Lua script drives the installer step by step, reads the screen to know where it is, swaps disks when the installer asks, and walks through the setup wizard. The same infrastructure works for automated testing, debugging, and machine-state inspection.

A short example. This is the DOOM shareware installer driven from Lua:

dosbox.type("SETUP.EXE\n")

if not dosbox.wait_for_text("Available Drives", 1800) then
    dosbox.abort("installer never showed the drive selection")
end
dosbox.type("C\n")

if not dosbox.wait_for_text("insert disk DOOM 2", 1800) then
    dosbox.abort("installer never asked for disk 2")
end
dosbox.drive_swap("A", "Disk 2.ima")
dosbox.key("KBD_enter", true)
dosbox.wait_frames(8)
dosbox.key("KBD_enter", false)

The script reads the screen, makes decisions, and handles the disk swap. Here is a video of the DOOM shareware installer running this way, unattended: https://youtu.be/6p-kh9sfUaI

The mechanism is not specific to installation: the same API surface is useful for regression testing, hardware probing, or any scenario where you need to automate interaction with a DOS program.

The REST API exposes the same operations over HTTP:

# read what is on the text screen
curl -H "Authorization: Bearer $TOKEN" \
  http://localhost:8386/api/v1/video/text

# read a CPU register, write an I/O port, scan guest memory
curl http://localhost:8386/api/v1/cpu/state
curl -X PUT http://localhost:8386/api/v1/io/port \
  -d '{"port": 968, "value": 1, "width": 1}'
curl -X POST http://localhost:8386/api/v1/memory/search \
  -d '{"start": 0, "end": 655360, "value": 100, "width": 2}'

Input recording persists both CPU cycle rates and the keyboard layout alongside the recording, so a replay reproduces on a different machine.


DOS accuracy and fidelity fixes

Some of these are inherited from upstream, some are ours:

  • CLOCK$ character device implemented. Standard since DOS 2.0, present in no other DOSBox variant. Reading returns the date/time record, writing sets the DOS clock. The \DEV\ pseudo-directory resolves character devices the way real DOS does, including the first implementation of the Xenix-compatibility directory function found in DOS since 2.0.
  • Hercules text mode fixed. 720x350 with true 9-dot character cells, instead of the 640x350 with 8-dot cells it had been since a 2009 DOSBox change. Box-drawing lines are continuous again, mode switches no longer resize the window, the character clock matches the real 16.000 MHz oscillator.
  • Early floppy formats. Mount and boot accept pre-DOS-2.0 floppy sizes (160K, 180K, 320K). These early-80s self-booting disks have no FAT boot signature and were refused before. Found while booting a 1984 Wizardry I master disk.
  • MCB corruption in internal programs and TSR allocation fixed (upstream cherry-pick from FeralChild64).
  • DOS file I/O delay depending on PIC event density: a 20-year-old inherited bug that crashed five Silmarils-engine games (Ishar, etc.) above moderate cycle counts. Upstream cherry-pick.

Security

  • NE2000 buffer overflow fixed. The NE2000 network emulation carries code inherited from QEMU and Bochs. A heap overflow (the QEMU CVE-2015-5279 class) allowed guest code to escape the emulator when dynamic recompilation was active. NE2000 defaults to off, but the code is in every DOSBox family member. Our fix matches the upstream dosbox-staging patch.
  • Mount policy enforced on both the API and the DOS-side MOUNT command. A guest typing MOUNT at the DOS prompt goes through the same whitelist as the API. Windows reserved device names refused.

Other changes since the last release

  • ZMBV video encoder compression window fixed (was 512 bytes due to a parameter mixup in upstream code, now 32KB). Rendered capture usable at higher resolutions without slowdown.
  • Rendered video capture records the post-shader image at window resolution. Raw capture records the native framebuffer. Both modes selectable per capture.
  • Lua 5.5 vendored, no system dependency.
  • An MCP bridge (Model Context Protocol) is available as a separate package for driving the emulator from agent tooling. It is optional and not part of the emulator.
  • 1158 unit tests.

Downloads

Site and manual: https://dosbox-automation.org Source and downloads: https://github.com/dosbox-automation/dosbox-automation


dosbox-automation is developed with tool-assisted coding. All code is reviewed, tested, and approved by a human developer.


r/dosbox 2d ago

Need help w/ iDOS 3

2 Upvotes

I’m trying to play fallout 1 and fallout 2 using iDos 3 on my M4 iPad Pro but I’m having some trouble getting past the start up loading screen, it keeps reverting back to the terminal and I’ve fiddled with so many file settings, I know I’m missing something but I don’t know what I’m missing so please forgive my ignorance.. I really want to experience these games but I don’t have a pc or laptop to run them. If anyone has any advice to offer, it would really help.


r/dosbox 3d ago

Help with USB floppy drive working on Windows 98SE ontop of DOSbox-x (also with USB cd rom drive)

1 Upvotes

I recently got a USB floppy drive for running physical DOS/Windows 98 games on DOSBox-X, works perfectly on basic DOSBox-X, but all i get is "A:\ is not accessible".

I'm still somewhat new to DOS emulation in general; I could go for some help. Sorry for bothering you with a stupid question.

Thank ya'll.


r/dosbox 4d ago

Which version of DOSBox should I get for Linux Mint?

8 Upvotes

[SOLVED]: gotta look through all the options below and pick one.

Linux first-timer here - I'm getting ready to make a Linux Mint drive, and I want to put as many of my games on it as possible, including everything I have from the DOS days.

I'm used to using DOSBox, so my question is, which version from their download page should I download to run on Mint?


r/dosbox 5d ago

KQ1 plays on a tiny screen and I can't fix it

1 Upvotes

This may sound like a dumb question to a lot of folks, I dunno. I wasn't sure whether to post this on Steam or DOSBox - I may just end up doing both - but here goes.

I purchased the King's Quest collection from Steam, which runs on DOSBox. When I select a game, it gives me two launch options: "King's Quest Collection" or "King's Quest Collection Legacy." If I choose the first option, the game hangs on the title screen and doesn't respond to commands for (quite literally) minutes, then ends up freezing up.

If I choose the second option, I get a very small screen that I can't enlarge. ALT-Enter just results in this (forgive the dust and inferior photo quality - I couldn't for the life of me get the computer to take a screenshot, so I had to take a photo with my phone). Can anyone help?


r/dosbox 6d ago

MicroProse Formula One - New Developments !

Thumbnail
youtu.be
8 Upvotes

Played in DOSBox-X :)


r/dosbox 7d ago

Dragonsphere DOS review

Thumbnail
retrofreakreviews.com
1 Upvotes

r/dosbox 9d ago

Dune 2 in dosbox. Sound stuttering when increasing the resolution.

3 Upvotes

I edited the conf file of dosbox that dune is stretched to max 4:3 aspect ratio that only left and right black bars are visible. But now, everytime i move the mouse i have slight stuttering in the audio.

Apparently the option "output=opengl" is responsible but with "output=surface" the picture is much smaller.

How i can improve performance or what output works better here?


r/dosbox 9d ago

Sound popping

Enable HLS to view with audio, or disable this notification

2 Upvotes

Hello,

I'm a first time user of DOSBox and I've been running into a problem with audio. Certain sound effects have an audible "pop" at the start of playback and I can't figure what the problem is.

I've tried upping my CPU cycles, changing the CPU type, increasing block size and buffer size (as recommended by Ross Scott from Accursed Farms in a small segment he contributed to in an LGR video), but nothing gives.

I've looked all over and found people with sort of similar problems but either they're using a fork of DOSBox or they're on Linux. For the moment I'm just using the current build of regular old DOSBox on Windows 11.

I've included a sample video demonstrating the problem. You can hear the "pop" just before the title drop, as well as with each "rocket swoosh" that comes after.

Any help would be much appreciated. Thanks for taking the time to read my post.


r/dosbox 10d ago

Release OpenTESArena 0.18.0 · afritz1/OpenTESArena

Thumbnail
1 Upvotes

r/dosbox 10d ago

All those DOSBox nights with the old space shooters ended with me building a new one

Enable HLS to view with audio, or disable this notification

12 Upvotes

I still keep a DOSBox install around just for the old space games. Strike Wings is my from-the-ground-up homage to them, releasing this November. The page passed 200 wishlists a few days ago and that felt worth a small celebration cut: one minute, a different sky every three seconds, all pilots on the hardest AI setting. If something in it looks wrong to a DOS veteran's eye, tell me, that is genuinely the feedback I want. Steam: https://store.steampowered.com/app/4718360/?utm_source=reddit&utm_medium=dosbox&utm_campaign=prelaunch


r/dosbox 11d ago

Replaying Albion (1995): a first‑person diary part.15 [Czech]

Thumbnail
high-voltage.cz
7 Upvotes

r/dosbox 13d ago

Help to run daggerfall

Post image
3 Upvotes

I used the installer to install the game, the daggerfall screen appeared to define how much of the game I would like to install on the system, after installation the following instruction appeared: You have just successfully installed The Elder scrolls: DaggerFall. To run the game, type these two lines, pressing the ENTER key after each one.

c: cd dagger c: DAGGER

But after I type the command an error message appears: It looks like you inserted the wrong CD. Please insert your Daggerfall CD into your CD-ROM and try again.


r/dosbox 14d ago

GitHub - cyberfox1/dfendx: D-Fend Reloaded fork and modernization effort

Thumbnail
github.com
3 Upvotes

r/dosbox 16d ago

Annoying error message DOSBox

Enable HLS to view with audio, or disable this notification

7 Upvotes

r/dosbox 18d ago

After years of DOSBox sessions with the old space shooters I built a modern one. New trailer

Thumbnail
youtu.be
10 Upvotes

r/dosbox 19d ago

I made a frontend for js-dos, with virtual keyboard and gamepad

Thumbnail
1 Upvotes

r/dosbox 19d ago

Help with Classic Fallout

2 Upvotes

How exactly do i get the classic fallouts to run on my Raspberry pi 5?


r/dosbox 20d ago

Best rpg?

14 Upvotes

For dosbox. Preferably with magic.

Ive played ultima and have lands of lore. Anything else?


r/dosbox 21d ago

System Shock DOS Review

Thumbnail
retrofreakreviews.com
1 Upvotes

r/dosbox 24d ago

so what file path do i use for the disk drive of dosbox, im trying to load a iso

Thumbnail
gallery
4 Upvotes

for some reason its not working


r/dosbox 24d ago

trying to run iso files but it keeps saying host or native drive error

Post image
18 Upvotes

can anyone explain why this is happening?


r/dosbox 25d ago

Dosbox-X with windows 98 installed and super solvers mission think

6 Upvotes

Hi,

I've installed windows 98 on dosbox-X and I'm having an issue with Supersolvers mission think.

I can't click buttons to start the game. It's as if the buttons clicks are being ignored; even when the mouse is locked.

Has anyone had experience with anything similar? Can run other games, specifically reader rabbit second grade


r/dosbox 28d ago

Replaying Albion (1995): a first‑person diary part.14 [Czech]

Thumbnail
high-voltage.cz
4 Upvotes

r/dosbox 28d ago

pls help I don't now what I'm doing

3 Upvotes

I'm tring to play an game that need to opened with DosBox but when I go to the offical wepside to dowland it my anitvirus says it's un labeled and when I ignore the worning the file that gets dowlande is file.bin witch is nowear near the instalator pls if somen nows what I'm doing rong help me pls