Animating Characters Part 1

This is a first shot at using interrupts for driving graphics rendering. From what I’ve read so far, there are better ways of handling similar code, so at some point soon I’ll modify the code to work off of the raster interrupt. Since it’s been a useful exercise and the rasterization of the code will probably start with something similar, I’ll go ahead and post what I have so far.

Animation Program Setup

For initialization, the code is set to point the VIC to use our custom character, copy our custom characters to ram, clear the screen and then setup and start the animations on interrupt.

Also note that the main loop is empty in this code and that the animations are driven solely by the system’s interrupts.

Animations and Interrupts

These routines drive the program’s animation. Since the timer interrupt will call the animation routine once every 1/60th sec., a skipCount variable is used to control the animation speed. At a skipCount of 30, the animations will update two times per second where each frame lasts (30/60 = 1/2 sec.)

The Full Code

Leave a Reply

Your email address will not be published. Required fields are marked *