How's _this_ for a painting program? It's freeware and I made it myself. 5 CL = 7 7 QA = 160 20 TEXT:HOME 30 PRINT "Color Hires Drawing with Pix^2 vers. 2":PRINT 50 PRINT:PRINT "Press Any Key To Continue...":GET A$ 51 GOSUB 20000 52 GOSUB 40888 54 GOSUB 50000 55 HTAB 1:VTAB 24:PRINT "Press (?) for a list of commands."; 60 HGR:HTAB 1:VTAB 21:POKE 35,23:GOSUB 10000 70 IF IR=1 THEN GOSUB 20100 72 IF IR=2 THEN GOSUB 20200 74 IF IR=3 THEN GOSUB 20300 76 IF IR=4 THEN GOSUB 20400 85 B9=(PEEK(112)*256)+PEEK(111):IF B9<20480 THEN B9=FRE(0) 95 K=PEEK(-16384)-128:POKE -16384,0:POKE -16368,0:K$="":IF K>0 THEN K$=CHR$(K) 100 IF K$="N" THEN HGR 101 IF K$="O" THEN INPUT "FILE NAME: ";F$:PRINT CHR$(4);"BLOAD "F$",A8192" 102 IF K$="P" THEN INPUT "DIRECTORY NAME: ";F$:PRINT CHR$(4);"PREFIX "F$ 103 IF K$="S" THEN INPUT "FILE NAME: ";F$:PRINT CHR$(4);"BSAVE "F$",A8192,L8192" 104 IF K$="Q" THEN TEXT:END 125 IF K$="I" THEN GOSUB 10100 127 IF K$="C" THEN GOSUB 10200 129 HCOLOR=CL 130 IF P>127 THEN XX=H:YY=V:ZZ=CL:GOSUB 63999 135 IF K$="D" THEN GOSUB 30000 137 IF K$="M" THEN CR=CR+1:IF CR=6 THEN CR=1 138 IF K$="?" THEN GOSUB 50100 139 IF K$="F" THEN GOSUB 50200 140 IF CR=1 THEN GOSUB 40100 141 IF CR=2 THEN GOSUB 40200 142 IF CR=3 THEN GOSUB 40300 143 IF CR=4 THEN GOSUB 40400 144 IF CR=5 THEN GOSUB 40500 150 GOTO 70 10000 L=16384 10010 PRINT CHR$(4);"BLOAD COLOR.DRAW.SHP,A"L 10030 POKE 232,0:POKE 233,64 10040 RETURN 10100 ROT=0:SCALE=192 10110 FOR X=0 TO 279:XDRAW 1 AT X,0:NEXT X 10120 RETURN 10200 PCL=CL 10210 PCL=PCL+1 10220 IF PCL=8 THEN PCL=0 10230 CL=PCL 10240 HTAB 38:VTAB 24:PRINT MID$("KGPWkobw",CL + 1,1); 10250 HTAB 1:VTAB 21 10260 RETURN 20000 HOME:PRINT "Please select the input device:":PRINT 20005 PRINT " 1) Paddle / Koalapad" 20006 PRINT " 2) Joystick" 20007 PRINT " 3) Apple IIgs ADB Mouse" 20008 PRINT " 4) Keyboard" 20010 PRINT:GET R$ 20015 IR=VAL(R$) 20020 IF IR<1 OR IR>4 THEN GOTO 20000 20025 IF IR=2 OR IR=4 THEN GOSUB 22000 20030 IF IR=3 THEN GOSUB 23000 20040 RETURN 20100 H=INT((PDL(0)/255)*139):V=INT((PDL(1)/255)*(QA-1)):P=PEEK(49249):RETURN 20200 TH=PDL(0):TV=PDL(1) 20205 IF TH<100 THEN H=H-1 20210 IF TH>160 THEN H=H+1 20215 IF TV<100 THEN V=V-1 20220 IF TV>160 THEN V=V+1 20225 IF H<0 THEN H=0 20230 IF V<0 THEN V=0 20235 IF H>139 THEN H = 139 20240 IF V>(QA-1) THEN V=(QA-1) 20245 P=PEEK(49249):RETURN 20300 PRINT CHR$(4);"IN#4":INPUT "";H,V,P:PRINT CHR$(4);"IN#0" 20305 IF P=1 THEN P=255 20310 IF H<0 THEN H=0 20315 IF V<0 THEN V=0 20320 IF H>139 THEN H=139 20325 IF V>(QA-1) THEN V=(QA-1) 20330 RETURN 20400 TK=PEEK(-16384)-128 20405 IF TK=13 THEN V=V+1 20410 IF TK=11 THEN H=H+1 20415 IF TK=10 THEN H=H-1 20420 IF TK=9 THEN V=V-1 20425 IF H<0 THEN H=0 20430 IF H>139 THEN H=139 20435 IF V<0 THEN V=0 20440 IF V>(QA-1) THEN V=(QA-1) 20445 P=PEEK(49249):RETURN 22000 H=70:V=80:RETURN 23000 PRINT CHR$(4);"PR#4":PRINT CHR$(1):PRINT CHR$(4);"PR#0":RETURN 30000 PRINT:PRINT "Drawing Commands:" 30010 PRINT "

