PetFlux (P5 converter) progress // DON'T POST HERE
May 10, 2017 16:36:15 GMT
rafa, Kel, and 5 more like this
Post by Reflet on May 10, 2017 16:36:15 GMT
Hello, all. I figured I should make a thread dedicated to updating you on my progress with the P5 converter I've been talking about for quite awhile now. I've decided it's going to be called PetFlux, and it is going to function both as a converter for P5 files (to be backwards compatible with P3 and P4) AND a general checksum recalculator (P3/P4) to allow for easier hex editing and experimentation with .pet files.
If you don't know what a checksum is, it's a validity check for files to make sure the data isn't tampered with or corrupted. An algorithm is performed on a file, and the result of said algorithm gives a checksum. In .pet files, the checksum is a 4-byte (32-bit) dword located at offset +31C.
Despite reverse engineering Petz's checksum algorithm back in December, due to programming setbacks (and the fact that I'm self-teaching myself as I go), mental health, and life in general, my progress on this has been rather sporadic. However, the GUI of the program (the visual aspect) is completely finished.
Currently, I'm working on coding my own implementation of Petz's algorithm. This has taken me quite awhile and will still take some more time. The reason for this is because I have to code the following:
- Open the file in binary mode (aka how .pet files open in a hex editor)
- Search the entire file, byte by byte, for a specific text string (because this string will vary in location depending on how much data is in the file)
- Beginning at a specific offset, read in all bytes up to but not including the aforementioned text string, doing Algorithm Stuff on all the bytes
- Do some bit manipulation with the resulting number
- Write to file
- Repeat the above process, except instead of searching for a string, I have two concrete offsets
- Save file
It's been quite the learning experience for me... And it's also a LOT of work. Please understand if this program takes me a bit longer. My goal is to have it ready for the WW economy reset, but as with many things, there is no guarantee. It WILL be finished and released, though, I can promise you guys that. Know that I most definitely am not forgetting about this, nor do I have any intention of dropping the project. I'll update this thread as I go.
If you don't know what a checksum is, it's a validity check for files to make sure the data isn't tampered with or corrupted. An algorithm is performed on a file, and the result of said algorithm gives a checksum. In .pet files, the checksum is a 4-byte (32-bit) dword located at offset +31C.
Despite reverse engineering Petz's checksum algorithm back in December, due to programming setbacks (and the fact that I'm self-teaching myself as I go), mental health, and life in general, my progress on this has been rather sporadic. However, the GUI of the program (the visual aspect) is completely finished.
Currently, I'm working on coding my own implementation of Petz's algorithm. This has taken me quite awhile and will still take some more time. The reason for this is because I have to code the following:
- Open the file in binary mode (aka how .pet files open in a hex editor)
- Search the entire file, byte by byte, for a specific text string (because this string will vary in location depending on how much data is in the file)
- Beginning at a specific offset, read in all bytes up to but not including the aforementioned text string, doing Algorithm Stuff on all the bytes
- Do some bit manipulation with the resulting number
- Write to file
- Repeat the above process, except instead of searching for a string, I have two concrete offsets
- Save file
It's been quite the learning experience for me... And it's also a LOT of work. Please understand if this program takes me a bit longer. My goal is to have it ready for the WW economy reset, but as with many things, there is no guarantee. It WILL be finished and released, though, I can promise you guys that. Know that I most definitely am not forgetting about this, nor do I have any intention of dropping the project. I'll update this thread as I go.