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

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

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,958
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,028
  • Like
Reactions: Traiver

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,958
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
  • K3Nv2
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • Veho @ Veho:
    Do you dangle a baggie in front of them, like a carrot?
    +1
  • The Real Jdbye @ The Real Jdbye:
    they're the same thing
    +1
  • The Real Jdbye @ The Real Jdbye:
    i like that idea
    +1
  • Veho @ Veho:
    What's the same thing?
    +1
  • The Real Jdbye @ The Real Jdbye:
    before or after a hit
    +1
  • Veho @ Veho:
    Nah, a hit gives them mad meth powers, but makes them more difficult to control.
    +1
  • Veho @ Veho:
    Before a hit they're like zombies, persistent but slow.
    +1
  • Veho @ Veho:
    It's a tradeoff.
    +1
  • The Real Jdbye @ The Real Jdbye:
    no i mean, before a hit is after the previous hit
    +1
  • The Real Jdbye @ The Real Jdbye:
    if you keep them well enough fed, it's the same thing
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    By the power of Florida Man, I have the power!!! *Lifts up meth pipe* Meth Man!!! lol
  • BakerMan @ BakerMan:
    Guys, I just learned my little brother is in the hospital because he had a seizure last night.
  • cearp @ cearp:
    Sorry to hear that BakerMan
    +2
  • BakerMan @ BakerMan:
    Just found out he's doing alright, doing a lot of complaining too, rightfully so. Who wouldn't complain after having a seizure and being hospitalized?
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Glad he is OK and complaining is cool :)
    +1
  • K3Nv2 @ K3Nv2:
    Yeah been there had that no fun
    +1
  • K3Nv2 @ K3Nv2:
    They'll give him sleep studies eegs and possibly one week hospital stay
    +1
  • BakerMan @ BakerMan:
    I hope it's not a week.
  • K3Nv2 @ K3Nv2:
    It's standard so doctors can get a idea about what's going on
  • BakerMan @ BakerMan:
    understood
  • BakerMan @ BakerMan:
    well, i'm glad he seems to be doing fine, and ig i'm going to start spewing goofy shit again
  • BakerMan @ BakerMan:
    Update: Turns out he's epileptic
  • K3Nv2 @ K3Nv2:
    Get a 2nd opinion run mris etc they told me that also
    K3Nv2 @ K3Nv2: Get a 2nd opinion run mris etc they told me that also