1000 ORG 20000
1010 ;
1020 JOY EQU 56320
1030 NORMAL EQU 75
1040 ;
1050 ;
1060 Y EQU 250
1070 IY EQU 248
1080 AZ EQU 26 ;ANZ BREITZ
1090 C EQU 4 ;SPRITEFARBE
1100 EY EQU 255 ;EXPAND Y
1110 ;
1120 ROW EQU 100
1130 CNTR EQU 101
1140 TEXT EQU 102
1150 PTR1 EQU 104
1160 ;
1170 SPRITEPTR EQU 2040
1180 SPRITENR EQU 128
1190 SPRITES EQU 8192
1200 LASTSPRITE EQU SPRITES+448+12
1210 REG EQU 53270
1220 ;
1230 MUZAK EQU $9E3C
1240 MUZINIT EQU $900C
1250 ;
1260 TEXTTAB EQU $1000
1270 ;
1280 ;
1290 ;
1300 ANF JSR INIT
1310 LDA #0
1320 LDX #0
1330 LDY #0
1340 JSR MUZINIT
1350 ;
1360 LOOP JSR WAITTIMER
1370 LDA #0
1380 LDX #0
1390 LDY #0
1400 JSR MUZAK
1410 LDA DONE
1420 BNE LOOP
1430 ;
1440 SEI
1450 LDA #0
1460 STA 53274
1470 LDA 53274
1480 STA 54296
1490 LDA #129
1500 STA 56333
1510 ;
1520 LDA #$31
1530 STA 788
1540 LDA #$EA
1550 STA 789
1560 ;
1570 LDA #NORMAL
1580 STA 56325
1590 LDA SPEED
1600 CLI
1610 RTS
1620 ;
1630 ;
1640 JOYSTICK LDX JOY
1650 TXA
1660 AND #2 ; RUNTER
1670 BNE JOYSTICK1
1680 LDA SPEED
1690 CMP #255
1700 BEQ JOYSTICK1
1710 INC SPEED
1720 RTS
1730 JOYSTICK1 TXA
1740 AND #1 ; RAUF
1750 BNE JOYSTICK2
1760 LDA SPEED
1770 BEQ JOYSTICK2
1780 DEC SPEED
1790 RTS
1800 JOYSTICK2 TXA
1810 AND #16 ; KNOPF
1820 BNE JOYSTICK3
1830 ;
1840 FERTG LDA #0
1850 STA DONE
1860 JOYSTICK3 RTS
1870 ;
1880 ;
1890 ;
1900 WAITTIMER LDA SPEED
1910 STA 56325
1920 WAITTIMER1 LDA 56333
1930 AND #1
1940 BEQ WAITTIMER1
1950 RTS
1960 ;
1970 ;
1980 ;********************
1990 ;
2000 INIT SEI
2010 LDA #<ISR
2020 STA 788
2030 LDA #>ISR
2040 STA 789
2050 LDA #127
2060 STA 56333
2070 LDA 56333
2080 ;
2090 LDX #46
2100 INIT1 LDA VICTAB,X
2110 STA 53248,X
2120 DEX
2130 BPL INIT1
2140 ;
2150 LDX #8
2160 STX CNTR
2170 LDA #SPRITENR+7
2180 INIT2 STA SPRITEPTR-1,X
2190 SEC
2200 SBC #1
2210 DEX
2220 BNE INIT2
2230 ;
2240 TXA
2250 INIT3 STA SPRITES,X
2260 STA SPRITES+256,X
2270 STA SPRITES+512,X
2280 INX
2290 BNE INIT3
2300 ;
2310 LDA #<TEXTTAB
2320 STA TEXT
2330 LDA #>TEXTTAB
2340 STA TEXT+1
2350 ;
2360 CLI
2370 RTS
2380 ;
2390 ;
2400 ;
2410 ISR LDA #1
2420 STA 53273
2430 LDA #19
2440 STA 53265
2450 NOP
2460 LDY #4
2470 ISR1 DEY
2480 BNE ISR1
2490 LDA #8
2500 LDX #AZ
2510 ISR3 DEC REG
2520 STA REG
2530 LDY #5
2540 ISR4 DEY
2550 BNE ISR4
2560 NOP
2570 CMP 1; 3 CYCLES
2580 DEX
2590 BNE ISR3
2600 ;
2610 LDA #27
2620 STA 53265
2630 ;
2640 JSR SCLOLL
2650 JSR JOYSTICK
2660 ;
2670 PLA
2680 TAY
2690 PLA
2700 TAX
2710 PLA
2720 RTI
2730 ;
2740 SCLOLL LDA #27
2750 SCLOLL1 STA ROW
2760 CLC
2770 ADC #<LASTSPRITE
2780 STA MODIF+1
2790 LDA #>LASTSPRITE
2800 STA MODIF+2
2810 ;
2820 LDY #8
2830 SCLOLL2 LDX #2
2840 MODIF ROL 65530,X
2850 DEX
2860 BPL MODIF
2870 ;
2880 PHP
2890 LDA MODIF+1
2900 SEC
2910 SBC #64
2920 STA MODIF+1
2930 BCS SCLOLL3
2940 DEC MODIF+2
2950 SCLOLL3 PLP
2960 DEY
2970 BNE SCLOLL2
2980 ;
2990 LDA ROW
3000 SEC
3010 SBC #3
3020 BPL SCLOLL1
3030 ;
3040 DEC CNTR
3050 LDA CNTR
3060 BNE SCLOLLAUS
3070 LDA #8
3080 STA CNTR
3090 LDA #27 ;$D8/8
3100 STA PTR1+1
3110 ;
3120 LDY #0
3130 SCLOLL4 LDA (TEXT),Y
3140 BNE SCLOLL5
3150 ;
3160 LDA #<TEXTTAB
3170 STA TEXT
3180 LDA #>TEXTTAB
3190 STA TEXT+1
3200 BNE SCLOLL4
3210 ;
3220 SCLOLL5 INC TEXT
3230 BNE SCLOLL6
3240 INC TEXT+1
3250 ;
3260 SCLOLL6 ASL
3270 ROL PTR1+1
3280 ASL
3290 ROL PTR1+1
3300 ASL
3310 ROL PTR1+1
3320 STA PTR1
3330 LDA #51
3340 STA 1
3350 LDX #0
3360 LDY #0
3370 SCLOLL7 LDA (PTR1),Y
3380 STA LASTSPRITE+2,X
3390 INX
3400 INX
3410 INX
3420 INY
3430 CPY #7
3440 BCC SCLOLL7
3450 LDA #55
3460 STA 1
3470 ;
3480 ;
3490 SCLOLLAUS RTS
3500 ;
3510 ;
3520 ;
3530 VICTAB DFB 0,Y,48,Y,96,Y,144,Y,192,Y,240,Y,32,Y,80,Y,%11000000
3540 DFB 27,IY,0,0,255,8,EY,21,1,129,0,0,255,0,0
3550 DFB 0,0,0,0,0,0,0,C,C,C,C,C,C,C,C
3560 ;
3570 SPEED DFB 70
3580 DONE DFB 1
READY.