Reply 80 of 240, by vetz
- Rank
- l33t
Putas, I'm trying to source a Permedia NT card and I think I've found a PM3040 which you have on your vintage3d.org. Do you know the PCI ID's on it or have tested it?
Putas, I'm trying to source a Permedia NT card and I think I've found a PM3040 which you have on your vintage3d.org. Do you know the PCI ID's on it or have tested it?
Furan, those were Id and subsystem Id for the card only. The Delta has also Id 3D3D:0003, so this should not change.
Putas wrote on 2020-08-18, 11:08:Furan, those were Id and subsystem Id for the card only. The Delta has also Id 3D3D:0003, so this should not change.
0x3D3D:0003 -> unchanged
0x3D3D:0004 -> 0x104C:3D04
https://www.dropbox.com/s/vgyok4zhmnjajiv/PER … NTTID2.zip?dl=0
Still error 699.
Putas wrote on 2020-08-18, 12:12:Still error 699.
Could you download and extract this tool:https://pascal.sources.ru/hardware/pci.zip
then from DOS run:
PCI -D > report.txt
and paste the c0ntents from report.txt?
Thanks.
vetz wrote on 2020-08-18, 10:43:Putas, I'm trying to source a Permedia NT card and I think I've found a PM3040 which you have on your vintage3d.org. Do you know the PCI ID's on it or have tested it?
That one is 104C-3D04 / 0000-0000 (Rev 01).
It has an NT version?
furan wrote on 2020-08-18, 10:11:I would guess 0x3D04 is the TI ID for Permedia
Yes, this is TI ID:
http://www.downloadwindowsdrivers.info/pci/ve … _104c/dev_3d04/
Gona wrote on 2020-08-18, 12:37:I think the Delta ID sholuld change to the TI numbers.
Not to be grumpy but what would be great is just a PCI dump to see what IDs the card is using. With a multifunction PCI card, knowing the TI Permedia VID/PID is good, but I did not get the Delta VID/PID. The tool above will just walk the bus and spit out the IDs.
Here is the report.
https://vintage3d.org/data/REPORT.TXT
furan wrote on 2020-08-18, 12:39:Not to be grumpy but what would be great is just a PCI dump to see what IDs the card is using.
True.
Putas wrote on 2020-08-18, 12:41:Here is the report.
https://vintage3d.org/data/REPORT.TXT
You were right it is indeed 3DLabs:
Vendor 3D3Dh 3DLabs Inc Ltd
Device 0003h GLINT Delta Geometry Processor
Let me set up some fake devices in DosBox and see if I can debug through it.
furan wrote on 2020-08-18, 12:44:Let me set up some fake devices in DosBox and see if I can debug through it.
BTW Putas your website is awesome and really brings me back!
I have put together a DTDTEST with the patch here:https://www.dropbox.com/s/xc1yn8ng7eztv3o/test_ti.zip?dl=0
The control flow for CGL startup is that (for hotlinked CGL) the game calls cglLoad() in HOTCGL.LIB which attempts to find and load a driver. Once it finds the right flavor of driver it loads it and calls an internal method on it, cglBoardPresent(). This is the code we are patching. If cglBoardPresent succeeds, cglLoad() returns 0 and all is successful. If cglLoad() fails it returns one of the following error codes to the game:
CGL_SUCCESS = 0,
<snip>
CGL_ERR_CDL_MISSING = 601,
CGL_ERR_CDL_NOTDLD = 602,
CGL_ERR_CDL_WRONGVER = 603,
CGL_ERR_CDL_NOMEM = 604,
CGL_ERR_CDL_READERR = 605,
CGL_ERR_CDL_LINKERR = 606,
CGL_ERR_CDL_FAILURE = 699,
So for you, it looks like either the CGL file could not be found, or cglBoardPresent() failed.
After this is done the game will eventually call cglInitScreen() to set a display mode and set up the card. For DTDTEST (test.exe) if cglLoad() fails, it will print out the error code. If cglLoad() succeeds but it fails calling cglInitScreen it will print out:
"Init Screen Device Unsuccessful"
So I set up a local repro with my patched debug dosbox and those PCI devices, as can be seen with PCI -D:
Searching for PCI Devices using the System BIOS
Vendor 104Ch Texas Instruments (TI)
Device 3D04h TVP4010 Permedia
<snip>
Vendor 3D3Dh 3DLabs Inc Ltd
Device 0003h GLINT Delta Geometry Processor
<snip>
So with the environment in test_ti.zip. I did the following from the test.exe dir:
SET HOTCGL=.\PMPATCH
test.exe -cgl
I then watched the PCI devices get enumerated, cglLoad() succeeds (no 699 error), but as expected for me and my fake devices in dosbox, test.exe finally prints out:"Init Screen Device Unsuccessful" because cglInitScreen() will fail. I don't have the real devices in my DosBox.
At the very least, this is what you should be seeing - you should not see the 699 error. Can you try unzipping this dir as is with the directory structure intact, then doing those commands:
SET HOTCGL=.\PMPATCH
test.exe -cgl
Thanks!
Putas wrote on 2020-08-18, 12:30:vetz wrote on 2020-08-18, 10:43:Putas, I'm trying to source a Permedia NT card and I think I've found a PM3040 which you have on your vintage3d.org. Do you know the PCI ID's on it or have tested it?
That one is 104C-3D04 / 0000-0000 (Rev 01).
It has an NT version?
No, I mixed them up in the excitement. Forget about it.
furan wrote on 2020-08-18, 13:15:BTW Putas your website is awesome and really brings me back! […]
BTW Putas your website is awesome and really brings me back!
I have put together a DTDTEST with the patch here:https://www.dropbox.com/s/xc1yn8ng7eztv3o/test_ti.zip?dl=0
The control flow for CGL startup is that (for hotlinked CGL) the game calls cglLoad() in HOTCGL.LIB which attempts to find and load a driver. Once it finds the right flavor of driver it loads it and calls an internal method on it, cglBoardPresent(). This is the code we are patching. If cglBoardPresent succeeds, cglLoad() returns 0 and all is successful. If cglLoad() fails it returns one of the following error codes to the game:
CGL_SUCCESS = 0,
<snip>
CGL_ERR_CDL_MISSING = 601,
CGL_ERR_CDL_NOTDLD = 602,
CGL_ERR_CDL_WRONGVER = 603,
CGL_ERR_CDL_NOMEM = 604,
CGL_ERR_CDL_READERR = 605,
CGL_ERR_CDL_LINKERR = 606,
CGL_ERR_CDL_FAILURE = 699,
So for you, it looks like either the CGL file could not be found, or cglBoardPresent() failed.After this is done the game will eventually call cglInitScreen() to set a display mode and set up the card. For DTDTEST (test.exe) if cglLoad() fails, it will print out the error code. If cglLoad() succeeds but it fails calling cglInitScreen it will print out:
"Init Screen Device Unsuccessful"So I set up a local repro with my patched debug dosbox and those PCI devices, as can be seen with PCI -D:
Searching for PCI Devices using the System BIOS
Vendor 104Ch Texas Instruments (TI)
Device 3D04h TVP4010 Permedia
<snip>
Vendor 3D3Dh 3DLabs Inc Ltd
Device 0003h GLINT Delta Geometry Processor
<snip>
So with the environment in test_ti.zip. I did the following from the test.exe dir:
SET HOTCGL=.\PMPATCH
test.exe -cglI then watched the PCI devices get enumerated, cglLoad() succeeds (no 699 error), but as expected for me and my fake devices in dosbox, test.exe finally prints out:"Init Screen Device Unsuccessful" because cglInitScreen() will fail. I don't have the real devices in my DosBox.
At the very least, this is what you should be seeing - you should not see the 699 error. Can you try unzipping this dir as is with the directory structure intact, then doing those commands:
SET HOTCGL=.\PMPATCH
test.exe -cglThanks!
Great job!
Getting a little off topic but I should mention - one of the routines called by the HOTCGL loader is cglBoardConfigure(). Basically, the loader looks for the environment variable HOTCGL_CFG to know where HOTCGL.INI is, and then if it finds it, opens the file and calls cglBoardConfigure() in the CGL driver with each parsed line. Every driver seems to have its own settings.
The Battle Arena Toshinden demo ships with the following hotcgl.ini, for Verite:
;
; HOTCGL configuration file for CGL v1.70
;
; *DMA options*
; Uncomment "Never" to disable DMA usage.
;DMA=Never
; Uncomment "Use" to attempt DMA usage. DMA may not work on all systems.
;DMA=Use
The cglBoardConfigure() routine in the Verite driver parses for DMA=Never, DMA=Use, nodma=1 and dma=1.
For the unreleased Permedia driver, the following values are checked:
CPU=(scalar value, stored, haven't figured out what this is - if we are lucky maybe the driver has code to do geometry setup with the CPU instead of the Delta)
SR=(1 or 0 - seems to be setup & render logging to fopen("MONO$",...)
MCLK=(scalar value, stored - seems to be Permedia MCLK value, see here but don't mess with this just yet please: http://www.zaptech.com/commentary/3dlabs/faq/PMW95FREQchange - I'm not sure how the value is supposed to be encoded as this is part bitfield in the register, so we should make sure we know how it works before experimenting)
For the Cirrus Logic Laguna3D, the cglBoardConfigure() routine is unimplemented and just ends up being cglStub(), which returns CGL_ERR_CDL_FAILURE. So It's possible if you have a HOTCGL.INI/HOTCGL_CFG environment set, the driver will just fail to initialize.
For 3D Blaster VLB/GiGi, the cglBoardConfigure() routine is just an empty routine that returns zero.
Thanks for all the effort, but still error 699.
Putas wrote on 2020-08-18, 15:41:Thanks for all the effort, but still error 699.
You are getting error 699 with just that test_ti environment, and following those exact steps?
Sorry, I blew it. The last one finally executes the demo. However, the screen flashes wildly.
Putas wrote on 2020-08-19, 15:35:Sorry, I blew it. The last one finally executes the demo. However, the screen flashes wildly.
That's progress! It may be that you need to tweak some of the settings, or it may be that the extra instructions I bummed to be able to do use 2 PCI vendor IDs in the patch broke the driver - I will try it with my card with both vendor IDs/product IDs set to mine, but in the form of the patch.
You could try with some other games now if you like.
Putas wrote on 2020-08-19, 15:35:Sorry, I blew it. The last one finally executes the demo. However, the screen flashes wildly.
And DTDTEST needs mouse.