Commodore 64 Sprite Registers are used to manage many other functions of a Sprite (0-7) as listed below:
Horizontal and Vertical Positions on the screen alternating in memory locations $D000-$D00F (53248-53263).
Most significant bits of Sprite(s) Horizontal Position. When a sprite moving to the right passes the 256th’s position bits in here must be reset to allow the sprite to continue all the way to the right
Sprite Enable Registers. This area requires setting the appropriate sprite bit to turn it on so its visible on the screen (bits 0-7).
Sprite Vertical Expansion. Enabling bits here will give the Sprite(s) a double height, which results in two raster scan lines high rather than one. Enabling the bits here work in conjunction with register $D01D below or go solo.
VIC Interrupt Sprite Collision. Setting bit 2 in this register triggers a collison check between 2 Sprites utilizing zan IRQ (Interrupt Request).
Sprite to Foreground Display Priority Register. Allows a sprite to overlap a foreground character on the screen.
Sprite Multicolor Registers. This is used to alter individual bit pairs to turn on multicolor for Sprites 0-7.
Sprite Horizontal Expansion. Enabling bits here will give the Sprite(s) a double width (twice as wide) without impacting the horizontal resolution. Like it’s counterpart, this register can also work vice versa with the Vertical register above at $D017 or remain independent.
Commodore 64 Sprite Registers: Collisions
Sprite Collision Registers. This register holds information in its bits indicating which Sprites were involved in a collision from register $D019. A read here will clear the collision in preparation for the next one. This register though is not perfect for Sprite collisions since multiple sprites overlapping could also have collisions, but an inconsistency exists as which collided first. Therefore it is recommended to check the positions of each Sprite for better accuracy of these results.
Register $D01F (53279) points the bits to the appropriate Sprite involved in a foreground collision (ASCII characters) on the screen. Again this is not perfect and it is preferred to create a Sprite to character collision (best done in Assembly language) to perfect this process.
$D022 (53282). Background Color 1.
This register manages the color for the 01 bit pair when setting multicolor graphics, such as for our Sprite(s) example.
$D023 (53283). Background Color 2. This part of the Commodore 64 Sprite registers control the color for the 10 bit pair of multicolor graphics, such as for our Sprite(s) example.
$D025 (53285). Sprite Multicolor Register 0. A bit pair of 01 here is used to set a Sprite color for its graphics.
$D026 (53286). Sprite Multicolor Register 1. By setting a value here the bit pair of 11 is enabled for multicolor in Sprite(s).
$D027-$D02E (53287-53294). Activating bits here turn on Sprite colors for each Sprite by bits of hi-resolution sprite data, and multicolor sprites utilize the bit pairs here having a value of 10. Each Sprite can have its own color isolated from the others to allow for many colorful Sprites.
Finally feel free to read the Commodore 64 Sprite article that teaches you how to create your own sprites using the Commodore 64 Sprite Registers that you learned about on this page using Basic programming.