Five extra PCM channels on the Genesis (YM2612)

Discussion of development of software for any "obsolete" computer or video game system.
User avatar
za909
Posts: 193
Joined: Fri Jan 24, 2014 9:05 am
Location: Hungary

Five extra PCM channels on the Genesis (YM2612)

Post by za909 » Fri Nov 10, 2017 10:01 am

I've always wanted to know if it was possible to use the 5 FM-only channels of the YM2612 chip to output PCM. For most chips this works by setting the channel in question to the highest possible frequency, and then the attenuation/volume register can serve as the output for the data. I wonder if this is also possible in this case. Additionally, it might work by taking a completely different approach - retriggering the channel constantly (which resets the phase of the operators) and setting the amplitude you want by using the frequency of the channel to get the exact phase of the sine - then repeat. Also, if this is implemented in the chip with a digital phase counter, it should work perfectly, people have done the same with the SID chip before.

tepples
Posts: 21752
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Five extra PCM channels on the Genesis (YM2612)

Post by tepples » Fri Nov 10, 2017 10:02 am

With the time it takes to write to all six FM channels' registers, why can't you just sum six PCM channels on the Z80?

User avatar
TmEE
Posts: 712
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: Five extra PCM channels on the Genesis (YM2612)

Post by TmEE » Fri Nov 10, 2017 10:19 am

It is faster to software mix those 5 channels.

In addition, restarting a channel/operator will start the waveform at zero, it'll take a while to get the waveform to max point. You could stop phase generator though.

Other problem is that you can pretty much do only one write per chip sample, that's nowhere enough to do anything fancy on all 5/6 channels, unless really low sample rate is acceptable, but at that point just plain old software mixing will still be faster, and will sound better as 7bit log space isn't super great for playing samples, and you still won't get more than 9bit output on stock hardware. You can control the lowest bit of PCM channel wia test register and get all 9bits BTW.

User avatar
tokumaru
Posts: 11466
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Five extra PCM channels on the Genesis (YM2612)

Post by tokumaru » Fri Nov 10, 2017 12:28 pm

tepples wrote:With the time it takes to write to all six FM channels' registers, why can't you just sum six PCM channels on the Z80?
https://youtu.be/x3m3JrVImmU

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Re: Five extra PCM channels on the Genesis (YM2612)

Post by psycopathicteen » Sat Nov 11, 2017 12:15 pm

Hmm, he does audio sampling the same way he does texture scaling.

User avatar
rainwarrior
Posts: 7677
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Five extra PCM channels on the Genesis (YM2612)

Post by rainwarrior » Sat Nov 11, 2017 1:07 pm

They are similar interpolation problems.

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3503
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Five extra PCM channels on the Genesis (YM2612)

Post by Drew Sebastino » Sat Nov 11, 2017 3:45 pm

To be honest, the results are kind of underwhelming considering the amount of work and likely processing time. :| (Although I think the bad instrument choice is half of the problem.) Is software mixing is the main bottleneck here?

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Re: Five extra PCM channels on the Genesis (YM2612)

Post by psycopathicteen » Sat Nov 11, 2017 4:53 pm

Is this only during cutscenes?

User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: Five extra PCM channels on the Genesis (YM2612)

Post by Myask » Sat Nov 11, 2017 7:29 pm

tokumaru wrote:
tepples wrote:With the time it takes to write to all six FM channels' registers, why can't you just sum six PCM channels on the Z80?
https://youtu.be/x3m3JrVImmU
For those who don't want to watch:
use tables to decide what parts of sample waveforms to discard when pitch-shifting
use tables for volume-scaling
software-mix on 68000 your four channels to one with halve(bitshift)+add
use a scanline? interrupt at 1 khz(15-20/fr, 50FPS) and upload 10B per interrupt so as to have tiny losses where the Z80's not playing sound
double-buffer samples in Z80 RAM so you don't have to stop playback even that much

Did I miss anything?

adam_smasher
Posts: 271
Joined: Sun Mar 27, 2011 10:49 am
Location: Seattle

Re: Five extra PCM channels on the Genesis (YM2612)

Post by adam_smasher » Sat Nov 11, 2017 9:57 pm

Espozo wrote:To be honest, the results are kind of underwhelming considering the amount of work and likely processing time.
Ahh, Traveller's Tales games in a nutshell :P

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3503
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Five extra PCM channels on the Genesis (YM2612)

Post by Drew Sebastino » Sun Nov 12, 2017 12:09 am

adam_smasher wrote:Ahh, Traveller's Tales games in a nutshell :P
The FMV intro to Sonic 3D Blast is probably the best part of the game, despite looking like shit. :lol: I've never played Mickey Mania or Pugsy, but judging from Sonic 3D Blast (bad) and Toy Story (decent, but not amazing) I think the people at Traveller's Tales were much better programmers than they were game designers; it's a bit of a shame that they didn't make PC games instead, where they'd be much less limited by space and processing power. I feel most European game developers from the early to mid nineties were the same way; the Japanese seemed to be better game designers, even if the games were less ambitious graphically and still ran worse. American developers (id and a few others nonwithstanding) were the worst in both regards. :lol:

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Re: Five extra PCM channels on the Genesis (YM2612)

Post by psycopathicteen » Sun Nov 12, 2017 3:36 am

It's a bit of a shame that they didn't make PC games instead, where they'd be much less limited by space and processing power.
The challenge.

User avatar
Sumez
Posts: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Five extra PCM channels on the Genesis (YM2612)

Post by Sumez » Sun Nov 12, 2017 3:51 am

Yeah, this is a typical staple of European developers in the 90s (and late 80s), and Traveller's Tales is a great poster child for that. I used to think only Japanese games (at least in the platformer genre and such) were good, while Western games almost always had the same flaws (pretty graphics, but extremely uninteresting and repetitive level design), but looking back at it now, I think that especially describes European developers, maybe even British specifically - usually coming off the C64 and Amiga demo scenes, where making cool effecient coding algorithms and special visual effects was more important than fun gameplay.

I remember, back in the days, I'd always remember the Traveller's Tales logo due to how much their games managed to stand out after all, plus they had a thing for working with those licenses that would make kids buy their games no matter how good they were.
However, I would also quickly begin to notice that pretty much ALL the games with the TT logo were also pretty bad. Not terrible, but never good at all. I think Mickey Mania was the only decent game they managed to make (and then, only the Sega version), and looking at Jon Burton's YouTube videos today, that's kinda sad, because you can tell he's really passionate about their products... in his own way anyway. That video about how they bypassed Sega's QA process by disguising bugs in their games as "secret level selects" is pretty shady, but at least he's being honest about it. :)

He's also working on a director's cut version of Sonic 3D at the moment, hoping to fix everything that was wrong about that game. I'm not sure that game is fixable, but it's a game I've always wanted to like, so I'm curious about it.

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Re: Five extra PCM channels on the Genesis (YM2612)

Post by psycopathicteen » Sun Nov 12, 2017 4:31 am

Western games almost always had the same flaws (pretty graphics, but extremely uninteresting and repetitive level design).
When did western games ever have good graphics?

User avatar
Sumez
Posts: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Five extra PCM channels on the Genesis (YM2612)

Post by Sumez » Sun Nov 12, 2017 4:49 am

Image

Image

Image

Image

Image

Image

Post Reply