1000 ORG 20000
1010 Y EQU 110 ;POSITION
1020 IY EQU 41 ;WANN IRQ
1030 C EQU 4 ;SPRITEFARBE
1040 EY EQU 255 ;EXPAND Y
1050 ROW EQU 250
1060 SPEED EQU 251
1070 TEXT EQU 252
1080 PTR1 EQU 254
1090 ;
1100 SPRITEPTR EQU 2040
1110 SPRITENR EQU 128
1120 SPRITES EQU 8192
1130 REG EQU 53270
1140 ;
1150 SEI
1160 LDA #<MAIN
1170 STA 788
1180 LDA #>MAIN
1190 STA 789
1200 LDA #127
1210 STA 56333
1220 ;
1230 LDX #46
1240 INIT1 LDA VICTAB,X
1250 STA 53248,X
1260 DEX
1270 BPL INIT1
1280 ;
1290 LDX #8
1300 LDA #SPRITENR+7
1310 INIT2 STA SPRITEPTR-1,X
1320 SEC
1330 SBC #1
1340 DEX
1350 BNE INIT2
1360 TXA
1370 INIT3 STA SPRITES,X
1380 STA SPRITES+256,X
1390 STA SPRITES+512,X
1400 INX
1410 BNE INIT3
1420 ;
1430 LDA #<TEXTTAB
1440 STA TEXT
1450 LDA #>TEXTTAB
1460 STA TEXT+1
1470 ;
1480 LDA #2
1490 STA SPEED
1500 CLI
1510 RTS
1520 ;
1530 MAIN LDA #1
1540 STA 53273
1541 LDA #2
1542 STA 53280
1550 JSR RASTER
1560 JSR FARBRAUF
1570 JSR FARBDOWN
1580 JSR FARBREIN
1590 JSR SCLOLL
1591 LDA #0
1592 STA 53280
1600 ;JMP $EA31
1610 PLA
1620 TAX
1630 PLA
1640 TAY
1650 PLA
1660 RTI
1670 ;
1680 ;
1690 RASTER LDX #50;GENAUOBEN
1700 LDY #56
1710 RAS2 LDA FARBTAB,Y
1720 RAS1 CPX 53266
1730 BCS RAS1
1740 STA 53281
1750 INX
1760 DEY
1770 BPL RAS2
1780 RTS
1790 ;
1800 ;
1810 FARBRAUF LDA FARBRAUFTAB
1820 PHA
1830 LDX #1
1840 RAUFFARB LDA FARBRAUFTAB,X
1850 STA FARBRAUFTAB-1,X
1860 INX
1870 CPX #32
1880 BNE RAUFFARB
1890 PLA
1900 STA FARBRAUFTAB+31
1910 RTS
1920 ;
1930 ;
1940 FARBREIN LDX #31
1950 LDY #64
1960 FARBLOOP LDA FARBRAUFTAB,X
1970 STA FARBTAB,Y
1980 DEY
1990 LDA FARBDOWNTAB,X
2000 STA FARBTAB,Y
2010 DEY
2020 DEX
2030 BPL FARBLOOP
2040 RTS
2050 ;
2060 ;
2070 FARBDOWN LDA FARBDOWNTAB+33
2080 PHA
2090 LDX #33
2100 DOWNFARB LDA FARBDOWNTAB-1,X
2110 STA FARBDOWNTAB,X
2120 DEX
2130 BNE DOWNFARB
2140 PLA
2150 STA FARBDOWNTAB
2160 RTS
2170 ;
2180 ;
2190 FARBTAB DFB 0,0,0,0,0,0,0,0,0,0,0
2200 DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0
2210 DFB 0,0,0,0,0,0,0
2220 DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0
2230 DFB 0,0,0,0,0,0,0,0,0,0,0,0
2240 DFB 0,0,0,0,0,0,0
2250 ;
2260 ;
2270 FARBRAUFTAB DFB 0,2,0,2,2,10,2,10,10,7
2280 DFB 10,7,7,1,7,1,1,7,1,7,7,10,7,10,10
2290 DFB 2,10,2,2,0,2,0
2300 ;
2310 ;
2320 FARBDOWNTAB DFB 0,6,0,6,6,14,6,14
2330 DFB 14,3,14,3,3,1,3,1,1,3,1,3,3
2340 DFB 14,3,14,14,6,14,6,6,0,6,0,6,0
2350 ;
2360 ;
2370 ;
2380 SCLOLL LDA SPEED
2390 SCLOLOP PHA
2400 JSR SCLOLLONE
2410 PLA
2420 TAX
2430 DEX
2440 TXA
2450 BNE SCLOLOP
2460 RTS
2470 ;
2480 SCLOLLONE DEC 53248+14
2490 DEC 53248+12
2500 DEC 53248+10
2510 DEC 53248+8
2520 DEC 53248+6
2530 DEC 53248+4
2540 DEC 53248+2
2550 DEC 53248
2560 LDA 53248
2570 CMP #16
2580 BEQ SWEITER
2590 RTS
2600 ;
2610 SWEITER LDY #7
2620 LDX #0
2630 PLUSACHT LDA 53248,X
2640 CLC
2650 ADC #16
2660 STA 53248,X
2670 INX
2680 INX
2690 DEY
2700 BPL PLUSACHT
2710 ;
2720 LDA #7
2730 STA ROW
2740 LDA #<SPRITES
2750 STA PTR1
2760 LDA #>SPRITES
2770 STA PTR1+1
2780 ;
2790 SCLOLL1 LDX #22
2800 LDY #1
2810 SCLOLL2 LDA (PTR1),Y
2820 DEY
2830 STA (PTR1),Y
2840 INY
2850 INY
2860 DEX
2870 BPL SCLOLL2
2880 ;
2890 LDY #64
2900 LDX #8
2910 SCLOLL3 LDA (PTR1),Y
2920 PHA
2930 TYA
2940 SEC
2950 SBC #62
2960 TAY
2970 PLA
2980 STA (PTR1),Y
2990 TYA
3000 CLC
3010 ADC #65
3020 TAY
3030 DEX
3040 BNE SCLOLL3
3050 ;
3060 LDA PTR1
3070 CLC
3080 ADC #64
3090 STA PTR1
3100 BCC SCLOLL4
3110 INC PTR1+1
3120 ;
3130 SCLOLL4 DEC ROW
3140 BNE SCLOLL1
3150 ;
3160 LDA #0
3170 STA PTR1
3180 LDA #27 ;$D8/8
3190 STA PTR1+1
3200 ;
3210 LDY #0
3220 SCLOLLT1 LDA (TEXT),Y
3230 BNE SCLOLL5
3240 ;
3250 LDA #<TEXTTAB
3260 STA TEXT
3270 LDA #>TEXTTAB
3280 STA TEXT+1
3290 BNE SCLOLLT1
3300 ;
3310 SCLOLL5 INC TEXT
3320 BNE SCLOLL6
3330 INC TEXT+1
3340 ;
3350 SCLOLL6 ASL
3360 ROL PTR1+1
3370 ASL
3380 ROL PTR1+1
3390 ASL
3400 ROL PTR1+1
3410 STA PTR1
3420 LDA #51
3430 STA 1
3440 LDX #0
3450 LDY #0
3460 SCLOLL7 LDA (PTR1),Y
3470 STA SPRITES+386,X
3480 INX
3490 INX
3500 INX
3510 INY
3520 CPY #8
3530 BCC SCLOLL7
3540 LDA #55
3550 STA 1
3560 ;
3570 SCLOLLAUS RTS
3580 ;
3590 ;
3600 ;
3610 VICTAB DFB 32,Y,80,Y,128,Y,176,Y,224,Y,16,Y,64,Y,112,Y,%11100000
3620 DFB 27,IY,0,0,255,8,EY,21,1,129,0,0,255,0,0
3630 DFB 0,0,0,0,0,0,0,C,C,C,C,C,C,C,C
3640 ;
3650 TEXTTAB DFB ""
3660 DFB ""
3670 DFB ""
3680 DFB "",0
READY.