C64 Software  <  SCA: The C64 Software Collection / SCA METALLIC

  Run
1000              ;SAVE"",8
1010              ;
1020              ; 3/30/86
1030              ;
1040              ;
1050              ORG 20000
1060              ;
1070 T1           EQU 87
1080 T2           EQU 88
1090 T3           EQU 89
1100 T4           EQU 90
1110 R1           EQU 91
1120 R2           EQU 92
1130 TMP1         EQU 93
1140 FLAG         EQU 2
1150 JOBCNTR      EQU 252
1160              ;
1170 COLOR        EQU 253
1180 X            EQU 254
1190 Y            EQU 255
1200              ;
1210 ANZAHLSTRS   EQU 63
1220 ANZAHLJOBS   EQU 10
1230 V            EQU 53248
1240 SOUNDINIT    EQU $B000
1250 SOUND        EQU $B012
1260              ;
1270 SD1          EQU 16384
1280 SD2          EQU SD1+128
1290 SD3          EQU SD2+128
1300 SD4          EQU SD3+64
1310 SD5          EQU SD4+64
1320              ;
1330              ;
1340              ;
1350              ;
1360 INIT         SEI
1370              LDY #0
1380              LDA #54
1390              STA 1
1400              ;
1410              LDA #1
1420              STA 56333 ; TIMER AUS
1430              LDA #151
1440              STA 56576
1450              LDX #33
1460 VICINIT      LDA VICTAB,X
1470              STA V,X
1480              DEX
1490              BPL VICINIT
1500              ;
1510              LDA #<ISR
1520              STA 788
1530              LDA #>ISR
1540              STA 789
1550              STY JOBCNTR
1560              STY FLAG
1570              ;
1580              ;
1590 CLS          LDX #32
1600              STX CLS1+2
1610              TYA
1620 CLS1         STA 8192,Y
1630              INY
1640              BNE CLS1
1650              INC CLS1+2
1660              DEX
1670              BNE CLS1
1680              ;
1690              ;
1700 SETCOL       LDA #16
1710              STA $0400,Y
1720              STA $0500,Y
1730              STA $0600,Y
1740              STA $0700,Y
1750              INY
1760              BNE SETCOL
1770              ;
1780              LDX #5
1790              LDA #43
1800 SPRITEINIT   STA 2040,X
1810              SEC
1820              SBC #2
1830              DEX
1840              BPL SPRITEINIT
1850              ;
1860              ;
1870              LDA #0
1880              JSR SOUNDINIT
1890              ;
1900              LDA #59
1910              STA 53265
1920              CLI
1930              ;
1940 WARTE        JMP WARTE
1950              ;
1960              ;
1970              ;
1980 ISR          LDA #1
1990              STA 53273
2000              CLI
2010              ;
2020              LDX JOBCNTR
2030              DEC JOBCNTR
2040              LDA RASTERTAB,X
2050              STA 53266
2060              STA 53283
2070              ;
2080              LDA FARBTAB,X
2090              STA V+39
2100              STA V+40
2110              STA V+41
2120              STA V+42
2130              STA V+43
2140              STA V+44
2150              ;
2160              CPX #8
2170              BNE ISR1
2180              ;
2190              LDA #149 ; UNTEN
2200              JSR YPOS
2210              BNE ISRAUS
2220              ;
2230 ISR1         CPX #3
2240              BNE ISR2
2250              ;
2260              INC 2040
2270              INC 2041
2280              INC 2042
2290              INC 2043
2300              INC 2044
2310              INC 2045
2320              BNE ISRAUS
2330              ;
2340 ISR2         CPX #0
2350              BEQ ISR3
2360              ;
2370 ISRAUS       PLA
2380              TAY
2390              PLA
2400              TAX
2410              PLA
2420              RTI
2430              ;
2440              ;
2450 ISR3         LDX #ANZAHLJOBS
2460              STX JOBCNTR
2470              ;
2480              DEC 2040
2490              DEC 2041
2500              DEC 2042
2510              DEC 2043
2520              DEC 2044
2530              DEC 2045
2540              LDA #128 ; OBEN
2550              JSR YPOS
2560              ;
2570              JSR SOUND
2580              LDA FLAG
2590              EOR #164
2600              STA FLAG
2610              BNE ISRAUS
2620              ;
2630              ;
2640 NEXPIC       LDX #ANZAHLSTRS
2650              LDA #5
2660              STA T1
2670              ;
2680 LOOP         STX T2
2690              LDA SD1,X
2700              ORA SD2,X
2710              BNE M4
2720              LDA T1
2730              BEQ M5
2740              DEC T1
2750              JSR CALC
2760              AND #7
2770              STA T3
2780              LDY #0
2790              JSR CALC
2800              BMI M1
2810              LDY #7
2820 M1           TYA
2830              SEC
2840              SBC T3
2850              STA SD1,X
2860              JSR CALC
2870              AND #7
2880              STA T3
2890              LDY #0
2900              JSR CALC
2910              BMI M2
2920              LDY #7
2930 M2           TYA
2940              SEC
2950              SBC T3
2960              STA SD2,X
2970 M3           JSR CALC
2980              AND #3
2990              CMP #3
3000              BEQ M3
3010              STA SD5,X
3020 M4           LDA #3
3030              STA COLOR
3040              LDY SD4,X
3050              LDA SD3,X
3060              TAX
3070              JSR SETP
3080              LDX T2
3090              LDA SD1,X
3100              CLC
3110              ADC SD3,X
3120              STA SD3,X
3130              CLC
3140              LDA SD2,X
3150              ADC SD4,X
3160              STA SD4,X
3170 M5           LDY SD4,X
3180              LDA SD5,X
3190              STA COLOR
3200              LDA SD3,X
3210              TAX
3220              JSR SETP
3230              BPL M8
3240              LDX T2
3250              JSR CALC
3260              BMI M6
3270              SEC
3280 M6           AND #7
3290              ADC #76
3300              STA SD3,X
3310              JSR CALC
3320              BMI M7
3330              SEC
3340 M7           AND #7
3350              ADC #88
3360              STA SD4,X
3370              LDA #0
3380              STA SD1,X
3390              STA SD2,X
3400 M8           LDX T2
3410              DEX
3420              BMI M9
3430              JMP LOOP
3440 M9           JMP ISRAUS
3450              ;
3460              ;
3470 YPOS         STA V+1
3480              STA V+3
3490              STA V+5
3500              STA V+7
3510              STA V+9
3520              STA V+11
3530              RTS
3540              ;
3550 SETP         STX X
3560              STY Y
3570              LDA X
3580              CMP #160
3590              BCC SETP1
3600              LDA #128
3610              RTS
3620              ;
3630 SETP1        LDA Y
3640              CMP #192
3650              BCC SETP2
3660              LDA #128
3670              RTS
3680              ;
3690 SETP2        LDX Y
3700              LDA OFL,X
3710              STA TMP1
3720              LDA OFH,X
3730              STA TMP1+1
3740              LDA X
3750              LSR
3760              LSR
3770              TAX
3780              LDA OF1L,X
3790              CLC
3800              ADC TMP1
3810              STA TMP1
3820              LDA OF1H,X
3830              ADC TMP1+1
3840              STA TMP1+1
3850              LDA X
3860              AND #3
3870              TAX
3880              LDY COLOR
3890              LDA SETTAB1,Y
3900              AND SETTAB2,X
3910              STA SETP3+1
3920              LDY #0
3930              LDA (TMP1),Y
3940              AND SETTAB3,X
3950 SETP3        ORA #0
3960              STA (TMP1),Y
3970              TYA
3980              RTS
3990              ;
4000              ;
4010 CALC         LDA R1
4020              ROL R1
4030              EOR R1
4040              ROR R1
4050              INC R2
4060              ADC R2
4070              BVC CALC1
4080              INC R2
4090 CALC1        STA R1
4100              RTS
4110              ;
4120              ;
4130              ;
4140              ;
4150 SETTAB1      DFB $FF,$55,$AA,$00
4160 SETTAB2      DFB $C0,$30,$0C,$03
4170 SETTAB3      DFB $3F,$CF,$F3,$FC
4180              ;
4190              ;
4200 OFL          DFB $00,$01,$02,$03,$04,$05,$06,$07
4210              DFB $40,$41,$42,$43,$44,$45,$46,$47
4220              DFB $80,$81,$82,$83,$84,$85,$86,$87
4230              DFB $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7
4240              DFB $00,$01,$02,$03,$04,$05,$06,$07
4250              DFB $40,$41,$42,$43,$44,$45,$46,$47
4260              DFB $80,$81,$82,$83,$84,$85,$86,$87
4270              DFB $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7
4280              DFB $00,$01,$02,$03,$04,$05,$06,$07
4290              DFB $40,$41,$42,$43,$44,$45,$46,$47
4300              DFB $80,$81,$82,$83,$84,$85,$86,$87
4310              DFB $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7
4320              DFB $00,$01,$02,$03,$04,$05,$06,$07
4330              DFB $40,$41,$42,$43,$44,$45,$46,$47
4340              DFB $80,$81,$82,$83,$84,$85,$86,$87
4350              DFB $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7
4360              DFB $00,$01,$02,$03,$04,$05,$06,$07
4370              DFB $40,$41,$42,$43,$44,$45,$46,$47
4380              DFB $80,$81,$82,$83,$84,$85,$86,$87
4390              DFB $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7
4400              DFB $00,$01,$02,$03,$04,$05,$06,$07
4410              DFB $40,$41,$42,$43,$44,$45,$46,$47
4420              DFB $80,$81,$82,$83,$84,$85,$86,$87
4430              DFB $C0,$C1,$C2,$C3,$C4,$C5,$C6,$C7
4440              DFB $00,$01,$02,$03,$04,$05,$06,$07
4450              ;
4460              ;
4470 OFH          DFB $20,$20,$20,$20,$20,$20,$20,$20
4480              DFB $21,$21,$21,$21,$21,$21,$21,$21
4490              DFB $22,$22,$22,$22,$22,$22,$22,$22
4500              DFB $23,$23,$23,$23,$23,$23,$23,$23
4510              DFB $25,$25,$25,$25,$25,$25,$25,$25
4520              DFB $26,$26,$26,$26,$26,$26,$26,$26
4530              DFB $27,$27,$27,$27,$27,$27,$27,$27
4540              DFB $28,$28,$28,$28,$28,$28,$28,$28
4550              DFB $2A,$2A,$2A,$2A,$2A,$2A,$2A,$2A
4560              DFB $2B,$2B,$2B,$2B,$2B,$2B,$2B,$2B
4570              DFB $2C,$2C,$2C,$2C,$2C,$2C,$2C,$2C
4580              DFB $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D
4590              DFB $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F
4600              DFB $30,$30,$30,$30,$30,$30,$30,$30
4610              DFB $31,$31,$31,$31,$31,$31,$31,$31
4620              DFB $32,$32,$32,$32,$32,$32,$32,$32
4630              DFB $34,$34,$34,$34,$34,$34,$34,$34
4640              DFB $35,$35,$35,$35,$35,$35,$35,$35
4650              DFB $36,$36,$36,$36,$36,$36,$36,$36
4660              DFB $37,$37,$37,$37,$37,$37,$37,$37
4670              DFB $39,$39,$39,$39,$39,$39,$39,$39
4680              DFB $3A,$3A,$3A,$3A,$3A,$3A,$3A,$3A
4690              DFB $3B,$3B,$3B,$3B,$3B,$3B,$3B,$3B
4700              DFB $3C,$3C,$3C,$3C,$3C,$3C,$3C,$3C
4710              DFB $3D,$3D,$3D,$3D,$3D,$3D,$3D,$3D
4720              ;
4730              ;
4740 OF1L         DFB $00,$08,$10,$18,$20,$28,$30,$38
4750              DFB $40,$48,$50,$58,$60,$68,$70,$78
4760              DFB $80,$88,$90,$98,$A0,$A8,$B0,$B8
4770              DFB $C0,$C8,$D0,$D8,$E0,$E8,$F0,$F8
4780              DFB $00,$08,$10,$18,$20,$28,$30,$38
4790              ;
4800 OF1H         DFB $00,$00,$00,$00,$00,$00,$00,$00
4810              DFB $00,$00,$00,$00,$00,$00,$00,$00
4820              DFB $00,$00,$00,$00,$00,$00,$00,$00
4830              DFB $00,$00,$00,$00,$00,$00,$00,$00
4840              DFB $01,$01,$01,$01,$01,$01,$01,$01
4850              ;
4860              ;
4870 VICTAB       DFB 108,0,132,0,160,0,184,0
4880              DFB 212,0,236,0,  0,0,  0,0,0
4890              DFB 11,20,0,0,255,8,0,24
4900              DFB 0,129,0,0,0,0,0,0,0
4910              ;
4920 RASTERTAB    DFB 124,180,161,152,146,144,142,140,133,129,127
4930 FARBTAB      DFB 0,4,15,12,11,0,11,1,12,14
READY.