Gona wrote on 2020-10-27, 08:06:
Are GiGi CGL drivers make VXD calls? Really strange, I was sure about CGL drivers are DOS only. This is surprising. Are all GiGi CGL do VxD calls, even the linked-in-binary CGLs too?
Thanks for the driver, today I try to make the first test.
I can only confirm that the 1.67 linked-in GiGi driver makes VXD calls - CGLRW.lib. I know it is making VXD calls because when I disassemble the static library, it has symbols with function names, so it's easy to tell that it checks for Windows and then makes VXD calls to set up the card.
Update: I figured I'd go ahead and page this back in. The static library version of the GiGi CGL driver has some code to check if it's in a win9x dos box. If it finds this to be the case, it makes private (definitely not Windows) VXD calls. These functions are:
GG_InitVxdCall - gets the VXD entry for service 369Dh.
GG_VXDLockDevice - makes a 300h call
GG_VXDUnlockDevice - makes a 301h call
GG_VXDSetCGLMode - makes a 3005h call
It looks like they are basically there to allow for DOS CGL games to run, without conflicting with the existing Windows support for the card - the CGL library asks the VXD to enter a CGL mode, I would guess this mode is so that no DDraw/D3D driver routines try to interact with the hardware.
If I disassemble EAGLEMVD.VXD that is in the driver I provided earlier, the VXD Req_Device_Number matches, it is 369Dh.
If I disassemble the V86_API_Proc it registers, it handles 300h, 301h, and 3005h. 300h/301h set internal state and 3005h makes a vmm call to Map_Flat, which looks to be used to map the address range of the card for the CGL driver.
So I think we can safely say that, at least the linked-in GiGi driver supports running games in a Windows 9x dos box via VXD calls, and that it pairs with at least this specific driver, because it registers the same VXD service number that the static library looks up, and it has routines for each of the VXD calls that the static library makes. As to whether it works at all? I cannot say. 😀 But at least I can say that the driver I provided goes with the static library I have, which I think is the same GiGi library that is statically linked into some CGL games.
I have confirmed that VCT3DBD.VXD in both C3DB-95UPD-1-US and 3D-95STD-3-US also handle these same VXD calls.