1000 ;SAVE "",8
1010 ;
1020 ; SCA TITEL V1.22
1030 ;
1040 ; 25.10. 1985,
1050 ; 18.11. 1985,
1060 ; 19.11. 1985
1070 ;
1080 ; RUECKSPRUNG NACH
1090 ; (49153), ZERSTOERT
1100 ; SICH SELBST, HAT
1110 ; CBM80-RESETSCHUTZ
1120 ;
1130 ORG 820
1140 ;
1150 COLPTR EQU 160
1160 FLASH EQU 161
1170 TEXTPTR EQU 248
1180 JOBCNTR EQU 250
1190 MODE EQU 251
1200 TMP1 EQU 252
1210 TMP2 EQU 254
1220 ;
1230 F EQU 1 ; SPRITEFARBE
1240 ;
1250 BSP EQU 2048
1260 SPRITEPTR EQU BSP+1016
1270 SPD EQU 3072 ; 49 FF
1280 ;
1290 ;
1300 ;
1310 INIT LDA #47
1320 STA 0
1330 LDA #55 ;BASIC AUS
1340 STA 1
1350 LDA #1 ;TIMERIRQ
1360 STA 56333 ;ABSCHALTEN
1370 ;
1380 JSR SYNC
1390 ;
1400 LDA 56578
1410 ORA #3
1420 STA 56578
1430 LDA 56576
1440 ORA #3
1450 STA 56576
1460 ;
1470 ;
1480 SEI
1490 LDY #46
1500 INIT1 LDA VICTAB,Y
1510 STA 53248,Y
1520 LDA KILL,Y
1530 EOR CODE2
1540 STA 32768,Y
1550 DEY
1560 BPL INIT1
1570 ;
1580 INY
1590 TYA
1600 INIT2 STA $DA30,Y
1610 STA $DB00,Y
1620 DEY
1630 BNE INIT2
1640 LDA #11 ; GRAU FUER
1650 STA $DBE1 ; DATUM
1660 STA $DBE2
1670 STA $DBE3
1680 STA $DBE4
1690 ;
1700 ;
1710 INIT3 STY COLPTR
1720 LDA #100
1730 STA FLASH
1740 ;
1750 LDA #>ISR
1760 STA 789
1770 LDA #<ISR
1780 STA 788
1790 ;
1800 ;
1810 LDA #1
1820 STA JOBCNTR
1830 LDA 53273 ; REQUEST
1840 STA 53273 ; LOESCHEN
1850 LDA #59
1860 STA MODE
1870 LDA #<TEXT
1880 STA TEXTPTR
1890 LDA #>TEXT
1900 STA TEXTPTR+1
1910 ;
1920 ;
1930 LDY #147
1940 INIT4 JSR SYNC
1950 DEY
1960 BMI INIT4
1970 CLI
1980 ;
1990 CRASH LDX #INIT4-INIT+9
2000 LDA #32
2010 CRASH1 STA INIT,X
2020 DEX
2030 BNE CRASH1
2040 ;
2050 ;
2060 WARTE LDA #224
2070 STA 56322
2080 LDA 56320
2090 AND #127
2100 CMP #127
2110 BNE ENDE
2120 LDX 56321
2130 INX
2140 BEQ WARTE
2150 ;
2160 ;
2170 ENDE JSR SYNC
2180 ;
2190 ENDE0 SEI
2200 LDA #11
2210 STA 53265
2220 LDA #128
2230 STA 53274
2240 ORA #1
2250 STA 56333
2260 LDA #255
2270 STA 56322
2280 ;
2290 LDX #46
2300 ENDE1 LDA EXIT,X
2310 EOR CODE3
2320 STA 512,X
2330 DEX
2340 BPL ENDE1
2350 JMP 512
2360 ;
2370 ;
2380 SYNC LDA 53265
2390 BMI SYNC
2400 LDA 53266
2410 BNE SYNC
2420 RTS
2430 ;
2440 ;
2450 ;
2460 ISR LDA 53273
2470 STA 53273
2480 LDX JOBCNTR
2490 BEQ JOB0
2500 CPX #1
2510 BEQ JOB1
2520 BNE JOB2
2530 ;
2540 JOB0 LDA #216 ; MULTICOL
2550 STA 53270
2560 LDY #46
2570 ROMTEST LDA 32768,Y
2580 EOR KILL,Y
2590 CMP CODE2
2600 BNE ROM!
2610 DEY
2620 BPL ROMTEST
2630 BMI JOBAUS
2640 ;
2650 ROM! LDA #<64738
2660 STA 49153
2670 LDA #>64738
2680 STA 49154
2690 JMP ENDE0
2700 ;
2710 ;
2720 JOB1 LDA 53265
2730 AND #%11110111 ; 24 Z
2740 STA 53265
2750 LDA #127
2760 STA 53269
2770 JMP JOBAUS
2780 ;
2790 JOB2 LDA MODE
2800 ORA #8 ; 25 Z
2810 STA 53265
2820 LDA #0
2830 STA 53269
2840 LDA #200 ; HIRES
2850 STA 53270
2860 ;
2870 INC FLASH
2880 BNE JOBAUS
2890 ;
2900 LDA #234
2910 STA FLASH
2920 LDX COLPTR
2930 INX
2940 CPX #7
2950 BNE JOB21
2960 LDX #0
2970 JOB21 STX COLPTR
2980 ;
2990 LDY #200
3000 LDA COLOR,X
3010 JOB23 STA 55848,Y
3020 STA 56047,Y
3030 DEY
3040 BNE JOB23
3050 ;
3060 ;
3070 JOBAUS LDX JOBCNTR
3080 INX
3090 CPX #3
3100 BNE JOBAUS1
3110 LDX #0
3120 JOBAUS1 STX JOBCNTR
3130 ;
3140 LDA RASTERTABL,X
3150 STA 53266
3160 LDA 53265
3170 AND #%01111111
3180 ORA RASTERTABH,X
3190 STA 53265
3200 ;
3210 TXA
3220 BNE ISRAUS
3230 ;
3240 ISR2 JSR MOVE
3250 JSR MOVE
3260 JSR MOVE
3270 ;
3280 ISRAUS PLA
3290 TAY
3300 PLA
3310 TAX
3320 PLA
3330 RTI
3340 ;
3350 ;
3360 ;
3370 MOVE LDA 53248
3380 CMP #9
3390 BCC SCLOLL
3400 LDX #64
3410 CMP #17
3420 BCC MOVE1
3430 LDX #96
3440 MOVE1 STX 53264
3450 ;
3460 LDX #14
3470 MOVE2 DEC 53248,X
3480 DEX
3490 DEX
3500 BPL MOVE2
3510 RTS
3520 ;
3530 SCLOLL LDX #16
3540 SC0 LDA VICTAB,X
3550 STA 53248,X
3560 DEX
3570 BPL SC0
3580 ;
3590 LDA #<SPD+2
3600 LDX #>SPD
3610 STA TMP1
3620 STX TMP1+1
3630 CLC
3640 ADC #62
3650 STA TMP2
3660 BCC SCLOLL1
3670 INX
3680 SCLOLL1 STX TMP2+1
3690 ;
3700 LDX #7
3710 SCLOLLL LDY #0
3720 SCLOLL2 LDA (TMP2),Y
3730 STA (TMP1),Y
3740 INY
3750 INY
3760 INY
3770 CPY #24
3780 BCC SCLOLL2
3790 ;
3800 LDY #0
3810 SCLOLL3 INY
3820 LDA (TMP2),Y
3830 DEY
3840 STA (TMP2),Y
3850 INY
3860 CPY #24
3870 BCC SCLOLL3
3880 ;
3890 LDA TMP1
3900 CLC
3910 ADC #64
3920 STA TMP1
3930 BCC SCLOLL4
3940 INC TMP1+1
3950 SCLOLL4 LDA TMP2
3960 CLC
3970 ADC #64
3980 STA TMP2
3990 BCC SCLOLL5
4000 INC TMP2+1
4010 ;
4020 SCLOLL5 DEX
4030 BNE SCLOLLL
4040 ;
4050 ;
4060 LDY #0
4070 SCLOLL6 LDA (TEXTPTR),Y
4080 EOR CODE1
4090 BNE SCLOLL7
4100 ;
4110 LDA #<TEXT
4120 STA TEXTPTR
4130 LDA #>TEXT
4140 STA TEXTPTR+1
4150 BNE SCLOLL6
4160 ;
4170 SCLOLL7 INC TEXTPTR
4180 BNE SCLOLL7A
4190 INC TEXTPTR+1
4200 ;
4210 SCLOLL7A LDY #27
4220 STY TMP1+1
4230 ASL
4240 ROL TMP1+1
4250 ASL
4260 ROL TMP1+1
4270 ASL
4280 ROL TMP1+1
4290 STA TMP1
4300 ;
4310 VERSCHL LDA CODE1
4320 ASL
4330 BCC SCLOLL7B
4340 EOR CODE4
4350 SCLOLL7B STA CODE1
4360 ;
4370 LDA #51
4380 STA 1
4390 LDY #7
4400 LDX #23
4410 SCLOLL8 LDA (TMP1),Y
4420 STA SPD+448,X
4430 DEX
4440 DEX
4450 DEX
4460 DEY
4470 BPL SCLOLL8
4480 LDA #55
4490 SCLOLL9 STA 1
4500 CMP 1
4510 BEQ SCLOLLOUT
4520 JMP ROM!
4530 ;
4540 SCLOLLOUT RTS
4550 ;
4560 KILL DFB 9,128,9,128,""
4570 SEI
4580 LDA #0
4590 KILL1 STA 256
4600 INC 32781
4610 BNE KILL1
4620 INC 32782
4630 BNE KILL1
4640 ;
4650 EXIT LDY #10
4660 STY TMP1
4670 LDX #140
4680 LDA #3
4690 STA TMP1+1
4700 LDA #32
4710 EXIT1 STA (TMP1),Y
4720 INY
4730 BNE EXIT1
4740 INC TMP1+1
4750 DEX
4760 BNE EXIT1
4770 JMP (49153)
4780 ;
4790 ;
4800 ;
4810 RASTERTABL DFB 150,248,1
4820 RASTERTABH DFB 0,0,0
4830 ;
4840 COLOR DFB 2,7,5,3,14,4,6
4850 ;
4860 CODE1 DFB 0;1
4870 CODE2 DFB 0;173
4880 CODE3 DFB 0;51
4890 CODE4 DFB 0;29
4900 ;
4910 VICTAB DFB 23,10,71,10,119,10,167,10,215,10,7,10,55,10,0,0,96
4920 DFB 43,248,0,0,127,200,0,40,0,1,0,0,127
4930 DFB 0,0,0,0,0,0,0,0,0,F,F,F,F,F,F,F,F
4940 TEXT DFB ""
4950 DFB ""
4960 DFB ""
4970 DFB ""
4980 DFB ""
4990 DFB ""
5000 DFB ""
5010 DFB ""
5020 DFB ""
5030 DFB ""
5040 DFB "",0
5050 ;
5060 ;
5070 ORG SPRITEPTR
5080 DFB 49,50,51,52,53,54,55,56
READY.