Now Reading
Secret colors of the Commodore 64

Secret colors of the Commodore 64

2023-03-11 20:20:52

In 1991 I used to be fourteen years outdated. It will be honest to say I used to be obsessive about computer systems. I proudly owned a brown ‘breadbox’ Commodore 64 with an unique improve – an Oceanic 5.25” disk drive:

c64 breadbox

Oceanic disk drive box

In Might that 12 months, I used to be studying COMMODORE FORMAT and devouring the C64 sport opinions. Out of the blue I learn a caption that caught with me for years afterward. Beneath a screenshot of a vibrant robotic dragon, it learn:

Maintain on… You’ll be able to’t get this color on a 64! Nicely, you may in case you swap pale inexperienced and cyan 50 instances a second!

This was astonishing to me.

Due to the surprise of the internets and the eagerness of some nice journal archivists, we will excavate the precise web page at which I goggled, way back:

Dragon Breed review picture and caption

This was freaky. Whenever you owned any 8-bit laptop, you grew to become intimately accustomed to its color scheme. This easy {photograph} blew my thoughts. That blue color simply wasn’t attainable.

In keeping with the caption, by presenting two colors to the attention and alternating them shortly sufficient, a complete new color emerged. What would this new, secret color appear to be in your crappy early-90s CRT tv? The screenshot was solely a touch. Wouldn’t it glow? Wouldn’t it flicker?

Twenty-six years later, I came upon the reply.

This text is all about color switching on the Commodore 64. There are interactive examples to play with beneath. I haven’t discovered anything on the subject, so it’s attainable that is the one useful resource on the topic.

The story has been up to date since first posting on 22 March 2017.

Now – again to the story. Let’s take a second to know why secret colors have been such an enormous deal.

Palettes have been vital.

A typical 8-bit laptop might solely show sixteen colors. These colors have been mounted in {hardware} when the pc was designed.

This meant the palette outlined mounted boundaries on your laptop. It constrained how the visuals seemed and felt. It essentially differentiated the Commodore 64, from the ZX Spectrum, from the Apple II, from the Amstrad CPC. You could possibly immediately inform which pc was accountable given a screenshot.

As you’d count on, {hardware} palette design was crucially vital. With solely sixteen colors to work with, digital artists wanted carefully-chosen tones to assist them signify the actual world.

It didn’t all the time go effectively. Pity the garish palette wired into the Sinclair ZX Spectrum, which produced visuals like a scorching shit aneurysm:

Spectrum loading screen

Because it occurred, the Commodore engineers did an awesome job. The pic beneath exhibits the palette on the prime left. The remainder of the picture explores the pleasing gradients attainable with the C64:

C64 palette by Sven Ruthner

Picture credit score: Sven Ruthner, @the_ptoing for Thanks Dennis Busch!

Discover that:

  • It has earthy tones that match real-world objects. Evaluate with the hue explosion of the Speccy.
  • It has many shades of gray. This allows you to render monochrome photos in addition to issues like metallic. Lastly the impartial gray shades might be slotted into ramps with different colors to mix them collectively – you may see these on the correct.

So C64 house owners have been accustomed to screens like this:

Hunter's Moon loading screen

CITADEL loading screen

The pixellated photos above would look significantly better – extra subtly blended – in your typical fuzzy CRT tv.

After years of obsessively taking a look at it, this palette is firmly embedded in my thoughts. The colors are instantly recognisable. They resonate with the frequency of nostalgia, and make my mind tingle. I really use these colors as my avatar on Github:

github profile

With this in thoughts, the concept you possibly can break this boundary and invent new, secret colors on the C64 – and trick the attention into seeing one thing that didn’t exist – that was excessive wizardry.

If you happen to swap two colors quickly sufficient – say at 50 or 60 frames per second – you may idiot the attention into seeing one thing that isn’t there. On a machine with sixteen colors, only one or two additional can add rather a lot to a scene.

Since in the present day all of us reside sooner or later and you might be studying a totally programmable doc on a supercomputer, let’s strive it.

Easy demo

Right here’s a sq. flipping between two colors – purple and blue – each second.

Click on or faucet on the sq. to alternate the colors at 60fps (or particularly, the utmost refresh charge of your present browser and show. It will be cool to see this on a 144Hz refresh monitor).

Discover how a 3rd color seems? That shade of purple is just not being displayed. Solely purple and blue are showing – your eye is fooled into seeing a color that isn’t there. I promise I’m not dishonest. That’s color switching in motion.

Hit the sq. once more to sluggish it down and test.

Dragon Breed demo

So method again in 1991, I used to be intrigued by that evaluate however by no means really owned the sport. What did Dragon Breed really appear to be?

To begin with, it seems that fancy color switching isn’t used within the sport in any respect till you hit the top of STAGE 3, when a robotic dragon boss exhibits up glowing in that bizarre cyan.

Sidebar: One attention-grabbing reference is to take a look at the unique arcade sport. Since we reside sooner or later, you may play the Dragon Breed arcade in your browser right now (hit the ability button, watch for boot, press 5 to insert coin then 1 to begin). That’s fairly mind-blowing. Sadly to see the dragon we’re keen on, you’ll need to play to the top of STAGE 3. Good luck with that.

