The Forum is up for sale: XeNTaX Forum looking for new owner
Silent Hill:Homecoming pak files?
-
gamemaster
- n00b
- Posts: 18
- Joined: Mon Jul 21, 2008 1:07 am
Silent Hill:Homecoming pak files?
The contents of this post was deleted because of possible forum rules violation.
-
MrDeviance
- ultra-n00b
- Posts: 5
- Joined: Thu Nov 27, 2008 5:05 am
Re: Silent Hill:Homecoming pak files?
The contents of this post was deleted because of possible forum rules violation.
-
Rheini
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Silent Hill:Homecoming pak files?
Code: Select all
char magic[4]; // PAK_
uint version; // ?, =1
uint numFiles;
uint uk;
struct Entry
{
char name[64];
uint uk1; // 1 or 33
time_t timestamp;
uint offset;
uint size1;
uint flags<format=hex>; // ?
uint size2; // guess the 2 sizes are compressed size and uncompressed size, but I haven't seen any compressed file yet
} directory[numFiles];-
MrDeviance
- ultra-n00b
- Posts: 5
- Joined: Thu Nov 27, 2008 5:05 am
Re: Silent Hill:Homecoming pak files?
So, by that you are saying you can't figure it out?
Should I be waiting on a fix here anymore or should I aknoledge that the format is impossible to crack by this community?
The reason I am asking this, is because I don't like to come to a forum and wait for new posts if nobody will ever post back.
If possible, I would like a final conclusion on this file.
A yes, no or please wait some more will do.
Should I be waiting on a fix here anymore or should I aknoledge that the format is impossible to crack by this community?
The reason I am asking this, is because I don't like to come to a forum and wait for new posts if nobody will ever post back.
If possible, I would like a final conclusion on this file.
A yes, no or please wait some more will do.
-
Rheini
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Silent Hill:Homecoming pak files?
You can at least extract the entries with valid offsets and sizes.
Somebody just needs to write a BMS. I don't have time for that.
Somebody just needs to write a BMS. I don't have time for that.
-
MrDeviance
- ultra-n00b
- Posts: 5
- Joined: Thu Nov 27, 2008 5:05 am
Re: Silent Hill:Homecoming pak files?
Oh well, I didn't expect much from here anyway so thanks for caring to check those files.
When it will support this game I will buy the app till then good luck.
When it will support this game I will buy the app till then good luck.
-
Rheini
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Silent Hill:Homecoming pak files?
To finish this:
(code is not tested)
(code is not tested)
Code: Select all
GetDString magic 4 0;
If magic <> "PAK_";
CleanExit;
EndIf;
Get Dummy Long 0;
Get numFiles Long 0;
Get Dummy Long 0;
For i = 1 to numFiles;
GetDString filename 64 0;
Get Dummy Long 0;
Get timestamp Long 0;
Get offset Long 0;
Get size Long 0;
Get Dummy Long 0;
Get Dummy Long 0;
If offset <> 0;
Log filename offset size;
EndIf;
Next i;- Gocha
- veteran
- Posts: 109
- Joined: Fri Dec 12, 2008 8:16 pm
- Location: Batumi, Georgia, GE
- Has thanked: 57 times
- Been thanked: 9 times
- Contact:
Re: Silent Hill:Homecoming pak files?
Rheini
What does it means your CODEs?
Here are peaople who do not know any programming lang.
What does it means your CODEs?
Here are peaople who do not know any programming lang.
Last edited by Gocha on Wed Nov 18, 2009 4:57 pm, edited 1 time in total.
-
Rheini
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Silent Hill:Homecoming pak files?
This is a MultiEx Commander script to support this file type.
Think you can also use it with GameExtractor.
Think you can also use it with GameExtractor.
- Gocha
- veteran
- Posts: 109
- Joined: Fri Dec 12, 2008 8:16 pm
- Location: Batumi, Georgia, GE
- Has thanked: 57 times
- Been thanked: 9 times
- Contact:
Re: Silent Hill:Homecoming pak files?
Rheini
either it doesn't works or I'm doin' somthin' wrong!
How to use it by GExtractor i've no clue!
Please tell me what to do
either it doesn't works or I'm doin' somthin' wrong!
How to use it by GExtractor i've no clue!
Please tell me what to do
My great respect and appreciation for them, who research game files! Special thanks to: aluigi, bacter, DerPlaya, Rick, Turfster, twig, Zench. Sorry if someone is missing in my list, I'll update when I'll notice it again
-
Rheini
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Silent Hill:Homecoming pak files?
In the scripts folder there is a scripts.zip.
You may add files in there:
You may add files in there:
Code: Select all
<bms author="Trass3r" games="'Silent Hill'" platforms="'PC', 'PC'" ext="PAK">
GetDString magic 4 0;
If magic <> "PAK_";
CleanExit;
EndIf;
Get Dummy Long 0;
Get numFiles Long 0;
Get Dummy Long 0;
For i = 1 to numFiles;
GetDString filename 64 0;
Get Dummy Long 0;
Get timestamp Long 0;
Get offset Long 0;
Get size Long 0;
Get Dummy Long 0;
Get Dummy Long 0;
If offset <> 0;
Log filename offset size;
EndIf;
Next i;
</bms>- Gocha
- veteran
- Posts: 109
- Joined: Fri Dec 12, 2008 8:16 pm
- Location: Batumi, Georgia, GE
- Has thanked: 57 times
- Been thanked: 9 times
- Contact:
Re: Silent Hill:Homecoming pak files?
It says: "The selected script wasn't able to open the archive."
Last edited by Gocha on Wed Nov 18, 2009 5:00 pm, edited 1 time in total.
My great respect and appreciation for them, who research game files! Special thanks to: aluigi, bacter, DerPlaya, Rick, Turfster, twig, Zench. Sorry if someone is missing in my list, I'll update when I'll notice it again
-
MrAdults
- Moderator
- Posts: 1007
- Joined: Mon Mar 23, 2009 2:57 am
- Has thanked: 44 times
- Been thanked: 505 times
Re: Silent Hill:Homecoming pak files?
I hope resurrecting a 3-month-old thread isn't too taboo here, but there is a good reason for it.
I was looking into this format myself, and have hammered out all of the specifics. Then I went on to figure out all of the custom container formats and the models. A complete viewer and extractor for all of the resources can be obtained here:
http://www.richwhitehouse.com/index.php?postid=32
Specs on the actual PAK files are as follows:
If fileIndex is -1, the ofs is the location of bytes of the file from the beginning of the main PAK file. Otherwise, fileIndex directly corresponds to the numbered file extension (e.g. fileIndex 9 is for pakname_09.pak), while the offset is relative to the beginning of that file. There is one exception, though. When fileIndex >= 0, and unknownB is 3, the offset is still for the main PAK file. Not sure what the significance is, but with these rules, every file in the game can be extracted reliably. Also be aware that multiple entries can have the same "name", while having different offsets to different data (for example, a model and a material file with the same base file name).
Additionally, SHADERS.PAK and SHADERSL.PAK have special half-sized pak entries, with no header bytes to indicate such, for some reason. Their entry structure is as follows.
Some files in the PAKs are LZO-compressed. They begin with a 12 byte header, "LZO ", followed by 2 big-endian 32-bit integers. The first int is the size once decompressed, and the second int is the size of the compressed data. Run the data that follows the 12 bytes through a standard LZO decompression algorithm up to the value of the second int, and you will have your original file data. This compression is often used on DDS textures in the PAK files.
Some main data types include Ogg files, "SYT" files (which are DDS files with a custom header), and "EIFF" files (a media container header used on models and particle systems - the container includes resource dependencies for materials or other files that the model/particle system references). I will eventually document my findings on these media formats as well if anyone is interested, but in the mean time, feel free to contact me if you're working on deciphering the formats yourself and want some pointers.
http://www.richwhitehouse.com/index.php?postid=32
Specs on the actual PAK files are as follows:
Code: Select all
typedef struct shPakHdr_s
{
char id[4]; //PAK_
uint unknownA;
uint numFiles;
uint unknownB;
} shPakHdr_t;
//skip ahead sizeof(header), and for each entry up to numFiles:
typedef struct shPakEntry_s
{
char name[64];
uint indexFlag;
uint timestamp;
int ofs;
int size;
short fileIndex;
ushort unknownB;
uint unknownC;
} shPakEntry_t;
Additionally, SHADERS.PAK and SHADERSL.PAK have special half-sized pak entries, with no header bytes to indicate such, for some reason. Their entry structure is as follows.
Code: Select all
typedef struct shMiniPakEntry_s
{
char name[64];
int ofs;
int size;
int unknownA;
} shMiniPakEntry_t;
Some main data types include Ogg files, "SYT" files (which are DDS files with a custom header), and "EIFF" files (a media container header used on models and particle systems - the container includes resource dependencies for materials or other files that the model/particle system references). I will eventually document my findings on these media formats as well if anyone is interested, but in the mean time, feel free to contact me if you're working on deciphering the formats yourself and want some pointers.
- shekofte
- mega-veteran

- Posts: 221
- Joined: Sun Jan 18, 2009 1:45 pm
- Location: Sagittarius
- Has thanked: 299 times
- Been thanked: 20 times
- Contact:
Re: Silent Hill:Homecoming pak files?
I hope you become success ,masters ! that is really a beautiful game !
ILLUSORY VIDEO GAMES ARE MORE IMPORTANT THAN PRECIOUS INTERNATIONAL FOOTBALLs
