Live data from Hacker News

EMU2: A simple text-mode x86 and DOS emulator

github.com

21–27 of 27 posts

Re: EMU2: A simple text-mode x86 and DOS emulator

#21
post #10

I've been passively writing this (to be clear, an x86 and DOS emulator, not this project) for a while so it's awesome to see someone already write it. My goal was to have a mechanism for bootstrapping a compiler, similar to the Stage0 [0] project, but with a lot more software already written for it and less focus on having it be verifiable. This was to eliminate one more external dependency for building my Linux dist…

You are trying to compile your compiler with your compiler? Brilliant.

As for DOS emulation, will it emulate 43 or 50 line EGA mode, like the IBM PC w/ EGA?

Re: EMU2: A simple text-mode x86 and DOS emulator

#22
post #4

I once extracted data out of an old dos-software by controlling it with a script and walking through all possible outputs (this was for train schedules). This was surprisingly difficult. The biggest hurdle is getting the screen contents out of the emulator. Dosbox only gives you screenshots that are pixels. In the end I managed to do it by using dosemu2 inside tmux controlled by python. I wonder whether this could´ve…

Qemu has a gdb stub so you can attach and read memory directly...

Re: EMU2: A simple text-mode x86 and DOS emulator

#23

Earlier quoted context omitted.

Suppose you have an ancient program written in MASM (Microsoft Assembler) and you want your Linux Makefile to be able to compile it (I mean run MASM from within the Makefile just as you would run gcc). Which emulator will get you there with the least amount of work?

dosemu does exactly that. It even has a dumb terminal mode for this exact purpose (-t).

[deleted]

Re: EMU2: A simple text-mode x86 and DOS emulator

#25
This is quite interesting.

I've debated for awhile trying to write a "UEFI DOS" for awhile. Thus far I've always shied away because of the sheer immensity of just getting a UEFI dev env set up much less one that would support emulation/virtualization of DOS applications so they could pretend they are on original hardware.

All of that is not even considering the whole bytecode vs. native issue...

Re: EMU2: A simple text-mode x86 and DOS emulator

#26

Earlier quoted context omitted.

Suppose you have an ancient program written in MASM (Microsoft Assembler) and you want your Linux Makefile to be able to compile it (I mean run MASM from within the Makefile just as you would run gcc). Which emulator will get you there with the least amount of work?

dosemu does exactly that. It even has a dumb terminal mode for this exact purpose (-t).

I've been trying dosemu2, it's pretty good. Dosemu2 very badly needs better documentation, at least if the dosemu2 github is the starting point. Very basic things are not mentioned in the first documents you look at, like "exitemu" to exit the emulator and Ctrl-Alt-Home to grab/ungrab the mouse. The man page is incorrect for executing single commands, you need to type this to capture the output from a single command:

    dosemu -dumb -exec dir >foo
Or this if you want to see the output on the screen:

    dosemu -dumb -E dir
Post reply on HN