First post, by KYA
I've recently acquired an iBase IB945F CPU board. It's a PICMG 1.0 board, so, given an appropriate backplane, it may host some PCI and ISA cards. But the southbridge on that CPU board is ICH10, so it's useless for ISA soundcards. Right? Partly. Fortunately, the board has got an IT8888G PCI-to-ISA bridge. And that bridge supports distributed DMA, or, in short, DDMA.
But what exactly is DDMA? It is a concept of splitting (distributing) a single device (a DMA controller) into multiple ones. Each PCI device may host its own DMA controller with one or more channels. Each of these DMA controllers (there may be up to 7 in one system) responds to its own set of IO ports in the PCI port range. Each of these controllers does all the hard work - it moves data between memory and the PCI device, on which it resides. These controllers are called slave DDMA controllers despite the fact they need to be PCI bus masters to be able to request data from memory for their PCI devices.
But not all DDMA controllers are like this. There's one special controller, the one to rule them all: the DDMA master. There may be only one master in one system. That master listents to IO requests to legacy DMA ports, and commands DDMA slaves to move data.... Wait, what? The only business of that master is telling others what to do? How typical...
Maybe that's why those masters don't exist anymore. Decades have passed since they've been banished from their last distant hideouts in some obscure SiS chipsets. And now DDMA slaves live their free lives just doing nothing. And noone could ever order them to move those chunks of data back and forth again. Until now.
Let me reiterate. The DDMA master is merely a scatter/gather port forwarding agent. It does not require any special signal lines, nor any other custom hardware relations to a chipset, and so it can be replicated in software. And this has been done.
A monumental software Soundblaster emulator - SBEMU, produced by crazii, a renowned guru of PC hardware programming, has been mercilessly stripped out of everything except DMA port trapping. A DDMA master emulator has been coded in those trap handlers. And now this emulator is presented to your attention.
Here's a clip of intros of some of my favorite games, playing their sounds and music through AWE32 and PicoGUS installed into a backplane along the iBase IB945F CPU board:
https://youtu.be/tD2uaxiEV4s
This virtual master can command the real slave DDMA controller inside IT8888G chip to move data from memory to the ISA slots the same way the former real masters did. But of course the virtual one has limitations. Basically, the same limitations, the original SBEMU has. It works only in those real mode games that can tolerate the presence of a memory manager (JEMMEX), and only in those protected mode games that can utilize the preloaded DPMI host (HDPMI32i.exe).
But why bother? Even if all the bugs are ironed out, this virtual master won't be able to surpass SBEMU in terms of compatibility. Why not just run SBEMU instead? Well, I don't have much to say in my defence. Of course, the proper way would be to put this thing into SMM, but as a proof-of-concept it will do as is.
Speaking of compatibility, I have only tested this software on a very limited set of motherboards with a very limited set of sound cards, and on a very limited set of games. Here are my observations.
Motherboards:
1. iBase IB945F - works
2. Advantech PCA 6781 - works (but who cares, this board has got ICH4, so one can just use PPDMA)
3. IEI IMBA-G412ISA - does not work (I was able to produce sound with it by sacrificing an ISA slot and reducing game compatibility even further, so that's not interesting)
Sound cards:
AWE32 CT3600 - works (8bit DMA only)
SB16 CT2940 - works (8bit DMA only)
PicoGUS in GUS and SB modes - works
Games:
Kyrandia 2 - works, but cuts some samples
Lands of Lore - intro works, crashes after selecting a player
Quest for Glory 4 - works in native AWE32 mode
King's Quest 6 - works with the GoSierra patch
Space Quest 3 - Roger says "Where am I?" with the fixed SB driver
Star Control 2 - works in SB mode with CPU cache disabled (otherwise hangs in a minute); works in GUS mode, but with annoying repeated loud clicks which appear and disappear at their will
Wolfenstein 3D - works
Doom - works in SB and GUS modes
Heretic - works in SB and GUS modes
Descent - works in native AWE32 mode
Descent 2 - works in native AWE32 mode
Duke Nukem 3D - works in GUS mode, but with sporadic slowdowns (yes, on a Core2Duo!)
Blood - crashes
Crusader - no sound
IT8888G has 16bit DMA channels, but it seems I've messed up something in my code, so they don't work. Descent 2 sound test does not play 16bit sound at all via DMA5. So, for now, only 8bit sound is working.
The download link is below:
https://disk.yandex.ru/d/Bd-VfsZXWztWCQ
Inside the archive there are two files.
1. ITEXXX.EXE is a DOS application that enables and configures IT8888's DDMA slave controller. It occupies the port range of 8380h-8400h. If you have got some PCI device occupying the same port range, you'll have to disable or remove it.
2. VDMA8.EXE is a DDMA master emulator.
How to run:
1. Build a PC with an industrial motherboard containing an IT8888 PCI-to-ISA bridge (Winbond bridge won't work!)
2. Download crazii's SBEMU, and install it according to his instructions:
https://github.com/crazii/SBEMU/blob/main/README.txt
but don't run it! Remove `SBEMU` line from your autoexec.bat
Put these two lines instead:
itexxx
vdma8
and then reboot.
Please, report back if your configuration works.
P.S. Well, to be honest, the first DDMA master emulator (I know of) has been coded long ago by Yamaha (DSDMA.exe TSR), but it only worked with their own soundcards.