8bitbubsy wrote on 2025-01-28, 12:16:Thanks for the constructive input! […]
Show full quote
Thanks for the constructive input!
I have replaced the compressor with upx now.
As for SB detection, I do it like most other programs:
1) Reset the DSP by sending a 1 to the reset port, then wait at least 3µs before sending a 0 to the reset port again
2) Read a byte from the DSP "read data" port (when it's ready). If the byte is 0xAA, then a Sound Blaster sound card has been successfully detected
However, I just found out that the Sound Blaster programming guide suggest you try to do step 2) a lot of times until you give up, instead of just once. I doubt this fixes your issue, but I have rewritten it to be like that now and included a new PT4DOS version below.Do you have the same sound card detect problem with FT2, btw.
Great news! I got it working (with caveats) because of your changes. I had to destub and replace the DOS32A extender entirely with either D3X or the ancient DOS4GW 1.97. When either of these extenders was stubbed into the linear executable of PT4DOS and all other things were equal (SBEMU loaded as above) ,and I specified on the command line a .MOD to play, it worked and played the module perfectly. However whenever I moved the mouse pointer, the program crashed with an exception 0D. I was unable to open a .MOD via your file menu, immediate crash (Exception 0D).
It may have something to do with my "modern" system (i5-8250 with trackpad mouse via CTMOUSE in DOS, no serial mouse or serial ports in the system). NB: I got further with the DOS4GW extender than with the D3X extender. With DOS4GW, I could actually move the mouse pointer and do a few things before it crashed. None of this was possible with DOS32A extender; crashed without playing anything).
Implementing your step 2 above re: detecting Soundblaster seems to have fixed the detection problem I was having. (In all previous PT4DOS versions, restubbing with D3X and / or DOS4GW results in an immediate crash even when specifying the .MOD on the command line as above with no sound output, but no error message about SB being disabled by the program, either).
So, next question: are there keyboard equivalents which may be used in lieu of the mouse? This would possibly obviate the crash during .MOD playing, at least in my case. Pressing keys does NOT crash the program, but I don't know if you're polling for keypresses at all. Just a guess, but there's some sort of incompatibility with mouse polling and / or memory management, at least in my very "overpowered" modern system.
As to your FT2 program, I downloaded v. 2.13 and under the same setup as above (i5 8250 cpu, with SBEMU loaded), it doesn't detect SBEMU as a valid Sound Blaster, with SB variable set, etc. Just outputs silence, but the .XM module "plays" fine from the command line, the mouse can be moved (mouse enabled as above with CTMOUSE v 2.0), settings can be altered, etc. SB can't be selected from the setup, just refuses to see it. PC speaker works perfectly, though! No crashes at all, even with SBEMU loaded while running your FT2 2.13. I'm not sure which DOS extender you're using for that program, however. I couldn't destub it and put in either D3X or DOS4GW.exe to try that angle.
Just a guess, but might a change (recompilation) of FT2 2.13 to the same method as you just applied (your #2 above) for its SB detection also magically enable it to work with SBEMU as well? Worth a try for "modern" systems and getting it working via "modern" soundcards like Intel HDA, AC97, etc. via SBEMU / VSBHDA Soundblaster emulation.