I've been working on adding an implementation of I/O port trapping to JEMM 
using the EMM386/QEMM API (INT 2F.4A15).  I have it basically working.


I want to clear up some misconceptions, though.  As far as the I/O port 
trapping, MS did a really crummy job of implementing it.  Bob Smith of Qualitas 
found this out as he was implementing it in QEMM.  E.g., the MS implementation 
only supports byte I/O (not Word or DWord), has a very limited number of port 
traps that it can implement, and doesn't always uninstall the I/O traps 
correctly.  The description in RBIL is incomplete and doesn't even detail the 
de-installation procedure.  Qualitas' implementation fixed the MS problems and 
expanded its features (but I've never actually seen or tested the Qualitas 
implementation).  I've added even more features in the JEMM implementation.


Even though I have it basically working, it's still far from where it needs to 
be and would really like someone else to take it and finish so I can 
concentrate on other things.  If anybody wants to do it, I'll send you the code 
I've got so far and try to explain my thinking.


One of the main things missing is supporting JLMs (JLOAD needs to be fixed to 
make it compatible).  However, if this is going to be a "fork" of JEMM rather 
than an "upgrade", fixing JLOAD may not be necessary.


The main reason I started working on it was to support my USB drivers, and in 
particular the ability to virtualize the following kinds of USB devices:


Keyboards
Mice
Joysticks/Game Pads
Serial/COM ports
Sound Cards
Ethernet Cards
Parallel ports (maybe -- these aren't as critical as Serial/COM ports)


E.g., for an Ethernet card, it's possible to implement a USB Ethernet drive as 
a simple packet driver, but virtualizing something like an NE2000 at the 
hardware level opens up many more possibilities for compatibility with older 
programs.


A couple of the things I've added in my JEMM implementation are support for 
ports below 100h (though each port can only have a single "manager" or 
"virtualizer") and IRQ virtualization (which requires manipulation of ports 20h 
and 70h).  One thing that I think still definitely needs to be added is DMA 
virtualization, though I haven't yet worked through the details on how to do 
that.  And, of course, let's not forget the documentation which I haven't even 
started yet (and which I'm sure most implementers would just slip through the 
cracks).


I've also created a test program to be able to test all the features to make 
sure they work.


The version of JEMM I started with when I did this was 5.79, and I think 
Japheth has a newer version out and Japheth's latest changes would also need to 
be incorporated.  I also went through and "cleaned up" some of the code to make 
it look more consistent.


Anyway, does anybody else want to take this over and finish it?  I know a lot 
of people want to see it happen (including me), and I think I've got a good 
start on it.


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to