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

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

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,949
Country
United States
Yes, I have Python 2.7
12.000 .bin files now. How to open them, that I can translate the game? And is there a way to compress the files back after editing?
 

Nurio

That Kirby fan
Member
Joined
Mar 31, 2009
Messages
850
Trophies
0
Age
33
Location
The Netherlands
XP
450
Country
Netherlands
Yes, I have Python 2.7
12.000 .bin files now. How to open them, that I can translate the game? And is there a way to compress the files back after editing?
If they're anything like the .bin files in Tomodachi Life, you should be able to open them with Every File Explorer.
 

NCDyson

Hello Boys...
Member
Joined
Nov 9, 2009
Messages
278
Trophies
1
XP
319
Country
United States
I think I got a BCH extractor setup. I'm testing it now to see how it works. With over 12k image files in this game, it's gonna take a few minutes. Once I'm sure that it's working okay, I'll post it. Re-encoding/repacking will be a little more fun though.
 
  • Like
Reactions: Traiver

Nurio

That Kirby fan
Member
Joined
Mar 31, 2009
Messages
850
Trophies
0
Age
33
Location
The Netherlands
XP
450
Country
Netherlands
I think I got a BCH extractor setup. I'm testing it now to see how it works. With over 12k image files in this game, it's gonna take a few minutes. Once I'm sure that it's working okay, I'll post it. Re-encoding/repacking will be a little more fun though.
Fun or 'fun'?
 

NCDyson

Hello Boys...
Member
Joined
Nov 9, 2009
Messages
278
Trophies
1
XP
319
Country
United States
here's another python script to extract all the images out of the bch files. It's probably going to take a while to extract all 12,000+ images, but it'll do it. Good luck translating this game, it looks like a LOT of the text is in the images.

The script can be called from the command line like so:
Code:
py aceBCH.py -e 0.bin
right now it only converts the bch to a .png. I haven't gotten a chance to write the code to convert .png to .bch
Also, it currently only handles the 3 image formats that were found to be used, which are ETC1,ETC1A4, and RGB565.

ETC1/ETC1A4 decoding relies on etc1Util.exe, which is pretty much just a hacked up version of smealum's etc.exe, I'll post the source to that on github when I get around to it.
etc1Util also only decodes at the moment.

to convert all the bch files(all but 1 of them anyways, 1427.bin doesn't actually have an image as far as I can tell), you can create a quick .bat file like so:
Code:
for %%x in (*.bin) do py aceBCH.py -e %%x
Again, it'll probably take a while. I imagine that half of what slows this script down is the reliance on etc1util, however, I'm not about to try to re-write the etc1 decoding in python, and I didn't feel like writing the bch converter in c++. One of these years I'll get around to writing a python module(with matching .dll) that'll handle conversion to and from common 3ds pixel formats, if someone else doesn't beat me to it first.
 

Attachments

  • aceBCH.zip
    381.6 KB · Views: 1,026
  • Like
Reactions: Traiver

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,949
Country
United States
You man, are awesome! If you will, I would involve you in my project, now. You are so much help for me! I can edit the images with photoshop, right?
 

simonrule

Well-Known Member
Newcomer
Joined
Dec 18, 2009
Messages
68
Trophies
1
XP
247
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.
hello i want to translate this game the seven deadly sins unjust sin i was able to extract the cia files and now i have dat and pck files could help me please extract them here is screenshot for the files and i uploaded two files maybe will help you

.dat
2po75ls.jpg

.pck
jpwo6p.jpg
 

Attachments

  • 3ds dat and pck.7z
    27.2 KB · Views: 196
Last edited by simonrule,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Thank you. Hope you're in good spirits today like I am. :)