ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Jun 20, 2019 1:18 pm

All times are UTC




Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Frogger 3D (.VB + .VH)
PostPosted: Sun Sep 20, 2015 8:07 am 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
Alternatively known as Frogger: He's Back!

After doing some research, I found that these extensions are the standard format for PSX games (which this game was also on as well as PC). I think though that the .VH and .VB files may have got changed up a bit when being ported to the PC considering PSounds, a PSX sound extracting tool, can't get anything out of them.

I've attached a few files from the PC version if anyone wants to take a look.


Attachments:
Frogger Sounds.zip [1.02 MiB]
Downloaded 135 times
Top
   
PostPosted: Sun Sep 20, 2015 5:31 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10545
raw 16bit pcm, mono, 22050hz?


Top
   
PostPosted: Sun Sep 20, 2015 6:51 pm 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
Could be. I have no idea, I've never reversed audio before. =P Did you guess that or did you actually look at the files?

Importing the .VB files into audacity with what you said, 11025hz gives the proper speed of majority of the sounds, though there are a few sounds like when you get 1up that are 22050.

Any way I can go about extracting the files the proper way? Would the .VH files be attached in any way, or is is just a file to do something like tell the game where to use the sounds?


Top
   
PostPosted: Sun Sep 20, 2015 7:07 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10545
Interpreting the VH file is not immediate because there are no easy references to length, freq and channels.
A comparison between two different VH files doesn't help in guessing these fields.


Top
   
PostPosted: Sun Sep 20, 2015 7:47 pm 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
Various sources say that VH is the head(er) and VB is the body, so I guess both work hand-in-hand somehow. If I may ask, why would one choose to have the header and body separately in two different files instead of just one? What are the known beneficiaries?

Well I did notice one thing, all the .VH files except for Generic.VH start largely the exact same (even going up to half the file at some times). I'll attach generic below.
The generic one is also the only one I really noticed that had the few 22050hz sounds in it, and is accessed in every zone.


Attachments:
GENERIC.zip [913.48 KiB]
Downloaded 116 times
Top
   
PostPosted: Mon Sep 21, 2015 12:33 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
Xiron wrote:
Various sources say that VH is the head(er) and VB is the body, so I guess both work hand-in-hand somehow. If I may ask, why would one choose to have the header and body separately in two different files instead of just one? What are the known beneficiaries?


No benefits to be honest, just lets game makers make the ease of ripping resources tougher. More or less a minor and simple way to protect their assets.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Mon Sep 21, 2015 1:01 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
This is a complete guess at the .VH file setup but, from what I can see:
- The first 4 bytes is an entry count.
- The rest of the file data is entries.
- The file size / entry count equals a perfect 28 bytes, so this leads me to believe each entry is 28 bytes long.

Code:
struct Entry
{
    unsigned char Data[28];
};

struct File
{
    unsigned int Count;
    Entry Entries[Count];
};


From there, looking at the entries data, there are a few spots where the data looks to be something useful.
Code:
struct Entry
{
    unsigned int A; // Always 0 or 1, possibly channels
    unsigned int B; // Seems to be data start offset.
    unsigned int C; // Seems to be size of data.
    unsigned int D; // Unknown (Seems to be 1 all the time.)
    unsigned int E; // Unknown (Seems to be 1 all the time.)
    unsigned int F; // Hz (Seems to be 11025 all the time.)
    unsigned int G; // Bit count possibly, seems to be 16 always.
};


Is what I could come up with. I'm not a sound file guy but seems pretty straight forward. Hope that helps.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Mon Sep 21, 2015 2:22 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
Alright, here is a static compiled setup of the file you gave converted to a .wav using a tool I wrote real quick.
It seems like they compress multiple sounds into the single file. So the entries I showed above seem to be a single sound each.

The way I built this was to force all sounds into a single file. I can adjust the tool to write separate sounds as well. The other issue is, is that I'm not 100% certain what some of the entry fields are for so I cannot guarantee this will work for all files you make.


Attachments:
newsound.7z [709.88 KiB]
Downloaded 124 times

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here
Top
   
PostPosted: Mon Sep 21, 2015 3:20 am 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
Heh, well at least you can write programs, I'm helpless. :P
I wonder how the game tells the sounds apart when it is all packed into one file... time frames?

If it isn't too much trouble, having them extract separately would be great.
Thank you for your time!


Top
   
PostPosted: Mon Sep 21, 2015 3:41 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
The header info I posted above is how it knows the sound files per-file. When I get some free time later tonight I'll make another tool that will dump them all to separate files.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Mon Sep 21, 2015 5:56 am 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
For the sakes of game modding, would the challenge of recreating a new file(s) be something you're up to afterwards?
I fully understand if you'd rather invest your time elsewhere.


Top
   
PostPosted: Mon Sep 21, 2015 10:10 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
Alright here is a tool that will let you drag and drop the .vh file onto the form and it will dump all the sound files into a new 'ExtractedSounds' folder where the .vh file is located at.

