Would you say that if I write a colour cycling program and run it in dosbox, it isn't real colour cycling because it is being emulated?
Given that dosbox is an "emulator" (says so right there in the man page!), yes. You expected a different answer? Dosbox doesn't support "true" palette animation either (well, unless you give it access to the real VGA registers of real hardware, which can be done in some emulators).
The point was that the programming technique required to make this work is not the same as the one used on palette hardware, so calling it the "true" effect is going to be confusing to people who don't know exactly how this works.
An HTML canvas has no palette.
This one does. You can see it in the lower right.
I just tried this on my phone -- where it works -- that has no color palette hardware at all.
This is HTML. It's a software palette.
Re:True 8-bit Color Cycling with HTML5
by TazeTSchnitzel on Wednesday April 25, 2012 @05:22PM
(#3891173)
No, he's right, an HTML canvas has no palette. It's a software emulation in JavaScript.
How does that even matter? The technique being used is real color cycling. Whether the palette is abstracted in hardware or software hardly makes a difference...
The point was narrower: If you don't already know how this works, calling it "true" pallet animation is terribly confusing (imagine someone looking through specs for where the pallet API for the canvas is). If the title was "8bit-style Color Cycling in HTML" I never would have posted.
Re:True 8-bit Color Cycling with HTML5
by henrikschroder on Thursday April 26, 2012 @03:19AM
(#3892853)
And to nit-pick even further: These images resemble the graphics of the Amiga and Atari home systems, which were 16-bit systems. To do this on a PC you would need XGA graphics (VGA couldn't do 640x480x256) which arrived at the PC around the time of the 386 processor, which was 32-bit. I think you could probably attach a XGA card to a 286 PC, but that was still 16-bit. I don't think anyone ever paired a XGA card with an 8088 PC, which actually was an 8-bit system.
So, this isn't even 8-bit art, it's more likely 32-bit art. :-)
Re:True 8-bit Color Cycling with HTML5
by kronusaturn on Thursday April 26, 2012 @04:55AM
(#3893018)
It's 8-bit color; 8 bits per pixel for 256 colors. Nothing to do with the CPU.
Look at your CPU usage while viewing this page. The idea behind the original palette rotation tricks was to use less CPU. The actual palette values were deep inside the graphics adapter and was faster to change than the actual pixels on the screen.
Maybe we should do palette rotation tricks with (WebGL) shaders running on the GPU h/w to get a similar effect without the CPU hit.
An HTML canvas has no palette. And in fact, for didactic emphasis, I just tried this on my phone -- where it works -- that has no color palette hardware at all. This code can only do what it does by doing what the original did not: modifying all the changed pixels every frame. It's emulating the original hack, not duplicating it.