So, I need to manipulate my next encounter. How can I do that with ACE? More importantly, I need to know Assembly in order to write by myself the code or there's some kind of converter from C or C# or anything else (like XSE for GBA games)?
I want to fight the professor OAK in EU Version of pokemon Red with his real team, not glitched.
PS: I'm specifically interested in this method, I know I can achieve that with ditto's glitch
Hi Dante. Modifying D059 (Pokémon/Trainer) and D05D (Roster) (or D058 and D05C in Yellow) will allow you to access every Pokémon with index numbers 1-199, and every real (and many glitch) Trainers in the game. The values for Professor Oak are 226 in D059 and 1 (Blastoise), 2 (Venusaur) or 3 (Charizard) in D05D.
The following code will enable you to access the Professor Oak roster of your choice.
3E E2 EA 59 D0 04 3E xx EA 5D D0 C9
TM34 x89 (x88 in Yellow)
Lemonade x (roster)
TM34 x93 (x92 in Yellow)
To look up the ASM interpretation of the code, refer to this page
We can walk through the code I just wrote, below.
ld a, E2 - Register 'a' becomes E2; the value for Prof. Oak in the Big List
ld (D059),a - Load 'a' into D059 (instant encounter address)
inc b - Useless code, added for good item representation
ld a, xx - Register 'a' becomes the roster value (we want 1, 2 or 3)
ld (D05D),a - Load 'a' into D05D (Trainer roster)
ret - End code (actually return to the address in sp, which we have not changed)
Memory addresses can be found at Datacrystal and on the Pokémon Red disassembly
There is a C-language to Game Boy game converter on this website
that may be useful (although I've never tried this) if you want to make a game to execute such as Pong (first use 8F or ws m to store the code in free space such as boxed Pokémon, and then jump to it).
However, if you simply want to edit a memory address or call an existing ROM function, you're best off writing the raw code.
Hope that helps!