How to split apart an uncompressed .pac file?

Game_Master001

Well-Known Member
OP
Newcomer
Joined
Dec 9, 2007
Messages
47
Trophies
1
XP
278
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,798
Trophies
3
XP
28,375
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
14
Trophies
0
Age
30
XP
273
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
  • ZeroT21 @ ZeroT21:
    the game has as much bugs ingame as well as in RL
  • K3Nv2 @ K3Nv2:
    That games so mixed I hear people praise or say they love it
  • ZeroT21 @ ZeroT21:
    it's both, they love it and hate it just as much
  • K3Nv2 @ K3Nv2:
    Like we get mixed reviews but that games globally mixed like mj
  • ZeroT21 @ ZeroT21:
    love the gameplay, hate the buggy mess it's also in, much drama and controversy also related due to sony being sony
  • ZeroT21 @ ZeroT21:
    the mixed reviews is due to review bombing, because a chunk of regions are excluded/banned from buying it now
  • ZeroT21 @ ZeroT21:
    so the players are review bombing as response to sony doubling down on their so-called policy
  • BakerMan @ BakerMan:
    maybe the real bugs were the glitches they didn't patch along the way
  • ZeroT21 @ ZeroT21:
    there are instability issues regarding certain hardware setups, but it's a small part
  • ZeroT21 @ ZeroT21:
    game's now what, 3 months out the door
  • ZeroT21 @ ZeroT21:
    live service game for 40 bucks that sold 12 mil copies
  • K3Nv2 @ K3Nv2:
    Ever notice how games that sell millions get hated the worst
  • K3Nv2 @ K3Nv2:
    Cod and sports games are good examples but people still buy the shit
  • ZeroT21 @ ZeroT21:
    it happens quit often if not all the time
  • ZeroT21 @ ZeroT21:
    diablo 4 anyone?
  • K3Nv2 @ K3Nv2:
    Everyone just doesn't want to be an outcast and say they're decent games why do they make billions if it's so shit
  • ZeroT21 @ ZeroT21:
    just buy nintendo stuff and their games if you just want fun
  • K3Nv2 @ K3Nv2:
    I still can't name 12 fun current Nintendo games
  • ZeroT21 @ ZeroT21:
    i say get a pc and emulate that too

    :rofl2:
  • K3Nv2 @ K3Nv2:
    Or in today's age at least a SteamDeck
  • ZeroT21 @ ZeroT21:
    i gotta say, the steam deck isn't a bad deal, even if you get a used one, you have options to get it serviced and the parts are also available through ifixit
  • K3Nv2 @ K3Nv2:
    I remember a guy trying to call me a SteamDeck fanboy I'm like well give me a grand I'll buy a winmax
    +1
  • K3Nv2 @ K3Nv2:
    Or a win4 things still sexy
  • ZeroT21 @ ZeroT21:
    having money does not mean everyone will just fork it over
    ZeroT21 @ ZeroT21: having money does not mean everyone will just fork it over