Detecting DOSBox from within the Box

6 points by calvin


bitshift

This is a fun article! I already knew DOSBox had special-cased some stuff (the simulated OS doesn't take up conventional memory), but I never would have guessed that they invented their own x86 instructions!

There's another DOS emulator for linux, aptly named DOSEMU, which has... a surprising amount of callback APIs.

I remember DOSEMU! If I recall correctly, it's more of a compatibility layer than an emulator. Think Wine, but for running DOS programs: x86 machine code runs directly on the processor, with compatibility shims whenever Linux needed to pretend to be DOS.

It was very convenient for gaming without booting into DOS, especially on my hardware at the time. I could get 386-ish speeds from gaming in DOSBox… or I could get Pentium II speeds by running on bare metal—quite the difference.