Closed jsmolina closed 1 year ago
Adlib FX is not compatible with OPLx music, because it sets the registers in an specific way and then bitbangs with attenuation commands, so only digital sound is supported. It's possible to use music though, selecting the new PCM music device (basically plays RAW music like a CD player).
To make it work I think more steps are required. _ADBFXServiceInterrupt from ns_adbfx.c should call _AL_SendOutputToPortOPLxLPT instead of outp instruction directly (this was an optimization I made to spent as little time as possible to send data to the OPL chip. Also _ADBFXInit probably needs to be changed, as it requires to wait an specific amount of time to initialize the registers (to set the highest possible frequency in one channel).
Edit: The Adlib FX code only supports 8-bit mono sound, but works on both OPL2 and OPL3 chips. Other issue is that the volume is generally low, some amplification is required to make it sound properly.
Edit 2: I could prepare a test executable to test this, probably tomorrow.
I've built an executable to test if these changes work, don't know really if it will work π
thanks! I'll test this afternoon and provide you feedback.
I've built an executable to test if these changes work, don't know really if it will work π
I tried by disabling music and only setting ADLIB FX, and no FX were played at all.
Is there a way to know that the LPT port is getting data? (debug mode).
I could modify the code to create a file based log and see what's the initialization process and what's written to the ports. I'll try to get it done this week. Also I've bought an OPL2LPT, so I will be able to test myself. Hope it delivers soon.
Edit: I'll send you a custom cfg, because the setup program is not updated and I think that is another issue. Do you have an OPL2LPT or an OPL3LPT?
I could modify the code to create a file based log and see what's the initialization process and what's written to the ports. I'll try to get it done this week. Also I've bought an OPL2LPT, so I will be able to test myself. Hope it delivers soon.
Edit: I'll send you a custom cfg, because the setup program is not updated and I think that is another issue. Do you have an OPL2LPT or an OPL3LPT?
I do have an OPL3LPT. they are compatible (OPL3LPT can work in OPL2LPT mode). Thanks!!
I've received the OPL2LPT v2 from Serdaco and been able to do some testing. Here are the good news, PCM playback on OPL2LPT works, so this feature will be included in the next release π
I've received the OPL2LPT v2 from Serdaco and been able to do some testing. Here are the good news, PCM playback on OPL2LPT works, so this feature will be included in the next release π
that's really nice!!
I was wondering if it was possible to port the adlib fx to LPT version, as this device sounds good and it's an alternative for people without ISA/PCI slots.
Tried settings:
In both cases, no FX at all. I tried past weekend these changes, I checked Reset function from
ns_adbfx.c
uses same blocks of code, so maybe it's not feasable or not prepared for stereo.Am I missing some extra declaration?