| |
Released At :
Outline 2013
Achievements :
Mixed Competition at Outline 2013 : #6
Credits :
Download :
Look for downloads on external sites:
Pokefinder.org
Production Info Submitted by Kabuto on 13 November 2013
This started as an experiment to squeeze a noise routine into as few bytes as possible. I tried many things, including tiny decompressors, to squash it - though in the end no compression whatsoever is used. Here's a description of what the code does and the tricks used within these 126 bytes:
* Non-code:
** Autostarter (for lowest possible overhead)
** 9 bytes containing sprite X position values to be written by VIC setup
* Init code:
** PRNG code. Abuses some ROM bytes that just happen to be a halfway acceptable PRNG subroutine and ZP values as pointers that happen to start with good values to fill $4000..$7FFF (and a few further unneeded bytes) with randomness for the sprites.
** Writes random bytes into the SID - adjusted many times until I got noise in the end. Bonus: COMMODORE message flickers during PRNG init as it writes beyond the SID area into the color RAM.
** 3*DEC for VIC setup (sprite enable, double width and VIC page to $4000..$7FFF)
* Small rasterloop. One iteration for 3 rasterlines each. What's done in each iteration:
** Opening the sideborder every line
** Restarting all 8 sprites (restart is a no-op while sprites are still active so actual restart happens every 21 lines)
** Preventing badlines (not disabling display because that could leave the screen blanked if the routine is started at the wrong moment)
** Incrementing sprite pointers (more randomness - otherwise the same pattern would repeat every 21 lines)
** Remaining VIC setup (sprite X positions, sprite colors).
** Uses PHA/PLA instead of NOP as they need less bytes per wasted cycle and the stack isn't used anyway
** And most importantly, the rasterloop is self-stabilizing. It requires proper arrangement of sprite Y writes to prevent the rasterloop from locking in incorrectly. |
|
|
|
| Search CSDb |
| Navigate | |
|
| Detailed Info | |
|
| Fun Stuff | |
· Goofs · Hidden Parts · Trivia
|
|
| Forum | |
|
| Support CSDb | |
|
| |
|