Authors
Publication
Pub Details
Date
Pages
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.
- Is a Double Image effect, designated as 32 => 32 + 32 in the listing.
- Places the new picture on the left 32 columns of the new 64 col. screen.
- Places the new picture on the right 32 columns of the new 64 col. screen.
- 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.
- 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”.
Products
Media
Image Gallery
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