How to split apart an uncompressed .pac file?

Game_Master001

Well-Known Member
OP
Newcomer
Joined
Dec 9, 2007
Messages
50
Trophies
1
XP
378
Country
Netherlands
I know there are no tools for regular compressed .pac files from NDS games, but what I'm having here are uncompressed .pac files (from the Yu-Gi-Oh games World Championship 2007 and 2008). It's literally just files grouped together without any compression whatsoever: the files within and the contents of those files within can be seen just by opening it with a hex editor. I was wondering if this makes any difference, if there are any tools or tricks to extract the files from these kind of .pac files?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,795
Trophies
5
XP
28,522
Country
United Kingdom
.pac is a fairly generic extension and I know of at least 6 different variations on the DS. Can't remember if I did something with any of the yugioh games here though (most times people just want deck cheats and to change the limited deck customistion against AI not knowing that breaks AI in a hurry)

In most cases then usually at the start of the fie will be some kind of indicator as to how large each each sub file within is or its location (in which case next address-current address = file size), other times said info might be in a separate file in the same directory.

I did a similar thing the other day in
https://gbatemp.net/threads/need-help-ripping-files-from-call-of-duty-black-ops-ds.633221/

The main tool I used is https://web.archive.org/web/20170218180937/http://min.midco.net/cracker/filecutter.zip if you just need a quick thing to say slice up this much of the file starting at this address (tweak your hex editor to dump the addresses in a nice list, stuff that in a spreadsheet, easy enough to built up the command to get a little batch file going on, hard to then rebuild the thing after editing but there are still ways and if you only want to poke around then hey).
 

mn1712trungson

Member
Newcomer
Joined
Oct 15, 2022
Messages
15
Trophies
1
Age
31
XP
341
Country
Vietnam
If you can find the offset table (list pointer to the file) and size,
you can write the simple QuickBMS script and parse the whole package.

The sample PAC header:
1684991528004.png


Or use the spreadsheet and make the batch with the filecutter, like FAST said:
1684991690947.png


With QuickBMS, you can write the extract script and reimport the modified file with the same script.
In a basic way, you can cut the PAC header and the data chunk. Use batch and parse the whole data chunk.
After editing files, use the simple tool copy on Windows (https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/copy) or cat on Linux


to combine the whole binary package with:
COPY /V /B *.dat \combine\dat_chunk.pac
combine edited header with:
COPY /V /B dat_chunk.pac+header.pac \combine\dat.pac
 
Last edited by mn1712trungson,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Real Jdbye @ The Real Jdbye:
    rice video is really fast, there are some games i still use it for because they are problematic with gliden64 and other plugins dont run the game properly
  • The Real Jdbye @ The Real Jdbye:
    well maybe just one game. mystical ninja starring goemon
  • The Real Jdbye @ The Real Jdbye:
    something about that game causes slowdown issues with most gpu plugins, even with rice video if i dont use the right settings
    +1
  • RedColoredStars @ RedColoredStars:
    @BigOnYa AutoRCM here too with hekate as reboot to payload. Only time I need to push a payload is going from sysMMC back to emuMMC. But its just plug it into my phone and a second later I'm all set. I have all of my games with online features on sysMMC. Like Mario Kart, Mario Party games, etc.
    +1
  • RedColoredStars @ RedColoredStars:
    Off to watch Nosferatu. Later all. Have a good evening, day, afternoon. Whatever it may be where you are. :)
    +1
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, yeah, I wanted to play it but it ran like shit
  • The Real Jdbye @ The Real Jdbye:
    i think you just need to turn framebuffer emulation off in rice video and it fixes the slowdown
  • I @ imafsiry:
    hey red send me tutorial on how to rcm on phone noob
  • I @ imafsiry:
    here
  • SylverReZ @ SylverReZ:
    @imafsiry, There should be a guide somewhere on GBAtemp.
  • SylverReZ @ SylverReZ:
    An app exists for Android called Rekado which is a payload injector for the RCM exploit to work. Don't know if it's still active.
  • Xdqwerty @ Xdqwerty:
    Brb, and if not, good night
  • MrGreenleaves @ MrGreenleaves:
    hi, i have a problem with a game in twligth menu, the game is bleach dark souls, the save get corrups allways no matter if you try with USA version or Europre version, i use my nintendo dsi and my nintendo dxi xl, i have install the lates version of twiligth menu and nds bootstap, someone can helpe me?
  • K3Nv3 @ K3Nv3:
    Why are Sherlock Holmes games so expensive
  • BigOnYa @ BigOnYa:
    That's Elementary, my dear Watson
  • K3Nv3 @ K3Nv3:
    That thing you didn't graduate from?
  • I @ imafsiry:
    Requesting access to USB device...NotFoundError: Failed to execute 'requestDevice' on 'USB': No device selecte @
  • I @ imafsiry:
    thats what shows when i plug it in
  • SylverReZ @ SylverReZ:
    @imafsiry, What method? Phone or RCM Loader?
  • RedColoredStars @ RedColoredStars:
    @imafsiry You just install Rekado to your phone and then plug your Switch into your phone when it's in RCM mode. Rekado should automatically pop up on your phone and ask which payload you want to send.
    +1
  • RedColoredStars @ RedColoredStars:
    @imafsiry You can also set it to auto launch the payload of your choice so no user input is even necessary.
    +1
  • TotalJustice @ TotalJustice:
    thats what i use also. works better if you launch hekate from rekado as you won't need to update the payload
    +1
  • TotalJustice @ TotalJustice:
    as hekate launches the latest payload on the sd card (unless the sent payload is newer)
    TotalJustice @ TotalJustice: as hekate launches the latest payload on the sd card (unless the sent payload is newer)