lot ect ine Plygon" 30015 PRINT "illrect nvrect" 30020 INPUT "Choice?";C$ 30030 IF C$="" OR MID$(C$,1,1)=" " THEN RETURN 30040 IF C$="P" THEN INPUT "Coordinate? (X,Y)";XX,YY:ZZ=CL:GOSUB 63999 30045 IF C$="p" THEN C$="P":GOTO 30040 30050 IF C$="R" OR C$="r" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RW:HPLOT (RX*2),RY TO (RH*2),RY TO (RH*2),RW TO (RX*2),RW TO (RX*2),RY 30051 IF C$="R" OR C$="r" THEN HPLOT (RX*2)+1,RY TO (RX*2)+1,RW:HPLOT (RW*2)+1,RY TO (RW*2)+1,RW 30060 IF C$="L" OR C$="l" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RW:HPLOT (RX*2),RY TO (RH*2),RW 30062 IF C$="F" OR C$="f" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RV:FOR XS=RX*2 TO RH*2:HPLOT XS,RY TO XS,RV:NEXT XS 30064 IF C$="I" OR C$="i" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RV:ROT=0:SCALE=(RV-RY)+1:FOR XS=RX*2 TO RH*2:XDRAW 1 AT XS,RV:NEXT XS 30070 IF C$<>"O" AND C$<>"o" THEN GOTO 30000 30080 INPUT "First Coordinate? (X,Y)";PX,PY:HPLOT (PX*2),PY 30090 INPUT "Next Coordinate? (X,Y)";PX,PY 30100 IF PX=0 OR PY=0 THEN GOTO 30000 30110 HPLOT TO (PX*2),PY 30120 GOTO 30090 40100 ROT=0:SCALE=192:XDRAW 1 AT H*2,0:XDRAW 1 AT H*2,0:ROT=48:SCALE=140:XDRAW 1 AT 0,V:XDRAW 1 AT 140,V:XDRAW 1 AT 0,V:XDRAW 1 AT 140,V 40150 RETURN 40200 ROT=0:SCALE=1:XDRAW 2 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 2 AT H*2,V:RETURN 40300 ROT=0:SCALE=1:XDRAW 3 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 3 AT H*2,V:RETURN 40400 ROT=0:SCALE=1:XDRAW 4 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 4 AT H*2,V:RETURN 40500 ROT=0:SCALE=1:XDRAW 5 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 5 AT H*2,V:RETURN 40888 HOME:PRINT "Please select your mouse cursor:":PRINT 40890 PRINT "1) No Pointer (Use Bars)" 40900 PRINT "2) Arrow" 40910 PRINT "3) Cross" 40920 PRINT "4) Crosshair" 40925 PRINT "5) Pencil" 40930 PRINT:PRINT 40940 GET A$:CR=VAL(A$) 40950 IF CR<1 OR CR>5 THEN GOTO 40888 40960 HOME:RETURN 50000 HOME 50005 PRINT "Help:":PRINT 50010 PRINT " N - Clear the screen (New)" 50015 PRINT " O - Load a file (Open)" 50020 PRINT " S - Save a file" 50025 PRINT " P - Change directories (Prefix)" 50030 PRINT " C - Change the color" 50035 PRINT " I - Invert the screen" 50040 PRINT " D - Drawing commands" 50045 PRINT " M - Change the mouse pointer" 50047 PRINT " F - Turn on/off full screen graphics" 50050 PRINT " ? - Bring up this help screen" 50055 PRINT " Q - Exit the program (Quit)" 50060 PRINT:PRINT "Press any key to continue." 50062 POKE 34,20:REM PROTECTS TEXT FROM BEING OVERWRITTEN 50065 RETURN 50100 POKE 49233,0 50110 WAIT -16384,128 50120 POKE -16368,0:POKE -16384,0 50130 POKE 49232,0 50140 RETURN 50200 REM FULL SCREEN TRICK 50210 IF QA=160 THEN QA=192:POKE 49234,0:RETURN 50220 QA=160:POKE 49235,0:RETURN 63999 HCOLOR=ZZ:HPLOT XX*2,YY TO (XX*2)+1,YY:RETURN Here is the hex dump of the COLOR.DRAW.SHP file: 4000:05 00 0C 00 0E 00 35 00 4008:47 00 5C 00 04 00 2E 2E 4010:2E 2E 2E 3E 3F 36 35 35 4018:3F 3C 3C 37 3E 24 24 24 4020:24 24 2C 36 36 36 36 2D 4028:3C 24 24 2E 2F 26 2E 2F 4030:26 3E 2D 05 00 24 24 37 4038:36 3E 3F 7F 49 49 2D ED 4040:DB 13 36 3E 24 24 00 C1 4048:C1 24 2C 36 B6 12 36 3E 4050:24 24 C1 1B 3F 7F 49 49 4058:09 2D 2D 00 2C 2C 2C 24 4060:25 24 25 24 25 E4 C1 3A 4068:3C D7 11 C1 C1 17 76 35 4070:DD 4B E9 DB 03 C1 36 36 4078:36 36 36 06 C1 C1 C1 C1 4080:C1 C1 31 2E 3E 36 00 Tips for program operation: * If you have a IIgs, set mouse tracking to 2 (1 being far left, 5 being far right) and select input device 3. Setting the mouse tracking to 2 will give you the best control. * You can press ? at any time to bring up a list of commands. * Input device 3 is listed as Apple IIgs ADB Mouse, but it will work with the IIc mouse port and the Apple Mouse Card (provided it's in slot 4), too. * To use the keyboard as the input device, hold down Control and press I, J, K, M to move. Press Open Apple or Command to plot. You can hold down Control and Command at the same time to draw while moving. * Since movement of the cursor in keyboard mode is controlled by just checking if it's a control character, Tab will move up, Return will move down, Up Arrow will move right, and Down Arrow will move left. This is contrary to the normal operation of these keys. * The color you are currently using is indicated at the bottom right corner of the screen when you are not in full screen mode. K = Black, G = Green, P = Purple, W = White, O = Orange, B = Blue. Color Group 2 colors are displayed in lowercase. * If you are using an unaccelerated Apple II, use cursor 1 for the fastest drawing. An 8MHz stock IIgs is slightly better, but for the best performance use an accelerated machine (or, if you're up to it, port the whole program to assembly language). * The P (prefix) command only works for ProDOS. Under DOS 3.3 it will cause a syntax error. Tips for programmers: * You can type the hex dump into the system monitor and then do a BSAVE COLOR.DRAW.SHP,A$4000,L135 * You can use Apple Oasis to just copy the program listing into the emulator. * Feel free to make changes to the program or to use the COLOR.DRAW.SHP file for something else. * If you wish to use COLOR.DRAW.SHP for other things, shape 1 is a simple one vector up while drawing, shape 2 is an arrow cursor, shape 3 is a crosshair, shape 4 is a crosshair with space for the pixel to plot, and shape 5 is a pencil. This is best used for mouse-driven programs. XDRAWing a shape from this table two times with a FOR AA = 1 TO 100:NEXT AA in between is a simple way to put a cursor on the screen in an Applesoft program without affecting the high resolution graphics screen. * The short subroutine at 63999 is called Pix^2 and can be used for other purposes. Go to for instructions on how to use it and a newer version (version 3 beta). * When the string data area used by Applesoft starts getting close to where the shape table is in HiRes page 2, unused string data is automatically cleared out. * Variable data, though, can still crash into HiRes page 1. It's even easier for it to do that in this program than in other programs because this program is so big. It shouldn't happen if any modifications or additions you make only use the variables we've already got. Ones we already have that won't cause program error if they are manipulated wrong are XS, RH, RV, RX, RY, RW, TH, TV, TK, L, F$, PCL, PX, PY, C$, and A$. L is the only one that is surely not going to be overwritten. A$ should be used for temporary input (as in GET A$ or INPUT A$). * The safest places to put a machine language routine are from $300 to $3CF and from $4087 to $4FFF. These areas are never ever going to be erased or used by the program. Any other areas are bound to be overwritten. If you have Apple Oasis, just copy and paste this to install it. If you have ApplePC, you can Dump Text File to Keyboard and enter IN#1 when you're back in the emulator. 3D0G NEW 5 CL = 7 7 QA = 160 20 TEXT:HOME 30 PRINT "Color Hires Drawing with Pix^2 vers. 2":PRINT 50 PRINT:PRINT "Press Any Key To Continue...":GET A$ 51 GOSUB 20000 52 GOSUB 40888 54 GOSUB 50000 55 HTAB 1:VTAB 24:PRINT "Press (?) for a list of commands."; 60 HGR:HTAB 1:VTAB 21:POKE 35,23:GOSUB 10000 70 IF IR=1 THEN GOSUB 20100 72 IF IR=2 THEN GOSUB 20200 74 IF IR=3 THEN GOSUB 20300 76 IF IR=4 THEN GOSUB 20400 85 B9=(PEEK(112)*256)+PEEK(111):IF B9<20480 THEN B9=FRE(0) 95 K=PEEK(-16384)-128:POKE -16384,0:POKE -16368,0:K$="":IF K>0 THEN K$=CHR$(K) 100 IF K$="N" THEN HGR 101 IF K$="O" THEN INPUT "FILE NAME: ";F$:PRINT CHR$(4);"BLOAD "F$",A8192" 102 IF K$="P" THEN INPUT "DIRECTORY NAME: ";F$:PRINT CHR$(4);"PREFIX "F$ 103 IF K$="S" THEN INPUT "FILE NAME: ";F$:PRINT CHR$(4);"BSAVE "F$",A8192,L8192" 104 IF K$="Q" THEN TEXT:END 125 IF K$="I" THEN GOSUB 10100 127 IF K$="C" THEN GOSUB 10200 129 HCOLOR=CL 130 IF P>127 THEN XX=H:YY=V:ZZ=CL:GOSUB 63999 135 IF K$="D" THEN GOSUB 30000 137 IF K$="M" THEN CR=CR+1:IF CR=6 THEN CR=1 138 IF K$="?" THEN GOSUB 50100 139 IF K$="F" THEN GOSUB 50200 140 IF CR=1 THEN GOSUB 40100 141 IF CR=2 THEN GOSUB 40200 142 IF CR=3 THEN GOSUB 40300 143 IF CR=4 THEN GOSUB 40400 144 IF CR=5 THEN GOSUB 40500 150 GOTO 70 10000 L=16384 10010 PRINT CHR$(4);"BLOAD COLOR.DRAW.SHP,A"L 10030 POKE 232,0:POKE 233,64 10040 RETURN 10100 ROT=0:SCALE=192 10110 FOR X=0 TO 279:XDRAW 1 AT X,0:NEXT X 10120 RETURN 10200 PCL=CL 10210 PCL=PCL+1 10220 IF PCL=8 THEN PCL=0 10230 CL=PCL 10240 HTAB 38:VTAB 24:PRINT MID$("KGPWkobw",CL + 1,1); 10250 HTAB 1:VTAB 21 10260 RETURN 20000 HOME:PRINT "Please select the input device:":PRINT 20005 PRINT " 1) Paddle / Koalapad" 20006 PRINT " 2) Joystick" 20007 PRINT " 3) Apple IIgs ADB Mouse" 20008 PRINT " 4) Keyboard" 20010 PRINT:GET R$ 20015 IR=VAL(R$) 20020 IF IR<1 OR IR>4 THEN GOTO 20000 20025 IF IR=2 OR IR=4 THEN GOSUB 22000 20030 IF IR=3 THEN GOSUB 23000 20040 RETURN 20100 H=INT((PDL(0)/255)*139):V=INT((PDL(1)/255)*(QA-1)):P=PEEK(49249):RETURN 20200 TH=PDL(0):TV=PDL(1) 20205 IF TH<100 THEN H=H-1 20210 IF TH>160 THEN H=H+1 20215 IF TV<100 THEN V=V-1 20220 IF TV>160 THEN V=V+1 20225 IF H<0 THEN H=0 20230 IF V<0 THEN V=0 20235 IF H>139 THEN H = 139 20240 IF V>(QA-1) THEN V=(QA-1) 20245 P=PEEK(49249):RETURN 20300 PRINT CHR$(4);"IN#4":INPUT "";H,V,P:PRINT CHR$(4);"IN#0" 20305 IF P=1 THEN P=255 20310 IF H<0 THEN H=0 20315 IF V<0 THEN V=0 20320 IF H>139 THEN H=139 20325 IF V>(QA-1) THEN V=(QA-1) 20330 RETURN 20400 TK=PEEK(-16384)-128 20405 IF TK=13 THEN V=V+1 20410 IF TK=11 THEN H=H+1 20415 IF TK=10 THEN H=H-1 20420 IF TK=9 THEN V=V-1 20425 IF H<0 THEN H=0 20430 IF H>139 THEN H=139 20435 IF V<0 THEN V=0 20440 IF V>(QA-1) THEN V=(QA-1) 20445 P=PEEK(49249):RETURN 22000 H=70:V=80:RETURN 23000 PRINT CHR$(4);"PR#4":PRINT CHR$(1):PRINT CHR$(4);"PR#0":RETURN 30000 PRINT:PRINT "Drawing Commands:" 30010 PRINT "

