SUPERCOLOUR from Your Sinclair #6 (Jun.1986) Are you feeling drab, boring and colourless? Do attribute problems get you down and affect your relations with the opposite sex? Does working with a limited colour palette leave a nasty taste in your mouth? Well, cheer up, 'cos Simon Crampin's routine will blast your retinas off. One of the most annoying things about our beloved Spectrum is its inability to display more than two colours on any one character square This isn't much of a problem when you're displaying text, but when you want to draw hi-res graphics you have to plan everything very carefully indeed to avoid the attributes (colours) bleeding out into the adjacent squares. Help is at hand. With this amazing SuperColour program you can not only put more than one colour on one character square, but up to eight colours on each row of the character! And if that's not enough for you (demanding aren't you?) you can even make the attributes scroll and flash, have them BRIGHT or normal, as you wish. But how's this possible? It's just a little machine code routine ... Well, it's not so much of a little routine, more of a mega-enhancement to your Spectrum's facilities. The program allows you to design a 4 x 8 graphic and fill it with colour. The graphic can then be used in your own programs called from Basic, or if space allows, from machine code. You can design your own logo and have it flashing and pulsing on your title screen. You can highlight the top score in your high score table. You can even make a spectacular endgame effect, or incorporate it into the game itself. Then you can save your graphic and a chunk of code to operate it and voila! Instant rainbows! Interested? BETTER BY DESIGN The program takes the form of a very clever chunk of machine code that controls the attributes in your 4 x 8 graphic. Also included is a designer program that lets you set or erase any pixel in the 4 x 8 rectangle, using a cursor on an easy to see magnified grid. The grid is a blown up section of one piece of the graphic and you can move the grid window over it to examine every corner. To get you started we've done our own logo justice in a demo graphic for you to load in. You begin by building up your basic graphic in black and white, setting individual pixels into the shape you want. Use the view picture option to see your whole graphic actual size. That way you can keep track of your progress. Next add a splash of colour. SuperColour, even. You can now set the attributes to any INK and PAPER colours, and even have alternating rows of BRIGHT and FLASH. That is, if you enjoy migraine headaches! -- Keep this by you when you use the program - it's your instruction manual. Everything you need to know to use SuperColour in your own programs, in an all-in-one easy-to-swallow capsule! STARTING UP After the program's loaded, it'll prompt you with "Fresh Start?" Answer 'y' to this and all the data in the designer program will be wiped and you can begin on an empty grid. If you've already made and saved a graphic from a previous session, answer 'n' to this prompt and the program will automatically load your graphic from tape. Having loaded your graphic, you'll then be shown your workspace. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FUNCTION KEYS Key Effect - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 cursor left 6 cursor down 7 cursor up 8 cursor right 1 move grid left 8 pixels 2 move grid down 1 pixel 3 move grid up 1 pixel 4 move grid right 8 pixels S set or draw pixel at cursor R reset or erase pixel at cursor A enter attributes: INK, PAPER, BRIGHT and FLASH K clear all pixel data to the last values input using the 'A' function H display your graphic actual size and colour ENTER return to Basic and Save menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - When you select the return to Basic/Save option, you're given two options. The first is to save your graphic to tape, and this is usually the best to go for; if anything goes wrong you're not going to like the idea of starting from scratch. The second option brings us to the most important part of the program. This enables you to save the code that controls your graphic. When you use the graphic in your own programs, you save this controller code too, and then POKE and RANDOMIZE USR different addresses to position and turn on the graphic. This code is saved by the program as "CGWC" which stands for Colour Generator Working Copy, so you'll have a pretty good idea of what it does - it's saved at address 64496 and it's 671 bytes long. To position your graphic on the screen, POKE the following addresses with the appropriate values, taking row 0, column 0 to be the top left corner of the screen. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALUE ADDED TABLE Function Address Value - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Row at which display is required 65030 8*row Column (move) 65053 0-24 Row (move) 65056 0-18 Column (print) 65118 0-24 Row (print) 65117 0-18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Note:The Addresses of Column (print) and Row (print) were transposed when published in Your Sinclair. These have been corrected in the table above. Turn Graphic On To activate your graphic once you've positioned it, simply RANDOMIZE USR 65116. (Or if you want to activate it but not show, use RANDOMIZE USR 65151.) Turn Graphic Off To switch your graphic off, RANDOMIZE USR 65020. This is easier and kinder than saying, "Gee graphic, you're really unattractive!" Two Or More If you've got more than one graphic, you'll have to store them in different locations from the ones used by SuperColour's designer. Here are the POKES you'll need: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Start byte of your pixel data 65120 low 65121 high Start of your attribute data 65065 low 65066 high - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You can now use many different graphics and call them up from Basic or machine code as you need them. After all, even the most dazzling graphic gets a bit tiresome if you see it all the time. -- Another Fine Product transcribed by: Jim Grimwood (jg27paw4@globalnet.co.uk), Weardale, England --