What the YM2151 can do in the right hands

Feel free to talk about any other retro stuff here including Commodore, Sinclair, Atari, Amstrad, Apple... the list goes on!
ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

What the YM2151 can do in the right hands

Post by ZeroByte »



On 10/11/2021 at 4:55 AM, kliepatsch said:




That sounds quite impressive. Will these conversions be part of some kind of "universal" player?



I did OPL on-system but it took an 8k LUT. YM2612 and YM2203 would be able to use the same LUT. It’s for converting the note frequencies, which unless there’s some algebra I haven’t done that can simplify the conversation, these calls require large numbers.

For now, I’m pre-converting them into my own byte stream of YM2151+PSG writes. This method means it’s fast on X16 but may consume more space. Usually PSG is the big culprit.

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

What the YM2151 can do in the right hands

Post by ZeroByte »



On 10/11/2021 at 3:30 PM, Kalvan said:




If we time things exactly, with the samples, we may be able to put any two of them through the PCI channel, using the FIFO, since the SegaPCM's channels are 12 bits wide each, and most samples were more like 8 bit wide. 



So... what I'm looking into doing is just collecting the PCM samples and figuring out the sample rate / bit depth / etc from the VGM file in my pre-processor. My thought is to load those into memory along with a generated index file from my preprocessor. Then inject "play digi X" messages into the music data stream. I'm not sure about the analysis / packaging part just yet....

Question for you: is the DAC always always ALWAYS 12-bit data on YM2612? I know the sample rate is not really defined, as that's a product of how fast samples are written to the DAC, but I imagine that any given game was probably consistent - but that is probably a bad assumption. Perhaps if I keep track of delta-T and N-samples played, I can compute the sample rate for a given playback and generate "play digi" commands that include sample rate to be used.

Assumptions - nobody was ever a mad lad enough to do things like compress the digis by having data inteded to be played back with various portions looped in order to get the real sound - e.g. a sample with an attack, a piece of the sustain, and then a decay. It's possible, and given how precious storage space was back then, it may be that games did in fact use techniques like this. For now, I will be happy if I can just get the PCM drum track working for my Sonic the Hedgehog music conversion demo that I posted earlier - you know, for completion's sake. If whatever tactic I use works in the general case would be "Bonus points" but not required as a success metric for me. ?

 

john_e79
Posts: 22
Joined: Thu Aug 26, 2021 6:31 am

What the YM2151 can do in the right hands

Post by john_e79 »








I have a few YM2151s here at home for a synth project, because some "Buy It Now" auctions on eBay sell them in a reel and I figured if I mess up I might as well have some extras, but I haven't bought some YM3012 DACs for them yet.

The Sharp X68000 in Japan used a YM2151 but it wasn't release here in the U.S. It had lots of ports too from Capcom and Sega arcade titles that used the YM2151.

Lots of neat things you can do in FM synthesis but can't do on a simple pulse/saw/triangle channel.

Post Reply