RayeR wrote on 2025-08-21, 12:09:
Thx for report but I wouldn't say 'yeah' until done.
That I/O read/writes works is good but it doesn't proof that DMA transfer in memory would really perform as expected. What chipset has the MB you tested on? You say it doesn't have any own legacy DMA. Some pages back you mentioned that some 3xx chipset had some DMA leftover and responded to some adresses. But in this case it seems IO is properly forwarded to the ITE bridge instead onboard PCH so it's good (did you need configure this some way?)
Next there may be some IRQ routing problem. Maybe you could use your FDC to generate some IRQ and see if it pass...
Oh of course, I just meant that It works in the sense we could talk to the card, as debug.exe would give nonsensical results/crash/hang without the PCI to ISA bridge card plugged in.
I don't remember the nixsys chipset offhand, I can't find any information on the nixsys board since it's a very old nixsys pc, I'll have to investigate further, i may have mentioned it in a previous post but i forgot what it was if I did. But since debug was giving nonsensical results/crash/hang, I'm assuming it's not there. Maybe I'm misguided here. Oh yeah that's a good point with the reference to the 3xx chipset stuff. No configuration of any kind was needed.
Ah that's an interesting test with the FDC. I think I can do that with debug.exe. (Leaving tests here to comeback to, so i don't forget)
Tests todo:
Monitor IRQ in XP by Device Manager->View->Resources by type->Interrupt request, then test below. […]
Show full quote
Monitor IRQ in XP by Device Manager->View->Resources by type->Interrupt request, then test below.
The reset sequence often generates an interrupt when the controller comes out of reset.
Reset FDC, Release Reset + enable DMA, Check main register status.
-o 3F2 00 ; Reset controller (clear bit 2)
-o 3F2 0C ; Release reset + enable DMA
-i 3F4 ; Check main status register
Motor enable changes can trigger interrupts even with no drive.
Enable motor for non-existent drive:
-o 3F2 1C ; Enable motor A + DMA + no reset
-o 3F2 2C ; Enable motor B + DMA + no reset
Issue FDC Commands
Send commands that will immediately fail/complete:
-o 3F5 08 ; "Sense Interrupt Status" command
-i 3F5 ; Read result (might trigger interrupt)
Or try:
-o 3F5 0 […]
Show full quote
-o 3F5 08 ; "Sense Interrupt Status" command
-i 3F5 ; Read result (might trigger interrupt)
Or try:
-o 3F5 07 ; "Recalibrate" command
-o 3F5 00 ; Drive 0 parameter
Instead of manually triggering interrupts, try:
~
The main things now that will have to be done is since I'm trying to target windows xp as a baseline, a WDM driver for the GUS will need to be developed. In addition, the WDM driver will need to do several things to accomplish the pci transaction stuff. I have source code for a WDM GUS driver (Gravis UltraSound WDM Driver Project: https://popelka.ms.mff.cuni.cz/~stoupa/gus/), I studied it for a bit and mapped out a pathway, but there's quite a bit that would have to be done still. Although the main parts of the WDM GUS driver, is kind of done, all I need to do is really slap in the bridge card stuff and it should theoretically work. Finally my PCI isolation card with dump switch will come in handy, haha!
- Address Alignment: Ensure ITE8888 I/O decode ranges exactly match PicoGUS requirements
- Timing: Configure appropriate ISA bus timing for reliable PicoGUS communication
- DMA Setup: Properly configure DDMA channels for audio streaming
- Error Handling: Implement proper fallback if bridge configuration fails
- Resource Conflicts: Ensure no conflicts with other ISA devices on the bridge (since the card's single slot could be expanded via ISA bus extender)
Full List of Driver Stuff
[…]
Show full quote
- Driver must find the ITE8888F bridge first
- Basic ITE8888 Bridge Config
- ISA Address Space Config
- Config ITE8888 I/O Decode Spaces
- Memory Space Config
- DMA and Interrupt Config
- Config DDMA Channels
- Config Serial IRQ
- ISA Bus Timing Config
- Enable Delayed Transactions
- Bridge Address Mapping Table
- Update Driver's Address Translation
- PicoGUS Detection/Validation
- Detect PicoGUS Specifics
- Register Resource Allocation
- Enable Bridge Operation
EDIT: Today I made some large headway on the WDM GUS driver modification. Not compiled yet, but the ITE8888 code is turning out to be a lot less code than I was anticipating.
I have been making all my additions detection based. If the driver detects the bridge card, it will use an ITE8888 PCI transactional pathway, if it doesn't it will use the driver's original ISA pathway. This way if I or anyone else who modifies it makes strides in adding missing features to the driver for GUS, It would support both bridged and non-bridged GUSes. Building it this way, in the future I or someone can strip out the GUS stuff, leaving the dual pathway driver shell so they can take that driver shell and build a desired driver on top of it. Anyways hope you're all doing well.
~
EDIT 2: It might actually be possible to "sandbox" already compiled drivers through like a I/O virtualization and redirection layer. I will research this as it would be WAY better to support already developed drivers. Instead of developing drivers from scratch. I can think of 5 ways this might be possible., there are probably more ways, but I can't think of any. Manual Filter Driver with I/O Interception (Difficult and Risky), System Call Hooking (Aggressive and Unstable), WDM Filter Driver (Cleanest and Recommended), Runtime Binary Patching (Dangerous and Fragile), Hypervisor-Level Interception (Complex and Overkill) I think the WDM Filter Driver is the most valid choice here. Existing as an upper filter driver for GUS I/O redirection, this would be the most likely to work with the least amount of friction. A properly implemented WDM filter driver gives us everything we need with minimal risk. Like I said I'll investigate this further.
Windows WDM filtering cannot intercept direct hardware access. RIP. However, I think this is even better because after messing around. I don't think there is a need a filter driver! I think all that's needed for more than just say GUS/sound cards is a Bridge Configuration Driver. (You don't actually need it since we are programming the configuration on the card itself via an EEPROM) Though with a configuration driver, we can configure the bridge anyway we'd like in OS land, so any existing WDM drivers could work transparently if the driver sets the bridge up correctly. For example a READ_PORT_UCHAR((PUCHAR)0x220) call will:
- Go to chipset as I/O port access
- Get routed to PCI bus
- Be claimed by IT8888F bridge
- Be converted to ISA transaction
- Reach the actual GUS card
Either way (bridge config / hand rolled driver) both still requires the chipset to forward I/O to PCI bus. This is the main point of lots of arguments of it not working. Might be dead for most modern systems, but who knows maybe the chipsec results from 3xx are more telling and they still do it... Need more time to test and validate.
~
Now none of this will help cards with only VxD drivers... Though i've been told there are existing VxD-to-WDM translation layers used in some places. I'm not sure how that works, or if it's even real (though the source of the claim can be trusted). I know Win98 supported both VxD and WDM both natively, but I was told this isn't what they were describing. They were specifically talking about a custom translation layer that encapsulates a VxD and makes it work as if it's a WDM. I'll have to interrogate the source and figure out more. I HIGHLY doubt this is actually true as there are several points of impossibility I can think of, if it does work it's probably a very very minimal VxD translation. As some things like DOS/BIOS calls, V86 mode, VMM service dependencies all in VxD land would be completely impossible in WDM only land.
I was right, it's an extremely minimal translation. Not applicable. RIP cards with no WDM driver.