--- title: "Hi-Res/64 Col. Graphics Utility" type: "article" slug: "hi-res-64-col-graphics-utility" url: "http://localhost/article/hi-res-64-col-graphics-utility/" markdown_url: "http://localhost/article/hi-res-64-col-graphics-utility.md" published_at: "2020-10-27T17:10:16+00:00" modified_at: "2026-07-20T13:51:08+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "This program is a graphics utility that I wrote to convert a standard 32 col. screen to a high resolution (64 col.) screen. The user has the option of placing the 32 col. screen (which is on the left half of the new 64 col. screen) on the right half of the screen, or starting…" category: - name: "Time Designs Magazine" slug: "time-designs" taxonomy: "category" url: "http://localhost/category/periodicals/time-designs/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - 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 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Stan Lemke" slug: "stan-lemke" taxonomy: "indiv" url: "http://localhost/indiv/stan-lemke/" publication: "Time Designs Magazine" publication_r: id: 10277 title: "Time Designs Magazine" type: "periodical" url: "http://localhost/periodical/time-designs-magazine/" authors: "Stan Lemke" authors_r: - name: "Stan Lemke" slug: "stan-lemke" taxonomy: "indiv" url: "http://localhost/indiv/stan-lemke/" volume: "2" issue: "3" issues_articles: - id: 26777 title: "Time Designs Magazine v2 n3" type: "issue" url: "http://localhost/issue/time-designs-magazine-v2-n3/" pages: "21-22" pubdate: "March/April 1986" archive_link: false volumeissue: "v2n3" --- This program is a graphics utility that I wrote to convert a standard 32 col. screen to a high resolution (64 col.) screen. The user has the option of placing the 32 col. screen (which is on the left half of the new 64 col. screen) on the right half of the screen, or starting on a user-defined column. You can also double the image to get left and right pictures simultaneously, or you can combine two standard 32 col. pictures to get one hi-res, 64 col. picture. The program is very easy to use. A few comments however: The program is mostly BASIC. Lines 9100 to 9140 POKE into memory, five short machine code routines to set up the advanced video modes, calculate addresses of pixel locations, clear Display File 2, copy a temporary Display File 3 into Display File 2, and clear Display File 3 respectively. Each of these lines has a “self check”, to insure that the correct values have been used. An error in any line will produce a warning, and the line with the error will be identified. When the program runs, you will be given a choice of five options. Press 1-5 to select an option. 1. Is a Double Image effect, designated as 32 => 32 + 32 in the listing. 2. Places the new picture on the left 32 columns of the new 64 col. screen. 3. Places the new picture on the right 32 columns of the new 64 col. screen. 4. Is user SPECIFIC. You will be prompted to “Specify Beginning Column”. The new picture will be placed starting at the specified column of the new screen. 5. Is a merge function designated 32 + 32 => 64. You will load two standard 32 col. screens. The first will go on the left half of the new 64 col. screen, the second will go on the right half of the screen. When each function is completed, you will be prompted to “Prepare Tape…”. You can save the new 64 col. screen to tape for future use. Note: This is a two-part save. First, Display File 1 is saved, then Display File 2 is saved. The screen will go into the standard 32 col. mode while the saves are being made. The effect will probably surprise you, but don’t worry. What happens is that in the 64 col. mode, every odd column is from Display File 1, while the even columns are from Display File 2. When you go from 64 col. to 32 col., you drop out all the even columns and look at only half of the picture. When Display File 2 is completely saved, the 64 col. screen will return and the program will “stop”. ## Source Code ``` 1 REM PS/GE Append by S D Lemke 100 REM 57000 -- video mode 110 REM 57040 -- locate 120 REM 57075 -- clear DF 2 130 REM 57090 -- DF3 -> DF1 140 REM 57105 -- clear DF 3 300 GO SUB 9100: RANDOMIZE USR 57000: OUT 255,0: PAPER 1: BORDER 1: INK 7: CLS: RANDOMIZE USR 57075: RANDOMIZE USR 57105 400 CLS 500 PRINT AT 0,0;"PS/GE AFFEND Use this program to convert a standard 32 column screen to a 64 (hi res) column ścreen. Fress 1-5 to select an option." 510 PRINT: PRINT: PRINT "1) DOUBLE IMAGE (32 => 32 + 32) 2) LEFT ONLY 3) RIGHT ONLY 4) USER SPECIFIC 5) LEFT + RIGHT (32 + 32 => 64)" 520 PAUSE O: LET a$=INKEY$: IF a$<"1" OR a$>"5" THEN BEEP 1,0: GO TO 520 530 PRINT AT 8+VAL A$,1; OVER 1; FLASH 1;" ": IF A$ <>"4" THEN GO TO 600 540 INPUT "Specify Beginning Column ";b$: LET lb=LEN b$: IF lb=0 THEN BEEP 1,0: GO TO 540 550 FOR i=1 TO lb: IF b$(i)<"0" OR b$(i)>"9" THEN BEEP 1,0: GO TO 540 560 NEXT i 570 LET b=VAL b$: IF b>32 THEN BEEP 1,0: GO TO 540 580 LET b=INT (b/2) 680 PRINT AT 14,10;"LOAD SCREEN": LOAD ""SCREEN$ 700 GO SUB (1000*VAL a$) 800 PRINT #0;AT 0,0;"Prepare tape to SAVE your new 64Column Screen, Note: 2 part SAVE": PAUSE 120: PRINT #0;AT 0,0;TAB 31;" ";TAB 31;" ": PRINT #0;AT 0,0;" Press any KEY to CONTINUE": PAUSE 0: OUT 255,0: SAVE "PSGE APEND"SCREEN$: SAVE "PSGE APEND"CODE 24576,6912 900 OUT 255,54: STOP 1000 REM 32 -> 32 + 32 1010 FOR y=175 TO 0 STEP-1: LET x=0: POKE 65414,x: POKE 65415,0: POKE 65416,y: POKE 65417,0: RANDOMIZE USR 57040: LET p=256*PEEK 65399+PEEK 65398: LET q=p+8192: LET r=p+33536: LET s=256*PEEK 65375+PEEK 65374 1020 LET v=PEEK p: POKE p,255: POKE s,15: POKE r,v: POKE r+16,v: LET p=p+1: LET s=s+1: LET v=PEEK p: POKE p,255: POKE s,15: POKE q,v: POKE q+16,v: IF x<238 THEN LET x=x+16: LET p=p+1: LET s=s+1: LET r=r+1: LET q=q+1: GO TO 1020 1030 NEXT y 1040 OUT 255,54: RANDOMIZE USR 57090 1050 RETURN 2000 REM 32 -> 32 +00 2010 FOR y=175 TO 0 STEP-1: LET x=0: POKE 65414,x: POKE 65415,0: POKE 65416,y: POKE 65417,0: RANDOMIZE USR 57040: LET p=256*PEEK 65399+PEEK 65398: LET q=p+8198: LET r=p+33536: LET s=256*PEEK 65375+PEEK 65374 2020 LET v=PEEK p: POKE p,255: POKE s,15: POKE r,v: LET p=p+1: LET s=s+1: LET v=PEEK p: POKE p,255: POKE s,15: POKE r,v: LET p=p+1: LET s=s+1: LET v=PEEK p: POKE p,255: POKE s,15: POKE q,v: IF x<238 THEN LET x=x+16: LET p=p+1: LET s=s+1: LET r=r+1: LET q=q+1: GO TO 2020 2030 NEXT y 2040 OUT 255,44: RANDOMIZE USR 57090 2050 RETURN 3000 REM 32 -> 00 + 32 3010 FOR y=175 TO 0 STEP-1: LET x=0: POKE 65414,x: POKE 65415,0: POKE 65416,y: POKE 65417,0: RANDOMIZE USR 57040: LET p=256*PEEK 65399+PEEK 65398: LET q=p+8192: LET r=p+33536: LET s=256*PEEK 65375+PEEK 65374 3020 LET v=peekp: POKE p,255: POKE s,15: POKE r+16,v: LET p=p+1: LET s=s+1: LET v=PEEK p: POKE p,255: POKE s,15: POKE q+16,v: IF x<238 THEN LET x=x+16: LET p=p+1: LET s=s+1: LET r=r+1: LET q=q+1: GO TO 3020 3030 NEXT y 3040 OUT 255,54: RANDOMIZE USR 57090 3050 RETURN 4000 REM 32 -> Specific 4010 FOR y=175 TO 0 STEP-1: LET x=0: POKE 65414,x: POKE 65415,0: POKE 65416,y: POKE 65417,0: RANDOMIZE USR 57040: LET p=256*PEEK 65399+PEEK 65398: LET q=p+8192: LET r=p+33536: LET s=256*PEEK 65375+PEEK 65374 4020 LET v=PEEK p: POKE p,255: POKE s,15: POKE r+b,v: LET p=p+1: LET s=s+1: LET v=PEEK p: POKE p,255: POKE s,15: POKE q+b,v: IF x<238 THEN LET x=x+16: LET p=p+1: LET s=s+1: LET r=r+1: LET q=q+1: GO TO 4020 4030 NEXT y 4040 OUT 255,54: RANDOMIZE USR 57090 4050 RETURN 5000 REM 32 + 32 -> 64 5010 GO SUB 2000: PAUSE 60: OUT 255,0: CLS: PRINT AT 14,10;"Load Screen 2": LOAD ""SCREEN$: GO SUB 3000: RETURN 8999 STOP 9000 DATA 46,0,62,1,211,244,219,255,203,255,211,255,62,6,245,251,205,142,14,0,219,255,203,191,211,255,175,211,244,241,254,128,32,4,50,91,104,251,201 9010 DATA 33,134,255,78,33,136,255,70,205,3,38,34,118,255,124,198,32,103,34,96,255,124,15,15,15,230,3,246,88,103,34,94,255,201 9020 DATA 17,0,96,33,0,64,1,0,27,237,176,201 9030 DATA 17,0,64,33,0,195,1,0,27,237,176,201 9040 DATA 17,0,195,33,0,64,1,0,27,237,176,201 9100 LET sum=0: RESTORE 9000: FOR i=57000 TO 57038: READ a: POKE i,a: LET sum=sum+a: NEXT i: IF sum <> 6207 THEN LET l=9000: GO TO 9800 9110 LET sum=0: RESTORE 9101: FOR i=57040 TO 57073: READ a: POKE i,a: LET sum=sum+a: NEXT i: IF sum <> 3912 THEN LET l=9010: GO TO 9800 9120 LET sum=0: RESTORE 9020: FOR i=57075 TO 57086: READ a: POKE i,a: LET sum=sum+a: NEXT i: IF sum <> 852 THEN LET l=9030: GO TO 9800 9130 LET sum=0: RESTORE 9030: FOR i=57090 TO 57101: READ a: POKE i,a: LET sum=sum+a: NEXT i: IF sum <> 951 THEN LET l=9030: GO TO 9800 9140 LET sum=0: RESTORE 9040: FOR i=57105 TO 57116: READ a: POKE i,a: LET sum=sum+a: NEXT i: IF sum <> 951 THEN LET l=9040: GO TO 9800 9150 RETURN 9800 CLS: PRINT "You have an error in line ";l: BEEP 1,1: STOP 9998 STOP 9999 SAVE "PSGE APEND" LINE 1: BEEP 1,1: STOP ```