mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-16 06:29:46 +00:00
4d4fb6a665
Some old (WIP) disassemblies and my own source code now available online.
572 lines
13 KiB
Plaintext
572 lines
13 KiB
Plaintext
0010 .LI OFF
|
|
0020 TEMP1 .EQ $F0
|
|
0030 TEMP2 .EQ $F1
|
|
0040 TEMP3 .EQ $F2
|
|
0050 TEMP4 .EQ $FF
|
|
0060 TEMP5 .EQ $94
|
|
0070 SCRPNT1 .EQ $F5
|
|
0080 SCRPNT2 .EQ $F7
|
|
0090 POINTER1 .EQ $F9
|
|
0100 POINTER2 .EQ $FB
|
|
0110 POINTER3 .EQ $FD
|
|
0120 POINTER4 .EQ $EE
|
|
0130 HEIGHT .EQ $ED
|
|
0140 PATINDEX .EQ $EC
|
|
0150 AAMSBYT .EQ $10C0
|
|
0160 AALSBYT .EQ $10E0
|
|
0170 ANTBYT1 .EQ $1000
|
|
0180 ANTBYT2 .EQ $1020
|
|
0190 ANTBYT3 .EQ $1040
|
|
0200 ANTBYT4 .EQ $1060
|
|
0210 ANTXOLD .EQ $D5
|
|
0220 ANTYOLD .EQ $D4
|
|
0230 ANTXXOLD .EQ $D3
|
|
0240 ANTX .EQ $DC
|
|
0250 ANTY .EQ $DB
|
|
0260 ANTXX .EQ $DA
|
|
0270 ANTNUM .EQ $D8
|
|
0280 DESTBYT1 .EQ $1080
|
|
0290 DESTBYT2 .EQ $10A0
|
|
0300 K8 .EQ $AF
|
|
0310 INIT.K8 .EQ $AE
|
|
0320 FOODNUM .EQ $AD
|
|
0330 FOODX .EQ $AC
|
|
0340 FOODY .EQ $AB
|
|
0350 FOODBYT1 .EQ $65D0
|
|
0360 FOODBYT2 .EQ $65D8
|
|
0370 FOODBYT3 .EQ $65E0
|
|
0380 ANTHOLD .EQ $65E8
|
|
0390 BYTE3 .EQ $AA
|
|
0400 WIDTH .EQ $A9
|
|
0410 FOODHEIGHT .EQ $A8
|
|
0420 SWAT .EQ $C5
|
|
0430 MANDIR .EQ $C8
|
|
0440 GRAB.FOOD .EQ $B7
|
|
0450 BYFOOD .EQ $B6
|
|
0460 MANSTATE .EQ $C7
|
|
0470 MANXX .EQ $CA
|
|
0480 SPIDERBYT4 .EQ $4118
|
|
0490 ANTPOSITIONS .EQ $65F0
|
|
0500 ANTPOS .EQ $A7
|
|
0510 ORIENT .EQ $A6
|
|
0520 ANT.ORIENTATIONS .EQ $65F8
|
|
0530 STING.MAN.Z .EQ $600F
|
|
0540 ERASE.ANT.Z .EQ $170F
|
|
0550 PLOT.ANT4.Z .EQ $1703
|
|
0560 PLOT.FOOD.Z .EQ $6959
|
|
0570 CHKBLK.Z .EQ $695C
|
|
0580 PUSH.FOOD.SOUND.Z .EQ $6950
|
|
0590 SET.OFF.SCREEN.Z .EQ $695F
|
|
0600 .OR $6EC0
|
|
0610 .TA $1EC0
|
|
0620 TABLE93 .HS 0C111B210C121B22
|
|
0630 TABLE94 .HS 0808080911131311
|
|
0640 TABLE95 .HS 0400000004000004
|
|
0650 TABLE100 .HS 6666666767686868
|
|
0660 TABLE101 .HS 0080C00090205090
|
|
0670 TABLE102 .HS 4080C048D82050D0
|
|
0680 TABLE103 .HS 2010101818101020
|
|
0690 TABLE104 .HS 0204030303030402
|
|
0700 TABLE105 .HS FF03070A0D101317
|
|
0710 TABLE106 .HS 03070A0D1013171B
|
|
0720 TABLE107 .HS 0303020202020303
|
|
0730 TABLE108 .HS 4000006040202060
|
|
0740 TABLE109 .HS 0000080810101818
|
|
0750 TABLE110 .HS 0201010102010101FEFFFFFFFFFFFFFF0302020203020202FEFFFFFFFFFFFFFF
|
|
0760 TABLE111 .HS 0001020304040506030302010006050404040506000102030303020100060504
|
|
0770 TABLE112 .HS 40111B4888121B88
|
|
0780 TABLE113 .HS 0000000200010101
|
|
0790 TABLE114 .HS FFFFFF01FF010101
|
|
0800 TABLE115 .HS 0C00000C14000015
|
|
0810 TABLE116 .HS 0201012C011A1A2C
|
|
0820 TABLE117 .HS 04080B0E1114181C
|
|
0830 TABLE118 .HS 0004080B0E111418
|
|
0840 TABLE119 .HS 0117172F0117172F
|
|
0850 TABLE120 .HS 020202FF03FFFFFF
|
|
0860 TABLE121 .HS 7008087070E0E070
|
|
0870 TABLE122 .HS 0303020202020303
|
|
0880 TABLE123 .HS 00FFFF0000FFFF00
|
|
0890 TABLE124 .HS 0101010101010101FFFFFFFF00FFFFFF0202020202020202FFFFFFFF00FFFFFF
|
|
0900 TABLE125 .HS 0303032B0219192B
|
|
0910 TABLE126 .HS 10090A0B0C0D0E0F10090A0B0C0D0E0FF8FFFEFDFCFBFAF9F8FFFEFDFCFBFAF9
|
|
0920 TABLE127 .HS 03F8F803FE0808FE
|
|
0930 TABLE128 .HS 030303FE04FEFEFE
|
|
0940 TABLE129 .HS 08090A0B03030303030303090A0B1112131919191919191911121314
|
|
0950 TABLE130 .HS 04040404111213141B1C1D2B2B2B0404041213141B1C1D1E2B2B2B2B
|
|
0960 TABLE131 .HS 0905052508161625
|
|
0970 .OR $7060
|
|
0980 .TA $2060
|
|
0990 JMP VERT.FOOD
|
|
1000 JMP VERT.FOOD2
|
|
1010 JMP UPDATE.VERT.DESTBYTS2
|
|
1020 .BS $03
|
|
1030 VERT.FOOD
|
|
1040 LDX FOODNUM
|
|
1050 LDY TABLE122,X
|
|
1060 LDA TABLE105,X
|
|
1070 STA TEMP1
|
|
1080 LDA TABLE107,X
|
|
1090 VERT.FOOD2
|
|
1100 STA TEMP2
|
|
1110 LDA BYTE3
|
|
1120 BMI .1
|
|
1130 RTS
|
|
1140 .1 LDA TABLE106,X
|
|
1150 TAX
|
|
1160 LDA #$00
|
|
1170 STA TEMP3
|
|
1180 .3 LDA DESTBYT1,X
|
|
1190 AND #$40
|
|
1200 STA ANTHOLD,Y
|
|
1210 BEQ .2
|
|
1220 INC TEMP3
|
|
1230 .2 DEY
|
|
1240 DEX
|
|
1250 CPX TEMP1
|
|
1260 BNE .3
|
|
1270 LDY TEMP3
|
|
1280 CPY TEMP2
|
|
1290 BCS .4
|
|
1300 JSR UPDATE.HORIZ.ANTBYTS
|
|
1310 JSR PLOT.HORIZ.ANTS
|
|
1320 LDA BYTE3
|
|
1330 AND #$FD
|
|
1340 LDX FOODNUM
|
|
1350 STA FOODBYT3,X
|
|
1360 LSR
|
|
1370 BCC .5
|
|
1380 RTS
|
|
1390 .5 JMP PLOT.FOOD.Z
|
|
1400 .4 INC ORIENT
|
|
1410 LDA ORIENT
|
|
1420 LDX FOODNUM
|
|
1430 STA ANT.ORIENTATIONS,X
|
|
1440 LDA BYTE3
|
|
1450 AND #$84
|
|
1460 ORA #$02
|
|
1470 STA BYTE3
|
|
1480 STA FOODBYT3,X
|
|
1490 JSR ERASE.HORIZ.ANTS
|
|
1500 LDX ANTPOS
|
|
1510 DEX
|
|
1520 BPL .6
|
|
1530 LDX #$07
|
|
1540 .6 STX ANTPOS
|
|
1550 LDY FOODNUM
|
|
1560 LDA ANTPOS
|
|
1570 STA ANTPOSITIONS,Y
|
|
1580 BEQ .7
|
|
1590 JSR PLOT.HORIZ.ANTS
|
|
1600 JSR UPDATE.HORIZ.ANTBYTS
|
|
1610 JMP PLOT.FOOD.Z
|
|
1620 .7 JSR PUSH.FOOD.SOUND.Z
|
|
1630 JSR UPDATE.VERT.DESTBYTS
|
|
1640 LDA FOODY
|
|
1650 CLC
|
|
1660 ADC TABLE114,X
|
|
1670 STA FOODY
|
|
1680 STA FOODBYT2,X
|
|
1690 CMP TABLE131,X
|
|
1700 BNE .14
|
|
1710 LDA #$86
|
|
1720 STA FOODBYT3,X
|
|
1730 LDA FOODY
|
|
1740 .14 CLC
|
|
1750 ADC TABLE113,X
|
|
1760 STA TEMP4
|
|
1770 TAX
|
|
1780 LDY FOODX
|
|
1790 JSR CHKBLK.Z
|
|
1800 LDY FOODX
|
|
1810 INY
|
|
1820 LDX TEMP4
|
|
1830 JSR CHKBLK.Z
|
|
1840 LDY FOODX
|
|
1850 INY
|
|
1860 INY
|
|
1870 LDX TEMP4
|
|
1880 JSR CHKBLK.Z
|
|
1890 LDA FOODNUM
|
|
1900 CMP #$02
|
|
1910 BEQ .18
|
|
1920 CMP #$05
|
|
1930 BEQ .18
|
|
1940 LDY FOODX
|
|
1950 INY
|
|
1960 INY
|
|
1970 INY
|
|
1980 LDX TEMP4
|
|
1990 JSR CHKBLK.Z
|
|
2000 .18 JSR MOVE.HORIZ.ANTS.BLOCKS
|
|
2010 JSR PLOT.FOOD.Z
|
|
2020 JSR UPDATE.HORIZ.ANTBYTS
|
|
2030 LDA FOODX
|
|
2040 STA TEMP3
|
|
2050 LDX FOODNUM
|
|
2060 LDA TABLE104,X
|
|
2070 STA WIDTH
|
|
2080 LDA FOODY
|
|
2090 CLC
|
|
2100 ADC TABLE120,X
|
|
2110 JSR ERASE.ROW
|
|
2120 JSR PLOT.HORIZ.ANTS
|
|
2130 LDX FOODNUM
|
|
2140 LDA TABLE116,X
|
|
2150 CMP FOODY
|
|
2160 EXT2
|
|
2170 BEQ .19
|
|
2180 RTS
|
|
2190 .19 LDY TABLE118,X
|
|
2200 LDA TABLE117,X
|
|
2210 STA TEMP1
|
|
2220 LDA TABLE121,X
|
|
2230 .20 STA DESTBYT2,Y
|
|
2240 INY
|
|
2250 CPY TEMP1
|
|
2260 BNE .20
|
|
2270 LDA #$00
|
|
2280 STA FOODBYT3,X
|
|
2290 LDY #$11
|
|
2300 JSR .21
|
|
2310 LDY #$1B
|
|
2320 JSR .21
|
|
2330 JMP SET.OFF.SCREEN.Z
|
|
2340 .21 LDA #$04
|
|
2350 STA WIDTH
|
|
2360 LDA #$00
|
|
2370 .22 STA $1AC0,Y
|
|
2380 STA $1AF0,Y
|
|
2390 STA $1F70,Y
|
|
2400 STA $1FA0,Y
|
|
2410 INY
|
|
2420 DEC WIDTH
|
|
2430 BNE .22
|
|
2440 RTS
|
|
2450 UPDATE.HORIZ.ANTBYTS
|
|
2460 LDX FOODNUM
|
|
2470 LDA FOODY
|
|
2480 CLC
|
|
2490 ADC TABLE120,X
|
|
2500 STA TEMP4
|
|
2510 LDA TABLE122,X
|
|
2520 STA TEMP1
|
|
2530 CLC
|
|
2540 ADC FOODX
|
|
2550 STA TEMP2
|
|
2560 .3 LDX TEMP1
|
|
2570 LDA ANTHOLD,X
|
|
2580 BEQ .1
|
|
2590 JSR .2
|
|
2600 .1 DEC TEMP2
|
|
2610 DEC TEMP1
|
|
2620 LDA TEMP2
|
|
2630 CMP FOODX
|
|
2640 BCS .3
|
|
2650 RTS
|
|
2660 .2 LDX TEMP4
|
|
2670 LDY TEMP2
|
|
2680 LDA AAMSBYT,X
|
|
2690 STA POINTER1+1
|
|
2700 LDA AALSBYT,X
|
|
2710 STA POINTER1
|
|
2720 LDA (POINTER1),Y
|
|
2730 AND #$1F
|
|
2740 TAY
|
|
2750 TXA
|
|
2760 ASL
|
|
2770 ASL
|
|
2780 ASL
|
|
2790 STA TEMP3
|
|
2800 LDX FOODNUM
|
|
2810 LDA ANTPOS
|
|
2820 CLC
|
|
2830 ADC TABLE133,X
|
|
2840 TAX
|
|
2850 LDA TABLE132,X
|
|
2860 ADC TEMP3
|
|
2870 STA ANTBYT2,Y
|
|
2880 RTS
|
|
2890 UPDATE.VERT.DESTBYTS
|
|
2900 LDX FOODNUM
|
|
2910 LDA TABLE127,X
|
|
2920 UPDATE.VERT.DESTBYTS2
|
|
2930 STA TEMP1
|
|
2940 LDA TABLE122,X
|
|
2950 STA WIDTH
|
|
2960 LDY TABLE118,X
|
|
2970 .6 JSR .5
|
|
2980 INY
|
|
2990 DEC WIDTH
|
|
3000 BPL .6
|
|
3010 RTS
|
|
3020 .5 LDA DESTBYT2,Y
|
|
3030 CLC
|
|
3040 ADC TEMP1
|
|
3050 STA DESTBYT2,Y
|
|
3060 RTS
|
|
3070 PLOT.HORIZ.ANTS
|
|
3080 LDA #$08
|
|
3090 STA POINTER1+1
|
|
3100 LDX FOODNUM
|
|
3110 LDA TABLE108,X
|
|
3120 STA POINTER1
|
|
3130 LDA ORIENT
|
|
3140 AND #$01
|
|
3150 BEQ .4
|
|
3160 LDA #$10
|
|
3170 CLC
|
|
3180 ADC POINTER1
|
|
3190 STA POINTER1
|
|
3200 .4 LDA #$00
|
|
3210 CPX #$05
|
|
3220 BNE .1
|
|
3230 LDA #$04
|
|
3240 .1 STA ANTXX
|
|
3250 LDA TABLE112,X
|
|
3260 STA ANTX
|
|
3270 LDA FOODY
|
|
3280 ASL
|
|
3290 ASL
|
|
3300 ASL
|
|
3310 STA TEMP1
|
|
3320 LDA ANTPOS
|
|
3330 CLC
|
|
3340 ADC TABLE109,X
|
|
3350 TAY
|
|
3360 LDA TABLE126,Y
|
|
3370 CLC
|
|
3380 ADC TEMP1
|
|
3390 STA ANTY
|
|
3400 LDY #$00
|
|
3410 STY TEMP4
|
|
3420 LDA TABLE104,X
|
|
3430 STA WIDTH
|
|
3440 .3 LDY TEMP4
|
|
3450 LDA ANTHOLD,Y
|
|
3460 BEQ .2
|
|
3470 JSR PLOT.ANT4.Z
|
|
3480 .2 INC ANTX
|
|
3490 LDA ANTXX
|
|
3500 EOR #$04
|
|
3510 STA ANTXX
|
|
3520 INC TEMP4
|
|
3530 DEC WIDTH
|
|
3540 BNE .3
|
|
3550 RTS
|
|
3560 MOVE.HORIZ.ANTS.BLOCKS
|
|
3570 LDX FOODNUM
|
|
3580 LDA FOODY
|
|
3590 CLC
|
|
3600 ADC TABLE128,X
|
|
3610 STA TEMP4
|
|
3620 LDA TABLE122,X
|
|
3630 STA TEMP1
|
|
3640 CLC
|
|
3650 ADC FOODX
|
|
3660 STA TEMP2
|
|
3670 .3 LDX TEMP1
|
|
3680 LDA ANTHOLD,X
|
|
3690 BEQ .1
|
|
3700 JSR .4
|
|
3710 BNE .2
|
|
3720 .1 JSR .5
|
|
3730 .2 DEC TEMP2
|
|
3740 DEC TEMP1
|
|
3750 LDA TEMP2
|
|
3760 CMP FOODX
|
|
3770 BCS .3
|
|
3780 RTS
|
|
3790 .5 LDX FOODNUM
|
|
3800 LDA TEMP4
|
|
3810 CLC
|
|
3820 ADC TABLE114,X
|
|
3830 TAX
|
|
3840 LDY TEMP2
|
|
3850 LDA AAMSBYT,X
|
|
3860 STA POINTER1+1
|
|
3870 LDA AALSBYT,X
|
|
3880 STA POINTER1
|
|
3890 LDA (POINTER1),Y
|
|
3900 AND #$C0
|
|
3910 STA (POINTER1),Y
|
|
3920 RTS
|
|
3930 .4 LDY TEMP2
|
|
3940 LDX TEMP4
|
|
3950 LDA AAMSBYT,X
|
|
3960 STA POINTER1+1
|
|
3970 LDA AALSBYT,X
|
|
3980 STA POINTER1
|
|
3990 LDA (POINTER1),Y
|
|
4000 AND #$3F
|
|
4010 STA TEMP3
|
|
4020 LDA (POINTER1),Y
|
|
4030 AND #$C0
|
|
4040 STA (POINTER1),Y
|
|
4050 TXA
|
|
4060 LDX FOODNUM
|
|
4070 CLC
|
|
4080 ADC TABLE114,X
|
|
4090 TAX
|
|
4100 LDA AAMSBYT,X
|
|
4110 STA POINTER1+1
|
|
4120 LDA AALSBYT,X
|
|
4130 STA POINTER1
|
|
4140 LDA (POINTER1),Y
|
|
4150 AND #$C0
|
|
4160 ORA TEMP3
|
|
4170 STA (POINTER1),Y
|
|
4180 RTS
|
|
4190 ERASE.HORIZ.ANTS
|
|
4200 LDX FOODNUM
|
|
4210 LDA #$00
|
|
4220 CPX #$05
|
|
4230 BNE .1
|
|
4240 LDA #$04
|
|
4250 .1 STA ANTXXOLD
|
|
4260 LDA TABLE112,X
|
|
4270 STA ANTXOLD
|
|
4280 LDA FOODY
|
|
4290 ASL
|
|
4300 ASL
|
|
4310 ASL
|
|
4320 STA TEMP1
|
|
4330 LDA ANTPOS
|
|
4340 CLC
|
|
4350 ADC TABLE109,X
|
|
4360 TAY
|
|
4370 LDA TABLE126,Y
|
|
4380 CLC
|
|
4390 ADC TEMP1
|
|
4400 STA ANTYOLD
|
|
4410 STA TEMP4
|
|
4420 LDY #$00
|
|
4430 STY TEMP1
|
|
4440 LDA TABLE104,X
|
|
4450 STA WIDTH
|
|
4460 .3 LDY TEMP1
|
|
4470 LDA ANTHOLD,Y
|
|
4480 BEQ .2
|
|
4490 LDA TEMP4
|
|
4500 STA ANTYOLD
|
|
4510 JSR ERASE.ANT.Z
|
|
4520 .2 INC ANTXOLD
|
|
4530 LDA ANTXXOLD
|
|
4540 EOR #$04
|
|
4550 STA ANTXXOLD
|
|
4560 INC TEMP1
|
|
4570 DEC WIDTH
|
|
4580 BNE .3
|
|
4590 .LI ON
|
|
4600 RTS
|
|
4610 .LI OFF
|
|
4620 .OR $5F40
|
|
4630 .TA $2F40
|
|
4640 ERASE.ROW
|
|
4650 LDY #$08
|
|
4660 STY HEIGHT
|
|
4670 ASL
|
|
4680 ASL
|
|
4690 ASL
|
|
4700 STA TEMP2
|
|
4710 CMP #$70
|
|
4720 BCS .4
|
|
4730 CMP #$38
|
|
4740 BCC .5
|
|
4750 LDA #$10
|
|
4760 BNE .3
|
|
4770 .4 CMP #$B0
|
|
4780 BCS .14
|
|
4790 LDA #$F0
|
|
4800 .3 STA TEMP4
|
|
4810 .2 LDA WIDTH
|
|
4820 STA TEMP1
|
|
4830 LDY TEMP2
|
|
4840 LDA (SCRPNT1),Y
|
|
4850 STA POINTER1+1
|
|
4860 CLC
|
|
4870 ADC #$60
|
|
4880 STA POINTER4+1
|
|
4890 LDA (SCRPNT2),Y
|
|
4900 STA POINTER1
|
|
4910 STA POINTER4
|
|
4920 LDA TEMP2
|
|
4930 CLC
|
|
4940 ADC TEMP4
|
|
4950 TAY
|
|
4960 LDA (SCRPNT1),Y
|
|
4970 CLC
|
|
4980 ADC #$60
|
|
4990 STA POINTER2+1
|
|
5000 LDA (SCRPNT2),Y
|
|
5010 STA POINTER2
|
|
5020 LDY TEMP3
|
|
5030 .1 LDA (POINTER2),Y
|
|
5040 STA (POINTER1),Y
|
|
5050 STA (POINTER4),Y
|
|
5060 INY
|
|
5070 DEC TEMP1
|
|
5080 BNE .1
|
|
5090 INC TEMP2
|
|
5100 DEC HEIGHT
|
|
5110 BNE .2
|
|
5120 RTS
|
|
5130 .6 LDA #$80
|
|
5140 BNE .12
|
|
5150 .5 CMP #$20
|
|
5160 BCC .6
|
|
5170 .14 CMP #$C8
|
|
5180 BCS .6
|
|
5190 LDA #$00
|
|
5200 .12 STA TEMP4
|
|
5210 STA TEMP5
|
|
5220 .8 LDA TEMP3
|
|
5230 CMP #$12
|
|
5240 BEQ .7
|
|
5250 LDA #$55
|
|
5260 LDY #$2A
|
|
5270 JSR .13
|
|
5280 .9 LDA WIDTH
|
|
5290 STA TEMP1
|
|
5300 LDY TEMP2
|
|
5310 LDA (SCRPNT1),Y
|
|
5320 STA POINTER1+1
|
|
5330 CLC
|
|
5340 ADC #$60
|
|
5350 STA POINTER4+1
|
|
5360 LDA (SCRPNT2),Y
|
|
5370 STA POINTER1
|
|
5380 STA POINTER4
|
|
5390 LDY TEMP3
|
|
5400 .11 LDA TEMP4
|
|
5410 STA (POINTER1),Y
|
|
5420 STA (POINTER4),Y
|
|
5430 INY
|
|
5440 DEC TEMP1
|
|
5450 BEQ .10
|
|
5460 LDA TEMP5
|
|
5470 STA (POINTER1),Y
|
|
5480 STA (POINTER4),Y
|
|
5490 INY
|
|
5500 DEC TEMP1
|
|
5510 BNE .11
|
|
5520 .10 INC TEMP2
|
|
5530 DEC HEIGHT
|
|
5540 BNE .9
|
|
5550 RTS
|
|
5560 .7 LDA #$2A
|
|
5570 LDY #$55
|
|
5580 JSR .13
|
|
5590 BNE .9
|
|
5600 .13 ORA TEMP4
|
|
5610 STA TEMP4
|
|
5620 TYA
|
|
5630 ORA TEMP5
|
|
5640 STA TEMP5
|
|
5650 .LI ON
|
|
5660 RTS
|
|
5670 .OR $2F8
|
|
5680 .TA $2F8
|
|
5690 TABLE132 .HS 000706050403020100F9FAFBFCFDFEFF
|
|
5700 TABLE133 .HS 0008080000000000
|
|
5710 .LI OFF
|