Genesis - SNES audio comparison

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

Moderator: BigEvilCorporation

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

Post by Stef » Fri Jan 16, 2009 8:50 pm

TmEE co.(TM) wrote:
Stef wrote:3 channels with volume and resampling, all that on Z80 ?
Key: all samples are in single bank, thus no slow bank switching needed.
Sure, but as soon you use buffering, the bank switch isn't anymore a big deal... but then resampling becomes one ;)
And your sound engine can do volume control with 2 channels at 30 Khz ?
Amazing !
2 levels for one PCM channel, 2 levels for other, and then 2 levels when both are mixed together.
I see, RLA or similar instructions ?
I just rewrote my 4 channels playback drivers (i loose old sources) and i'm just able to play at 16 Khz. I still have some free time though, about 1/4 of Z80 time and the driver is correctly handling mix overflow.
How do you manage bank switching and buffering ? How scratchy is the sound you get ?
Well, as in my previous driver and as in shiru one :
256 bytes buffer, bank change between each channel code change.
Buffering permit to do bank change at each 256 bytes of sample.
Resampling is tough to do, depending on how you manage playback... my engine does not allow easy resampling. All the bank switches and buffering stuff just don't allow it...
Same here :-/
For volumes, your friend is self modifying code :)
neat ! I guess i can replace NOP by RLA :)

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) » Fri Jan 16, 2009 9:03 pm

Be sure to use a instruction that takes as long when you don't do volume change, otherwise you get difference in sample rate. I use IM1 instead of SRA when there's no vol changing, both are 2 bytes long and take same amount of time.

I do 256 byte buffering too...

again:
bank change
read 256 bytes
bank change
read and mix bytes from buffer
goto again

Number of bank switches per second = (SampleRate / 256) * 2
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

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

Post by sheath » Fri Jan 16, 2009 9:38 pm

tomaitheous wrote:The 2151 has additional waveforms other than sine, as well. I don't remember if it was a modification of the sine table or if it was a entirely different set of waveform tables.

sheath: (http://www.gamepilgrimage.com) <- that's not your website, is it? <_<
Gamepilgrimage needs a massive overhaul, but yes it's mine. Your comments about additional waveforms, is this comparing the 2151 to the Genesis PSG, or am I missing something?

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) » Fri Jan 16, 2009 10:04 pm

http://www.soundshock.se/phpBB2/viewtopic.php?t=308

OPZ type chip had selectable waveforms... I don't what YM is the OPZ...
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

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

Post by Stef » Fri Jan 16, 2009 10:47 pm

TmEE co.(TM) wrote:Be sure to use a instruction that takes as long when you don't do volume change, otherwise you get difference in sample rate. I use IM1 instead of SRA when there's no vol changing, both are 2 bytes long and take same amount of time.
yep of course :)
Keeping a fixed rate isn't easy, i can't get it stable (tested in Gens kmod) even if my Z80 cycles are ok...
I do 256 byte buffering too...

again:
bank change
read 256 bytes
bank change
read and mix bytes from buffer
goto again

Number of bank switches per second = (SampleRate / 256) * 2
Well, very similar algo here ;)
Last edited by Stef on Fri Jan 16, 2009 10:52 pm, edited 1 time in total.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Fri Jan 16, 2009 10:48 pm

sheath wrote:
tomaitheous wrote:The 2151 has additional waveforms other than sine, as well. I don't remember if it was a modification of the sine table or if it was a entirely different set of waveform tables.

