(Topic ID: 30563)

Ripping Game ROM Data

By Crash

11 years ago


Topic Heartbeat

Topic Stats

  • 41 posts
  • 16 Pinsiders participating
  • Latest reply 11 months ago by Crash
  • Topic is favorited by 7 Pinsiders

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    View topic image gallery

    IMAG2684.jpg
    heli.PNG
    waves.PNG
    scores.PNG

    #1 11 years ago

    Considering the internet has been down for me the past 2 days and I had some time, I decided to do some poking around with the game ROMs from Data East 3 and Williams WPC systems. This thread focuses on the Data East system. I found some recoverable DMD images and sound effects/voices as well as text and I'll outline what I did below to dig them up. It's going to get long and technical but it's very interesting stuff.

    Here I'm specifically looking at Lethal Weapon 3. In the version 2.08 ROM set on IPDB there is the CPU ROM (lw3cpuu.208), 3 sound/music ROMs (lw3u7.dat, lw3u17.dat, and lw3u21.dat), and 2 DMD ROMs (lw3drom0.a26 and lw3drom1.a26).

    CPU

    Obviously the CPU ROM contains mainly game code but I was able to find a few text strings by viewing lw3cpuu.208 with a hex editor. I've listed them along with their offsets:

    A43E: LW3 11/17/92 USA CPU 2.08
    A4FB: JEKEDCJLLRJDJAKJWC
    CF8A: 708-345-7700
    1-800-KICKERS
    BALLY WULFF 511-358-5343
    AVRANCHE 33 58 58 10
    ADONBOLAGEN AB 031-124570
    IVEK (041) 447-008
    DATA EAST CORP. 03-5370-0708
    NORIVENDCO A/S 02-1608 30
    NOVOMAT A.G. 062-61-40-61
    OZ-SAGIE LTD 052-501641
    VIDEOGAMES AB 036-1885 75
    ELECTROCOIN 44-81-965-2055
    TECHNOPLAY ITALY 011-39-51416934
    TAB AUSTRIA 43-72-294-5910
    AMUSEMENT GAMES 61-2-740-550
    DATAEAST SERVICE 1-800-KICKERS

    I didn't bother to list the offsets of the last few since they're roughly in the same location of the file. The first string is the game name, date, and CPU version shown on startup. The second string is the six default player initials, and I've confirmed this:

    scores.PNGscores.PNG

    1-800-KICKERS was Data East's service phone number, still used by Stern today. Bally Wulff refers to Bally Wulff Amusements, which was Bally's German subsidiary at the time. I can't think of a reason why this would be listed here as they couldn't have been an overseas distributor because they were direct competition, and they didn't get bought out until 1995 (there is some interesting history behind that on Wikipedia's Bally Technologies page). But I digress. The remaining text lists other possible foreign distributors/affiliates and phone numbers(?) but I'm not going to spend the time to research them. Also, some of the numbers may be incorrect due to trailing bytes.

    SOUND

    This is where things get interesting. Of the 3 sound/music ROMs just by poking around I've found out that 2 of them (lw3u17.dat and lw3u21.dat) contain music, speech and instrument samples for the sequenced music. These are both 256kb. The third file, lw3u7.dat, appears to contain other data such as the music tracks themselves, pointers for sound data, etc. judging by the smaller file size (32kb).

    To explore the 2 sound data files I used Audacity and imported them as raw data. It turns out that these ROMs do contain uncompressed audio (8-bit signed mono PCM at 8KHz) so that's pretty easy to get to. By the way, it's important that you get the encoding settings right or you will end up with garbage noise (top) vs. good usable sound (bottom):

    waves.PNGwaves.PNG

    These files are just PCM audio streams, sweet and simple. There is some garbage here and there but 95% of the file is just sound samples back-to-back. There were a few samples I couldn't properly decode though but could still make out ("Extra ball is lit" and Murtaugh saying "Diplomatic immunity revoked" and "Nyahahaha!"). I know the BSMT2000 (which happens to stand for "Brian Schmidt's Mouse Trap") also supports a custom compressed ADPCM format in addition to uncompressed PCM sound, so I'm assuming these are encoded as such. I have to slow the speed down to 4KHz to hear them properly, which suggests the encoding is a 4-bit ADPCM format (not that uncommon for the time).

    So theoretically this means one COULD replace segments of these files with custom sounds/speech and musical instruments, flash the files back to ROM chips, and use them in their game. But the sound format and quality would have to be the same, and the lengths of the sounds couldn't be any longer than what was originally used in the game. I might think about trying this sometime with PinMAME and see where I get. Heck, I encourage other nerdy pinheads to try this too and if you're successful, actually develop a program that can take and convert short sounds and inject them into the ROM files. At least we will finally be able to get rid of Leo's annoying "Ok, ok, ok" lines.

    Other interesting sound tidbits. I could take the instrument samples and "Data East-ify" any MIDI file or other sequenced music if I took the time to. Plus, I also looked at Tales from the Crypt's sound ROMs and they use more of the custom ADPCM encoded sounds as well as some 16KHz PCM sounds for slightly better quality.

    DMD DOTS

    For the DMD ROMs (lw3drom0.a26 and lw3drom1.a26) I used Tile Molester, a free program written in Java that can view any file as an image. Like the sound data, I can only view uncompressed bitmap images in the DMD ROMs. These are 2-bit color bitmaps which support up to 4 colors per pixel. Unfortunately due to spacing and alignment issues in Tile Molester I wasn't able to view anything in full resolution, but I did find a lot of things, such as the helicopter used in one of the stunt scenes:

    heli.PNGheli.PNG

    I wish there was more I could do with the DMD data but besides running the game in PinMAME there really isn't. The editor doesn't view the images properly so I can't extract or try to replace anything. It's still cool, nonetheless.

    Well that's it so far. Has anyone else been "poking around" as much as I have? Haha!

    #2 11 years ago

    I've ripped some more sound and uploaded a few samples. From what I have found I can rip anything from Data East version 1 all the way through the modified Whitestar games. I don't know for sure about SAM games though since Stern still has that under lock and key as far as distributing ROMs, but I do know from reading the LED OCD thread someone mentioned the SAM system being a smaller form factor of the Whitestar boardset so who knows. I couldn't recover anything from any Bally/Williams games due to the Harris sound format (which is awful and extremely difficult to decode).

    From Data East 1 through Stern Whitestar the method is mainly 8-bit signed mono PCM at 8KHz, with some being encoded with their custom ADPCM format. Modified Whitestar games use modified VOX ADPCM audio at 11025KHz for voices, and standard PCM audio for instrument samples. I can rip sounds using the "standard" VOX format but the results aren't normalized and sometimes come out distorted (like many sounds in Ripley's).

    The next thing I'm going to try is actually replacing some sounds, once I find a better hex editor that supports swapping out file chunks. Oh and I did find some stuff in Gottlieb system 3 games.

    Samples: http://www.mediafire.com/?sj4sartadcr4f3d

    #3 11 years ago

    Nerd.

    Actually pretty cool.

    #4 11 years ago

    I love hearing back stories like this. If someone could replace ok ok ok with "they fuck u in the drive-thru" I'd be first in line to buy roms

    #5 11 years ago

    That would be cool but that sound bite is a couple of seconds too long to work.

    #6 11 years ago

    Switch to a Linux box. It's easy to deconstruct the rom with gdb. There are a ton of open source hex editors and vi plugins as well they support it.

    Nice work fellow geek.

    #7 11 years ago

    That's sounds like fun but a little deep for my skill set. Pretty sure I can make some interesting sound mods though, such as making Lord of the Rings sound like Bugs Bunny.

    #8 11 years ago

    I've poked SST from Sega. There is an xfiles string in SST ("TULITHA CUMI", which from memory, is spelled wrong, it should be TALITHA.)

    There is a message you get if you make 3 skill shots (which I've never managed, so I dont know if it really comes up. Says "YOU MADE THREE SKILL SHOTS - U R GUD!"

    "THE OFFICIAL PINBALL GAME OF TPO,JAPAN"

    various bits of debug code
    "Invalid Expression in configuration file. Line %02d"

    names of Sega workers like Demetrious Kouzios, Jason Dominiak, Jay Alfer, and heaps of others.

    oddities "GALLONS OF HOT GARBAGE" ??

    Ive poked over the code, disassembled the 6809 code..

    #9 11 years ago

    If you're interested in this sort of thing, try http://pinhacks.com/

    #10 11 years ago
    Quoted from herg:

    If you're interested in this sort of thing, try http://pinhacks.com/

    This. Lots of useful information here! I'll attempt to change some sound pointers for LW3 and see where I get. Thanks for posting! Thinking about making Murtaugh say, "I'm too old for this" when you drain. Good (rough) sources I found here but I can clean them up:

    http://www.soundboard.com/sb/Lethal_Weapon_movie_clips

    #11 11 years ago

    [Bally Wulff refers to Bally Wulff Amusements, which was Bally's German subsidiary at the time. I can't think of a reason why this would be listed here as they couldn't have been an overseas distributor because they were direct competition, and they didn't get bought out until 1995 (there is some interesting history behind that on Wikipedia's Bally Technologies page).] Bally WULFF had two operating units:
    1. Bally WULFF Automaten; Wall mounted Slot machine design, development and manufacturing.
    2. Bally WULFF Vertriebes; Coin operated equipment distributing. This division distributed most brands of equipment including direct competoitors of Bally back when Bally made pins. Just like here in the USA; Bally Northeast, Bally Midwest and Bally Advance sold Atari, Gottlieb and Williams equipment among others depending on geographical restrictions. For example, Bally Midwest (former Empire Distributing) in the Detroit area did not sell Williams pins as another distributor, Martin & Snyder already had exclusive rights for the area.

    This is from memory, not Wikipedia.

    #12 11 years ago
    Quoted from MrBally:

    [Bally Wulff refers to Bally Wulff Amusements, which was Bally's German subsidiary at the time. I can't think of a reason why this would be listed here as they couldn't have been an overseas distributor because they were direct competition, and they didn't get bought out until 1995 (there is some interesting history behind that on Wikipedia's Bally Technologies page).] Bally WULFF had two operating units:
    1. Bally WULFF Automaten; Wall mounted Slot machine design, development and manufacturing.
    2. Bally WULFF Vertriebes; Coin operated equipment distributing. This division distributed most brands of equipment including direct competoitors of Bally back when Bally made pins. Just like here in the USA; Bally Northeast, Bally Midwest and Bally Advance sold Atari, Gottlieb and Williams equipment among others depending on geographical restrictions. For example, Bally Midwest (former Empire Distributing) in the Detroit area did not sell Williams pins as another distributor, Martin & Snyder already had exclusive rights for the area.
    This is from memory, not Wikipedia.

    Bally Wulff was listed as the exclusive German distributor for DE Star Wars (the game that came four months after LW3) so there was probably a service agreement already in place for LW3 between BW and DE.

    http://www.nypinball.com/showdetailbro.php?br=443_front_org.jpg

    viperrwk

    #13 11 years ago

    I know a few things about Bally Wulff. See photo. There are three more in storage. I used to have five in the gameroom at one time. Too much wall space being taken though.

    IMAG2684.jpgIMAG2684.jpg

    #14 11 years ago
    Quoted from Crash:

    Obviously the CPU ROM contains mainly game code but I was able to find a few text strings by viewing lw3cpuu.208 with a hex editor.

    The *nix command 'strings' may help you here in the future. I'm sure there's a Win version if that's your thing.

    http://en.wikipedia.org/wiki/Strings_(Unix)

    #15 11 years ago

    Cool stuff, thanks for posting

    #16 11 years ago

    Does anybody know what format the ADPCM sounds in Data East games are? I'd like to replace the long line Murtaugh says when you drain with something better (and shorter) but I can't decode it.

    #17 11 years ago

    LW3 definately needs swear roms for sure...

    If i could get roms like that i'd buy another LW# in a milisecond... !

    #18 11 years ago

    That's not something I'm into, sorry. My hacks are mainly proof-of-concept.

    #19 11 years ago

    Well I replaced my first sound! Replaced "I'm impressed" with "Hey, that's good work." Works flawlessly in PinMAME. Lots more to do later.

    #20 11 years ago

    Do the sounds have header information? I poked over things, didnt see the usual markers for common sound files I'm aware of, I assume they have been stripped of info like that.

    #21 11 years ago

    No headers, just raw PCM data. Thank goodness Audacity can output raw sound!

    1 week later
    #22 11 years ago

    Did some more digging and came across some discussion involving the OKI6295 ADPCM format for the BSMT2000. This should be the "custom ADPCM" channel the DSP is capable of rendering. I will need to find a way to attempt to decode the raw streams I found. I'll report back.

    Edit: And for the record the correct playback rate for Sega/Stern samples is 11025Hz. I guessed 12KHz and it sounded pretty close but it's nice to have a correct value now.

    1 month later
    #23 10 years ago

    Update: Its been a while, but I changed all the voices I felt needed improvement over the originals. They didn't turn out bad at all for lifted movie quotes. A list of what I replaced:

    I'm impressed -> Hey, that's good work
    Here comes trouble -> I'm Chaos, he's Mayhem
    You blew it -> Wait!
    They got away -> Phooey!
    I got a bad reputation -> Gunfights, explosions, sharks...
    He's getting away! -> Grab the cat!
    You have no authority -> That's not what I'm thinkin'
    What Leo wants -> I owe this guy one
    Leo Getz -> Gimme something to do
    Ho -> Moo

    Removed:
    Ok, ok ok

    Next I'm going to work on replacing sampled musical instruments with more natural versions of the synthesized ones Brian Schmidt used. Already found a few pretty close matches on a free site. Another update later to come.

    #24 10 years ago

    Very interesting work here Crash
    The sound roms don't have checksums?

    #25 10 years ago

    They do, and if anyone wants to try these ROMs in their game once I'm farther along I'll need someone to re-hash the new files and do what's necessary to make machines accept them.

    #26 10 years ago
    Quoted from Crash:

    if anyone wants to try these ROMs in their game once I'm farther along I'll need someone to re-hash the new files and do what's necessary to make machines accept them

    That would be awesome.. surely there's someone that can do this?

    #27 10 years ago

    Sent ChadH a PM, given his excellent Star Wars work lately maybe he can help me tie together an official release.

    1 year later
    #28 9 years ago
    Quoted from Crash:

    I can rip sounds using the "standard" VOX format but the results aren't normalized and sometimes come out distorted (like many sounds in Ripley's).

    Try 4-bit ADPCM for some of the ripley's sound. The speech is nice and clear using that format. It looks like some of the sound files are a mix of 8 bit signed pcm and 4 bit adpcm samples.

    It is fun modifying the sound in the older DE stuff, so simple to get it working in pinmame!

    #29 9 years ago

    Which program did you use to decode the ADPCM samples? Which codec was used, just standard?

    #30 9 years ago

    I used Goldwave 4.26, I drag the rom into the program then choose Telephony / Vox ADPCM 4 bit mono / 11025. Please note it does not handle decoding the samples from a game like GNR. But it is useful on the somewhat more modern Stern games like Ripleys, etc.

    6 years later
    #31 3 years ago

    Crash is there any way to get good musics from DE ROMs by using Audacity?
    Only speech is good in DE ROMs when I open them by Audacity, and sound effects and music sounds don't sound like theirselves
    I don't have both garbage and good musics like you do in first picture, I only have garbage music
    Thanks in advance,
    Peter

    #32 3 years ago

    Music is in sequenced BSMT2000 format, so that is not possible. Certain sounds are in a custom ADPCM format and can't be decoded without hardware emulation. Only PCM sounds can be ripped directly.

    #33 3 years ago
    Quoted from Crash:

    Music is in sequenced BSMT2000 format, so that is not possible. Certain sounds are in a custom ADPCM format and can't be decoded without hardware emulation. Only PCM sounds can be ripped directly.


    There's not even BSMT2000 decoder?
    If so, I really hope it gets discovered one day
    Thanks anyway,
    Peter

    #34 3 years ago

    Unfortunately there is no real time decoder for the format. There is an ADPCM codec for sound effects and speech I just came across though. I'll try that and see if it works.

    https://github.com/superctr/adpcm

    #35 3 years ago
    Quoted from Crash:

    Unfortunately there is no real time decoder for the format.

    Sad to hear that

    Quoted from Crash:

    There is an ADPCM codec for sound effects and speech I just came across though. I'll try that and see if it works.
    https://github.com/superctr/adpcm

    Anything is better than nothing
    Good luck!
    Peter

    #36 3 years ago

    To be clear, I'm not going to mod any ROMs. Please don't expect anything, this is only academic.

    #37 3 years ago

    Okay

    2 years later
    #38 11 months ago
    Quoted from Crash:

    To be clear, I'm not going to mod any ROMs. Please don't expect anything, this is only academic.

    Program used for open the Audio ROM ?
    Program used for SAVE the AUDIO ROM Modded ?
    Thanks

    #39 11 months ago
    Quoted from gnokketto:

    Program used for open the Audio ROM ?
    Program used for SAVE the AUDIO ROM Modded ?
    Thanks

    Quoted from Crash:

    To explore the 2 sound data files I used Audacity and imported them as raw data.

    #40 11 months ago

    Thanks!
    And for save modded file into new .rom ?

    #41 11 months ago
    Quoted from gnokketto:

    Thanks!
    And for save modded file into new .rom ?

    There's a lot involved, such as the pointer table and the custom ADPCM codec used for Data East games doesn't seem to be known. Nobody is really going to get anywhere at this point in time unless the formats are better documented and actual tools are created by someone.

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/exploring-the-game-roms?hl=pinballfan2000 and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.