Tile Chaos: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
>Torchickens No edit summary |
>Torchickens No edit summary |
||
Line 1: | Line 1: | ||
[[File:Sprite chaos D057.png|thumb|right|250px|A 0xD057 Tile Chaos in Pokémon Red]] |
[[File:Sprite chaos D057.png|thumb|right|250px|A 0xD057 Tile Chaos in Pokémon Red]] |
||
{{cleanup}} |
|||
'''Tile Chaos''' describes a [[glitch]] effect in {{RBY}}, where tiles fill the screen and possibly animate. |
'''Tile Chaos''' describes a [[glitch]] effect in {{RBY}}, where tiles fill the screen and possibly animate. |
||
Line 23: | Line 24: | ||
{{YouTube|AOOymRAy_PQ|Shenanagans Smash}} |
{{YouTube|AOOymRAy_PQ|Shenanagans Smash}} |
||
{{YouTube|pmrqeJpLL6I|ChickasaurusGL}} |
{{YouTube|pmrqeJpLL6I|ChickasaurusGL}} |
||
{{stub}} |
|||
==Explanation== |
|||
RST 38 offered the following explanation regarding Tile Chaos on the forums. |
|||
'''Animation System''' |
|||
The animation system in Gen I games is based on command streams, a specialized assembly if you would like. |
|||
Every command is either: |
|||
a special effect(executes some assembly code according to the search table, |
|||
very likely to crash on glitch animations, or ACE) |
|||
a subanimation(renders some frame blocks, this is likely what causes the 'Tile Chaos' effect) |
|||
Frame blocks are the stuff that build complex animations, an array of... not tiles, but gameboy sprites actually. |
|||
So you might ask: |
|||
Then why does the entire screen gets flooded with garbage, intead of just a few glitchy sprites floating around? |
|||
Well, remember that buffer overflows don't exist to GameFreak, so the DrawFrameBlock writes past OAM buffer and into the screen data. |
|||
'''Why does it happen when modifying D057 then?''' |
|||
It seems like some code responsible for preparing PokeBall throw animation, |
|||
doesn't properly initialize address D11E(wPokeBallAnimData in disassembly). This address determines two things: |
|||
the number of animations(4 if caught, 6 if not) in its high nybble + the number of shakes in its low nybble. |
|||
The high nybble ends up being zero. |
|||
And we all know that having zero as a loop counter right from the start in Gen I is not a good thing... |
|||
So, the TossBallAnimation function has an animation array that it iterates through and plays in this loop. |
|||
Its contents: Poof Effect, Hide Mon Sprite, Shake, Poof on break, Show Mon Sprite |
|||
(later two if not caught, throw animation depends on ball type) |
|||
After it done iterating through this array, counter still has 250 animations! |
|||
Interpreting unrelated data as animation IDs doesn't end well, causing this effect.</tt> |
|||
[[Category:Generation I glitches]] |
[[Category:Generation I glitches]] |
||
[[Category:Glitch things]] |
[[Category:Glitch things]] |