TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Secret colours of the Commodore 64

398 pointsby a1rabout 8 years ago

26 comments

flashmanabout 8 years ago
&gt; Sidebar: A note on frames per second. The European PAL C64 updated at 50fps, whereas the US NTSC systems updated at 60fps<p>This is because alternating current is 50Hz in PAL countries (eg Europe), and 60Hz in NTSC countries (eg America). Analogue TVs vertical refresh rate was synced to the AC frequency for a bunch of practical reasons, which meant gaming consoles had to send signals to the television at either 50Hz or 60Hz.<p>Result? Many PAL console games actually ran at 5&#x2F;6ths of NTSC speed. Most notoriously, Sonic the Hedgehog, whose agility was more sluggish (and soundtrack less vivacious) for a large fraction of the world. More information in this video: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cWSIhf8q9Ao" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cWSIhf8q9Ao</a>
评论 #13938635 未加载
评论 #13938194 未加载
评论 #13938366 未加载
djsumdogabout 8 years ago
If you want to see how this type of colour magic works in video form, the 8-bit guy does a GREAT video on this:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=niKblgZupOc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=niKblgZupOc</a><p>He shows all the interesting artifacting that makes these extra colours possible.
tdeckabout 8 years ago
Here&#x27;s a great older example of this technique (and a couple others) used on the TRS-80 Color Computer 3 to show &quot;hi-color&quot; bitmaps on a machine with a 16 color palette:<p><a href="http:&#x2F;&#x2F;users.axess.com&#x2F;twilight&#x2F;sock&#x2F;hicolor&#x2F;hicolor.html" rel="nofollow">http:&#x2F;&#x2F;users.axess.com&#x2F;twilight&#x2F;sock&#x2F;hicolor&#x2F;hicolor.html</a>
评论 #13937283 未加载
xedariusabout 8 years ago
Reminds me of another piece of magic I used to use during my Amiga demo days. Infinite Bobs. A Bob was a BlitterObject, a graphic rendered by the hardware, not dissimilar to a sprites.<p>People would try many things to render as many Bobs as possible.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=eDQTxbudvDg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=eDQTxbudvDg</a><p>At some point the infinite bob demo appeared (I couldn&#x27;t find a video for this). Seemingly endless sprites rendered on the screen - all moving, with no slowdown. As a 15 year old programmer learning to code demos in assembly I was very confused, how was it done?<p>I did eventually (after many hours spent in devpac disassembling code) work it out. They were not rendering infinite bobs, they were rendering one!<p>If you create three screen buffers. On the first screen buffer draw the bob at position (x,y), then switch to the second buffer draw at (x+delta,y+delta), then switch to the third buffer and draw at (x+delta,y+delta) and then repeat the cycle through the buffers as you move the bob.<p>If you switch between the buffers on the vsync (50&#x2F;60hz) then the difference between where you drew the bobs appears like movement. You can draw out infinitely complex patterns and make it look like you&#x27;re rendering millions of bobs!<p>Happy days.
评论 #13938394 未加载
评论 #13939811 未加载
TazeTSchnitzelabout 8 years ago
This overlooks a key detail, namely interlacing. The C64 wasn&#x27;t producing 60 frames per second, but rather 60 <i>fields</i>: sets of odd or even scanlines. So on the CRT TVs of the time, you&#x27;d get one colour on the odd scanlines, and another on the even scanlines. Scanline striping, essentially.
评论 #13936224 未加载
评论 #13936159 未加载
评论 #13936129 未加载
评论 #13936048 未加载
评论 #13936275 未加载
Lercabout 8 years ago
I once toyed with Temporal dithering on VGA ModeX.<p>While the bullet point listed resolution for standard VGA was 320x200. Hitting the hardware registers and paying the price of a rather peculiar addressing mechanism for pixels you could get a lot more(and double buffering to boot).<p>320x240 was the most common tweaked mode, because it gave you square pixels and page flipping.<p>At the edge of what momitors could handle there was a 400x300 mode which ran at 87Hz Flipping two images with this mechanism give you a 43Hz shimmer, which is amost impossible to pick on colours if the two components are similar luminance.<p>I never saw this get used for anything, but it would have made an excellent paint program for standert VGA.
评论 #13937747 未加载
评论 #13936835 未加载
grapeshotabout 8 years ago
If using composite video and a PAL TV, you can also blend colors by using alternating horizontal stripes because PAL TVs use a delay line to cancel the chroma information with the line above it. Exactly what color you got would depend on the specifics of your TV&#x27;s decoding.
评论 #13938208 未加载
lxeabout 8 years ago
This is very similar to how &quot;grayscale&quot; is achieved on a TI-83 calculator to make games like Zelda and Desolate (<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=5UHqPMxeZnY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=5UHqPMxeZnY</a>) possible.
ENTPabout 8 years ago
Off topic-ish: There was a trick you could use on the Atari ST to display more than the allowed number of colours - you reloaded the palette data on each horizontal interrupt. Could this have been used on the C64 also?
评论 #13937908 未加载
评论 #13938501 未加载
评论 #13937304 未加载
评论 #13938324 未加载
评论 #13938362 未加载
chillingeffectabout 8 years ago
Brilliant talk on using these techniques to draw hires color pix on c64. The NUFLI technique is based on combining hires mono images with color sprites underneath AND color flashing.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bKk0m-GDFdc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bKk0m-GDFdc</a>
userbinatorabout 8 years ago
Incidentally, this type of temporal dithering is how 18-bit LCDs can approximate 24-bit colour:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Frame_rate_control" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Frame_rate_control</a>
kazinatorabout 8 years ago
I remember writing a piece of machine language on a C-64 which flipped the color palette as fast as possible. It was so fast that all you saw was individual horizontal line segments of different colors within every individual raster line. (I.e. it was faster than the <i>horizontal</i> refresh rate of the CRT which is usually what, well over 10 kHz.)<p>Sheesh, when was that? Probably 1985.
评论 #13939097 未加载
drudru11about 8 years ago
This is cool, but I&#x27;ve never understood why people like the C64 palette. It looked washed out to me.<p>I guess people grow to like the look of the machines they have fond memories of. (Apple II, Coco, Sinclair)<p>The Amiga was the first machine to really impress me with its pallete.
评论 #13938221 未加载
评论 #13937884 未加载
baneabout 8 years ago
These kinds of tricks remind me a bit of how the Apple II produced color using the timing of the NTSC signal, or how Thexder tried to produce more colors <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=fBL2rtCdpZ0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=fBL2rtCdpZ0</a>, or how the demo 8088 MPH produces more colors than the CGA composite mode was intended <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=yHXx3orN35Y" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=yHXx3orN35Y</a>
andretti1977about 8 years ago
These were the &quot;magics&quot; you were able to do at that time! You could achieve amazing and unexpected results going beyond common software programming, mixing software with phisical effects for example. This was the reason the author of the article got so impressed. I don&#x27;t know what kind of todays&#x27;s unconventional programming technique can achieve such a wow effect! Side note: i was 14 too in 1991...incredible times, such as mid &#x27;80s!
dwe3000about 8 years ago
I think this type of instance maybe why the C64 has the reputation of encouraging hackers that it does. This is the perfect example to me of hacking to make something better.
评论 #13937026 未加载
dzdtabout 8 years ago
Question: the demos on the website are not smooth in my mobile chrome browser. Is it even POSSIBLE to get glitch free per display frame update in a browser? I grew up with the c64; the kind of tearing and frame-rate glitches we see on nearly every other platform since make me sad!
评论 #13939224 未加载
emersonrsantosabout 8 years ago
The page <a href="http:&#x2F;&#x2F;vik.cc&#x2F;dvik-joyrex&#x2F;download&#x2F;105Colors.ppt" rel="nofollow">http:&#x2F;&#x2F;vik.cc&#x2F;dvik-joyrex&#x2F;download&#x2F;105Colors.ppt</a> has an algorithm to convert a 24-bit RGB to interlaced 8-bit on the MSX palette.
anjcabout 8 years ago
Cool article, but the Spectrum really only had 7 colours and black. And at the time I hated the Commodore 64&#x27;s colour palate (and any non ZX Spectrum palate, until I saw the beautiful SAM Coupé&#x27;s) so I guess it&#x27;s a matter of preference.
评论 #13936425 未加载
评论 #13937547 未加载
评论 #13938112 未加载
0x0about 8 years ago
Near the bottom, I wonder if high-speed img flipping in js could be done by absolute-positioning the two images and toggling display:none&#x2F;display:block (or flip the z-index above&#x2F;below) on the upper layer on every animation frame?
评论 #13936985 未加载
评论 #13936254 未加载
renaudgabout 8 years ago
I guess it&#x27;s all about which 8-bit we have fond memories of but ... the C64 is not known for having a great palette. It looks rather dull and washed out.<p>The Amstrad CPC probably had the most vibrant palette of all of the 8-bits.<p>A C64 artist even tried to prove otherwise, but IMHO scored an own goal : <a href="http:&#x2F;&#x2F;www.indieretronews.com&#x2F;2016&#x2F;02&#x2F;is-c64-palette-far-superior-to-amstrad.html" rel="nofollow">http:&#x2F;&#x2F;www.indieretronews.com&#x2F;2016&#x2F;02&#x2F;is-c64-palette-far-sup...</a>
评论 #13939407 未加载
评论 #13939467 未加载
js8about 8 years ago
I would think answer is NO, but (why not) is there a way to synchronize painting of the picture with the vertical synchronization of the screen in modern browsers, to prevent flickering?
评论 #13938299 未加载
mb_72about 8 years ago
As an Australian user of the TRS-80 Color Computer I was always disappointed the artificating technique: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Composite_artifact_colors" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Composite_artifact_colors</a> ... didn&#x27;t work on PAL so I never got to see all the &#x27;cool&#x27; colours promised on game adverts in USA-based magazines!
sparq_beamabout 8 years ago
How did they a screenshot of the blended color in the magazine? Wouldn&#x27;t a screenshot only get one frame?
评论 #13957863 未加载
vanderZwanabout 8 years ago
I&#x27;m wondering why they went with a dragon boss that flipped from one solid color to the other - wouldn&#x27;t switching between a checkerboard pattern of the two colours have worked better?
评论 #13939124 未加载
mailslotabout 8 years ago
Reminds me of the Future Crew demo that used similar techniques to emulate &quot;thousands&quot; of colors on a 256 color display. Very unimpressive in YouTube videos. Amazing on a CRT.