Re: Arbitrary code execution in Red/Blue using the "8F" item
Posted by: SnorLapraSuicuinEkans
Date: 2015-11-19 19:43:41
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
Gah, anyone know how EV's work in Gen I? To they give a fixed increase to a stat or is it done by a percentage? The first thing I'm trying to do on Red with ACE is max out my Pidgey's EV's (which I have done) but also make it so it's HP is always a max of 233 even when I happen to need to store / retrieve it from the PC. I've set it to 233, but whenever I deposit / withdraw, it becomes like 268 or something.
; -- Initial value of hl: D163
WRA1:D163 06 22 ld b,22 ; b = 22
WRA1:D165 24 inc h ; hl = D263
WRA1:D166 24 inc h ; hl = D363
WRA1:D167 68 ld l,b ; hl = D322
WRA1:D168 18 28 jr D16A + 28 = D192
WRA1:D192 E9 jp hl
Also has anybody tried to figure out why 8F accesses D163? I looked at the pokemon red dissasembly item page and couldn't figure it out.
inc c ;0c = Burn Heal
dec hl ;2b = 43
dec c ;0d = Ice Heal
dec [hl] ;35 = 53
dec [hl] ;35 = Revive
ret ;c9 = 201