42 Astoundingly Useful Scripts and Automations for the Macintosh

8 (bit) Days of Christmas: Day 100 (Hearth)

Lower resolution graphics were more appropriate for animation, because you could page through up to eight screens like a flip book. This is Eugene Vasconi’s Holiday Hearth from December 1986.

Jerry Stratton, December 20, 2020

Eugene Vasconi did several Christmas programs for The Rainbow. This is from “Holiday Hearth” in December 1986.

Christmas Fireplace is a warm addition to your holiday cheer and uses a graphics technique put forth by John Fraysse in the October 1983 Rainbow.

This is low resolution graphics—PMODE 1—with four colors. The advantage of low resolution graphics was partly that it used less memory, and partly that because it used less memory it could be manipulated more easily. These computers were very slow compared to modern computers. Drawing the graphics took time, and the user could visibly see the shapes drawing slowly on the screen.

That second number that always accompanies PMODE is the page of memory to start the graphics on. The Color Computer had eight pages for graphics, depending on how you allocated it. Higher resolution, or more colors, used more pages for each screen.

PMODEResolutionColorsResolutionPages per screen
4high2256x1924
3medium4128x1924
2medium2128x1922
1low4128x962
0low2128x961

This combines the tables on pages 98 and 100 of Getting Started with Extended Color BASIC.

By using low resolution, Vasconi was able to get four colors and four screens (8 pages, divided by 2 pages per screen). So he could draw on one screen, and then copy the drawing, page by page, to another screen.

  • 95 PMODE1,7
  • 96 PCOPY 3 TO 7:PCOPY 4 TO 8

Here, he copies the two pages of the screen that are on pages 3 and 4 to pages 7 and 8, after switching to the screen starting at page 7.

Copying pages made animation a little easier: you could copy a scene from one set of pages to another, and then draw over just the changes. It works just like the old flip books that kids used to draw in their notebooks. Each frame rapidly replaced the previous frame creating the illusion of motion. In this case, an animated fire in with four frames.

This is the Fraysse graphics technique Vasconi mentioned in the introduction:

Part one of the program creates the basic graphics scene while part two holds the animation loop of four fires, light patterns, and the music.

You could, of course, get into all sorts of trouble by forgetting which page your screens started on—or even forgetting how many pages you’d allocated for graphics. The PCOPY command was perfectly happy to write over memory that was allocated for something else, such as the BASIC program that was drawing the image.

When it all worked, however, it was fascinating, fun, and very rewarding.

The part of the program that was most fun was keeping the music going while the fireplace roars along. I accomplished this by using data statements and a PLAY command that inserted one note of the song between every flip of the pages. With the proper delay, it sounds like a continuous tune.

This was worthy enough that I decided to upload a video of it. While the video is a screen recording of the program running in xroar, the audio in the video is from an actual Color Computer 2; xroar added a bunch of clicks to the audio that aren’t there on a real computer. (If anyone knows why, and more importantly how to get rid of those clicks, let me know.)

As you’ll see in the video, the program was actually two programs. The first drew the graphics and the second displayed them while playing the music. This was a common way of not wasting precious memory: the BASIC program held the code for creating the graphics, and the graphics themselves took up memory after being created. With four screens of graphics on eight pages, Vasconi was able to save a lot of memory by having the user jettison the BASIC code for creating the graphics once the graphics were created.

The CoCo will retain anything created on the graphics pages even when a new program is loaded.

You’ll see the prompt in the video for loading the new program. That’s because the program was designed to work on a cassette-based storage system; it was safest to have the user manually load the next program in a chain of programs. With a disk-based system, it is safest to have the program itself do the chaining. In this case, I replaced 97 END with 97 RUN"XMASDRVR.BAS".

Merry Christmas! Keep the Yule fire burning and the Christmas carols playing.

Vasconi’s Holiday Hearth: A roaring holiday fire from Eugene Vasconi, in the December 1986 issue of The Rainbow.; graphics; Christmas; Color Computer; CoCo, TRS-80 Color Computer

It’s a color computer. You want to use all the colors.

In response to 8 (bit) Days of Christmas: Eight holiday images created on the TRS-80 Color Computer, from the early to mid eighties.

  1. <- Day 101 Rudolph
  2. Day 11 Christmas Tree ->