Hacking *.ROM, *.PCM and *.VAR files?

DarkMatterCore

Finding my light.
OP
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,602
Country
Spain
This is quite simple: the ROM file on the folder "content5" of the ISO is the game itself. It is LZH8 compressed. If you play the ROM after you uncompress it in an emulator, it works, but it has no sound. On the other hand, there's a PCM file on the same directory, which is also LZH8 compressed. I don't know if it is related in any way to the game sound, but it seems to be so... And there's a VAR file, too. Do you guys know what to do in order to merge this files, or to enable the sound on the ROM?
 

koji2009

Well-Known Member
Member
Joined
Mar 13, 2009
Messages
1,193
Trophies
0
XP
197
Country
United States
If the music is seperated from the rom (more likely it's just disabled... figured they'd do this through emulation, but they may have disabled it on the rom itself... would be relatively easy to do unless they actually ripped the music out of the roms which would be complicated AND unnecessary) there isn't anything you can do about it. By the sounds of it, that audio isn't actual SPC music data but rather an actual audio file akin to a .wav

As I stated earlier, it seems unlikely that they would hack out the actual SPC music (which would be identical to the SNES copy) as they'd save next to nothing space wise and it could throw off the pointer information. Doing a hex comparison of a regular rom versus the roms dumped from the DVD would tell you if the music was actually ripped, and if not should give you a good idea what needs to be modified to "restart" the SPC.

The actual PCM music data can not be played in an actual emulator or recombined with the rom because it's not data a SNES was designed to handle.
 

farcry15

Well-Known Member
Member
Joined
Dec 21, 2009
Messages
225
Trophies
0
XP
109
Country
United States
they use the same rom and pcm files if you exctract a vc wad. i tried to replace it with a injected super mario all stars+world rom but couldn't get it to work.
 

chonka

Active Member
Newcomer
Joined
Oct 17, 2010
Messages
26
Trophies
0
XP
21
Country
the .pcm file contains all of the games sound/music files.

the .rom file has had the .pcm data 'patched' out, if you check the .rom in hex you can see the data area is now filled with PCM in large sections of the rom file. Ive done much VC editing and my understanding of it would be with the way that Nintendos emulator works, and that an external .PCM file makes it somehow easier for the emulator to handle, possibly giving the emulator less decompression work or something i dont know.

I have previously succeeded in patching other roms to use these official .pcm files, for instance translated roms, but im yet to find anyone interested enough to look at the actual structure of .pcm or a method of 'repatching' the pcm back into the rom. I have only briefly discussed with people such as cowering.

A few other things of interest is that YES Nintendo do hacking on VC roms to fix typos/bugs/advertising rights and even to edit politically correctness of some games

Also for some roms that use special graphics chips they use a similar method as .pcm files and use external graphics files for the roms.

END SUGGESTION: I dont know of a way to merge the .pcm files back into the VC rom but your best bet is to use the super mario collection 'good dump' rom, hex search the PCM patched offsets in the VC rom and patched with the corresponding bytes from the 'good dump' rom. Ive done this previoulsy with some roms during my testing for rom injection, and yes sound and music worked perfectly
smile.gif
(oh, and be sure to remove headers off the good dump rom first)

(BTW this is my new ID, ive been around for a while)
 

tubebar

Well-Known Member
Member
Joined
May 17, 2009
Messages
227
Trophies
0
XP
517
Country
United States
What's up with the new ID anyway Chonka?

I extracted the ROMs for Super Mario-All Stars (PAL) and JPN for GoodSet. It's basically the same structure as the VC (just on a disc). Content 5 (05 app) w/ var and lzh8 compression.

The whole PCM thing w/ SNES VC is "strange" to me as injects work w/ internal PCM too. So why use it in the first place? And some older SNES VC (Donkey Kong Country 2) have 2 copies in the VC...original + modified w/ PCM (prob a slip up).

@farcry15 make sure your compress the ROM w/ lzh8 before you put it back or it will fail just like VC. If you did that and still fails...one of those things, can't inject everything.

