C64 Software  <  SCA: The C64 Software Collection / SIDPLAYER.S.C

  Run
1000              ;SAVE""
1010              ORG 16384
1020 JOY          EQU 56320
1030 B            EQU 1548
1040 BCOL         EQU B+55296-1024
1050 NORMAL       EQU 75
1060              ;
1070 ANF          JSR INIT
1080              LDA #0
1090              LDX #0
1100              LDY #0
1110              JSR SOUNDI
1120              ;
1130 LOOP         JSR WAITTIMER
1140              LDA #0
1150              LDX #0
1160              LDY #0
1170              JSR SOUNDP
1180              LDA DONE
1190              BNE LOOP
1200              ;
1210              SEI
1220              LDA #0
1230              STA 53274
1240              LDA 53274
1250              STA 54296
1260              LDA #129
1270              STA 56333
1280              ;
1290              DEC 1
1300              LDX #2
1310 RESTZ        LDA 53248,X
1320              STA 0,X
1330              INX
1340              BNE RESTZ
1350              ;
1360              LDA #55
1370              STA 1
1380              LDA #NORMAL
1390              STA 56325
1400              LDA SPEED
1410              CLI
1420              RTS
1430              ;
1440              ;
1450 ISR          PHA
1460              TXA
1470              PHA
1480              TYA
1490              PHA
1500              ;
1510              LDA 53273
1520              STA 53273
1530              ;
1540              LDX JOY
1550              TXA
1560              AND #2     ; RUNTER
1570              BNE ISR1
1580              LDA SPEED
1590              CMP #255
1600              BEQ ISR1
1610              INC SPEED
1620              JSR SHOWSPEED
1630              JMP ISROUT
1640 ISR1         TXA
1650              AND #1     ; RAUF
1660              BNE ISR2
1670              LDA SPEED
1680              BEQ ISR2
1690              DEC SPEED
1700              JSR SHOWSPEED
1710              JMP ISROUT
1720 ISR2         TXA
1730              AND #16    ; KNOPF
1740              BNE ISROUT
1750              ;
1760 FERTG        LDA #0
1770              STA DONE
1780              ;
1790 ISROUT       PLA
1800              TAY
1810              PLA
1820              TAX
1830              PLA
1840              RTI
1850              ;
1860 INIT         SEI
1870              LDA #53
1880              STA 1
1890              LDA #%00000001
1900              STA 56333
1910              LDA 56333
1920              LDX #0
1930              TXA
1940 INIT1        STA 54296,X
1950              INX
1960              BPL INIT1
1970              LDA #<ISR
1980              STA 65534
1990              LDA #>ISR
2000              STA 65535
2010              LDA #27
2020              STA 53265
2030              STA 53266
2040              STA DONE
2050              LDA #%10000001
2060              STA 53274
2070              LDA #15
2080              STA 54296
2090              LDA #NORMAL
2100              STA SPEED
2110              ;
2120              DEC 1
2130              LDX #2
2140 INIT2        LDA 0,X
2150              STA 53248,X
2160              LDA #0
2170              STA 0,X
2180              INX
2190              BNE INIT2
2200              INC 1
2210              ;
2220              CLI
2230              JMP SHOWINIT
2240              ;
2250 WAITTIMER    LDA SPEED
2260              STA 56325
2270 WAITTIMER1   LDA 56333
2280              AND #1
2290              BEQ WAITTIMER1
2300              RTS
2310              ;
2320 SHOWINIT     LDY #31
2330              LDA #8    ; ORANGE
2340 SHOWINIT0    STA BCOL,Y
2350              CPY #25
2360              BNE SHOWINIT1
2370              LDA #7    ; YELLOW
2380 SHOWINIT1    CPY #18
2390              BNE SHOWINIT2
2400              LDA #9    ; BROWN
2410 SHOWINIT2    DEY
2420              BPL SHOWINIT0
2430              ;
2440 SHOWSPEED    LDA SPEED
2450              EOR #255
2460              PHA
2470              LSR
2480              LSR
2490              LSR
2500              LDY #0
2510              TAX
2520              BEQ SHOWSPEED2
2530              LDA #160
2540 SHOWSPEED1   STA B,Y
2550              INY
2560              DEX
2570              BNE SHOWSPEED1
2580 SHOWSPEED2   PLA
2590              AND #7
2600              TAX
2610              LDA SHOWTAB,X
2620              STA B,Y
2630              RTS
2640              ;
2650 SPEED        DFB 70
2660 DONE         DFB 1
2670 SHOWTAB      DFB 32,101,116,117,97,246,234,231
2680 SOUNDI       RTS
2690 SOUNDP       RTS
READY.