Home » Personal collection » Commodore tapes » Commodore_64 » drawer_tr_tape01a_d60_c64_tape.wav » colour sprite
colour sprite
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Commodore tapes » Commodore_64 » drawer_tr_tape01a_d60_c64_tape.wav |
Filename: | colour sprite |
Read OK: | ✔ |
File size: | 0FF8 bytes |
Load address: | 0801 |
Exec address: | 0000 |
Duplicates
There are 2 duplicate copies of this file in the archive:
- Personal collection » Commodore disks » disk50a2_progs1.d64 » colour sprite
- Personal collection » Commodore disks » disk65a_programs_1.d64 » colour sprite
- Personal collection » Commodore tapes » Commodore_64 » drawer_tr_tape01a_d60_c64_tape.wav » colour sprite
File contents
10 REM MULTI-COLOUR SPRITE-DESIGNER 50 PRINTCHR$(147); 110 GOSUB 1020 120 GOSUB 1510 130 GOSUB 2010 140 GOSUB 5010 150 PRINT"<cursor down><cyan>DO YOU WANT TO DESIGN ANY MORE?" 160 GET ANS$:IF ANS$="" THEN 160 170 POKEVC+21,0 180 IF ANS$<>"N" THEN 50 190 END 200 : 1000 REM 1010 REM 1020 POKE 53281,0:POKE 53280,0:PRINT"<yellow>" 1030 PRINT"<home>MULTI-COLOUR SPRITES INVOLVE FOUR COL-" 1040 PRINT"OURS. PLEASE INDICATE YOUR CHOICE FOR" 1050 PRINT"EACH OF THE FOLLOWING.<cursor down>" 1060 INPUT"BACKGROUND";BACK 1070 INPUT"MULTI-COLOUR 1";C1 1080 INPUT"MULTI COLOUR 2";C2 1090 INPUT"SPRITE COLOUR";SCOL 1100 INPUT"<cursor down><cursor down>WHICH SPRITE DO YOU WANT TO DESIGN";NSPRITE 1110 VCHIP=53248 1120 REM 1130 PTR=192+NS:POKE2040+NS,PTR:PTR=PTR*64 1140 PRINT"<cursor down><cursor down>HOW DO YOU WANT TO DESIGN IT?" 1150 PRINT"S. FROM SCRATCH?" 1160 PRINT"M. MODIFYING ITS PRESENT DESIGN?" 1170 PRINT"B. BASING IT ON ANOTHER SPRITE?" 1180 GET MANNER$:IF MANNER$<>"S" AND MANNER$<>"M" AND MANNER$<>"B" THEN 1180 1190 REM 1200 IF MANNER$="S" THEN FORI=0TO62:POKEPTR+I,0:NEXT 1210 IF MANNER$="B" THEN GOSUB 3510 1220 C1=C1-1:C2=C2-1:SCOL=SCOL-1:BACK=BACK-1 1230 POKE VC+2*NS,65:POKEVC+2*NS+1,200 1240 REM 1250 POKE VC+29,0:POKEVC+23,0:POKEVC+16,0 1260 REM 1270 POKEVC+28,2^NS:POKEVC+37,C1 1280 POKEVC+38,C2:POKE39+VC+NS,SCOL 1290 REM 1300 POKEVC+21,2^NS 1310 RETURN 1320 : 1500 REM 1510 PRINTCHR$(147);SPC(13)"┌🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸┐" 1520 FORI=1TO21 1530 PRINTSPC(13)"│"SPC(24)"🭲" 1540 NEXT 1550 PRINTSPC(13)"└🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸🭸┘<home>" 1560 REM 1570 REM 1580 FORY=0TO20:FORX=0TO23STEP2 1590 POKE1078+X+40*Y,160:POKE1079+X+40*Y,160 1600 ADDR=55350+X+40*Y 1610 IF MANNER$="S" THEN POKE ADDR,BACK:POKEADDR+1,BACK:GOTO1670 1620 BITS=PEEK(PTR+INT(X/8)+3*Y)/2^(6-(X AND 7)) AND 3 1630 IF BITS=0 THEN POKE ADDR,BACK:POKE ADDR+1,BACK 1640 IF BITS=1 THEN POKE ADDR,C1:POKE ADDR+1,C1 1650 IF BITS=2 THEN POKE ADDR,SCOL:POKE ADDR+1,SCOL 1660 IF BITS=3 THEN POKE ADDR,C2:POKE ADDR+1,SCOL 1670 NEXT:NEXT 1680 PRINT"<home>USE:-" 1690 PRINT"<cursor down>Q TO QUIT" 1700 PRINT"<cursor down>SPACE OR":PRINT"DELETE TO":PRINT"CLEAR" 1710 PRINT"<cursor down>1,2,OR S":PRINT"TO FILL WITH" 1720 PRINT"MULTI COLOURS":PRINT"1 OR 2 OR" 1730 PRINT"SPRITE COLOUR" 1740 PRINT"<cursor down>CURSOR KEYS":PRINT"TO MOVE" 1750 RETURN 1760 : 2000 REM 2010 X=0:Y=0:PSN=1078:HUE=PEEK(PSN+54272) 2020 POKE PSN,214 2030 IF HUE=0 THEN POKE PSN,86:POKEPSN+54272,SCOL 2040 GET COM$:IF COM$="" THEN 2040 2050 IF COM$="Q" THEN POKE PSN+54272,HUS:RETURN 2060 IF COM$="<cursor up>" THEN GOSUB2510 2070 IF COM$="<cursor down>" THEN GOSUB2610 2080 IF COM$="<cursor left>" THEN GOSUB2710 2090 IF COM$="<cursor right>" THEN GOSUB2810 2100 IF COM$=" " THEN HUE=BACK:HNUM=0:GOSUB2420:GOSUB2810 2110 IF COM$="1" THEN HUE=C1:HNUM=1:GOSUB2420:GOSUB2800 2120 IF COM$="2" THEN HUE=C2:HNUM=3:GOSUB2420:GOSUB2810 2130 IF COM$="S" THEN HUE=SCOL:HNUM=2:GOSUB2420:GOSUB2810 2140 IF COM$=CHR$(20) THEN GOSUB 2910:GOSUB2420 2150 IF PSN<>1078+X+40*Y THEN PSN=1078+X+Y*40:HUE=PEEK(PSN+54272) AND 15 2160 IF HUE<>BACK THEN POKE PSN,214 2170 IF HUE=BACK THEN POKE PSN,86:POKE PSN+54272,SCOL 2180 GOTO 2040 2190 : 2400 REM 2410 REM 2420 ADDR=PTR+INT(X/8)+3*Y:BYTEPSN=7-X+8*INT(X/8) 2430 REM 2440 POKE ADDR,PEEK(ADDR) AND 255-3*2^(BYTEPSN-1) 2450 REM 2460 IF HUE<>BACK THEN POKE ADDR,PEEK(ADDR) OR HNUM*2^(BYTEPSN-1) 2470 RETURN 2480 : 2500 REM 2510 GOSUB3010 2520 Y=Y-1:IF Y<0 THEN Y=20 2530 RETURN 2540 : 2600 REM 2610 GOSUB 3010 2630 Y=Y+1:IF Y>20 THEN Y=0 2640 RETURN 2650 : 2700 REM 2710 GOSUB 3010 2720 X=X-2:IF X<0 THEN X=22:Y=Y-1 2730 IF Y<0 THEN Y=20 2740 RETURN 2750 : 2800 REM 2810 GOSUB 3010 2820 IF COM$<>"<cursor right>" THEN POKE PSN+54272,HUE:POKE PSN+54273,HUE 2830 X=X+2:IF X=24 THEN X=0:Y=Y+1 2840 IF Y=21 THEN Y=0 2850 RETURN 2860 : 2900 REM 2910 GOSUB 2710:HUE=BACK 2920 PSN=1078+X+40*Y:POKEPSN+54273,BACK 2930 RETURN 2940 : 3000 REM 3010 POKE PSN,160:IF HUE=BACK THEN POKE PSN+54272,BACK 3020 RETURN 3030 : 3500 REM 3510 INPUT"<cursor down><cursor down>WHICH SPRITE IS IT TO BE BASED ON";OLD 3520 OLD=12288+64*OLD 3530 PRINT"<cursor down>YOU CAN MAKE FOUR TYPES OF COPY:-" 3540 PRINT"1. DIRECT COPY" 3550 PRINT"2. HORIZONTAL REFLECTION" 3560 PRINT"3. VERTICAL REFLECTION" 3570 PRINT"4. 180-DEGREE ROTATION" 3580 INPUT"<cursor down>WHICH TYPE WOULD YOU LIKE";TYPE 3590 PRINT"<cursor down><cursor down><cyan>PLEASE BE PATIENT-THIS TAKES A WHILE.<yellow>" 3600 ON TYPE GOSUB 3810,4010,4210,4310 3610 RETURN 3620 : 3800 REM 3810 FOR I=0 TO 63 3820 POKE PTR+I,PEEK(OLD+I) 3830 NEXT 3840 RETURN 3850 : 4000 REM 4010 FOR J=0 TO 20 4020 BYTE=PEEK(OLD+3*J+2):GOSUB 4110:POKE PTR+3*J,REFLECT 4030 BYTE=PEEK(OLD+3*J+1):GOSUB 4110:POKE PTR+3*J+1,REFLECT 4040 BYTE=PEEK(OLD+3*J):GOSUB 4110:POKE PTR+3*J+2,REFLECT 4050 NEXT 4060 RETURN 4070 : 4100 REM 4110 REFLECT=0 4120 FOR I=0 TO 6 STEP 2 4130 BITS=BYTE/2^(6-I) AND 3 4140 REFLECT=REFLECT+BITS*2^I 4150 NEXT 4160 RETURN 4170 : 4200 REM 4210 FOR J=0 TO 20:FOR I=0 TO 2 4220 POKE PTR+3*J+I,PEEK(OLD+3*(20-J)+I) 4230 NEXT:NEXT 4240 RETURN 4250 : 4300 REM 4310 GOSUB 4010 4320 FOR I=0 TO 62:POKE 832+I,PEEK(PTR+I):NEXT:OLD=832 4330 GOSUB 4210 4340 RETURN 4350 : 5000 REM 5005 PRINTCHR$(147) 5010 PRINT;CHR$(147);"THE 63 NUMBERS DEFINING THE SPRITE ARE:-" 5020 FOR I=0 TO 6 5030 PRINT"<cursor down>DATA"; 5040 FOR J=0 TO 7 5050 NUM$=STR$(PEEK(PTR+9*I+J)) 5060 PRINT MID$(NUM$,2)","; 5070 NEXT 5080 NUM$=STR$(PEEK(PTR+9*I+8)) 5090 PRINT MID$(NUM$,2) 5100 NEXT 5110 RETURN
$ � MULTI-COLOUR SPRITE-DESIGNER 12 ��(147); <n � 1020 Gx � 1510 R� � 2010 ]� � 5010 �� �"�DO YOU WANT TO DESIGN ANY MORE?"