--- title: "Pablo Pixel-O" type: "article" slug: "pablo-pixel-o" url: "http://localhost/article/pablo-pixel-o/" markdown_url: "http://localhost/article/pablo-pixel-o.md" published_at: "2021-08-24T01:26:47+00:00" modified_at: "2026-06-21T23:21:07+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "I have thoroughly enjoyed my ZX-81 for years. I have added a full-size keyboard, 64k of memory and the Timex/ Sinclair 2040 Printer. I've always lamented the lack of high-resolution graphics, but have never felt compelled to invest the extra money for the needed hardware or s/w. The following program will allow you to use…" category: - name: "Time Designs Magazine" slug: "time-designs" taxonomy: "category" url: "http://localhost/category/periodicals/time-designs/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Michael Carver" slug: "michael-carver" taxonomy: "indiv" url: "http://localhost/indiv/michael-carver/" publication_r: id: 10277 title: "Time Designs Magazine" type: "periodical" url: "http://localhost/periodical/time-designs-magazine/" authors: "Michael Carver" volume: "1" issue: "6" issues_articles: - id: 37623 title: "Time Designs Magazine v1 n6" type: "issue" url: "http://localhost/issue/time-designs-magazine-v1-n6/" pages: "6-12" pubdate: "September/October 1985" archive_link: false article_media: - id: 55861 title: "Pablo Pixelo" type: "computer_media" url: "http://localhost/computer_media/pablo-pixelo/" --- # Pablo Pixel-O I have thoroughly enjoyed my ZX-81 for years. I have added a full-size keyboard, 64k of memory and the Timex/ Sinclair 2040 Printer. I’ve always lamented the lack of high-resolution graphics, but have never felt compelled to invest the extra money for the needed hardware or s/w. The following program will allow you to use your ZX-81/TS 1000/1500 and either the Sinclair or Timex Printer to create high-resolution graphics (see examples 1-4). Goodbye “blocky” pictures! The characters of the ZX-81 are generated using an eight by eight grid. Each line of this grid is stored as a binary number in the ROM (addresses 1E00h to 1EE7h). IF you were to PEEK the eight addresses for the letter “0” in the ROM, you would find the decimal/binary code in Fig. 1. For each “1” in the binary code, a pixel is set on the screen, producing the pattern “0”. Due to the design of the ZX-81, only codes stored in the actual ROM can be generated onto the screen without the use of extensive machine code programming. By using the routines contained in lines 500-570 and 1000-1090 of listing 1, and a lifted version of the LLIST subroutine from the ROM, any eight by eight character can be generated via your printer. ### USING PABLO PIXEL-O The program is designed for you to draw a picture and create individual characters to produce a high-res copy of it. Graph paper which is ruled in eight by eight grids will help you map out your characters. Draw or trace your picture onto the graph paper. Next, darken each square (pixel) which is a line or solid/shaded element of your picture. (NOTE: if your picture does not contain an empty 8×8 grid, you may wish to define extra “space” character to help you in formatting later on.) Total up the number of different characters (8×8 pixel grid) you will need to compose your picture. Now count up the number of characters in each line (a max. of 32) and the number of character lines in your picture. You may wish to design your picture sideways and create a long panorama, but it can only be 32 characters high. You are now ready to LOAD the program and begin creating your own characters. Before LOADing, you will need to lower RAMTOP by entering “POKE 16389, 124”, then followed by “NEW”. ### DEFINING CHARACTERS When the menu appears, choose option 1– “Define Characters” (see fig. 2). This will set up a blank array in which to store your data. Answer the prompt with the total you calculated earlier. You may wish to enter a total slightly higher than the amount of characters you wish to define, allowing for any errors or additions. When prompted, enter each line of the 8×8 grid as a space or an inverted space (GRAPHICS/SPACE…see fig. 3). When this character is produced by the printer, a pixel will be set (black) for each inverted space and unset (blank) for each space. If, after entering all eight lines, you are not satisfied, answer “NO” to the prompt and you will have the option of starting over for that character or changing individual lines. (Keep track of the order in which you define your characters as they are coded and stored in this order. Character code “1” is for the first character defined, code “2” the second defined, ect.) After you have completed your character definition, the screen will go blank for a few seconds while the computer analyzes and stores the data. If you would like to return to the menu during definitions, enter “M” as the first space in any line. This will allow you to check your progress or save your data. NOTE: To continue definitions, choose option 2 “Continue Definitions”, as option 1 will clear all data from memory! ### SEEING IS BELIEVING You can review a portion of your work with “Big- Bits”–option 8. This option will display up to eight enlarged characters across and six down, using the standard Sinclair graphics. (See example 5) When prompted to enter code numbers, enter the number for the character you wish displayed (remember, character 1 is the first character defined, 2 is the second, ect.). After entering the codes the screen will go blank while the computer stores this “notepad” information on a “notepad”. You will then see an enlarged version of the characters in the order you specified. pressing “M”, you can return to the menu, “2” will make a copy of your enlarged characters on the printer. NOTE: The program uses part of the machine code stored in REM to set up the CoPY routine in ROM, copying as many lines as are needed. ### HARD EVIDENCE To print a copy of your picture in high-resolution, choose option 3– “Picture Coding” . Follow the prompts, by inputting the totals you calculated for the width and height of your picture. You will again be asked to enter codes for the newly defined characters in the order to be printed. After entering all of the character codes, you will be returned to the menu. If you only wish to print out a portion of your picture, entering “0” for a character code wiil return you to the menu. you may return to coding the picture by choosing option 7–“Continue Picture Coding” ‘. Option 4–“Print Out Picture” will produce a high-resolution picture via the printer. The monitor screen will go blank for a few seconds while the computer transfers data to a notepad, after which it will print out one line of your picture. This pattern will continue until all of the picture has been printed. After After you have finished “coding” your picture, a copy can be obtained at anytime by going directly to option 4. ### HOW DID THAT GET THERE? If you would like to correct or redefine a character, option 6 will allow you to redefine any character you designate. Redefine a character by following the steps for defining, line by line. ### PRESERVING THAT MASTERPIECE Option 5 will save the program and any data already entered. NOTE: if you break the program, do not RUN, as this will erase all of the data entered. Continue by entering GOTO 600, putting you into the menu. When you reload the program, the menu will appear and you may continue from there. ### ENTERING THE PROGRAM – TS1000 version Before entering listing 1, lower RAMTOP by entering POKE 16389, 124 and NEW. Line 1 should contain 113 characters after REM. When you have finished typing in the program, it is prudent to save it to tape before RUNing the program. After you have made a back-up copy, enter FAST mode and enter GOTO 9000. This will load the machine code into the REM statement. This subroutine will check for most typing errors while entering the machine code contained in A$. After the code has been transferred to the REM statement, you may delete lines 9010-9170. To save this completed version to tape, set-up your recorder to record and start the tape, enter as direct commands, CLEAR and GOTO 3000. Remember, you will have to lower RAMTOP by POKEing 16389 with 124 before loading this program into the computer. Listing 2 is a disassembled version of the machine code for the 1000 version. Addresses 16514-16529 contain the table holding the different graphic characters used by Big-Bits. The routine starting at 16530, looks at two lines of each character. It first looks at the first two bits in each line and calculates a matching character from the graphics character table, printing this graphic symbol. Then it moves on to the next two bits of each line, calculating and printing until all bits have been translated. This procedure is repeated until all eight lines of the character has been printed and then moves on to the next character. The routine at 16621 copies the screen to the printer. Register D is loaded with the number of screen lines to be copied. The routine then jumps into the ROM’s copy routine. ## Source Code: Pablo Pixelo ``` 1 REM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 5 REM THIS PROGRAM BY Michael E. Carver taken from Time Designs magazine for Sept/Oct '85 6 REM Entered for LIST by John Leary 10/85 7 REM Debugging: I added line 126 and made a correction to line 670. The MC routine in Big Bits crashes. Good luck! J.Leary 10 LET l=0: LET h=0 60 GO TO 600 100 CLS 105 PRINT AT 2,0;"Do you wish to set up a blank file?" 110 INPUT a$ 115 IF CODE a$<>89 AND CODE a$<>121 THEN GO TO 600 120 PRINT AT 2,0;"How many characters do you wish to define?" 125 INPUT c: POKE 23728,c-INT (c/256)*256: POKE 23729,c/256: CLEAR 65367-(8*c)-384: LET c=PEEK 23728+256*PEEK 23729 126 LET l=0: LET h=0 130 DIM i$(8,8): DIM b$(8,8): LET h=1: LET ed=0: DIM a$(10) 135 DIM d$(32): LET hc=0: LET op=0 145 LET ch=65367-8*c-384 200 FOR f=1 TO c 202 PAPER 7: INK 0: BORDER 7: CLS : DIM i$(8,8) 205 PRINT AT 0,0;"Plot out character ";(f AND NOT ed)+(h AND ed) 210 PRINT AT 20,0;d$;d$;AT 5,6;"1";AT 21,1;"12345678";AT 4,7;" 12345678" 215 FOR a=1 TO 8 220 POKE 23617,2: INPUT i$(a,1 TO 8) 225 FOR b=1 TO 8 227 PRINT AT 20,0;d$;" 12345678" 230 IF i$(a,1)="m" OR i$(a,1)="M" OR CODE i$(a,1)=156 THEN GO TO 600 235 IF i$(a,b)=CHR$ 128 OR i$(a,b)=CHR$ 143 OR i$(a,b)=CHR$ 32 THEN GO TO 250 240 PRINT AT a+4,7;"RE-ENTER" 245 GO TO 220 250 NEXT b 255 PRINT AT a+4,7;i$(a,1 TO 8);: IF a<8 THEN PRINT TAB 6;a+1 260 NEXT a 265 PRINT AT 20,0;d$;d$;AT 20,0;"Are you satisfied?" 270 POKE 23617,0: INPUT a$ 275 IF CODE a$<>89 AND CODE a$<>121 THEN GO TO 335 280 FOR a=1 TO 8 290 FOR b=1 TO 8 295 LET b$(a,b)=("1" AND i$(a,b)=CHR$ 143)+("0" AND (i$(a,b)=CHR$ 128 OR i$(a,b)=CHR$ 32)) 300 NEXT b 305 NEXT a 310 FOR p=1 TO 8 315 POKE ch+((f-1 AND NOT ed)+(h-1 AND ed))*8+(p-1),VAL (CHR$ 196+b$(p,1 TO 8)) 320 NEXT p 322 IF ed THEN GO TO 600 325 NEXT f 330 GO TO 600 335 PRINT AT 20,0;d$;d$;AT 20,0;"Do you wish to change individuallines?" 340 INPUT a$ 345 IF CODE a$<>89 AND CODE a$<>121 THEN GO TO 202 350 PRINT AT 20,0;d$;d$;AT 20,0;"What line do you wish to change?" 355 INPUT a 360 PRINT AT 20,0;d$;d$;AT 20,0;"working on line ";a;AT 21,0;" 12345678" 365 POKE 23617,2: INPUT i$(a,1 TO 8) 370 PRINT AT a+4,7;i$(a,1 TO 8) 375 GO TO 265 400 LET re=0: LET op=0: CLS : INPUT "How many characters across will your picture be?";w: IF w>32 THEN GO TO 400 405 INPUT "How many lines will be in your picture?";l 410 INPUT "Do you wish to input paper and ink for each character?"; LINE z$: IF CODE z$=CODE "y" OR CODE z$=CODE "Y" THEN LET op=1 415 LET re=1: DIM p(1,w): IF op THEN DIM a(2,1,w) 420 CLS : PRINT AT 2,0;"Enter code numbers for new","character set in the order you wish them to be displayed": IF z$="7" AND re THEN GO TO 435 425 FOR q=1 TO l 430 FOR r=1 TO w 435 IF q>1 AND r>w THEN GO TO 600 440 PRINT AT 19,0;d$;d$;AT 20,0;"Line ";q;" / Space ";r: INPUT p(q,r) 445 IF p(q,r)>=0 AND p(q,r)<=c THEN GO TO 465 455 PRINT AT 19,0;"Invalid input, re-enter!" 460 GO TO 440 465 IF op THEN INPUT "Paper? #";a(1,q,r): IF a(1,q,r)>9 OR a(1,q,r)<0 THEN GO TO 465 470 IF op THEN INPUT "Ink? #";a(2,q,r): IF a(2,q,r)>9 OR a(2,q,r)<0 THEN GO TO 470 472 IF p(q,r)=0 THEN GO TO 600 475 NEXT r: NEXT q 480 INPUT "Paper color? #";pa: IF pa>9 OR pa<0 THEN GO TO 480 485 INPUT "Border color? #";bo: IF bo>7 OR bo<0 THEN GO TO 485 490 INPUT "Ink color? #";in: IF in>7 OR in<0 THEN GO TO 490 500 BORDER bo: PAPER pa: INK in: CLS 510 INPUT "Do you wish a hardcopy? "; LINE z$: IF CODE z$=CODE "y" OR CODE z$=CODE "Y" THEN LET hc=1 520 FOR a=1 TO l: FOR b=1 TO w 525 LET c1=ch+(p(a,b)-1)*8: POKE 23606,c1-INT (c1/256)*256: POKE 23607,INT (c1/256)-1 530 IF PEEK 23689<3 THEN POKE 23606,0: POKE 23607,60 535 IF op THEN PRINT PAPER a(1,a,b); INK a(2,a,b);CHR$ 32; 540 IF NOT op THEN PRINT CHR$ 32;: IF hc THEN LPRINT CHR$ 32; 542 IF NOT op AND PEEK 23689<4 THEN PRINT CHR$ 8;: POKE 23606,c1-INT (c1/256)*256: POKE 23607,INT (c1/256)-1: PRINT CHR$ 32 543 IF op AND PEEK 23689<4 THEN PRINT CHR$ 8;: POKE 23606,c1-INT (c1/256)*256: POKE 23607,INT (c1/256)-1: PRINT PAPER a(1,a,b); INK a(2,a,b);CHR$ 32; 545 NEXT b: PRINT 550 IF hc THEN LPRINT 555 NEXT a 560 POKE 23606,0: POKE 23607,60: POKE 23692,23 565 PRINT #1;"Z=COPY M=MENU S=SCREEN$ SAVE" 570 IF INKEY$<>"" THEN GO TO 560 575 IF INKEY$="s" OR INKEY$="S" THEN GO TO 1000 580 IF INKEY$="z" OR INKEY$="Z" THEN COPY 585 IF INKEY$<>"m" OR INKEY$<>"M" THEN GO TO 575 590 LET hc=0 600 BORDER 1: PAPER 1: INK 9: CLS : LET ed=0 605 POKE 23617,0 610 PRINT AT 2,0; BRIGHT 1;"**** PABLO PIXEL-O ****" 620 PRINT AT 4,4;"DEFINE CHARACTERS.......1";AT 6,4;"CONTINUE DEFINITIONS....2";AT 8,4;"PICTURE CODING..........3";AT 10,4;"PRINT OUT PICTURE.......4";AT 12,4;"SAVE....................5";AT 14,4;"RE-DEFINE CHARACTER.....6";AT 16,4;"CONTINUE PICTURE CODING.7";AT 18,4;"BIG-BITS................8" 630 PRINT BRIGHT 1;AT 20,5;"ENTER ONE OF THE ABOVE" 650 INPUT LINE Z$ 660 IF CODE Z$<49 OR CODE Z$>56 THEN GO TO 650 670 GO TO 650-(550 AND z$="1")-(450 AND z$="2")-(250 AND z$="3")-(150 AND z$="4")+(380 AND z$="5")+(50 AND z$="6")-(230 AND z$="7")-(20 AND (z$="7" AND l=0))+(150 AND z$="8") 700 LET ed=1 710 CLS 720 PRINT AT 2,0;"Which character do you wish to re-define? (enter #)" 730 INPUT h 740 GO TO 202 800 CLS : DIM b(6,8) 805 INPUT "How many lines? (6 max.) ";j 810 IF j<1 OR j>6 THEN GO TO 810 815 INPUT "How many across? (8 max.) ";k 820 IF k<1 OR k>8 THEN GO TO 820 830 PRINT AT 2,0;"Enter code numbers in the order you wish them displayed." 835 FOR a=1 TO j 840 FOR b=1 TO k 845 PRINT AT 19,0;d$;d$;AT 20,0;"Line ";a;" / Space ";b 850 INPUT b(a,b) 855 IF b(a,b)>=1 AND b(a,b)<=c THEN GO TO 870 860 PRINT FLASH 1;AT 19,0;"Invalid input. Re-enter." 865 GO TO 850 870 NEXT b 875 NEXT a 900 PAPER 7: BORDER 7: INK 0: CLS : PRINT #1;"Note pad is being loaded. Z=COPY M=MENU" 902 LET no=64983: POKE 23659,0 905 FOR a=1 TO 6: FOR b=0 TO 7 STEP 2: FOR d=1 TO 8: LET c2=ch+(b(a,d)-1)*8 910 IF NOT b(a,d) THEN POKE no,0 915 IF b(a,d) THEN POKE no,PEEK (c1+b) 920 IF NOT b(a,d) THEN POKE no+1,0 925 IF b(a,d) THEN POKE no+1,PEEK (c1+b+1) 930 LET no=no+2 960 NEXT d: NEXT b: NEXT a 965 PRINT AT 0,0;: RANDOMIZE USR 26731 970 POKE 23659,2: POKE 26773,j*32 980 IF INKEY$<>"" THEN GO TO 980 985 IF INKEY$="z" OR INKEY$="Z" THEN RANDOMIZE USR 26771 990 IF INKEY$<>"m" AND INKEY$<>"M" THEN GO TO 985 995 GO TO 600 1000 REM save screen$ 1010 INPUT "Picture title: ";a$ 1020 SAVE a$SCREEN$ : GO TO 600 1030 CLS : PRINT AT 10,0; FLASH 1;"please note that you will have to enter CLEAR ";PEEK 23730+256*PEEK 23731;" before loading this program after saving! " 1035 INPUT "What is the title? ";a$ 1040 SAVE a$ LINE 2000 1045 SAVE a$CODE ch,c*8 1050 GO TO 600 2000 LOAD a$CODE 2010 GO TO 600 9000 LET ad=26715 9100 LET a$="8084888c8185898d82868a8e83878b8f21d7fd06c0c5060456235e23e5afcb1217cb1217cb1317cb1317215b68856f7ed710eae1c110dec9f306c0cd050ac9" 9105 IF LEN a$<>126 THEN PRINT "Error in a$ please correct.": STOP 9110 FOR x=1 TO LEN a$-1 STEP 2 9115 POKE ad+INT ((x-1)/2),(CODE a$(x)-(48 AND CODE a$(x)<58)-(55 AND CODE a$(x)>64))*16+CODE a$(x+1)-(48 AND CODE a$(x+1)<58)-(55 AND CODE a$(x+1)>64) 9120 NEXT x 9125 LET ck=0: FOR x=0 TO 62: LET ck=ck+PEEK (26715+x): NEXT x 9130 IF ck<>7488 THEN PRINT "Look for errors in a$.": STOP 9135 IF ck=7488 THEN PRINT "Machine code checks out." 9899 VERIFY "PIXEL-O" 9999 SAVE "PIXEL-O" LINE 1 ```