VOGONS


The way to detect OPL3 clone

Topic actions

Reply 20 of 41, by Jo22

User metadata
Rank l33t++
Rank
l33t++

You're welcome, it has been a privilege. :)
Edit: I've just found an ES1370 in the garage and so I made an effort to test a few more cards.
I've also tested CQM (CT3620/SB32) and YMF-262 (PAS16), as suggested by Stretch.
Hope that's okay. I'm out of odd sound cards for now.

Attachments

  • Filename
    oplsilicon_ymf262.mp3
    File size
    294.64 KiB
    Downloads
    131 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    oplclone_ct1749_cqm.mp3
    File size
    300.76 KiB
    Downloads
    112 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    oplsilicon_ym3812.mp3
    File size
    293.63 KiB
    Downloads
    113 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    oplclone_es1370.mp3
    File size
    293.63 KiB
    Downloads
    149 downloads
    File comment
    Creative/Ensoniq ES1370 (SB PCI 64, AudioPCI 3000);
    features an OPL3 parody (provided via TSR)
    File license
    Fair use/fair dealing exception

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 22 of 41, by datajake1999

User metadata
Rank Newbie
Rank
Newbie

I have a friend who has a Crystal sound card on there Windows 98 machine, and he ran the program on the machine in dos mode, and it turns out the card has a clone. I am not sure of the exact model of the card, but I remember it is a cs42 something.
Edit: My friend didn't make a recording because he didn't have a patch cable at the time.

Reply 23 of 41, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Thanks a lot for your reply, datajake1999!
When you said Windows 98 machine, I got a flashback and remembered my Armada laptop.
- It is running Win98SE and I totally forgot it also has an internal AudioDrive.

@nukeykt No problem, I'm happy to support this project. ^_^
I also wonder about the other Yamahas, too. OPL1, OPNA and OPN2 (YM2612) in particular.
The OPN2 was often considered the Sega Genesis' counterpart to the OPL3, or so I heard.

Attachments

  • Filename
    oplclone_es1878.mp3
    File size
    285.47 KiB
    Downloads
    122 downloads
    File license
    Fair use/fair dealing exception

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 24 of 41, by nukeykt

User metadata
Rank Member
Rank
Member

OPN2 has this bug too.(YMF276 variant at least)
Here's my test code:

  for(int i = 0; i < 0x200; i++)
{
writereg(i,0);
}
writereg(0x34,0x03);
writereg(0x3c,0x01);
writereg(0x44,0x0f);
writereg(0x4c,0x06);
writereg(0x5c,0x02);
writereg(0x64,0x00);
writereg(0x6c,0x00);
writereg(0x74,0x00);
writereg(0x7c,0x00);
writereg(0x84,0x00);
writereg(0x8c,0x00);
writereg(0xa4,0x24);
writereg(0xa0,0x0e);
writereg(0xb0,0x00);
writereg(0xb4,0xc0);
writereg(0x54,0x00);
writereg(0x28,0xc0);
delay(1);
writereg(0x54,0x1f);

EDIT: Tested both YM2612 and YM3438. These chips also have this bug.

Attachments

  • Filename
    opn2bug_ym3438.mp3
    File size
    317.29 KiB
    Downloads
    107 downloads
    File comment
    YM3438
    File license
    Fair use/fair dealing exception
  • Filename
    opn2bug_ym2612.mp3
    File size
    202.88 KiB
    Downloads
    103 downloads
    File comment
    YM2612
    File license
    Fair use/fair dealing exception
  • Filename
    opn2bug.mp3
    File size
    308.27 KiB
    Downloads
    101 downloads
    File comment
    YMF276
    File license
    Fair use/fair dealing exception

Reply 25 of 41, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Wow, thank you very much for testing! 😁

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 29 of 41, by Stojke

User metadata
Rank l33t
Rank
l33t

Sorry to interrupt, but what kind of an OPL does an CMI8738 have (Specs)? Is it usable under DOS, are there modern Windows OPL players that suport it (Theres an PCIE version of CMI8738-MX chip)?

Note | LLSID | "Big boobs are important!"

Reply 30 of 41, by betamax80

User metadata
Rank Member
Rank
Member

Hmm the 8738 did have DOS and 9x drivers back in the day. I've got hold of the older files (I call it the build 639 hiatus, as they stayed on that build for years until they started doing updates and the PCIe budget variants) - I've done an upload on vogonsdrivers including the DOS installer and the 9x/2k/earlier XP drivers.

Reply 31 of 41, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hmm the 8738 did have DOS and 9x drivers back in the day.

There were some DOS drivers for CMI8x38, uploaded by tikbalang..
The thread is over here at Re: Sound Blaster 16 Clones
Personally, I also wrote something little about CMI cards a long time ago (link).
I don't know if it's still useful, though, since it was never finished.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 32 of 41, by datajake1999

User metadata
Rank Newbie
Rank
Newbie

I modified oplclone to write to my CMI8738 at address 0xE050 and use inpout32.dll, so I could test it for myself. My CMI8738 produced a sine wave, so that tells me it has a real OPL3, or at the very least a very accurate clone.
I thaught I would post my modified program here, if anyone is interested.
Edit: I added a recording of my CMI8738.
https://drive.google.com/open?id=1xukPpsNcUKK … w5mHu-0qkoH7RvK
Edit 2: You can now set the fm port that the program looks at with the OPL3PORT environment variable. If this variable isn't set the program looks at port 0x388.

Attachments

  • Filename
    oplclone_inpout32.zip
    File size
    56.84 KiB
    Downloads
    88 downloads
    File license
    Fair use/fair dealing exception

Reply 33 of 41, by datajake1999

User metadata
Rank Newbie
Rank
Newbie

