ArkTool FAQ

This is a FAQ for the ArkTool package by xorloser which includes ArkTool, ArkToolGui, source code for both and a few extra bonus tools. Get the latest version of the ArkTool package from www.xorloser.com



Questions

1) What is the purpose of each item in the ArkTool package?
2) What is an ark file?
3) What is a command line tool?
4) What does ArkTool do?
5) What doesn’t ArkTool do?
6) What limits does ArkTool have?
7) What is DLC? What does DLC mean? Can I make my own DLC?
8) I replaced a file in the ark with a smaller file, but the ark size didn’t change, why not?
9) What does the "Perform Crypt" option do in ArkTool.
10) I have some song files that came from a DLC pack or somewhere that is not inside an ark file, how do I decrypt them?
11) I have extracted and decrypt some mogg files with ArkTool or SongCrypt but it won’t open in Audacity, is there a bug in your tools?
12) How do I encrypt song files?
13) ArkTool gives an error when I try to open some ark files, what is wrong?
14) ArkTool gives an error when I try to extract some files, what is wrong?
15) What games does ArkTool work with?
16) What console systems does ArkTool work with?
17) How do I add the "special header" to an ogg file that I have created for a custom song on Xbox360?
18) How do I add in a new audio track for a custom PS2 Rockband song?



Answers

1) What is the purpose of each item in the ArkTool package?

The ArkTool package contains the following files:


2) What is an ark file?

An ark file is a container file for many other smaller files. It consists of one or more large ark files which internally contain a filesystem that can hold thousands of files. This is required for some systems such as the PS2 which has limits to the number of files it can have on a disc. By using ark files the PS2 disc only needs to have a couple of ark files on it, while the game itself is able to access thousands of files using the ark’s filesystem.


3) What is a command line tool?

A command line tool is a tool that must be run from a text based command line, also known as "dos" or a "dos box" on windows systems. Attempting to run a command line tool from Windows Explorer just results in a quick flash onscreen before the tool closes itself again.

In order to run a tool from the command line you need to first open a command line window (dos box). To do so click on the start bar, select "Run" and type in "cmd" (without the quotes) and press enter. A command line window should now open up. You will have to navigate to the location that you have stored the command line tools, or optionally copy the tools to somewhere that is in your path. An example of this would be to copy a tool such as "SongCrypt.exe" into your "C:\Windows" directory (or wherever you have Windows installed on your system). Once this is done you can run the tool by just typing "SongCrypt" on the command line (without quotes of course).

Most command line tools are made to print out information on how to use them when they are run without any parameters. So typing "SongCrypt" will result in the SongCrypt tool running and printing out how to use it and then stopping again. You can now read the usage information and type in the correct parameters as required by the tool. Using the windows command line and command line tools in general are out of the scope of this FAQ, however the command line has been around for ages so an online search or asking someone with more experience "how to use dos" may help you.


4) What does ArkTool do?

ArkTool should be thought of like a "Windows Explorer" for ark files. An ark file contains a filesystem inside of it, and so by using ArkTool you can browse and interact with this filesystem.

ArkTool allows you to:


5) What doesn’t ArkTool do?

As mentioned above ArkTool should be thought of like a "Windows Explorer" for ark files. This means that it handles access to the filesystem inside the ark file. So just like Windows Explorer it does not directly edit or view files such as the songs and textures, nor does it demux or mux pss files. The purpose of this tool is to be able to extract files from inside the ark filesystem and then edit them with other tools specifically made for editing each type of file, then insert the edited file back into the ark file.


6) What limits does ArkTool have?

ArkTool itself does not have any limits. You can extract, insert and replace any files regardless of size, offset or previous contents. This does not however magically remove other limits imposed either by the game or the filesystem that the ark files are found within.

Just because you can insert 200 songs, doesn’t mean that the game will necessarily handle having 200 songs in its menu system. This is an example of a limit that exists, but that is imposed by the game and not by ArkTool.

