Ok now it works, i missed the thingverse entry, the file above is just the case top..
Oh okay, hope it turned out OK
Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !
but couldn't get Descent to work with this - is that too modern a game?
Yes, the TSR for the OPL2LPT only works for 16-bit realmode games (8088-286). Descent is a 32-bit game, and the TSR stops working when an application switches the CPU to 32-bit mode, basically.
The game could be made to work if it were patched directly, but I don't think the patch-utility supports this game yet.
Fancied a bit of DOS action tonight as I have finally acquired a CRT, but couldn't get Descent to work with this - is that too modern a game?
Cheers,
Steve
Games like Descent require patching instead of TSR utility. Once patching is done, modified executable will work with OPL2LPT without any additional software, but won't work with "normal" Adlib-compatible cards.
Doom & Heretic worked great for me. Will now check if Descent works.. well, it doesn't.
Hi!
Just got my OPL2LPT two weeks ago and tried it on several machines after the soldering assembly. While it works like a charm on my IBM Thinkpad 380D (games tested so far: Prince of Persia, LHX Attack Chopper, Monkey Island 1), I have exactly the same issue that also SteveC faces with his PS/2 system on two of my other systems:
On my 486 SX-25 notebook as well as on my 386 DX-40 desktop system, I can only hear very distorted single notes that don't seem to follow any (slowed down) melody. Exact the same issue that SteveC has recorded in his video (linked on page 10). On the DX-40, at least OPL2TEST.EXE plays the correct melody, the problem appears only when the Adlipt TSR is loaded and I try some games. On the SX-25 notebook, even OPL2TEST doesn't work and only plays distorted, screechy frequencies.
Unfortunately, the SX-25 BIOS doesn't let me change much settings, so I only disabled all other peripherals except from the LPT port - still no change. The DX-40 uses a regular LPT/Serial/Gameport controller card.
It makes me wonder if there could be another source of the problem that has nothing to do with the PS/2 models...
Will perform some more tests the next days and try to find out what could cause this issue.
Unfortunately, the SX-25 BIOS doesn't let me change much settings
OPL2LPT uses standard LPT port mode (not bi-dir/EPP/ECP), but the problem is probably caused by notebook outputting 3.3 V levels on LPT. Using lower resistor values (2 long yellow things) could possibly help here.
So ..finally got round to assembling my OPL2LPT unit ..as my recent multi OS PC build has no ISA slots ..therefore In pure DOS mode I have no sound ..
I have tested it with the driver TSR and test.exe ..
all working fine .
I guess I need to learn how to patch DOS games next..
I have no knowledge of assembler ..but can follow detailed instructions.
Perhaps someone would be kind enough to detail the steps ?
or point me to a tutorial.
An example would be Wolf3D or Lemmings..
I guess this has to be done on each machine ..so not possible to download pre-patched EXEs ..?
rgds
VS
Seems in 0.7 the section about how to make patches was removed. Here it is from 0.6:
1## Writing patches 2 3The patches are stored in YAML files in the `patterns/` directory. 4Each file can have multiple patches, I try to keep related patches 5together. Generally each target needs two patches, one for the Adlib 6detection routine and one for the actual Adlib I/O. 7 8Each patch consists of a search pattern and a replacement code fragment. 9 10### Search patterns 11 12The search pattern is specified as an assembly fragment, but there are 13certain special keywords that can be used. 14 15**ANYBYTE, ANYWORD, ANYDWORD** can be used as a wildcard for an 16arbitrary 1/2/4 byte value. For example: 17 18 mov dx, word ptr [ANYWORD] 19 out dx, al 20 21In this pattern, the address of the variable is not important and 22might differ in different builds of the game. So it's best to accept 23anything. 24 25**BEGIN/ALT/END** mark alternative code sequences. For example: 26 27 BEGIN 28 mov dx, 0x389 29 ALT 30 inc dx 31 END 32 33This is useful to match slight variations in a single pattern. 34 35**BEGIN/REPEAT** marks possible repetition. For example: 36 37 BEGIN 38 in al, dx 39 REPEAT 40 41The fragment must appear at least once. 42 43**BEGIN/OPTION** marks a fragment that might or might not appear. 44 45 BEGIN 46 nop 47 OPTION 48 49#### Problems: 50 51ANYBYTE/ANYWORD won't work for relative offsets. So instead of `call 52ANYWORD`, you'll have to write `db 0xE8, ANYBYTE, ANYBYTE`. Same for 53short jumps. 54 55Surprisingly often x86 instructions have multiple encodings. For 56example, `mov ax,bx` might be encoded as `89 D8` or as `8B C3`. If 57NASM picks the wrong encoding, you'll have to spell out the bytes 58explicitly. 59 60The implementation is a gross hack.
…Show last 17 lines
61 62### Replacement code 63 64The replacement code is an ordinary assembly fragment. The keyword 65PORT can be used *once* to get the parallel port I/O address. 66 67ADPATCH ships with a few standard replacements that can be `%include`d: 68 69- `standard.s`: the standard OPL2LPT code. Expects the OPL2 register 70 in AL and the data in AH. 71- `standard32.s`: same, as 32-bit code. 72- `compact.s`: a slower but smaller version. Will pop register and data 73 (separately) from the stack. 74 75If the replacement code is shorter than the matched fragment, it will 76be padded with NOPs.
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:
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:
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!
As far as I'm aware, the schematics were never shared, but I asked about this long ago. From what I've read, according to the standard, the control lines should have 1.2k pull-up resistors in place. As we've discovered, there can be significant variations in the many implementations of parallel ports, and the standard suggests that as one way to increase the likelihood that a device will work on the largest number of systems.
Hi again!
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.
Hi,
not many people experience a problem,
this seems a like a great and safe mod to be more compatible, in case you experience this problem.
Well done !
Serge
Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !
good idea to update the first post, i added links.
I will update my signature as well.
Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !
good idea to update the first post, i added links.
I will update my signature as well.
😲 You rock!
I'm going to get one of these for my Tandy RLX HD. I'm not going to put the port on it. I'm going to mount it internally and pipe it through the Tandy sound board sharing the volume knob. Goal is to have a switch for the Tandy Sound / LPT port so that I can still use the printer and Tandy sound on one setting, and the Adlib on the other. "Think it'll wouerk?" ~