I've been messing about with an all gold monster medals TAS for this game. Part of the routing involves figuring out how exactly the Pachisi bug works. I think I've got it understood well enough to get the bug to work consistently with some RNG manipulation.
This thread on GameFAQs, specifically Paulygon's posts, was key to understanding how and why the glitch happens in the US version.
https://gamefaqs.gamespot.com/boards/450388-dragon-warrior-iii/53836019
The mechanics guide on GameFAQs by Sk8erpunq was also key to understanding some of the inner mechanics.
https://gamefaqs.gamespot.com/gbc/450388-dragon-warrior-iii/faqs/70252
Here's the rundown on how it works.
- The STR, AGI, VIT, INT, and LUCK stats are actually not integers. They have a shown value ranging from 0-255 and a partial value in memory. Each part takes up 1 byte in memory for a total of 2 bytes per stat.
- In the original JP release on the Pachisi board, max HP can be lowered by one of the events involving rolling dice to change stats. While max HP could be lowered, the current HP before the stat reduction still remains the same afterwards. This can result in having more current HP than max HP. For the US release, there was an added function to reduce current HP down to max HP after the stat reduction if the current HP would be above the max HP.
- However, this new bit of code has an oversight where the stat check function is done for every possible stat reduction in the dice stat change event. In these cases, the comparisons for most of the other results checks the partial values of stats in memory.
- For the case of the level up bug, the game checks if the partial STR stat against the partial AGI stat. If the partial STR stat is higher, then the whole STR value is copied into the high value for experience points.
This is controllable with RNG manipulation. RNG manipulation seems to work similarly to the Dragon Warrior Monsters game since they pretty much work on the same base engine. There are two important parts to this: the partial STR and part AGI values have to be set before attempting the Pachisi bug, and the shown STR value affects how much experience is gained by the Pachisi bug in this effect. Assuming a character has 65535 or less experience, this adds (65536 * shown STR value) to the character's experience. Levels ups are checked at the end of a victorious battle so the effect isn't immediate. Thus for a character to gain a lot of levels, the shown STR value must be a sufficiently high number to gain end/post-game levels. As a small aside, a sufficiently low enough shown STR value can lower a character's experience though this isn't exactly helpful.
I have a basic RAM watch that I used for getting the conditions for the experience bug to work over here:
User movie #638420079399910632