VOGONS


First post, by elyosh

User metadata
Rank Newbie
Rank
Newbie

Hi, I'm trying to verify a quirk in the OPL3 datasheet regarding the timers period (it is documented as being tov[ms] = (255-N)*0.08, versus tov[ms] = (256-N)*0.08 for all other OPL), for that I need the help of OPL sound card owners to run a quick test program under DOS on their hardware.
Testing on any (real) OPL would also be helpful for comparison, OPL2/OPL3/OPL3-L..

The program is available here: https://bobox.elyosh.org/open/OPLPROBE.EXE or as a bootable floppy image here: https://bobox.elyosh.org/open/OPLPROBE.IMG
It will output something like this which you can then provide me : oplproben.png

Thanks a lot !

Reply 2 of 12, by elyosh

User metadata
Rank Newbie
Rank
Newbie
DerBaum wrote on 2022-07-31, 11:53:

I will test some cards later. I have real opl 2 /3 / L and clones .
Why do you need this data? Want to make a program, a game or hardware? Im just curious.

That would be really helpful, thanks.
I'm working on the 86Box emulator, and this would allow to accurately emulate the real hardware's behavior.

Reply 3 of 12, by Tiido

User metadata
Rank l33t
Rank
l33t

I posted 5x results into the attachments. I have no OPL2 to play with for the time being. Timer 1 with 255 is highly variable with its result on my test machine (1.4GHz PIII machine with VIA chipset)

Anyway for completeness sake :
The timer circuitry runs off YM's sample rate which for
OPL2 is MCLK / 72 = 3579545 / 72 = 49715.90277....Hz (20.11428... µs)
OPL3 has 4x higher MCLK but it is divided down by 4x so end result is same as OPL2
OPL3L is a little trickier, MCLK there is 33868800Hz and internal sample rate slightly different from OPL2/3 : 33868800 / 684 = 49515.78947...Hz (20.19557...µs), which is then decimated into standard 44100Hz rate (33868800 / 768) for final audio output.

OPL2/3 Timer 1 counts every 4x YM output cycles (80.457153...µs), Timer 2 every 16x YM output cycles (321.82861...µs).
OPL3L Timer 1 has (80.78231...µs), Timer 2 every 16x YM output cycles (323.12925...µs).

I'm pretty sure the 255 is a typo, though it is difficult to gauge from the results I got as 255 result on Timer 1 is all over the place.
Timer 1 period is supposed to be (72 * 4) * (256 - T1val) clock cycles
Timer 2 period is (72 * 16) * (256 - T2val) clock cycles

Timer value of 0 should be longest possible count and using that will determine if 255/256 difference is actually there, if it is 255, 0 will show much different result. (it is not something I have personally tested) so perhaps you should make a test with 0 value aswell.

Attachments

  • YMF719.jpg
    Filename
    YMF719.jpg
    File size
    493.61 KiB
    Views
    930 views
    File comment
    YMF719
    File license
    Public domain
  • YMF278B 2.jpg
    Filename
    YMF278B 2.jpg
    File size
    446.5 KiB
    Views
    930 views
    File comment
    YMF278B 2
    File license
    Public domain
  • YMF278B 1.jpg
    Filename
    YMF278B 1.jpg
    File size
    389.68 KiB
    Views
    930 views
    File comment
    YMF276B 1
    File license
    Public domain
  • YMF262.jpg
    Filename
    YMF262.jpg
    File size
    410.95 KiB
    Views
    930 views
    File comment
    SB16 YMF262
    File license
    Public domain
  • CT1747.jpg
    Filename
    CT1747.jpg
    File size
    492.54 KiB
    Views
    930 views
    File comment
    SB16 CT1747
    File license
    Public domain

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 4 of 12, by elyosh

User metadata
Rank Newbie
Rank
Newbie
Tiido wrote on 2022-07-31, 13:55:
I posted 5x results into the attachments. I have no OPL2 to play with for the time being. Timer 1 with 255 is highly variable wi […]
Show full quote

I posted 5x results into the attachments. I have no OPL2 to play with for the time being. Timer 1 with 255 is highly variable with its result on my test machine (1.4GHz PIII machine with VIA chipset)

Anyway for completeness sake :
The timer circuitry runs off YM's sample rate which for
OPL2 is MCLK / 72 = 3579545 / 72 = 49715.90277....Hz (20.11428... µs)
OPL3 has 4x higher MCLK but it is divided down by 4x so end result is same as OPL2
OPL3L is a little trickier, MCLK there is 33868800Hz and internal sample rate slightly different from OPL2/3 : 33868800 / 684 = 49515.78947...Hz (20.19557...µs), which is then decimated into standard 44100Hz rate (33868800 / 768) for final audio output.