A limit that will need to be considered is the filesystem that the ark files are stored in. For most cases this will be some kind of Iso file (a CD/DVD image file). In an Iso filesystem all files are stored one after the other. If you want to replace the ark file in an Iso with an edited ark file, then the edited ark file must be the same size or smaller than the original ark file. The reason for this is illustrated in the picture below. You can see that when replacing the original ark file with a smaller ark file, there is an unused gap in the Iso file. This gap is the black area to the right of the smaller file. Having this gap does not matter the Iso file is still considered ok. If you try to replace the existing ark file with a bigger ark file however, you will overwrite the file that usually comes after the ark file, in this case "File 2". That means that you have now ruined the contents of "File 2" which will result in the game crashing when it tries to access "File 2". As you can see this limit is imposed by the Iso filesystem, and the only way around this is to remake the Iso file. This can be done for PS2 discs, but not Xbox360 discs at this time. Remaking an Iso file is out of the scope of this FAQ, please search online for information on how to do this.



7) What is DLC? What does DLC mean? Can I make my own DLC?

DLC stands for "Download Content", it is game content that can be downloaded and saved onto the system for use with an existing game. In this case it refers to the downloadable song packs for the Xbox360 and PS3 versions of the games that ArkTool supports.

Please note that DLC is "signed" in such a way that if it is altered even slightly, the game will not accept it as valid DLC. This means that you cannot alter existing DLC song packs nor can you make your own DLC song packs. When downloading purchasing DLC packs, an ID that is unique to your console is inserted into the pack on the server before the server then signs it and you can start to download it. This locks the content so that it can only be used on your console, stopping one person from paying and downloading the content then distributing it to others without them paying for it. This ID is not inserted in packs that come on discs. DLC packs can also come on demo discs such as the "OXM DLC song pack" for Xbox360. In this case the pack either doesn’t get any ID inserted in it, and so isn’t locked to a specific console. This just means that you could give a copy of this pack to someone else and it would work on their console. This does NOT mean that it isn’t signed, or that you can replace or edit any songs in it and have it still be accepted as valid DLC by the game.


8) I replaced a file in the ark with a smaller file, but the ark size didn’t change, why not?

By understanding how an ark file works and how ArkTool interacts with it, you can better understand how your edits to an ark file will affect it in terms of size and layout. The picture below shows an ark file in five different stages.


The first ark file, the "Original Ark File" shows the normal layout of an ark file containing three files. All files are stored one after another with no gaps between them. From the picture of this ark file you can see that "File 2" is bigger than "File 3", and that the size of the ark file itself is made determined by adding up the sizes of the three files inside it.

The second ark file shows what happens when you replace "File 2" with another file that is smaller than "File 2" and then do "Save". The smaller file starts at the some location that "File 2" started at, but has a gap at the end where it doesn’t fully fill the same sized space that "File 2" filled. The leftover black part after the "Smaller File" is known as a gap. This is an area inside the ark file that isn’t being used but is still present. When saving this ark file the gap remains and so the ark file is still the same size as the "Original Ark File".

The third ark file shows what happens if you replace "File 2" with another file that is smaller than "File 2" and then do "Save As". Once again the smaller file starts at the same location that "File 2" started at, however when doing "Save As" all gaps are removed and the so the start of "File 3" is moved closer to the start of the ark file. The outcome of this is that the size of the ark file is now smaller than the size of the "Original Ark File". Even though it contains the same sized files as the second ark file.

The fourth ark file shows what happens when you replace "File 2" with another file that is bigger than "File 2" and then do "Save". The bigger file cannot fit where "File 2" was because it would overwrite parts of "File 3", ruining the contents of "File 3". Instead it is added on to the end of the ark file. The ark file has now increased in size due to the gap from "File 2" still being present as well as the size of the new bigger file being added.

The fifth ark file shows what happens when you replace "File 2" with another file that is bigger than "File 2" and then do "Save As". Once again the bigger file cannot fit where "File 2" was and so it is added on to the end of the ark file. However when doing "Save As" all gaps are removed and so the starts of "File 3" and "Bigger File" are moved closer to the start of the ark file. The outcome is that the ark file is now bigger than the "Original Ark File", but only by the difference in size of the "Bigger File" and "File 2".

As this shows using "Save As" to remove gaps can keep the size of an ark file at its smallest possible size. Take note however that moving all other files towards the start of the file can take a lot of time if thousands of files need to be moved. For this reason it is best to just use the normal "Save" operation while performing any edits on an ark file, then only use "Save As" on the final version of your ark file.


9) What does the "Perform Crypt" option do in ArkTool?

