Hi fora. I'm currently facing a bit of a dilemma: there's a game I like (Summon Night: Swordcraft Story 3), and it's translated, but nobody's put the text into the rom yet, because romhacking is
hard. I sorta get the impression that nobody wants to actually deal with inserting the translated script in it, because it's such a pain. And I don't either, because I don't know how. But I do know how to write lua script, and I have a bunch of text files of the translation organized by pointers to where the matching script is in the rom, and suddenly the solution seems pretty clear: write a script to check what text is being output in the text box, then look up the matching translation and print it to the console (and then if I'm feeling fancy once I know it works, draw it on the screen). Shouldn't be too hard! ...if I can figure out what's being written onscreen.
My initial inclination was to try RAM Searching for addresses that look like they contain either text (via the text table I found from the romhacking team that's been working on this for, like, five years now. Thanks guys! Sorry romhacking is so hard) or pointers to the text in the rom, since I have both of those. But I doubt the addresses will be there for more than a few frames, and as far as I know you can't really use breakpoints with RAM Search, so until I figure out what addresses to look at I can't really do that. So my current plan is to write a script that checks every memory write to see if the address looks like text, and if it does, log which address it was. But event.onmemorywrite() doesn't seem to
give the address back as an argument, like the original feature request suggested. So basically my options are, write that script but manually include a hook for each address (so, one hook that says "if 0x0000 gets written to, check 0x0000", another that says "if 0x0004 gets written to..."), or figure out how to check the address that gets written to. Option one seems like a lot of work, though. So if anyone can point me towards how to do that other thing, or wants to share advice in determining what's being written onscreen in general, I'd be really appreciative.
TL;DR: How do I determine what address is written to when event.onmemorywrite() fires, assuming I haven't specified one to it? Any other advice for determining what text is being displayed onscreen?