6 ms·
1K colours on CGA: How it's done
- FreakyT 12y agoIt'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 "default" colors. [1] Example screenshot: http://s.uvlist.net/l/y2008/04/49443.jpg http://s.uvlist.net/l/y2008/04/49443.jpg
- tptacek 12y agoI just got a tattoo done in CGA magenta/cyan/green (a composite frame from Sierra's Black Cauldron). This turns my whole world, or at least arm, upside down!
- fapjacks 12y agoVery cool! Got a link to a pic? I also have some oldschool "pixelated" tattoos, though in greyscale only.
- agumonkey 12y agoFeels like old comics printed in cheap magazines. Black, white and two tones. I kinda like it.
- bitwize 12y agoMicrosoft deployed a black, white, cyan, and magenta color scheme for marketing its Surface back in 2012-2013. I boggled at the logic as to this -- were they somehow trying to evoke nostalgia for pukey CGA displays? Because we don't really remember those fondly...
- throwawaymylife 12y ago"Neo 80s" has been a popular aesthetic for the past few years, so I wouldn't fault Microsoft too much for using bright neon colors.
- jkoudys 12y agoThis had as much to do with the quality of the displays as it did with the adapter. White, black, cyan and magenta all have significant contrast between them, and many machines with CGA were still hooked up to B&W and greenscreen monitors. If you'd designed your graphics around Mode 0 (the yellow, green, red, black one), it would look really terrible on a greenscreen. Even full colour displays (often TVs) would look miserable in the other colour modes, as they'd bleed much more than displays do now. The white/cyan/magenta/black was also really easy to build as a secondary palette for 16-colour EGA games. I remember a lot of the Sierra adventure games at the time offered a CGA mode, and while it never looked nearly as good as the EGA mode, it was at least playable.
- cubano 12y agoI am utterly amazed at the amount of hard work and programming mindshare expended on, let's face it, a very unimportant technology. Bravo to you all for showing us that old-school hacking is alive and well!
- listic 12y agoWhat's boggles my mind is the fact that it took the enthusiasts up until now to uncover the potential of the platform, as compared to, say early 1980's when people were paid to produce entertainment software for the IBM PC. Makes one wonder what kinds of fantastic things we might achieve with todays' technology, but probably never will, moving on to build tomorrow's technology instead.
- Zikes 12y agoIIRC there was a post by Steve Wozniak here a few months ago where he stated he still occasionally gets ideas for how he could have improved the code for the original Apple computers. Edit: Found one article that quotes Woz on that: http://www.cultofmac.com/302087/38-years-later-woz-still-thinks-ways-improve-apple-ii/ http://www.cultofmac.com/302087/38-years-later-woz-still-thi...
- dzdt 12y agoThe 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's. From the beginning the PC wasn't defined by a single hardware implementation, but by a set of capabilities and interfaces. There were always "compatible" PC knockoffs and "compatible" extension cards that weren'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't work on the bulk of the machines out there with different variations of the hardware. 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. 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. 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/software upgrade cycle and eventually led to the death of the computer line.
- lukasb 12y agothanks for this, fascinating
- ChuckMcM 12y agoHence the quote "there is MS DOS compatible, PC DOS compatible, and FlightSimulator Compatibe, in increasing orders of difficulty." Later 'Jet' provided some test indication as well. I was always amazed because CP/M machines were all different sort of by design, it was the sheer quantity of the original 5150 PC that made it worth specializing for that target. I later owned an Epson QX-10 with an "MS-DOS" card. And simply MS-DOS compatible ran hardly any software at all!
- jbuzbee 12y agoPushing 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.
- tibbon 12y agoStrange question; why didn't many games in this era exploit this? I'd guess that the knowledge just wasn't as easily shared? Seems these systems were capable of pretty amazing things, but those things were frequently overlooked.
- sounds 12y agoI think if you asked most game makers of that time, they would simply say, "You're crazy. You're planning to exploit the exact CGA chips and the exact mux and the exact nature of the monitor's response to the horizontal porch. The failure mode is that the whole screen goes wavy and maybe lets out a puff of smoke and dies. You're crazy!" But also, the reality is that the demoscene didn't even figure any of this out until 2013-ish.
- sehugg 12y agoSome did use the 160x100x16 graphics mode (using some of the same techniques in the OP) but one drawback is that they didn't always look 100% correct on clones, and some eventually broke when VGA cards came out. http://nerdlypleasures.blogspot.com/2014/09/cga-16-color-rgb-graphics-modes.html http://nerdlypleasures.blogspot.com/2014/09/cga-16-color-rgb...
- cardiffspaceman 12y agoMy Columbia MPC clone didn't have the right character shape in the text-mode character rom, but I used the method for preview images of ray tracing code I experimented with in the '80's.
- jerf 12y agoIf I'm reading correctly between the lines, they are pouring a ton of CPU into this effect. I wouldn't be surprised if you told me what we saw in the demo is literally almost all this effect can do, and there's not a lot of power left over for actually running a game. Same thing for all the things you see Commodore 64 demos do... by the time you're creating the awesome graphical effect there's often not a lot left over for the game itself. (Though there are some interesting exceptions... there appear to be some surprisingly high-quality side-scrolling platformers now based on "bad lines", which are both explained and then the platformers shown at https://www.youtube.com/watch?feature=player_detailpage&v=fe1-VVXIEh4#t=2900 https://www.youtube.com/watch?feature=player_detailpage&v=fe... . Though the entire presentation is fascinating and shows a few other demoscene effects in real programs.)
- userbinator 12y agoReminds me of this demo that uses a single microcontroller to generate a PAL composite signal, with a few tricks to increase the colours available: http://www.linusakesson.net/scene/phasor/ http://www.linusakesson.net/scene/phasor/
- humanarity 12y agoThe writer of this piece is a genius. Amazing hackery.
- amelius 12y agoInteresting, but it would be nice to see a picture of the resulting palette.
- ajenner 12y agoHere you go: http://www.reenigne.org/misc/cga_1k_colours.png http://www.reenigne.org/misc/cga_1k_colours.png
- ajenner 12y agoThere's now a (less technical but prettier and easier to understand) writeup at http://8088mph.blogspot.co.uk/2015/04/cga-in-1024-colors-new-mode-illustrated.html http://8088mph.blogspot.co.uk/2015/04/cga-in-1024-colors-new... .
- meneses 12y agoReminded me of the Doom/Keen days
- gcb0 12y agotwo pictures of waveforms would be much better than text here ...
- ajenner 12y agoI wanted to make some pictures to go with the article, but I didn't have time (I wanted to get the article out quickly as there was so much curiosity and speculation about the methods we used). I just tried adding a quick hack to cga2ntsc to output the waveforms and viewed them in an audio package, but the result wasn't terribly elucidating. Perhaps I will redo the article with more pictures at a later date.
- ajenner 12y agoThere's now a (less technical but prettier and easier to understand) writeup at http://8088mph.blogspot.co.uk/2015/04/cga-in-1024-colors-new-mode-illustrated.html http://8088mph.blogspot.co.uk/2015/04/cga-in-1024-colors-new... .