sheath: (http://www.gamepilgrimage.com) <- that's not your website, is it? <_<
Gamepilgrimage needs a massive overhaul, but yes it's mine.
Ahh, ok. There was some misconceptions in the comparison, some appeared to be based on speculation (and tech specs area). Also, you shouldn't use jpeg for comparison shots. PNGs are much better and not lossy.
Your comments about additional waveforms, is this comparing the 2151 to the Genesis PSG, or am I missing something?
No, for the 2612. The 2612 only has a sine waveform for an oscillator. The 2151 has additional selectable waveforms other than sine. IIRC, it has some other algorithms that are not on the 2612. Not sure if it was more than just additional feedback option(s). Someone more familiar with the 2151 should chime in.


Stef: Wasn't it you that was looking into a transfer method via the 68k to the z80 through VRAM? I would assume doing the resampling on the 68k would be pretty easy - just a fixed point indexing system. Volume via a LUT too. I was able to do volume at 5 cycles per sample. Should be comparable on the 68k.

You guys are using fixed length code and reading from the ym's timer? Or just fixed length code by itself?

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

Post by sheath » Fri Jan 16, 2009 10:54 pm

SmartOne wrote:I'm not sure what mxv v2.00b is, but the best player I know (besides Hoot) for X68000 MDX rips is the Winamp/XMPlay plugin: http://support.xmplay.com/file_comment.php?id=23 (This is a newer version with more features than what I have/had!)

The EXE:

"...places mxdrv and x68sound in the plugins dir but you have to move them back to xmplay dir where they should be"

Apparently.

You can then use Winamp/XMPlay's Diskwrite feature to create WAVs! Make sure you enable 44.1 KHz and disable "AGC" in the plugin's preferences. Otherwise it sounds scratchy.
mxv is a port of the Japanese MDX player, as far as I can tell.

My discrwrite option is greyed out in the latest XMPlay. The txt file says this is only for HTTP streamed files. I was also not able to find a setting that matched what you described as "AGC". I'll keep fiddling.

-edit-

Got it working, thanks for the info!
Last edited by sheath on Fri Jan 16, 2009 11:07 pm, edited 1 time in total.

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

Post by sheath » Fri Jan 16, 2009 10:58 pm

tomaitheous wrote:
sheath wrote: Gamepilgrimage needs a massive overhaul, but yes it's mine.
Ahh, ok. There was some misconceptions in the comparison, some appeared to be based on speculation (and tech specs area). Also, you shouldn't use jpeg for comparison shots. PNGs are much better and not lossy.
I also intend to go back and replace every shot on the site with captures shots from the actual console using my video capture card. This is much more lossy, but also much more accurate to what people saw on their TV sets back in the day.

I've been intending to re-read through all of the sections again and fix anything I've learned to be errant since I originally wrote it. What specifically are you referring to being incorrect?


No, for the 2612. The 2612 only has a sine waveform for an oscillator. The 2151 has additional selectable waveforms other than sine. IIRC, it has some other algorithms that are not on the 2612. Not sure if it was more than just additional feedback option(s). Someone more familiar with the 2151 should chime in.
This and the link TmEE provided should be more than adequate for what I'm trying to do.
Last edited by sheath on Fri Jan 16, 2009 11:05 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) » Fri Jan 16, 2009 11:06 pm

tomaitheous wrote: Stef: Wasn't it you that was looking into a transfer method via the 68k to the z80 through VRAM? I would assume doing the resampling on the 68k would be pretty easy - just a fixed point indexing system. Volume via a LUT too. I was able to do volume at 5 cycles per sample. Should be comparable on the 68k.

You guys are using fixed length code and reading from the ym's timer? Or just fixed length code by itself?
The point is using Z80 for sound purposes and 68K for everything else but sound :)
I could go crazy on 68K, there's so little I need to worry about when doing sound :)

In case of my sound engine, YM2612 timers are only used for SFX and BGM. Timer B (at 49.4Hz) for BGM, and Timer A (~59Hz) for SFX. Z80 does sample playback for most of the time, samples can be up to 16Mbytes in size, and reside in any bank... bank switcher code only handles first 4MBytes tough :)
And my PCM playback code is fixed lenght, to get steady sample rate and reduce jitter effect.
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

Knurek
Newbie
Posts: 6
Joined: Wed Dec 17, 2008 7:28 am

Post by Knurek » Sat Jan 17, 2009 9:28 am

SmartOne wrote:Thanks so much! I can play MDX in Winamp with in_mdx.dll + the X68000 driver files, but I'm pretty sure that's not nearly as good as Hoot. I wonder, is it possible to port the MDX's to Hoot? :wink: :D
Just drag and drop the MDX file to Hoot's main window.

Oh, and you might need to change the sampling rate in hoot.ini to native OPM frequency (62400) to avoid some resampling artifacts. It's set to native OPN one (55466) since most sets use that (and anything else breaks most Genesis games supported anyway).

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

Post by sheath » Sat Jan 17, 2009 2:10 pm

This post on the retro.ign boards is exemplary of what I'm up against online. I thought this thread could use an example.
posted by one nightc1
http://retro.ign.com/articles/936/936773p1.html

Motorrizer95, I pretty much agree with you.

