It is the perfect fit for a fast hacking session. Like some other Masaya/NCS games, the text is not compressed and roughly still in shift-jis. Well that's not completely true. But the "roman" part is as-is. So it may be correct to say that the latin text is encoded in ASCII. The second cool technical stuff about this game is that the graphic data is not compressed. If you launch YY-CHR.NET, you can see them all. There's no need to code an image decoder/encoder as I did for Marchen Maze or Nazo No Mascarade. We can directly modify the font with YY-CHR.net and extract the modified data for the patch.
As I said earlier, the whole script is stored uncompressed. So if you type something silly in plain ASCII it will appears in the game.
After some hours knee deep in Mednafen debugger and some hex editor, I managed to write a simple script extractor. The hiragana/katakana were decoded by Hiei- from the Romhack forum. Shubibiman will translate the script. About the script... There's a pointer table stored at $2000 to $217e. All the texts are stored contiguously in the ROM. Each text bloc starts with a 4 bytes header. The first and second bytes indicates the X and Y BAT coordinates of the text box. The third one is the number of tile per line. And the last one is the number of lines. The text box can be moved resized quite easily. Note that if the remaining is too big for its box, the game will wait for the user to push the I button before displaying the rest. This behaviour can also be triggered by adding the character $FE in your text. $FF is the newline character. $7C is also a special character. When it's encountered $C0 will be added to every char read until we read $7C again. Its use is still a little bit cryptic for me.
Here's the first version of the extractor and script:
Code: Select all
<?xml version="1.0" encoding="utf-8"?> <script> <text id="0" address="0xa180" offset="0x2380" x="25" y="26" width="6" height="1"> <tile id="0x01"/> Dummy text<endl/> PUSH I <symbol id="0xfe"/> </text> <script>
I'll post a new version of the script and extractor in a few days.