1000 ORG $4000
1010 ;
1020 ;
1030 FARBRAM EQU $D800
1040 BILDSCHIRM EQU $0400
1050 COUNTER EQU 828
1060 COUNTER2 EQU 829
1070 SCLOLLING EQU 830
1080 TICKS EQU 831
1090 ;
1100 Y EQU 248
1110 IY EQU 249
1120 AZ EQU 14 ;ANZ BREITZ
1130 ;
1140 ZEROFREE EQU 113
1150 ;
1160 SOUNDVEC EQU ZEROFREE
1170 ROW EQU ZEROFREE+2
1180 CNTR EQU ZEROFREE+3
1190 TEXT EQU ZEROFREE+4
1200 TEXTII EQU ZEROFREE+6
1210 PTR1 EQU ZEROFREE+8
1220 PTR2 EQU ZEROFREE+10
1230 REACHCNTR EQU ZEROFREE+12
1240 ;
1250 ZEROBUFFER EQU $9000
1260 ;
1270 SPRITEPTR EQU 2040
1280 SPRITENR EQU 128
1290 SPRITES EQU 8192
1300 LASTSPRITE EQU SPRITES+448+12+12
1310 REG EQU 53270
1320 CHARHI EQU 7
1330 ;
1340 ;
1350 ;
1360 LDA #147
1370 JSR 65490
1380 INIT SEI
1390 LDX #0
1400 LDA #0
1410 FARBLOESCH STA FARBRAM,X
1420 STA FARBRAM+$100,X
1430 STA FARBRAM+$200,X
1440 STA FARBRAM+$300,X
1450 DEX
1460 BNE FARBLOESCH
1470 ;
1480 LDX #119
1490 SCAPAINT LDA SCADATEN,X
1500 STA BILDSCHIRM,X
1510 LDA REACHDATEN,X
1520 STA BILDSCHIRM+129,X
1530 LDA POBOXDATEN,X
1540 STA BILDSCHIRM+840,X
1550 LDA PRESSDATEN,X
1560 STA BILDSCHIRM+680,X
1570 LDA SMITHDATEN,X
1580 STA BILDSCHIRM+288,X
1590 DEX
1600 BPL SCAPAINT
1610 ;
1620 LDA #5
1630 STA REACHCNTR
1640 ;
1650 BPL CONTINUE
1660 ;
1670 ;
1680 REACHDATEN DFB 18,5,1,3,8,9,14,7,32,15,21,20,32,20,15,32,25,15,21,""
1690 ;
1700 POBOXDATEN DFB ""
1710 ;
1720 ;
1730 CONTINUE LDA #<ISR
1740 STA 788
1750 LDA #>ISR
1760 STA 789
1770 LDA #127
1780 STA 56333
1790 LDA 56333
1800 ;
1810 LDX #46
1820 INIT1 LDA VICTAB,X
1830 STA 53248,X
1840 DEX
1850 BPL INIT1
1860 ;
1870 LDX #8
1880 STX CNTR
1890 LDA #SPRITENR+7
1900 INIT2 STA SPRITEPTR-1,X
1910 SEC
1920 SBC #1
1930 DEX
1940 BNE INIT2
1950 ;
1960 TXA
1970 INIT3 STA SPRITES,X
1980 STA SPRITES+256,X
1990 STA SPRITES+512,X
2000 INX
2010 BNE INIT3
2020 ;
2030 LDA #<TEXTTABII
2040 STA TEXTII
2050 LDA #>TEXTTABII
2060 STA TEXTII+1
2070 ;
2080 LDY #0
2090 STY SCLOLLING
2100 LDA #4
2110 STA COUNTER2
2120 ;
2130 LDA #100
2140 STA COUNTER
2150 ;
2160 LDA #<TEXTTAB
2170 STA TEXT
2180 LDA #>TEXTTAB
2190 STA TEXT+1
2200 ;
2210 LDX #39
2220 INIT4 LDA FARBDAT,X
2230 STA FARBRAM+480,X
2240 LDA FARBDAT2,X
2250 STA FARBRAM+840,X
2260 LDA #3 ;CYAN
2270 STA FARBRAM+680,X
2280 LDA FARBDAT3,X
2290 STA FARBRAM+280,X
2300 LDA #15 ;HELLGRAU
2310 STA FARBRAM+320,X
2320 DEX
2330 BPL INIT4
2340 ;
2350 JSR SIDRESET
2360 LDA #15
2370 BEGINWART CMP 53266
2380 BNE BEGINWART
2390 LDA 53273
2400 STA 53273
2410 JMP FOERST
2420 ;
2430 ;
2440 VICTAB DFB 0,Y,48,Y,96,Y,144,Y,192,Y,240,Y,32,Y,80,Y,%11000000
2450 DFB 27,IY,0,0,255,8,0,29,1,129,0,0,255,0,0
2460 DFB 0,0,0,0,0,0,0,1,3,14,6,0,6,14,3
2470 ;
2480 ;
2490 KEY1 JSR 65508
2500 BEQ KEY1
2510 SEI
2520 PHA
2530 JSR SIDRESET
2540 PLA
2550 CMP #83 ;S
2560 BNE KEY2
2570 JSR GETLEVI
2580 LDA #0
2590 JSR $BF0
2600 LDA #$15
2610 STA SOUNDVEC
2620 LDA #$0D
2630 STA SOUNDVEC+1
2640 JMP ENDKEY
2650 ;
2660 KEY2 CMP #32 ;SPACE
2670 BNE KEY3
2680 JSR GETLEVI
2690 LDA #1
2700 JSR $BF0
2710 LDA #$15
2720 STA SOUNDVEC
2730 LDA #$0D
2740 STA SOUNDVEC+1
2750 JMP ENDKEY
2760 ;
2770 KEY3 CMP #77 ;M
2780 BNE KEY4
2790 DEC 1
2800 JSR ZEROSWAP
2810 JSR $A000
2820 JSR ZEROSWAP
2830 INC 1
2840 LDA #$23
2850 STA SOUNDVEC
2860 LDA #$A0
2870 STA SOUNDVEC+1
2880 JMP ENDKEY
2890 ;
2900 KEY4 CMP #73 ;I
2910 BNE KEY5
2920 JSR $7805
2930 LDA #$35
2940 STA SOUNDVEC
2950 LDA #$78
2960 STA SOUNDVEC+1
2970 JMP ENDKEY
2980 ;
2990 KEY5 CMP #84 ;T
3000 BNE KEY6
3010 FOERST JSR GETFEUD
3020 LDA #0
3030 JSR $10F0
3040 LDA #$18
3050 STA SOUNDVEC
3060 LDA #$12
3070 STA SOUNDVEC+1
3080 JMP ENDKEY
3090 ;
3100 KEY6 CMP #72 ;H
3110 BNE ENDKEY
3120 JSR GETFEUD
3130 LDA #1
3140 JSR $10F0
3150 LDA #$18
3160 STA SOUNDVEC
3170 LDA #$12
3180 STA SOUNDVEC+1
3190 ;
3200 ENDKEY LDA #1
3210 STA 53273
3220 CLI
3230 JMP KEY1
3240 ;
3250 SIDRESET LDX #30
3260 LDA #0
3270 SIDRESET1 STA $D400,X
3280 DEX
3290 BPL SIDRESET1
3300 RTS
3310 ;
3320 GETLEVI LDA #$E0 ; SOURCE
3330 LDX #$0B ; DEST
3340 JMP SCHUB
3350 ;
3360 GETFEUD LDA #$F0 ; SOURCE
3370 LDX #$10 ; DEST
3380 JMP SCHUB
3390 ;
3400 SCHUB STA PTR1+1
3410 STX PTR2+1
3420 LDY #52
3430 STY 1
3440 LDY #0
3450 STY PTR1
3460 STY PTR2
3470 LDX #16
3480 SCHUBI LDA (PTR1),Y
3490 STA (PTR2),Y
3500 INY
3510 BNE SCHUBI
3520 INC PTR1+1
3530 INC PTR2+1
3540 DEX
3550 BNE SCHUBI
3560 LDA #55
3570 STA 1
3580 RTS
3590 ;
3600 ;
3610 ; INTERRUPT
3620 ;
3630 ISR LDA #1
3640 STA 53273
3650 LDA #19
3660 STA 53265
3670 LDA #253
3680 ISYNC CMP 53266
3690 BNE ISYNC
3700 ;
3710 NOP
3720 LDY #5
3730 ISR1 DEY
3740 BNE ISR1
3750 LDA #8
3760 LDX #AZ
3770 ISR3 DEC REG
3780 STA REG
3790 LDY #5
3800 ISR4 DEY
3810 BNE ISR4
3820 NOP
3830 CMP 1; 3 CYCLES
3840 DEX
3850 BNE ISR3
3860 ;
3870 ;
3880 LDA #27
3890 STA 53265
3900 INC TICKS
3910 ;
3920 ;INC 53280
3930 JSR SCLOLL
3940 JSR LINESCYCLE
3950 JSR SPRITECYCLE
3960 JSR COLROTATE
3970 JSR TEXTROUTINE
3980 JSR ZEROSWAP
3990 DEC 1
4000 JSR MUZAK
4010 INC 1
4020 JSR ZEROSWAP
4030 JSR REACHBLINK
4040 ;DEC 53280
4050 ;
4060 ;
4070 JMP $EA31
4080 PLA
4090 TAY
4100 PLA
4110 TAX
4120 PLA
4130 RTI
4140 ;
4150 MUZAK JMP (SOUNDVEC)
4160 ;
4170 ;
4180 ZEROSWAP LDY #200
4190 ZEROSWAP1 LDX 0,Y
4200 LDA ZEROBUFFER,Y
4210 STA 0,Y
4220 TXA
4230 STA ZEROBUFFER,Y
4240 INY
4250 CPY #210
4260 BNE ZEROSWAP1
4270 RTS
4280 ;
4290 ;
4300 COLROTATE LDA TICKS
4310 AND #1
4320 BNE X
4330 LDY #38
4340 LDA FARBRAM+519
4350 PHA
4360 LDA FARBRAM+879
4370 PHA
4380 C LDA FARBRAM+480,Y
4390 STA FARBRAM+481,Y
4400 LDA FARBRAM+840,Y
4410 STA FARBRAM+841,Y
4420 DEY
4430 BPL C
4440 PLA
4450 STA FARBRAM+840
4460 PLA
4470 STA FARBRAM+480
4480 X RTS
4490 ;
4500 ;
4510 TEXTROUTINE LDA SCLOLLING
4520 BNE SCLOL
4530 ;
4540 DEC COUNTER
4550 BEQ SETSCLOLLING
4560 RTS
4570 ;
4580 SETSCLOLLING LDA #40
4590 STA SCLOLLING
4600 RTS
4610 ;
4620 SCLOL LDY #0
4630 D LDA BILDSCHIRM+481,Y
4640 STA BILDSCHIRM+480,Y
4650 INY
4660 CPY #39
4670 BNE D
4680 ;
4690 LDY #0
4700 LDA (TEXT),Y
4710 BNE D1
4720 LDA #<TEXTTAB
4730 STA TEXT
4740 LDA #>TEXTTAB
4750 STA TEXT+1
4760 RTS
4770 ;
4780 D1 STA BILDSCHIRM+519
4790 INC TEXT
4800 BNE E
4810 INC TEXT+1
4820 E DEC SCLOLLING
4830 BNE F
4840 ;
4850 LDA (TEXT),Y
4860 STA COUNTER
4870 INC TEXT
4880 BNE F
4890 INC TEXT+1
4900 F RTS
4910 ;
4920 ;
4930 ; RASTERROUTINEN
4940 ;
4950 ;
4960 LINESCYCLE LDA #50
4970 WAIT1 CMP 53266
4980 BNE WAIT1
4990 LDY #20
5000 HAUPTLOOP LDA FARBDAT,Y
5010 LDX 53266
5020 WARTE CPX 53266
5030 BEQ WARTE
5040 ;
5050 STA 53281
5060 DEY
5070 BPL HAUPTLOOP
5080 ;
5090 CYCLE DEC COUNTER2
5100 BEQ CYCLEJA
5110 RTS
5120 ;
5130 CYCLEJA LDA #4
5140 STA COUNTER2
5150 ;
5160 LDY #1
5170 LDX FARBDAT+1
5180 CYCLE1 LDA FARBDAT+1,Y
5190 STA FARBDAT,Y
5200 INY
5210 CPY #39
5220 BNE CYCLE1
5230 STX FARBDAT+39
5240 RTS
5250 ;
5260 REACHBLINK LDA REACHCNTR
5270 LSR
5280 LSR
5290 TAX
5300 LDY #21
5310 LDA REACHDAT,X
5320 REACH STA FARBRAM+129,Y
5330 DEY
5340 BPL REACH
5350 INC REACHCNTR
5360 LDA REACHCNTR
5370 CMP #32
5380 BEQ RESETREACH
5390 RTS
5400 ;
5410 RESETREACH LDA #0
5420 STA REACHCNTR
5430 RTS
5440 ;
5450 ; RAMENSPR+CYCLE
5460 ;
5470 ;
5480 SCLOLL LDA #27
5490 SCLOLL1 STA ROW
5500 CLC
5510 ADC #<LASTSPRITE
5520 STA MODIF+1
5530 LDA #>LASTSPRITE
5540 STA MODIF+2
5550 ;
5560 LDY #8
5570 SCLOLL2 LDX #2
5580 MODIF ROL 65530,X
5590 DEX
5600 BPL MODIF
5610 ;
5620 PHP
5630 LDA MODIF+1
5640 SEC
5650 SBC #64
5660 STA MODIF+1
5670 BCS SCLOLL3
5680 DEC MODIF+2
5690 SCLOLL3 PLP
5700 DEY
5710 BNE SCLOLL2
5720 ;
5730 LDA ROW
5740 SEC
5750 SBC #3
5760 BPL SCLOLL1
5770 ;
5780 DEC CNTR
5790 LDA CNTR
5800 BNE SCLOLLAUS
5810 LDA #8
5820 STA CNTR
5830 LDA #CHARHI ;HIBYTE/8
5840 STA PTR1+1
5850 ;
5860 LDY #0
5870 SCLOLL4 LDA (TEXTII),Y
5880 BNE SCLOLL5
5890 ;
5900 LDA #<TEXTTABII
5910 STA TEXTII
5920 LDA #>TEXTTABII
5930 STA TEXTII+1
5940 JMP SCLOLL4
5950 ;
5960 SCLOLL5 INC TEXTII
5970 BNE SCLOLL6
5980 INC TEXTII+1
5990 ;
6000 SCLOLL6 ASL
6010 ROL PTR1+1
6020 ASL
6030 ROL PTR1+1
6040 ASL
6050 ROL PTR1+1
6060 STA PTR1
6070 LDA #51
6080 STA 1
6090 LDX #0
6100 LDY #0
6110 SCLOLL7 LDA (PTR1),Y
6120 STA LASTSPRITE+2,X
6130 INX
6140 INX
6150 INX
6160 INY
6170 CPY #8
6180 BCC SCLOLL7
6190 LDA #55
6200 STA 1
6210 ;
6220 SCLOLLAUS RTS
6230 ;
6240 ;
6250 SPRITECYCLE LDA TICKS
6260 AND #1
6270 BNE SCLOLLAUS
6280 LDX 53294 ;FARBE7
6290 LDY #6
6300 SPRSCH LDA 53287,Y
6310 STA 53288,Y
6320 DEY
6330 BPL SPRSCH
6340 STX 53287
6350 RTS
6360 ;
6370 ;
6380 ;
6390 ;
6400 ;
6410 FARBDAT DFB 0,11,12,15,1,15,12,11,0
6420 DFB 6,14,3,1,3,14,6,0
6430 DFB 2,10,7,1,7,10,2,0
6440 DFB 9,5,13,1,13,5,9,0
6450 DFB 9,8,7,1,7,8,9,0
6460 ;
6470 FARBDAT2 DFB 2,10,7,1,13,14,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
6480 DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
6490 ;
6500 FARBDAT3 DFB 0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15
6510 ;
6520 DFB 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
6530 DFB 15,15,15,15,15,15,15,15,15
6540 ;
6550 ;
6560 REACHDAT DFB 0,11,12,15,1,15,12,11
6570 ;
6580 ;
6590 SCADATEN DFB 160,160,160,160,160,160,160,160,160,160,160,120,""
6600 DFB 124,124,"",122,120,""
6610 DFB 122,148,141,160,160,160,160,160,160,160,160,160
6620 DFB 160,160,160,160,160,160,160,160,160,160,160,121,""
6630 DFB 122,128,160,160,160,160,160,126,"",127
6640 DFB 160,160,160,160,160,160,160,160,160,160,160
6650 DFB 160,160,160,160,160,160,160,160,160,160,160
6660 DFB 121,"",123,121,"",125,123,160,160,160,160,121
6670 DFB 160,160,160,160,160,160,160,160,160,160,160
6680 ;
6690 ;
6700 ;
6710 PRESSDATEN DFB ""
6720 ;
6730 ;
6740 SMITHDATEN DFB 3,15,4,5,4,32,2,25,32,91,92,95,96,99,100,103,104,108,111
6750 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
6760 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
6770 DFB 93,94,97,98,101,102,105,106,116,117,32,38,32,""
6780 ;
6790 ;
6800 ;
6810 ORG $6000
6820 ;
6830 TEXTTAB DFB "",255
6840 DFB "",200
6850 DFB "",180
6860 DFB "",180
6870 DFB "",170
6880 DFB "",160
6890 DFB "",200
6900 DFB "",140
6910 DFB "",130
6920 DFB "",100
6930 DFB "",100
6940 DFB "",100
6950 DFB "",100
6960 DFB "",100
6970 DFB "",100
6980 DFB "",100
6990 DFB "",98
7000 DFB "",190
7010 DFB "",130
7020 DFB "",100
7030 DFB "",100
7040 DFB "",100
7050 DFB "",100
7060 DFB "",180
7070 DFB "",200,0
7080 ;
7090 ;
7100 ;
7110 ;
7120 TEXTTABII DFB ""
7130 DFB ""
7140 DFB ""
7150 DFB ""
7160 DFB ""
7170 DFB ""
7180 DFB ""
7190 DFB ""
7200 DFB ""
7210 DFB ""
7220 DFB ""
7230 DFB ""
7240 DFB ""
7250 DFB ""
7260 DFB ""
7270 DFB ""
7280 DFB ""
7290 DFB ""
7300 DFB ""
7310 DFB ""
7320 DFB ""
7330 DFB ""
7340 DFB ""
7350 DFB ""
7360 DFB ""
7370 DFB ""
7380 DFB ""
7390 DFB ""
7400 DFB ""
7410 DFB ""
7420 DFB ""
7430 DFB ""
7440 DFB ""
7450 DFB ""
7460 DFB ""
7470 DFB ""
7480 DFB ""
7490 DFB ""
7500 DFB ""
7510 DFB ""
7520 DFB ""
7530 DFB ""
7540 DFB ""
7550 DFB ""
7560 DFB ""
7570 DFB ""
7580 DFB ""
7590 DFB ""
7600 DFB ""
7610 DFB ""
7620 DFB ""
7630 DFB ""
7640 DFB ""
7650 DFB "",0
READY.