Hi again!
today I made some analyses to find out what causes the OPL2LPT to output only distorted screechy sounds on some of my computers / IO-controllers. I think I came to an idea and an option to fix it, but not sure if this is the preferred way, so please let me know what you think.
I started installing a second I/O-controller card to my 386 in parallel to the existing one and configured it as a second LPT port. With this new controller card, I got OPL2LPT running just fine in test mode as well as in TSR mode. So I wondered what's the difference between both controllers and why the first one is only producing screechy sounds. I then configured both cards to have the same LPT address (378h - 37Fh) and in that way, both cards are transmitting the exact same data on their LPT ports. An oscilloscope comparisson of the Data 0-7 lines, the STROBE/A0 line and the Reset/WR line revealed that the timing of both controllers is exactly the same. However, the second (working) controller card is running 3.3V signal levels on the Data0-7 lines, whereas the first (non-working) controller uses 5V levels. As it was the non-working controller using the 5V, it proves that the OPL2LPT is working fine with having only 3.3V levels (as expected), so the voltage levels are not an issue.
What finally revealed the problem was a look at the STROBE line (connected to the YM3812 A0-pin via the resistor network) in combination with the RESET line (connected to the YM3812 WR-pin via the resistor network). RESET is toggled once after STROBE is pulled Low and a second time after STROBE is pulled High again. For whatever reason - the non-working controller card (as well as my 486sx-25 notebook) don't seem to have an internal pull-up, to have a defined edge of STROBE to go High again - leading to a capacitive rising edge and causing RESET to be interpreted by the Yamaha YM3812 before STROBE is interpreted High. I made some screenshots to show the behaviour of 4 reference scenarios (my 386 with the two controllers, my Thinkpad 380D and my 486sx) - STROBE is yellow, RESET is pink:
The attachment compare_texted.png is no longer available
Interesting enough is the fact, that the OPL2TEST program was always working on both controller cards. A comparisson between Monkey Island 1 running with ADLIPT TSR and the OPL2 test program shows, that apparently the test program leaves a bit more time in between STROBE going high and RESET toggling, so that it must have been enough to work with the YM3812:
The attachment compare2_texted.png is no longer available
I fixed the problem by installing a 1k resistor on the OPL2LPT board in between +5V and STROBE (pin 1 on the DSUB connector), to act as an external pull-up. This gives a defined edge to the STROBE signal and works perfectly on both controlller cards and also my 486 notebook 😀 So it's finally time to tune in some Adlib game soundtracks 😉
Please let me know if this could be considered as a fix or if it might rise some other issues that I haven't thought of so far. However, I'm wondering why this problem seems to be so rare and I've got bad luck twice with my notebook and my first controller card...
@SteveC: Would be interesting to hear if this can also get the OPL2LPT working on your PS/2 machine!
Cheers, sayjionix