1
0
mirror of synced 2024-11-23 22:40:58 +01:00
Windows CLI program for working with encrypted Taiko no Tatsujin Switch DataTable JSON files
Go to file
2022-01-29 07:32:40 +01:00
Dependencies/zlib Add zlib dependency source files 2021-05-27 05:28:58 +02:00
TaikoSwitchDataTableDecryptor Loosen GZip header detection threshold to prevent false negatives 2022-01-29 07:32:40 +01:00
.gitattributes Initial commit 2021-05-26 05:08:00 +02:00
.gitignore Update .gitignore 2021-05-27 05:20:42 +02:00
LICENSE Initial commit 2021-05-26 05:08:00 +02:00
README.md Update README.md 2021-06-05 10:16:08 +02:00
TaikoSwitchDataTableDecryptor.sln Initial TaikoSwitchDataTableDecryptor CLI program implementation 2021-05-27 05:39:00 +02:00

TaikoSwitchDataTableDecryptor

A Windows CLI program for decrypting, decompressing, re-encrypting and re-compressing DataTable JSON files used by Taiko no Tatsujin for the Nintendo Switch (and possibly others) intended for Game Modding.

DataTable .bin files (located under LayeredFS/romfs/datatable) are zlib Deflate compressed and (in later game versions) AES-128-CBC encrypted JSON files used for defining various game parameters. The exact encryption key used appears to change with every game update/region but can be easily extracted using a disassembler from the target executable.

Encryption keys for each region+version are defined inside TaikoSwitchDataTableEncrpytionKeys.ini and will have to be updated in the future to support newer (or older) versions. Attempting to decrypt or re-encrypt a DataTable file from an undefined game version will fail.

Usage

To convert from .bin to .json run:

TaikoSwitchDataTableDecryptor.exe "{input_datatable_file}.bin"

resulting in an output file {input_file_directory}/{input_datatable_file} {key_name}.json where {input_datatable_file} is a file path to a DataTable file and {key_name} is the name of the automatically detected key used for decryption. If the input file is not encrypted (as is the case for older game versions) then a key name will not be appended.

To convert from .json to .bin run:

TaikoSwitchDataTableDecryptor.exe "{input_datatable_file} {key_name}.json

resulting in an output file {input_file_directory}/{input_datatable_file}.bin where {key_name} is the same name of the key used for re-encrpytion. If no matching key name is found for the input file name then the resulting JSON file will not be encrypted.

Usage Example

Unencrypted Taiko Switch (Early Versions) or possibly other Taiko games:
  • TaikoSwitchDataTableDecryptor.exe "musicinfo.bin" -> musicinfo.json
  • TaikoSwitchDataTableDecryptor.exe "musicinfo.json" -> musicinfo.bin
Encrypted Taiko Switch JP ver1.4.3:
  • TaikoSwitchDataTableDecryptor.exe "musicinfo.bin" -> musicinfo jp_ver143.json
  • TaikoSwitchDataTableDecryptor.exe "musicinfo jp_ver143.json" -> musicinfo.bin

This interface design is intentionally simplistic to support Windows Explorer drag-and-drop style conversion without the need to manually enter commands into a command prompt.

License

This program is licensed under the MIT License and embeds a copy of the source code for the zlib library by Jean-loup Gailly and Mark Adler.