home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1987 November
/
1987-11.d64
/
geopuzzle.src
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
8KB
|
365 lines
10 open2,8,1,"0:geopuzzle"
20 sys 700
30 .opt o2,p
40 ;
50 ;
60 ;geopuzzle
70 ;
80 ;by rhett anderson & david hensley jr
90 ;
100 ;copyright 1987 compute! publications, inc.
110 ;all rights reserved
120 ;
130 ;pal format
140 ;
150 ;
160 *= $304
170 ;
180 ; we start at $304 to insure the
190 ; actual geos code starts at $400
200 ;
210 .byte (63+$80) ; add 80 for
220 ; uncompressed sprite data
230 .byte 0,0,0
240 .byte 255,255,254
250 .byte 128,0,2
260 .byte 159,125,242
270 .byte 159,69,242
280 .byte 159,69,242
290 .byte 159,125,242
300 .byte 128,0,2
310 .byte 159,125,242
320 .byte 145,85,18
330 .byte 145,85,18
340 .byte 159,125,242
350 .byte 128,0,2
360 .byte 159,125,242
370 .byte 159,69,242
380 .byte 159,69,242
390 .byte 159,125,242
400 .byte 128,0,2
410 .byte 255,255,254
420 .byte 0,0,0
430 .byte 0,0,0
440 .byte $80+3
450 .byte 6
460 .byte 0
470 .word $400
480 .word endcode
490 .word $400
500 .asc "geopuzzle v1.0"
510 .byte 0,0,0,0
520 .asc "anderson & hensley"
530 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
540 ;
550 ; geos equates
560 ;
570 setpattern = $c139
580 newdisk = $c1e1
590 irectangle = $c19f
600 iputstring = $c1ae
610 r0 = 2
620 mouseup = $c18a
630 enterdesk = $c22c
640 doicons = $c15a
650 ;
660 ztemp = $70
670 ;
680 *= $400
690 jsr newdisk ;stop drive motor
700 jsr mouseup ;activate mouse
710 lda #20 ;draw screen
720 jsr setpattern
730 jsr irectangle
740 .byte 0,199
750 .word 0,319
760 lda #1
770 jsr setpattern
780 jsr irectangle
790 .byte 32,167
800 .word 32,231
810 jsr dobackcolor
820 jsr drawblocks
830 jsr iputstring
840 .word 104
850 .byte 18
860 .asc "geopuzzle"
870 .byte 0
880 jsr iputstring
890 .word 10
900 .byte 188
910 .asc "copyright 1987 compute! publications,"
920 .asc " inc. - all rights reserved"
930 .byte 0
940 lda #<gameicons
950 sta r0
960 lda #>gameicons
970 sta r0+1
980 jsr doicons
990 rts
1000 ;
1010 doit jsr dobackcolor : jmp enterdesk
1020 ;
1030 ;the icon table
1040 ;
1050 gameicons .byte 14
1060 .word 160
1070 .byte 100
1080 ;
1090 button1 .word downarrow
1100 .byte 10,42
1110 .byte 1,8
1120 .word dorot0
1130 ;
1140 button2 .word downarrow
1150 .byte 15,42
1160 .byte 1,8
1170 .word dorot1
1180 ;
1190 button3 .word downarrow
1200 .byte 20,42
1210 .byte 1,8
1220 .word dorot2
1230 ;
1240 button4 .word uparrow
1250 .byte 10,151
1260 .byte 1,8
1270 .word dorot3
1280 ;
1290 button5 .word uparrow
1300 .byte 15,151
1310 .byte 1,8
1320 .word dorot4
1330 ;
1340 button6 .word uparrow
1350 .byte 20,151
1360 .byte 1,8
1370 .word dorot5
1380 ;
1390 button7 .word rightarrow
1400 .byte 6,65
1410 .byte 1,8
1420 .word dorot6
1430 ;
1440 button8 .word rightarrow
1450 .byte 6,97
1460 .byte 1,8
1470 .word dorot7
1480 ;
1490 button9 .word rightarrow
1500 .byte 6,129
1510 .byte 1,8
1520 .word dorot8
1530 ;
1540 button10 .word leftarrow
1550 .byte 25,65
1560 .byte 1,8
1570 .word dorot9
1580 ;
1590 button11 .word leftarrow
1600 .byte 25,97
1610 .byte 1,8
1620 .word dorot10
1630 ;
1640 button12 .word leftarrow
1650 .byte 25,129
1660 .byte 1,8
1670 .word dorot11
1680 ;
1690 button13 .word wrench
1700 .byte 33,70
1710 .byte 3,21
1720 .word dowrench
1730 ;
1740 button14 .word geos
1750 .byte 33,110
1760 .byte 3,21
1770 .word doit
1780 ;
1790 ;icon images
1800 ;
1810 downarrow .byte 128+8
1820 .byte 24,24,24,24,255,126,60,24
1830 ;
1840 uparrow .byte 128+8
1850 .byte 24,60,126,255,24,24,24,24
1860 ;
1870 leftarrow .byte 128+8
1880 .byte 16,48,112,255,255,112,48,16
1890 ;
1900 rightarrow .byte 128+8
1910 .byte 8,12,14,255,255,14,12,8
1920 ;
1930 drawblocks ldx ppoint : lda pat0,x
1940 jsr setpattern
1950 jsr irectangle
1960 .byte 56,79
1970 .word 72,103
1980 ldx ppoint+1 : lda pat0,x
1990 jsr setpattern
2000 jsr irectangle
2010 .byte 56,79
2020 .word 112,143
2030 ldx ppoint+2 : lda pat0,x
2040 jsr setpattern
2050 jsr irectangle
2060 .byte 56,79
2070 .word 152,183
2080 ldx ppoint+3 : lda pat0,x
2090 jsr setpattern
2100 jsr irectangle
2110 .byte 88,111
2120 .word 72,103
2130 ldx ppoint+4 : lda pat0,x : jsr setpattern
2140 jsr irectangle
2150 .byte 88,111
2160 .word 112,143
2170 ldx ppoint+5 : lda pat0,x : jsr setpattern
2180 jsr irectangle
2190 .byte 88,111
2200 .word 152,183
2210 ldx ppoint+6 : lda pat0,x : jsr setpattern
2220 jsr irectangle
2230 .byte 120,143
2240 .word 72,103
2250 ldx ppoint+7 : lda pat0,x : jsr setpattern
2260 jsr irectangle
2270 .byte 120,143
2280 .word 112,143
2290 ldx ppoint+8 : lda pat0,x : jsr setpattern
2300 jsr irectangle
2310 .byte 120,143
2320 .word 152,183
2330 jsr docolors
2340 rts
2350 ;
2360 ppoint .byte 0,1,2,3,4,5,6,7,8
2370 pat0 .byte 29
2380 pat1 .byte 30
2390 pat2 .byte 29
2400 pat3 .byte 30
2410 pat4 .byte 24
2420 pat5 .byte 30
2430 pat6 .byte 29
2440 pat7 .byte 30
2450 pat8 .byte 29
2460 ;
2470 ;definitions for the large icons
2480 ;
2490 wrench .byte 128+63,0,0,0,255,255,254,128,0
2500 .byte 2,159,125,242,159,69,242,159
2510 .byte 69,242,159,125,242,128,0,2
2520 .byte 159,125,242,145,85,18,145,85
2530 .byte 18,159,125,242,128,0,2,159
2540 .byte 125,242,159,69,242,159,69,242
2550 .byte 159,125,242,128,0,2,255,255
2560 .byte 254,0,0,0,0,0,0,0
2570 geos .byte 128+63,0,0,0,255,255,254,131,199
2580 .byte 130,135,79,194,142,125,226,156
2590 .byte 3,242,156,3,242,188,7,250
2600 .byte 190,7,250,190,115,250,191,123
2610 .byte 250,190,63,250,188,15,250,156
2620 .byte 7,242,158,7,242,143,15,226
2630 .byte 135,159,194,131,223,130,255,255
2640 .byte 254,0,0,0,0,0,0,4
2650 ;
2660 dorot0 lda ppoint : ldx ppoint+3 : ldy ppoint+6
2670 sta ppoint+3 : stx ppoint+6 : sty ppoint
2680 jmp drawblocks
2690 dorot1 lda ppoint+1 : ldx ppoint+4 : ldy ppoint+7
2700 sta ppoint+4 : stx ppoint+7 : sty ppoint+1
2710 jmp drawblocks
2720 dorot2 lda ppoint+2 : ldx ppoint+5 : ldy ppoint+8
2730 sta ppoint+5 : stx ppoint+8 : sty ppoint+2
2740 jmp drawblocks
2750 dorot3 lda ppoint+0 : ldx ppoint+3 : ldy ppoint+6
2760 sta ppoint+6 : stx ppoint+0 : sty ppoint+3
2770 jmp drawblocks
2780 dorot4 lda ppoint+1 : ldx ppoint+4 : ldy ppoint+7
2790 sta ppoint+7 : stx ppoint+1 : sty ppoint+4
2800 jmp drawblocks
2810 dorot5 lda ppoint+2 : ldx ppoint+5 : ldy ppoint +8
2820 sta ppoint+8 : stx ppoint+2 : sty ppoint+5
2830 jmp drawblocks
2840 dorot6 lda ppoint+0 : ldx ppoint+1 : ldy ppoint+2
2850 sta ppoint+1 : stx ppoint+2 : sty ppoint+0
2860 jmp drawblocks
2870 dorot7 lda ppoint+3 : ldx ppoint+4 : ldy ppoint+5
2880 sta ppoint+4 : stx ppoint+5 : sty ppoint+3
2890 jmp drawblocks
2900 dorot8 lda ppoint+6 : ldx ppoint+7 : ldy ppoint+8
2910 sta ppoint+7 : stx ppoint+8 : sty ppoint+6
2920 jmp drawblocks
2930 dorot9 lda ppoint+0 : ldx ppoint+1 : ldy ppoint+2
2940 sta ppoint+2 : stx ppoint+0 : sty ppoint+1
2950 jmp drawblocks
2960 dorot10 lda ppoint+3 : ldx ppoint+4 : ldy ppoint+5
2970 sta ppoint+5 : stx ppoint+3 : sty ppoint+4
2980 jmp drawblocks
2990 dorot11 lda ppoint+6 : ldx ppoint+7 : ldy ppoint+8
3000 sta ppoint+8 : stx ppoint+6 : sty ppoint+7
3010 jmp drawblocks
3020 dowrench ldx #8
3030 loopw txa : sta ppoint,x : dex : bpl loopw
3040 jmp drawblocks
3050 ;
3060 dobackcolor ldx #250
3070 lda #14
3080 coloop sta $8c00-1,x
3090 sta $8c00+249,x
3100 sta $8c00+499,x
3110 sta $8c00+749,x
3120 dex
3130 bne coloop
3140 rts
3150 docolors ldy #8
3160 bigloop lda ppoint,y
3170 tax
3180 lda ltheadd,y
3190 sta ztemp
3200 lda htheadd,y
3210 sta ztemp+1
3220 tya
3230 pha
3240 ldy #0
3250 lda col0,x
3260 sta (ztemp),y
3270 iny : sta (ztemp),y : iny
3280 lda col1,x
3290 sta (ztemp),y : iny : sta (ztemp),y
3300 ldy #80
3310 lda col2,x
3320 sta (ztemp),y
3330 iny : sta (ztemp),y : iny
3340 lda col3,x
3350 sta (ztemp),y : iny : sta (ztemp),y
3360 pla
3370 tay
3380 dey
3390 bpl bigloop
3400 rts
3410 ;
3420 ltheadd .byte <(7*40+$8c00+9)
3430 .byte <(7*40+$8c00+14)
3440 .byte <(7*40+$8c00+19)
3450 .byte <(11*40+$8c00+9)
3460 .byte <(11*40+$8c00+14)
3470 .byte <(11*40+$8c00+19)
3480 .byte <(15*40+$8c00+9)
3490 .byte <(15*40+$8c00+14)
3500 .byte <(15*40+$8c00+19)
3510 htheadd .byte >(7*40+$8c00+9)
3520 .byte >(7*40+$8c00+14)
3530 .byte >(7*40+$8c00+19)
3540 .byte >(11*40+$8c00+9)
3550 .byte >(11*40+$8c00+14)
3560 .byte >(11*40+$8c00+19)
3570 .byte >(15*40+$8c00+9)
3580 .byte >(15*40+$8c00+14)
3590 .byte >(15*40+$8c00+19)
3600 col0 .byte 14,14,14,14,7,5,14,2,4
36