1 'COLOR BASIC HI RES DEMO 2 'LAUREN32 2024 10 GOSUB 2100'INTRO SCREEN 15 CLEAR 100,9749'SET HIMEM 20 'VAR TABLE PRIORITIES 30 A=0:I=0 35 BD=0 40 SX=0:SY=0 45 CC=0:P1=0 50 VR=0:VX=0 100 'SETUP 105 BD=9750'BLOCK DATA ADDR 110 VR=10240:VX=16383'VRAM START AND END 115 ?"LOADING USR ROUTINES..." 120 GOSUB 1100'LOAD ASM 125 ?"LOADING SPRITES..." 130 GOSUB 1200'LOAD SPRITES 135 ?"CLEARING VRAM..." 140 GOSUB 1000'CVRAM 150 ?"READY!" 155 GOSUB 1900'ENTER GFX 200 'LOOP 250 IF PEEK(339)=251 THEN 900'Q 255 IF PEEK(338)=251 THEN GOSUB 1800'P 300 GOSUB 1300'DRAW A RECT 315 GOSUB 1600'DRAW A SPRITE 410 FOR I=1 TO 10:GOSUB 1700:NEXT I'SET PIXEL 420 POKE 339,255:POKE 338,255:POKE 342,255'CLEAR ROLLOVER 500 GOTO 200 590 END 900 'EXIT 910 GOSUB 2000'RETURN TO TEXT MODE 920 ?"BYE BYE!" 990 END 1000 'SUB: CLEAR VRAM 1010 POKE 275,38:POKE 276,242 1020 POKE BD,40:POKE BD+1,0:POKE BD+2,64:POKE BD+3,0 1030 A=USR(BD) 1040 RETURN 1100 'SUB: LOAD ASM ROUTINES 1110 FOR I=0 TO 13:READ A:POKE 9970+I,A:NEXT I'CLVR 1111 DATA 189,179,237,31,3,174,196,111,128,172,66,38,250,57 1112 FOR I=0 TO 250:READ A:POKE 9986+I,A:NEXT I'CGFX 1113 DATA 126,39,14,126,39,22,126,39,158,126,39,32,189,179,237 1114 DATA 31,3,141,79,57,189,179,237,31,3,141,101,126,180,244 1115 DATA 189,179,237,31,3,141,1,57,166,68,230,69,183,39,247 1116 DATA 247,39,248,174,72,166,128,129,9,39,4,167,67,141,38 1117 DATA 108,68,230,68,240,39,247,225,70,38,235,182,39,247,167 1118 DATA 68,108,69,230,69,240,39,248,225,71,38,219,182,39,247 1119 DATA 246,39,248,167,68,231,69,57,52,119,141,94,141,115,52 1120 DATA 2,230,67,61,53,2,52,4,198,3,61,83,228,164,234 1121 DATA 228,231,164,53,2,53,119,57,141,66,141,87,52,4,198 1122 DATA 3,61,228,164,30,137,53,4,193,0,39,5,68,68,90 1123 DATA 38,251,30,137,79,57,189,179,237,31,3,166,68,183,39 1124 DATA 247,230,69,141,184,166,68,230,69,76,167,68,161,70,47 1125 DATA 243,182,39,247,92,225,71,34,6,167,68,231,69,32,229 1126 DATA 57,52,87,166,66,230,69,61,31,1,230,68,84,84,58 1127 DATA 31,16,227,196,31,2,53,87,57,52,113,134,252,164,68 1128 DATA 52,2,230,68,224,228,83,196,3,142,39,249,58,53,2 1129 DATA 166,132,53,113,57,1,1,1,4,16,64, 1130 RETURN 1200 'SUB: LOAD SPRITES 1210 FOR I=0 TO 195:READ A:POKE 9770+I,A:NEXT I'SPRITE 1211 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,9 1212 DATA 1,1,1,1,3,3,3,3,3,1,1,1,1,9 1213 DATA 9,1,1,1,1,1,3,1,1,1,1,1,9,9 1214 DATA 9,1,1,1,1,1,3,1,1,1,1,1,9,9 1215 DATA 9,9,1,1,1,1,3,1,1,1,1,9,9,9 1216 DATA 9,9,1,1,1,1,3,1,1,1,1,9,9,9 1217 DATA 9,9,9,9,1,1,1,1,1,9,9,9,9,9 1218 DATA 9,9,9,1,1,3,3,3,1,1,9,9,9,9 1219 DATA 9,9,1,1,3,1,1,1,3,1,1,9,9,9 1220 DATA 9,9,1,1,3,1,1,1,1,1,1,9,9,9 1221 DATA 9,1,1,1,3,1,1,1,1,1,1,1,9,9 1222 DATA 9,1,1,1,3,1,1,1,3,1,1,1,9,9 1223 DATA 1,1,1,1,1,3,3,3,1,1,1,1,1,9 1224 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,9 1230 RETURN 1300 'SUB: DRAW A RECT OVER THE SPRITE 1320 POKE BD+3,0 1360 POKE BD+4,SX:POKE BD+5,SY:POKE BD+6,SX+13:POKE BD+7,SY+13 1395 POKE 275,39:POKE 276,8'USR: CGFX.RECT 1410 A=USR(BD) 1450 RETURN 1600 'DRAW SPRITE SP AT SX,SY 1610 POKE 275,39:POKE 276,11'USR: CGFX.BLIT 1615 SX=RND(114)-1:SY=RND(178)-1 1620 POKE BD+4,SX:POKE BD+5,SY:POKE BD+6,14:POKE BD+7,14 1630 POKE BD+8,38:POKE BD+9,42 1640 A=USR(BD) 1650 RETURN 1700 'SUB: DEMO GET AND SET PIXEL 1705 POKE 275,39:POKE 276,5'USR: CGFX.GETPX 1715 POKE BD+4,RND(128)-1:POKE BD+5,RND(192)-1 1720 A=USR(BD) 1725 IF A=0 THEN A=2 ELSE IF A=2 THEN A=0 1730 POKE BD+3,A 1735 POKE 275,39:POKE 276,2'USR: CGFX.SETPX 1740 A=USR(BD) 1790 RETURN 1800 'SUB: SWAP COLOR PALETTE 1820 IF (PEEK(65314) AND -8)=232 THEN P1=224 ELSE P1=232 1830 POKE 65314,P1 OR (PEEK(65314) AND 7)'CTRL REG 1840 RETURN 1900 'SUB: ENTER GRAPHICS MODE G3C 1910 POKE 65478,0:POKE 65480,0:POKE 65483,0 1920 POKE 65484,0:POKE 65487,0:POKE 65488,0:POKE 65490,0'PAGE SEL 1930 POKE 65472,0:POKE 65475,0:POKE 65477,0'VDG REG 1940 POKE 65314,224 OR (PEEK(65314) AND 7)'CTRL REG 1950 POKE BD,40:POKE BD+1,0:POKE BD+2,32:POKE BD+3,0'COMMON BLOCK PARAMS 1960 RETURN 2000 'SUB: ENTER TEXT MODE 2010 POKE 65478,0:POKE 65481,0:POKE 65482,0 2020 POKE 65484,0:POKE 65486,0:POKE 65488,0:POKE 65490,0'PAGE SEL 2030 POKE 65472,0:POKE 65474,0:POKE 65476,0'VDG REG 2040 POKE 65314,0 OR (PEEK(65314) AND 7)'CTRL REG 2050 RETURN 2100 'SUB: INTRO SCREEN 2105 CLS 2110 ?"LAUREN32 PRESENTS...":FOR I=1 TO 3:EXEC 42963:NEXT 2115 ?"HI-RES GFX...":FOR I=1 TO 3:EXEC 42963:NEXT 2120 ?"IN unextended COLOR BASIC!":FOR I=1 TO 3:EXEC 42963:NEXT 2125 ?"PRESS Q TO QUIT":?"HOLD P TO CHANGE PALETTE":?"AND HAVE A NICE DAY!" 2130 EXEC 42961:EXEC 42963 2135 ?"LOADING..." 2140 IF PEEK(32768)=69 THEN ?"SORRY, NO EXTENDED BASIC ALLOWED. BYE..." 2145 IF PEEK(116)=63 THEN ?"16K"; ELSE IF PEEK(116)=127 THEN ?"32K+"; 2150 ?" RAM DETECTED." 2190 RETURN 9999 REM DUMMY