This week I began reading and using “Timex Sinclair Color Graphics” by Nick Hampshire. I mentioned this book in my first blog entry.
As a reminder, you can find a description and a pdf of the book here.
As far as I can tell, all of these BASIC programs are available in the original version of the book, called “ZX Spectrum Graphics.”
I downloaded the pdf version of the book, along with a zip file which contains one TZX file and a separate directory with what appears to be every program in the book in BAS format. I’ll be using the BASIC programs when they’re available for this series of blog entries.
So far, I have read the book’s overview and part of the first chapter, “Colour Plotting.” I worked my way through the examples in the first section, pages 8-13, on “Colour.” As I worked my way through the book, I came across numerous errors in the BASIC program listings. It isn’t unusual to find errors in books from the early 1980s, but I was surprised to see problems in such short programs. These errors must have been very frustrating for a neophyte computer programmer who had never used BASIC before on their brand new computer. In these simple, short programs, the program errors were easy to resolve. Here is an example of a program with several errors; this will not run as-printed in the book:
The errors in this program are small, but I’m surprised that they slipped through the editing process. This doesn’t bode well for the remainder of the book. Luckily, most, possibly all, of these BASIC programs have been archived already and I won’t have to type them in. I’ve only had to type-in these short programs so far. I fixed the errors in this program which shows some of the colors available on the T/S 2068. Here is a screenshot of the program which includes the fixes that I made to it:
This program displays the 64 different color combinations that are possible using INK and PAPER. Here is a screenshot of the program after it runs:
There are several more simple, two-line, BASIC programs. This one shows what happens if the BRIGHT command is used:
This example shows the use of inverse characters:
I was not familiar with the OVER command. This program also had an error, which I corrected. Here is a close-up of the letter ‘a’ over-written with a tick mark:
Pages 12-13 are dedicated to explaining “Advanced Color,” but there are no program examples. Perhaps some example will be provided later.
I won’t be explaining how to program in BASIC here. For now, I only want to show some of the examples of programs that draw graphics to the screen which are in “Timex Sinclair Color Graphics.”
I’ve loaded and run the four full programs from this chapter. Each of these programs has a full description that describes what it does when it is run, a section that explains what is required to get the program to run and a section called “Program Structure” that breaks down the BASIC program lines and makes plain what each section of the program is doing.
Random Colours
You can read about this video art program here.
This is just a screenshot of the program that shows a still picture.
“Random Colours” is constantly drawing new art to the screen in an interesting fashion. I expected random boxes to be drawn to the screen; nothing too interesting, but it looks almost like there is a snake wondering around, slowly growing with newly-colored heads when the program starts running. Once the screen is full of colors, then small sections of the screen have the colors changed. Try running the program to see the results:
Now let’s move on to the second full program in this chapter.
Map
You can read about this second program here.
This program draws a rough picture of North America, which includes the United States, Canada and Mexico.
If this program interests you, then you can download it.
This extremely low-res, stagnant map bores me, how about you? Let’s move along to program three in the “Colour Plotting” chapter
Rainbow
You can read more about this third program here.
This four-color “rainbow” is in high-resolution mode, but it takes a few minutes to draw. I like that it is using the high-res screen, but the slowness of the drawing process leaves me feeling cold. Plus, whoever heard of a rainbow that isn’t red, orange, yellow, green, blue, indigo and violet (Roy G. Biv)? I understand that the limitations of the T/S 2068’s color palette make a true rainbow impossible. Therefore, let’s call this program “BiG YeaR,” for blue, green, yellow and red (BGYR).
This one may look a little better on a CRT setup on a real T/S 2068. These are two pictures taken of my 14″ flatscreen CRT hooked up to my T/S 2068 via a composite cable:
This picture is a close-up that has been cropped. If you look at it closely, you can see the fuzziness and soft pixels make the picture, to me, kinder to the eyes.
If you would like to run “Rainbow,” then you can download it here:
Finally we have one last program in this chapter called,
Fan
You can read more about this fourth program here.
This program “produces a pretty changing and colourful pattern using high-resolution colour plotting.” This program isn’t much to look at when it first begins running, but as the lines build up, then the picture begins to look more interesting. One downside is that as the program runs and the display is built-up and starts filling the screen, the picture begins to have video artifacts that look quite similar to macroblocking in a compressed HD signal. This “problem” is due to the color limitations of the T/S 2068. However, I put the word “problem” in quotes because after some time, the not-really-macroblocking begins to give the picture a different kind of beauty of its own. Once this program runs long enough, the fan pattern in the center of the screen begins to become more solid. Eventually it might look completely solid, with only the colors changing.
Only the first picture of “Fan” doesn’t have the “macroblocking” that I am talking about that causes the picture to seem to starting looking like it is corrupt.
As the next five pictures show, the blocks appear to be getting larger as the program continues to run.
The next two pictures are taken from my 14″ CRT TV again. Again, I believe that the softened picture looks better than it does from the screenshots captured from the emulator.
These last two pictures have been manipulated in Photoshop to simulate an image that might be seen in the book. The first one is grayscale, and the next one simulates a black and white image and looks an awful like a picture of a T/S 2068’s TV that might be seen in a picture included in a Timex/Sinclair user group newsletter in the 1980s.
If you would like to run “Fan,” perhaps on your own computer that can run Sinclair BASIC, then you can download it here:
We’ve now seen the four examples that are provided in the first chapter. Normally I would play around with the BASIC listings to see what kind of interesting results I could get by making small changes to the program. However, I prefer to continue working my way through the book to see some of the upcoming programs that are longer and may be more interesting.
Finishing Words
I didn’t expect to cover the entire first chapter (pages 7-24) of “Timex Sinclair Color Graphics.” This certainly won’t happen in the next entry in this series, where I’ll cover chapter 2, “High Resolution Graphics.” This next chapter is about sixty pages long and has many more programs in it.
I hope that you’re enjoying this series so far. I’m having fun reading the book and running the programs. It is especially rewarding to see the programs running on my real NTSC T/S 2068 computer, which gives images as one would have seen in the 1980s. The pictures taken from the emulator look a bit too perfect for my own taste.
If you have any feedback, then come say hello over at the Timex discussion group on groups.io.
See ya there!
Adam