dmsc / emu2

Simple x86 and DOS emulator for the Linux terminal.
GNU General Public License v2.0
406 stars 31 forks source link

Windows [7] run without Cygwin? #19

Open tonypdmtr opened 3 years ago

tonypdmtr commented 3 years ago

This is exactly the program I've looking for (for years) as I have many DOS-era utilities that I need to run under Windows 7 console.

[I haven't been able to make DosBox[-x] work with text-only apps in a simple manner.]

I managed to get this emulator work straight out of the box by compiling under Gycwin, and running it there. But, I want to be able to run it under Windows console directly. It fails. I suppose it needs to be compiled differently.

Any hints on that?

dmsc commented 3 years ago

Hi @tonypdmtr !

I wrote the code for an Unix OS, it does a few assumptions:

I won't oppose to a native Windows port, and I can help anybody interested in porting, but I won't write the port myself.

Have Fun!

strikersix23 commented 2 years ago

I got it to compile and run the issue i had was with the cmd prompt was having scattered rendering just like with qemu no graphic im looking for a fix. Compilation was done using msys2

johnsonjh commented 1 month ago

I looked into a native MS C port, but the most complex will be to replace the use of signals with NT native timers. The git source code has an implementation of setitimer and such that could be borrowed.

dmsc commented 1 month ago

Yes, the use of signals simplify a lot of the code, as it allows the emulator to use blocking I/O and release the CPU; but also be able to emulate DOS interrupts.

many DOS programs depend on interrupts for reading the keyboard and redrawing the screen!

Seeing the git for windows code, it is not complicated, it simply spawns a thread that periodically calls mingw_raise(SIGALRM)

Have Fun!

johnsonjh commented 1 month ago

mingw_raise is something it implements as well, I'll look more into it over the weekend maybe

strikersix23 commented 1 month ago

I got it working with minor issues awhile back it's been forever since then