QALEIDOSCOPE - for Sinclair QL by Jim Waterman, 2-3 November 2001
=================================================================

This is adapted from a program originally written for the ZX81 by Matthew Calveley, and published in the January/February 1983 issue of Sinclair Programs.

Originally I'd rewritten it for the Spectrum using PLOT and DRAW to make the 4×4 pixel squares that would simulate the low-resolution graphics of the ZX81, before further using it as an exercise to see if I could do the same with machine code.

The QL version was always going to be written in SuperBASIC, and was more of an exercise in seeing if I finally understood the BLOCK command. Once I'd been told it used the pixel grid rather than conforming to the scale set by the SCALE command, it was an easy job - and I could take advantage of the eight-colour palette as the 8×6 size of the BLOCKs drawn on screen (which makes them approximately square on QemuLator and simulates the size of the ZX81 pixels) meant that MODE 8 was available. The WINDOW size has to have a height divisible by 6, so there's a very slight letterbox effect at the top and bottom of the screen, on an emulator at least - it would most likely be invisible on a real QL with a monitor or a TV screen.


COLOUR SET                          BACKGROUND   "PIXEL" COLOURS
---------------------------------   ----------   ---------------
0: Black on white (original ZX81)   white        black
1: White on black (inverse ZX81)    black        white
2: QL MODE 8                        black        blue,red,magenta,green,cyan,yellow,white
3: QL MODE 4                        black        red,green,white
4: ZX Spectrum logo                 black        red,green,yellow,cyan
5: Special Relationship             black        blue,red,white
6: Four-colour Bic biro             white        black,blue,red,green
7: Dragon 32, PMODE 1, SCREEN 1,0   green        blue,red,yellow
8: Custom colours                   any of the eight available
9: Random mix of 0-7                see above!