OPL2/3 Timer 1 counts every 4x YM output cycles (80.457153...µs), Timer 2 every 16x YM output cycles (321.82861...µs).
OPL3L Timer 1 has (80.78231...µs), Timer 2 every 16x YM output cycles (323.12925...µs).

I'm pretty sure the 255 is a typo, though it is difficult to gauge from the results I got as 255 result on Timer 1 is all over the place.
Timer 1 period is supposed to be (72 * 4) * (256 - T1val) clock cycles
Timer 2 period is (72 * 16) * (256 - T2val) clock cycles

Timer value of 0 should be longest possible count and using that will determine if 255/256 difference is actually there, if it is 255, 0 will show much different result. (it is not something I have personally tested) so perhaps you should make a test with 0 value aswell.

Thanks for testing ! My measuring of the time is only accurate to around 10-20 µs, so that would account for the variability you see with timer 1 at 255.
I agree with you that the "255" in the OPL3 datasheet is most likely a typo.
What is much stranger to me is your results with "YMF278B 1.jpg " where you basically get the same period no matter what.. is that the same sound card as in "YMF278B 2.jpg" or a different one ?

Reply 5 of 12, by DerBaum

User metadata
Rank Oldbie
Rank
Oldbie

YAMAHA OPL2 YM3812-F (Aztech (I38-MMSD801) Sound Galaxy NX II)

2022-07-31 16.05.56.jpg
Filename
2022-07-31 16.05.56.jpg
File size
1.52 MiB
Views
897 views
File license
CC-BY-4.0

YAMAHA OPL3L YMF289B (Aztech (I38-SN96103) MM Pro IIB-3D)

2022-07-31 16.09.21.jpg
Filename
2022-07-31 16.09.21.jpg
File size
1.67 MiB
Views
897 views
File license
CC-BY-4.0

CRYSTAL OPL3L (clone) CS4289-KQ (Unknown Manufacturer CS32-3DI)

2022-07-31 16.35.58.jpg
Filename
2022-07-31 16.35.58.jpg
File size
1.59 MiB
Views
897 views
File license
CC-BY-4.0

System Pentium 1 200MMX.

Last edited by DerBaum on 2022-07-31, 15:08. Edited 4 times in total.

FCKGW-RHQQ2

Reply 6 of 12, by Tiido

User metadata
Rank l33t
Rank
l33t
elyosh wrote on 2022-07-31, 14:07:

What is much stranger to me is your results with "YMF278B 1.jpg " where you basically get the same period no matter what.. is that the same sound card as in "YMF278B 2.jpg" or a different one ?

It is a different sound card, and yeah, it was weird to see that happen. I'm not sure why it was so either, since all tests were done in pure DOS with exact same environment so maybe the card has some hidden fault on it.

T-04YBSC, a new YMF71x based sound card & Official VOGONS thread about it
Newly made 4MB 60ns 30pin SIMMs ~
mida sa loed ? nagunii aru ei saa 😜

Reply 8 of 12, by elyosh

User metadata
Rank Newbie
Rank
Newbie
DerBaum wrote on 2022-07-31, 14:42:
YAMAHA OPL2 YM3812-F (Aztech (I38-MMSD801) Sound Galaxy NX II) 2022-07-31 16.05.56.jpg […]
Show full quote

YAMAHA OPL2 YM3812-F (Aztech (I38-MMSD801) Sound Galaxy NX II)
2022-07-31 16.05.56.jpg

YAMAHA OPL3L YMF289B (Aztech (I38-SN96103) MM Pro IIB-3D)
2022-07-31 16.09.21.jpg

CRYSTAL OPL3L (clone) CS4289-KQ (Unknown Manufacturer CS32-3DI)
2022-07-31 16.35.58.jpg

System Pentium 1 200MMX.

Thank you for testing. It's interesting to see that the only card that actually implemented the typo from the OPL3 datasheet that causes the timer to expire immediately if it is set to 255 is your Crystal CS4289 clone !

Reply 9 of 12, by DerBaum

User metadata
Rank Oldbie
Rank
Oldbie
elyosh wrote on 2022-07-31, 15:55:

Thank you for testing. It's interesting to see that the only card that actually implemented the typo from the OPL3 datasheet that causes the timer to expire immediately if it is set to 255 is your Crystal CS4289 clone !

If somebody wants to see the card...

2022-07-31 16.36.47.jpg
Filename
2022-07-31 16.36.47.jpg
File size
1.94 MiB
Views
832 views
File license
CC-BY-4.0

on the top left you see the "CS4289-KQ" OPL3L clone. The Chip right next to it on the right side "4333-KS" is the DAC.
(The unpopulated pads below the chips are for a real YMF262 and YAC512.)

FCKGW-RHQQ2