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.
Short answer: yes. Long answer: yes, but there are some caveats:
VICII (the video chip) reads in 3 bytes of sprite data per rasterfor each of the maximum 8 hardware sprite, and the buffered data is meant to be displayed on the next raster.
If you display a hardware sprite a second time on a given raster that buffer will be empty the next raster, so on the following raster you'll end up with a transparent stripe in the sprite.
Also the sprite data fetches happen at around the end of the current raster/start of the next one, so you are pretty much limited to duplicate sprite #0 (because its data is fetched first), and even then the CRT-beam is so far on the right of the screen that you'd have to remove the sideborder to able to see the duplicate sprite visible.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With