Coder Social home page Coder Social logo

maxton / gamearchives Goto Github PK

View Code? Open in Web Editor NEW
91.0 12.0 19.0 229 KB

A C# library for reading several video game archive formats, and a sample file explorer.

License: GNU Lesser General Public License v3.0

C# 100.00%
pfs xbox rock-band ps4 extractor iso wii guitar-hero rock-band-vr stfs

gamearchives's Introduction

GameArchives

C# Library for reading video game archives, and example file browser ("ArchiveExplorer").

Downloading

You can get the most up-to-date release from Appveyor (download the Release-x.x.x.x.zip file).

Supported Archive Formats

Ark (*.hdr, *.ark)

This format is used in many Harmonix games, including but not limited to:

  • Frequency
  • Amplitude (PS2/PS3 versions)
  • EyeToy: AntiGrav
  • Guitar Hero 1 - 2, Encore: Rocks the 80s
  • Rock Band 1 - 4, Lego, Green Day, Beatles, VR
  • Karaoke Revolution (untested)
  • MAGMA (RBN Authoring Tool, PC)
  • Disney Fantasia: Music Evolved

Versions 1 through 7, 9, and 10 are supported at this time.

FSG-FILE-SYSTEM (DISC0.img)

This format is used in some FreeStyleGames games, including:

  • DJ Hero 2
  • Guitar Hero Live

Notes

Usually, these are on disc as DISC0.img.part0, DISC0.img.part1. The library will handle these files in addition to the combined DISC0.img.

FSAR (*.far)

This format is used in some FreeStyleGames games, including:

  • DJ Hero 1,2
  • Guitar Hero Live
  • Sing Party

This format may use compression.

PFS (pfs_image.dat, etc)

This format is used for downloadable content and games on the PS4. It is structured much like the Unix File System. PKG files from game discs and downloads contain encrypted (and compressed?) PFS images within them.

PSARC (*.psarc, *.pak)

This format is used commonly in Playstation 3 and 4 games, and usually has the extension .psarc. The files within can be compressed with zlib or lzma. Currently, only zlib-compressed archives are supported.

STFS (*)

This includes the CON and LIVE formats, used for game saves and downloadable content (among other things) on the Xbox 360. Since documentation on the format is somewhat limited, you may come across errors when trying to read these files. Please report any errors you encounter.

XDVDFS / GDFS (*.iso)

This is the file system used on Xbox and Xbox 360 game discs.

U8 (*.arc, *.app, etc)

This is a simple archive format commonly used in Wii games and system software, which gets its name from the printable ASCII characters in its magic number.

PACKAGE (*.pkf, *.themes)

Unencrypted archive format used in SingStar games on PS3.

Seven45 PK (*.hdr.e.2)

Archive format with an encrypted header used in Power Gig: Rise of the SixString by Seven45 Studios.

gamearchives's People

Contributors

maxton avatar pikminguts92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gamearchives's Issues

Add Ark version 10 support

New header format. Seems to use a different file record structure. Also slightly different crypto (xor 0xFF is so secure!!!1)

PS4 PKG support

We should add a PKG package format. Some thoughts on what's needed:

  • Find a library for AES-XTS or implement an AES-XTS decryption stream
  • Figure out PFSC format for inner pfs_image.dat
  • Find a library for the PFS compression
  • Determine a way to lookup keys on file system or programmatically set keys through the API
    • this is solved on the API side only, you have to put the key in a static variable

Support new PKGs

The PFS images in new PS4 PKG files aren't getting decrypted properly.

Extracted moggs won't open in audacity

I downloaded a collection of mogg files from Beatles Rock Band and they work great in Audacity.

I tried extracting my own using this tool, but they won't open in Audacity.
I tried opening the .hdr file in Beatles Rock Band on Xbox 360 and I can extract them fine, but Audacity won't recognise them.

Same result if I try to extract mogg files from DLC archives.

Am I doing something wrong or are these not supported?

Command-line Support

