Many thanks to Vehek again, who has been giving us some very important indications! Before going on I’d like to point out that I haven’t been able to figure out much myself… I’m mostly trying to illustrate and understand what Vehek says 🙂
So, based on his comments…
So, at ox160d4d, we have the following (Removing the character usage value 05)
0B 10 31 13 33 34 35 36 37 38 2F 2C 20 39 0B 13 3A 3B 10 35 3C 35 3D 3E 3F 40 24 41 3F 42 07 43 32
In which the 1st and 15th bytes match (0B), indicating they correspond to イ, same goes for the 4th and 16th bytes (13 = ｰ (the ~ like symbol)) . 0B means the 12th character of the set loaded for this dialog.
Likewise, 32 = 。11 = 、
Then comes another probable command at 0x160D8F (Probably an indicator of end of dialog, which makes sense, since this first dialog has 33 characters).
Note: This turned out to be a line break comand
And then the next one
0A 30 31 13 1B 28 32 2C 20 05 44 06 45 2F 08 39 46 27 47 48 06 43 35 49 32 49 38 2F 4A 29 2F 24 4B 2D 2E 28 4C 2A 4B 43 32.
In this one, the 24th and 26th = 49 = だ (hiragana) and the ~ like one = 13 (same as above… hmm..) 、and 。are also the same. So maybe they share the same loaded characters. ダ is also the same == 31
2C 20 39 2F 4D 35 19 13 1D 1E 3F 4E 4F 29 32 4D 35 3C 39 06 50 […]
So, several dialogues in a same conversation might share loaded characters…
Back to the tables pointed by Vehek at 0x110100 (Font, 24 bits pointer table) and 0x1095FE (Character Selection, (for the Intanya dialog?))
The font table basically starts with value A48000 and sums 64 for each entry, pointing to 63 characters before having a blank space (0x000000) at 0x1101BD. Then a short section (4 entries) adding from A28000, then blank space up to 0x1102f2, where it starts summing from A4A000 to A4A4C0. It goes like that, and seems to have its last entry (AAFFC0) at 0x1147b6.
Question: How to map these addresses to the actual offsets of the tiles in the ROM, which start from 0x120000
Character Set selection table
Determines what characters to load on VRAM.
This table seems to be 2 byte offsets, and judging from that VRAM screenshot I can see 4 close values (0183, 0186, 0189 and 018C), which are likely to be the up, down, left and right “characters”. That’d mean that the next one, 04A7 is what represents the “2U” tile I was referring to on my previous post, and since it’s followed by other two kana, it seems that kana are on the 04 range, then come 2 kanji (3927 and 4056) followed by more kana (this time in the 06 range). These character loading sections seem to be separated by a FF FF mark.
Question: How to map conversations to the set of preloaded characters they use
5 thoughts on “Pindiro”
0x110424 in the font table is a sequence of 13 characters, probably the 13 punctuation characters of the beginning (from japanese comma to heart).
0x1104C3 is 26 chars long starting with A4ADC0 (Roman alphabet?)
Same for 0x110460 (starting with A4A740) (Uppercase and lowercase?)
Since the uppercase sprites are before the lowercase ones, we could assume A4A740=122740 (uppercase A), with a difference of 0x928000.
Going back to the first table, that’d mean its pointer (A48000) points to offset 0x120000 (Which is just the start of the font section). Which makes me feel a bit dumb 😛
The 13 characters at 0x110424 are actually the numbers (with some blank space first)
Arrow keys tiles are at 0x110000, which means their pointer should be A38000 (?) But I couldn’t find that one on the font table. since that are at 0x11**** they might have another way to be shown.
This game uses what’s commonly referred to as LoROM mapping, which works in banks of 0x8000 bytes. Your calculation of A38000 is actually the address 0x118000. ((0xA3 & 0x7F) * 0x8000 + (0x8000 & 0x7FFF) = 0x118000. The actual pointer would be A28000.
In which case their four pointers are at 0x110283, and when loaded in VRAM they use offset 0183, 0186, 0189 and 018C, which confirms those are offsets from 0x110100.
So I’ll proceed to:
* Change the characters loaded for the first dialog, so that roman characters are loaded. They start at 0360, so change the offsets to 600363036603 and so on
* Change the offsets used in the first dialog for something really cool.