1000 ;
1010 ; LUCKY LUKE INTRO
1020 ;
1030 ORG 20000
1040 COUNTER EQU 2
1050 ZEROFREE EQU 100
1060 SCOLLBTS EQU ZEROFREE
1070 SCOLLSPEED EQU ZEROFREE+1
1080 TEXT EQU ZEROFREE+2
1090 ACTUAL EQU ZEROFREE+4
1100 RRKIND EQU ZEROFREE+5
1110 SOLLSBLINKEN EQU ZEROFREE+6
1120 BLINKA EQU ZEROFREE+7
1130 BLINKB EQU ZEROFREE+8
1140 BLINKC EQU ZEROFREE+9
1150 TIME EQU ZEROFREE+10
1160 ;
1170 COL EQU 53281
1180 ;
1190 BILDSCHIRM EQU $400
1200 SCOLLADR EQU BILDSCHIRM+320
1210 CHAR EQU 8192
1220 ZEROSAVE EQU $C000
1230 FARBWURST EQU 828
1240 ;
1250 SOUND1 EQU 4096
1260 SOUND2 EQU 4114
1270 EFFECT EQU 4111
1280 SOUNDOFF EQU 4099
1290 ;
1300 SEI
1310 INIT LDA #0
1320 STA 53280
1330 STA 646
1340 ;
1350 TAX
1360 LOCH LDA #0
1361 STA $D800,X
1370 STA $D900,X
1380 STA $DA00,X
1390 STA $DB00,X
1400 LDA 0,X
1410 STA ZEROSAVE,X
1420 INX
1430 BNE LOCH
1440 ;
1450 JSR 4102
1460 ;
1470 LDA #<INTERRUPT
1480 STA 788
1490 LDA #>INTERRUPT
1500 STA 789
1510 LDA #127
1520 STA 56333
1530 LDA #48
1540 STA 53266
1550 LDA #91-16
1560 STA 53265
1570 LDA #129
1580 STA 53274
1590 CLI
1600 ;
1610 LDA #1
1620 STA COUNTER
1630 LDA #6
1640 STA ACTUAL
1650 ;
1660 LDA #1
1670 STA SCOLLSPEED
1680 STA BLINKA
1690 STA BLINKB
1700 STA BLINKC
1710 STA SOLLSBLINKEN
1720 JSR DOSCOINIT
1730 JSR CHARINIT
1740 ;
1750 LDA #5
1760 JSR EFFECT
1770 LDA #70
1780 JSR WARTEN
1790 LDA #91
1800 STA 53265
1810 LDA #5
1820 JSR SOUND1
1830 ;
1840 ;
1850 GETC JSR 65508
1860 CMP #65 ; 'A'
1870 BCC ZAHL
1880 CMP #71 ; 'G'
1890 BCS ZAHL
1900 CMP #66
1910 BNE PSCHISS
1920 LDA #71
1930 PSCHISS SEC
1940 SBC #65
1950 JSR SOUND1
1960 JMP GETC
1970 ;
1980 ZAHL CMP #$31 ; '1'
1990 BCC GETC
2000 CMP #$36 ; '6'
2010 BCS GETC
2020 CMP #$35 ; '5'
2030 BNE WEITER1
2040 LDA #$36 ; '6'
2050 WEITER1 STA NAME+3
2060 ;
2070 LDX #112
2080 CMP #$34 ; '4'
2090 BNE WEITER2
2100 LDX #115
2110 WEITER2 STX 44+ZEROSAVE
2120 ;
2130 JSR SOUNDOFF
2140 LDA #10
2150 JSR EFFECT
2160 LDA #70
2170 JSR WARTEN
2180 ;
2190 SEI
2200 LDA #$31
2210 STA 788
2220 LDA #$EA
2230 STA 789
2240 LDA #129
2250 STA 56333
2260 LDA #128
2270 STA 53274
2280 STA 53273
2290 LDA 56333
2300 LDA #0
2310 STA 54296
2320 LDA #11
2330 STA 53265
2340 ;
2350 LDX #0
2360 HANSY LDA ZEROSAVE,X
2370 STA 0,X
2380 INX
2390 BNE HANSY
2400 CLI
2410 ;
2420 LDA #1
2430 LDX #8
2440 LDY #2
2450 JSR 65466
2460 LDA #4
2470 LDX #<NAME
2480 LDY #>NAME
2490 JSR 65469
2500 LDA #0
2510 JSR 65493
2520 STX 45
2530 STY 46
2540 ;
2550 ;
2560 JSR $E5A0 ;VIDEORESET
2570 LDA #11
2580 STA 53265
2590 LDA #0
2600 STA 53280
2610 STA 53281
2620 JSR $A659
2630 JMP $A7AE
2640 ;
2650 ;
2660 CHARINIT SEI
2670 LDA #51
2680 STA 1
2690 LDX #0
2700 CHARINIT1 LDA $D000,X
2710 EOR #$FF
2720 STA CHAR,X
2730 LDA $D100,X
2740 EOR #$FF
2750 STA CHAR+256,X
2760 INX
2770 BNE CHARINIT1
2780 ;
2790 LDX #7
2800 LDA #0
2810 SPACEBACK STA CHAR,X
2820 DEX
2830 BPL SPACEBACK
2840 ;
2850 ;
2860 LDA #55
2870 STA 1
2880 LDA #24
2890 STA 53272
2900 CLI
2910 RTS
2920 ;
2930 ;
2940 INTERRUPT LDX #49
2950 LDY #49
2960 MAIN LDA FARBWURST,Y
2970 WARTE CPX 53266
2980 BCS WARTE
2990 STA COL
3000 INX
3010 DEY
3020 BPL MAIN
3030 INY
3040 STY 53281
3050 ;
3060 LDA #1
3070 STA 53273
3080 INC TIME
3090 ;
3100 JSR BLINKER
3110 JSR SCOLL
3120 JSR CYCLE
3130 JSR SOUND2
3140 JMP $EA31
3150 ;
3160 CYCLE DEC COUNTER
3170 BEQ CYCLEJA
3180 RTS
3190 ;
3200 CYCLEJA LDA #2
3210 STA COUNTER
3220 ;
3230 LDY #1
3240 LDX FARBDAT+1
3250 CYCLE1 LDA FARBDAT+1,Y
3260 STA FARBDAT,Y
3270 STA FARBWURST,Y
3280 INY
3290 CPY #62
3300 BNE CYCLE1
3310 STX FARBDAT+62
3320 ;
3330 ;
3340 FARBRAUF LDA ACTUAL
3350 NORMAL LDY #13
3360 JSR CONTROUL
3370 LOS LDA FARBLINE,Y
3380 PHA
3390 TYA
3400 CLC
3410 ADC ACTUAL
3420 TAX
3430 PLA
3440 STA FARBWURST-9,X
3450 DEY
3460 BPL LOS
3470 ;LDA #1
3480 ;STA FARBWURST
3490 RTS
3500 ;
3510 CONTROUL LDA RRKIND
3520 AND #1
3530 BEQ HINAB
3540 INC ACTUAL
3550 INC ACTUAL
3560 LDA ACTUAL
3570 CMP #60
3580 BEQ RUNTERMACH
3590 RTS
3600 RUNTERMACH INC RRKIND
3610 RTS
3620 ;
3630 HINAB DEC ACTUAL
3640 DEC ACTUAL
3650 BEQ RAUFMACH
3660 RTS
3670 RAUFMACH DEC RRKIND
3680 RTS
3690 ;
3700 ;
3710 SCOLL LDA #112
3720 LDX SCOLLBTS
3730 SCOLL0 CMP 53266
3740 BCS SCOLL
3750 STX 53270
3760 LDA #1
3770 STA 53281
3780 ;
3790 SCOLL1 LDA 53266
3800 CMP #124
3810 BCC SCOLL1
3820 LDA #200
3830 STA 53270
3840 ;
3850 LDA SCOLLSPEED
3860 SCOLL2 PHA
3870 JSR SCOLLIT
3880 PLA
3890 SEC
3900 SBC #1
3910 BNE SCOLL2
3920 ;
3930 RTS
3940 ;
3950 ;
3960 SCOLLIT DEC SCOLLBTS
3970 BMI DOSCOLLIT
3980 RTS
3990 ;
4000 DOSCOLLIT LDA #7
4010 STA SCOLLBTS
4020 ;
4030 LDX #0
4040 DOSCO1 LDA SCOLLADR+1,X
4050 STA SCOLLADR,X
4060 INX
4070 CPX #40
4080 BNE DOSCO1
4090 ;
4100 DOSCO2 LDY #0
4110 LDA (TEXT),Y
4120 BNE DOSCO3
4130 ;
4140 DOSCOINIT LDA #<TEXTTAB
4150 STA TEXT
4160 LDA #>TEXTTAB
4170 STA TEXT+1
4180 BNE DOSCO2
4190 ;
4200 DOSCO3 INC TEXT
4210 BNE DOSCO4
4220 INC TEXT+1
4230 ;
4240 DOSCO4 CMP #245
4250 BCC DOSCO5
4260 ;
4270 SEC
4280 SBC #244
4290 STA SCOLLSPEED
4300 JMP DOSCO2
4310 ;
4320 DOSCO5 STA SCOLLADR+39
4330 RTS
4340 ;
4350 BLINKER DEC SOLLSBLINKEN
4360 BEQ BLINK
4370 RTS
4380 BLINK LDA #4
4390 STA SOLLSBLINKEN
4400 LDX BLINKA
4410 LDA COLA,X
4420 STA 53282
4430 DEX
4440 STX BLINKA
4450 BNE NEXT1
4460 LDA #7
4470 STA BLINKA
4480 NEXT1 LDX BLINKB
4490 LDA COLB,X
4500 STA 53283
4510 DEX
4520 STX BLINKB
4530 BNE NEXT2
4540 LDA #17
4550 STA BLINKB
4560 NEXT2 LDX BLINKC
4570 LDA COLC,X
4580 STA 53284
4590 DEX
4600 STX BLINKC
4610 BMI BLINKINIT
4620 RTS
4630 BLINKINIT LDA #15
4640 STA BLINKC
4650 RTS
4660 ;
4670 WARTEN CLC
4680 ADC TIME
4690 WAR2 CMP TIME
4700 BNE WAR2
4710 RTS
4720 ;
4730 ;
4740 FARBDAT DFB 0,0,11,11,12,12,15,15,1,1,15,15,12,12,11,11,0,0
4750 DFB 6,6,14,14,3,3,1,1,3,3,14,14,6,6,0,0
4760 DFB 2,2,10,10,7,7,1,1,7,7,10,10,2,2,0,0
4770 ;DFB 5,5,3,3,13,13,1,1,13,13,3,3,5,5,0,0
4780 DFB 9,9,8,8,7,7,1,1,7,7,8,8,9,9
4790 ;
4800 FARBLINE ;DFB 6,14,3,1,3,14,6,0
4810 DFB 5,5,3,3,13,13,1,1,13,13,3,3,5,5
4820 ;
4830 ;
4840 COLA DFB 0,11,12,15,1,15,12,11
4850 COLB DFB 6,14,13,7,1,7,13,14,6,0,9,5,13,1,13,5,9,0
4860 COLC DFB 2,10,7,1,7,10,2,0,9,8,7,1,7,8,9,0
4870 ;
4880 ;
4890 NAME DFB ""
4900 ;
4910 TEXTTAB DFB 245,""
4920 DFB ""
4930 DFB "",246
4940 DFB ""
4950 DFB "",247
4960 DFB "",245
4970 DFB ""
4980 DFB 247,""
4990 DFB ""
5000 DFB ""
5010 DFB ""
5020 DFB ""
5030 DFB ""
5040 DFB ""
5050 DFB ""
5060 DFB ""
5070 DFB ""
5080 DFB "",246,""
5090 DFB ""
5100 DFB "",0
READY.