Subject: Re: An idea using emulation
From: Jeff Garzik <jgarzik@pobox.com>
Date: Fri, 23 Apr 1999 14:59:39 -0400 (EDT)

On Fri, 23 Apr 1999, Dean Beeler wrote:
> Hey, this may be just a shot in the dark, but I think this has a
> possiblity.  Perhaps there are better ways of doing this, but I have
> found that if I use DOSEmu to monitor the ports where my U.S. Robotics
> 33.6K Winmodem are located, I can, of course, trap the port accesses.
> My idea is that this could be used as a start to reverse engineer the
> U.S. Robotic's DSP, am I correct?  Another "emulation" observation is
> that using Wine, I am able to correctly load the WinModem driver files,
> unfortuanetly, there lacks any way to communicate to the drivers so
> simply loading them is worthless, but it this too, is a start, I
> believe.

I have put some thought into this, though don't kid yourself:  It is a
_lot_ of work.

There exists a utility on http://www.sysinternals.com/ called VxDMon,
which allows you to watch I/O activity of Win95 device drivers.  This
sounds like a good data collection util, but I've never used it.

Either with WINE or our own solution, the emulation would not only need
to interpret x86 code, but it would also need to implement the Win95
device API with bug-for-bug compatibility.  That is what has taken WINE
so much time to get as far as they are today.

Now DOSemu can currently emulate 16-bit real mode, using the TWIN
(http://www.willows.com/) interpreter, but it would probably need to be
enhanced before it could fully support the Win95 device API.

Another alternative is go with the common case:  most of these Winmodems
go into x86 boxes anyway.  Go for direct execution (ie. don't interpret
binary code at all), and simply trap the Win95 device API calls.  This
approach would be leagues faster than an x86 emulator, but also more
unstable.

	Jeff