OPL2LPT

Discussion about old sound cards, MIDI devices and sound related accessories.

Re: OPL2LPT

Postby matze79 » 2018-5-19 @ 05:43

Ok now it works, i missed the thingverse entry, the file above is just the case top..
matze79
Oldbie
 
Posts: 1123
Joined: 2014-12-12 @ 14:25
Location: Germany, Frankonia

Re: OPL2LPT

Postby dreamblaster » 2018-5-22 @ 19:59

matze79 wrote: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, MIDI PCB's, and video converters
OPL2LPT, OPL3LPT, X2, S2, S2P, MCE2VGA, ... many projects ! Have a look, and thanks for your support !
dreamblaster
Oldbie
 
Posts: 603
Joined: 2015-1-18 @ 19:34
Location: Belgium

Re: OPL2LPT

Postby matze79 » 2018-7-03 @ 13:31

except for the clamps everything is fine, a screwable version would be much better.
matze79
Oldbie
 
Posts: 1123
Joined: 2014-12-12 @ 14:25
Location: Germany, Frankonia

Re: OPL2LPT

Postby SteveC » 2018-7-23 @ 22:01

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
SteveC
Newbie
 
Posts: 68
Joined: 2017-11-25 @ 22:05
Location: Rayleigh, Essex, UK

Re: OPL2LPT

Postby Scali » 2018-7-24 @ 07:05

SteveC wrote: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.
Scali
l33t
 
Posts: 3543
Joined: 2014-12-13 @ 14:24

Re: OPL2LPT

Postby noop » 2018-7-24 @ 16:15

SteveC wrote: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.

Check this list for the games that are verified to work. https://github.com/pdewacht/adlipt/wiki ... sted-Games
Generally, if a game does not work with TSR and is not in this list, it may be not supported. Yet.
User avatar
noop
Member
 
Posts: 103
Joined: 2015-7-20 @ 15:42
Location: Belarus, Minsk

Re: OPL2LPT

Postby sayjionix » 2018-8-05 @ 17:23

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.
User avatar
sayjionix
Newbie
 
Posts: 6
Joined: 2018-8-05 @ 16:59

Re: OPL2LPT

Postby noop » 2018-8-06 @ 12:14

sayjionix wrote: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.
User avatar
noop
Member
 
Posts: 103
Joined: 2015-7-20 @ 15:42
Location: Belarus, Minsk

Re: OPL2LPT

Postby Vipersan » 2018-8-07 @ 13:24

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
Vipersan
Oldbie
 
Posts: 673
Joined: 2018-1-10 @ 10:31

Re: OPL2LPT

Postby derSammler » 2018-8-07 @ 13:41

Wolf3D and Lemmings should work with the TSR and don't require patching.

Also, last time I checked the OPL2LPT drivers and source, there were instructions included how game patching is done.
derSammler
Oldbie
 
Posts: 1779
Joined: 2017-4-14 @ 11:30
Location: Germany

Re: OPL2LPT

Postby Vipersan » 2018-8-07 @ 13:44

derSammler wrote:Wolf3D and Lemmings should work with the TSR and don't require patching.

Also, last time I checked the OPL2LPT drivers and source, there were instructions included how game patching is done.

Thanks for the info ...
but I will want to learn the skill of patching ..
I do have other DOS games that may require this.
cheers
VS
Vipersan
Oldbie
 
Posts: 673
Joined: 2018-1-10 @ 10:31

Re: OPL2LPT

Postby derSammler » 2018-8-07 @ 13:52

Seems in 0.7 the section about how to make patches was removed. Here it is from 0.6:

Code: Select all
## Writing patches

The patches are stored in YAML files in the `patterns/` directory.
Each file can have multiple patches, I try to keep related patches
together. Generally each target needs two patches, one for the Adlib
detection routine and one for the actual Adlib I/O.

Each patch consists of a search pattern and a replacement code fragment.

### Search patterns

The search pattern is specified as an assembly fragment, but there are
certain special keywords that can be used.

**ANYBYTE, ANYWORD, ANYDWORD** can be used as a wildcard for an
arbitrary 1/2/4 byte value. For example:

    mov dx, word ptr [ANYWORD]
    out dx, al

In this pattern, the address of the variable is not important and
might differ in different builds of the game. So it's best to accept
anything.

