It is impossible to increase the number of colors in the C64 palette, but there are tricky subroutines that allow you to create the impression of more colors. Activision's Dragon Breed uses very fast color switching to give an intermediate tone, and PD coders have created a Fli-Pic mechanism that allows you to use more than four colors per block of characters.
In 1991, I was fourteen years old. You could say that I was obsessed with computers. I was the proud owner of a Commodore 64 brown bread-box with an exotic upgrade — Oceanic 5.25 ":
')
In May of that year, I read COMMODORE FORMAT and devoured reviews of C64 games. Once I read a headline that I had in my head for years . Under the picture of a colorful robotic dragon was written:
Wait ... You can't get this color at 64! But this is possible if you change the pale green and blue 50 times per second!
It shocked me deeply.
Thanks to the miracle of the Internet and the passion of some great archivists of journals, we can dig out the very page that amazed me a long time ago:
It was rather unusual. If you had any 8-bit computer, you are familiar with its color scheme. This simple photo blew my mind. This blue color was simply impossible .
According to the title, if you alternate two different colors quickly enough, a completely new color appears for the eye. How did this new secret color look on your shitty CRT TV in the early 90s? The screen shot was just a hint. Did he shine? Flickered?
Twenty-six years later, I found the answer.
This article is about switching colors on Commodore 64. Below are some interactive examples . I have not found anything similar, so it is possible that this is the only resource on this topic.
Let's think a bit about why the secret colors were so big?
The palette defined the computer
The palette was important.
A typical 8-bit computer could only display sixteen colors . These colors were hard-wired while developing the computer.
This means that the palette defines a fixed frame for the computer. She limited how the images look and feel. This fundamentally distinguished the Commodore 64 from the ZX Spectrum, from Apple II, from the Amstrad CPC. You could immediately tell on which computer a particular screenshot was taken.
It is expected that the design of the hardware palette was extremely important. The artists worked with only sixteen colors and needed carefully selected tones that would help them reflect the real world.
It didn't always work out well. It is a pity the screaming palette sewn into the Sinclair ZX Spectrum , which produced images like these:
It so happened that the Commodore engineers did an excellent job. The picture below shows the palette in the upper left corner. The rest of the image shows the nice gradients possible on the C64.
Note: This is not my picture! The original author is unknown, but I found it here .
Note:
The palette has more earthy tones that correspond to real objects. Compare with the explosion of paint Spectrum.
There are many shades of gray in it . This allows you to display monochrome images, as well as such things as metal. In the end, neutral shades of gray can be mixed with other colors, placing them next.
Therefore, the owners of C64 are accustomed to such screens:
Such pixel images look much better on typical fuzzy CRT TVs, due to softer blending.
After years of close study of this palette, she ingrained herself in my brain. I recognize these colors right away. They resonate with the frequency of nostalgia and make my brain tremble. I even use these colors as my avatar on Github :
Given this, the idea that it is possible to destroy this line and invent new secret colors on C64, which can be made to see something that does not exist, seemed magical.
Color switching
If you quickly change two colors, for example, 50-60 times per second, then you can deceive your eyesight and see what is not. For a car with sixteen colors, even one or two additional colors can significantly enrich the scene.
Since we all live in the future, and you are reading a fully programmable document on a supercomputer, let's try to repeat this effect.
Simple example
Here is a square that changes color from red to blue and back every second.
Translator's note: From here on, switch to the Result tab to launch the example.
Click on it to start switching colors at 60fps (or, in some cases, with the maximum refresh rate of your browser screen. It would be great to see this on the 144 Hz monitor).
Noticed how the third color appeared? This shade of purple is not displayed. Only red and blue squares appear, and your eye sees a color that is not there. I do not deceive you. This is a color switch in action.
Press again to slow down and check.
Dragon Breed Example
Back in 1991, I was intrigued by the review, but I never had that game. What did the Dragon Breed really look like?
First of all, it turns out that the unusual color switching is not used in the game at all until you reach the end of STAGE 3, where the boss, the robotic dragon, begins to shine in that strange blue color.
Lyrical digression: We have an interesting opportunity - to launch the original arcade. As we live in the future, you can play Dragon Breed right now in your browser (press the power button, wait for the download, press 5 to insert a coin, then 1 to start). This is amazing. Unfortunately, to see the dragon that interests us, you will have to reach the end of STAGE 3. Good luck.
Surely someone recorded this effect on a longplay C64 video? After a little digging, I found our famous dragon boss boss on Youtube:
But, since the video is recorded at 30fps, two problems emerge:
It looks bad. Sprites are annoyingly flickering.
The color switching effect is completely lost.
If you were playing on an emulator with 50 / 60fps, the effect would be convincing.
Lyrical digression: A note about frames per second. The European version of PAL C64 is updated at 50 frames per second, while NTSC systems in the US are updated at 60 frames per second ( link ). Strange, yes? This means that the effect is a bit more convincing on an American car.
Can we show the Dragon Breed effect on a webpage? Let's get to STAGE 3 (using cheats, of course) and save the boss in a couple of shots:
Further, with a little help from JavaScript, we can alternate the images and see the original effect at 60fps. On the phone, you will probably first need to zoom out a little. Once again, click to slow down or activate color switching :
Look at all three images, we created a completely new color!
Also note the shimmering dragon tail: this is a consequence of the C64 sprites restriction. The computer does not support a sufficient number of sprites to display the six tail segments and all enemies at the same time, so only three are shown and each frame alternates with a flickering effect.
We did it! We recreated the color switching mechanism of Dragon Breed in the browser. Is it done?
Palette example
Not. You can mix these two colors, and what other combinations are possible? In other words, what is the set of all possible secret colors on this machine?
Let's find out. Put on your glasses! We'll bring each unique pair of colors on the Commodore 64 into one beautiful epileptic blast. Again, click to switch modes :
Pretty cool, huh? Looks like a tartan for Clan McBue.
Keep in mind that each shimmering square above is a unique pair of colors. I selected the combination used in Dragon Breed using the border.
Please note that some combinations have an unpleasant strobe effect. But not all of them! Why it happens? It's all about brightness . Two colors of the same brightness are perfectly combined, while black and white will flicker very much.
Switch to quick mode, find the color you want. Then click to slow down the rotation and see which two colors blend together to form this shade.
the end
That's the whole story of how I read about the secret colors of C64 in 1991, and then twenty-six years later I finally got to them. If you are still interested and your eyes have not yet flowed out, then the bonus content is located further.
Article from 1991
Before the Internet, computer magazines were the only way to find out what was happening in the technology world. It’s hard to describe how exciting it was to get a ZZAP release !64 or COMMODORE FORMAT and read reviews about all the new games, or consider advertising peripheral devices, and then beg for their parents / Santa.
For maximum nostalgia, here are the full review pages of Dragon Breed from COMMODORE FORMAT:
Color Switching Mention
This is a list of all links to 8-bit color switching that I found on the Internet.
COMMODORE FORMAT release 5, Dragon Breed Review : Additional colors are obtained by switching colors, where pixels are assigned different colors every 1 / 50th of a second, creating the impression of a completely new shade.
COMMODORE FORMAT release 13, Q & A : It is impossible to increase the number of colors in the C64 palette, but there are tricky subroutines that allow you to create the impression of more colors. Activision's Dragon Breed uses very fast color switching to give an intermediate tone, and PD coders have created a Fli-Pic mechanism that allows you to use more than four colors per block of characters.
COMMODORE FORMAT, Issue 32, Mayhem in Monsterland Developer Diaries : As with our background graphics, we wanted more than 16 komodorovsky colors for sprites. However, we could not use the same blending method as for the level graphics (See CF28), because we do not have enough sprite colors. Therefore, for sprites, I implemented a different blending procedure that quickly switches between two colors (equal in brightness) to create new shades.
Interview C64.com with the programmer of the Dragon Breed Ashley Rutledge: I often recall a dragon with this strange shade of blue-blue.
How to change pictures at 60fps
When writing programs for this article, I found it quite difficult to make two images change at 60fps without visual artifacts.
GIF (normal GIF, not GIFV ) is too slow for 60 frames per second.
The backgroundImage manipulation works, but it flickers like hell.
To make it work, you need to create a pair of Image objects, set their src attribute, and wait for them to fully load (using an event) before the animation cycle begins. Whew! If necessary, review the source code of this article or review this code .
OK, now for sure! Thanks for reading. If you liked it, I would like to hear comments from you below.