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 SEC
2320 SBC #48 ; ""-1
2330 BCC ZEICHENHOL
2340 BEQ ZEICHENHOL
2350 CMP #9 ; >""
2360 BCS ZEICHENHOL
2370 LDX #0
2380 STX HINBYTE
2390 LDX #39
2400 STX HERBYTE
2410 STA COMMADO
2420 JMP ZEICHENHOL
2430 ;
2440 SOUNDINIT LDA #$35
2450 STA 1
2460 LDA #$40
2470 STA $E574
2480 LDA #2
2490 STA $E623
2500 JSR MUZAK
2510 LDA #$37
2520 STA 1
2530 RTS
2540 ;
2550 ;
2560 MAIN LDA #1
2570 STA 53273
2580 LDA #$35
2590 STA 1
2600 JSR HIRESOFF
2610 JSR RASTER
2620 JSR MUZAK
2630 ;
2640 SYNCHRO LDA 53266
2650 CMP #151
2660 BCC SYNCHRO
2670 ;
2680 JSR HIRESON
2690 JSR SPRITEBOUNCE
2700 JSR SPRITECYCLE
2710 LDA CYCLEFLAG
2720 BEQ NOCYCLE
2730 JSR FARBRAUF
2740 JSR FARBDOWN
2750 NOCYCLE JSR FARBREIN
2760 JSR SCLOLL
2770 LDA #$37
2780 STA 1
2790 JSR SCRNWECHS
2800 JMP $EA31
2810 PLA
2820 TAX
2830 PLA
2840 TAY
2850 PLA
2860 RTI
2870 ;
2880 ;
2890 RASTER LDX #48;GENAUOBEN
2900 LDY #58
2910 RAS2 LDA FARBTAB,Y
2920 RAS1 CPX 53266
2930 BCS RAS1
2940 STA 53281
2950 INX
2960 DEY
2970 BPL RAS2
2980 RTS
2990 ;
3000 ;
3010 HIRESON LDA #59
3020 STA 53265
3030 LDA #216
3040 STA 53270
3050 RTS
3060 ;
3070 ;
3080 HIRESOFF LDA #27
3090 STA 53265
3100 LDA #0
3110 STA 53270
3120 RTS
3130 ;
3140 ;
3150 ;
3160 SCRNWECHS LDA COMMADO
3170 BEQ GOBACK
3180 BMI SCRNREIN
3190 LDA #0
3200 LDX HINBYTE
3210 LDY HERBYTE
3220 STA SCRN,X
3230 STA SCRN+80,X
3240 STA SCRN+160,X
3250 STA SCRN+240,X
3260 STA SCRN+40,Y
3270 STA SCRN+120,Y
3280 STA SCRN+200,Y
3290 INC HINBYTE
3300 DEC HERBYTE
3310 BPL GOBACK
3320 ;
3330 LDA COMMADO
3340 ASL ; MAL 6
3350 CLC
3360 ADC COMMADO
3370 ASL
3380 CLC
3390 ADC #>SCABASE-6
3400 STA ACTSCRN+1
3410 ;
3420 LDA #0
3430 STA COMMADO
3440 CLI
3450 LDA #<ACTCHAR
3460 LDX #>ACTCHAR
3470 STA PTR2
3480 STX PTR2+1
3490 LDX #4 ; 4 BLOCKS
3500 LDY #0
3510 COPYCHAR LDA (ACTSCRN),Y
3520 STA (PTR2),Y
3530 INY
3540 BNE COPYCHAR
3550 INC ACTSCRN+1
3560 INC PTR2+1
3570 DEX
3580 BNE COPYCHAR
3590 ;
3600 LDA #$80 ; START!
3610 STA COMMADO
3620 GOBACK RTS
3630 ;
3640 SCRNREIN AND #$7F
3650 CMP #39
3660 BCS COMMADOCLR
3670 TAY
3680 LDA #<SCRN
3690 STA PTR1
3700 LDA #>SCRN
3710 STA PTR1+1
3720 LDX #6 ; 7 LINIEN
3730 SCRNREIN1 LDA (ACTSCRN),Y
3740 STA (PTR1),Y
3750 LDA ACTSCRN
3760 CLC
3770 ADC #40
3780 STA ACTSCRN
3790 STA PTR1
3800 DEX
3810 BPL SCRNREIN1
3820 LDA #0
3830 STA ACTSCRN
3840 INC COMMADO
3850 RTS
3860 COMMADOCLR LDA #0
3870 STA COMMADO
3880 RTS
3890 ;
3900 ;
3910 FARBRAUF LDA RAUFFARB
3920 JSR GETVEC
3930 ;
3940 LDY #0
3950 LDA (PTR1),Y
3960 PHA
3970 LDY #1
3980 FARBRAUF1 LDA (PTR1),Y
3990 DEY
4000 STA (PTR1),Y
4010 INY
4020 INY
4030 CPY #32
4040 BNE FARBRAUF1
4050 PLA
4060 LDY #31
4070 STA (PTR1),Y
4080 RTS
4090 ;
4100 ;
4110 FARBDOWN LDA DOWNFARB
4120 JSR GETVEC
4130 ;
4140 LDY #31
4150 LDA (PTR1),Y
4160 PHA
4170 FARBDOWN1 DEY
4180 LDA (PTR1),Y
4190 INY
4200 STA (PTR1),Y
4210 DEY
4220 BNE FARBDOWN1
4230 PLA
4240 STA (PTR1),Y
4250 RTS
4260 ;
4270 GETVEC ASL
4280 TAX
4290 LDA FARBTABTAB,X
4300 STA PTR1
4310 LDA FARBTABTAB+1,X
4320 STA PTR1+1
4330 RTS
4340 ;
4350 ;
4360 FARBREIN LDA DOWNFARB
4370 JSR GETVEC
4380 LDA PTR1
4390 STA PTR3
4400 LDA PTR1+1
4410 STA PTR3+1
4420 LDA RAUFFARB
4430 JSR GETVEC
4440 FARBREIN LDY #31
4450 LDX #64
4460 FARBLOOP LDA (PTR1),Y
4470 STA FARBTAB,X
4480 DEX
4490 LDA (PTR3),Y
4500 STA FARBTAB,X
4510 DEX
4520 DEY
4530 BPL FARBLOOP
4540 RTS
4550 ;
4560 ;
4570 FARBTABTAB DFB <FARBTAB1,>FARBTAB1
4580 DFB <FARBTAB2,>FARBTAB2
4590 DFB <FARBTAB3,>FARBTAB3
4600 DFB <FARBTAB4,>FARBTAB4
4610 ;
4620 ;
4630 FARBTAB1 DFB 0,2,0,2,2,10,2,10,10,7
4640 DFB 10,7,7,1,7,1,1,7,1,7,7,10,7,10,10
4650 DFB 2,10,2,2,0,2,0
4660 ;
4670 ;
4680 FARBTAB2 DFB 0,6,0,6,6,14,6,14
4690 DFB 14,3,14,3,3,1,3,1,1,3,1,3,3
4700 DFB 14,3,14,14,6,14,6,6,0,6,0,6,0
4710 ;
4720 ;
4730 FARBTAB3 DFB 0,11,0,11,11,12,11,12,12,15
4740 DFB 12,15,15,1,15,1,1,15,1,15,15,12,15,12,12
4750 DFB 11,12,11,11,0,2,0
4760 ;
4770 ;
4780 FARBTAB4 DFB 0,9,0,9,9,5,9,5,5,13
4790 DFB 5,13,13,1,13,1,1,13,1,13,13,12,13,5,5
4800 DFB 9,5,9,9,0,2,0,0,0
4810 ;
4820 SCLOLL LDA SPEED
4830 SCLOLOP PHA
4840 JSR SCLOLLONE
4850 PLA
4860 TAX
4870 DEX
4880 TXA
4890 BNE SCLOLOP
4900 RTS
4910 ;
4920 SCLOLLONE DEC 53248+14
4930 DEC 53248+12
4940 DEC 53248+10
4950 DEC 53248+8
4960 DEC 53248+6
4970 DEC 53248+4
4980 DEC 53248+2
4990 DEC 53248
5000 LDA 53248
5010 CMP #16
5020 BEQ SWEITER
5030 RTS
5040 ;
5050 SWEITER LDY #7
5060 LDX #0
5070 PLUSACHT LDA 53248,X
5080 CLC
5090 ADC #16
5100 STA 53248,X
5110 INX
5120 INX
5130 DEY
5140 BPL PLUSACHT
5150 ;
5160 LDA #7
5170 STA ROW
5180 LDA #<SPRITES
5190 STA PTR1
5200 LDA #>SPRITES
5210 STA PTR1+1
5220 ;
5230 SCLOLL1 LDX #22
5240 LDY #1
5250 SCLOLL2 LDA (PTR1),Y
5260 DEY
5270 STA (PTR1),Y
5280 INY
5290 INY
5300 DEX
5310 BPL SCLOLL2
5320 ;
5330 LDY #64
5340 LDX #8
5350 SCLOLL3 LDA (PTR1),Y
5360 PHA
5370 TYA
5380 SEC
5390 SBC #62
5400 TAY
5410 PLA
5420 STA (PTR1),Y
5430 TYA
5440 CLC
5450 ADC #65
5460 TAY
5470 DEX
5480 BNE SCLOLL3
5490 ;
5500 LDA PTR1
5510 CLC
5520 ADC #64
5530 STA PTR1
5540 BCC SCLOLL4
5550 INC PTR1+1
5560 ;
5570 SCLOLL4 DEC ROW
5580 BNE SCLOLL1
5590 ;
5600 LDA #0
5610 STA PTR1
5620 LDA #16 ;$80/8
5630 STA PTR1+1
5640 ;
5650 LDY #0
5660 SCLOLLT1 LDA (TEXT),Y
5670 BNE SCLOLL5
5680 ;
5690 LDA #<TEXTTAB
5700 STA TEXT
5710 LDA #>TEXTTAB
5720 STA TEXT+1
5730 BNE SCLOLLT1
5740 ;
5750 SCLOLL5 INC TEXT
5760 BNE SCLOLL6
5770 INC TEXT+1
5780 ;
5790 SCLOLL6 ASL
5800 ROL PTR1+1
5810 ASL
5820 ROL PTR1+1
5830 ASL
5840 ROL PTR1+1
5850 STA PTR1
5860 LDA #51
5870 STA 1
5880 LDX #0
5890 LDY #0
5900 SCLOLL7 LDA (PTR1),Y
5910 STA SPRITES+386,X
5920 INX
5930 INX
5940 INX
5950 INY
5960 CPY #8
5970 BCC SCLOLL7
5980 LDA #55
5990 STA 1
6000 ;
6010 SCLOLLAUS RTS
6020 ;
6030 SPRITECYCLE LDY #6
6040 SPRCYC LDA SPRCOLTAB,Y
6050 STA 53287,Y
6060 DEY
6070 BPL SPRCYC
6080 ;
6090 LDY #95
6100 LDA SPRCOLTAB+96
6110 TAX
6120 SPRCOLROTATE LDA SPRCOLTAB,Y
6130 STA SPRCOLTAB+1,Y
6140 DEY
6150 BPL SPRCOLROTATE
6160 TXA
6170 STA SPRCOLTAB
6180 RTS
6190 ;
6200 ;
6210 SPRITEBOUNCE LDY BOUNCECOUNTER
6220 CPY #58
6230 BNE REALBOUNCE
6240 LDA #0
6250 STA BOUNCECOUNTER
6260 LDY #0
6270 REALBOUNCE LDX #14
6280 LDA BOUNCEDATA,Y
6290 SUBBOUNC STA $D001,X
6300 DEX
6310 DEX
6320 BPL SUBBOUNC
6330 INC BOUNCECOUNTER
6340 RTS
6350 ;
6360 ;
6370 BOUNCEDATA DFB 110,110,110,110,111,111,111,112,112,112,113,113,114,114,115
6380 DFB 115,116,117,118,119,120,121,122,123,124,125,126,127,129,130
6390 DFB 132,132,130,129,127,126,125,124,123,122,121,120,119,118
6400 DFB 117,116,115,115,114,114,113,113,112,112,112,111,111,111
6410 ;
6420 SPRCOLTAB DFB 6,6,14,14,3,3,1,1,3,3,14,14,6,6,0,0
6425 DFB 6,2,14,10,3,7,1,1,3,8,14,10,6,2,0,0
6430 DFB 2,2,10,10,8,7,1,1,7,8,10,10,2,2,0,0
6435 DFB 2,9,10,5,8,13,1,1,7,13,10,5,2,9,0,0
6440 DFB 9,9,5,5,13,13,1,1,13,13,5,5,9,9,0,0
6445 DFB 9,6,5,14,13,3,1,1,13,3,5,14,9,6,0,0
6450 ;
6460 ;
6470 VICTAB DFB 32,0,80,0,128,0,176,0,224,0,16,0,64,0,112,0,%11100000
6480 DFB 27,IY,0,0,255,8,EY,56,1,129,0,0,255,0,0
6490 DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
6500 ;
6510 TEXTTAB DFB ""
6520 DFB ""
6530 DFB ""
6540 DFB "",0
6550 ;
6560 ;
6570 CYCLEFLAG DFB 0
6580 RAUFFARB DFB 0
6590 DOWNFARB DFB 1
6600 FARBTAB DFB 0 ; 64 BYTES
READY.