Wednesday, November 08, 2006

Dancing baby on a ZX-81


Yes! They made it. Or should I say they coded it: the famous dancing baby animation on a 16 KB Sinclair ZX81 or Timex-Sinclair 1000 (you decide). The animation can be seen on the first page of this nice site : www.ts1000.us. The music choice is excellent too (though not played by the real machine). Have a look!

3 comments:

Anonymous said...

Wow, I'd plumb forgot about that thing 'til it crossed my mind again today. I'm the guy responsible for it, and it's a shame to see ts1000.us is down now. The forums were a pretty good resource for the, oh, four people still noodling with those old door-stop computers.

Like a lot of frivolous stuff it didn't start out as "I think I'm gonna animate the dancing baby on this thing". It started because I was toying around with an emulator and recalled a little trick I'd discovered while hacking on a TS1000 as a kid. The ZX81/TS1000's display routine uses one of the CPU's registers to point to the location of the character-set bitmap in ROM. You can't change it to point to RAM and make a custom character set without hardware modifications but you can point it to other ROM locations resulting in "garbage characters" on the screen.

I thought it might be a neat experiment to take a comparitively "high-res" image and try to match the pixels as best as possible with what was available in the usable ROM locations... a noisy, poor-man's hi-res. I wrote a rough but functional Visual Basic 6 program to do the image comparison/rendering and it would spit out the data needed for display on the TS1000. From there it was just a little Z80 machine code to display the frame data (and later, some very basic run-length encoding/decoding to shrink the data given the memory limitations).

Once a few single frames came out looking fairly decent it was only logical to put a few frames together for a short animation and try the same technique using the stock graphics character set. I'd seen the results of another guy's animation rendering scheme, a nicely done translation of an iPod commercial into all its blocky, TS1000 glory. Seeing how many frames he was able to squeeze into 16k got me thinking about how to tackle the problem myself. Though independently done, it seriously inspired me so this guy is at least half to blame: http://www.tedfoolery.com/timex/

It seemed such an obvious choice for an animation source that I was a little surprised it hadn't been done before (apparently the number of monkeys with typewriters is still finite). I've seen more complex TS1000 demos done with a lot more technical trickery, but this one seemed to catch a few peoples' fancy 'cause, hey... Dancing Baby! Making it was a fun little trip through hacking nostalgia.

Anonymous said...

I have a question... I try to access to this page, but always have the same "You do not have permission to access the requested file on this server" message.

Does it have any restriction from my country? I'm from Poland

Unknown said...

The site is down for good, unfortunately. I do still have all the code and the .p files sitting around for anyone actually interested in it.