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

Jump to navigation Jump to search
Content added Content deleted
m (→‎Applicable glitch Pokémon: Colored "English Yellow" so that it is not easy to miss among other colored version names)
m (→‎Hall of Fame corruption: Fixed the link to the forum archives.)
Line 12: Line 12:
* Compressed graphics are extracted to the second or 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).
* Compressed graphics are extracted to the second or 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.
* 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 intended dimensions of up to 7 units<ref>[https://forums.glitchcity.info/index.php?topic=8921.msg215472#msg215472]</ref>.
* In particular, a size of 0 underflows and is assumed to mean 256 rows or columns, a size far exceeding the intended dimensions of up to 7 units<ref>[https://archives.glitchcity.info/forums/board-107/thread-8921/page-0.html#msg215472]</ref>.


The number of HoF entries being stored separately explains the apparent lack of consequences if the League was not already beaten: the HoF corruption is not avoided, but the next time an entry will be added, the memory reserved for the first entry will be correctly set and so will the number of entries (1), therefore averting any visible effects.
The number of HoF entries being stored separately explains the apparent lack of consequences if the League was not already beaten: the HoF corruption is not avoided, but the next time an entry will be added, the memory reserved for the first entry will be correctly set and so will the number of entries (1), therefore averting any visible effects.