Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Tokyo olympic 2020 .pac files

Featured Replies

  • Author
  • Localization

Mishuk598, posted Mon Jul 06, 2020 5:29 pm (57469)


hello guys
I have extracted files form olympic games tokyo 2020. and found all files(textures, models and everything) have .pac extention.
Also all of them have same header " PACx402L" I can't open them for use.Please help me to open them.Here is some samples:
https://drive.google.com/file/d/1PILLGV ... OE8R6/view

Image
  • Author
  • Localization

Mishuk598, posted Tue Jul 07, 2020 12:07 am (57474)


Aluigi mate could you please help me?
  • Author
  • Localization

Mishuk598, posted Wed Jul 08, 2020 10:54 am (57505)


Thanks a lot mates!!!
  • Author
  • Localization

aluigi, posted Wed Jul 08, 2020 9:02 pm (57515)


Thanks spiritovod, I added a note in my script (mainly for myself ahahah)
  • Author
  • Localization

Mishuk598, posted Mon Jul 13, 2020 6:16 am (57570)


aluigi wrote:
Thanks spiritovod, I added a note in my script (mainly for myself ahahah)

I have a data file archive which use MOEG compression. the file size is 3.12 gb. It has no extention.
Image

Any help can i expect?
  • Author
  • Localization

Mishuk598, posted Mon Jul 13, 2020 6:18 am (57571)


This file is from ''Olympic Games Beijing 2008'' developed by SEGA.
  • Author
  • Localization

Ekey, posted Thu Aug 13, 2020 11:10 am (58054)


aluigi wrote:
It's difficult.

The format is derived from the one covered by sfpac.bms that uses "PACx301L", but my script is just a simple (and untested) conversion of another tool:
https://gist.github.com/blueskythlikesc ... b6984388cc


Spec for PACx402L :)

https://gist.github.com/Radfordhound/ec ... 06dce7b9e2
  • Author
  • Localization

aluigi, posted Sun Aug 30, 2020 6:21 pm (58443)


I tried to convert that struct in a quickbms script but there is something missing.
It's just for fun since a solution has been already found.

This is the non-working script (not the XXX prints for debugging):
Code:
comtype lz4

// Tokyo Olympics 2020 pac format specification 2.0
// By: Radfordhound
// Heavily based off of Skyth's Forces pac specification
callfunction HeaderV4 1//Header;

open "." TEMPORARY_FILE

callfunction EmbeddedPAC 1//EmbeddedPACs[];         // These are LZ4 compressed and need to be decompressed first

startfunction HeaderV4
    char[8] Signature   // = "PACx402L";
    uint PacID;                     // Random number? Might actually be date created/modified.
    uint FileSize;
    uint RootOffset;
    uint RootCompressedSize;
    uint RootUncompressedSize;
    ushort Type //= 1;               // Always 1? Oh gosh can these giant pacs have splits please no
    ushort Constant //= 0x208;        // No idea what this is for
    uint ChunkCount;
    log TEMPORARY_FILE 0 0
    append
    for i = 0 < ChunkCount
        callfunction Chunk 1
        clog TEMPORARY_FILE RootOffset CompressedSize UncompressedSize
        math RootOffset CompressedSize
    next i
    append
    // Pad to a 0x16 offset
endfunction

startfunction Chunk
    // When decompressing the root pac allocate a buffer of
    // size Header.RootUncompressedSize, then loop through these
    // chunks and decompress each one, one-by-one, into that buffer.
   
    // If you try to decompress all at once instead the data can be corrupted.
    uint CompressedSize;
    uint UncompressedSize;
endfunction

// Once you've decompressed the root PAC it'll look like this:

startfunction EmbeddedPAC
    callfunction HeaderV3 1//PACHeader;
    callfunction NodeTree 1//TypesTree;             // Type nodes point to file node trees
    callfunction SplitsInfo 1//SplitInfo;           // If there are no splits this isn't present
print "XXXXXXXXXXX1"
    for
    callfunction DataEntry 1//DataEntries[];        // If there are no data entries this isn't present
    next
endfunction

startfunction HeaderV3
    char[8] Signature //= "PACx402L"; // Yes, it's the same as HeaderV4 even though it's a different format.
    uint PacID //= Header.PacID;      // Always same as Header.PacID?
    uint FileSize;                  // Size of the pac.
    uint NodesSize;                 // Size of the section containing all of the NodeTrees and their Nodes.
    uint SplitsInfoSize;            // Size of the section containing all of the split information.
    uint DataEntriesSize;           // Size of the section containing all of the DataEntries.
    uint StringTableSize;           // Size of the string table.
    uint DataSize;                  // Size of the section containing all of the file's data.
    uint OffsetTableSize;           // Size of the offset table.
    ushort Type;
    ushort Constant //= 0x108;
    uint SplitCount;
endfunction

startfunction NodeTree
    uint NodeCount;
    uint DataNodeCount;
    ulong NodesOffset;
    ulong DataNodeIndicesOffset;
    for i = 0 < NodeCount
        callfunction Node
    next i
endfunction

startfunction Node
    // Either the type name or the file name, depending on what type of node this is. See below.
    ulong NameOffset;
   
    // If this node is part of the first NodeTree in the pac, this points to
    // another NodeTree which contains files of the type described by this node's name.
    // Otherwise, this points to a DataEntry containing information on the file.
    ulong DataOffset;
   
    ulong ChildIndexTableOffset;
    int ParentIndex;
    int GlobalIndex;
    int DataIndex;
    ushort ChildCount;
    bool HasData;
    byte FullPathSize;              // Not counting this node's name.
endfunction

startfunction SplitsInfo
    ulong SplitCount;               // Could also be a uint with padding but this makes more sense to me
    ulong SplitEntriesOffset;       // Yes, literally points to next 8 bytes.
    for i = 0 < SplitCount
        callfunction SplitEntry //SplitEntries[SplitCount];
    next i
print "XXXXXXXXXXX2"
    for
        callfunction Chunk 1//SplitChunks[];
    next
endfunction

startfunction SplitEntry
    ulong SplitName;                // E.G. ath10n_trr_cmn.pac.000
    uint SplitCompressedSize;
    uint SplitUncompressedSize;
    uint SplitOffset;               // Where this split is within the big pac that contains this pac
    uint SplitChunkCount;
    ulong SplitChunksOffset;
endfunction

startfunction DataEntry
    // Random number? Not the same as Header.PacID or PACHeader.PacID, like it was in Forces.
    // Might actually be date created/modified.
    uint PacID;
    ulong DataSize;
    char Padding1[4];               // Always 0?
    ulong DataPosition;
    char Padding2[8];               // Always 0?
    ulong ExtensionPosition;
    ulong DataType;
endfunction

/*
enum DataType : ulong
{
    RegularFile = 0,
    NotHere = 1,
    BINAFile = 2
}
enum PacType : ushort
{
    // PAC has no splits
    HasNoSplit = 1,
   
    // PAC is a split
    IsSplit = 2,
   
    // PAC has splits
    HasSplit = 5
}
*/
  • Author
  • Localization

DJ Normality, posted Sun Aug 30, 2020 7:06 pm (58447)


Aluigi and Ekey both on this ? Man you got the A-Team Mishuk! :D :D :D
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.