C64 Software  <  SCA: The C64 Software Collection / DIVINE(CHAR$4000

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