Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
RayeR

Homepage

CZ,
08.01.2024, 18:38
 

Sound Blaster Pro Test IRQ autodetect-how it wrks,IRQ sharing (Developers)

Hi,
to get a real SB-compatible sound support under DOS (instead of half-working emulators) I designed and built my LPC2ISA adapter that allows me to connect any ISA card (including ISA DMA support) to relative "modern" motherboard via TPM header that exposes the LPC bus. There are some catches and hacks needed, whole story about the HW at VOGONS thread: https://www.vogons.org/viewtopic.php?p=1221763#p1221763

Currently it's working but with some minor SW issue - some programs that rely on soundcard autodetection doesn't find it properly. With manual settings it works. One example is Creative Sound Blaster Pro Test program from 1992 bundled with some SB drivers and also programs using MIDAS sound library that was very popular in '90 era and maybe more. The problem is caused probably by IRQ 7 sharing with LPT port but I cannot avoid this because of nature of PnP enumeration at boot. SETUP has no option to reserve IRQ for legacy device and when I disable LPT the IRQ is stolen by onboard PCI devices that don't work with IRQ sharing at all so I need keep LPT enabled at boot to other PCI devices keep out.

I tested SBPro test program on old 386 machine with native ISA without LPT and soundcard autodetection works fine there. On my MB with LPC2ISA bridge it ends with an error:
http://rayer.g6.cz/hardware/lpc2isa/sbptst1.jpg
http://rayer.g6.cz/hardware/lpc2isa/sbptst2.jpg
Programs using MIDAS doesn't detect soundcard too but when they can enable manual sound setup and I select IO, IRQ, DMA manually it works then.

I had some ideas to try, one was to completly disable the LPT block in SuperIO chip after boot. To do this a friend of mine Ruik made DOS ports of Linux tools ISADUMP and ISASET (maybe usefull for someone else):
http://rayer.g6.cz/download/download.htm#ISADUMP
When I disabled the LPT it helped with MIDAS programs so they autodetect soundcard properly then. But SBPro Test program still show an ERROR on IRQ7 and cannot continue (cannot force the value). I also tried to clear LPT address value and count in BDA but didn't helped. Any idea how SBPro Test perform IRQ autodetection and how to make in working? Any idea what else to clear/disable to kill any evidence of LPT that could disturb the SBPro Test?

---
DOS gives me freedom to unlimited HW access.

DosWorld

09.01.2024, 03:26
(edited by DosWorld, 09.01.2024, 03:45)

@ RayeR

Sound Blaster Pro Test IRQ autodetect-how it wrks,IRQ sharing

IMHO, don’t care about programs which try to detect sb/ess etc (too non-stable way with random % of meet POST screen). %BLASTER% must be enough. From my point of view, no other way to get (or provide) correct info about sb. If somebody don’t read this env string (and try to play with pnp-cards), thats his problem. If MIDAS can do it successful, it is just exceptional case.

---
Make DOS great again!

Carthago delenda est, Ceterum censeo Carthaginem delendam esse.

RayeR

Homepage

CZ,
09.01.2024, 06:12

@ DosWorld

Sound Blaster Pro Test IRQ autodetect-how it wrks,IRQ sharing

I don't know how much but I guess there's more DOS programs that tries some kind of autodetection than just Creative SBPro Test. A lot of demos don't have any setup, they just run. And probably not all reads the BLASTER env. So my goal is to make it compatible as possible to old good native ISA system. And when it worked on that 386 there must be a way how to do the same on this system. I belive the SBPro Test is confused by some leftovers by LPT port that I disabled but not 100%. Maybe PIC is still programmed some way, no idea now...

And I forget a video https://www.youtube.com/watch?v=ywgrP-Ki3v4

---
DOS gives me freedom to unlimited HW access.

rr

Homepage E-mail

Berlin, Germany,
09.01.2024, 21:29

@ RayeR

Sound Blaster Pro Test IRQ autodetect-how it wrks,IRQ sharing

> I don't know how much but I guess there's more DOS programs that tries some
> kind of autodetection than just Creative SBPro Test. A lot of demos don't
> have any setup, they just run. And probably not all reads the BLASTER env.

Get "PC Underground in PDF format" from https://www.phatcode.net/articles.php?id=225 and read pages 323 and 324. There is described how to detect SB base port and IRQ, but not DMA.

---
Forum admin

RayeR

Homepage

CZ,
10.01.2024, 05:28
(edited by RayeR, 11.01.2024, 15:00)

@ rr

Sound Blaster Pro Test IRQ autodetect-how it wrks,IRQ sharing

> Get "PC Underground in PDF format" from
> https://www.phatcode.net/articles.php?id=225 and read pages 323 and 324.
> There is described how to detect SB base port and IRQ, but not DMA.

Thanks, I never did DOS sound programming but I got the idea. I also downloaded the book CD archive where are full pascal sources for sb lib and sample player. It's better to start debug something with sources. I just tried it run and they didn't work.

VOCDEMO.EXE - with autodetection it hangs, I can hear a pop at the start, when forced commandline options it ended with Pass no. 1, Runtime Error 005. It displayed that SB and mixer detected so I guess IRQ problem.

MOD386.EXE - misdetected IRQ to 10 instead of 7. When forced to 7 it ended with Runtime Error 103. It displayed that SB and mixer detected so I guess IRQ problem.

SFXPRO.EXE - started playing but no sound, doesn't support manual setup.

I tried some other demos from BONUS directory with 50% success rate. Even one demo that has sound setup and I properly set the resources didn't work - failed with SB detection.

UPDATE: I found some bugs in VOCPLAY library so it seems not be good sample to use...

---
DOS gives me freedom to unlimited HW access.

RayeR

Homepage

CZ,
14.01.2024, 06:27

@ RayeR

Sound Blaster Pro Test IRQ autodetect-how it wrks,IRQ sharing

After playing more with resources I found that IRQ7 for ISA soundcard is some way unreliable even if not shared with anything (I disabled all USB controllers, LAN and LPT). It works better with IRQ5 (SBPro test autodetection and some other programs) but I have to disable LPT block after boot by writting to SuperIO chip. I cannot disable LPT in setup because otherwise USB controllers will take it and there's no other option to keep IRQ5 not used by PCI devices...

---
DOS gives me freedom to unlimited HW access.

Back to the board
Thread view  Mix view  Order
22049 Postings in 2034 Threads, 396 registered users, 266 users online (1 registered, 265 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum