Hello again!
In my introduction post, I mentioned that I was working on reverse engineering the inner workings of Solatorobo: Red the Hunter with the hope of opening it up to the modding community so that someone far more talented than me can come along and give it the attention it deserves.
Since that post, I have made significant progress.
I started out with just opening the ROM in Console tool to figure out where various assets are located, and it turns out this game is laid out very neatly. There is a folder for each location in the game containing all of its visual assets. There are also some proprietary files, currently of unknown function, but they are very small and at a cursory glance, seem to tell the game things like what animation data to load for a given model.
The easiest thing to spot is the sound data. The "sound" folder contains two files: a regular WAV file of a shutter sound that I think is only used when taking a photo at the beginning of the game on a DSi, and snddata.sdat, a standard DS sdat file containing all of the game's music and voice samples. This file is standard in every way, and existing DS sound tools work just fine with it.
Everything else, however, is a different story.
The vast majority of the game's files are packed into proprietary compressed files known as CCB files. It is thought that CCB stands for CyberConnect2 Batch. The good news is that these files are incredibly simple. According to this forum post, the header and general structure was worked out by Ryusui and then refined by Low Lines, the developer of Console Tool. This likely explains why Console Tool is the only (usable) tool that can read the contents of and (more importantly) extract CCB files. Notice I said usable. I can't seem to find the link at the moment, but somewhere out there on Github is a set of Chinese tools to change various elements of the game. However, these tools were incomplete, could only modify specific sections of the game and, according to a few forum accounts, were basically unusable if you could even get them working. Thankfully, Console Tool works just fine for extracting them.
The two main problems with just using Console Tool, however, are that you can only extract one archive at a time (though this is not a huge issue) and that Console Tool has no way of reconstructing valid CCB files once changes are made. To my knowledge, no tool does.
Until now.
I have developed custom CLI utilities in C++ to extract a CCB file, generate a list of the files with all the relevant information from the header, and reconstruct the set of files back into a valid CCB file. Due to differences in the compression algorithm used to make the game's files and the code I am using to reconstruct the files, reconstructed files generated by my utility are not byte-for-byte identical to the originals. However, they are 100% compatible and the game reads them perfectly.
Before I go too much further, I need to take a moment to give my thanks to Github user PeterLemon, whose Nintendo_DS_Compressors repository full of C utilities to extract and compress Nintendo DS files made my life so much easier. It would have taken my thick skull weeks to understand even the relatively simple algorithms used by this game, but I was able to modify his code to make it work for this project. Full credit will be given within the source code of my utilities.
Now that I had come this far, I knew I needed to modify something small and simple at the beginning of the game, just to see if everything was working correctly. Luckily, I found just the thing.
It turns out that at least the majority of the game's dialogue is stored in the "script" folder (shocking, I know), but even better, it is in standard UTF-8 encoding, and while it is surrounded by some sort of parsing framework that is not currently understood, it is robust enough that you can just replace text in it with regular old ASCII/UTF-8, even of a different length, and it will just handle it. So I changed the dialogue for the first NPC you can talk to in the starting town of Airedale, resulting in the screenshot you see here.
It's not much, but it's a great start. This was not possible before, and with some more work, I'm confident that we can really start tearing this game apart.
I am going to keep working on this project whenever I have time, and anyone else is more than welcome to join me! In the coming days, I will upload my utilities and all of the relevant information I have so far to a Github repository, and I will update this post with the link when it's all up.
Anyway, I hope someone out there is as excited about this as I am. This game is criminally underrated, and really deserves more love. More importantly, it has no proper sequel, and I'm hoping that my work here will one day lead the fan community surrounding this game to create the sequel it truly deserves.
UPDATE:
The Github repository is now live! It has the full source code of my utilities as well as Windows and Linux binaries. Feel free to contribute, or just use them to start ripping this game apart!
In my introduction post, I mentioned that I was working on reverse engineering the inner workings of Solatorobo: Red the Hunter with the hope of opening it up to the modding community so that someone far more talented than me can come along and give it the attention it deserves.
Since that post, I have made significant progress.
I started out with just opening the ROM in Console tool to figure out where various assets are located, and it turns out this game is laid out very neatly. There is a folder for each location in the game containing all of its visual assets. There are also some proprietary files, currently of unknown function, but they are very small and at a cursory glance, seem to tell the game things like what animation data to load for a given model.
The easiest thing to spot is the sound data. The "sound" folder contains two files: a regular WAV file of a shutter sound that I think is only used when taking a photo at the beginning of the game on a DSi, and snddata.sdat, a standard DS sdat file containing all of the game's music and voice samples. This file is standard in every way, and existing DS sound tools work just fine with it.
Everything else, however, is a different story.
The vast majority of the game's files are packed into proprietary compressed files known as CCB files. It is thought that CCB stands for CyberConnect2 Batch. The good news is that these files are incredibly simple. According to this forum post, the header and general structure was worked out by Ryusui and then refined by Low Lines, the developer of Console Tool. This likely explains why Console Tool is the only (usable) tool that can read the contents of and (more importantly) extract CCB files. Notice I said usable. I can't seem to find the link at the moment, but somewhere out there on Github is a set of Chinese tools to change various elements of the game. However, these tools were incomplete, could only modify specific sections of the game and, according to a few forum accounts, were basically unusable if you could even get them working. Thankfully, Console Tool works just fine for extracting them.
The two main problems with just using Console Tool, however, are that you can only extract one archive at a time (though this is not a huge issue) and that Console Tool has no way of reconstructing valid CCB files once changes are made. To my knowledge, no tool does.
Until now.
I have developed custom CLI utilities in C++ to extract a CCB file, generate a list of the files with all the relevant information from the header, and reconstruct the set of files back into a valid CCB file. Due to differences in the compression algorithm used to make the game's files and the code I am using to reconstruct the files, reconstructed files generated by my utility are not byte-for-byte identical to the originals. However, they are 100% compatible and the game reads them perfectly.
Before I go too much further, I need to take a moment to give my thanks to Github user PeterLemon, whose Nintendo_DS_Compressors repository full of C utilities to extract and compress Nintendo DS files made my life so much easier. It would have taken my thick skull weeks to understand even the relatively simple algorithms used by this game, but I was able to modify his code to make it work for this project. Full credit will be given within the source code of my utilities.
Now that I had come this far, I knew I needed to modify something small and simple at the beginning of the game, just to see if everything was working correctly. Luckily, I found just the thing.
It turns out that at least the majority of the game's dialogue is stored in the "script" folder (shocking, I know), but even better, it is in standard UTF-8 encoding, and while it is surrounded by some sort of parsing framework that is not currently understood, it is robust enough that you can just replace text in it with regular old ASCII/UTF-8, even of a different length, and it will just handle it. So I changed the dialogue for the first NPC you can talk to in the starting town of Airedale, resulting in the screenshot you see here.
It's not much, but it's a great start. This was not possible before, and with some more work, I'm confident that we can really start tearing this game apart.
I am going to keep working on this project whenever I have time, and anyone else is more than welcome to join me! In the coming days, I will upload my utilities and all of the relevant information I have so far to a Github repository, and I will update this post with the link when it's all up.
Anyway, I hope someone out there is as excited about this as I am. This game is criminally underrated, and really deserves more love. More importantly, it has no proper sequel, and I'm hoping that my work here will one day lead the fan community surrounding this game to create the sequel it truly deserves.
UPDATE:
The Github repository is now live! It has the full source code of my utilities as well as Windows and Linux binaries. Feel free to contribute, or just use them to start ripping this game apart!
Last edited by SolatoroboHacking,