@koji2009 it's not SPC or music just PCM samples, like donkey kong's voice or se...or well yeah instruments (hence why there's no sound on an emu). Quality and size are the same, but format is slightly different. I did an extraction test over a year ago and they matched and you can play it on CoolEdit just need to know the format. I used a tool to extract PCM from SNES ROM and compared them...size and quality matched, crc didn't, format was changed.
 

NEO117

Well-Known Member
Member
Joined
Mar 5, 2008
Messages
316
Trophies
1
XP
533
Country
Venezuela
if you're doing this just to play the games, download the rom.

If it's for fun and experimenting then I've no idea about what to do but have fun XD
 

tubebar

Well-Known Member
Member
Joined
May 17, 2009
Messages
227
Trophies
0
XP
517
Country
United States
@NEO117 They're doing it for fun. I only care about ROMs that are different (i.e. updated or modified) for GoodSets. I have no interest in ROMs that are identical.

No idea if Super Mario All-Stars has been modified/updated? I didn't look at it...cowering does that w/ GoodTools.

@PabloACZ you cn't merge that pcm back into the ROM as it's a diff format, but as I said don't think the PCM has been updated or changed...but no way of knowing. If the ROM is the same (minus the external PCM) it's pointless to do.
 

Megan

Active Member
Newcomer
Joined
Mar 14, 2009
Messages
42
Trophies
0
XP
84
Country
It would be pretty interesting if other roms could be inserted into the iso so that we could have all of our SNES games accessed via USBloaders without SNEEK etc...

(I don't know if that's a silly thing to imagine or not...)
 

tubebar

Well-Known Member
Member
Joined
May 17, 2009
Messages
227
Trophies
0
XP
517
Country
United States
Megan said:
It would be pretty interesting if other roms could be inserted into the iso so that we could have all of our SNES games accessed via USBloaders without SNEEK etc...

(I don't know if that's a silly thing to imagine or not...)

They can be, into WADS. No need to even use the USB loader. Do a search for "Wii SNES Injects" (injects) means hacking the VC WAD file.
 

DarkMatterCore

Finding my light.
OP
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,602
Country
Spain
Sorry for the necro-bump, but there is really a way to reintegrate the pcm data back to the ROM: https://github.com/Plombo/vcromclaim. I just used the snesrestore.py (with the brrencode3.py) on the LZH8 uncompressed files, and it worked like a charm. Quote from the vcromclaim readme:

vcromclaim project info said:
  • Can recreate a playable replica of the original ROM for SNES games where the original sound data has been removed from the ROM, by re-encoding the PCM sound data to BRR and restoring the BRR data to its original place in the ROM.

Hope this helps the other users. Mods, you can close this thread.
 

epicmartin7

Well-Known Member
Member
Joined
Aug 5, 2015
Messages
425
Trophies
0
Age
24
XP
991
Country
United States
I'm very sorry for bumping a thread that's pretty much ages old right now, but I'm having trouble putting together a Super Mario World ROM I dumped from Super Smash Bros. Brawl.

So, I got the .rom file along with .pcm file dumped. Now, I tried various methods for getting this to work, but a bunch of errors keep on occurring. Mostly with Python.

I put Python27 on my [C:] drive. The Python Scripts I put into the [C:/Python27/Tools/Scripts] directory and tried putting in the command line, but it keeps on coming up with errors.

Is there a proper way to do this at all? I'm really struggling to make this work (mostly because I'm somewhat of a Python n00b that is gradually learning).


Again, I'm sorry for bumping this thread, but I just want to make sure what I'm doing wrong.
 
Last edited by epicmartin7,

ganons

Well-Known Member
Member
Joined
Jun 12, 2005
Messages
3,289
Trophies
1
XP
3,086
Country
Sorry for the necro-bump, but there is really a way to reintegrate the pcm data back to the ROM: https://github.com/Plombo/vcromclaim. I just used the snesrestore.py (with the brrencode3.py) on the LZH8 uncompressed files, and it worked like a charm. Quote from the vcromclaim readme:



Hope this helps the other users. Mods, you can close this thread.

Hey man I know its an old thread but can you do a guide of how to extract a rom from he wad please? Got python installed and following short guide here https://github.com/Plombo/vcromclaim but not working
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    I only wish it was actually playable.
  • Veho @ Veho:
    There's a guy on the Tube of You that makes playable mechanical arcade games out of Lego. This could work on the same principle.
  • Veho @ Veho:
    Just a couple of guys taking their manatee out for some fresh air, why you have to molest them?
  • Veho @ Veho:
    Stupid Chinese shop switched their shipping company and this one is slooooooow.
  • LeoTCK @ LeoTCK:
    STOP BUYING CHINESE CRAP THEN
  • LeoTCK @ LeoTCK:
    SUPPORT LOCAL PRODUCTS, MAKE REVOLUTION
  • LeoTCK @ LeoTCK:
    THEY KEEP REMOVING LOCAL SHIt AND REPLACING WItH INFERIOR CHINESE CRAP
  • LeoTCK @ LeoTCK:
    THATS WHY MY PARTNER CANT GET A GOOTWEAR HIS SIZE ANYMORE
  • LeoTCK @ LeoTCK:
    HE HAS BIG FOOT AND BIG DUCK
  • LeoTCK @ LeoTCK:
    d*ck i mean*
  • LeoTCK @ LeoTCK:
    lol
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +2
  • BakerMan @ BakerMan:
    @LeoTCK is your partner the sascrotch or smth?
  • Xdqwerty @ Xdqwerty:
    Good morning
  • Xdqwerty @ Xdqwerty:
    Out of nowhere I got several scars on my forearm and part of my arm and it really itches.
  • AdRoz78 @ AdRoz78:
    Hey, I bought a modchip today and it says "New 2040plus" in the top left corner. Is this a legit chip or was I scammed?
  • Veho @ Veho:
    @AdRoz78 start a thread and post a photo of the chip.
    +2
    Veho @ Veho: @AdRoz78 start a thread and post a photo of the chip. +2