Pokemon Blue: Effects of overflowing the stack with '9F' (item 0x5E)

Описание к видео Pokemon Blue: Effects of overflowing the stack with '9F' (item 0x5E)

The item '9F' (hex 0x5E) causes the game to jump to the overworld loop without ever returning back to the item menu. This behavior makes the stack, a memory location used to preserve state information between function calls, to increase in size by 10 bytes every time the item is used. Using the item enough times causes the stack to overflow into different memory areas, like current Pokemon box, Daycare data, wild encounter info and more.

Thanks to luckytyphlosion for alerting me of this glitch's existence.

This item could potentially be used as a new way of executing arbitrary code in Gen I games - it should be possible to bring the stack pointer all the way to wild encounter data, use the old man glitch to overwrite top of the stack with the player's name, and manipulate the player's name to contain an address to some useful code.

Комментарии

Информация по комментариям в разработке