The very awesome paul_met shared this on the Shiro! Discord:
I'm copying/pasting my tips I shared on Discord here for the sake of preservation. Note that the next step after this would be to find the instructions for maximum characters per line, and perhaps maximum characters per dialogue box (it depends on the game logic). That way, the text can fill the entirety of the boxes.
I'm not sure which revision of the game the patch targets, but in
Princess Crown (Japan) (1M)
the first asm instruction to patch is at
0x6E9A8
:
In
Princess Crown (Japan) (Rev A) (11M)
, it's at
0x6EA60
:
I'm sure you know this, but just in case, in order to find the three asm instructions to patch (given by paul_met)...
Code:
060729A8 E204
06072994 E204
0607297C E204
...you take the base address of where the main executable (
0.BIN
) gets loaded into RAM (
0x06004000
) and just subtract. So
0x060729A8
-
0x06004000
=
0x6E9A8
.
If you load
0.BIN
into Ghidra and select SuperH 2 Big Endian as the processor and the base address as
0x06004000
, you can visualize this much more simply.
If the patch indeed targets
Princess Crown (Japan) (Rev A) (11M)
, then you can find the three asm instructions to patch by just searching for the byte arrays found in the
Princess Crown (Japan) (1M)
version of
0.BIN
.
For example, we find
E2 07
in the
Princess Crown (Japan) (1M)
version of
0.BIN
at
0x6E9A8
, right? So, let's say we copy those two bytes and the 14 bytes that come before it for a total of 16 bytes:
We can then search for that byte array in the
Princess Crown (Japan) (Rev A) (11M)
version of
0.BIN
to find the same instructions: