base:sprite-crunching
Differences
This shows you the differences between two versions of the page.
base:sprite-crunching [2015-04-17 04:34] – external edit 127.0.0.1 | base:sprite-crunching [2019-01-28 10:26] (current) – hcl_bd | ||
---|---|---|---|
Line 5: | Line 5: | ||
Sprite crunching is based on a glitch in the VIC-chip (as usual) that appears on a cycle-exact position every rasterline. You trigger the glitch by setting back $d017 to 0 on this exact position, and all sprites that had their $d017-bit set to 1 will be affected. | Sprite crunching is based on a glitch in the VIC-chip (as usual) that appears on a cycle-exact position every rasterline. You trigger the glitch by setting back $d017 to 0 on this exact position, and all sprites that had their $d017-bit set to 1 will be affected. | ||
- | Now what will happen depends on where in the sprite you already are. There is an internal sprite-graphics-counter for each sprite that, in normal case, is increased by 3 each line the sprite is displayed. Each rasterline 3 bytes of the sprite will be displayed, so the counter | + | Now what will happen depends on where in the sprite you already are. There is an internal sprite-graphics-counter for each sprite that, in the normal case, is increased by 3 each line the sprite is displayed. Each rasterline 3 bytes of the sprite will be displayed, so naturally |
- | In [[http:// | + | When the sprite-graphics-counter reaches $3f, the sprite |
- | [[http:// | + | __Examples of usage:__ |
- | In [[http:// | + | In [[http:// |
+ | |||
+ | [[http:// | ||
+ | |||
+ | In [[http:// | ||
To add a bit more content to this page, here is that table. You read it like "AA : BB -> CC", where AA is the current position in the sprite. BB is the value that will be added if triggering the glitch (+3 of no glitch), and CC is the resulting position. So, if you want to shrink your sprites, you should look for BB values > 3, and if you want to enlarge your sprite then look for BB values < 3. Don't forget that the sprite only ends on $3f, so the only ways to end the sprite are from $3b or $3c. | To add a bit more content to this page, here is that table. You read it like "AA : BB -> CC", where AA is the current position in the sprite. BB is the value that will be added if triggering the glitch (+3 of no glitch), and CC is the resulting position. So, if you want to shrink your sprites, you should look for BB values > 3, and if you want to enlarge your sprite then look for BB values < 3. Don't forget that the sprite only ends on $3f, so the only ways to end the sprite are from $3b or $3c. | ||
Line 83: | Line 87: | ||
3f : end | 3f : end | ||
</ | </ | ||
- | |||
- | Hmm, Can i format it in a more readable way?.. | ||
- |
base/sprite-crunching.txt · Last modified: 2019-01-28 10:26 by hcl_bd