Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Need help with a .hgz file from resistance retribution...
Need help with a .hgz file from resistance retribution...
So, i'm translating this game, and i have to edit some files that are inside others that have this structure... i need help, please, it would be great if anyone coul help me, thx. i attached on file as a example. thx for the attention..
You do not have the required permissions to view the files attached to this post.
-
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
Indeed compressed.
The question is, which algorithm. LZH?
The question is, which algorithm. LZH?
Code: Select all
char magic[4];
uint compressedSize;
uint decompressedSize;
Re: Need help with a .hgz file from resistance retribution...
The contents of this post was deleted because of possible forum rules violation.
-
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
Good idea, but didn't help very much. This just seems to be some debug information referencing the hgz.cc source file.
Can't imagine what HGZ should stand for, Huffman Gzip doesn't make any sense since Gzip already incorporates Huffman due to zlib.
Maybe the executable would help.
Can't imagine what HGZ should stand for, Huffman Gzip doesn't make any sense since Gzip already incorporates Huffman due to zlib.
Maybe the executable would help.
Re: Need help with a .hgz file from resistance retribution...
Rheini wrote:Good idea, but didn't help very much. This just seems to be some debug information referencing the hgz.cc source file.
Can't imagine what HGZ should stand for, Huffman Gzip doesn't make any sense since Gzip already incorporates Huffman due to zlib.
Maybe the executable would help.
What do u mean by executable? the pbp? prx?
-
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
Dunno, not familiar with consoles. The main file containing the program code.
Re: Need help with a .hgz file from resistance retribution...
hmm, basically on the consoles there is no executable, he prx is like a plugin (there is two of'em in the game) an there is the pbp that's like the executable, but the only pbp that i can get is the one that update the firmware (this one has no affect in the game)... in the end all i got is the two prx (plugins)..Rheini wrote:Dunno, not familiar with consoles. The main file containing the program code.
-
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
You might try to search the files for some strings like gzip, zlib, lib, lzh, or whatever. Maybe this gives an indication.
Re: Need help with a .hgz file from resistance retribution...
Already tried... no sucess, i even opened the full iso file, but could't get anything, i've uploaded many files in a pack... here is the link:Rheini wrote:You might try to search the files for some strings like gzip, zlib, lib, lzh, or whatever. Maybe this gives an indication.
http://rapidshare.de/files/47465570/ROTER_C1.rar.html
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
the file uses the zlib compression, that's clear.
what is not clear is why it's composed by 2 zipped blocks that don't have much sense if you look at their size because the size specified in the two 32bit values at the beginning is the total size (so the total compressed and uncompressed size without references to each single block).
example:then is possible to start with the analysis of the obtained 00000014.dat
what is not clear is why it's composed by 2 zipped blocks that don't have much sense if you look at their size because the size specified in the two 32bit values at the beginning is the total size (so the total compressed and uncompressed size without references to each single block).
example:
Code: Select all
offzip -a -1 UNFREED.HGZ c:\ 0
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
the following is the bms script for extracting the files from these HOG archives:
I have checked the new files and seems that the compressed blocks have a size of 0x17ff8 bytes except the first one of 0x17fec bytes, anyway offzip does the job correctly so it's not much important
Code: Select all
# Resistance Retribution (HOG extractor)
# for generating the HOG file from an HGZ one:
# use "offzip -a -1 UNFREED.HGZ c:\ 0x14"
# rename c:\00000014.dat to UNFREED.HOG
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
#get DUMMY69 long
idstring "iiii"
get FILES long
get DUMMY long
get NAMES_OFF long
get FILES_OFF long
get OFFSET long
savepos OFFSETS_OFF
for i = 0 < FILES
goto OFFSETS_OFF
get NEXT_OFFSET long
savepos OFFSETS_OFF
goto NAMES_OFF
get NAME string
savepos NAMES_OFF
set SIZE long NEXT_OFFSET
math SIZE -= OFFSET
math OFFSET += FILES_OFF
log NAME OFFSET SIZE
set OFFSET long NEXT_OFFSET
next i
Last edited by aluigi on Thu Jun 11, 2009 6:15 pm, edited 1 time in total.
Re: Need help with a .hgz file from resistance retribution...
Bugtest wrote:the following is the bms script for extracting the files from these HOG archives:I have checked the new files and seems that the compressed blocks have a size of 0x8000 bytes except the first one of 0x17ff4 bytes, anyway offzip does the job correctly so it's not much importantCode: Select all
# Resistance Retribution (HOG extractor) # for generating the HOG file from an HGZ one: # use "offzip -a -1 UNFREED.HGZ c:\ 0x14" # rename c:\00000014.dat to UNFREED.HOG # script for QuickBMS http://aluigi.org/papers.htm#quickbms #get DUMMY69 long idstring "iiii" get FILES long get DUMMY long get NAMES_OFF long get FILES_OFF long get OFFSET long savepos OFFSETS_OFF for i = 0 < FILES goto OFFSETS_OFF get NEXT_OFFSET long savepos OFFSETS_OFF goto NAMES_OFF get NAME string savepos NAMES_OFF set SIZE long NEXT_OFFSET math SIZE -= OFFSET math OFFSET += FILES_OFF log NAME OFFSET SIZE set OFFSET long NEXT_OFFSET next i
yes, thx man, i managed to unpack the data, but, can i repack it? An thx for the HOG script.
eidt: Already figured out, if u delete the first 20bytes (14 in hex) this files turns out into a zlib compressed, then i can compress and decompress with any zlib p\zcker\unpaker. thx for all the efforts a big thanks man..
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
remember that thing I said about the size of the compressed blocks, so you can't just compress the whole HOG file and then adding a new header.
anyway I guess that the game could work also with the HOG files without recompressing them
anyway I guess that the game could work also with the HOG files without recompressing them
-
- Moderator
- Posts: 652
- Joined: Wed Oct 18, 2006 9:48 pm
- Location: Germany
- Has thanked: 19 times
- Been thanked: 46 times
- Contact:
Re: Need help with a .hgz file from resistance retribution...
lol I refused to be believe it's zlib since it seemed too obvious.Bugtest wrote:the file uses the zlib compression, that's clear.
Re: Need help with a .hgz file from resistance retribution...
Really? i will try recompressing the hog back and insert it on the game, if this doesnt work i will try to put it back whitout compression.Bugtest wrote:remember that thing I said about the size of the compressed blocks, so you can't just compress the whole HOG file and then adding a new header.
anyway I guess that the game could work also with the HOG files without recompressing them