ACE within Pikachu's Beach
Posted by: Torchickens
Date: 2018-12-07 19:22:17
You can place any code you like at item 103's quantity. If the effects of the code apply outside of the minigame, simply press Select to leave the minigame and return to the overworld (you may need to have played the minigame at least once, not sure?). You can still do things like writing 0x15 (Mew encounter) to D058, so that you encounter a Mew immediately after leaving the minigame.
There may be more than one approach to doing this. Unfortunately a modified C5D1 value isn't kept before Pikachu's Beach, but in theory you could just run a modified Pikachu's Beach routine (likely from another ACE method) that only runs script 0x5B. Another approach would be to use OAM DMA hijacking to lock C5D1 to 0x5B.
Though we already have ACE and this likely requires ACE to begin with, this could be a cool way of causing arbitrary code execution if you wanted to do something in the minigame (like the creation of a cheat mode).