I just tested the Opal and Java OPL3 emulators which can be found at the following links.
https://github.com/datajake1999/OPL3EMU/tree/ … ter/Driver/opal
https://github.com/datajake1999/OPL3EMU/tree/ … er/Driver/zdopl

Attachments

  • Filename
    oplclone_opal.mp3
    File size
    392.81 KiB
    Downloads
    84 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    oplclone_java.mp3
    File size
    392.81 KiB
    Downloads
    107 downloads
    File license
    Fair use/fair dealing exception

Reply 35 of 41, by mkarcher

User metadata
Rank l33t
Rank
l33t
Stretch wrote on 2017-08-05, 23:40:

Analog Devices 1868 from Aztech SC16-3d

nukeykt wrote on 2017-07-29, 08:29:

AD1868 - Fail

The AD1868 does exist, but it is an 18-bit stereo audio DAC, which doesn't even contain an OPL3-compatible FM synthesizer. The chip used on the SC16-3D is the AD1816, the post by Stretch obviously used the wrong model number.

Reply 36 of 41, by Stretch

User metadata
Rank Member
Rank
Member
mkarcher wrote on 2023-02-11, 09:14:
Stretch wrote on 2017-08-05, 23:40:

Analog Devices 1868 from Aztech SC16-3d

nukeykt wrote on 2017-07-29, 08:29:

AD1868 - Fail

The AD1868 does exist, but it is an 18-bit stereo audio DAC, which doesn't even contain an OPL3-compatible FM synthesizer. The chip used on the SC16-3D is the AD1816, the post by Stretch obviously used the wrong model number.

You're correct. I retrieved the sound card from storage and the model is Analog Devices AD1816AJS SOUNDPORT.
I will try to edit the original post.

Win 11 - Intel i7-1360p - 32 GB - Intel Iris Xe - Sound BlasterX G5

Reply 37 of 41, by wbc

User metadata
Rank Member
Rank
Member

Have to bump a thread since recently I did some research around Creative CQM chips, and seems I found the (fully) software way to detect if a CQM chip is used instead of OPL3.
As I found out, setting bit 0 of LSI Test register (bank 0 index 1) on CQM chips makes bits 0-6 of status register return some sort of unknown counter value:

Снимок.PNG
Filename
Снимок.PNG
File size
36.48 KiB
Views
941 views
File comment
CQM (CT3600) Status register REP INSB dump after LSI Test set
File license
Fair use/fair dealing exception

If OPL timers/IRQ were used, their status bits seem to be XORed with "counter" values. Setting bit 0 of LSI Test register back to 0 clears bits 0-5 of status register to 0 and brings the chip back to normal operation. Overall, this type of detection seems to not have any side-effects on OPL operation (at least I didn't had any troubles with other games/apps after running those tests)
Setting bits 1 or 2 of LSI Test register causes brief click in audio output, or ,rarely, hanging notes; bit 0 flipping seems to be silent. Other bits appear to have no effects observed.
I did a bit more tests with my pile of OPL3-capable soundcards, and it seems, apart of CQM, none of them have such effect while fiddling with LSI Test registers, thus, this quirk could be used to distinguish CQM from other OPL3-like chips.
For now, I have been able to reproduce this behavior on CT3600 CQM, CT4520 and ViBRA16C cards, so I think other CQM-equipped cards do the same :)

I've also attached an archive with all the tools made and used:
- OPL_ID detects an OPL chip and displays its type (OPL2 single/dual, OPL3/OPL3-L, ESFM or CQM)
- LSITEST flips each bit of LSI Test register of both OPL3 banks, additionally checking index 0, and displays Status register value in form of

Test Bank0 REG00 = 01: 00 08 20 00 C0 C0 E8 C0 A0 A4 80 A0

where the results are split into groups of 4 values (before LSI Test set, immediately after, with 1024 reads delay and finally after LSI Test clear); the groups are "timers not used; Timer 1; and Timer 2" respectively.
- OPLDUMP flips bit 0 if LSI Test Registers and dumps Status register content via REP INSB for further examination (TEST_NOT.BIN - timers not used, TEST_T1.BIN - Timer 1 triggered)
All applications test port 0x388 by default, but this can be overrided by command line, e.g. OPL_ID.EXE 220

please check these on other sound cards and OPL chips (I'm particulary interested in genunie YMF262/YMF289 tests, as closest I had was "LS245" clone on ALS100+ card and YMF71x/724, but other cards are always welcome), and have fun :)

Attachments

  • Filename
    OPL_ID.ZIP
    File size
    267.56 KiB
    Downloads
    45 downloads
    File comment
    OPL2/3 Detection/LSI test stuff and results
    File license
    Public domain

--wbcbz7

Reply 38 of 41, by georgel

User metadata
Rank Member
Rank
Member
wbc wrote on 2023-09-22, 19:33:

... was "LS245" clone on ALS100+ card and YMF71x/724, but other cards are always welcome), and have fun 😀

You probably meant LS262, because LS245 is a mere TTL buffer which is also present on your sound card and externally looks similar.

Reply 39 of 41, by wbc

User metadata
Rank Member
Rank
Member
georgel wrote on 2023-09-23, 09:44:

You probably meant LS262, because LS245 is a mere TTL buffer which is also present on your sound card and externally looks similar.

nope, there are no LS245 buffers soldered on my card (although there are footprints to support IDE interface), and that "LS245" chip is sharing traces with YMF262 footprint on my card:

photo_2023-09-23_16-50-23.jpg
Filename
photo_2023-09-23_16-50-23.jpg
File size
274.26 KiB
Views
874 views
File license
Public domain

which is consistent with findings from this thread: All the truth about FM in ALS100 Plus+ cards (includes facts, tech info and tests)

--wbcbz7