c64commodore

How to have 9 sprites in rasterline


Is it possible to have more than 8 sprites in a rasterline on a real Commodore 64 (not on an emulator)? the sprites don't need to be different.


Solution

  • Yes it is possible using assembly in interrupts. The interrupt would be aligned to the raster of the video chip. After the first sprite has been rendered by the video chip (using NOP to wait for the necessary time), its position and shape are changed further to the right. Then the interrupt waits again until the sprite has been rendered to reset it to its original place because the nest raster needs to "see" it there.

    Using this technique you can have more than 8 sprites in one raster line. The technique is similar to showing sprites in the border for the case of For sprites in the left/right borders. Instead of changing the register to make the screen less width, you need to change the x-position of the sprite.