11 March 2016 - Forum Rules

Main Menu

How to unpack this BIN file?

Started by Laivindur, August 26, 2011, 05:28:41 PM

Previous topic - Next topic


Hi everybody,
First of all, English isn't my native language, so excuse me if I say something odd.

I really need your help.
Me and my teammates want to translate Shin Megami Tensei: Devil Survivor (NDS). But the problem is that all the files are packed in a bin file. More precisely there are three files: Target.bin (the one with all the packed files), Target.idx (I have no idea what information contains :P Maybe the length of the files), and Target.ndx (that contains the folders names, the files names, and some information that I cannot guess... maybe some type of identifier to idx file).
The other thing is, I don't even know if the bin file is compressed >.< If so, I'll shoot myself.

Of course, I have seen all the other files in the game, but there is only two folders: Snd (only music files) and Data (wich contains the Targets files).

The point is... I want to ask you a little help to understand a bit more how this files works, and that way I can make a tool to unpack Target.bin
I really want to translate this amazing game :D

If you want to help me, here's the files:
Link removed by Moderator.

I would really appreciate ANY help... I'm very lost :(

Thank you in advance.


I say, open the files in a hex editor and look for things that looks like a structure. Look for repetition. Identify the rules for when things repeat. Look for pointers and file sizes, pretty much all file formats have those.


I gave a look at the game and it's a bit more complicated than that :p
the ndx is looking like a "file allocation table" but from what i say, no pointers, just the length of the name and some code to define root and sub-folders.
The idx file look like a pointer table yes, but just half of it. I believe it hasn't nothing to do with the other 2 files.

The bin is pretty sure the archive that is descrived in the ndx and has even the NCER/NANR/etc...readable at the end like the end of the ndx file so there is a good place to find the pointers. The bin file remember me an cd-image file.

Even if you unravel this 3 files, there are more "file allocation tables" and pointers in the overlay files and the arm9 file.
A tipical game that make you think it's easy to hack because you can read alot of text in sjis but very complicated to find out the file system especially because it's shin megami tensei that is probably ported from some other console.


Damn, I thought it would be easier.
So the idx file has nothing to do with the bin file? I guess I was looking at the wrong place.

So the pointers are in the bin file and overlay/arm9 file... *Sigh*, I will look them and see if I can guess something.

Thank you very much, at least now I know where to focus.


My bet is pointers probably in the ARM9.
In the overlays you have more informations like the ndx.


I am not inclined to think that a file in a group of three files with the exact same name part is unrelated. It just seems bizarre to do so.

Roger Pepitone

One way to test whether a file is compressed:
Scan the file, and count how many times each byte occurs.  If the file is compressed with a good algorithm, the output will be pretty flat; most bytes will appear the same number of times.  If it's not compressed, you'll probably find a wide variety in how often each byte occurs.  There will probably be significantly more 0x00 bytes than, say 0xCF bytes.

We could probably help more if you provided a hex dump of the starts of the files.  Also, how long are the files?