Some rules for this to work:
- The .vh and .vb files must be in the same folder.
- The .vh and .vb files must share the same file name. (For example: GENERIC.vh and GENERIC.vb)

Should create the .wav files properly no matter the hz playback rate. I'm not a sound expert though so I could have done things wrong. Also there are a block of sounds I'm unsure of due to how they are stored in the file. Because of how they are stored I just skip them for now until someone else has some feedback on how they should be handled. All files play fine with what you supplied. Hope this is what you wanted.


Attachments:
VHVBSC.7z [6.62 KiB]
Downloaded 158 times

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here
Top
   
PostPosted: Tue Sep 22, 2015 1:47 am 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
atom0s wrote:
Should create the .wav files properly no matter the hz playback rate.
Kinda. Like 1/10 chances I'll have of hitting the correctly trimmed sound. There are bunch of different files for each sound, lots cut or overlapping into the next, sometimes even having the wrong hertz.

Aside from these factors, everything is fine.


atom0s wrote:
Also there are a block of sounds I'm unsure of due to how they are stored in the file.
Example of one of these blocks?


Top
   
PostPosted: Tue Sep 22, 2015 4:19 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
The hz I use come from the headers for each entry. So they should be correct. Is there specific files that are not working properly? I can take a look at them.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Tue Sep 22, 2015 4:45 am 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
Erm, yeah. I suppose. I tried the generic one which was one of the ones I attached and it worked perfectly (aside from the ones you said you couldn't figure). The cave one and the desert on the other hand that are also attached... well, as you can tell by the first 10 sounds of the cave that come out, they are all the same sound extracted, with different cuts, some even different hertz.


Top
   
PostPosted: Tue Sep 22, 2015 5:24 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
Xiron wrote:
Erm, yeah. I suppose. I tried the generic one which was one of the ones I attached and it worked perfectly (aside from the ones you said you couldn't figure). The cave one and the desert on the other hand that are also attached... well, as you can tell by the first 10 sounds of the cave that come out, they are all the same sound extracted, with different cuts, some even different hertz.


Looking at the .VH files, everything lines up fine with how my extractor saves things. It seems like some of the files could be just non-used sounds that are there for possible reusage later on or something. It seems only a small hand few in each of the other files are like this while the rest play fine and have a single sound playing. I could be wrong though, but that is how it looks to me.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Tue Sep 22, 2015 7:08 am 
User avatar

Joined: Sat Sep 12, 2015 7:09 am
Posts: 104
Only a small handful? Erm, at least 70% of all the sounds that come out of the cave one is that one sound of the bat (or whatever that high pitched sound is, I don't even know.). As it turns out though, only the first 31 sounds (70%) are like that. The remainder (#032-045) afterwards are the proper sounds and are the only thing that needs to come out. Everything prior is just garbage extra.


Top
   
PostPosted: Wed Sep 23, 2015 10:18 pm 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
The second half of entries in the .VH files looks like this:
Image Image

(First image is GENERIC.VH, second is CAVES.VH)

Field wise, things start looking like:
- 1: Always set to 0 in the second half of the files.
- 2: Usually set to the .VB file length. (some are not like this though)
- 3: Set to an unknown value that is not a size that I can understand.
- 4: Usually always set to 1.
- 5: Usually always set to 1.
- 6: Still seems to be a hz value.
- 7: Still seems to be a bitrate or block size value.

I'm not too sure what to do with that block without really debugging the game making use of them.

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
PostPosted: Sat Jan 12, 2019 3:50 am 

Joined: Sat Jan 12, 2019 3:47 am
Posts: 2
atom0s wrote:
Field wise, things start looking like:
- 1: Always set to 0 in the second half of the files.
- 2: Usually set to the .VB file length. (some are not like this though)
- 3: Set to an unknown value that is not a size that I can understand.
- 4: Usually always set to 1.
- 5: Usually always set to 1.
- 6: Still seems to be a hz value.
- 7: Still seems to be a bitrate or block size value.


Thanks for this outlier. I was able to complete the format information based on some of the information you gave. We can currently export and import these sounds now.

However, recently re realized the Playstation sound format is a bit different from the PC version. I've attached the files below. PSound can extract these sounds, but it's not open source so that doesn't help me very much.

I've been having trouble finding documentation on how the audio bank is stored. The header isn't an issue.

If you could help again, that'd be fantastic.

Thanks!


Attachments:
Frogger Sounds.zip [229.13 KiB]
Downloaded 12 times
Top
   
PostPosted: Sat Jan 12, 2019 4:47 am 
User avatar

Joined: Sat Dec 27, 2014 8:49 pm
Posts: 124
There are several tools that can extract the sounds, such as:
http://hitmen.c02.at/files/releases/psx/hit-snd.zip

In this case, the frequency looks to be 11025. Using that tool, you can extract and play the converted wav files fine.

This is another project that is open source:
https://github.com/vgmtrans/vgmtrans

_________________
My personal site: http://atom0s.com
Donations can be made via Paypal: Click Here


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited