ROM Hack How do you extract files from a .dat file extracted from a 3DS game?

  • Thread starter Deleted User
  • Start date
  • Views 18,203
  • Replies 30

NCDyson

Hello Boys...
Member
Joined
Nov 9, 2009
Messages
278
Trophies
1
XP
319
Country
United States
.dat could be any type of file... if you want help you should probably post a screenshot of the beginning of the file in a hex editor.
 
D

Deleted User

Guest
OP
.dat could be any type of file... if you want help you should probably post a screenshot of the beginning of the file in a hex editor.

awwX1RS.png
 

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,947
Country
United States
That looks like an LZ11 compressed file. You should probably be able to decompress it with DSDecmp (or use the DSDecmp GUI in 3DSExplorer, setting it to LZ11). It's up to you to figure out the format after you decompress the data, though.

I had decompressed the pack.dat file with your method. There are 2 files now, pack.dat (129MB) and the pack_dec.dat (9KB). Can you tell me, what to do next?
 
D

Deleted User

Guest
OP
probably just a bch model based off the compressed pic
It most likely is not, but rather a Capcom custom file using the BCH extension. The Ace Attorney Trilogy uses no 3D models.
Well, except for on the home menu, I think? I, myself don't own AAT.
 

andibad

Soon™
Member
Joined
Sep 14, 2009
Messages
701
Trophies
0
Location
hospital
XP
247
Country
Indonesia
if i can read it correctly based of screenshot, that file :
- compressed by lz 11
- uncompressed (iirc) size is 8932 byte or around 8.72265625 KB (rounded to 9 KB)
- but filesize of pack.dat is around 120~ mb?

you should find file table for that file, as stated by nagato.
 
D

Deleted User

Guest
OP
if i can read it correctly based of screenshot, that file :
- compressed by lz 11
- uncompressed (iirc) size is 8932 byte or around 8.72265625 KB (rounded to 9 KB)
- but filesize of pack.dat is around 120~ mb?

you should find file table for that file, as stated by nagato.

You are entirely correct. It honestly amazes me how people can identify a file's compression method, etc, just by looking at it.
Anyways, how do you find the file table?
 
D

Deleted User

Guest
OP
It most likely is not, but rather a Capcom custom file using the BCH extension. The Ace Attorney Trilogy uses no 3D models.
Well, except for on the home menu, I think? I, myself don't own AAT.

bch is a container of sorts, often it contains a 3d model but it also contains the textures.

So its not a stretch to assume capcom used bch as a container for various 2D textures.

Its deffinitly a BCH file though, file extensions come and go and mean very little, but if its a BCH header (as we can see there) then its almost certain to be a BCH file, but its most likely been customized a little, as it always seems to be.
 

Nurio

That Kirby fan
Member
Joined
Mar 31, 2009
Messages
850
Trophies
0
Age
33
Location
The Netherlands
XP
450
Country
Netherlands
if i can read it correctly based of screenshot, that file :
- compressed by lz 11
- uncompressed (iirc) size is 8932 byte or around 8.72265625 KB (rounded to 9 KB)
- but filesize of pack.dat is around 120~ mb?

you should find file table for that file, as stated by nagato.
There's a pack.inc together with the pack.dat... Is it possible that's the file table?

bch is a container of sorts, often it contains a 3d model but it also contains the textures.

So its not a stretch to assume capcom used bch as a container for various 2D textures.

Its deffinitly a BCH file though, file extensions come and go and mean very little, but if its a BCH header (as we can see there) then its almost certain to be a BCH file, but its most likely been customized a little, as it always seems to be.
Yeah, my initial assumption has always been that this contained all the sprites and other graphics.
 

NCDyson

Hello Boys...
Member
Joined
Nov 9, 2009
Messages
278
Trophies
1
XP
319
Country
United States
Here's a really crappy python script to extract all 12940 files from the pack.dat... It took like an hour to complete on my computer, maybe someone else could speed it up.

Place this script, along with DSDecmp into the same folder as the pack.dat and pack.inc and it'll extract and decompress everything. There were no file names stored in the pack.inc, so they're all numbered. The BCH files look to have a really simple structure, so extracting the images out of them shouldn't be too hard.
 

Attachments

  • packExtract.zip
    696 bytes · Views: 1,491

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,947
Country
United States
Like this? And whats now?

Nvm, I got over 12.000 extracted and decompressed files now. How to open them, I would translate the game...
u6cipbje.jpg
 
D

Deleted User

Guest
OP
Do you have Python installed?
You'll require python to be installed in order to run a Python script.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs