Howdy.
>Re Adlib: Maybe there's someone else on the list who has a more intimate
>knowledge of that driver, or at least knows which driver subfunction
>"load patches" is?
All names are my own. Readers may change them to protect the innocent.
In general, patches get loaded by the InitDevice call (sound driver
subfunction 2). For the Adlib driver, the contents of patch 003 are copied
into an array at offset 0x0CB4. [1]
Since the Adlib must do mapping between MIDI and hardware channels, patch
information gets loaded on the fly. The DoSoundEvents call (subfunction 8)
calls PatchChange (at offset 0x1B98). PatchChange makes two calls that look
suspicious, though I never explored them. The first is to 0x1F2C, and the
second is to 0x2385.
If I were looking for what the driver does with patch data, I'd check those
two functions out.
Cheers,
Ravi.
[1] - The patch consists of 48 instruments of 28 bytes each. The file may
either end there or hold the magic number 0xABCD (stored big-endian as I
recall). If the magic number is present, another 48 instrument definitions
follow. The magic number is not transfered into the array at 0x0CB4.