Skip to content

Toolset for an archive file made by Genki for their PS2/PSP games

License

Notifications You must be signed in to change notification settings

igorciz777/GUTArchiveTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GUT Archive Tools

GUT (most likely short for Genki Utility) Archive is an archive type used by the video game company Genki, known mostly for their PS2 racing games. This archive was used in games made around 2003-2006.

This program is an attempt to reverse engineer the archive to allow file modding.

Usage

gut_archive [mode] -0,... [log]

Modes

  • -r <BUILD.TOC> <BUILD.DAT> <IN_DIR>: Rebuild files in <IN_DIR> into <BUILD.DAT>
  • -d <BUILD.TOC> <BUILD.DAT> <OUT_DIR>: Decompress and output the archive to <OUT_DIR>
  • -dr <BUILD.TOC> <BUILD.DAT> <OUT_DIR>: Decompress and output the archive recursively (any .dat files inside) to <OUT_DIR>
  • -rr <BUILD.TOC> <BUILD.DAT> <IN_DIR>: Rebuild files in <IN_DIR> recursively, <DAT_OUT> needs to have same name as the .dat file without extension
  • -a <BUILD.TOC> <BUILD.DAT> : \n\tadd a new to the bottom of the <BUILD.DAT> archive (experimental, doesn't really do anything useful without modyfing game code)
  • -cd <FILE.DAT> <OUT_DIR>: Extract files from a .dat container (different from BUILD.DAT!!!)
  • -cr <FILE.DAT> <IN_DIR>: Rebuild files into a .dat container (different from BUILD.DAT!!!)

Game switches

  • -0: Tokyo Xtreme Racer DRIFT 2, Kaido Racer 2, Kaidou Battle - Touge no Densetsu, other games listed below
  • -2: Import Tuner Challenge, Shutokou Battle X
  • -3: Kaidou Battle 1 Taikenban
  • -4: Kaidou Battle 2 PurePure 2 Volume 10 Demo

Logs

  • -log: Save a log file after decompression/rebuilding

Examples

Regular decompression and extraction

.\gut_archive.exe -d .\BUILD.TOC .\BUILD.DAT BUILD_OUT

Decompression with logging

.\gut_archive.exe -d .\BUILD.TOC .\BUILD.DAT BUILD_OUT -log

For TXR:D2 and alike

.\gut_archive.exe -d .\BUILD.TOC .\BUILD.DAT BUILD_OUT -0

Extracting a .dat container

.\gut_archive.exe -cd .\00000010.DAT DAT_OUT

Rebuilding a .dat container

.\gut_archive.exe -cr .\00000010.DAT DAT_IN

Extracting BUILD.DAT recursively

.\gut_archive.exe -dr .\BUILD.TOC .\BUILD.DAT BUILD_OUT

Game compatibility table

✔️ - Works fine

❓ - Not tested

❌ - Doesn't work

➖ - Unrelated to the game

Name Serial System Extract Rebuild Reimport Comp. flag
Fu-un Bakumatsu-den SLPM 65813 PS2 ✔️ ✔️
Import Tuner Challenge US-2030 X360 ✔️ ✔️ -2
Kaido Racer SLES 53191 PS2 ✔️ ✔️
Kaido Racer 2 SLES 53900 PS2 ✔️ ✔️ -0
Kaido Battle (Korea) SLKA 25063 PS2 ✔️ ✔️
Kaidou Battle - Nikko, Haruna, Rokko, Hakone SLPM 65246 PS2 ✔️ ✔️
Kaidou Battle 2 - Chain Reaction SLPM 65514 PS2 ✔️ ✔️
Kaidou Battle - Touge no Densetsu SLPM 61121 PS2 ✔️ ✔️ -0
Ninkyouden: Toseinin Ichidaiki Taikenban SLPM 61144 PS2 ✔️ ✔️ -0
Racing Battle: C1 Grand Prix SLPM 65897 PS2 ✔️ ✔️
Racing Battle: C1 Grand Prix Taikenban SLPM 61115 PS2 ✔️ ✔️
Shutokou Battle 01 SLPM 65308 PS2 ✔️ ✔️
Shutokou Battle X GE-2001 X360 ✔️ ✔️ -2
Street Supremacy ULUS 10069 PSP ✔️ ✔️
Tokyo Xtreme Racer 3 SLUS 20831 PS2 ✔️ ✔️
Tokyo Xtreme Racer Drift SLUS 21236 PS2 ✔️ ✔️
Tokyo Xtreme Racer DRIFT 2 SLUS 21394 PS2 ✔️ ✔️ -0
Wangan Midnight Portable ULJM 05264 PSP ✔️ ✔️ -0
Fu-un Bakumatsu-den Taikenban SLPM 61096 PS2 ✔️
Fu-un Bakumatsu-den PurePure 2 Vol. 12 Demo LPM 61096 PS2 ✔️
Kaidou Battle 1 Taikenban Demo SLPM 60195 PS2 ✔️ -3
Kaidou Battle 2 Taikenban SLPM 60228 PS2 ✔️
Kaidou Battle 2 PurePure 2 Vol. 10 Demo LPM 65514 PS2 ✔️ -4
Shutokou Battle 01 Taikenban SLPM 60206 PS2 ✔️
Fu-un Shinsengumi SLPM 65494 PS2 ✔️
Fu-un Shinsengumi (Korea) SLKA 25139 PS2 ✔️
Fu-un Shinsengumi Taikenban SLPM 60225 PS2 ✔️
Ninkyouden: Toseinin Ichidaiki SLPM 66274 PS2
Shutokou Battle: Zone of Control ULJM 05017 PSP

Current issues

  • A lot of undefined file types
  • Problems with some games
  • Possible issues with building on both platforms
  • Code is a spaghetti mess

Building

Windows

Tested only with mingw gcc

gcc -Wall -O2 -fomit-frame-pointer src/gut_archive.c -o gut_archive.exe -Iinclude -I. src/lib/win32/libucl.a

Linux

gcc -Wall -O2 -fomit-frame-pointer src/gut_archive.c -o gut_archive.out -Iinclude -I. src/lib/x86_64-linux-gnu/libucl.a

Credits

  • UCL - Used for compression and decompression.
  • dirent for Windows - Used for directory listing on Windows.

About

Toolset for an archive file made by Genki for their PS2/PSP games

Resources

License

Stars

Watchers

Forks

Packages

No packages published