DOS Direct is an emulation backend based on dosbox, you can create it with following command:
In theory the direct version is the fastest possible version of the emulator backend. But it has a strong disadvantage: it's working on the main browser thread. So it can easily hang a browser for some amount of time, and not be very responsive.
DOSBOX Worker is a more preferred version of the emulator backend, because it does not block the browser.
In direct mode you can easily access emscripten module:
Emscripten module provide lowlevel api to change file system:
You can also rescan DOS devices:
In direct mode you can dump whole memory of dos:
If you need to copy entire memory pass
true as argument.
memoryContents contains following:
In direct mode, you can pause the Dosbox execution loop without pausing the emscripten loop. This lets you pause and inspect the current memory, for instance.
_pauseExecution function takes as its argument whether it should be
paused or should resume. To resume once you have completed: