C64 Software  <  SCA: The C64 Software Collection / DIVIN (CHAR ORIG

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