Jump to content

Pokémon sprite corruptions (Generation I): Difference between revisions

m
>Torchickens
>Ryccardo
Line 10:
* Pokémon front and back pictures are stored in ROM compressed, and each compressed image has an header defining the horizontal and vertical sizes (in number of 8x8 tiles) of the picture.<ref>[https://github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/home/pic.asm pokered:home/pic.asm]</ref>
* Glitch Pokémon are not guaranteed to have these sizes set to reasonable amounts.
* Compressed graphics are extracted to the second ofor third of three sprite buffers located at the start of bank 0 of the game card's SRAM (which is therefore being used here as an expansion of the console's RAM); the Hall of Fame contents are also located in bank 0 after this temporary area (separated by a 256 byte unused area), but not the count of League wins (which is located in bank 1 along with the main save data).
* The code responsible for decompressing the graphics is not limited in size of output, meaning that [[Buffer overflow|an excessively large picture will overwrite]] the Hall of Fame.
* In particular, a size of 0 underflows and is assumed to mean 256 rows or columns, a size far exceeding the one of a semantically valid image.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.