Is YM2164 a possible replacement for ym2151?

Get help from the community & developers with the X16 hardware if you can't find the solution elsewhere
Post Reply
GTR3QQ
Posts: 136
Joined: Wed Apr 05, 2023 8:04 pm

Is YM2164 a possible replacement for ym2151?

Post by GTR3QQ »

I was browsing the net about YM2151, and I found this quote from Wikipedia.

Compared to the OPM, the OPP has the same pinout and functional features but some minor changes to control registers. Differences are the test register address (9), the timer B resolution (period doubled: 2048 clock cycles on OPP vs. 1024 on OPM), and 8 undocumented registers (0-7).[2] Due to how the FB-01 and IBM MFC hardware use those registers, swapping an OPM into these hosts does not operate correctly.

https://en.m.wikipedia.org/wiki/Yamaha_YM2164

and this from msx from.

While the Yamaha SFG-01 module for the CX5M computer series contained the well-known YM2151 OPM, the SFG-05 module instead contained the YM2164 OPP chip. Although for the most part equivalent to the YM2151, there are a few differences in some of the control registers.

For the majority of functions, please refer to the YM2151 OPM application manual. Below we will describe the differences.
Differences from the OPM

Firstly, the test register. On the OPM the test register is at address 1. On the OPP, the test register is at address 9. The one officially documented function of the test register is the LFO reset function.

Secondly, timer B (CLKB). On the OPM it has a period of 1024 cycles. On the OPP it has a period of 2048 cycles. Therefore any period value set on the OPP should be shifted right by 1 bit relative to the OPM value. Since the specified period is negated, make sure to shift in a “1” into the leftmost bit when you do so.

T B (s) = 2048 * ( 256 - CLKB ) ϕM

ϕM = 3579545 ⁢Hz

Lastly, the OPP has 8 undocumented registers at addresses 0-7. These are initialised to 10H by the SFG-05 BIOS. Their function is as of yet unknown.


[url]http://map.grauw.nl/resources/sound/yam ... 64.php[url]

Knowing little about the software design of cx16, I want to know if a patch in the firmware or a 'driver' or something can be made to support this chip as well?
it's pin compatible and mostly register-compatibe.

Haven't checked the chip availability. Will follow up in the next post.
GTR3QQ
Posts: 136
Joined: Wed Apr 05, 2023 8:04 pm

Re: Is YM2164 a possible replacement for ym2151?

Post by GTR3QQ »

The initial inquiry shows that the availability of the YM2164 is similar if not worse than Ym2151.
But maybe more 2164 will pop up later if I dig little bit further.
So perhaps it worth a look-into to make YM2164 compatible?
Post Reply