MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

Heihachi_73
I am the Table!
Reged: 10/29/03
Posts: 1074
Loc: Melbourne, Australia
Send PM
Re: sound of a rom
07/12/21 05:07 AM


> is it possible to get the sound only of a rom?

Assuming you mean ripping sound effects out of a ROM, yes it's possible, but you will most likely need to convert it to something usable such as a .wav file or the like. MAME's -wavwrite option can be used to convert them but it's the digital equivalent of taping something rather than ripping it directly out of the ROM - if a game has a sound test in the test/service mode menu you can play back most music (and usually sound effects) but the machine might have a built-in timer to stop the sound - luckily, over the past 20 years people have made thousands of MAME cheats which disables the sound test timers so that the music can be played indefinitely.

In technical terms, most 80s/90s games that use audio samples use 8-bit PCM at a ridiculously low frequency like 8000 Hz, or one of the ADPCM variants e.g. µ-law. On top of that, the audio samples are almost always filtered by the sound hardware so that they don't sound scratchy and lo-fi (although in some cases they still sound terrible).

For example, I ripped the sounds from the arcade Tekken games a few years ago, they were a mixture of raw unsigned PCM and µ-law ADPCM, and just about everything was at 8000 Hz and sounded completely awful (due to having no output filtering which the Namco sound hardware obviously does), and there was no real way of knowing the frequencies as each sample can be a different speed, so you have to manually change the frequency to get the correct pitch. The sound ROMs also had to be interleaved as the ROMs only hold every second byte, and then the data had to be inverted (changing the bits from 0 to 1 and vice versa) so it could actually be read properly (when converting from µ-law) instead of being distorted or static.

If it's really ancient hardware like Pac-Man or NES games you're out of luck, most games from the 8-bit era usually don't use PCM samples at all, it's all computer-generated waveforms which can't be ripped; they're played back in the exact same manner as the music itself. Even in the 16-bit era this still occurred, one notable sound effect being Yoshi's voice in Super Mario World (and Super Mario Kart, and even Mario Kart 64), it is a cheap "MIDI" style trick using a musical sample with a pitch bend effect (in Mario Kart 64, even on real hardware, the pitch bend effect would sometimes fail when Yoshi hit a banana, resulting in a really weird noise).

I tried using Audacity to convert µlaw sound ROMs to .wav a couple of years ago but found that it would corrupt the data when converting it (even with basic stuff like raw PCM to .wav which shouldn't even touch the data; it should simply slap an appropriate .wav header on it with no modifications whatsoever) so I honestly don't know what's the best option these days. Cool Edit Pro used to be my go-to program 15+ years ago for converting sound ROMs to .wav files but it's closed source proprietary software ($$$), older than most MAME users and probably doesn't work on anything newer than Windows XP.







Entire thread
Subject Posted by Posted on
* sound of a rom Charger 07/11/21 09:18 PM
. * Re: sound of a rom Heihachi_73  07/12/21 05:07 AM
. * Re: sound of a rom Charger  08/09/21 09:59 PM
. * Re: sound of a rom TafoidAdministrator  08/09/21 10:56 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 250 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 531