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

DarkMatterCore

I like turtles.
OP
Developer
Joined
May 30, 2009
Messages
1,288
Trophies
1
Age
27
Location
Madrid, Spain
Website
github.com
XP
2,514
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
532
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
74
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

I like turtles.
OP
Developer
Joined
May 30, 2009
Messages
1,288
Trophies
1
Age
27
Location
Madrid, Spain
Website
github.com
XP
2,514
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
411
Trophies
0
Age
23
XP
681
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,119
Trophies
1
XP
2,609
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
 

You may also like...

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Veho @ Veho:
    I tried being a mod for a while. It was too much.
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    In other words, dealing with harassing and nonsensical PMs on a daily basis.
  • M4x1mumReZ @ M4x1mumReZ:
    Running for mod would be nice, but then again you have to deal with tons of negative people.
  • DinohScene @ DinohScene:
    you'll have a looooong way to go young grasshopper
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    I know.
  • M4x1mumReZ @ M4x1mumReZ:
    You'd need to be a respectful and repetable member for something like what, 4 years?
  • DinohScene @ DinohScene:
    being helpful to the community and a similar mindset as the rest of the staff also goes a long way
    +1
  • K3N1 @ K3N1:
    Alot of users just want it for attention tbh
    +1
  • K3N1 @ K3N1:
    I know a forum that said if you're good and don't ask you usually get it
    +1
  • DinohScene @ DinohScene:
    you mean this forum?
    +1
  • K3N1 @ K3N1:
    Nah others
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    You know what they say, I want never gets.
  • K3N1 @ K3N1:
    Iirc temp usually votes people in or holds an application every once in a blue moon
    +1
  • DinohScene @ DinohScene:
    ^ that
    +1
  • K3N1 @ K3N1:
    They're pretty good at hiring the sexy ones
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    Inc. Dinoh
  • K3N1 @ K3N1:
    550k members and only about a dozen staff they hold their own pretty well
    +1
  • K3N1 @ K3N1:
    Stupid region locked digital keys are the dumbest thing next gen consoles have come up with
    +1
  • K3N1 @ K3N1:
    @DinohScene, that Xbox code ever work?
    +1
  • DinohScene @ DinohScene:
    yeh it was the PC version of 76
    +1
  • DinohScene @ DinohScene:
    regardless, the hubby took it : D
    +1
  • K3N1 @ K3N1:
    lawl the site said xbox
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    Was given a PC Game Pass key for free on Temp, didn't work because region locking. :(
  • M4x1mumReZ @ M4x1mumReZ:
    Or as I like to call it, RACISM.
    K3N1 @ K3N1: Well it finally happened...