How to create a game rom

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

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

Re: How to create a game rom

Post by Stef » Sat Jan 30, 2016 7:39 pm

You can do SFX FM, but generally that pretty limit you in what you can do definitely... S3K has an horrible sound driver when it comes to PCM sound (it shares it with Sonic 3 and Sonic 3D game i believe), looks like they invested more on FM side ;)

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: How to create a game rom

Post by Sik » Sat Jan 30, 2016 9:53 pm

Nearly every game prefers FM for sound effects though.

And yeah, PCM on SMPS is a mess that makes me wonder how did they get away with it - in fact it seems to be the result from bad decisions during early ports from Master System code, when they needed something that "works" rather than something useful in the long term.
Sik is pronounced as "seek", not as "sick".

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

Re: How to create a game rom

Post by Stef » Sun Jan 31, 2016 12:52 pm

Sik wrote:Nearly every game prefers FM for sound effects though.
Yeah, but i think that decision comes from ROM size constraint but more importantly because of the poor PCM support in sound driver back in time :-/
Castlevania is one of these game who really deserved good PCM SFX...
And yeah, PCM on SMPS is a mess that makes me wonder how did they get away with it - in fact it seems to be the result from bad decisions during early ports from Master System code, when they needed something that "works" rather than something useful in the long term.
What is weird is that depending the SMPS driver the PCM quality seems to vary a lot. And definitely the version used Sonic 3 (and games sharing the same version as Sonic 3D) is one of the worst for that particular point :-/

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: How to create a game rom

Post by Sik » Sun Jan 31, 2016 4:49 pm

