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