Posts: 114
Threads: 6
Joined: Apr 2012
05-28-2012, 08:17 PM
(This post was last modified: 05-28-2012, 08:21 PM by TheAmazingSnivy.)
(05-24-2012, 05:08 AM)tykel Wrote: Reverse-engineering? What a wonderful opportunity to procrastinate!
So, you still have not explained very clearly what an FSYS file is. A bit of googling led me to believe it is a video/audio file used primarily in Gamecube Pokemon games? Secondly, am I right in saying the FSYS file type is not well documented?
Some searching made me come to this (http://forum.xentax.com/viewtopic.php?f=10&t=8890), some guy has started something similar. You should definitely check this out if you haven't already.
In his pseudo-code, you can see the following structure:
Code:
struct fsys_file_header {
char magic[4]; //FSYS
uint32_t t1;
uint32_t t2;
uint32_t file_size; //DATA_COUNT?
uint32_t t3;
uint32_t t4;
uint32_t info_offset; //start address of info header
uint32_t data_offset; //DATA_BASE, start address of data
uint32_t file_size;
};
struct fsys_info_header {
uint32_t array_offset;
uint32_t name_table:
uint32_t base_offset;
};
struct fsys_fdat_entry {
uint32_t data_hash; // CRC-32? You probably know more than me.
uint32_t offset;
uint32_t size;
uint32_t t1;
uint32_t t2;
uint32_t z_size;
uint32_t t3;
uint32_t t4;
uint32_t t5;
uint32_t name_offset
};
/* ETC.... */
You may already have got this far, but hopefully this will get you started in the right way.
And those numbers at offset 06 & 07? Well, they do not seem that important if the other person's doc. is to be believed, as they fit into a temp (ie. dummy) variable. Perhaps some metadata, maybe information about the compression, or file version information.
As for LZSS, that is a classic LZ compression scheme, which basically is an improved LZ77 with less redundant data sent.
I see you are using Windows from your screenshots, but let me say this: there is a reason Linux is called a hacker's OS. There are many little utilities available to encrypt/decrypt strings on the command line, among other things. You should be fine with a good hex editor, and I recommend something to prototype quickly (not C++; a scripting language like python, maybe) for experiments.
Sorry if I have oversimplified or repeated stuff you know already.
Good luck.
EDIT: As per the C++ debate; C++ is a very complex language. It is one of the only languages not to have a context-free grammar representation, because of its many ambiguities. It is also one of the slowest to compile. BUT it is definitely one the most powerful you can use: native, object-oriented, template meta-programming, ... There is a reason to the fact it is the #1 language in video games, high-performance programs, and many other areas.
My 2 cents: perhaps C# would have been a wiser choice for a GUI program. Or at least, the GUI side of it, it is much simpler. C++ is a bit more work, but you seem to have something good already, so carry on, good sir.
Well, I didn't want it to sound like I was procrastinating, because I'm not.but you are right about the filetype, I haven't heard of it coming from any other games, and it's not documented well. So they might only use it in Pokémon games with battle systems like the DS and GBA games. So I was thinking that maybe they might continue using it later on. Anyway, I found another link (I lost it when my computer got wiped)
and there was a user from that same site that used the username "RandomTBrush." Do You think that it's the same RandomTalkingBrush on The Spriter's Resource? I'm to chicken to ask him. Anyway, I'll have to resaerch Python, because I'm not sure where it's used... I'm pretty sure Blender is the one that does...
Edit: And yes, I did have all of my files backed up, but not the links in my browser... And is Linux not a mac? Is it like Ubuntu?