antoine-source/picnicparanoia/picnicsource/MASTER E.txt
Antoine Vignau 4d4fb6a665 Let's free the code!!
Some old (WIP) disassemblies and my own source code now available online.
2024-07-23 23:38:22 +02:00

1104 lines
25 KiB
Plaintext

0005 .LI OFF
0010 POINTER1 .EQ $F9
0015 POINTER2 .EQ $FB
0020 POINTER3 .EQ $FD
0025 POINTER4 .EQ $EE
0030 SCRPNT1 .EQ $F5
0035 SCRPNT2 .EQ $F7
0040 RNDBYTE1 .EQ $F3
0045 RNDBYTE2 .EQ $F4
0050 TEMP1 .EQ $F0
0055 TEMP2 .EQ $F1
0060 TEMP3 .EQ $F2
0065 TEMP5 .EQ $94
0070 NO.OF.PLAYERS .EQ $8F
0075 PLAYERNUM .EQ $B3
0080 SECONDS .EQ $8D
0085 MINUTES .EQ $8E
0090 ALL.FOOD.OFF .EQ $87
0095 ROUND .EQ $B4
0100 THE.END.Z .EQ $A48
0105 WIDTH .EQ $A9
0110 NO.OF.FOODS1 .EQ $8A
0115 NO.OF.FOODS2 .EQ $8C
0120 ANTNUM .EQ $D8
0125 ANTBYT1 .EQ $1000
0130 SWATLEGAL .EQ $C3
0135 WASPSTATE .EQ $B2
0140 WASP.CHANCE .EQ $97
0145 MANX .EQ $CB
0150 MANXOLD .EQ $BC
0155 MANXX .EQ $CA
0160 MANXXOLD .EQ $BB
0165 MANY .EQ $C9
0170 MANYOLD .EQ $BA
0175 MANSTATE .EQ $C7
0180 NEXTSTATE .EQ $C6
0185 MANDIR .EQ $C8
0190 PARALYZE .EQ $A2
0195 SWAT .EQ $C5
0200 GRAB.FOOD .EQ $B7
0205 BYFOOD .EQ $B6
0210 SET.CAN .EQ $B5
0215 FOODNUM .EQ $AD
0220 FOODX .EQ $AC
0225 FOODY .EQ $AB
0230 SPIDERBYT1 .EQ $4100
0235 WASP.SPLAT.COUNT .EQ $98
0240 FLAP .EQ $96
0245 K1 .EQ $D1
0250 INIT.K1 .EQ $D0
0255 K2 .EQ $CF
0260 INIT.K2 .EQ $CE
0265 K3 .EQ $B9
0270 INIT.K3 .EQ $B8
0275 K4 .EQ $9D
0280 INIT.K4 .EQ $9C
0285 K5 .EQ $9F
0290 INIT.K5 .EQ $9E
0295 K6 .EQ $A1
0300 INIT.K6 .EQ $A0
0305 K7 .EQ $89
0310 INIT.K7 .EQ $88
0315 K8 .EQ $AF
0320 INIT.K8 .EQ $AE
0325 SET.CAN2 .EQ $81
0330 CAN.KEY.PRESSED .EQ $80
0335 SET.CAN1 .EQ $7F
0340 HISCOREHI .EQ $7C
0345 HISCORELO .EQ $7B
0350 FOODBYT1 .EQ $65D0
0355 FOODBYT2 .EQ $65D8
0360 FOODBYT3 .EQ $65E0
0365 ANTPOSITIONS .EQ $65F0
0370 ANT.ORIENTATIONS .EQ $65F8
0375 HEIGHT .EQ $ED
0380 PATINDEX .EQ $EC
0385 RANDOM1 .EQ $1706
0390 DESTBYT1 .EQ $1080
0395 DESTBYT2 .EQ $10A0
0400 CREATE.ANT .EQ $171E
0405 MOVE.4.ANTS .EQ $1100
0410 MAN.MASTER .EQ $4600
0415 WASP.MASTER .EQ $5806
0420 SPIDER.MASTER .EQ $6003
0425 FOOD.MASTER .EQ $6953
0430 PLOT.FOOD2 .EQ $6962
0435 DELAY.Z .EQ $5800
0440 SCORE .EQ $4F09
0445 CAN.MASTER.Z .EQ $C00
0450 C4.Z .EQ $C03
0455 PLOT.NUM2.Z .EQ $4F15
0460 STING.MAN.Z .EQ $600F
0465 Z4.Z .EQ $8E6
0470 MUSIC.Z .EQ $8E9
0475 .OR $7900
0480 .TA $2900
0485 MASTER
0490 LDA #$01
0495 STA ROUND
0500 STA NO.OF.PLAYERS
0505 LDY #$00
0510 STY HISCOREHI
0515 STY HISCORELO
0520 JSR SETUP
0525 M1 JSR SELECT2
0530 JSR C4.Z
0535 LDA #$00
0540 STA $90
0545 STA $91
0550 STA $92
0555 STA $93
0560 STA PLAYERNUM
0565 STA SET.CAN1
0570 STA SET.CAN2
0575 LDY #$08
0580 STY NO.OF.FOODS1
0585 STY NO.OF.FOODS2
0590 LDY #$40
0595 STY TEMP1
0600 LDX #$A0
0605 LDY #$20
0610 JSR MOVE.MEMORY
0615 M2 LDA $C056
0620 .3 LDA $C010
0625 LDA #$20
0630 STA TEMP5
0635 .4 JSR PLOT.LORES.NUMS
0640 LDA $C000
0645 BPL .2
0650 SEC
0655 SBC #$B0
0660 BEQ .2
0665 CMP #$0A
0670 BCS .2
0675 STA ROUND
0680 JMP .3
0685 .2 LDA #$03
0690 JSR DAZZLE
0695 DEC TEMP5
0700 BNE .4
0705 JSR INITIALIZE.1
0710 JSR DRAW.SCREEN
0715 JSR PLOT.HISCORE
0720 LDA $C057
0725 LDA $C054
0730 LDA #$40
0735 STA TEMP1
0740 LDA #$00
0745 STA CAN.KEY.PRESSED
0750 LDX #$80
0755 LDY #$20
0760 EXT2
0765 .25 JSR MOVE.MEMORY
0770 .12 LDX ROUND
0775 LDA TABLE412,X
0780 JSR DELAY.Z
0785 JSR MOVE.4.ANTS
0790 JSR MAN.MASTER
0795 JSR SPIDER.MASTER
0800 JSR WASP.MASTER
0805 JSR FOOD.MASTER
0810 LDA CAN.KEY.PRESSED
0815 BNE .21
0820 .22 LDX PLAYERNUM
0825 LDA $7D0
0830 BNE .25
0835 LDA NO.OF.FOODS1,X
0840 BEQ .14
0845 DEC K7
0850 BNE .12
0855 LDA INIT.K7
0860 STA K7
0865 SED
0870 LDA SECONDS
0875 SEC
0880 SBC #$01
0885 STA SECONDS
0890 CLD
0895 BPL .13
0900 LDA #$59
0905 STA SECONDS
0910 DEC MINUTES
0915 BMI .11
0920 .13 JSR PLOT.CLOCK
0925 JMP .12
0930 .11 JSR POINTS.FOR.FOOD
0935 LDA ALL.FOOD.OFF
0940 BEQ .14
0945 LDA NO.OF.PLAYERS
0950 CMP #$02
0955 BEQ .15
0960 .17 INC ROUND
0965 LDA ROUND
0970 CMP #$0A
0975 BCC .16
0980 DEC ROUND
0985 .16 LDA #$F0
0990 JSR DELAY.Z
0995 JMP M2
1000 .21 LDA #$00
1005 STA CAN.KEY.PRESSED
1010 LDX PLAYERNUM
1015 LDA SET.CAN1,X
1020 BEQ .22
1025 LDA #$00
1030 STA SET.CAN1,X
1035 LDA #$01
1040 JSR STING.MAN.Z
1045 JSR INITIALIZE.2
1050 JSR CAN.MASTER.Z
1055 JMP .22
1060 .15 LDA PLAYERNUM
1065 BEQ .18
1070 LDA NO.OF.FOODS1
1075 BEQ .17
1080 LDA #$00
1085 STA PLAYERNUM
1090 BEQ .17
1095 .18 LDA NO.OF.FOODS2
1100 BEQ .16
1105 LDA #$02
1110 STA PLAYERNUM
1115 BNE .16
1120 .14 LDX PLAYERNUM
1125 LDA #$00
1130 STA NO.OF.FOODS1,X
1135 LDA $91,X
1140 CMP HISCOREHI
1145 BCC .23
1150 BNE .24
1155 LDA $90,X
1160 CMP HISCORELO
1165 BCC .23
1170 .24 LDA $90,X
1175 STA HISCORELO
1180 LDA $91,X
1185 STA HISCOREHI
1190 JSR PLOT.HISCORE
1195 .23 JSR THE.END.Z
1200 LDA NO.OF.PLAYERS
1205 CMP #$02
1210 BNE .19
1215 TXA
1220 EOR #$02
1225 STA PLAYERNUM
1230 TAX
1235 LDA NO.OF.FOODS1,X
1240 BEQ .19
1245 TXA
1250 CMP #$01
1255 BEQ .17
1260 BNE .16
1265 .19 LDA $C010
1270 EXT1
1275 .20 LDA $C000
1280 BPL .20
1285 RESET
1290 LDA $C050
1295 LDA $C057
1300 LDA #$C0
1305 STA TEMP1
1310 LDA #$00
1315 LDY #$A0
1320 LDX #$20
1325 JSR MOVE.MEMORY
1330 LDA #$01
1335 STA ROUND
1340 JMP M1
1345 TABLE412 .HS 00090807060504030201
1350 INITIALIZE.1
1355 LDA #$1A
1360 STA L1+2
1365 STA L2+2
1370 LDA #$90
1375 STA L1+1
1380 STA L2+1
1385 L1 LDA $1A90
1390 AND #$40
1395 L2 STA $1A90
1400 INC L1+1
1405 INC L2+1
1410 BNE L1
1415 INC L1+2
1420 INC L2+2
1425 LDA L1+2
1430 CMP #$20
1435 BNE L1
1440 LDX ROUND
1445 LDA TABLE400,X
1450 STA K1
1455 STA INIT.K1
1460 LDA TABLE401,X
1465 STA K2
1470 STA INIT.K2
1475 LDA TABLE402,X
1480 STA K3
1485 STA INIT.K3
1490 LDA TABLE403,X
1495 STA K4
1500 STA INIT.K4
1505 LDA TABLE404,X
1510 STA WASP.CHANCE
1515 LDA TABLE405,X
1520 STA K5
1525 STA INIT.K5
1530 LDA TABLE406,X
1535 STA K6
1540 STA INIT.K6
1545 LDA TABLE408,X
1550 STA K8
1555 STA INIT.K8
1560 LDA TABLE407,X
1565 STA K7
1570 STA INIT.K7
1575 LDX #$07
1580 .3 LDA TABLE409,X
1585 STA FOODBYT1,X
1590 LDA TABLE410,X
1595 STA FOODBYT2,X
1600 LDA TABLE411,X
1605 STA ANTPOSITIONS,X
1610 LDA #$00
1615 STA ANT.ORIENTATIONS,X
1620 DEX
1625 BPL .3
1630 LDY #$BF
1635 BNE INITIALIZE.3
1640 INITIALIZE.2
1645 LDY #$7F
1650 INITIALIZE.3
1655 LDA #$20
1660 STA ANTNUM
1665 LDA #$00
1670 .1 STA ANTBYT1,Y
1675 DEY
1680 BNE .1
1685 STA ANTBYT1
1690 LDA #$80
1695 STA SWATLEGAL
1700 STA WASPSTATE
1705 LDA #$16
1710 STA MANX
1715 STA MANXOLD
1720 LDA #$02
1725 STA MANXX
1730 STA MANXXOLD
1735 LDA #$6C
1740 STA MANY
1745 STA MANYOLD
1750 LDA #$01
1755 STA MANSTATE
1760 STA NEXTSTATE
1765 LDA #$D0
1770 STA MANDIR
1775 LDA #$00
1780 STA PARALYZE
1785 STA SWAT
1790 STA GRAB.FOOD
1795 STA BYFOOD
1800 STA FOODNUM
1805 LDX #$1F
1810 .2 STA SPIDERBYT1,X
1815 DEX
1820 BPL .2
1825 LDA #$04
1830 STA WASP.SPLAT.COUNT
1835 RTS
1840 TABLE400 .HS 00010101010101010101
1845 TABLE401 .HS 00B0AAA49E98928C8680
1850 TABLE402 .HS 00030303030303030303
1855 TABLE403 .HS 00040404030303030303
1860 TABLE404 .HS 00010203040405050506
1865 TABLE405 .HS 002C2824201C1814100C
1870 TABLE406 .HS 00100F0E0D0C0B0A0908
1875 TABLE407 .HS 004F4C49484746454543
1880 TABLE408 .HS 00040403030302020202
1885 TABLE409 .HS 0C111B210C121B22
1890 TABLE410 .HS 0808080911131311
1895 TABLE411 .HS 0400000004000004
1900 DRAW.GREEN
1905 LDA #$1C
1910 STA TEMP1
1915 .2 LDY TEMP1
1920 LDA (SCRPNT1),Y
1925 STA POINTER2+1
1930 LDA (SCRPNT2),Y
1935 STA POINTER2
1940 LDY #$04
1945 .1 LDA #$2A
1950 STA (POINTER2),Y
1955 INY
1960 LDA #$55
1965 STA (POINTER2),Y
1970 INY
1975 CPY #$2C
1980 BCC .1
1985 INC TEMP1
1990 LDA TEMP1
1995 CMP #$CC
2000 BCC .2
2005 RTS
2010 DRAW.SCREEN
2015 JSR DRAW.GREEN
2020 LDY #$1C
2025 JSR D1
2030 LDY #$C8
2035 JSR D1
2040 LDY #$20
2045 JSR D2
2050 LDY #$80
2055 JSR D2
2060 LDA #$65
2065 STA POINTER2+1
2070 LDA #$70
2075 STA POINTER2
2080 LDX #$38
2085 JSR D3
2090 LDX #$80
2095 JSR D3
2100 LDA #$56
2105 STA POINTER2
2110 LDX #$3A
2115 JSR D3
2120 LDX #$82
2125 JSR D3
2130 JSR DRAW.LETTERS
2135 LDA PLAYERNUM
2140 PHA
2145 LDA #$00
2150 STA PLAYERNUM
2155 JSR SCORE
2160 LDA NO.OF.PLAYERS
2165 CMP #$01
2170 BEQ .8
2175 STA PLAYERNUM
2180 LDA #$00
2185 JSR SCORE
2190 .8 PLA
2195 STA PLAYERNUM
2200 LDA #$02
2205 STA MINUTES
2210 LDA #$00
2215 STA SECONDS
2220 JSR PLOT.CLOCK
2225 LDX PLAYERNUM
2230 LDY NO.OF.FOODS1,X
2235 LDA TABLE330,Y
2240 STA TEMP1
2245 JSR RANDOM1
2250 AND #$07
2255 TAY
2260 LDA TEMP1
2265 .4 LSR
2270 BCC .3
2275 ORA #$80
2280 .3 DEY
2285 BNE .4
2290 STA TEMP5
2295 LDX #$07
2300 .6 LSR TEMP5
2305 BCC .5
2310 LDA TABLE409,X
2315 STA FOODX
2320 LDA TABLE410,X
2325 STA FOODY
2330 JSR PLOT.FOOD2
2335 TXA
2340 ORA #$50
2345 STA TEMP1
2350 JSR SET.FOOD.STATUS
2355 JSR SET.DESTBYTS
2360 LDA #$81
2365 .7 STA FOODBYT3,X
2370 DEX
2375 BPL .6
2380 RTS
2385 .5 LDA #$00
2390 BEQ .7
2395 SET.DESTBYTS
2400 LDY TABLE351,X
2405 LDA TABLE352,X
2410 STA HEIGHT
2415 .1 LDA TABLE353,Y
2420 STA DESTBYT1,Y
2425 LDA TABLE354,Y
2430 STA DESTBYT2,Y
2435 INY
2440 DEC HEIGHT
2445 BNE .1
2450 RTS
2455 TABLE351 .HS 0004080B0E111418
2460 TABLE352 .HS 0404030303030404
2465 TABLE353 .HS 8E8E8E8E919293949B9C9DA0A0A08F8F8F9293949B9C9D9EA1A1A1A1
2470 TABLE354 .HS 444C545C505450545054504C545C88909894909490949094889098A0
2475 TABLE330 .HS 00048892AAABBBBFFF
2480 D3 JSR .3
2485 INX
2490 .3 STX TEMP2
2495 LDA #$0C
2500 STA HEIGHT
2505 .1 LDA #$00
2510 STA PATINDEX
2515 LDY TEMP2
2520 LDA (SCRPNT1),Y
2525 STA POINTER1+1
2530 LDA (SCRPNT2),Y
2535 STA POINTER1
2540 LDA #$0B
2545 STA TEMP1
2550 .2 LDY PATINDEX
2555 LDA (POINTER2),Y
2560 LDY TEMP1
2565 STA (POINTER1),Y
2570 INC PATINDEX
2575 INY
2580 STY TEMP1
2585 CPY #$25
2590 BCC .2
2595 LDA TEMP2
2600 CLC
2605 ADC #$04
2610 STA TEMP2
2615 DEC HEIGHT
2620 BNE .1
2625 RTS
2630 PLOT.CLOCK
2635 LDA #$65
2640 STA POINTER2+1
2645 LDX MINUTES
2650 LDA #$12
2655 LDY TABLE301A,X
2660 JSR .1
2665 LDA SECONDS
2670 AND #$0F
2675 TAX
2680 LDA #$15
2685 LDY TABLE301A,X
2690 JSR .1
2695 LDA SECONDS
2700 LSR
2705 LSR
2710 LSR
2715 LSR
2720 TAX
2725 LDA #$14
2730 LDY TABLE301A,X
2735 .1 STA TEMP1
2740 STY POINTER2
2745 LDA #$38
2750 STA POINTER1+1
2755 LDA #$98
2760 STA POINTER4+1
2765 LDA #$00
2770 STA POINTER1
2775 STA POINTER4
2780 LDA #$06
2785 STA HEIGHT
2790 .2 LDY HEIGHT
2795 LDA (POINTER2),Y
2800 LDY TEMP1
2805 STA (POINTER1),Y
2810 STA (POINTER4),Y
2815 LDA POINTER1+1
2820 SEC
2825 SBC #$04
2830 STA POINTER1+1
2835 CLC
2840 ADC #$60
2845 STA POINTER4+1
2850 DEC HEIGHT
2855 BPL .2
2860 RTS
2865 TABLE301A .HS C98A91989FA6ADB4BBC2
2870 PLOT.LORES.NUMS
2875 LDY #$00
2880 STY TEMP3
2885 LDA PLAYERNUM
2890 BNE .3
2895 LDX #$08
2900 BNE .4
2905 .3 LDX #$10
2910 .4 JSR .2
2915 LDY #$07
2920 STY TEMP3
2925 LDA ROUND
2930 ASL
2935 ASL
2940 ASL
2945 TAX
2950 .2 LDA #$07
2955 STA HEIGHT
2960 .1 LDY TEMP3
2965 LDA TABLE310,Y
2970 STA POINTER1+1
2975 LDA TABLE311,Y
2980 STA POINTER1
2985 LDY #$23
2990 LDA TABLE312,X
2995 STA TEMP2
3000 LDA #$00
3005 ASL TEMP2
3010 ROR
3015 STA (POINTER1),Y
3020 INY
3025 ASL TEMP2
3030 LDA #$00
3035 ROR
3040 STA (POINTER1),Y
3045 INY
3050 ASL TEMP2
3055 LDA #$00
3060 ROR
3065 STA (POINTER1),Y
3070 INY
3075 ASL TEMP2
3080 LDA #$00
3085 ROR
3090 STA (POINTER1),Y
3095 INC TEMP3
3100 INX
3105 DEC HEIGHT
3110 BNE .1
3115 RTS
3120 TABLE310 .HS 0606070704040507040405050606
3125 TABLE311 .HS 0080008028A828A850D050D050D0
3130 TABLE312 .HS 000000000000000060E060606060F00060F0103060C0F000F01010701010F00080809090F0101000F08080F01010F000F08080F09090F000F0103060C0808000F09090F09090F000F090F01010101000
3135 D1
3140 STY TEMP1
3145 LDA #$04
3150 STA HEIGHT
3155 .5 LDY TEMP1
3160 LDA (SCRPNT1),Y
3165 STA POINTER2+1
3170 LDA (SCRPNT2),Y
3175 STA POINTER2
3180 LDY #$04
3185 .3 LDA (POINTER2),Y
3190 ORA #$80
3195 STA (POINTER2),Y
3200 INY
3205 CPY #$16
3210 BCC .3
3215 LDY #$1A
3220 .4 LDA (POINTER2),Y
3225 ORA #$80
3230 STA (POINTER2),Y
3235 INY
3240 CPY #$2C
3245 BCC .4
3250 INC TEMP1
3255 DEC HEIGHT
3260 BNE .5
3265 RTS
3270 D2
3275 STY TEMP1
3280 LDA #$48
3285 STA HEIGHT
3290 .1 LDY TEMP1
3295 LDA (SCRPNT1),Y
3300 STA POINTER2+1
3305 LDA (SCRPNT2),Y
3310 STA POINTER2
3315 LDY #$04
3320 LDA (POINTER2),Y
3325 ORA #$80
3330 STA (POINTER2),Y
3335 LDY #$2B
3340 LDA (POINTER2),Y
3345 ORA #$80
3350 STA (POINTER2),Y
3355 INC TEMP1
3360 DEC HEIGHT
3365 BNE .1
3370 RTS
3375 DRAW.LETTERS
3380 LDA #$07
3385 STA HEIGHT
3390 LDA #$3C
3395 STA POINTER1+1
3400 LDA #$00
3405 STA POINTER1
3410 .8 LDY #$00
3415 TYA
3420 .7 STA (POINTER1),Y
3425 .9 INY
3430 CPY #$10
3435 BEQ .9
3440 CPY #$17
3445 BEQ .9
3450 CPY #$28
3455 BCC .7
3460 LDA POINTER1+1
3465 SEC
3470 SBC #$04
3475 STA POINTER1+1
3480 DEC HEIGHT
3485 BPL .8
3490 LDA #$06
3495 STA HEIGHT
3500 LDA #$38
3505 STA POINTER1+1
3510 LDX #$00
3515 STX POINTER1
3520 .3 LDY #$00
3525 .1 LDA TABLE390,X
3530 STA (POINTER1),Y
3535 INX
3540 INY
3545 CPY #$09
3550 BCC .1
3555 LDY #$0E
3560 LDA TABLE390,X
3565 STA (POINTER1),Y
3570 INX
3575 LDY #$13
3580 .2 LDA TABLE390,X
3585 STA (POINTER1),Y
3590 INX
3595 LDA NO.OF.PLAYERS
3600 CMP #$02
3605 BEQ .5
3610 TXA
3615 CLC
3620 ADC #$0A
3625 TAX
3630 BNE .6
3635 .5 LDA #$06
3640 STA $3C1D
3645 LDY #$19
3650 .4 LDA TABLE390,X
3655 STA (POINTER1),Y
3660 INX
3665 INY
3670 CPY #$22
3675 BCC .4
3680 LDY #$27
3685 LDA TABLE390,X
3690 STA (POINTER1),Y
3695 INX
3700 .6 LDA POINTER1+1
3705 SEC
3710 SBC #$04
3715 STA POINTER1+1
3720 DEC HEIGHT
3725 BPL .3
3730 LDA #$0C
3735 STA $3C04
3740 LDA #$18
3745 STA $3C13
3750 RTS
3755 TABLE390 .HS 301E0F7E4C6740610F0C66184F073F66336070070C306073190C1843010333181870790C064C61300033
3760 .HS 70614C1933664C010333007830664C19336640013330664C1933667C010333001833664C19337E000633
3765 .HS 3C660C0633180C000333181E330643190C0600063330660C000000006003336618330600000000300633
3770 .HS 7001030000000000030C187840010000000040010C
3775 MOVE.MEMORY
3780 STA L3+1
3785 STA L4+1
3790 STY L3+2
3795 STX L4+2
3800 L3 LDA $2000
3805 L4 STA $4000
3810 INC L3+1
3815 INC L4+1
3820 BNE L3
3825 INC L3+2
3830 INC L4+2
3835 LDA L3+2
3840 CMP TEMP1
3845 BNE L3
3850 .LI ON
3855 RTS
3860 .LI OFF
3865 .OR $15BC
3870 .TA $15BC
3875 SET.FOOD.STATUS
3880 STX TEMP2
3885 LDA #$00
3890 STA PATINDEX
3895 STA POINTER1
3900 LDA #$1C
3905 STA POINTER1+1
3910 .14 DEX
3915 BPL .11
3920 .12 LDY PATINDEX
3925 LDA TABLE350,Y
3930 BEQ .8
3935 CMP #$FA
3940 BEQ .9
3945 CMP #$FF
3950 BEQ .10
3955 TAY
3960 LDA TEMP1
3965 STA (POINTER1),Y
3970 .13 INC PATINDEX
3975 BNE .12
3980 .9 INC POINTER1+1
3985 BNE .13
3990 .10 DEC POINTER1+1
3995 BNE .13
4000 .11 LDY PATINDEX
4005 LDA TABLE350,Y
4010 BEQ .15
4015 CMP #$FA
4020 BEQ .16
4025 CMP #$FF
4030 BEQ .17
4035 INC PATINDEX
4040 BNE .11
4045 .15 INC PATINDEX
4050 BNE .14
4055 .16 INC POINTER1+1
4060 INC PATINDEX
4065 BNE .11
4070 .17 DEC POINTER1+1
4075 INC PATINDEX
4080 BNE .11
4085 .8 LDX TEMP2
4090 RTS
4095 TABLE350 .HS 1C1D4C4D7C7DACAD002122232451525354002B2C2D5B5C5D00616263919293C1C2C300FACCCDCEFCFDFEFA2C2D2E00323334626364003B3C3D3E6B6C6D6E00FFE2E3FA12134243727300
4100 TABLE380 .HS E0C7B4A79583746D
4105 TABLE381 .HS 0303050505050303
4110 TABLE382 .HS 0606101010100606
4115 TABLE383 .HS 808F9EADBCCBDAE9
4120 POINTS.FOR.FOOD
4125 LDX #$00
4130 STX ALL.FOOD.OFF
4135 .2 LDA FOODBYT3,X
4140 BMI .1
4145 .7 INX
4150 CPX #$08
4155 BCC .2
4160 RTS
4165 .1 STX TEMP5
4170 LDA TABLE380,X
4175 STA TEMP1
4180 LDA #$50
4185 STA TEMP2
4190 .4 LDY TEMP1
4195 LDA $C030
4200 .3 DEY
4205 BNE .3
4210 DEC TEMP2
4215 BNE .4
4220 LDA FOODBYT3,X
4225 AND #$04
4230 BEQ .5
4235 LDA TABLE381,X
4240 BNE .6
4245 .5 INC ALL.FOOD.OFF
4250 LDA TABLE382,X
4255 .6 JSR SCORE
4260 LDX TEMP5
4265 LDA TABLE383,X
4270 JSR DELAY.Z
4275 JMP .7
4280 DAZZLE
4285 STA TEMP1
4290 LDX #$03
4295 .3 LDY #$00
4300 STY POINTER1
4305 LDA #$04
4310 STA POINTER1+1
4315 .2 LDA (POINTER1),Y
4320 BEQ .1
4325 JSR RANDOM1
4330 STA (POINTER1),Y
4335 .1 INY
4340 BNE .2
4345 INC POINTER1+1
4350 LDA POINTER1+1
4355 CMP #$08
4360 BNE .2
4365 DEX
4370 BEQ .4
4375 .7 DEC TEMP1
4380 BNE .3
4385 RTS
4390 .4 LDX #$03
4395 LDA #$22
4400 STA TEMP2
4405 LDA #$2A
4410 STA TEMP3
4415 .6 LDY TEMP2
4420 LDA $C030
4425 .5 DEY
4430 BNE .5
4435 DEC TEMP3
4440 BNE .6
4445 .LI ON
4450 BEQ .7
4455 .LI OFF
4460 .OR $1A14
4465 .TA $1A14
4470 PLOT.HISCORE
4475 LDA #$00
4480 TAY
4485 TAX
4490 .3 STA $27D0,Y
4495 STA $2BD0,Y
4500 STA $2FD0,Y
4505 STA $33D0,Y
4510 STA $37D0,Y
4515 STA $3BD0,Y
4520 STA $3FD0,Y
4525 INY
4530 CPY #$26
4535 BNE .3
4540 LDA HISCOREHI
4545 LSR
4550 LSR
4555 LSR
4560 LSR
4565 LDY #$E7
4570 JSR PLOT.NUM2.Z
4575 LDA HISCOREHI
4580 AND #$0F
4585 LDY #$E8
4590 JSR PLOT.NUM2.Z
4595 LDA HISCORELO
4600 LSR
4605 LSR
4610 LSR
4615 LSR
4620 LDY #$E9
4625 JSR PLOT.NUM2.Z
4630 LDA HISCORELO
4635 AND #$0F
4640 LDY #$EA
4645 JSR PLOT.NUM2.Z
4650 LDA ROUND
4655 LDY #$F4
4660 JSR PLOT.NUM2.Z
4665 LDA #$23
4670 STA POINTER1+1
4675 LDA #$DC
4680 STA POINTER1
4685 LDA #$07
4690 STA HEIGHT
4695 .2 LDY #$0F
4700 LDA TABLE395,X
4705 STA (POINTER1),Y
4710 LDY #$09
4715 INX
4720 .1 LDA TABLE395,X
4725 STA (POINTER1),Y
4730 INX
4735 DEY
4740 BPL .1
4745 LDA POINTER1+1
4750 ADC #$04
4755 STA POINTER1+1
4760 DEC HEIGHT
4765 BNE .2
4770 LDA #$0C
4775 STA $3FDE
4780 .LI ON
4785 RTS
4790 .LI OFF
4795 .OR $4E4A
4800 .TA $1E4A
4805 TABLE395 .HS 0C0000000003000600014C33000000000C600600014C33180313000060060C194C33663F0C6703001E33017F3366330C614C006633194C3318314C614C60674F194C0C6760031E33006660660C
4810 .OR $5EB0
4815 .TA $1DB0
4820 SELECT2
4825 JSR Z4.Z
4830 SELECT3
4835 LDA $C010
4840 SELECT
4845 JSR .4
4850 JSR MUSIC.Z
4855 LDA $C000
4860 STA TEMP1
4865 .1 INC RNDBYTE1
4870 BEQ .1
4875 .2 DEC RNDBYTE2
4880 BEQ .2
4885 LDA TEMP1
4890 BPL SELECT
4895 STA $C010
4900 CMP #$CB
4905 BEQ .10
4910 CMP #$B1
4915 BEQ .7
4920 CMP #$B2
4925 BEQ .8
4930 CMP #$CA
4935 BEQ .9
4940 CMP #$8D
4945 BNE SELECT
4950 RTS
4955 .4 LDA #$6D
4960 STA POINTER1
4965 LDA #$20
4970 STA POINTER1+1
4975 LDA #$07
4980 STA HEIGHT
4985 LDX #$00
4990 INC FLAP
4995 LDA FLAP
5000 AND #$01
5005 BEQ .6
5010 LDX #$0E
5015 .6 LDY #$00
5020 LDA TABLE399,X
5025 STA (POINTER1),Y
5030 INY
5035 INX
5040 LDA TABLE399,X
5045 STA (POINTER1),Y
5050 LDA POINTER1+1
5055 CLC
5060 ADC #$04
5065 STA POINTER1+1
5070 INX
5075 DEC HEIGHT
5080 BNE .6
5085 RTS
5090 .7 LDA #$01
5095 .11 CMP NO.OF.PLAYERS
5100 BEQ SELECT
5105 STA NO.OF.PLAYERS
5110 LDY #$0A
5115 JMP FLIP
5120 .8 LDA #$02
5125 BNE .11
5130 .10 LDA #$09
5135 BNE .12
5140 .9 LDA #$06
5145 .12 CMP $460D
5150 BEQ SELECT
5155 STA $460D
5160 LDY #$1C
5165 .LI ON
5170 JMP FLIP
5175 .OR $F54
5180 .TA $1F54
5185 FLIP
5190 STY TEMP1
5195 .LI OFF
5200 LDA #$14
5205 STA HEIGHT
5210 LDA #$B6
5215 STA TEMP2
5220 .3 LDA #$0F
5225 STA WIDTH
5230 LDY TEMP2
5235 LDA (SCRPNT1),Y
5240 STA POINTER1+1
5245 LDA (SCRPNT2),Y
5250 STA POINTER1
5255 LDY TEMP1
5260 .2 LDA (POINTER1),Y
5265 BEQ .1
5270 EOR #$FF
5275 STA (POINTER1),Y
5280 .1 INY
5285 DEC WIDTH
5290 BNE .2
5295 INC TEMP2
5300 DEC HEIGHT
5305 BNE .3
5310 JMP SELECT3
5315 .LI ON
5320 TABLE399 .HS 400F30600C600C0C030367002A00000000000000600F183006307E0F
5325 .OR $45BA
5330 .TA $25BA
5335 JMP INITIALIZE.1
5340 JMP DRAW.GREEN
5345 JMP MOVE.MEMORY
5350 SETUP
5355 .LI OFF
5360 STY $3F3
5365 LDA #$43
5370 STA SCRPNT1+1
5375 LDA #$C0
5380 STA SCRPNT1
5385 LDA #$44
5390 STA SCRPNT2+1
5395 LDA #$A8
5400 STA SCRPNT2
5405 LDA $C057
5410 LDA $C054
5415 LDA $C052
5420 LDA $C050
5425 LDA #$4C
5430 STA $31
5435 LDA #$41
5440 STA $33
5445 LDA #$31
5450 STA $3F2
5455 LDA #$A5
5460 STA $3F4
5465 LDA #$12
5470 .1 STA $45C3,Y
5475 INY
5480 CPY #$33
5485 BNE .1
5490 .LI ON
5495 RTS
5500 .OR $41FF
5505 .TA $11FF
5510 JMP RESET
5515 .LI OFF