mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-01 15:30:02 +00:00
4d4fb6a665
Some old (WIP) disassemblies and my own source code now available online.
447 lines
9.7 KiB
Plaintext
447 lines
9.7 KiB
Plaintext
0010 .LI OFF
|
|
0020 TEMP4 .EQ $FF
|
|
0030 POINTER3 .EQ $FD
|
|
0040 POINTER2 .EQ $FB
|
|
0050 POINTER1 .EQ $F9
|
|
0060 SCRPNT2 .EQ $F7
|
|
0070 SCRPNT1 .EQ $F5
|
|
0080 TEMP3 .EQ $F2
|
|
0090 TEMP2 .EQ $F1
|
|
0100 TEMP1 .EQ $F0
|
|
0110 POINTER4 .EQ $EE
|
|
0120 HEIGHT .EQ $ED
|
|
0130 PATINDEX .EQ $EC
|
|
0140 PLAYERNUM .EQ $B3
|
|
0150 WIDTH .EQ $A9
|
|
0160 CANX .EQ $84
|
|
0170 CANY .EQ $83
|
|
0180 CANXX .EQ $82
|
|
0190 DESTBYT1 .EQ $1080
|
|
0200 ANTBYT1 .EQ $1000
|
|
0210 SPIDERBYT4 .EQ $4118
|
|
0220 FOODBYT3 .EQ $6930
|
|
0230 WASPSTATE .EQ $B2
|
|
0240 DELAY.Z .EQ $5800
|
|
0250 RANDOM1.Z .EQ $1706
|
|
0260 R1.Z .EQ $4F18
|
|
0270 .OR $C10
|
|
0280 .TA $C10
|
|
0290 JMP CAN.MASTER
|
|
0300 PLOT.CAN
|
|
0310 JSR PLOT.NOZZLE
|
|
0320 LDA #$4E
|
|
0330 STA POINTER1+1
|
|
0340 LDA #$A2
|
|
0350 STA POINTER1
|
|
0360 LDA #$1F
|
|
0370 STA HEIGHT
|
|
0380 LDA #$00
|
|
0390 STA PATINDEX
|
|
0400 LDX CANXX
|
|
0410 LDA CANY
|
|
0420 STA TEMP3
|
|
0430 .2 LDA CANX
|
|
0440 STA TEMP4
|
|
0450 LDY TEMP3
|
|
0460 LDA (SCRPNT1),Y
|
|
0470 STA POINTER2+1
|
|
0480 CLC
|
|
0490 ADC #$60
|
|
0500 STA POINTER4+1
|
|
0510 LDA (SCRPNT2),Y
|
|
0520 STA POINTER2
|
|
0530 STA POINTER4
|
|
0540 LDY TEMP4
|
|
0550 LDA (POINTER4),Y
|
|
0560 AND TABLE600,X
|
|
0570 STA TEMP1
|
|
0580 LDY PATINDEX
|
|
0590 LDA (POINTER1),Y
|
|
0600 STA TEMP2
|
|
0610 LDY TABLE601,X
|
|
0620 LDA #$00
|
|
0630 .1 LSR TEMP2
|
|
0640 ROR
|
|
0650 DEY
|
|
0660 BNE .1
|
|
0670 LSR
|
|
0680 ORA TEMP1
|
|
0690 LDY TEMP4
|
|
0700 STA (POINTER2),Y
|
|
0710 INC PATINDEX
|
|
0720 INC TEMP4
|
|
0730 LDY PATINDEX
|
|
0740 LDA (POINTER1),Y
|
|
0750 STA TEMP1
|
|
0760 LDY TABLE601,X
|
|
0770 LDA #$00
|
|
0780 .3 LSR TEMP1
|
|
0790 ROR
|
|
0800 DEY
|
|
0810 BNE .3
|
|
0820 LSR
|
|
0830 ORA TEMP2
|
|
0840 LDY TEMP4
|
|
0850 STA (POINTER2),Y
|
|
0860 INC PATINDEX
|
|
0870 INC TEMP4
|
|
0880 LDY PATINDEX
|
|
0890 LDA (POINTER1),Y
|
|
0900 STA TEMP2
|
|
0910 LDY TABLE601,X
|
|
0920 LDA #$00
|
|
0930 .4 LSR TEMP2
|
|
0940 ROR
|
|
0950 DEY
|
|
0960 BNE .4
|
|
0970 LSR
|
|
0980 ORA TEMP1
|
|
0990 LDY TEMP4
|
|
1000 STA (POINTER2),Y
|
|
1010 INY
|
|
1020 LDA (POINTER4),Y
|
|
1030 AND TABLE602,X
|
|
1040 ORA TEMP2
|
|
1050 STA (POINTER2),Y
|
|
1060 INC TEMP3
|
|
1070 INC PATINDEX
|
|
1080 DEC HEIGHT
|
|
1090 BNE .2
|
|
1100 JMP PLOT.SPRAY
|
|
1110 TABLE600 .HS 80838FBF81879F
|
|
1120 TABLE601 .HS 07050301060402
|
|
1130 TABLE602 .HS FFFCF0C0FEF8E0
|
|
1140 PLOT.NOZZLE
|
|
1150 LDY CANX
|
|
1160 INY
|
|
1170 STY TEMP1
|
|
1180 LDA CANY
|
|
1190 SEC
|
|
1200 SBC #$07
|
|
1210 STA TEMP2
|
|
1220 LDA #$4E
|
|
1230 STA POINTER1+1
|
|
1240 LDA #$9B
|
|
1250 STA POINTER1
|
|
1260 LDA #$00
|
|
1270 STA PATINDEX
|
|
1280 LDA #$07
|
|
1290 STA HEIGHT
|
|
1300 LDX CANXX
|
|
1310 .2 LDY TEMP2
|
|
1320 LDA (SCRPNT1),Y
|
|
1330 STA POINTER2+1
|
|
1340 CLC
|
|
1350 ADC #$60
|
|
1360 STA POINTER4+1
|
|
1370 LDA (SCRPNT2),Y
|
|
1380 STA POINTER2
|
|
1390 STA POINTER4
|
|
1400 LDY TEMP1
|
|
1410 LDA (POINTER4),Y
|
|
1420 AND TABLE600,X
|
|
1430 STA TEMP3
|
|
1440 LDY PATINDEX
|
|
1450 LDA (POINTER1),Y
|
|
1460 STA TEMP4
|
|
1470 LDY TABLE601,X
|
|
1480 LDA #$00
|
|
1490 .1 LSR TEMP4
|
|
1500 ROR
|
|
1510 DEY
|
|
1520 BNE .1
|
|
1530 LSR
|
|
1540 ORA TEMP3
|
|
1550 LDY TEMP1
|
|
1560 STA (POINTER2),Y
|
|
1570 INC PATINDEX
|
|
1580 INY
|
|
1590 LDA (POINTER4),Y
|
|
1600 AND TABLE602,X
|
|
1610 ORA TEMP4
|
|
1620 STA (POINTER2),Y
|
|
1630 INC TEMP2
|
|
1640 DEC HEIGHT
|
|
1650 BNE .2
|
|
1660 RTS
|
|
1670 ERASE.LEFT.CAN
|
|
1680 LDA CANY
|
|
1690 SEC
|
|
1700 SBC #$07
|
|
1710 STA TEMP2
|
|
1720 LDY CANX
|
|
1730 INY
|
|
1740 STY TEMP1
|
|
1750 LDA #$07
|
|
1760 JSR .2
|
|
1770 DEC TEMP1
|
|
1780 LDA #$1F
|
|
1790 .2 STA HEIGHT
|
|
1800 .1 LDY TEMP2
|
|
1810 LDY TEMP2
|
|
1820 LDA (SCRPNT1),Y
|
|
1830 STA POINTER1+1
|
|
1840 CLC
|
|
1850 ADC #$60
|
|
1860 STA POINTER4+1
|
|
1870 LDA (SCRPNT2),Y
|
|
1880 STA POINTER1
|
|
1890 STA POINTER4
|
|
1900 LDY TEMP1
|
|
1910 LDA (POINTER4),Y
|
|
1920 STA (POINTER1),Y
|
|
1930 INC TEMP2
|
|
1940 DEC HEIGHT
|
|
1950 BNE .1
|
|
1960 RTS
|
|
1970 ERASE.ALL
|
|
1980 LDA CANY
|
|
1990 SEC
|
|
2000 SBC #$17
|
|
2010 STA TEMP2
|
|
2020 LDA #$36
|
|
2030 STA HEIGHT
|
|
2040 .2 LDA CANX
|
|
2050 STA TEMP1
|
|
2060 LDA #$08
|
|
2070 STA WIDTH
|
|
2080 LDY TEMP2
|
|
2090 LDA (SCRPNT1),Y
|
|
2100 STA POINTER1+1
|
|
2110 CLC
|
|
2120 ADC #$60
|
|
2130 STA POINTER4+1
|
|
2140 LDA (SCRPNT2),Y
|
|
2150 STA POINTER1
|
|
2160 STA POINTER4
|
|
2170 .1 LDY TEMP1
|
|
2180 LDA (POINTER4),Y
|
|
2190 STA (POINTER1),Y
|
|
2200 INC TEMP1
|
|
2210 DEC WIDTH
|
|
2220 BNE .1
|
|
2230 INC TEMP2
|
|
2240 DEC HEIGHT
|
|
2250 BNE .2
|
|
2260 RTS
|
|
2270 CAN.MASTER
|
|
2280 LDA #$33
|
|
2290 JSR .3
|
|
2300 LDA #$5B
|
|
2310 JSR .3
|
|
2320 LDA #$84
|
|
2330 JSR .3
|
|
2340 LDA #$AD
|
|
2350 JSR .3
|
|
2360 LDY #$07
|
|
2370 .5 LDA FOODBYT3,Y
|
|
2380 AND #$FD
|
|
2390 STA FOODBYT3,Y
|
|
2400 DEY
|
|
2410 BPL .5
|
|
2420 LDY #$1B
|
|
2430 .6 LDA DESTBYT1,Y
|
|
2440 AND #$BF
|
|
2450 STA DESTBYT1,Y
|
|
2460 DEY
|
|
2470 BPL .6
|
|
2480 JSR CLEAR.AA
|
|
2490 LDY #$10
|
|
2500 LDA PLAYERNUM
|
|
2510 CMP #$02
|
|
2520 BNE .7
|
|
2530 LDY #$17
|
|
2540 .7 LDA #$00
|
|
2550 STA $2000,Y
|
|
2560 STA $2400,Y
|
|
2570 STA $2800,Y
|
|
2580 STA $2C00,Y
|
|
2590 STA $3000,Y
|
|
2600 STA $3400,Y
|
|
2610 STA $3800,Y
|
|
2620 STA $3C00,Y
|
|
2630 RTS
|
|
2640 .3 STA CANY
|
|
2650 LDA #$04
|
|
2660 STA CANX
|
|
2670 STA CANXX
|
|
2680 JSR ERASE.ALL
|
|
2690 .2 JSR PLOT.CAN
|
|
2700 JSR RANDOM1.Z
|
|
2710 STA TEMP1
|
|
2720 LDA #$06
|
|
2730 JSR R1.Z
|
|
2740 INC CANXX
|
|
2750 LDA CANXX
|
|
2760 CMP #$04
|
|
2770 BEQ .1
|
|
2780 CMP #$07
|
|
2790 BNE .2
|
|
2800 LDA #$00
|
|
2810 STA CANXX
|
|
2820 .1 JSR ERASE.SPRAY
|
|
2830 JSR ERASE.LEFT.CAN
|
|
2840 INC CANX
|
|
2850 .4 LDA CANX
|
|
2860 CMP #$26
|
|
2870 BCC .2
|
|
2880 JMP ERASE.ALL
|
|
2890 PLOT.SPRAY
|
|
2900 LDX CANXX
|
|
2910 LDA CANY
|
|
2920 SEC
|
|
2930 SBC #$08
|
|
2940 STA TEMP2
|
|
2950 LDA CANX
|
|
2960 CLC
|
|
2970 ADC #$03
|
|
2980 STA TEMP1
|
|
2990 LDA #$7F
|
|
3000 STA TEMP3
|
|
3010 LDA #$07
|
|
3020 JSR .2
|
|
3030 INC TEMP1
|
|
3040 LDA CANY
|
|
3050 SEC
|
|
3060 SBC #$0B
|
|
3070 STA TEMP2
|
|
3080 LDA #$0D
|
|
3090 JSR .2
|
|
3100 INC TEMP2
|
|
3110 LDA CANY
|
|
3120 SEC
|
|
3130 SBC #$0E
|
|
3140 STA TEMP2
|
|
3150 LDA #$13
|
|
3160 JSR .2
|
|
3170 INC TEMP1
|
|
3180 LDA CANY
|
|
3190 SEC
|
|
3200 SBC #$11
|
|
3210 STA TEMP2
|
|
3220 LDA #$19
|
|
3230 JSR .2
|
|
3240 INC TEMP1
|
|
3250 LDA CANY
|
|
3260 SEC
|
|
3270 SBC #$14
|
|
3280 STA TEMP2
|
|
3290 LDA #$1F
|
|
3300 JSR .2
|
|
3310 INC TEMP1
|
|
3320 LDA CANY
|
|
3330 SEC
|
|
3340 SBC #$17
|
|
3350 STA TEMP2
|
|
3360 LDA TABLE606,X
|
|
3370 STA TEMP3
|
|
3380 LDA #$25
|
|
3390 .2 STA HEIGHT
|
|
3400 .1 LDY TEMP2
|
|
3410 LDA (SCRPNT1),Y
|
|
3420 STA POINTER1+1
|
|
3430 CLC
|
|
3440 ADC #$60
|
|
3450 STA POINTER4+1
|
|
3460 LDA (SCRPNT2),Y
|
|
3470 STA POINTER1
|
|
3480 STA POINTER4
|
|
3490 JSR RANDOM1.Z
|
|
3500 AND TEMP3
|
|
3510 LDY TEMP1
|
|
3520 ORA (POINTER4),Y
|
|
3530 STA (POINTER1),Y
|
|
3540 INC TEMP2
|
|
3550 DEC HEIGHT
|
|
3560 BNE .1
|
|
3570 RTS
|
|
3580 TABLE606 .HS 01071F7F030F3F
|
|
3590 ERASE.SPRAY
|
|
3600 LDA #$00
|
|
3610 STA TEMP4
|
|
3620 LDA CANX
|
|
3630 CLC
|
|
3640 ADC #$03
|
|
3650 STA TEMP1
|
|
3660 LDA CANY
|
|
3670 SEC
|
|
3680 SBC #$0B
|
|
3690 JSR .1
|
|
3700 INC TEMP1
|
|
3710 LDA CANY
|
|
3720 SEC
|
|
3730 SBC #$0E
|
|
3740 JSR .1
|
|
3750 INC TEMP1
|
|
3760 LDA CANY
|
|
3770 SEC
|
|
3780 SBC #$11
|
|
3790 JSR .1
|
|
3800 INC TEMP1
|
|
3810 LDA CANY
|
|
3820 SEC
|
|
3830 SBC #$14
|
|
3840 JSR .1
|
|
3850 INC TEMP1
|
|
3860 LDA CANY
|
|
3870 SBC #$17
|
|
3880 .1 JSR .2
|
|
3890 LDA TEMP4
|
|
3900 CLC
|
|
3910 ADC #$06
|
|
3920 STA TEMP4
|
|
3930 CLC
|
|
3940 ADC TEMP2
|
|
3950 .2 STA TEMP2
|
|
3960 LDA #$04
|
|
3970 STA HEIGHT
|
|
3980 .3 LDY TEMP2
|
|
3990 LDA (SCRPNT1),Y
|
|
4000 STA POINTER1+1
|
|
4010 CLC
|
|
4020 ADC #$60
|
|
4030 STA POINTER4+1
|
|
4040 LDA (SCRPNT2),Y
|
|
4050 STA POINTER4
|
|
4060 STA POINTER1
|
|
4070 LDY TEMP1
|
|
4080 LDA (POINTER4),Y
|
|
4090 STA (POINTER1),Y
|
|
4100 INC TEMP2
|
|
4110 DEC HEIGHT
|
|
4120 BNE .3
|
|
4130 RTS
|
|
4140 CLEAR.AA
|
|
4150 LDA #$1A
|
|
4160 STA POINTER1+1
|
|
4170 LDA #$00
|
|
4180 STA POINTER1
|
|
4190 LDY #$90
|
|
4200 .4 LDA (POINTER1),Y
|
|
4210 AND #$7F
|
|
4220 STA TEMP1
|
|
4230 CMP #$03
|
|
4240 BEQ .1
|
|
4250 AND #$3F
|
|
4260 CMP #$20
|
|
4270 BCS .2
|
|
4280 CMP #$10
|
|
4290 BCS .3
|
|
4300 .2 LDA TEMP1
|
|
4310 AND #$40
|
|
4320 .1 STA (POINTER1),Y
|
|
4330 INY
|
|
4340 BNE .4
|
|
4350 INC POINTER1+1
|
|
4360 LDA POINTER1+1
|
|
4370 CMP #$20
|
|
4380 BNE .4
|
|
4390 RTS
|
|
4400 .3 STA TEMP2
|
|
4410 LDA TEMP1
|
|
4420 AND #$40
|
|
4430 ORA TEMP2
|
|
4440 .LI ON
|
|
4450 BNE .1
|
|
4460 .LI OFF
|