C64 Software  <  SCA: The C64 Software Collection / 15.9.1340

  Run
1000              ORG $6000
1010              JMP $6050
1020              ORG $6050
1030              ;
1040 IY           EQU 46   ;WANN IRQ
1050 EY           EQU 255  ;EXPAND Y
1060 PTR1         EQU 154
1070 PTR2         EQU 156
1080 PTR3         EQU 158
1090 TEXT         EQU 163
1100 ACTSCRN      EQU 165
1110 ROW          EQU 167
1120 SPEED        EQU 168
1130 BOUNCECOUNTEREQU 169
1140 COMMADO      EQU 170
1150 HINBYTE      EQU 176
1160 HERBYTE      EQU 177
1170              ;
1180 SCABASE      EQU $3000
1190 COL1         EQU $8C00
1200 COL2         EQU $8800
1210 SCRN         EQU COL1
1220 ACTCHAR      EQU $A000
1230 SPRITEPTR    EQU COL1+1016
1240 SPRITENR     EQU 160
1250 SPRITES      EQU $A800
1260 MUZAK        EQU $E03F
1270              ;
1280              SEI
1290              LDA #<MAIN
1300              STA 788
1310              LDA #>MAIN
1320              STA 789
1330              LDA #127
1340              STA 56333
1350              ;
1360              LDX #0
1370 INIT1        LDA COL2,X
1380              STA $D800,X
1390              LDA COL2+256,X
1400              STA $D900,X
1410              LDA COL2+512,X
1420              STA $DA00,X
1430              LDA COL2+768,X
1440              STA $DB00,X
1450              INX
1460              BNE INIT1
1470              ;
1480              LDX #46
1490 INIT2        LDA VICTAB,X
1500              STA 53248,X
1510              DEX
1520              BPL INIT2
1530              LDA #149
1540              STA 56576
1550              STA 657 ; SHIFTCOMMO
1560              STA 650 ; REPEAT ON
1570              ;
1580              LDX #8
1590              LDA #SPRITENR+7
1600 INIT3        STA SPRITEPTR-1,X
1610              SEC
1620              SBC #1
1630              DEX
1640              BNE INIT3
1650              ;
1660              LDA #<TEXTTAB
1670              STA TEXT
1680              LDA #>TEXTTAB
1690              STA TEXT+1
1700              ;
1710              LDA #2
1720              STA SPEED
1730              JSR SOUNDINIT
1740              CLI
1750              ;
1760              LDA #2     ; SCA INIT
1770              STA COMMADO
1780              ;
1790 ZEICHENHOL   JSR 65508
1800              BEQ ZEICHENHOL
1810              CMP #43 ; ""
1820              BNE ZEICHENHOL1
1830              LDX SPEED
1840              CPX #15
1850              BEQ ZEICHENHOL
1860              INC SPEED
1870              JMP ZEICHENHOL
1880              ;
1890 ZEICHENHOL1  CMP #45 ; ""
1900              BNE ZEICHENHOL2
1910              LDX SPEED
1920              DEX
1930              BEQ ZEICHENHOL
1940              STX SPEED
1950              JMP ZEICHENHOL
1960              ;
1970 ZEICHENHOL2  CMP #133 ; F1
1980              BNE ZEICHENHOL3
1990              LDX #1
2000              STX CYCLEFLAG
2010              JMP ZEICHENHOL
2020              ;
2030 ZEICHENHOL3  CMP #134 ; F3
2040              BNE ZEICHENHOL4
2050              LDX #0
2060              STX CYCLEFLAG
2070              JMP ZEICHENHOL
2080              ;
2090 ZEICHENHOL4  CMP #135 ; F5
2100              BNE ZEICHENHOL5
2110              LDX RAUFFARB
2120 FOOL1        INX
2130              TXA
2140              AND #3
2150              CMP DOWNFARB
2160              BEQ FOOL1
2170              STA RAUFFARB
2180              JMP ZEICHENHOL
2190              ;
2200 ZEICHENHOL5  CMP #136 ; F7
2210              BNE ZEICHENHOL6
2220              LDX DOWNFARB
2230 FOOL2        INX
2240              TXA
2250              AND #3
2260              CMP RAUFFARB
2270              BEQ FOOL2
2280              STA DOWNFARB
2290              JMP ZEICHENHOL
2300              ;
2310 ZEICHENHOL6  CMP #32
2320              BNE ZEICHENHOL7
2330              LDX CHARBASE
2340              INX
2350              CPX #17
2360              BNE PUH
2370              LDX #14
2380 PUH          STX CHARBASE
2390              JMP ZEICHENHOL
2400              ;
2410 ZEICHENHOL7  SEC
2420              SBC #48 ; ""-1
2430              BCC ZEICHENHOL
2440              BEQ ZEICHENHOL
2450              CMP #9  ; >""
2460              BCS ZEICHENHOL
2470              LDX #0
2480              STX HINBYTE
2490              LDX #39
2500              STX HERBYTE
2510              STA COMMADO
2520              JMP ZEICHENHOL
2530              ;
2540 SOUNDINIT    LDA #$35
2550              STA 1
2560              LDA #$40
2570              STA $E574
2580              LDA #2
2590              STA $E623
2600              JSR MUZAK
2610              LDA #$37
2620              STA 1
2630              RTS
2640              ;
2650              ;
2660 MAIN         LDA #1
2670              STA 53273
2680              LDA #$35
2690              STA 1
2700              JSR HIRESOFF
2710              JSR RASTER
2720              JSR MUZAK
2730              ;
2740 SYNCHRO      LDA 53266
2750              CMP #151
2760              BCC SYNCHRO
2770              ;
2780              JSR HIRESON
2790              JSR SPRITEBOUNCE
2800              JSR SPRITECYCLE
2810              LDA CYCLEFLAG
2820              BEQ NOCYCLE
2830              JSR FARBRAUF
2840              JSR FARBDOWN
2850 NOCYCLE      JSR FARBREIN
2860              JSR SCLOLL
2870              LDA #$37
2880              STA 1
2890              JSR SCRNWECHS
2900              JMP $EA31
2910              PLA
2920              TAX
2930              PLA
2940              TAY
2950              PLA
2960              RTI
2970              ;
2980              ;
2990 RASTER       LDX #48;GENAUOBEN
3000              LDY #58
3010 RAS2         LDA FARBTAB,Y
3020 RAS1         CPX 53266
3030              BCS RAS1
3040              STA 53281
3050              INX
3060              DEY
3070              BPL RAS2
3080              RTS
3090              ;
3100              ;
3110 HIRESON      LDA #59
3120              STA 53265
3130              LDA #216
3140              STA 53270
3150              RTS
3160              ;
3170              ;
3180 HIRESOFF     LDA #27
3190              STA 53265
3200              LDA #0
3210              STA 53270
3220              RTS
3230              ;
3240              ;
3250              ;
3260 SCRNWECHS    LDA COMMADO
3270              BEQ GOBACK
3280              BMI SCRNREIN
3290              LDA #0
3300              LDX HINBYTE
3310              LDY HERBYTE
3320              STA SCRN,X
3330              STA SCRN+80,X
3340              STA SCRN+160,X
3350              STA SCRN+240,X
3360              STA SCRN+40,Y
3370              STA SCRN+120,Y
3380              STA SCRN+200,Y
3390              INC HINBYTE
3400              DEC HERBYTE
3410              BPL GOBACK
3420              ;
3430              LDA COMMADO
3440              ASL         ; MAL 6
3450              CLC
3460              ADC COMMADO
3470              ASL
3480              CLC
3490              ADC #>SCABASE-6
3500              STA ACTSCRN+1
3510              ;
3520              LDA #0
3530              STA COMMADO
3540              CLI
3550              LDA #<ACTCHAR
3560              LDX #>ACTCHAR
3570              STA PTR2
3580              STX PTR2+1
3590              LDX #4     ; 4 BLOCKS
3600              LDY #0
3610 COPYCHAR     LDA (ACTSCRN),Y
3620              STA (PTR2),Y
3630              INY
3640              BNE COPYCHAR
3650              INC ACTSCRN+1
3660              INC PTR2+1
3670              DEX
3680              BNE COPYCHAR
3690              ;
3700              LDA #$80    ; START!
3710              STA COMMADO
3720 GOBACK       RTS
3730              ;
3740 SCRNREIN     AND #$7F
3750              CMP #39
3760              BCS COMMADOCLR
3770              TAY
3780              LDA #<SCRN
3790              STA PTR1
3800              LDA #>SCRN
3810              STA PTR1+1
3820              LDX #6 ; 7 LINIEN
3830 SCRNREIN1    LDA (ACTSCRN),Y
3840              STA (PTR1),Y
3850              LDA ACTSCRN
3860              CLC
3870              ADC #40
3880              STA ACTSCRN
3890              STA PTR1
3900              DEX
3910              BPL SCRNREIN1
3920              LDA #0
3930              STA ACTSCRN
3940              INC COMMADO
3950              RTS
3960 COMMADOCLR   LDA #0
3970              STA COMMADO
3980              RTS
3990              ;
4000              ;
4010 FARBRAUF     LDA RAUFFARB
4020              JSR GETVEC
4030              ;
4040              LDY #0
4050              LDA (PTR1),Y
4060              PHA
4070              LDY #1
4080 FARBRAUF1    LDA (PTR1),Y
4090              DEY
4100              STA (PTR1),Y
4110              INY
4120              INY
4130              CPY #32
4140              BNE FARBRAUF1
4150              PLA
4160              LDY #31
4170              STA (PTR1),Y
4180              RTS
4190              ;
4200              ;
4210 FARBDOWN     LDA DOWNFARB
4220              JSR GETVEC
4230              ;
4240              LDY #31
4250              LDA (PTR1),Y
4260              PHA
4270 FARBDOWN1    DEY
4280              LDA (PTR1),Y
4290              INY
4300              STA (PTR1),Y
4310              DEY
4320              BNE FARBDOWN1
4330              PLA
4340              STA (PTR1),Y
4350              RTS
4360              ;
4370 GETVEC       ASL
4380              TAX
4390              LDA FARBTABTAB,X
4400              STA PTR1
4410              LDA FARBTABTAB+1,X
4420              STA PTR1+1
4430              RTS
4440              ;
4450              ;
4460 FARBREIN     LDA DOWNFARB
4470              JSR GETVEC
4480              LDA PTR1
4490              STA PTR3
4500              LDA PTR1+1
4510              STA PTR3+1
4520              LDA RAUFFARB
4530              JSR GETVEC
4540 FARBREIN     LDY #31
4550              LDX #64
4560 FARBLOOP     LDA (PTR1),Y
4570              STA FARBTAB,X
4580              DEX
4590              LDA (PTR3),Y
4600              STA FARBTAB,X
4610              DEX
4620              DEY
4630              BPL FARBLOOP
4640              RTS
4650              ;
4660              ;
4670 FARBTABTAB   DFB <FARBTAB1,>FARBTAB1
4680              DFB <FARBTAB2,>FARBTAB2
4690              DFB <FARBTAB3,>FARBTAB3
4700              DFB <FARBTAB4,>FARBTAB4
4710              ;
4720              ;
4730 FARBTAB1     DFB 0,2,0,2,2,10,2,10,10,7
4740              DFB 10,7,7,1,7,1,1,7,1,7,7,10,7,10,10
4750              DFB 2,10,2,2,0,2,0
4760              ;
4770              ;
4780 FARBTAB2     DFB 0,6,0,6,6,14,6,14
4790              DFB 14,3,14,3,3,1,3,1,1,3,1,3,3
4800              DFB 14,3,14,14,6,14,6,6,0,6,0,6,0
4810              ;
4820              ;
4830 FARBTAB3     DFB 0,11,0,11,11,12,11,12,12,15
4840              DFB 12,15,15,1,15,1,1,15,1,15,15,12,15,12,12
4850              DFB 11,12,11,11,0,2,0
4860              ;
4870              ;
4880 FARBTAB4     DFB 0,9,0,9,9,5,9,5,5,13
4890              DFB 5,13,13,1,13,1,1,13,1,13,13,12,13,5,5
4900              DFB 9,5,9,9,0,2,0,0,0
4910              ;
4920 SCLOLL       LDA SPEED
4930 SCLOLOP      PHA
4940              JSR SCLOLLONE
4950              PLA
4960              TAX
4970              DEX
4980              TXA
4990              BNE SCLOLOP
5000              RTS
5010              ;
5020 SCLOLLONE    DEC 53248+14
5030              DEC 53248+12
5040              DEC 53248+10
5050              DEC 53248+8
5060              DEC 53248+6
5070              DEC 53248+4
5080              DEC 53248+2
5090              DEC 53248
5100              LDA 53248
5110              CMP #16
5120              BEQ SWEITER
5130              RTS
5140              ;
5150 SWEITER      LDY #7
5160              LDX #0
5170 PLUSACHT     LDA 53248,X
5180              CLC
5190              ADC #16
5200              STA 53248,X
5210              INX
5220              INX
5230              DEY
5240              BPL PLUSACHT
5250              ;
5260              LDA #7
5270              STA ROW
5280              LDA #<SPRITES
5290              STA PTR1
5300              LDA #>SPRITES
5310              STA PTR1+1
5320              ;
5330 SCLOLL1      LDX #22
5340              LDY #1
5350 SCLOLL2      LDA (PTR1),Y
5360              DEY
5370              STA (PTR1),Y
5380              INY
5390              INY
5400              DEX
5410              BPL SCLOLL2
5420              ;
5430              LDY #64
5440              LDX #8
5450 SCLOLL3      LDA (PTR1),Y
5460              PHA
5470              TYA
5480              SEC
5490              SBC #62
5500              TAY
5510              PLA
5520              STA (PTR1),Y
5530              TYA
5540              CLC
5550              ADC #65
5560              TAY
5570              DEX
5580              BNE SCLOLL3
5590              ;
5600              LDA PTR1
5610              CLC
5620              ADC #64
5630              STA PTR1
5640              BCC SCLOLL4
5650              INC PTR1+1
5660              ;
5670 SCLOLL4      DEC ROW
5680              BNE SCLOLL1
5690              ;
5700              LDA #0
5710              STA PTR1
5720              LDA CHARBASE
5730              STA PTR1+1
5740              ;
5750              LDY #0
5760 SCLOLLT1     LDA (TEXT),Y
5770              BNE SCLOLL5
5780              ;
5790              LDA #<TEXTTAB
5800              STA TEXT
5810              LDA #>TEXTTAB
5820              STA TEXT+1
5830              BNE SCLOLLT1
5840              ;
5850 SCLOLL5      INC TEXT
5860              BNE SCLOLL6
5870              INC TEXT+1
5880              ;
5890 SCLOLL6      ASL
5900              ROL PTR1+1
5910              ASL
5920              ROL PTR1+1
5930              ASL
5940              ROL PTR1+1
5950              STA PTR1
5960              LDA #51
5970              STA 1
5980              LDX #0
5990              LDY #0
6000 SCLOLL7      LDA (PTR1),Y
6010              STA SPRITES+386,X
6020              INX
6030              INX
6040              INX
6050              INY
6060              CPY #8
6070              BCC SCLOLL7
6080              LDA #55
6090              STA 1
6100              ;
6110 SCLOLLAUS    RTS
6120              ;
6130 SPRITECYCLE  LDY #6
6140 SPRCYC       LDA SPRCOLTAB,Y
6150              STA 53287,Y
6160              DEY
6170              BPL SPRCYC
6180              ;
6190              LDY #95
6200              LDA SPRCOLTAB+96
6210              TAX
6220 SPRCOLROTATE LDA SPRCOLTAB,Y
6230              STA SPRCOLTAB+1,Y
6240              DEY
6250              BPL SPRCOLROTATE
6260              TXA
6270              STA SPRCOLTAB
6280              RTS
6290              ;
6300              ;
6310 SPRITEBOUNCE LDY BOUNCECOUNTER
6320              CPY #58
6330              BNE REALBOUNCE
6340              LDA #0
6350              STA BOUNCECOUNTER
6360              LDY #0
6370 REALBOUNCE   LDX #14
6380              LDA BOUNCEDATA,Y
6390 SUBBOUNC     STA $D001,X
6400              DEX
6410              DEX
6420              BPL SUBBOUNC
6430              INC BOUNCECOUNTER
6440              RTS
6450              ;
6460              ;
6470 BOUNCEDATA   DFB 110,110,110,110,111,111,111,112,112,112,113,113,114,114,115
6480              DFB 115,116,117,118,119,120,121,122,123,124,125,126,127,129,130
6490              DFB 132,132,130,129,127,126,125,124,123,122,121,120,119,118
6500              DFB 117,116,115,115,114,114,113,113,112,112,112,111,111,111
6510              ;
6520 SPRCOLTAB    DFB 6,6,14,14,3,3,1,1,3,3,14,14,6,6,0,0
6530              DFB 6,2,14,10,3,7,1,1,3,8,14,10,6,2,0,0
6540              DFB 2,2,10,10,8,7,1,1,7,8,10,10,2,2,0,0
6550              DFB 2,9,10,5,8,13,1,1,7,13,10,5,2,9,0,0
6560              DFB 9,9,5,5,13,13,1,1,13,13,5,5,9,9,0,0
6570              DFB 9,6,5,14,13,3,1,1,13,3,5,14,9,6,0,0
6580              ;
6590              ;
6600 VICTAB       DFB 32,0,80,0,128,0,176,0,224,0,16,0,64,0,112,0,%11100000
6610              DFB 27,IY,0,0,255,8,EY,56,1,129,0,0,255,0,0
6620              DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
6630              ;
6640 TEXTTAB      DFB ""
6650              DFB ""
6660              DFB ""
6670              DFB "",0
6680              ;
6690              ;
6700 CYCLEFLAG    DFB 0
6710 CHARBASE     DFB 16
6720 RAUFFARB     DFB 0
6730 DOWNFARB     DFB 1
6740 FARBTAB      DFB 0 ; 64 BYTES
READY.