C64 Software  <  SCA: The C64 Software Collection / HADES NEBULA

  Run
1000              ORG $3100
1010 COUNTER      EQU 2
1020 ZEROFREE     EQU 163
1030 SCOLLBTS     EQU ZEROFREE
1040 SCOLLSPEED   EQU ZEROFREE+1
1050 TEXT         EQU ZEROFREE+2
1060 ACTUAL       EQU ZEROFREE+4
1070 RRKIND       EQU ZEROFREE+5
1080 SOLLSBLINKEN EQU ZEROFREE+6
1090 BLINKA       EQU ZEROFREE+7
1100              ;
1110 COL          EQU 53281
1120              ;
1130 SOUNDINIT    EQU $7000
1140 SOUND2       EQU $7003
1150              ;
1160 BILDSCHIRM   EQU $4400
1170 SCOLLADR     EQU BILDSCHIRM+320
1180 LIVES        EQU BILDSCHIRM+706
1190 CHAR         EQU $4000
1200 FARBWURST    EQU 828
1210              ;
1220              ;
1230              ;
1240 INIT         LDA #0
1250              STA 53280
1260              STA 646
1270              JSR $E544
1280              JSR CHARINIT
1290              ;
1300              SEI
1310              LDA #<INTERRUPT
1320              STA 788
1330              LDA #>INTERRUPT
1340              STA 789
1350              LDA #127
1360              STA 56333
1370              LDA #30
1380              STA 53266
1390              LDA #91
1400              STA 53265
1410              LDA #129
1420              STA 53274
1430              STA 657
1440              STA 650
1450              ;
1460              LDA #1
1470              STA COUNTER
1480              LDA #6
1490              STA ACTUAL
1500              ;
1510              LDA #1
1520              STA SCOLLSPEED
1530              STA BLINKA
1540              STA SOLLSBLINKEN
1550              JSR DOSCOINIT
1560              LDX #$06
1570              LDY #$67
1580              JSR SOUNDINIT
1590              LDA #1
1600              STA 53273
1610              CLI
1620              ;
1630              ;
1640 INPUT        JSR 65508
1650              BEQ INPUT
1660              ;
1670              CMP #49 ; '1'
1680              BNE I1
1690              SEI
1700              LDX #$06
1710              LDY #$67
1720              JSR SOUNDINIT
1730              CLI
1740              JMP INPUT
1750              ;
1760 I1           CMP #50 ; '2'
1770              BNE I2
1780              SEI
1790              LDX #$06
1800              LDY #$6E
1810              JSR SOUNDINIT
1820              CLI
1830              JMP INPUT
1840              ;
1850 I2           CMP #51 ; '3'
1860              BNE I3
1870              SEI
1880              LDX #$D8
1890              LDY #$65
1900              JSR SOUNDINIT
1910              CLI
1920              JMP INPUT
1930              ;
1940 I3           CMP #43 ; '+'
1950              BNE I4
1960              LDA LIVES
1970              CMP #57
1980              BNE I31
1990              LDA LIVES+1
2000              CMP #57
2010              BEQ INPUT
2020 I31          LDX LIVES+1
2030              INX
2040              CPX #58
2050              BNE I32
2060              LDX #48
2070              INC LIVES
2080 I32          STX LIVES+1
2090              JMP INPUT
2100              ;
2110 I4           CMP #45 ; '-'
2120              BNE I5
2130              LDA LIVES
2140              CMP #48
2150              BNE I41
2160              LDA LIVES+1
2170              CMP #49
2180              BEQ INPUT
2190 I41          LDX LIVES+1
2200              DEX
2210              CPX #47
2220              BNE I42
2230              LDX #57
2240              DEC LIVES
2250 I42          STX LIVES+1
2260              JMP INPUT
2270              ;
2280 I5           CMP #32 ; ' '
2290              BNE I6
2300              JMP GAME
2310              ;
2320 I6           CMP #67 ; 'C'
2330              BNE I7
2340              LDX #0
2350              TXA
2360 I61          STA $2B15,X
2370              STA $2C00,X
2380              STA $2D00,X
2390              STA $2E00,X
2400              STA $2F00,X
2410              INX
2420              BNE I61
2430              JMP GAME
2440              ;
2450 I7           CMP #84 ; 'T'
2460              BNE I8
2470              LDA #$2C
2480              STA $1971
2490              JMP GAME
2500              ;
2510 I8           JMP INPUT
2520              ;
2530              ;
2540 GAME         LDA LIVES
2550              SEC
2560              SBC #48
2570              STA LIVES
2580              ASL
2590              ASL
2600              CLC
2610              ADC LIVES
2620              ASL
2630              CLC
2640              ADC LIVES+1
2650              SEC
2660              SBC #48
2670              STA $08E7
2680              ;
2690              LDX #0
2700 GAME1        LDA $3A50,X
2710              STA $4550,X
2720              LDA $3B00,X
2730              STA $4600,X
2740              LDA $3C00,X
2750              STA $4700,X
2760              INX
2770              BNE GAME1
2780              JMP $4876
2790              ;
2800              ;
2810 CHARINIT     SEI
2820              LDA #51
2830              STA 1
2840              LDX #0
2850 CHARINIT1    LDA $D000,X
2860              EOR #$FF
2870              STA CHAR,X
2880              LDA $D100,X
2890              EOR #$FF
2900              STA CHAR+256,X
2910              INX
2920              BNE CHARINIT1
2930              ;
2940              LDX #7
2950              LDA #0
2960 SPACEBACK    STA CHAR,X
2970              DEX
2980              BPL SPACEBACK
2990              ;
3000              ;
3010              LDA #55
3020              STA 1
3030              LDA #16
3040              STA 53272
3050              LDA #150
3060              STA 56576
3070              CLI
3080              RTS
3090              ;
3100              ;
3110 COLA         DFB 2,10,7,1,7,10,2,0,6,14,3,3,3,14,6,0
3120 COLB         DFB 9,5,13,1,13,5,9,0,2,10,7,1,7,10,2,0
3130 COLC         DFB 2,10,7,1,7,10,2,0,11,12,15,1,15,12,11,0
3140              ;
3150              ;
3160 INTERRUPT    LDA #1
3170              STA 53273
3180              ;
3190              LDX #49
3200              LDY #49
3210 MAIN         LDA FARBWURST,Y
3220              ;
3230 WARTEN       CPX 53266
3240              BCS WARTEN
3250              ;
3260              STA COL
3270              INX
3280              DEY
3290              BPL MAIN
3300              JSR SCOLL
3310              JSR BLINKER
3320              JSR CYCLE
3330              JSR SOUND2
3340              JMP $EA31
3350              ;
3360 CYCLE        DEC COUNTER
3370              BEQ CYCLEJA
3380              RTS
3390              ;
3400 CYCLEJA      LDA #2
3410              STA COUNTER
3420              ;
3430              LDY #1
3440              LDX FARBDAT+1
3450 CYCLE1       LDA FARBDAT+1,Y
3460              STA FARBDAT,Y
3470              STA FARBWURST,Y
3480              INY
3490              CPY #62
3500              BNE CYCLE1
3510              STX FARBDAT+62
3520              ;
3530              ;
3540 FARBRAUF     LDA ACTUAL
3550 NORMAL       LDY #13
3560              JSR CONTROUL
3570 LOS          LDA FARBLINE,Y
3580              PHA
3590              TYA
3600              CLC
3610              ADC ACTUAL
3620              TAX
3630              PLA
3640              STA FARBWURST-9,X
3650              DEY
3660              BPL LOS
3670              RTS
3680              ;
3690 CONTROUL     LDA RRKIND
3700              AND #1
3710              BEQ HINAB
3720              INC ACTUAL
3730              INC ACTUAL
3740              LDA ACTUAL
3750              CMP #60
3760              BEQ RUNTERMACH
3770              RTS
3780 RUNTERMACH   INC RRKIND
3790              RTS
3800              ;
3810 HINAB        DEC ACTUAL
3820              DEC ACTUAL
3830              BEQ RAUFMACH
3840              RTS
3850 RAUFMACH     DEC RRKIND
3860              RTS
3870              ;
3880              ;
3890 SCOLL        LDA #112
3900              LDX SCOLLBTS
3910 SCOLL0       CMP 53266
3920              BCS SCOLL0
3930              STX 53270
3940              LDA #1
3950              STA 53281
3960              ;
3970 SCOLL1       LDA 53266
3980              CMP #124
3990              BCC SCOLL1
4000              LDA #200
4010              STA 53270
4020              ;
4030              LDA SCOLLSPEED
4040 SCOLL2       PHA
4050              JSR SCOLLIT
4060              PLA
4070              SEC
4080              SBC #1
4090              BNE SCOLL2
4100              ;
4110              RTS
4120              ;
4130              ;
4140 SCOLLIT      DEC SCOLLBTS
4150              BMI DOSCOLLIT
4160              RTS
4170              ;
4180 DOSCOLLIT    LDA #7
4190              STA SCOLLBTS
4200              ;
4210              LDX #0
4220 DOSCO1       LDA SCOLLADR+1,X
4230              STA SCOLLADR,X
4240              INX
4250              CPX #39
4260              BNE DOSCO1
4270              ;
4280 DOSCO2       LDY #0
4290              LDA (TEXT),Y
4300              BNE DOSCO3
4310              ;
4320 DOSCOINIT    LDA #<TEXTTAB
4330              STA TEXT
4340              LDA #>TEXTTAB
4350              STA TEXT+1
4360              BNE DOSCO2
4370              ;
4380 DOSCO3       INC TEXT
4390              BNE DOSCO4
4400              INC TEXT+1
4410              ;
4420 DOSCO4       CMP #245
4430              BCC DOSCO5
4440              ;
4450              SEC
4460              SBC #244
4470              STA SCOLLSPEED
4480              JMP DOSCO2
4490              ;
4500 DOSCO5       STA SCOLLADR+39
4510              RTS
4520              ;
4530 BLINKER      DEC SOLLSBLINKEN
4540              BEQ BLINK
4550              RTS
4560 BLINK        LDA #4
4570              STA SOLLSBLINKEN
4580              LDX BLINKA
4590              LDA COLA,X
4600              STA 53282
4610              LDA COLB,X
4620              STA 53283
4630              LDA COLC,X
4640              STA 53284
4650              DEX
4660              STX BLINKA
4670              BMI BLINKINIT
4680              RTS
4690 BLINKINIT    LDA #15
4700              STA BLINKA
4710              RTS
4720              ;
4730 FARBDAT      DFB 0,0,11,11,12,12,15,15,1,1,15,15,12,12,11,11,0,0
4740              DFB 6,6,14,14,3,3,1,1,3,3,14,14,6,6,0,0
4750              DFB 2,2,10,10,7,7,1,1,7,7,10,10,2,2,0,0
4760              ;DFB 5,5,3,3,13,13,1,1,13,13,3,3,5,5,0,0
4770              DFB 9,9,8,8,7,7,1,1,7,7,8,8,9,9
4780              ;
4790 FARBLINE     DFB 5,5,3,3,13,13,1,1,13,13,3,3,5,5
4800              ;
4810              ;
4820 TEXTTAB      DFB 245,""
4830              DFB 246,""
4840              DFB ""
4850              DFB 247,""
4860              DFB ""
4870              DFB ""
4880              DFB 246,""
4890              DFB ""
4900              DFB "",247,""
4910              DFB ""
4920              DFB ""
4930              DFB ""
4940              DFB ""
4950              DFB "",205,""
4960              DFB ""
4970              DFB ""
4980              DFB""
4990              DFB 245,""
5000 SCHL         DFB 0
READY.