antoine-source/picnicparanoia/source copie/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

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