Home | Forums | What's new | Resources | |
Extracting data from ELF Files |
Madroms - Mar 19, 2007 |
antime | Mar 19, 2007 | |||
Tantalus Interactive... made the Saturn version of HotD. |
antime | Mar 21, 2007 | |||
IFF... is a very simple file format which was (and still is) popular in games. "BIFF" is probably a custom variant but the cunk id + length structure seems to be the same as plain IFF, with the exception that the length is stored as a little-endian value. Dunno about the data itself. Based on some other strings in the code I would hazard the guess that the start of the "ELF" file is an index that stores data about the contained files which are identified by the hashed filename (which would explain why all the filenames are included in the code). If you figured out the index structure and the hash algorithm you could then get the original filenames for all files in the "ELF" image. |
TascoDLX | Mar 22, 2007 | |||||||||||
.ELF Table of Contents 0x00000093 -- number of files in the .ELF 0x00000001 -- hash weight (for the filename hash) 0x00000002 -- number of sectors used for the .ELF TOC 0x00000000 -- volume ID (N/A) The rest of the TOC is 16 bytes per file. The first one is: 0x97D63044 -- hashed filename 0x00000011 -- start sector (offset from start of the .ELF) 0x000001A8 -- filesize in bytes 0x00000001 -- number of sectors used for the file [not set in HOTD] The filename hash is calculated thusly:
Code:
Any overflow in hashval is ignored. As demonstrated in House of the Dead, the filename can include a directory (e.g., 'dialog\dialog.rbh'). Theoretically, it could be any text since the length and format of the string is largely irrelevant. If you want to test out the hash, try this one (from HOTD): Filename = dialog\dialog.rbh Hash weight = 9 The hashed value is 0x1E769DC4 [if you're curious, the unclipped value is 0xF7C7B421E769DC4]. Enjoy! |
Madroms | Mar 23, 2007 | |||||||
Great, this is all the info we need to understand the Elf file structure. Thanks a lot man! Where did you find this info ? Hashed filenames are little bit strange for me. Is it easy to de-hashed them ? With these information, could someone make a proggy to exact data from .elf files ? Also, found in the 0.AAA file of THOTD:
Code:
Code:
|
TascoDLX | Mar 23, 2007 | |||||||||
I extrapolated it.
It's pretty much impossible. The only way you'll figure it out is to look for filenames in the executable, run those through the hash, then look them up in the .ELF's TOC. If you want to figure out the filenames in HOTD's .ELF, I'll help you track them down. |
Madroms | Mar 24, 2007 | |||
In fact, my goal was to look inside elf files to find readable files (txt) and movie files to identify which type of video files they used (to fill my databases on my site). So I don't really need all the filenames on each Elf file. It will be just a great extra. Thanks for the offer. On THOTD's Elf File, I don't find any AVI/CPK video files. Do you know if they used some ? |
TascoDLX | Mar 26, 2007 | |||
No, House of the Dead doesn't use any movie files. All of the cutscenes are engine scripted, which is common for such 3D arcade games given the storage issues. But I'm glad I could help anyway. |
Madroms | Mar 28, 2007 | |||
Ok. Thanks again for your great help. Much appreciated |