Re: Arbitrary code execution in Red/Blue using the "8F" item
Posted by: ISSOtm
Date: 2016-03-15 17:53:08
X Accuracy x56
Carbon x205
Poké Ball x126 ; Super Balls also work.
Leaf Stone x119
TM01 x(any qty)
corresponding code :
ld l, #$38
ld h, #$CD
inc b ; or dec b. Whatevs.
ld a, [hl]
cpl
ld [hl], a
ret
Usually, $CD38 is zero, so this code puts #$FF into it, thus activating NoClip.
But triggering NoClip using the Safari Zone puts #$01, so when cpl'ed (xor #$FF) it gives #$FE, which is still nonzero.
Using the Pewter City Youngster to disable collision puts a non-FF value in $CD38, so it's the same deal.
I already posted that in another topic (here), but I figured out it would be nice to put it there too, maybe to add it to the first post's code list ?