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.

1K colours on CGA: How it's done

227 pointsby fcambusabout 10 years ago

10 comments

dzdtabout 10 years ago
The reason it has taken the demoscene so long to pull this off is the same reason that the PC beat its competitors in the early 1980&#x27;s.<p>From the beginning the PC wasn&#x27;t defined by a single hardware implementation, but by a set of capabilities and interfaces. There were always &quot;compatible&quot; PC knockoffs and &quot;compatible&quot; extension cards that weren&#x27;t really 100% bug-for-bug compatible. That meant that software writers had to stick pretty much to the approved interfaces. There was no sense trying to push the hardware beyond the intended capabilities because even if you succeeded it probably wouldn&#x27;t work on the bulk of the machines out there with different variations of the hardware.<p>It took a long time even to see things like scrolling games on EGA cards, even though the scroll registers were designed right into the chip and documented as such. Why? Because there were no BIOS calls to implement this, and most developers took the limits of BIOS as the limits of what they could count on working. It took risky shareware developers (Carmack and Romero) to prove to everyone that really the EGA chip-level interface was a usable target.<p>So because of the prevalence of the mostly-compatible compatibles, the PC software market had another layer of abstraction built in. Software should work on any machine providing the documented capabilities and interfaces, not just on one exact hardware setup. This allowed for a cycle of compatible upgrades where software could be used across hardware generations, and hardware could upgrade with sufficient backward compatibility.<p>That upgrade cycle was missing for machines like the Commodore 64, which were defined by a single hardware implementation. For the Commodore, developers always felt free to push beyond the intended limitations of the hardware, with confidence that if it would work it would work everywhere. That fed a vibrant demoscene, but closed off any possibility of a hardware&#x2F;software upgrade cycle and eventually led to the death of the computer line.
评论 #9356224 未加载
评论 #9356427 未加载
评论 #9356430 未加载
评论 #9356152 未加载
FreakyTabout 10 years ago
It&#x27;s impressive they got this many colors out of it! I still remember the classic CGA Pink+Cyan color scheme[1]; those always seemed like a particularly garish choice for &quot;default&quot; colors.<p>[1] Example screenshot: <a href="http:&#x2F;&#x2F;s.uvlist.net&#x2F;l&#x2F;y2008&#x2F;04&#x2F;49443.jpg" rel="nofollow">http:&#x2F;&#x2F;s.uvlist.net&#x2F;l&#x2F;y2008&#x2F;04&#x2F;49443.jpg</a>
评论 #9355824 未加载
评论 #9358425 未加载
评论 #9357057 未加载
评论 #9356751 未加载
cubanoabout 10 years ago
I am utterly amazed at the amount of hard work and programming mindshare expended on, let&#x27;s face it, a very unimportant technology.<p>Bravo to you all for showing us that old-school hacking is alive and well!
评论 #9355932 未加载
jbuzbeeabout 10 years ago
Pushing those old systems to their limit (and beyond) was a lot of fun and very instructional for those of us just getting into programming. On my Atari 800, I recall using 6502 assembly to hook the horizontal and vertical blank interrupts to change the color lookup tables and character definition maps on the fly giving me the ability to greatly increase the number of colors displayed and do crude character-set animation.
userbinatorabout 10 years ago
Reminds me of this demo that uses a single microcontroller to generate a PAL composite signal, with a few tricks to increase the colours available:<p><a href="http:&#x2F;&#x2F;www.linusakesson.net&#x2F;scene&#x2F;phasor&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.linusakesson.net&#x2F;scene&#x2F;phasor&#x2F;</a>
tibbonabout 10 years ago
Strange question; why didn&#x27;t many games in this era exploit this? I&#x27;d guess that the knowledge just wasn&#x27;t as easily shared? Seems these systems were capable of pretty amazing things, but those things were frequently overlooked.
评论 #9357009 未加载
评论 #9356493 未加载
评论 #9356404 未加载
评论 #9356473 未加载
ameliusabout 10 years ago
Interesting, but it would be nice to see a picture of the resulting palette.
评论 #9359142 未加载
评论 #9386496 未加载
humanarityabout 10 years ago
The writer of this piece is a genius. Amazing hackery.
menesesabout 10 years ago
Reminded me of the Doom&#x2F;Keen days
gcb0about 10 years ago
two pictures of waveforms would be much better than text here ...
评论 #9360085 未加载
评论 #9386497 未加载