I can't understand how luckytyphlosion's Crystal ACE setup is supposed to work.
Posted by: tstwizby
Date: 2018-07-28 10:34:08
After doing a lot of research, I can understand a lot of how luckytyphlosions setup for wrong pocket TM ACE in Crystal is supposed to work, but there are a couple of things that just don't make sense.
Firstly, I'm not sure what the purpose of using a potion to bring up the party menu is, especially the second time. I've seen suggestions that it might somehow prevent reading the bad clone's name from crashing the game, but I'm unsure of how.
Secondly, there are a lot of assumptions I have to make due to not having a complete RAM map. Based on what I've been able to find out, it seems very likely that the buffer containing the characters in the last-read mail starts at D002, the buffers for lost-item-count and last-viewed-item-count are at D10C/D10D. The guide doesn't say, but it seems like the three items used for the PC code need to be the only three in the PC since using TM48 rather than TM50 starts execution from the end of the balls pocket rather than from the beginning of PC items. Finally, the value stored at DAFA is extremely important to the code, and I have no idea what value is stored there, though I very strongly suspect that its value is C3. I don't know what, if anything, is stored at D001, though execution of the mail code seems to start from there.
Finally, the setup seems to rely on certain values being in the b and f registers at particular times. It seems to me like you shouldn't be able to know b's value at that point, and that the value for the f register is not the one you want. In particular, the value of af is stored to hl and later is (probably) used as the address to write a jump instruction to. The address it should be written to is DA10, but the value it's set to is instead probably DA40. This may or may not matter in the short term, depending on what values are stored in between, but definitely limits potential for writing longer code in the future unless it's corrected after the fact.
Aside from not understanding the purpose of the potion, I understand everything about the actual process. Can anyone answer any of these other questions/concerns?