[demoreview #5: pushing the limits....................]
Hacking: making with hardware "impossible" things possible

(warning: this post is [not-so] oldskool)

Kukoo2: an orgy of raster effects
The other constant push of demoscene, besides the possibility to fit as much as possible into executables of ridicolous dimensions (see the 4ks) is going beyond hardware limits, push known also as "hacking".

The "hacking" therm, more than indicating the fraudulent incursion in a bank terminal or in other informatic system (as nowadays press seems to think), means instead having some hardware and making with it something generally considered impossible on that platform or something for which that platform was not created.

The 4ks and all the production with kbyte size are certainly a form of "hacking".

"Yo!" with digital sample music
But there are episodes in the scene where the results obtained hacking the hardware are much more impressive.

For example, IBM PC has an internal speaker apparently capable of reproducing only squeaks and gurgles (you'll probably remember the first, deafening, PC games).

Well, in 1990 the legendary Future Crew release the first intro where they start to do something serious. This intro, "Yo!", plays digital music from the PC speaker. How do they do that?

It's "easy": PC speaker is linked to a power source that emits only 5V and 0V voltages. The 5V voltage brings the PC speaker cone to the maximum extension, while the 0V one brings it to rest. But, what would happen if something stopped the cone actually before reaching full 5V position? Obviously we are talking of million-th of second intervals, but thanks to this technique, the limits of PC speaker are actually surpassed, and the "internal squeaker" becomes able to reproduce digital samples.

This is Unreal.
Back in 1992, the same group, the Future Crew, brings down another barrier. The most common videocard at that time was VGA (do you remember Tseng ET3000?), whose chipset was able to display up to 256 colours.

With a technique called "copper" (from the Amiga chip with the same name) or, more commonly, "raster effect", in the "Unreal" megademo, they manage to put thousands of colours simultaneously on the screen. Is this magic? Is this real?

That's how it works: in VGA videocards, the 256 colours are stored in a sort of table called "palette", and the card reads this table when displaying something on the screen. The Future Crew coders intercept the electronic beam when it's passing from one line of the screen to another, and they change the palette actually when the beam is switching lines (and not drawing anything).
Again, the demoscene coders "stopped" time (the videocard refreshes the display at least 60 times a second, and it shows at least 200 lines in a screen. So the code that switches the palette has to run in a 10.000th of second timeframe).

That technique is not a novelty, anyway: it was used already on Amiga itself, and even on C64, when it gave the possibility to show more than the 8 sprites the hardware designers had planned, or even to do the famous "border opening" effect.

Unbelievable, but this is textmode
Sometimes, unfortunately, the hacking ideas start to lessen, since technology evolution surpasses those barriers that were introduced for cost reasons or simply because time wasn't mature yet. At that point, the democoders do a step backwards and try to put some limitations themselves. What would happen, for example, if we tried to do a demo without hi-resolution graphic modes, not even 320x200?

The textmode demos are the answer. Textmode demos don't use, as said, high resolution modes (the ones where every single pixel is addressed separately), but just stick with text modes, where the atomic graphical element is, indeed, a character. Feel limited?
Special characters multicolour plasma
Not for the democoders: using the special graphic chars of the charset and the 16 different EGA colours, they create effects that recall trustfully the ones used in high-res demos and, more than else, having to draw less "pixels", they can produce more complex effects.

Sometimes the difference between textmode and high-res effects is highly thin: in the "Textro" demo by OTM, there is a scene with wireframe solids. The OTM's coder had first to explain the algorithm (remap the charset at every frame) and then even release the source code to the effect, because noone was believing that effect was textmode!

The same trick (textmode) is used in the recent "8088 corruption" demo, just to do realtime video on a 4.77Mhz IBM PC (!).

Do you remember any other hardware tricks that made "impossible" things possible on a computer? Write them in the comments!

posted by friol at 9/10/2007 01:00:00 AM - under: , , - comments? here (11)

11 commenti:

Shazz ha detto...

This post is not so oldskool.... personally I would have prefer that the incredible hardware tricks on true machines like the C64, the ST, the Amiga... rather than on so boooooring first PC generations...

friol ha detto...

Post updated to (not so) oldskool. It's true; unfortunately my contact with demoscene starts from the PC times. How about writing Part ][ with hardware tricks on other machines?

Optimus ha detto...

I liked the post. The first PC generations are not booooring, in fact most people know few history about C64 and Amiga oldschool demos but those rare old demos before the Second Reality era I think are interesting history (who would have thought the same raster effects from Amiga/C64 would have applied in early XT/ATs? It's as oldschool as it gets :)

friol ha detto...

You say I should re-update the post to "oldskool", now?

Optimus ha detto...

Lol, no! I just disagree with the first person that it's boring and not oldschool.

Dixan ha detto...

If they were real hardware limits, it wouldn't be possible to break them. Point in the demoscene is (was) to pretend to be achieving the impossible, while in fact faking it with style.

friol ha detto...

Subtitle of the post updated to 'Hacking: making with hardware "impossible" things possible'.

blackpawn ha detto...

nice post! it's interesting to think about what sort of 'hacking' you can do nowadays with the hardware. it can be pretty hard because people's expectations are so high that they often don't even realize the limitations of the computer now.

along with textmode i think another interesting platform is flash. it's also pretty limited but takes some personal experience with it to fully appreciate what some groups have been able to pull off.

DiXan ha detto...

And Flash is a "platform" how?

Shazz ha detto...

Friol, Optimus... Ok, my comment on how boring was the first PC was I agree totally personal and 'provocateur', dedicated to show what was the oldskool feeling at those times considering the PCs. A kind of fear I presume...

Btw, an article on trick for each machine would be great... (a little dangerous in case of mistake but...).
I should be able to give you pointers at least for the ST.

blala ha detto...

kukoo2 shows very well that pretty serious "hardware" tricks are possible even on a pc... Though I have to agree that a c64, which is a fixed and deeply understood hardware, is a different thing.

the tunnel - demoscene blog - (c) friol 2k10