So. I'm currently trying to manipulate an Abra encounter, and as could be expected, not having any luck whatsoever. Basically, which pokémon you see on what step is for the most part set in stone. Back when I was doing my original Mew run, I did a rather
thorough analysis, and found that the only option I had was to go back and save time. In this run, I've already redone Nugget Bridge three times, saving a total of 14 frames, but it wassn't enough. On a happy note, Nugget Bridge is within 3 frames of optimal though.
I was doing some experimentation to see if there was another way to manipulate this, and
once I managed to shift the rotation by a significant margin. If I had been thinking clearly, I would have saved it immediately so that I could analyse what I had done, but I overwrote it because I thought I could reproduce it. I wasn't able to. I was testing the effects of holding down A while walking to the grassy area, but apparently, I must have done something else that I didn't realize.
I decided to disassemble the ROM to see if I could find any clues. This is what I found:
...
78CA:F0 D4 ld a,(FFD4) ; FFD4 stores the number of valid pokémon for the area, times 2 minus 1
78CC:47 ld b,a
78CD:21 18 79 ld hl,7918
78D0:2A ld a,(hl) ; load a with whatever happens to be in 7918
; NOTE! 7918 is a ROM address, not far from the code currently executing!
78D1:B8 cp b
78D2:30 03 jr nc,78D7 ; if a <= b, move on. if not, increment hl and try again
78D4:23 inc hl
78D5:18 F9 jr 78D0
78D7:4E ld c,(hl) ; load c with whatever hl points to (7918 + #iterations), now a value <= b
78D8:21 88 D8 ld hl,D888 ; D888 is the current pokémon map; levels and types valid for the area
78DB:F1 5C C4 ld a,(C45C)
78DE:FF 14 cp 14
78E0:20 03 jr nz,78E5 ; if (C45C) == 20, use an alternate pokémon map at D845 (water?)
78E2:21 A5 D8 ld hl,D8A5
78E5:06 00 ld b,00
78E7:09 add hl,bc ; add c to hl, and use that to extract the pokémon level and type
78E8:2A ldi a,(hl)
78E9:EA 27 D1 ld (D127),a ; set pokémon level
78EC:7E ld a,(hl)
78ED:EA 91 CF ld (CF91),a ; set pokémon type for graphics
78F0:EA D8 CF ld (CFD8),a ; set pokémon type for everything else
...
So all we need to do is figure out a way to manipulate 7918, and we're set...
which makes absolutely no sense, because 7918 is a ROM address and shouldn't change, right? If you want a real brainfuck, monitor this area of the ROM while walking through a grassy area. Not only does it change, but this whole region changes a lot, and frequently. It'd be nice if a way to manipulate this could be found. Feel free to experiment, or rather, please do. Here's a
WIP with saves states that you can use, with progress through Nugget Bridge, now 1082 frames (18.0s) ahead of the currently publish run.