lot ect ine Plygon" 30015 PRINT "illrect nvrect" 30020 INPUT "Choice?";C$ 30030 IF C$="" OR MID$(C$,1,1)=" " THEN RETURN 30040 IF C$="P" THEN INPUT "Coordinate? (X,Y)";XX,YY:ZZ=CL:GOSUB 63999 30045 IF C$="p" THEN C$="P":GOTO 30040 30050 IF C$="R" OR C$="r" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RW:HPLOT (RX*2),RY TO (RH*2),RY TO (RH*2),RW TO (RX*2),RW TO (RX*2),RY 30051 IF C$="R" OR C$="r" THEN HPLOT (RX*2)+1,RY TO (RX*2)+1,RW:HPLOT (RW*2)+1,RY TO (RW*2)+1,RW 30060 IF C$="L" OR C$="l" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RW:HPLOT (RX*2),RY TO (RH*2),RW 30062 IF C$="F" OR C$="f" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RV:FOR XS=RX*2 TO RH*2:HPLOT XS,RY TO XS,RV:NEXT XS 30064 IF C$="I" OR C$="i" THEN INPUT "Starting Coordinate? (X,Y)";RX,RY:INPUT "Ending Coordinate? (X,Y)";RH,RV:ROT=0:SCALE=(RV-RY)+1:FOR XS=RX*2 TO RH*2:XDRAW 1 AT XS,RV:NEXT XS 30070 IF C$<>"O" AND C$<>"o" THEN GOTO 30000 30080 INPUT "First Coordinate? (X,Y)";PX,PY:HPLOT (PX*2),PY 30090 INPUT "Next Coordinate? (X,Y)";PX,PY 30100 IF PX=0 OR PY=0 THEN GOTO 30000 30110 HPLOT TO (PX*2),PY 30120 GOTO 30090 40100 ROT=0:SCALE=192:XDRAW 1 AT H*2,0:XDRAW 1 AT H*2,0:ROT=48:SCALE=140:XDRAW 1 AT 0,V:XDRAW 1 AT 140,V:XDRAW 1 AT 0,V:XDRAW 1 AT 140,V 40150 RETURN 40200 ROT=0:SCALE=1:XDRAW 2 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 2 AT H*2,V:RETURN 40300 ROT=0:SCALE=1:XDRAW 3 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 3 AT H*2,V:RETURN 40400 ROT=0:SCALE=1:XDRAW 4 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 4 AT H*2,V:RETURN 40500 ROT=0:SCALE=1:XDRAW 5 AT H*2,V:FOR X=1 TO 100:NEXT X:XDRAW 5 AT H*2,V:RETURN 40888 HOME:PRINT "Please select your mouse cursor:":PRINT 40890 PRINT "1) No Pointer (Use Bars)" 40900 PRINT "2) Arrow" 40910 PRINT "3) Cross" 40920 PRINT "4) Crosshair" 40925 PRINT "5) Pencil" 40930 PRINT:PRINT 40940 GET A$:CR=VAL(A$) 40950 IF CR<1 OR CR>5 THEN GOTO 40888 40960 HOME:RETURN 50000 HOME 50005 PRINT "Help:":PRINT 50010 PRINT " N - Clear the screen (New)" 50015 PRINT " O - Load a file (Open)" 50020 PRINT " S - Save a file" 50025 PRINT " P - Change directories (Prefix)" 50030 PRINT " C - Change the color" 50035 PRINT " I - Invert the screen" 50040 PRINT " D - Drawing commands" 50045 PRINT " M - Change the mouse pointer" 50047 PRINT " F - Turn on/off full screen graphics" 50050 PRINT " ? - Bring up this help screen" 50055 PRINT " Q - Exit the program (Quit)" 50060 PRINT:PRINT "Press any key to continue." 50062 POKE 34,20:REM PROTECTS TEXT FROM BEING OVERWRITTEN 50065 RETURN 50100 POKE 49233,0 50110 WAIT -16384,128 50120 POKE -16368,0:POKE -16384,0 50130 POKE 49232,0 50140 RETURN 50200 REM FULL SCREEN TRICK 50210 IF QA=160 THEN QA=192:POKE 49234,0:RETURN 50220 QA=160:POKE 49235,0:RETURN 63999 HCOLOR=ZZ:HPLOT XX*2,YY TO (XX*2)+1,YY:RETURN SAVE COLOR.DRAW.5 CALL -151 4000:05 00 0C 00 0E 00 35 00 47 00 5C 00 04 00 2E 2E 2E 2E 2E 3E 3F 36 35 35 3F 3C 3C 37 3E 24 24 24 4020:24 24 2C 36 36 36 36 2D 3C 24 24 2E 2F 26 2E 2F 26 3E 2D 05 00 24 24 37 36 3E 3F 7F 49 49 2D ED 4040:DB 13 36 3E 24 24 00 C1 C1 24 2C 36 B6 12 36 3E 24 24 C1 1B 3F 7F 49 49 09 2D 2D 00 2C 2C 2C 24 4060:25 24 25 24 25 E4 C1 3A 3C D7 11 C1 C1 17 76 35 DD 4B E9 DB 03 C1 36 36 36 36 36 06 C1 C1 C1 C1 4080:C1 C1 31 2E 3E 36 00 3D0G BSAVE COLOR.DRAW.SHP,A$4000,L135