It would be nice to be able to write scripts for this library that would work on the command line. Maybe add command-line support to ArchiveExplorer or just make a new CLI-only project for this.

Archive modification and creation

This is definitely a feature that users want in a library like this. Modification of existing archives and the creation of new archives are much more complex than simple reading and extraction. I have a few ideas about how this should be implemented in a clean and mostly format-neutral way.

Changesets

For modification of archives, I have the idea of changesets, essentially sequential operations to be done on the archive. Think of how GParted works: you can manipulate your partitions and each change adds an item to a list of changes, then at the end you apply the changes.

Changes can be split into two types: those which require re-building the archive and those which can be done "in-place". Of course, some changes may be doable in-place in some kinds of archive but only by rebuilding in others, so not all changes are equal.

Some potential in-place changes:

  • Replacing a file in a non-compressed archive with a file of equal or lesser size
  • Renaming a file in some archives with a filename of equal or lesser size
  • Deleting a file in some kinds of archives
  • Adding a file, in archives that come with extra space by default (like ISO images)

Potential rebuilding changes:

  • Adding a file or directory in most archives
  • Replacing a file with a file of greater size
  • Deleting a file in some kinds of archives

Roadmap

Naturally, the in-place changes will be easier to implement, while the rebuilding changes require essentially creating a new archive from scratch. I think that first the in-place changes will be implemented, then archive creation will be implemented, then re-building changes will be implemented. I won't put a solid timeframe on anything since this is purely a free-time project, but I hope to get this functionality working within the next few months.

This is of course an open-source project so any suggestions or code contributions are always welcome

RBVR files extracting from wrong offset

Unfortunately, main_pc_1.ark is 60 bytes larger on-disk than internally stated from the HDR file. Therefore, files inside main_pc_2.ark and above are being extracted from the wrong offset.

Add psarc support

Shouldn't be too hard and would improve the usefulness of the PFS support

File in use by another process - Windows 10

Hey, I've been trying to read an .ARK file extracted from the Frequenecy.bin file. When I ran the program (as administrator as well), I go to open up the "LEVELS.ARK" file and I immediately get presented with a "File in use by another process" error. Obviously this error is very self explainitory, however I tried creating a copy of the file, moving the file to another computer and running this program as well. All bring fourth the same error. I'm running Windows 10 on both computers. I suspect it may be the program itself is causing the file to be locked at the same time it goes to read the file.

Support RB4 Arks

RB4 can be dumped now, so we should add support for its Ark files. They might be the missing version 8.

Can't use replace file option in editor

I'm trying to replace all of the moggs with my decensored versions of applicable songs in Dance Central 3, but when I find the files in the editor, the "Replace File" option is greyed out. I've tested with multiple games as well, including Rock Band 3

Replace

Not all files listed in pfs_images

if the index section of the pfs_image have some extra 00's between names, the tool will ignore all files that are after this block.

empty

not all 00 sections have the same size that the showed in the image.

Amplitude PS2 .ark missing some files

While working on Amplitude PS2 (ark v2) modification I discovered compressed texture files are missing from the visible/extractable contents in ArchiveExplorer.

The culprit appears to be this line which skips any files that do not have a zero for the final part of the file entry. However Pikmin's notes say that this just means it's a gzip-compressed file.

For example this file should be present at arenas/constructo/gen/backdrop01.bmp.gz (not to be confused with the uncompressed arenas/constructo/backdrop01.bmp which is an actual Windows bitmap, possibly the source file included by mistake?)

I have not yet checked to see if any other Ark versions such as GH1/2/80s have these kinds of files.

Rock band 4 ARC file doesnt open

When I try to open an arc file from the Rock band 4 PS4 disc I get the following message:

"Could not load archive!
Given file was not a supported archive format"

There are 28 arc archives on the disc, I tried open all of them, none work.

Seems the RB4 support is not working?

amplitude ps3 hdr/arks refuse to open

i can't seem to get any form of these opening on archiveexplorer. i ripped it from a pkg so i'm unsure if the rip is bad or if it simply can't recognize the format

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.