But on the flip side I remember the genesis for the Larger game characters. Most SNES games (like the NES) utilized smaller characters sizes. Yes there were often screen sized bosses in SNES games, but those usually didn't move around too much. Oddly, I felt the GameGear had overall larger game characters than the NES too. I attributed this to what I could only quantify as the "Sega feel". I think the SNES sound was far superior... especially played through a sound system with some big speakers... but that's not to say the Genesis sound was bad... it just didn't surround me in the same way. Just play the opening to Star Fox sometime... "emergency emergency... incoming.." or sit back and listen to the music and sound effects in any Donkey Kong Country game. It's pretty amazing what they did... but of course all of this was greatly eclipsed with the birth of Disc based games.

I think the people that prefer the Genesis sound over the SNES are just doing so off of nostalgia alone. tongue I don't see any really great expamples of Genesis games that envelop me aurally. It could be my nostalgia for the SNES which makes me remember it as sounding much better... but I'm not so sure. I don't think Cool Spot stands out as a particularly good sounding game on any system. But when I'm talking sound I'm referring to sound effects and music. Developers utilized the SNES better for audio.

The homebrew guys now may be able to do more with the Genesis than the SNES... but who cares. It's not like many (maybe any?) of us are really playing their games... nor are most of em known for their great audio experience.
My response will be to start up a whole new comparison section that puts the two system's audio up against each other in a single file. It will probably a DIVX encoded AVI file so I can make sure people know what they're listening to. I've been toying with the idea of revamping gamepilgrimage into a series of video comparisons, since people just don't seem to read very well.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Post by tomaitheous » Sat Jan 17, 2009 8:12 pm

Sheath: Sounds like your making more of a defense/bias piece than an objective comparison. The site currently kinda has Sega bias feel to it. Also, you have to realize not everyone used the crappy rf/composite output of the Genesis/Megadrive. Many people run stock RGB/SCART, let alone people with svideo mods. I think if you're going to do an objective comparison piece, you should at least have unfiltered shots of both.

The Final Fight comparison is a prime example of this. RGB or unfiltered shots look really bad for the SegaCD game. I personally think the dev team dropped the ball on that one. Working with 4 sub palettes isn't easy, but there are some obvious places were they could have optimized for this. Instead they opted out by using the vertical line blend trick.

Also, if you capture shots from a capture card - use 720x480 on a paused screen (or for unpaused shots use a field duplicate tool afterwards). Using any other screen size is going to net additional blend/smear/blur that a TV wouldn't show. Capture cards have a fixed sampling rate for the signal, choosing any other res doesn't change this - it's a post effect either done in software or on the chip.
I think the people that prefer the Genesis sound over the SNES are just doing so off of nostalgia alone
I put myself into this bracket. I love the early-to-mid sound of Genesis games because of nostalgia. I don't care for some of the later games that try to make the Genesis sound different. But going to a Sega site or FM site and asking which is more superior, you're obviously going to get a bias answer. No different with SNES sites. I tried to be objective in my argument. I feel overall the SNES audio is superior to what the Genesis audio can provide, but it's not by a large factor. The difference isn't like with NES to Genesis. And as others have stated, from the inherent weakness of WS, Genesis FM does have some advantages over it. People who feel more strongly of FM, are going to feel it's superior sounding. Just like there are those who can't stand the sound of early FM like what the Genesis provides, even going so far to say they prefer PSG sound over it.

Huge
Very interested
Posts: 197
Joined: Sat Dec 13, 2008 11:50 pm

Post by Huge » Sun Jan 18, 2009 12:15 pm

Looking at some videos, it looks like Beavis & Butthead on the Megadrive also manages to mix multiple pcm streams in software. Well, it has to, in order to achieve the high polyfony of drums, cymbals, voices, farts and belch sounds in the ending song.

http://www.archive.org/download/Beavisa ... Ending.mp4

SmartOne
Very interested
Posts: 77
Joined: Sun Sep 21, 2008 5:18 am

Post by SmartOne » Sun Jan 18, 2009 8:24 pm

Dragging MDX files onto Hoot shows a menu:
PLAY
STOP

They won't play...

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

Post by Stef » Mon Jan 19, 2009 12:00 pm

tomaitheous wrote: Stef: Wasn't it you that was looking into a transfer method via the 68k to the z80 through VRAM? I would assume doing the resampling on the 68k would be pretty easy - just a fixed point indexing system. Volume via a LUT too. I was able to do volume at 5 cycles per sample. Should be comparable on the 68k.
Of course on 68k it could be done easily but i don't want to eat 68k cycles ;) All the heavy task should be handled by Z80 and as we use buffering to limit the bank register access, you can do an easy resampling method.
I though about a volume system with a LUT, but even a LUT is something which has a cost for Z80 ;)
Anyway that is giving me some ideas to dig in :p

Post Reply