To render a fluid animation that needs to update (almost) the entire screen, a good practice is to prepare (render) the next screen(s) into available video memory space to be displayed later, that's called buffering. This sample project uses this technic in order to show an animation composed of 6 distinct frames played according to a script. To make this even more interesting to watch, the animation is a spinning ambigram I drew with the words COLECO and VISION.
Technical Details
The default Graphic Mode 1 is used in this sample code, but it needs 2 charsets (PATTERN TABLES [0000-0FFF]) and 6 frames (NAME TABLES [2400-3BFF]) into video memory in order to quickly show the frames and then create the wanted fuild animation effect of a spinning COLECO VISION ambigram logo. The NMI is used in order to update the video registers 2 (NAME) and 4 (PATTERN) at a constant speed and when it's appropriate (to avoid video corruption) to show all the wanted frames based on a script : 16 cycles for frame#1, 16 cycles for a clock-wise spin, 16 cycles for frame#1 again, and 16 cycles for a counter-clock-wise spin). The 2 charsets are slightly optimized to avoid encoding chars that are (almost) the same. No data compression is used in order to optimize even more the rom size, but raw data is easier to visualize and understand which is what I want for this project. PUT_FRAME and INIT_TABLE are used in this code in order to show a way to use these Coleco BIOS routines for your projects, in this case each FRAME is composed of 16x16 characters and printed on each screen at the (offset) coordinates (x=8,y=4). Considering that the screen resolution is a 32x24 characters, and each frame is 16x16 characters, it's quite easy to understand that each frame is centered on screen by using the coordinates x=(32-16)/2,y=(24-16)/2.
Feel free to use this technic for your own projects, but the spinning logo is my creation so credit properly.
The following zip file contains the (commented) source code (for use with tniAsm) and the binary rom file.
ambigram.zip 7.24K
59 downloadsPlease rate and write comments! Have a nice day!
I'm expecting as many comments as the number of downloads...














