; D:TRACER1 LIST -L ; This is the player verses the computer ; version of tracer ;Equates U = 0 ;direction constants D = 2 R = 4 L = 6 RNFRQS = 43 ;audio freq values RNFRQF = 33 FDECV = 35 PDLSTL = $600 PDLSTH = $601 STRPAD = $9A DIFRTE = $602 ;linked difficulty rate BONBSE = $603 ;base of bonus level TTLDL = $5300 ; P/M RAM AREA ORG $3000 ; LOC $0800 PBASE DS $180 GRM03 DS $80 GRP0 DS $80 GRP1 DS $80 GRP2 DS $80 GRP3 DS $80 ORG $4200 ; LOC $1A00 JMP PLYONE DEVICE DB 'S:',$9B ; Color table ; PM0,PM1,PM2,PM3,PF0,PF1,PF2,PF3,PF4 COLTBL DB 116,52,52,52,8,116,52,0,0 ;POSITION DB'S BASEP = * P0VRT DB 58,58,58,53,16,94,58,40 P1VRT DB 58,58,58,63,97,21,58,83 P2VRT DB 48,48,28,73,99,21,75,75 P3VRT DB 68,68,88,43,18,21,41,32 P0HRZ DB 194,129,54,194,197,124,109,149 P1HRZ DB 54,119,194,54,199,124,172,141 P2HRZ DB 54,119,54,124,50,104,76,98 P3HRZ DB 54,119,54,124,48,144,76,106 P0IDX DB L,R,R,L,D,U,R,D P1IDX DB R,L,L,R,L,D,L,L P2IDX DB R,L,R,D,U,D,R,U P3IDX DB R,L,R,U,R,D,R,R BASEG = * P0ROW DB 46,46,46,41,4,82,46,28 P1ROW DB 46,46,46,51,85,9,46,71 P2ROW DB 36,36,16,61,87,9,63,63 P3ROW DB 56,56,76,31,6,9,29,20 P0COL DB 150,85,10,150,153,80,65,105 P1COL DB 10,75,150,10,155,80,128,97 P2COL DB 10,75,10,80,6,60,32,54 P3COL DB 10,75,10,80,4,100,32,62 DLSTBL DB $8D,0,6,$41,$98,$AF SSTK DB $B,7,7,$B,$D,$E,$7,$D STKC DB 7,$B,$B,7,$E,$D,$B,$E RNDX DB 0 ; one player main control recieved ; from title screen control SHIPS DB 0 RDCNT DB 0 PLYONE PROC LDA #0 ;change screens STA DMACTL STA SDMCTL LDA PDLSTL STA SDLSTL LDA PDLSTH STA SDLSTH LDA #%00101010 STA SDMCTL REPEAT LDX #3 ;initilize play STX SHIPS JSR BLKSCN ;clear strip JSR SCNSHP ;put ships to scrn LDA #$EA ;enable ship set STA SHSSND ;sound JSR UHISCR LDA BONBSE ;set bonus level STA BONUS+1 LDA #$60 ;disable ranger STA RANGER LDY #2 LDA #0 ;clear score buffs :LOOP STA SCR0,Y DEY BPL :LOOP STA BONUS ;clear other bytes STA BONUS+2 ;of bonus register JSR SCRNLY ;put score only to screen LPFRDM LDA #240 ;set beginning speed STA CSPED :LOOP2 JSR EXCRND JSR SCNSHP LDA SHIPS ;test for out of ships BMI XTP1 BEQ XTP1 LDA CSPED ;increase speed SEC SBC DIFRTE CMP #10 BCC CNSTHI STA CSPED CMP #180 BCS :OVER LDY #$60 ;kill ship set sound STY SHSSND :OVER JMP :LOOP2 CNSTHI = * ;maintain constant high speed LDA #4 ;execute 5 times STA RDCNT NXTHI JSR EXCRND JSR SCNSHP LDA SHIPS BEQ XTP1 BMI XTP1 LDA RANDOM ;get speed val AND #$3F ;1 < csped > 63 BNE :OVER2 LDA #2 :OVER2 STA CSPED DEC RDCNT BPL NXTHI ;if ranger enabled LDA RANGER ;loop in constant CMP #$EA ;high speed mode BEQ CNSTHI LDA #$EA ;enable ranger STA RANGER LDA #192 ;reset speed STA CSPED ;to slower value JMP :LOOP2 ;goto beginning logic XTP1 = * JSR ENDSND XTP3 = * JSR SETRTY XTP2 = * JSR FLPGOV ;flip game over sign LDA #8 ;wait for consol key STA CONSOL LDA CONSOL AND #1 BNE CKOPT ;play again JMP REPEAT CKOPT LDA CONSOL AND #4 BEQ RETTTL ;return to title screen BNE XTP2 ;uncond branch RETTTL = * LDA #0 STA DMACTL STA SDMCTL STA COLOR2 STA COLPF2 LDA #LOW TTLDL STA SDLSTL LDA #HIGH TTLDL STA SDLSTH LDA #%00101010 STA SDMCTL JSR ZHPOS LDY #20 JSR PAUSE RTS ; Zero hori. pos. addr's for P/M ZHPOS = * LDX #3 LDA #0 NXZPO STA HPOSP0,X DEX BPL NXZPO RTS ;;Vertical blank sound processor TRIGGR DB 0,0,0,0 VSMODE DB 1,1,1,1 SNDLEN DB ISOMC1-ISOMF1,ISOMC2-ISOMF2,ISOMC3-ISOMF3,ISOMC4-ISOMF4 CURPTR DB 0,0,0,0 FQADTB DW ISOMF1,ISOMF2,ISOMF3,ISOMF4 CTADTB DW ISOMC1,ISOMC2,ISOMC3,ISOMC4 VBSND PROC LDX #0 :LOOP LDY CURPTR,X LDA VSMODE BEQ :OVER LDA TRIGGR,X BEQ STPTR :OVER TXA ! ASL A ! TAX LDA FQADTB,X STA $98 LDA FQADTB+1,X STA $99 LDA ($98),Y STA AUDF1,X LDA CTADTB,X STA $98 LDA CTADTB+1,X STA $99 LDA ($98),Y STA AUDC1,X TXA ! LSR A ! TAX INY ! TYA CMP SNDLEN,X BCC STPTR ; value of audctl to be replaced when complete VBACTL LDA #0 STA AUDCTL ;set by calling proc LDA #0 STA TRIGGR,X STPTR STA CURPTR,X INX CPX #4 BNE :LOOP JMP XITVBV LINK D:TRC1A.ASM