**BEGIN/ALT/END** mark alternative code sequences. For example:

    BEGIN
      mov dx, 0x389
    ALT
      inc dx
    END

This is useful to match slight variations in a single pattern.

**BEGIN/REPEAT** marks possible repetition. For example:

    BEGIN
      in al, dx
    REPEAT

The fragment must appear at least once.

**BEGIN/OPTION** marks a fragment that might or might not appear.

    BEGIN
      nop
    OPTION

#### Problems:

ANYBYTE/ANYWORD won't work for relative offsets. So instead of `call
ANYWORD`, you'll have to write `db 0xE8, ANYBYTE, ANYBYTE`. Same for
short jumps.

Surprisingly often x86 instructions have multiple encodings. For
example, `mov ax,bx` might be encoded as `89 D8` or as `8B C3`. If
NASM picks the wrong encoding, you'll have to spell out the bytes
explicitly.

The implementation is a gross hack.

### Replacement code

The replacement code is an ordinary assembly fragment. The keyword
PORT can be used *once* to get the parallel port I/O address.

ADPATCH ships with a few standard replacements that can be `%include`d:

- `standard.s`: the standard OPL2LPT code. Expects the OPL2 register
  in AL and the data in AH.
- `standard32.s`: same, as 32-bit code.
- `compact.s`: a slower but smaller version. Will pop register and data
  (separately) from the stack.

If the replacement code is shorter than the matched fragment, it will
be padded with NOPs.
derSammler
Oldbie
 
Posts: 1779
Joined: 2017-4-14 @ 11:30
Location: Germany

Re: OPL2LPT

Postby Vipersan » 2018-8-07 @ 14:02

Many thanks buddy..
rgds
VS
Vipersan
Oldbie
 
Posts: 673
Joined: 2018-1-10 @ 10:31

Re: OPL2LPT

Postby sayjionix » 2018-8-12 @ 21:40

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:
compare_texted.png

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:
compare2_texted.png

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
User avatar
sayjionix
Newbie
 
Posts: 6
Joined: 2018-8-05 @ 16:59

Re: OPL2LPT

Postby 640K!enough » 2018-8-12 @ 22:40

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.
640K!enough
Member
 
Posts: 401
Joined: 2017-5-11 @ 17:52
Location: Canada

Re: OPL2LPT

Postby SteveC » 2018-8-13 @ 11:02

@sayjionix Good work! I'll see if I can have a play with this tonight.
SteveC
Newbie
 
Posts: 68
Joined: 2017-11-25 @ 22:05
Location: Rayleigh, Essex, UK

Re: OPL2LPT

Postby dreamblaster » 2018-8-13 @ 15:56

sayjionix wrote: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, MIDI PCB's, and video converters
OPL2LPT, OPL3LPT, X2, S2, S2P, MCE2VGA, ... many projects ! Have a look, and thanks for your support !
dreamblaster
Oldbie
 
Posts: 603
Joined: 2015-1-18 @ 19:34
Location: Belgium

Re: OPL2LPT

Postby TimWolf » 2018-8-13 @ 16:06

24 pages is an ocean to read through. Saw this on a youtube video. Where do I order? Would be great to update the first post :)

Thanks
TimWolf
Newbie
 
Posts: 34
Joined: 2018-7-16 @ 18:41

Re: OPL2LPT

Postby dreamblaster » 2018-8-13 @ 16:26

OPL2LPT : https://www.serdashop.com/OPL2LPT
OPL3LPT : https://www.serdashop.com/OPL3LPT

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, MIDI PCB's, and video converters
OPL2LPT, OPL3LPT, X2, S2, S2P, MCE2VGA, ... many projects ! Have a look, and thanks for your support !
dreamblaster
Oldbie
 
Posts: 603
Joined: 2015-1-18 @ 19:34
Location: Belgium

Re: OPL2LPT

Postby TimWolf » 2018-8-13 @ 17:30

dreamblaster wrote:OPL2LPT : https://www.serdashop.com/OPL2LPT
OPL3LPT : https://www.serdashop.com/OPL3LPT

good idea to update the first post, i added links.
I will update my signature as well.


:exclamation: 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?" ~
TimWolf
Newbie
 
Posts: 34
Joined: 2018-7-16 @ 18:41

PreviousNext

Return to Sound

Who is online

Users browsing this forum: No registered users and 2 guests