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

  • Thread starter Deleted User
  • Start date
  • Views 18,328
  • 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,958
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,494

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,958
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.
  • BigOnYa @ BigOnYa:
    Damn that's cheap.
  • K3Nv2 @ K3Nv2:
    Slower speeds for gen4
  • K3Nv2 @ K3Nv2:
    I'll reformat and have a 3tb raid0 m. 2 at least
    +1
  • K3Nv2 @ K3Nv2:
    Lmao that sold out fast
    +1
  • Veho @ Veho:
    Yeet the cat.
    +1
  • K3Nv2 @ K3Nv2:
    Good idea
    +1
  • The Real Jdbye @ The Real Jdbye:
    i thought everybody knew cocktails are like 75% ice
  • Veho @ Veho:
    Yeah but not like this.
  • Veho @ Veho:
    It's not like they're complaining that their Slurpee is 99% ice or something, but if the cocktail calls for "shot of vodka, shot of vermouth, shot of gin, shot of Campari, three shots of juice, squirt of lemon" and ends up being a thimbleful of booze, that's a problem.
  • The Real Jdbye @ The Real Jdbye:
    the funny thing is cocktails in norway are only allowed to have 1 20ml shot of booze
  • The Real Jdbye @ The Real Jdbye:
    so..... yeah
  • The Real Jdbye @ The Real Jdbye:
    we're used to only having a thimbleful of booze
  • Veho @ Veho:
    Booo.
  • The Real Jdbye @ The Real Jdbye:
    same thing if you want whisky on the rocks or something, you can't get a double
  • The Real Jdbye @ The Real Jdbye:
    but you could buy as many shots of whisky (or anything else) as you want and ask for a glass of ice and pour them in
  • The Real Jdbye @ The Real Jdbye:
    it's dumb
  • Veho @ Veho:
    Maybe.
  • Veho @ Veho:
    There was a comparison of the number of Ibuprofen poisonings before and after they limited the maximum dosage per box or per pill (i'll look that up). No limit on the number of boxes you can still buy as many as you want, so people argued it was pointless.
  • Veho @ Veho:
    But the number of (accidental) poisonings dropped because drinking an entire package of ibuprofen pills went from "I need a new liver" to "I need a new box of Ibuprofen".
  • Veho @ Veho:
    Here we have ketoprofen that used to be prescription-only because of the risk of toxic dosages, but then they halved the dose per pill and sell them in bottles of six pills apiece instead of twenty and it doesn't need a prescription any more. Yes you can buy more than one bottle but people simply don't.
    Veho @ Veho: Here we have ketoprofen that used to be prescription-only because of the risk of toxic dosages...