2021-11-14 00:55:24 +01:00
# NeoGF
NeoGF is a library of tools for Gotcha Force.
2021-11-14 00:56:01 +01:00
2021-11-23 16:43:41 +01:00
> This project is still under "heavy" development. It not yet 100% ready to use.
>
> Do not hesitate to contribute.
If you want more infos about the game, go read our [Gotcha Force Wiki ](http://re.wiki.virtualworld.fr/index.php/Gotcha_Force ).
2021-11-14 00:55:24 +01:00
2022-01-12 16:57:28 +01:00
## gcmtool.py
Python3 script for unpack/pack GCM iso files. This tool can rebuild FileStringTable (FST) of GCM and patch boot.bin with a new apploader.img, boot.dol, add/remove/edit of folder and files of the game.
### User manual
Unpack iso GCM file **game.iso** in folder **iso_extract** : (If the destination folder is not specified, it will use the game_code-DVD_number as folder.)
```
gcmtool.py -u game.iso iso_extract
```
Pack folder in iso :
```
gcmtool.py -p iso_extract game.iso
```
Rebuild FST and patch boot.bin for a new apploader, dol, and add/remove/edit of folders and files :
```
gcmtool.py -r iso_extract
```
Japanese charset is not handled for now.
### Extracted file tree
root folder contains all files of the extracted GCM iso
sys folder contains GCM system files of the game :
* boot.bin
* bi2.bin
* apploader.img
* boot.dol
* fst.bin
2021-11-15 22:11:47 +01:00
## pzztool.py
2021-11-28 14:44:01 +01:00
Python3 script for unpack/repack unpzz/pzz and uncompress/compress of PZZ archive. MDT files are also handled by pzztool.py.
2021-11-15 22:11:47 +01:00
2021-11-20 12:38:30 +01:00
### How to patch a pzz
2021-11-23 16:43:41 +01:00
1. Extract afs_data.afs from the ROM
2. Extract the pzz file from afs_data.afs
2021-11-20 12:38:30 +01:00
3. unpzz it
2021-11-23 16:43:41 +01:00
6. Edit files in decompressed folder keeping the filename important parts inchanged (see "Extracted files format" for further informations)
7. pzz the decompressed folder
8. Import back the patched pzz in the afs_data.afs
9. Patch the ROM with new afs_data.afs
2021-11-20 12:38:30 +01:00
2021-11-15 22:11:47 +01:00
### User manual
2021-11-23 16:43:41 +01:00
unpzz **source.pzz** in the default new folder _source_ .
If optional_dest_folder is specified we unpack in _optional_dest_folder_.
unpzz handle auto-decompress of all files extracted.
2021-11-20 12:24:24 +01:00
```
pzztool.py -unpzz source.pzz optional_dest_folder
```
2021-11-23 16:43:41 +01:00
pzz **source_folder** in the default new pzz file _source_folder.pzz_.
If optional_dest.pzz is specified we pzz in _optional_dest.pzz_.
pzz handle auto-compress / auto-decompress of all files extracted from the pzz according to their initial states in the pzz.
2021-11-20 12:24:24 +01:00
```
pzztool.py -pzz source_folder optional_dest.pzz
```
2021-11-23 16:43:41 +01:00
unpzz every pzz files present in _source_folder_ using the same directory.
For each pzz a folder is created using the name of the pzz.
If optional_dest_folder is specified we unpzz all files in _optional_dest_folder_ instead of source_folder.
The batch pzz command could be very time consuming (1h30 for whole pzz in afs_data).
2021-11-20 12:24:24 +01:00
```
pzztool.py -bunpzz source_folder optional_dest_folder
```
2021-11-23 16:43:41 +01:00
pzz every folder present in _source_folder_ using the same directory.
For each folder a pzz file is created using the name of the pzz.
If optional_dest_folder is specified we pzz all folders in _optional_dest_folder_ instead of source_folder.
The batch pzz command could be very time consuming (1h30 for whole pzz in afs_data).
2021-11-20 12:24:24 +01:00
```
pzztool.py -bpzz source_folder optional_dest_folder
```
2021-11-23 16:43:41 +01:00
Unpack **source.pzz** in the default new folder _source_ .
If optional_dest_folder is specified we unpack in _optional_dest_folder_.
This is faster than unpzz but compression must be handled by user after the unpack.
2021-11-15 22:11:47 +01:00
```
pzztool.py -u source.pzz optional_dest_folder
```
2021-11-23 16:43:41 +01:00
Pack **source_folder** in the default new pzz file _source_folder.pzz_.
If optional_dest.pzz is specified we pack in _optional_dest.pzz_.
This is faster than pzz but compression must be handled by user before the pack.
2021-11-15 22:11:47 +01:00
```
pzztool.py -p source_folder optional_dest.pzz
```
2021-11-23 16:43:41 +01:00
Unpack every pzz files present in _source_folder_ using the same directory.
For each pzz a folder is created using the name of the pzz.
If optional_dest_folder is specified we unpack all files in _optional_dest_folder_ instead of source_folder.
2021-11-15 22:11:47 +01:00
```
pzztool.py -bu source_folder optional_dest_folder
```
2021-11-23 16:43:41 +01:00
Pack every folder present in _source_folder_ using the same directory.
For each folder a pzz file is created using the name of the pzz.
If optional_dest_folder is specified we pack all folders in _optional_dest_folder_ instead of source_folder.
2021-11-15 22:11:47 +01:00
```
pzztool.py -bp source_folder optional_dest_folder
```
2021-11-15 22:22:35 +01:00
### Extracted files format
Every file extracted has a name using the format :
2021-11-20 12:11:39 +01:00
AAAB_C.D
2021-11-15 22:24:31 +01:00
- **AAA** is the 3 digits index of the file in the PZZ starting at 000.
- **B** describe the compression state of the file when packed in the PZZ. If compressed it's **C** and if not it's **U** .
- **C** is the name of the PZZ.
2021-11-20 13:56:17 +01:00
- **D** is the extension of the file. If the file is compressed it's ** .pzzp** (PZZ Part) and if the file is uncompressed by default it's ** .dat**
2021-11-15 22:22:35 +01:00
2021-11-15 22:26:55 +01:00
For example file **012C_cmn_data.dat** describe :
- the 13th file off the pzz,
- initialy compressed,
- in a pzz named "cmn_data.pzz",
2021-11-15 22:27:33 +01:00
- that has been uncompressed,
2021-11-15 22:26:55 +01:00
- with the default format "dat".
The names of unpacked files and the presence of empty unpacked files are important to keep informations relative to the initial pzz and ensure a correct pack.