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

1077 lines
23 KiB
Plaintext

0005 .LI OFF
0010 AAMSBYT .EQ $10C0
0015 AALSBYT .EQ $10E0
0020 HPDL .EQ $E9
0025 VPDL .EQ $EA
0030 PDLSEL .EQ $EB
0035 TEMP1 .EQ $F0
0040 TEMP2 .EQ $F1
0045 TEMP3 .EQ $F2
0050 SCRPNT1 .EQ $F5
0055 SCRPNT2 .EQ $F7
0060 POINTER1 .EQ $F9
0065 POINTER2 .EQ $FB
0070 POINTER3 .EQ $FD
0075 PARALYZE .EQ $A2
0080 MANX .EQ $CB
0085 MANXX .EQ $CA
0090 MANY .EQ $C9
0095 MANDIR .EQ $C8
0100 MANSTATE .EQ $C7
0105 NEXTSTATE .EQ $C6
0110 HEIGHT .EQ $ED
0115 SWAT .EQ $C5
0120 MOD2 .EQ $C4
0125 SWATLEGAL .EQ $C3
0130 PATINDEX .EQ $EC
0135 MANY8 .EQ $C2
0140 MANY10 .EQ $C1
0145 MANX3 .EQ $C0
0150 SWTRX .EQ $BF
0155 SWTRXX .EQ $BE
0160 SWTRY .EQ $BD
0165 MANXOLD .EQ $BC
0170 MANXXOLD .EQ $BB
0175 MANYOLD .EQ $BA
0180 DESTBYT1 .EQ $1080
0185 ANTBYT4 .EQ $1060
0190 ANTNUM .EQ $D8
0195 K3 .EQ $B9
0200 INIT.K3 .EQ $B8
0205 GRAB.FOOD .EQ $B7
0210 BYFOOD .EQ $B6
0215 SPIDERNUM .EQ $A3
0220 CAN.KEY.PRESSED .EQ $80
0225 GRAB.SQUELCH .EQ $86
0230 FOOTSTEP .EQ $85
0235 ERASE.WEB.Z .EQ $600C
0240 PLOT.NEW.SWTR.Z .EQ $4F00
0245 ERASE.OLD.SWTR.Z .EQ $4F03
0250 VACATE.ANTS.BLOCKS.Z .EQ $4F06
0255 SCORE.Z .EQ $4F09
0260 PLOT.SPIDER.Z .EQ $6006
0265 STING.MAN.Z .EQ $600F
0270 VACATE.WASPS.BLOCKS.Z .EQ $580C
0275 SPIDERBYT4 .EQ $4118
0280 PLOT.WASP.Z .EQ $580F
0285 CARRY.FOOD.Z .EQ $7340
0290 RANDOM1.Z .EQ $1706
0295 RANDOM2.Z .EQ $1709
0300 DELAY.Z .EQ $5800
0305 PROTECT.Z .EQ $4230
0310 .OR $10C0
0315 .HS 1A1A1A1B1B1B1B1B1C1C1C1C1C1D1D1D1D1D1D1E1E1E1E1E1F1F1F1F1F
0320 .OR $10E0
0325 .HS 90C0F0205080B0E0104070A0D000306090C0F0205080B0E0104070A0D0
0330 .OR $4600
0335 .TA $2600
0340 JMP MAN.MASTER
0345 JMP MAN.RIGHT
0350 JMP JOYSTICK
0355 JMP KYBD
0360 JMP $4606
0365 JMP PLOT.MAN
0370 JMP ERASE.LEFT
0375 JMP SWTR.SOUND
0380 JOYSTICK
0385 LDY #$00
0390 INC PDLSEL
0395 LDA PDLSEL
0400 AND #$01
0405 BEQ .1
0410 STY HPDL
0415 LDA $C070
0420 .3 LDA #$11
0425 JSR DELAY.Z
0430 LDA $C064
0435 BPL .2
0440 INC HPDL
0445 LDA #$11
0450 JSR DELAY.Z
0455 LDA $C064
0460 BPL .2
0465 INC HPDL
0470 BNE .2
0475 .1 STY VPDL
0480 LDA $C070
0485 LDA #$11
0490 JSR DELAY.Z
0495 LDA $C065
0500 BPL .2
0505 INC VPDL
0510 LDA #$11
0515 JSR DELAY.Z
0520 LDA $C065
0525 BPL .2
0530 INC VPDL
0535 .2 LDA $C062
0540 BPL .4
0545 LDA #$80
0550 STA GRAB.FOOD
0555 LDA BYFOOD
0560 BEQ .4
0565 LDA GRAB.SQUELCH
0570 BNE .7
0575 JSR GRAB.FOOD.SOUND
0580 BNE .7
0585 .4 LDA #$00
0590 STA GRAB.SQUELCH
0595 .7 LDX #$80
0600 LDA $C061
0605 BPL .8
0610 LDA #$00
0615 STA GRAB.FOOD
0620 LDA #$80
0625 BMI .9
0630 .8 LDA #$00
0635 .9 STA SWAT
0640 BEQ .10
0645 LDA MOD2
0650 AND #$02
0655 BEQ .10
0660 LDX #$00
0665 .10 STX SWATLEGAL
0670 LDY VPDL
0675 LDA HPDL
0680 CLC
0685 ADC TABLEJ1,Y
0690 TAY
0695 LDA TABLEJ2,Y
0700 STA MANDIR
0705 LDA $C000
0710 CMP #$D8
0715 BNE .11
0720 STA CAN.KEY.PRESSED
0725 .11 CMP #$9B
0730 BNE .12
0735 LDA $C010
0740 .13 LDA $C000
0745 BPL .13
0750 LDA $C010
0755 .12 JMP KYBD2
0760 TABLEJ1 .HS 00030606
0765 TABLEJ2 .HS B8B9B0C941D0CBCCBB
0770 KYBD
0775 LDA $C000
0780 STA $C010
0785 BPL .3
0790 CMP #$9B
0795 BNE .1
0800 .7 LDA $C000
0805 BPL .7
0810 STA $C010
0815 .1 CMP #$A0
0820 BNE .2
0825 LDA #$80
0830 STA GRAB.FOOD
0835 LDA BYFOOD
0840 BEQ .6
0845 JSR GRAB.FOOD.SOUND
0850 .6 LDA #$00
0855 STA SWAT
0860 BEQ .3
0865 .2 CMP #$8D
0870 BNE .4
0875 LDA SWAT
0880 EOR #$80
0885 STA SWAT
0890 LDA #$00
0895 STA GRAB.FOOD
0900 .3 LDA MANDIR
0905 .4 STA MANDIR
0910 LDX #$80
0915 LDA SWAT
0920 BEQ .5
0925 LDA MOD2
0930 AND #$02
0935 BEQ .5
0940 LDX #$00
0945 .5 STX SWATLEGAL
0950 KYBD2
0955 LDY MANSTATE
0960 LDA MANDIR
0965 CMP #$B9
0970 BEQ B1
0975 CMP #$B0
0980 BEQ B2
0985 CMP #$D0
0990 BEQ B3
0995 CMP #$BB
1000 BEQ B4
1005 CMP #$CC
1010 BEQ B5
1015 CMP #$CB
1020 BEQ B6
1025 CMP #$C9
1030 BEQ B7
1035 CMP #$B8
1040 BEQ B8
1045 CMP #$D8
1050 BNE .1
1055 STA CAN.KEY.PRESSED
1060 .1 LDA #$41
1065 STA MANDIR
1070 RTS
1075 B1 JSR A1
1080 STA NEXTSTATE
1085 JMP MAN.UP
1090 B2 JSR A5
1095 STA NEXTSTATE
1100 JSR MAN.UP
1105 BNE C1
1110 JSR MAN.RIGHT
1115 BNE B2A
1120 RTS
1125 B2A JSR MAN.DOWN
1130 LDA #$40
1135 RTS
1140 B3 JSR A8
1145 STA NEXTSTATE
1150 JMP MAN.RIGHT
1155 B4 JSR A9
1160 STA NEXTSTATE
1165 JSR MAN.DOWN
1170 BNE C1
1175 JSR MAN.RIGHT
1180 BNE B4A
1185 RTS
1190 B4A JSR MAN.UP
1195 LDA #$40
1200 RTS
1205 B5 JSR A10
1210 STA NEXTSTATE
1215 JMP MAN.DOWN
1220 B6 JSR A13
1225 STA NEXTSTATE
1230 JSR MAN.DOWN
1235 BNE C1
1240 JSR MAN.LEFT
1245 BNE B4A
1250 RTS
1255 B7 JSR A17
1260 STA NEXTSTATE
1265 JMP MAN.LEFT
1270 B8 JSR A18
1275 STA NEXTSTATE
1280 JSR MAN.UP
1285 BNE C1
1290 JSR MAN.LEFT
1295 BNE B2A
1300 C1 RTS
1305 A1 TXA
1310 BPL A4
1315 CPY #$02
1320 BNE A3
1325 A2 LDA #$01
1330 RTS
1335 A3 LDA #$02
1340 RTS
1345 A4 LDA #$0B
1350 RTS
1355 A5 TXA
1360 BPL A7
1365 A6 CPY #$01
1370 BNE A2
1375 LDA #$02
1380 RTS
1385 A7 LDA #$07
1390 RTS
1395 A8 TXA
1400 BMI A6
1405 LDA #$05
1410 RTS
1415 A9 TXA
1420 BMI A6
1425 LDA #$09
1430 RTS
1435 A10 TXA
1440 BPL A12
1445 CPY #$04
1450 BNE A11
1455 LDA #$03
1460 RTS
1465 A11 LDA #$04
1470 RTS
1475 A12 LDA #$0C
1480 RTS
1485 A13 TXA
1490 BPL A16
1495 A14 CPY #$03
1500 BNE A15
1505 LDA #$04
1510 RTS
1515 A15 LDA #$03
1520 RTS
1525 A16 LDA #$0A
1530 RTS
1535 A17 TXA
1540 BMI A14
1545 LDA #$06
1550 RTS
1555 A18 TXA
1560 BMI A14
1565 LDA #$08
1570 RTS
1575 PLOT.MAN
1580 LDX MANSTATE
1585 LDA TABLE11,X
1590 STA POINTER1+1
1595 LDA TABLE12,X
1600 STA POINTER1
1605 LDX MANXX
1610 LDA #$10
1615 STA HEIGHT
1620 LDA #$00
1625 STA PATINDEX
1630 .6 LDY MANY
1635 LDA (SCRPNT1),Y
1640 STA POINTER2+1
1645 LDA (SCRPNT2),Y
1650 STA POINTER2
1655 LDY MANX
1660 LDA (POINTER2),Y
1665 AND TABLE13,X
1670 STA TEMP1
1675 LDY PATINDEX
1680 LDA (POINTER1),Y
1685 STA TEMP2
1690 LDY TABLE14,X
1695 LDA #$00
1700 .1 LSR TEMP2
1705 ROR
1710 DEY
1715 BNE .1
1720 LSR
1725 ORA TEMP1
1730 LDY MANX
1735 CPY #$04
1740 BCC .2
1745 CPY #$2C
1750 BCS .2
1755 STA (POINTER2),Y
1760 .2 INC MANX
1765 INC PATINDEX
1770 LDY PATINDEX
1775 LDA (POINTER1),Y
1780 STA TEMP1
1785 LDY TABLE14,X
1790 LDA #$00
1795 .3 LSR TEMP1
1800 ROR
1805 DEY
1810 BNE .3
1815 LSR
1820 ORA TEMP2
1825 LDY MANX
1830 CPY #$04
1835 BCC .4
1840 CPY #$2C
1845 BCS .4
1850 STA (POINTER2),Y
1855 .4 INY
1860 CPY #$04
1865 BCC .5
1870 CPY #$2C
1875 BCS .5
1880 LDA (POINTER2),Y
1885 AND TABLE15,X
1890 ORA TEMP1
1895 STA (POINTER2),Y
1900 .5 DEC MANX
1905 INC MANY
1910 INC PATINDEX
1915 DEC HEIGHT
1920 BNE .7
1925 LDA MANY
1930 SEC
1935 SBC #$10
1940 STA MANY
1945 RTS
1950 .7 JMP .6
1955 JMP .6
1960 ERASE.LEFT
1965 LDA MANY
1970 STA TEMP2
1975 LDA MANX
1980 STA TEMP1
1985 LDA #$10
1990 STA HEIGHT
1995 LDX MANXX
2000 BEQ .3
2005 CPX #$04
2010 BNE .1
2015 .3 DEC TEMP1
2020 .1 LDY TEMP2
2025 LDA (SCRPNT1),Y
2030 STA POINTER2+1
2035 LDA (SCRPNT2),Y
2040 STA POINTER2
2045 LDY TEMP1
2050 CPY #$2C
2055 BCS .2
2060 CPY #$04
2065 BCC .4
2070 LDA (POINTER2),Y
2075 AND TABLE16,X
2080 ORA TABLE17,X
2085 STA (POINTER2),Y
2090 .4 CPX #$04
2095 BNE .2
2100 INY
2105 CPY #$2C
2110 BCS .2
2115 CPY #$04
2120 BCC .2
2125 LDA (POINTER2),Y
2130 ORA #$01
2135 STA (POINTER2),Y
2140 .2 INC TEMP2
2145 DEC HEIGHT
2150 BNE .1
2155 RTS
2160 ERASE.RIGHT
2165 LDA MANY
2170 STA TEMP2
2175 LDA MANX
2180 CLC
2185 ADC #$02
2190 STA TEMP1
2195 LDA #$10
2200 STA HEIGHT
2205 LDX MANXX
2210 CPX #$03
2215 BEQ .3
2220 CPX #$06
2225 BNE .1
2230 .3 INC TEMP1
2235 .1 LDY TEMP2
2240 LDA (SCRPNT1),Y
2245 STA POINTER2+1
2250 LDA (SCRPNT2),Y
2255 STA POINTER2
2260 LDY TEMP1
2265 CPY #$2C
2270 BCS .4
2275 CPY #$04
2280 BCC .2
2285 LDA (POINTER2),Y
2290 AND TABLE18,X
2295 ORA TABLE19,X
2300 STA (POINTER2),Y
2305 .4 CPX #$06
2310 BNE .2
2315 DEY
2320 CPY #$2C
2325 BCS .2
2330 CPY #$04
2335 BCC .2
2340 LDA (POINTER2),Y
2345 ORA #$40
2350 STA (POINTER2),Y
2355 .2 INC TEMP2
2360 DEC HEIGHT
2365 BNE .1
2370 RTS
2375 ERASE.UP
2380 LDY MANY
2385 DEY
2390 E1 LDA (SCRPNT1),Y
2395 STA POINTER2+1
2400 LDA (SCRPNT2),Y
2405 STA POINTER2
2410 LDX MANXX
2415 LDY MANX
2420 CPY #$2C
2425 BCS .1
2430 CPY #$04
2435 BCC .2
2440 LDA (POINTER2),Y
2445 AND TABLE13,X
2450 ORA TABLE20,X
2455 STA (POINTER2),Y
2460 .2 INY
2465 CPY #$2C
2470 BCS .1
2475 CPY #$04
2480 BCC .3
2485 LDA TABLE22,X
2490 STA (POINTER2),Y
2495 .3 INY
2500 CPY #$2C
2505 BCS .1
2510 CPY #$04
2515 BCC .1
2520 LDA (POINTER2),Y
2525 AND TABLE15,X
2530 ORA TABLE21,X
2535 STA (POINTER2),Y
2540 .1 LDA #$00
2545 RTS
2550 ERASE.DOWN
2555 LDA MANY
2560 CLC
2565 ADC #$10
2570 TAY
2575 BNE E1
2580 GET.BLOCK2
2585 LDY MANX
2590 LDA MANY
2595 LSR
2600 LSR
2605 LSR
2610 TAX
2615 LDA AALSBYT,X
2620 STA POINTER3
2625 LDA AAMSBYT,X
2630 STA POINTER3+1
2635 LDA (POINTER3),Y
2640 RTS
2645 SET.VACANT
2650 JSR GET.BLOCK2
2655 LDA #$00
2660 STA (POINTER3),Y
2665 RTS
2670 SET.MAN
2675 JSR GET.BLOCK2
2680 LDA #$01
2685 STA (POINTER3),Y
2690 RTS
2695 MAN.MOVE.LEGAL.CHECK
2700 MAN.LEFT
2705 JSR .3
2710 BNE .9
2715 JMP ERASE.RIGHT
2720 .3 LDA MANXX
2725 BEQ .4
2730 CMP #$04
2735 BEQ .5
2740 DEC MANXX
2745 LDA #$00
2750 .9 RTS
2755 .5 LDA MANX
2760 CMP #$01
2765 BNE .4
2770 LDA MANY
2775 AND #$07
2780 BEQ .6
2785 JSR V3
2790 LDA #$2C
2795 STA MANX
2800 LDA #$00
2805 STA MANXX
2810 JMP V6
2815 .6 JSR V1
2820 LDA #$2C
2825 STA MANX
2830 LDA #$00
2835 STA MANXX
2840 JMP V4
2845 .4 LDA MANY
2850 STA TEMP2
2855 CLC
2860 ADC #$08
2865 STA MANY8
2870 ADC #$08
2875 STA MANY10
2880 DEC MANX
2885 LDA MANX
2890 STA TEMP1
2895 CLC
2900 ADC #$03
2905 STA MANX3
2910 JSR V7
2915 BNE .1
2920 LDA MANY8
2925 JSR V7A
2930 BNE .2
2935 LDA TEMP2
2940 AND #$07
2945 BEQ .7
2950 LDA MANY10
2955 JSR V7A
2960 BNE .2
2965 JSR SET.MAN
2970 LDA MANX3
2975 STA MANX
2980 JSR SET.VACANT
2985 LDA TEMP1
2990 STA MANX
2995 LDA MANY8
3000 STA MANY
3005 .7 JSR SET.MAN
3010 LDA TEMP2
3015 STA MANY
3020 JSR SET.MAN
3025 LDA MANX3
3030 STA MANX
3035 DEC MANXX
3040 BPL .8
3045 LDA #$06
3050 STA MANXX
3055 .8 JSR SET.VACANT
3060 LDA MANY8
3065 STA MANY
3070 JSR SET.VACANT
3075 LDA TEMP1
3080 STA MANX
3085 LDA TEMP2
3090 STA MANY
3095 LDA #$00
3100 RTS
3105 .1 STA TEMP3
3110 LDA TEMP1
3115 CLC
3120 ADC #$01
3125 STA MANX
3130 LDA TEMP3
3135 RTS
3140 .2 STA TEMP3
3145 LDA TEMP2
3150 STA MANY
3155 LDA MANX
3160 CLC
3165 ADC #$01
3170 STA MANX
3175 LDA TEMP3
3180 RTS
3185 MAN.RIGHT
3190 JSR .3
3195 BNE .9
3200 JMP ERASE.LEFT
3205 .3 LDA MANXX
3210 CMP #$06
3215 BEQ .4
3220 CMP #$03
3225 BEQ .5
3230 INC MANXX
3235 LDA #$00
3240 .9 RTS
3245 .5 LDA MANX
3250 CMP #$2C
3255 BNE .4
3260 LDA MANY
3265 AND #$07
3270 BEQ .6
3275 JSR V3
3280 LDA #$01
3285 STA MANX
3290 LDA #$06
3295 STA MANXX
3300 JMP V6
3305 .6 JSR V1
3310 LDA #$01
3315 STA MANX
3320 LDA #$06
3325 STA MANXX
3330 JMP V4
3335 .4 LDA MANY
3340 STA TEMP2
3345 CLC
3350 ADC #$08
3355 STA MANY8
3360 ADC #$08
3365 STA MANY10
3370 LDA MANX
3375 STA TEMP1
3380 CLC
3385 ADC #$03
3390 STA MANX3
3395 STA MANX
3400 JSR V7
3405 BNE .1
3410 LDA MANY8
3415 JSR V7A
3420 BNE .2
3425 LDA TEMP2
3430 AND #$07
3435 BEQ .7
3440 LDA MANY10
3445 JSR V7A
3450 BNE .2
3455 JSR SET.MAN
3460 LDA TEMP1
3465 STA MANX
3470 JSR SET.VACANT
3475 LDA MANY8
3480 STA MANY
3485 LDA MANX3
3490 STA MANX
3495 .7 JSR SET.MAN
3500 LDA TEMP2
3505 STA MANY
3510 JSR SET.MAN
3515 LDA TEMP1
3520 STA MANX
3525 LDX MANXX
3530 INX
3535 CPX #$07
3540 BNE .8
3545 LDX #$00
3550 .8 STX MANXX
3555 JSR SET.VACANT
3560 LDA MANY8
3565 STA MANY
3570 JSR SET.VACANT
3575 LDA TEMP2
3580 STA MANY
3585 LDX TEMP1
3590 INX
3595 STX MANX
3600 LDA #$00
3605 RTS
3610 .1 STA TEMP3
3615 LDA TEMP1
3620 STA MANX
3625 LDA TEMP3
3630 RTS
3635 .2 STA TEMP3
3640 LDA TEMP2
3645 STA MANY
3650 LDA TEMP1
3655 STA MANX
3660 LDA TEMP3
3665 RTS
3670 MAN.UP
3675 JSR .6
3680 BNE .4
3685 JMP ERASE.DOWN
3690 .6 LDA MANY
3695 CMP #$0A
3700 BNE .1
3705 JSR V3
3710 LDA #$D0
3715 STA MANY
3720 JMP V4
3725 .1 SEC
3730 SBC #$01
3735 STA MANY
3740 AND #$07
3745 BEQ .5
3750 CMP #$07
3755 BEQ .3
3760 LDA #$00
3765 RTS
3770 .3 JSR V8
3775 BEQ .4
3780 INC MANY
3785 TAX
3790 .4 RTS
3795 .5 LDA MANY
3800 CLC
3805 ADC #$10
3810 STA MANY
3815 JSR SET.VACANT
3820 INC MANX
3825 JSR SET.VACANT
3830 INC MANX
3835 JSR SET.VACANT
3840 DEC MANX
3845 DEC MANX
3850 LDA MANY
3855 SEC
3860 SBC #$10
3865 STA MANY
3870 LDA #$00
3875 RTS
3880 MAN.DOWN
3885 JSR .5
3890 BNE .9
3895 JMP ERASE.UP
3900 .5 LDA MANY
3905 CMP #$CE
3910 BNE .1
3915 JSR V3
3920 LDA #$0A
3925 STA MANY
3930 JMP V4
3935 .1 CLC
3940 ADC #$01
3945 STA MANY
3950 AND #$07
3955 BEQ .4
3960 CMP #$01
3965 BEQ .2
3970 LDA #$00
3975 .9 RTS
3980 .2 LDA MANY
3985 CLC
3990 ADC #$10
3995 STA MANY
4000 JSR V8
4005 STA TEMP1
4010 BEQ .3
4015 LDA MANY
4020 SEC
4025 SBC #$11
4030 STA MANY
4035 LDA TEMP1
4040 RTS
4045 .3 LDA MANY
4050 SEC
4055 SBC #$10
4060 STA MANY
4065 LDA TEMP1
4070 RTS
4075 .4 DEC MANY
4080 JSR SET.VACANT
4085 INC MANX
4090 JSR SET.VACANT
4095 INC MANX
4100 JSR SET.VACANT
4105 DEC MANX
4110 DEC MANX
4115 INC MANY
4120 LDA #$00
4125 RTS
4130 V1 JSR SET.VACANT
4135 INC MANX
4140 JSR SET.VACANT
4145 INC MANX
4150 JSR SET.VACANT
4155 LDA MANY
4160 CLC
4165 ADC #$08
4170 V2 STA MANY
4175 JSR SET.VACANT
4180 DEC MANX
4185 JSR SET.VACANT
4190 DEC MANX
4195 JSR SET.VACANT
4200 LDA MANY
4205 SEC
4210 SBC #$08
4215 STA MANY
4220 RTS
4225 V3 JSR V1
4230 CLC
4235 ADC #$10
4240 INC MANX
4245 INC MANX
4250 JSR V2
4255 SEC
4260 SBC #$08
4265 STA MANY
4270 RTS
4275 V4 JSR SET.MAN
4280 INC MANX
4285 JSR SET.MAN
4290 INC MANX
4295 JSR SET.MAN
4300 LDA MANY
4305 CLC
4310 ADC #$08
4315 V5 STA MANY
4320 JSR SET.MAN
4325 DEC MANX
4330 JSR SET.MAN
4335 DEC MANX
4340 JSR SET.MAN
4345 LDA MANY
4350 SEC
4355 SBC #$08
4360 STA MANY
4365 LDX #$00
4370 RTS
4375 V6 JSR V4
4380 LDA MANY
4385 CLC
4390 ADC #$10
4395 INC MANX
4400 INC MANX
4405 JSR V5
4410 SEC
4415 SBC #$08
4420 STA MANY
4425 LDA #$00
4430 RTS
4435 V7A STA MANY
4440 V7 JMP GET.BLOCK2
4445 V8 JSR V7
4450 BNE .1
4455 INC MANX
4460 JSR V7
4465 BNE .2
4470 INC MANX
4475 JSR V7
4480 BEQ .3
4485 DEC MANX
4490 .2 DEC MANX
4495 TAX
4500 .1 RTS
4505 .3 JSR SET.MAN
4510 DEC MANX
4515 JSR SET.MAN
4520 DEC MANX
4525 JSR SET.MAN
4530 LDA #$00
4535 RTS
4540 MAN.MASTER
4545 DEC K3
4550 BEQ .11
4555 RTS
4560 .4 JMP EXT5
4565 .11 LDA INIT.K3
4570 STA K3
4575 LDY PARALYZE
4580 BNE .4
4585 LDA MANX
4590 STA MANXOLD
4595 LDA MANY
4600 STA MANYOLD
4605 LDA MANXX
4610 STA MANXXOLD
4615 INC MOD2
4620 JSR $460C
4625 BNE EXT6
4630 INC FOOTSTEP
4635 LDA #$03
4640 BIT FOOTSTEP
4645 BNE .3
4650 JSR FOOTSTEP.SOUND
4655 .3 LDA GRAB.FOOD
4660 BNE .1
4665 STA BYFOOD
4670 BEQ EXT2
4675 .1 LDA BYFOOD
4680 BNE .2
4685 STA GRAB.FOOD
4690 BEQ EXT2
4695 .2 JSR CARRY.FOOD.Z
4700 EXT2 LDA NEXTSTATE
4705 CMP #$05
4710 BCS .4
4715 LDY MANSTATE
4720 CPY #$05
4725 BCS .4
4730 CPY #$03
4735 BCC .6
4740 LDA NEXTSTATE
4745 CMP #$03
4750 BCS .5
4755 .4 JSR ERASE.OLD.SWTR.Z
4760 .5 JSR PLOT.NEW.SWTR.Z
4765 JSR PROTECT.Z
4770 LDA NEXTSTATE
4775 STA MANSTATE
4780 JMP PLOT.MAN
4785 .6 LDA NEXTSTATE
4790 CMP #$03
4795 BCS .4
4800 BCC .5
4805 EXT6 STA TEMP1
4810 AND #$40
4815 BNE EXT9
4820 LDA TEMP1
4825 CMP #$03
4830 BNE EXT4
4835 EXT9 LDA TEMP1
4840 AND #$3F
4845 CMP #$20
4850 BCS EXT3
4855 CMP #$10
4860 BCC EXT3
4865 STA BYFOOD
4870 EXT3 LDA TEMP1
4875 CMP #$41
4880 BEQ .2
4885 .1 JSR ERASE.OLD.SWTR.Z
4890 LDA NEXTSTATE
4895 STA MANSTATE
4900 .2 JSR PLOT.MAN
4905 JMP PLOT.NEW.SWTR.Z
4910 EXT5 LDA #$2A
4915 JSR DELAY.Z
4920 DEY
4925 STY PARALYZE
4930 JSR PLOT.MAN
4935 JSR PLOT.NEW.SWTR.Z
4940 LDA PARALYZE
4945 BNE EXT8
4950 RTS
4955 EXT4 AND #$20
4960 BEQ EXT7
4965 EXT10 JMP EXT2
4970 EXT8 AND #$08
4975 BEQ .14
4980 LDY #$F0
4985 STY TEMP1
4990 LDA #$02
4995 STA TEMP2
5000 .2 LDY TEMP1
5005 LDA $C030
5010 .1 DEY
5015 BNE .1
5020 DEC TEMP2
5025 BNE .2
5030 LDA #$A2
5035 STA $31BC
5040 LDA #$95
5045 STA $2DBB
5050 LDA #$D5
5055 STA $31BB
5060 STA $35BB
5065 .14 LDA #$22
5070 STA $31BC
5075 LDA $48
5080 STA SCRPNT2+1
5085 RTS
5090 EXT7 LDA TEMP1
5095 CMP #$01
5100 BNE .10
5105 RTS
5110 .10 LDA TEMP1
5115 BMI EXT10
5120 .15 CMP #$10
5125 BCS .19
5130 JSR ERASE.OLD.SWTR.Z
5135 LDA #$60
5140 JMP STING.MAN.Z
5145 .19 STA BYFOOD
5150 JMP EXT3
5155 TABLE11 .HS 00424242424242434343434343
5160 TABLE12 .HS 00406080A0C0E00020406080A0
5165 TABLE13 .HS 80838FBF81879F
5170 TABLE14 .HS 07050301060402
5175 TABLE15 .HS FEF8E080FCF0C0
5180 TABLE16 .HS 9FFCF3CFBFF9E7
5185 TABLE17 .HS 40020820000410
5190 TABLE18 .HS F9E79FFCF3CFFE
5195 TABLE19 .HS 02082001041000
5200 TABLE20 .HS 2A282000545040
5205 TABLE21 .HS 00020A2A010515
5210 TABLE22 .HS 555555552A2A2A
5215 GRAB.FOOD.SOUND
5220 LDY #$D0
5225 G1 STY TEMP1
5230 .1 LDY TEMP1
5235 LDA $C030
5240 .2 DEY
5245 BNE .2
5250 DEC TEMP1
5255 DEC TEMP1
5260 BNE .1
5265 LDA #$01
5270 STA GRAB.SQUELCH
5275 RTS
5280 FOOTSTEP.SOUND
5285 LDA #$FF
5290 STA TEMP1
5295 LDA #$02
5300 STA TEMP2
5305 .1 LDY TEMP1
5310 LDA $C030
5315 .2 DEY
5320 BNE .2
5325 DEC TEMP2
5330 BNE .1
5335 RTS
5340 SWTR.SOUND
5345 LDA $460D
5350 CMP #$09
5355 BNE .1
5360 RTS
5365 .1 LDY #$80
5370 .LI ON
5375 JMP G1
5380 .LI OFF