This is completely wrong! "word_7Fxxxx" should be "word_00xxxx" (or "word_7Exxxx", since memory is mirrored there for the first 0x8000 bytes).
I don't look forward to fixing all these auto-generated references...
I gave up and split the auto-generated WRAM segment from $7E0000-$7FFFFF into two segments from $7E0000-$7EFFFF and $7F0000-$7FFFFF. This way I can automatically fix references into the second bank instead of rewriting them all manually, and IDA will even keep track of the RAM address's name if/when I name them.
I also threw together a small tool for testing how dialogue will look before inserting it in-game!
You can play around with it here, if you'd like:
https://raspberry.rosenthalcastle.org/itadaki-street-2/bigtext-vwf.php
Well, I found which memory address is used for indexing which dialogue line is spoken by AI players.
Unfortunately, because I didn't finish tagging things in my disassembly, I can't cross-reference where the breakpoint I set fired with it, because that section of code is untagged...
I guess I know what I'll be doing today.
Oh wow, this is neat.
So, when choosing AI characters you can play against, there are actually two different lines that can appear! I didn't notice that there were multiple lines until I was reading through what @WTCGames@twitter.com had translated so far.
If you choose most characters, you get the first line ("Player # will be ____, right?")... but if you choose Konomi, you get the second ("I'll join as player #, alright?")
I guess Konomi really does host the whole game!
Except... the continue arrow also references those parameters, but the bank has already been restored when it tries drawing it, so it's using incorrect/invalid data when determining where it should draw that arrow.
I'll probably just have to find the continue arrow code and hook it somehow, just like my custom text code...
Okay there is no way I'm doing this by hand. My wrists already hate me x.x
I'll ask @Xkeeper if they could do it for me instead with a PHP script or something...
Oh, bleh. A realization about character dialogue hit me...
There is a function used during character dialogue in-game that copies data from a temporary buffer into a particular location, which is read later when drawing character dialogue on-screen. This function only copies 64 bytes of data. (There might only even be 64 bytes of free space available in this location; I don't know for sure.)
I've already fixed one of those bugs (extra spaces in names), which was caused because I didn't bugtest my code when I originally wrote my variable-width font code, and a register got clobbered. ^^;;;
The dialog boxes that I didn't recognize are actually character-specific dialogue that is in a different format from what the game expects there, so that's why they are completely broken. I'll look for those code references later, I guess...
And that flashy, glitch mess at the end... is probably caused by a bank value being wrong, and incorrectly-formatted, unterminated text being drawn, which overflows the tilemap into other parts of RAM, and eventually consumes the entire game...
I don't know exactly how I'll tackle that yet. .-.;;; It's part of a few lines that required extra work, so I left them out when formatting the rest of the menu text...
@Raspberryfloof when you're breaking down inside but need to keep up the facade everything's alright
Yep, there's our culprit, just like I thought. That "func_SearchDialogDefinitionForA" call ends up going off into outer space instead of where it should be looking.
Hopefully copying and modifying this function won't be too hard...?