The "Perform Crypt" operation transparently does all required encryption and decryption of files when they are extracted or inserted into an ark file. It is recommended that this option always be "on" so that you do not have to worry about the encryption state of your files.


10) I have some song files that came from a DLC pack or somewhere that is not inside an ark file, how do I decrypt them?

To decrypt song files from DLC packs or that have been extracted from an ark file using some tool other than ArkTool you can use SongCrypt. SongCrypt is a command line tool that will decrypt *.mogg / *.vgs / *.pss files. For information on what a command line tool is and how to use it, check the other questions answered in this FAQ.


11) I have extracted and decrypt some mogg files with ArkTool or SongCrypt but it won’t open in Audacity, is there a bug in your tools?

This problem occurs with "foreplaylongtime.mogg" and "greengrass.mogg" from the Xbox360 Rockband disc. It may also be present in large files taken from DLC packs.

This is actually a "bug" in Audacity and not my tools :)
It is caused by a special header that is present on mogg files that is not part of the ogg vorbis file format. The size of these "special headers" varies depending on the size of the ogg file they are part of. The larger the ogg file, the larger the special headers. If the special headers are 0x2000 bytes (8192 bytes) or greater, then audacity will not find the start of the ogg file that occurs after these headers, and so Audacity doesn’t recognise the file as an ogg file.

This bug can be circumvented by removing the special headers before opening the file in Audacity. To do this open the mogg file in a hex editor and remove all data before "OggS". Save the changes and you can now successfully open the file in Audacity.


12) How do I encrypt song files?

As far as I can tell there is no need to encrypt songs as Rockband supports unencrypted files as well as encrypted files. I have verified this on the Xbox360 version of Rockband, but not on the PS2 version. From looking at the games code it looks like unencrypted files should work though.


13) ArkTool give an error when I try to open some ark files what is wrong?

This could be one of a few things. Firstly ArkTool needs to open its ark files with write access to them since it needs to be able to alter them, for which it needs to be able to write to them. This means that if you try to open ark files that are read only, or that are on a CD or DVD you will not be able to do so. Either copy the files off the CD or DVD and onto your hard drive or clear the read only flag on the files if they are already on your hard drive.

The second possibility is that you are using the DVD5 ripped version of PS2 Rockband. The ark files in this image are non-standard in that they have multiple fie entries pointing to the same file (the movie files are all relinked to point to the same movie file to save space). I will not be supporting this DVD5 version of Rockband since it is not a legitimate version of the game. If you like this game enough to customise and edit it, then you should buy the game.

A third possibility is that your ark files have been corrupted in some way or you are missing the accompanying "main.hdr" file. In this case I suggest you extract these files again from your original disc copy of Rockband.


14) ArkTool gives an error when I try to extract some files, what is wrong?

This usually means you are missing one or more ark files. Check that you have all the ark files from your game disc in the same directory when you first open them in ArkTool. If you have extracted the files from the PS2 version of Rockband then there are actually four ark files, not just two ark files as it may seem at first. The PS2 DVD is dual layer with separate filesystems on each layer, so you have most likely only copied off the first two ark files from the first layer of the DVD. To access the files on second layer I would suggest a tool called Apache3. Open the disc or Iso file in this tool, then right click on the DVD icon and select second layer or whatever the latest version of Apache3 labels it as. Now the filesystem for the second layer should show up. Extract the ark files from this layer into the same directory that you extracted the ones from the first layer into. Now you should be able to open them in ArkTool and successfully extract all files.


15) What games does ArkTool work with?

ArkTool works with: It does not work with:

16) What console systems does ArkTool work with?

Note: There is currently no publicly known way to make working discs for the PS3, or to decrypt encrypted data files from a PS3 disc. This means you cannot currently read the ark files from a PS3 disc in order to browse or edit them. Support for PS3 ark files is included in this tool however, so once it is possible to read and write PS3 discs this tool will already work with them.


17) How do I add the "special header" to an ogg file that I have created for a custom song on Xbox360?

At this point no one knows how these special headers are generated, so until I get some time to look into it I cannot help with this.


18) How do I add in a new audio track for a custom PS2 Rockband song?

A PS2 Rockband song contains a vgs audio track multiplexed (muxed) with an mpg video file to make a pss file. At this point there is no known tool to do this.