rasteri wrote on 2024-04-14, 15:16:
If you run SBDIAG without clearing the DMA registers does IRQ work?
If it does, maybe go through the DMA registers and see if leaving one alone fixes IRQ
I've found the answer. Actually port 21h is being used for IRQ stuffs and should not be touched.
With that port excluded when resetting DMA registers, I can now make the sound card pass through IRQ* as well as DMA tests in DIAGNOSE. There's a problem with DMA, however:
- While I can trivially set DMA1, DMA5 was not reliable. Configuration of DMA5 would fail for the first few times but it will eventually succeed.
- After those initial failures, subsequent runs of DIAGNOSE would not observe errors when configuring DMA5, until system restart.
* Still need to disable onboard audio as it was the original reason why IRQ7 was not working.
After successfully setting everything up in DIAGNOSE, all SFX tests (8-bit, 16-bit) work correctly, as well as FM.
SBDIAG now reports interrupts fired. However, I could not notice any difference when testing DMA as well as digitized sound. The following phenomena are observed:
- DMA test generates a tone for about 1s then stops.
- Digitized sound (TADA.WAV) plays fine, but only once.
DIGPAK is still bugged. SETD still exhibits the same behavior with SB16 driver: Playing once then hangs. Playing digitized audio from MENU either produces silent, or it plays, but for no more than 1s (no program hangs, however).
On the other hand, MIDI (330h, through daughtercards) has always been working without issues so far.
So at long last, despite not 100% perfect, I've finally got it working.
weedeewee wrote on 2024-04-14, 15:34:Or... […]
Show full quote
Or...
looking at this and the whole outputb list for the dma
https://bochs.sourceforge.io/techspec/PORTS.LST
0020-003F ---- PIC 1 (Programmable Interrupt Controller 8259)
this one jumps out.
Now that seems to enable all the interrupts according to the text, but that's mostly for older systems, So 'enabling' it causes trouble on newer systems ?
Many thanks for everyone's help here... did not notice this post as I was writing my own response back then...
For now I just commented out the line involving port 21h and IRQ7 works when onboard audio is disabled. It would be better if I could somehow reserve the IRQ in question away from the PIRQ lines so I can keep onboard audio enabled...
The PIC registers don't appear to be straightforward... guess I need to refer to some actual source code to know how they should be manipulated...
And as for the DMA5 issue... maybe later on I should try configuring SB16 to use only low DMA to see if it makes a difference for the failing test cases, as even with my RUBY-9719VG2AR, sound cards that only utilize low DMA like YMF718 and ALS007 perform better in comparison.