How do I show sprites in the border on C64?

前端 未结 6 412
独厮守ぢ
独厮守ぢ 2020-12-13 00:05

I\'ve seen cool C64 demos showing sprites in the border area of the screen. It shouldn\'t be possible; I think they managed to fool the graphics chip somehow. How exactly di

6条回答
  •  时光说笑
    2020-12-13 00:42

    Timing was the key. The image was created in the border by changing the overscan (border) colour as the CRT's beam moved from left to right. There are two timing signals required to produce an image - vertical refresh and horizontal refresh. By detecting when the horizontal and vertical refresh occurs you can start a sequence of assembler instructions to change the border colour to produce an image. You need to work out the number of CPU clock ticks per border pixel and use that to create code that changes the border colour at the right point.

    It doesn't work very well when it comes to writing games as the CPU overhead is too great for there to be any time lift to process user input and game state.

提交回复
热议问题