Harvest Moon: A Wonderful Life Special Edition
While the game could not be debugged as the glitch never seems to occur once DECI2 communications is established, I could dump memory after the glitch has taken hold by connecting to DECI2 later on (with OPL's built-in copy of RDB).
Since I have a dump of my PS2's kernel and have been disassembling it, I could study the kernel's Thread Control Blocks (TCBs) to know the state of all threads.
This game seems to create alot of threads. When the game gets stuck, all the threads are either suspended or waiting.
What seems to be happening is thread 16 trying to wake up the main thread. However, this might be failing because the game also has additional checks around WakeupThread - to prevent a thread from waking up another thread, if the thread to be woken up is not in a Wait state. So if the main thread has not slept yet, the main thread will enter a state of eternal sleep once it does sleep because thread 16 is prohibited from waking it up.
Thread 16 will not make further attempts to wake up the main thread as it will also sleep, regardless of whether the main thread was successfully woken up or not.
Disabling the extra checks seem to make the glitch go away, but I don't know why they added extra code like that. By design, calling WakeupThread on a thread that is not sleeping will increase the wakeupCount variable of the thread, which will cause it to inhibit a number of calls to SleepThread() by that amount (which I think is fair - if the thread has to be woken up, it should be).
Since I never played Harvest Moon, I don't know whether this change would change the game's functionality.
Originally, I was hoping that I just needed to change the thread priorities. But giving the main thread a higher priority than thread 16 didn't seem to help.
For now, the patch will only apply to the US release (SLUS-21117):
https://www.sendspace.com/file/za9i05
There seems to be a lot of Japanese releases. I doubt we'll successfully find owners of all of them to borrow the ELFs from them, so a generic patch might have to be written.