Rocket Knight digital sounds

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Rocket Knight digital sounds

Post by Shiru » Fri Apr 30, 2010 2:32 pm

I've somehow always though that the Rocket Knight Adventures has DAC samples for drums and some effects. Recently I looked to it again, after few years, and now realized they don't use DAC at all (it is RKA2 that uses it a lot).

There are plenty of masterpiece FM patches and effects in the game, but there are also two effects that sounds rather digital - burping sound of bosses explosions, and some word that the pig from lava fish says when jumps. These two does not use DAC mode or PSG, and there is no unpacked PCM in the game, so it would be interesting to examine what they used instead (and why).

andlabs
Very interested
Posts: 62
Joined: Sat Aug 08, 2009 4:44 pm

Post by andlabs » Fri Apr 30, 2010 9:47 pm

I have been disassembling and researching RKA's sound driver (my laptop is back from the shop so I can continue working on it). There is code for DAC support, but I don't think it is used. One thing the driver does for FM voices is that it has a copy of the voice bank for each Z80 bank, however I'm not sure if that applies only to songs or to songs and sound effects. I will be looking into this further as time goes on.

Also fun fact: the pause sound isn't a separate sound effect, but rather a command sent to the sound driver, which maintains a paused state flag.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Fri Apr 30, 2010 10:13 pm

I guess the (improved) driver was later used in Castlevania: Bloodlines, where the DAC is used for most of the sound effects, but not for music, and then in RKA2 and Contra: Hard Corps, where the music has a lot of samples played through the DAC.

sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Sat May 01, 2010 3:22 am

I've noticed that Street Fighter 2:SCE/Turbo has a ton of digital samples in the music in addition to the voice samples. Super SF2 by comparison seems to stick to analog for the music and digital for the voice samples with a few exceptions. I thought this was interesting given that Super SF2 has less garbled voice samples than its predecessor.

Knowing now that the DAC has to be synced in software with the FM channels this makes sense to me. But any further insights on the topic would be very welcome.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sat May 01, 2010 9:11 am

Analog is wrong word, it is synthesized, but it is completely digital.

Both SF2 uses the DAC to play the samples, so nothing unusual there. Why they decided not to use samples in the music in the later game is another question. Maybe they wanted to have less interrupted sound (in fighting game you need at least two channels to hear response of the characters actions).

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat May 01, 2010 12:12 pm

Beta version of SF2 use a different sound driver and you can properly heard that a new played sample will interrupt the currently playing one. SF2 official version doesn't have this behavior, they modified the sound driver so it can mix up to 3 channels (1 for music drum and 2 for players voices). Super SF2 just use a 2 channels mixer driver + 100% FM music. Imo music sounds really bad compared to original SF2 but voices are far better.

sheath
Very interested
Posts: 141
Joined: Wed Aug 15, 2007 1:44 pm
Location: Texas
Contact:

Post by sheath » Sat May 01, 2010 8:59 pm

Synth not analog, got it. This is yet another problem with trying to define things based on internet discussion. ;)

On samples cutting out, I noticed that the first SF2 on SNES does this with the voice samples if another voice sample starts (Music plays without interruption if I recall though). I've also noticed that the Genesis sequel seemed to be a port of the SNES engine, rather than a ground up build of the Arcade material. It's interesting that the beta has the same audio issues that the SNES original had.

In your opinions, is the garbled voice samples of SF2:SCE/Turbo due to bad DAC timing with the FM channels, or is it more to do with there just being too many digital samples playing at once.

Going to check out the SCE beta now.

-
Edit

The Beta I found is just titled Street Fighter II Turbo (Beta). I remember the menu bars (Window layer) having black pixels around them in the early screenshots, but this version has transparent pixels (which I thought wasn't done until now). I had assumed that they moved from using the Window layer to sprites for the menus by the final product, I wonder if there is a beta with the black pixels behind the menus.

Off the cuff, I'd say that the samples were much clearer in this beta than the final release, but I did notice significant audio drop out when voices and hits were playing at once that is not in the final product. I never heard one voice cut out the other though.
Last edited by sheath on Sat May 01, 2010 9:21 pm, edited 1 time in total.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat May 01, 2010 9:09 pm

Sample playback quality depends greatly on the quality of the code that plays back those samples...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

andlabs
Very interested
Posts: 62
Joined: Sat Aug 08, 2009 4:44 pm

Post by andlabs » Sun May 02, 2010 6:26 am

Here are the SF2SCE samples ripped out of the game (you can use these to compare). Output sample quality depends not only on the sample playback code (as Tiido says) but also on other code as well:
  • The Genesis docs say to stop the Z80 each controller read
  • You will need to stop the Z80 to read/write to the sound chips from the 68000 (so not using the Z80 wouldn't make much of a difference unless you only busreqed each write, rather than each process)
There would be no way to ensure perfect sample quality unless you didn't read controllers or do any additional sound processing 68000-side.

In regards to code quality: SMPS/Z80 usually writes the DAC whenever nothing is happening (a Z80 interrupt will cause it to process sound data). GEMS has a function DACME which is called many times in many functions to ensure maximum DAC quality. Cube alternates between DAC and FM/PSG depending on whether or not YM2612 Timer A has overflown. You can be the judges in regards to which one worked best.

What I do know about RKA DAC processing is that the RKA sound driver repeatedly writes the same byte to the DAC register before moving to the next one, but only does so once per process loop.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sun May 02, 2010 11:30 am

sheath wrote: Off the cuff, I'd say that the samples were much clearer in this beta than the final release, but I did notice significant audio drop out when voices and hits were playing at once that is not in the final product. I never heard one voice cut out the other though.
Afaik the driver used is a single channel DAC player + FM sound so any sample play interrupt the previous, you're right it's even more noticeable on "hit" SFX which use DAC but it does happen on voices too...
Of course the DAC sample quality rely on the driver, mixing severals sample channels to DAC while playing FM is tricky with Z80... if you mix more channels you have to reduce playback rate.

Post Reply