Differences between YM2151 and YM2164

Get help from the community & developers with the X16 hardware if you can't find the solution elsewhere
Post Reply
DragWx
Posts: 342
Joined: Tue Mar 07, 2023 9:07 pm

Differences between YM2151 and YM2164

Post by DragWx »

Announced in an update video on July 6, 2023 (see accompanying thread), as a workaround for the shortage of YM2151 ICs, some X16s will ship with a YM2164 instead; seen as a near-identical twin to the '51 with only slight differences in some obscure functions none of us use.

The Wikipedia page for the YM2164 points to this resource, where the differences are described as:
  • The TEST register (wholly unuseful to programmers except for a single bit for resetting the LFO) was moved from register 1 to register 9.
  • Timer B has double the period on the '64 compared to the '51. If you use Timer B on the FM chip, you'd need to know which you have.
  • There are 8 undocumented registers at registers 0-7, whose function is unknown.
This resource from msx.org describes some feature enhancements the '64 has over the '51, but also shows a completely rearranged register layout! Since the team observed that existing games play correct audio, my guess is that this is an OPL2/OPL3 situation, where the '64 starts in a '51-compatible mode, and there's a register for changing the chip into '64 enhanced mode, or one of the pins on the '64 has become a mode-select pin.

This seems to be all the info available from a cursory search. It sounds like if we just assume we're working with a YM2151, things will just work out regardless of which chip you actually have.
GTR3QQ
Posts: 146
Joined: Wed Apr 05, 2023 8:04 pm

Re: Differences between YM2151 and YM2164

Post by GTR3QQ »

the main problem here is the msx from's translation.

If you click on the msx from's listed source, you'll see that the source files actually says 'the mark in red is parts to be focused on', msx from somehow translated this as 'different is marked in red'.

But really, only the test register and the timmer B is different-ish, if you scroll down the source study you can see this conclusion.
test register is only good for chip manufacturing to test the silicon.
Timmer? so far evey one is using VIA's timmer to generate interrupt.

You can google YM2164 vs YM2151 for sample songs, and they sounds the same.


You can check the discord #sound for some more in depth information about both chips, which started like 2 months ago.
Including a die shot.

The die shot reveals that the 64 is essentially the same chip as 51 with a refined/redesigned register array.
I'd say 85% of the die is a exact carbon copy of 2151.
The EG PG ACC NOISEGEN TIMMINGEN LFO all looks the same.
I haven't located the timmer circuit yet nor the 8 undocumented registers.

The important thing is, it's Plug'n'play right in the 2151 socket, and needed compatibility checks is done proper already.

The craker of today is somehow 2164 is more available than 51.
And it's not a FPGA.

Of course, if you really really want a 2151, I'd imagine bartering your much much rarer 2164 for a 2151 should be trivia as.
DragWx
Posts: 342
Joined: Tue Mar 07, 2023 9:07 pm

Re: Differences between YM2151 and YM2164

Post by DragWx »

Oh I see, so the different register map is actually for the driver, and the driver remaps the address when it goes to write the value to the chip?
And then the extra features, like KSL and AR scaling are done by the driver and a modified TL and AR are sent to the chip?
If that's true, that makes much more sense, and I was just completely misinterpreting the data.
GTR3QQ
Posts: 146
Joined: Wed Apr 05, 2023 8:04 pm

Re: Differences between YM2151 and YM2164

Post by GTR3QQ »

nay, there is no such thing as driver.
99% of the overlapping register is the same.
the 1% is the test register.
so no changes needed at all.

if you exclude the msx from's badly translated report, you'll be less confused since every other places agree with each other.
DragWx
Posts: 342
Joined: Tue Mar 07, 2023 9:07 pm

Re: Differences between YM2151 and YM2164

Post by DragWx »

Nah, I see what happened. The pages in question describe a specific firmware that was being used to drive the 2164 on a specific device, and I fooled myself into thinking it was describing the chip itself. It's cleared up to me now.
voidstar
Posts: 494
Joined: Thu Apr 15, 2021 8:05 am

Re: Differences between YM2151 and YM2164

Post by voidstar »

Just wanted to ping this topic, good stuff. And add a photo of the two chips.

Do the numbers below YM2151 or YM2164 mean anything in particular?
Attachments
YM2164_vs_YM2151.jpg
YM2164_vs_YM2151.jpg (215.01 KiB) Viewed 1446 times
DragWx
Posts: 342
Joined: Tue Mar 07, 2023 9:07 pm

Re: Differences between YM2151 and YM2164

Post by DragWx »

Isn't that usually some kind of date/lot code? Something like, the XXth week of year YY, at manufacturing plant ZZ. That'd be my guess, anyway.
voidstar
Posts: 494
Joined: Thu Apr 15, 2021 8:05 am

Re: Differences between YM2151 and YM2164

Post by voidstar »

I read on old NEC boards (like the 1979 NEC PC-8001) you don't see "normal" dates because in Japan, they mark years relative to the year of their Emperor (at least as a fashion into the mid-1980s, not sure about today; the YM2151 was released 1983).
DragWx
Posts: 342
Joined: Tue Mar 07, 2023 9:07 pm

Re: Differences between YM2151 and YM2164

Post by DragWx »

I noticed that the YM3812 (OPL2) seems to have a similar marking as the YM2164, and that brought me to this page, which explains that those are indeed two different kinds of date codes that Yamaha used; in your photos, the YM2164 shows the older one, and the YM2151 shows the newer one.
Post Reply