nnguyen259 / KuroTools

Tools for working with Kuro no Kiseki .dat and .tbl files
MIT License
31 stars 5 forks source link

Added ED9Disassembler #2

Closed TwnKey closed 2 years ago

TwnKey commented 2 years ago

Lot of room for improvement here, but it will be enough for testing purpose. I actually don't know how to properly code in Python, maybe we can redo the general structure later. Probably can divide in more files and implement more classes and also refactor stuff here and there.

Also in terms of output/input arguments (output file path, encoding,...) there is nothing.

To use it, just call the disassembler script with the path to a dat file, it will generate a .py like EDDecompiler. Then just run that script and it will generate back the .dat. Disassembling/Reassembling works on C0410 at least, didn't test the others. Works in the sense that the binary is identical when compared to the original file, and when changing strings the pointers seem to adjust correctly. But it is untested in game.

I'd like to merge the two tools by checking the FourCC at the beginning of the file (#scp / #tbl) and call the adequate script. It should be possible to hide the overhead of function and command calls, which is one of the most important things I want to implement, but that can be done later (right now the user needs to know how to manage the stack, and I don't know if I should write a guide or something for the moment)