So absolutely somebody’s captured this impact on a C64 longplay video? Nicely after some digging I discovered our well-known robotic dragon boss on Youtube (audio warning):

There are two issues with this video. As a result of it’s captured at 30fps,

  1. It appears to be like like shit. The sprites flicker distractingly, and
  2. The color switching impact is totally misplaced.

If you happen to have been to play the sport on an emulator at 50/60fps, the impact is convincing.

Replace: the uploader of the video above noticed this text and re-uploaded at 50fps! Thanks einokeino303. Try the distinction (word, it’s essential click on the gear and set high quality to 720p50):

Sidebar: A word on frames per second. The European PAL C64 up to date at 50fps, whereas the US NTSC techniques up to date at 60fps (reference). Bizarre huh? This implies the impact could be barely extra convincing on a US machine.

Can we present the Dragon Breed impact on an internet web page? Nicely, let’s play by means of to STAGE 3 (utilizing cheats, phew) and screencap the boss in a few frames aspect by aspect:

See Also

boss frame 1 boss frame 2

Subsequent, with a little bit of JavaScript we will alternate the pictures and see the unique impact at 60fps. On a telephone, you may have to zoom out a bit first. Once more, faucet or click on to decelerate or activate the color switching:

Have a look at the three photos all collectively – a completely new color has emerged!

Additionally discover the flickery dragon tail: this can be a limitation of sprites on the C64. The {hardware} didn’t help sufficient sprites to provide the participant six tail segments and render all of the enemies; so solely three are displayed at a time and alternated each body, producing the flickery side-effect.

We did it! We recreated Dragon Breed color switching within the browser. Are we finished?

Palette demo

Nope. If these two colors might be mixed, what different mixtures are attainable? Put one other method, what’s the set of all attainable secret colors on a given machine?

Let’s discover out. Put in your shades for this one! We’re going to generate each distinctive pair of colors attainable on the Commodore 64 in a single superb epilepsy-bomb. Once more, faucet or click on to modify modes:

Fairly cool huh? It appears to be like just like the tartan for the clan McPuke.

Keep in mind each flickering sq. above is a singular pair of colors. I highlighted the mixture that’s utilized in Dragon Breed by giving it a border.

Why do some squares flicker?

Discover that some mixtures have a nasty strobe impact and will certainly make you’re feeling sick. However not all of them.

Why do some mixtures work so effectively? All of it relies on brightness. Two colors of equal brightness will mix completely; whereas say black and white will flicker violently.

With switching in quick mode, discover a blended color that you just like. Now faucet to sluggish it down and see which two colors are mixing to provide you that hue.

The Finish

And that’s the story of how I examine secret C64 colors in 1991, after which twenty-six years later lastly acquired to see them. If you happen to’re nonetheless and have functioning eyes, learn on for bonus content material.

Have you learnt every other video games – for any laptop – that use this method? In that case, let me know within the feedback.

I’m accumulating examples within the appendix beneath. I’d like to know if the Speccy ever did this…

Earlier than the web, laptop magazines have been the one method you came upon what was taking place on the planet of expertise. It’s tough to explain how thrilling it was to get your subject of ZZAP! 64 or COMMODORE FORMAT and browse opinions of all the brand new video games, or take a look at adverts for the peripherals you’d beg your dad and mom/Santa for.

For optimum nostalgia, listed here are the total pages of that Dragon Breed evaluate from COMMODORE FORMAT:

Commodore Format issue 5 page 84 Commodore Format issue 5 page 85

This can be a checklist of each reference to 8-bit color switching I’ve discovered on the internet.

  • COMMODORE FORMAT subject 5, Dragon Breed review:
    • “Further colors are achieved utilizing color switching, the place pixels are assigned alternate colors each fiftieth of a second. This gives the look of a very new shade!”
  • COMMODORE FORMAT subject 13, Q&A:
    • “There’s no technique to improve the variety of colors within the 64’s palette, however there are intelligent software program routines to provide the impression of extra colors. Activision’s Dragon Breed makes use of very speedy color switching to provide an intermediate tone, and PD coders have produced a ‘Fli-Pic’ facility which lets you use greater than 4 colors per char block.”
  • COMMODORE FORMAT subject 32, Mayhem in Monsterland developer diary:
    • “As with our background graphics we needed greater than the C64’s 16 colors for sprites. Nonetheless, we will’t use the identical methodology of color mixing that we’re utilizing for the extent graphics (see CF28) as a result of we haven’t acquired sufficient sprite colors. So I added a distinct color mixing routine for the sprites. This quickly flashes between two colors (of equal brightness) to create new shades.”
  •’s interview with the Dragon Breed programmer, Ashley Routledge:
    • “I particularly recall the dragon with that unusual shade of blue/cyan.”

In writing the applications for this text I found it’s fairly awkward to get two photos to flip at 60fps with out visible artifacts.

  • GIFs (true GIFs, not GIFV) are too sluggish for 60fps.
  • Manipulating a backgroundImage works however sparkles like hell.

To make this work it’s essential create a few Picture objects, set their src attribute and watch for them to fully load (utilizing an occasion) earlier than beginning your animation loop. Phew! If you happen to want this, view supply for this text or check out this gist.

OK that’s actually it! Thanks for studying. If you happen to’ve loved this I’d love to listen to from you beneath.

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top