C64 Software  <  SCA: The C64 Software Collection / 16.9.1915

  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              BMI 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 BODCHAR
2440              BEQ BODCHAR
2450              CMP #9  ; >""
2460              BCS BODCHAR
2470              LDX #0
2480              STX HINBYTE
2490              LDX #39
2500              STX HERBYTE
2510              STA COMMADO
2520 BODCHAR      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              BEQ STILLSTEH
4940 SCLOLOP      PHA
4950              JSR SCLOLLONE
4960              PLA
4970              TAX
4980              DEX
4990              TXA
5000              BNE SCLOLOP
5010 STILLSTEH    RTS
5020              ;
5030 SCLOLLONE    DEC 53248+14
5040              DEC 53248+12
5050              DEC 53248+10
5060              DEC 53248+8
5070              DEC 53248+6
5080              DEC 53248+4
5090              DEC 53248+2
5100              DEC 53248
5110              LDA 53248
5120              CMP #16
5130              BEQ SWEITER
5140              RTS
5150              ;
5160 SWEITER      LDY #7
5170              LDX #0
5180 PLUSACHT     LDA 53248,X
5190              CLC
5200              ADC #16
5210              STA 53248,X
5220              INX
5230              INX
5240              DEY
5250              BPL PLUSACHT
5260              ;
5270              LDA #7
5280              STA ROW
5290              LDA #<SPRITES
5300              STA PTR1
5310              LDA #>SPRITES
5320              STA PTR1+1
5330              ;
5340 SCLOLL1      LDX #22
5350              LDY #1
5360 SCLOLL2      LDA (PTR1),Y
5370              DEY
5380              STA (PTR1),Y
5390              INY
5400              INY
5410              DEX
5420              BPL SCLOLL2
5430              ;
5440              LDY #64
5450              LDX #8
5460 SCLOLL3      LDA (PTR1),Y
5470              PHA
5480              TYA
5490              SEC
5500              SBC #62
5510              TAY
5520              PLA
5530              STA (PTR1),Y
5540              TYA
5550              CLC
5560              ADC #65
5570              TAY
5580              DEX
5590              BNE SCLOLL3
5600              ;
5610              LDA PTR1
5620              CLC
5630              ADC #64
5640              STA PTR1
5650              BCC SCLOLL4
5660              INC PTR1+1
5670              ;
5680 SCLOLL4      DEC ROW
5690              BNE SCLOLL1
5700              ;
5710              LDA #0
5720              STA PTR1
5730              LDA CHARBASE
5740              STA PTR1+1
5750              ;
5760              LDY #0
5770 SCLOLLT1     LDA (TEXT),Y
5780              BNE SCLOLL5
5790              ;
5800              LDA #<TEXTTAB
5810              STA TEXT
5820              LDA #>TEXTTAB
5830              STA TEXT+1
5840              BNE SCLOLLT1
5850              ;
5860 SCLOLL5      INC TEXT
5870              BNE SCLOLL6
5880              INC TEXT+1
5890              ;
5900 SCLOLL6      ASL
5910              ROL PTR1+1
5920              ASL
5930              ROL PTR1+1
5940              ASL
5950              ROL PTR1+1
5960              STA PTR1
5970              LDA #51
5980              STA 1
5990              LDX #0
6000              LDY #0
6010 SCLOLL7      LDA (PTR1),Y
6020              STA SPRITES+386,X
6030              INX
6040              INX
6050              INX
6060              INY
6070              CPY #8
6080              BCC SCLOLL7
6090              LDA #55
6100              STA 1
6110              ;
6120 SCLOLLAUS    RTS
6130              ;
6140 SPRITECYCLE  LDY #6
6150 SPRCYC       LDA SPRCOLTAB,Y
6160              STA 53287,Y
6170              DEY
6180              BPL SPRCYC
6190              ;
6200              LDY #95
6210              LDA SPRCOLTAB+96
6220              TAX
6230 SPRCOLROTATE LDA SPRCOLTAB,Y
6240              STA SPRCOLTAB+1,Y
6250              DEY
6260              BPL SPRCOLROTATE
6270              TXA
6280              STA SPRCOLTAB
6290              RTS
6300              ;
6310              ;
6320 SPRITEBOUNCE LDY BOUNCECOUNTER
6330              CPY #58
6340              BNE REALBOUNCE
6350              LDA #0
6360              STA BOUNCECOUNTER
6370              LDY #0
6380 REALBOUNCE   LDX #14
6390              LDA BOUNCEDATA,Y
6400 SUBBOUNC     STA $D001,X
6410              DEX
6420              DEX
6430              BPL SUBBOUNC
6440              INC BOUNCECOUNTER
6450              RTS
6460              ;
6470              ;
6480 BOUNCEDATA   DFB 110,110,110,110,111,111,111,112,112,112,113,113,114,114,115
6490              DFB 115,116,117,118,119,120,121,122,123,124,125,126,127,129,130
6500              DFB 132,132,130,129,127,126,125,124,123,122,121,120,119,118
6510              DFB 117,116,115,115,114,114,113,113,112,112,112,111,111,111
6520              ;
6530 SPRCOLTAB    DFB 6,6,14,14,3,3,1,1,3,3,14,14,6,6,0,0
6540              DFB 6,2,14,10,3,7,1,1,3,8,14,10,6,2,0,0
6550              DFB 2,2,10,10,8,7,1,1,7,8,10,10,2,2,0,0
6560              DFB 2,9,10,5,8,13,1,1,7,13,10,5,2,9,0,0
6570              DFB 9,9,5,5,13,13,1,1,13,13,5,5,9,9,0,0
6580              DFB 9,6,5,14,13,3,1,1,13,3,5,14,9,6,0,0
6590              ;
6600              ;
6610 VICTAB       DFB 32,0,80,0,128,0,176,0,224,0,16,0,64,0,112,0,%11100000
6620              DFB 27,IY,0,0,255,8,EY,56,1,129,0,0,255,0,0
6630              DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
6640              ;
6650 TEXTTAB      DFB ""
6660              DFB ""
6670              DFB ""
6680              DFB ""
6690              DFB ""
6700              DFB ""
6710              DFB "",34,""
6720              DFB ""
6730              DFB "",34
6740              DFB ""
6750              DFB ""
6760              DFB ""
6770              DFB ""
6780              DFB ""
6790              DFB ""
6800              DFB ""
6810              DFB ""
6820              DFB ""
6830              DFB ""
6840              DFB ""
6850              DFB ""
6860              ;
6870              ;
6880 CYCLEFLAG    DFB 0
6890 CHARBASE     DFB 16
6900 RAUFFARB     DFB 0
6910 DOWNFARB     DFB 1
6920 FARBTAB      DFB 0 ; 64 BYTES
READY.