PikaPicAnimGFX arbitrary code execution (Pokémon Yellow only)

Subscribers:
17,600
Published on ● Video Link: https://www.youtube.com/watch?v=dE2p9dAl1_4



Game:
Duration: 0:41
2,217 views
88


This is an arbitrary code execution exploit someone found from the subroutine CheckIfThereIsRoomForPikaPicAnimGFX.

Although I don't know if there is a way to do it naturally, you can ensure that it happens using another arbitrary code execution. Therefore, it is another access point from the Pikachu emotion box (similar to Pikachu glitch emote arbitrary code execution).

https://www.youtube.com/watch?v=q_T8aU35DZY
https://www.youtube.com/watch?v=nkxxAy7IYUA

In order to do that, I used 4F to lock the region at CC5C using OAM DMA hijacking with 16 0x55 bytes, and the region at CC6C with the bytes representing the arbitrary code execution. (cc5b is the wPikaPicUsedGFXCount). The arbitrary code execution then begins at CC6C, and I used it to load the instant encounter battle to Mew and push the OverworldLoop on to the stack; resulting in a stable (and catchable) Mew encounter.

At DA7F

3E55215CCC22222222222222222222222222222222216CCC3E3E223E15223EEA223E58223ED0223E21223E42223E02223EE5223EC922C9

At DA64

2182FF3EDA323E7F323EC332C9

Execute with 4F glitch item (FA64) on a platform that properly emulates Echo RAM.

https://github.com/pret/pokeyellow/blob/master/engine/pikachu/pikachu_pic_animation.asm

Explanation from the disassembly project:

CheckIfThereIsRoomForPikaPicAnimGFX:
; d: idx
; e: size
; FATAL: If the graphic has already been loaded, or if there are
; already 8 graphics objects loaded, the game will execute arbitrary
; code.
push bc
push hl
ld hl, wPikaPicUsedGFX
ld c, 8
.loop
ld a, [hl]
and a
jr z, .empty
cp d
jr z, .found
inc hl
inc hl
dec c
jr nz, .loop
scf
ret ; execute hl, then bc

.found
inc hl
ld a, [hl]
ret ; execute hl, then bc

.empty
ld [hl], d
inc hl
ld a, [wPikaPicUsedGFXCount]
add $80
ld [hl], a
ld a, [wPikaPicUsedGFXCount]
add e
ld [wPikaPicUsedGFXCount], a
cp $80
jr z, .okay
jr nc, .failed
.okay
ld a, [hl]
and a
jr .pop_ret

.failed
scf
.pop_ret
pop hl
pop bc
ret




Other Videos By Evie (ChickasaurusGL) 🌺


2022-07-14Route 15 binoculars tile corruption (at least Japanese Yellow)
2022-07-14Oak catching demonstration transition depends on map connection+rival name slot 6 (Generation I)
2022-07-14Walking Pikachu's water tile corruption (Pokémon Yellow JP)
2022-07-14Route 15 is not capitalised in a signpost (Pokémon Gold and Silver, fixed in Crystal)
2022-06-25Adding prototype 'beta' Blaine back into the game with a glitched save file (Pokémon Yellow)
2022-06-24Arbitrary code execution with a slower defrosted Pokémon (Generation I)
2022-06-24Unused Pikachu's expression ID test message (Pokémon Yellow)
2022-06-24Changes in the behaviour of Poké Flute (with a sleeping party) outside of battle (Generations I-III)
2022-06-24Brief closing and reopening of the moves list (Pokémon Red/Green/Yellow JP)
2022-06-24Ghost Bicycle glitch blackout method (Pokémon Red/Green/Blue/Yellow JP)
2022-06-21PikaPicAnimGFX arbitrary code execution (Pokémon Yellow only)
2022-06-19Hall of Fame party menu pseudo-OAM buffer (CC5B) art creation exploit (Pokémon Yellow)
2022-06-19Receiving the Cerulean City Bulbasaur happiness gift, even though we never received Pikachu (Yellow)
2022-06-19Giovanni door soft-locking (similar to Cinnabar Island Blaine Door) Dokokashira door glitch (RG JP)
2022-06-19Addendum to empty party glitch (Trainer Card flashing) (Red/Green)
2022-06-07Pokémon Green (Japan) - Reverse Badge Acquisition proof-of-concept route
2022-06-05Change Fossil/Ghost MissingNo. base stats/header to all 255 arbitrary code execution (Generation I)
2022-06-04Port of the lost Test Fight debug menu to a Pokémon Yellow save file with ws m (0x63)
2022-05-24C109 (facing direction) arbitrary code execution expanded party method (Pokémon Yellow)
2022-05-14rst 38 arbitrary code execution (Pokémon Red/Green/Blue/Yellow 1.0 JP) via Map 250/FA (Red/Green JP)
2022-05-09Calling the Game Boy DMG boot ROM code (Pokémon Yellow arbitrary code execution experiment)



Other Statistics

Pokémon Yellow Statistics For Evie (ChickasaurusGL) 🌺

Currently, Evie (ChickasaurusGL) 🌺 has 1,198,362 views for Pokémon Yellow across 134 videos. There's close to 18 hours worth of content for Pokémon Yellow published on his channel, or 13.58% of the total watchable video on Evie (ChickasaurusGL) 🌺's YouTube channel.