MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Charger
MAME Fan
Reged: 07/11/21
Posts: 6
Send PM


sound of a rom
#391301 - 07/11/21 09:18 PM


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



Heihachi_73
I am the Table!
Reged: 10/29/03
Posts: 1074
Loc: Melbourne, Australia
Send PM


Re: sound of a rom new [Re: Charger]
#391306 - 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.



Charger
MAME Fan
Reged: 07/11/21
Posts: 6
Send PM


Re: sound of a rom new [Re: Heihachi_73]
#391607 - 08/09/21 09:59 PM


Hi,
well, I tried it with Audacity too.
for example: of the game "Thundercross"
But I only need the Gamesound, not that sound of the shots
of the ships.



TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: sound of a rom new [Re: Charger]
#391608 - 08/09/21 10:56 PM


> Hi,
> well, I tried it with Audacity too.
> for example: of the game "Thundercross"
> But I only need the Gamesound, not that sound of the shots
> of the ships.

That machine, in particular, has a cheat which allows selecting a track number and playing that track - be it a sample or a music track. Best used if you put activate the cheat after putting the machine into test mode (activate Service Mode DIP, or use F2) and use the cheat menu to go from there.

Cheat package:
http://cheat.retrogames.com/
Download "XML/JSON Cheat Collection" link.

- Extract the "cheat.7z" files inside the download and place in your folder where MAME.exe exists.

- Activate via UI Configure Options -> Miscellaneous Options -> Cheats (Yes) or use the -cheat command line trigger/edit mame.ini so that the value of "cheat" is 1.

In the (TAB) menu, there should be a CHEAT line where you can find "Sound Test" and use the arrow keys/enter to issue the sound cheat.

Hope this helps!


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

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