Z80 SMPS halts all PCM playback every frame for a huge chunk of time to process the stream. 68000 SMPS crams all PCM samples into just 8KB of RAM (Z80 can't stream them from ROM). It's definitely the worst of the major engines in that regard. It's also the one that gave the system its horrible reputation.

Also you seriously are underestimating FM... Music suffers way more from it, seriously.
Sik is pronounced as "seek", not as "sick".

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

Re: How to create a game rom

Post by Stef » Mon Feb 01, 2016 8:54 am

Sik wrote:Z80 SMPS halts all PCM playback every frame for a huge chunk of time to process the stream. 68000 SMPS crams all PCM samples into just 8KB of RAM (Z80 can't stream them from ROM). It's definitely the worst of the major engines in that regard. It's also the one that gave the system its horrible reputation.
Yeah i observed that with my xgmtool, trying to extract correctly sonic3d samples gave me some headache...
Major gap in between sample which make very difficult to find the end of the sample or assume you're playing a new one :-p I didn't know the 68k version was limited to 8kb of sample ! Looks like a very limited amount of sample, but at least they could be played perfectly.
Also you seriously are underestimating FM... Music suffers way more from it, seriously.
What do you mean ? I do know some (a lot actually) game has bad music just because the developers weren't use to FM, but when it comes to SFX I really think FM aren't a good solution. Castlevania has wonderful FM musics but really awful FM SFX. Of course FM can handle a bit of them but PCM is a more natural and better solution (when possible) almost of time.

mikejmoffitt
Very interested
Posts: 86
Joined: Fri Sep 25, 2015 4:16 pm

Re: How to create a game rom

Post by mikejmoffitt » Tue Feb 02, 2016 1:37 am

Stef wrote:
mikejmoffitt wrote:I am going to agree that the current audio situation is a nightmare because while the many engines available now support sound effects, none of them support multiple synthesized SFX playing at a time.
Synthesized SFX are imo not good anyway... it's quite rare you want to use FM for SFX. PSG would even be a better choice for that.
I disagree, along with almost every good Genesis game out there... PSG can be acceptable for SFX, but if you want to integrate it into any of the sound engines, again, only one sound will play without cutting out a previous one, even if channels are not shared.

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

Re: How to create a game rom

Post by Stef » Tue Feb 02, 2016 8:19 am

Sonic 1 & Sonic 2 uses PSG for many SFX and i believe they do no interrupt each other, because you have several channels for that.
Using FM for SFX will both limits you in what kind of SFX you can do, but more importantly affect the music itself which almost time require all FM channels.

Natsumi
Very interested
Posts: 82
Joined: Mon Oct 05, 2015 3:00 pm
Location: 0x0
Contact:

Re: How to create a game rom

Post by Natsumi » Tue Feb 02, 2016 1:13 pm

Sonic 1-3K use generally 1-2 PSG and 3-4 FM and DAC (except SSZ which uses 5 FM+DAC and 3 PSG) for musc, and then 1 or rarely 2 PSG, and 2-3 FM for SFX. But you rarely hear interruptions to music, only really if you play 2x SFX in short time, the earlier one will stop. But you rarely as a player notice this, because the devs did a great work with the drivers as well as the channels they had available. And from my experience they use a lot of FM for SFX.

Its also good to note majority of songs get interrupted by SFX, but they use more quieter or lower note voices that are not so easily noticeable if they get interrupted, but add to the music when they are playing.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: How to create a game rom

Post by Sik » Tue Feb 02, 2016 9:36 pm

I think I just spotted the problem here:
Stef wrote:Using FM for SFX will both limits you in what kind of SFX you can do, but more importantly affect the music itself which almost time require all FM channels.
PSG is also used a lot in music, using PSG for SFX won't mahically solve the issue of clashing with music.

And yeah, the trick is to ensure the quietest instruments get overriden. As for multiple SFX at the same time, I think Sonic games do it exclusively for one variant of the ring sound and nothing else (i.e. the engine is hardcoded for that).
Sik is pronounced as "seek", not as "sick".

Natsumi
Very interested
Posts: 82
Joined: Mon Oct 05, 2015 3:00 pm
Location: 0x0
Contact:

Re: How to create a game rom

Post by Natsumi » Tue Feb 02, 2016 9:41 pm

it cannot play 2 ring sfx or ring + other sfx at once. Ring sound is hardcoded to alternate between left and right speaker - those are 2 different sound effects though

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: How to create a game rom

Post by Sik » Tue Feb 02, 2016 10:39 pm

There are two variants: one that alternates the channel each time to allow two rings to play at the same time, and one that just cuts short the previous sound. This becomes obvious when usign a turbo switch with the sound test.

I know some sounds loop instead of restarting when you keep playing them constantly, so maybe it's just another way to use that mechanism from SMPS?
Sik is pronounced as "seek", not as "sick".

Natsumi
Very interested
Posts: 82
Joined: Mon Oct 05, 2015 3:00 pm
Location: 0x0
Contact:

Re: How to create a game rom

Post by Natsumi » Tue Feb 02, 2016 11:55 pm

Sonic games' SMPS drivers do not have multi SFX support. However, what could be happening in level select specifically, is that the SFX's are first loaded into the music portion of the driver, and if it is playing "music", it will then switch to sfx portion. This would allow to play 2 sound effects simultaneously, if no music is present. However, with music present practically at all times during gameplay, and different function is used to play SFX outside of level select, playing multiple sound effects is no more possible. Both of the ring sound effects seem to use different channels too (FM 4 and FM 5), so they can be played together, whilst many other sound effects cant. I did notice that some other sound effects played at the same time too, in level select, so it is certainly not a hardcoded feature for the ring sfx.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: How to create a game rom

Post by Sik » Wed Feb 03, 2016 12:45 am

Try SFX 01 and 02 in Sonic 3D and you'll see what I mean. The former alternates channels and can play two rings at once, the latter only uses one channel and only allows one ring to play at a time. Note that these SFXs were inherited from S3K (33 and 34 I think)

I suppose 01 was meant for when there's a large cluster of rings, so it sounds like you're grabbing many rings at once. If any other sound gets in the way then it's OK to just cut out instead.
Sik is pronounced as "seek", not as "sick".

Post Reply