***************************************************** **** Projectyle - Custom Module **** **** all adaptions by Wanted Team **** ***************************************************** incdir "dh2:include/" include 'misc/eagleplayer2.01.i' SECTION Player,Code_C Pro_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Projectyle - Custom Module,",10 dc.b 'adapted by Don Adan/Wanted Team',0 even PlayerTagArray dc.l DTP_CustomPlayer,1 dc.l DTP_PlayerName,PlayerName dc.l DTP_Interrupt,Interrupt dc.l DTP_InitPlayer,InitPlayer dc.l DTP_EndPlayer,EndPlayer dc.l DTP_InitSound,InitSound dc.l DTP_EndSound,EndSound dc.l DTP_SubSongRange,SubSongRange dc.l EP_Get_ModuleInfo,Get_ModuleInfo dc.l TAG_DONE PlayerName dc.b "CustomPlay",0 Text dc.b 10 dc.b " ELECTRONIC ARTS",10 dc.b " present",10 dc.b " an",10 dc.b " ELDRITCH THE CAT",10 dc.b " production",10 dc.b 10 dc.b " PROJECTYLE",10 dc.b 10 dc.b " CREDITS",10 dc.b " Design: Steve Wetherill Marc Dawson",10 dc.b " Coding: Steve Wetherill Marc Dawson",10 dc.b " Visuals: Elsbeth Jones Steve Wetherill",10 dc.b " Marc Dawson",10 dc.b " Audio: Steve Wetherill",10 dc.b " Production: Kevin Shrapnell",10 dc.b 10 dc.b " (C) 1989,90 ELDRITCH THE CAT",0 even *************************************************************************** ***************************** DTP_SubSongRange **************************** *************************************************************************** SubSongRange moveq #0,D0 moveq #7,D1 rts *************************************************************************** ***************************** EP_Get_ModuleInfo *************************** *************************************************************************** Get_ModuleInfo lea InfoBuffer(PC),A0 rts InfoBuffer dc.l MI_SpecialInfo,Text dc.l MI_LoadSize,Pro_End-Pro_Start dc.l 0 *************************************************************************** ***************************** DTP_InitPlayer ****************************** *************************************************************************** InitPlayer move.l A5,-(SP) bsr.w InitSamples move.l (SP)+,A5 move.l dtg_AudioAlloc(A5),A0 jmp (A0) *************************************************************************** ***************************** DTP_EndPlayer ******************************* *************************************************************************** EndPlayer move.l dtg_AudioFree(A5),A0 jmp (A0) *************************************************************************** ***************************** DTP_Intterrupt ****************************** *************************************************************************** Interrupt movem.l D1-A6,-(SP) bsr.w Play movem.l (SP)+,D1-A6 moveq #0,D0 rts *************************************************************************** ***************************** DTP_InitSound ******************************* *************************************************************************** InitSound move.w dtg_SndNum(A5),D0 tst.w D0 bne.b No_1 lea Song1,A0 bra.b Init No_1 cmp.w #1,D0 bne.b No_2 lea Song2,A0 bra.b Init No_2 cmp.w #2,D0 bne.b No_3 lea Song3,A0 bra.b Init No_3 cmp.w #3,D0 bne.b No_4 lea Song4,A0 bra.b Init No_4 cmp.w #4,D0 bne.b No_5 lea Song5,A0 bra.b Init No_5 cmp.w #5,D0 bne.b No_6 lea Song6,A0 bra.b Init No_6 cmp.w #6,D0 bne.b No_7 lea Song7,A0 bra.b Init No_7 lea Song8,A0 Init move.l A0,lbW02CE56 move.l D0,-(SP) bsr.w InitSong move.l (SP)+,D0 lea StartPositions(PC),A0 lsl.w #4,D0 lea (A0,D0.W),A0 tst.l (A0) bne.b InitOK move.l lbW025632(PC),(A0) move.l lbW025664(PC),4(A0) move.l lbW025696(PC),8(A0) move.l lbW0256C8(PC),12(A0) InitOK move.l (A0)+,lbW025632 move.l (A0)+,lbW025664 move.l (A0)+,lbW025696 move.l (A0),lbW0256C8 bra.w TryAgain *************************************************************************** ***************************** DTP_EndSound ******************************** *************************************************************************** EndSound *************************************************************************** *************************************************************************** *************************************************************************** ; Music from "Projectyle" (c) 1990 by Eldritch The Cat/Electronic Arts MOVEM.L D0/A0,-(SP) LEA $DFF000,A0 MOVE.W #15,$96(A0) MOVEQ #0,D0 MOVE.W D0,$A8(A0) MOVE.W D0,$B8(A0) MOVE.W D0,$C8(A0) MOVE.W D0,$D8(A0) MOVEM.L (SP)+,D0/A0 RTS lbC00D94A LEA lbW025610,A4 MOVEA.L $22(A4),A3 BSR.S lbC00D97C LEA lbW025642,A4 MOVEA.L $22(A4),A3 BSR.S lbC00D97C LEA lbW025674,A4 MOVEA.L $22(A4),A3 BSR.S lbC00D97C LEA lbW0256A6,A4 MOVEA.L $22(A4),A3 BSR.S lbC00D97C RTS lbC00D97C MOVEA.L A3,A0 MOVEQ #0,D0 BRA.S lbC00D98E lbC00D982 CMPI.W #$50,(A0) BNE.S lbC00D98A ADDQ.W #1,D0 lbC00D98A BSR.L lbC00D9B0 lbC00D98E CMPI.W #$46,(A0) BNE.S lbC00D982 TST.W D0 BEQ.S lbC00D99E MOVE.L A3,$26(A4) RTS lbC00D99E MOVE.L #lbW0218EA,$22(A4) MOVE.L #lbW0218EA,$26(A4) RTS lbC00D9B0 CMPI.W #$46,(A0) BEQ.S lbC00D9BA ADDA.W #12,A0 lbC00D9BA RTS lbC00D9BC LEA lbW025610,A0 LEA lbL025930,A1 LEA $DFF0A0,A2 MOVEQ #1,D0 MOVE.W #$80,D1 MOVEQ #3,D7 lbC00D9D6 CLR.B 0(A0) MOVE.W D0,2(A0) MOVE.W D1,4(A0) MOVE.L #lbW02190C,10(A0) MOVE.L #lbW02190C,$10(A0) MOVE.W #1,8(A0) MOVE.W #2,14(A0) MOVE.W #2,$14(A0) CLR.L $16(A0) CLR.L $1A(A0) CLR.L $1E(A0) MOVE.W #$52,6(A0) MOVE.L A1,$2A(A0) MOVE.L A2,$2E(A0) ADD.W D0,D0 ADD.W D1,D1 LEA $32(A0),A0 LEA $258(A1),A1 LEA $10(A2),A2 DBRA D7,lbC00D9D6 RTS Play BTST #0,lbB021936 BEQ.L lbC00DB42 BTST #1,lbB021936 BNE.L lbC00DB42 MOVEM.L D0-D6/A0-A4,-(SP) CMPI.W #2,lbW0219A8 BEQ.S lbC00DAD0 MOVE.W lbW0255BE,D0 CMPI.W #3,lbW0219A8 BEQ.S lbC00DAA2 CMPI.W #5,lbW0219A8 BEQ.S lbC00DAD0 SUBQ.W #1,D0 MOVE.W D0,lbW0255BE MOVE.W D0,$DFF0A8 MOVE.W D0,$DFF0B8 MOVE.W D0,$DFF0C8 MOVE.W D0,$DFF0D8 TST.W D0 BNE.S lbC00DAD0 MOVE.W #5,lbW0219A8 BRA.S lbC00DAD0 lbC00DAA2 ADDQ.W #1,D0 MOVE.W D0,lbW0255BE MOVE.W D0,$DFF0A8 MOVE.W D0,$DFF0B8 MOVE.W D0,$DFF0C8 MOVE.W D0,$DFF0D8 CMPI.W #$40,D0 BNE.S lbC00DAD0 MOVE.W #2,lbW0219A8 lbC00DAD0 LEA $DFF000,A0 LEA lbW025610,A4 BSR.L lbC00DC88 LEA lbW025610,A4 BSR.L lbC00DB44 LEA lbW025642,A4 BSR.L lbC00DB44 LEA lbW025674,A4 BSR.L lbC00DB44 LEA lbW0256A6,A4 BSR.L lbC00DB44 MOVE.W lbW021912,D0 lbC00DB0E MOVE.W D0,-(SP) LEA lbW025610,A4 BSR.L lbC00DB86 LEA lbW025642,A4 BSR.L lbC00DB86 LEA lbW025674,A4 BSR.L lbC00DB86 LEA lbW0256A6,A4 BSR.L lbC00DB86 MOVE.W (SP)+,D0 DBRA D0,lbC00DB0E MOVEM.L (SP)+,D0-D6/A0-A4 lbC00DB42 RTS lbC00DB44 CMPI.W #$53,6(A4) BNE.S lbC00DB84 MOVE.L $1E(A4),D0 ADD.L $16(A4),D0 MOVE.L D0,$16(A4) TST.L $1E(A4) BMI.S lbC00DB72 CMP.L $1A(A4),D0 BLT.S lbC00DB84 MOVE.W #$50,6(A4) MOVE.L $1A(A4),$16(A4) RTS lbC00DB72 CMP.L $1A(A4),D0 BGT.S lbC00DB84 MOVE.W #$50,6(A4) MOVE.L $1A(A4),$16(A4) lbC00DB84 RTS lbC00DB86 SUBQ.W #1,8(A4) BNE.L lbC00DBD4 MOVEA.L $26(A4),A0 MOVEA.L $2A(A4),A2 lbC00DB96 MOVE.W (A0)+,D0 MOVE.W D0,6(A4) CMP.W #$50,D0 BEQ.S lbC00DBD6 CMP.W #$52,D0 BEQ.S lbC00DBF0 CMP.W #$46,D0 BEQ.S lbC00DC06 CMP.W #$56,D0 BEQ.S lbC00DC0C CMP.W #$6C,D0 BEQ.L lbC00DC44 CMP.W #$4C,D0 BEQ.L lbC00DC52 CMP.W #$53,D0 BEQ.L lbC00DC74 lbC00DBCC MOVE.L A2,$2A(A4) MOVE.L A0,$26(A4) lbC00DBD4 RTS lbC00DBD6 MOVE.W 2(A4),$DFF096 MOVE.W (A0)+,8(A4) MOVE.L (A0)+,$16(A4) ADDQ.L #4,A0 BSET #0,0(A4) BRA.S lbC00DBCC lbC00DBF0 MOVE.W 2(A4),$DFF096 MOVE.W (A0)+,8(A4) ADDQ.L #8,A0 BSET #0,0(A4) BRA.S lbC00DBCC lbC00DC06 MOVEA.L $22(A4),A0 BRA.S lbC00DB96 lbC00DC0C ADDQ.W #6,A0 MOVEA.L (A0)+,A1 MOVE.L A1,10(A4) MOVE.W -4(A1),14(A4) MOVE.W -8(A1),D0 BPL.S lbC00DC32 MOVE.W #2,$14(A4) MOVE.L #lbW02190C,$10(A4) BRA.L lbC00DB96 lbC00DC32 MOVE.W D0,$14(A4) ADDA.W 14(A4),A1 SUBA.W D0,A1 MOVE.L A1,$10(A4) BRA.L lbC00DB96 lbC00DC44 ADDA.L #10,A0 MOVE.L A0,-(A2) CLR.W -(A2) BRA.L lbC00DB96 lbC00DC52 ADDQ.L #6,A0 MOVE.W (A0)+,D2 ADDQ.L #2,A0 MOVE.W (A2)+,D1 TST.W D1 BNE.S lbC00DC62 MOVE.W D2,D1 ADDQ.W #1,D1 lbC00DC62 SUBQ.W #1,D1 BEQ.S lbC00DC6E MOVEA.L (A2),A0 MOVE.W D1,-(A2) BRA.L lbC00DB96 lbC00DC6E ADDQ.L #4,A2 BRA.L lbC00DB96 lbC00DC74 MOVE.W (A0)+,8(A4) MOVE.L (A0)+,$1A(A4) MOVE.L (A0)+,D0 ASL.L #2,D0 MOVE.L D0,$1E(A4) BRA.L lbC00DBCC lbC00DC88 MOVEQ #3,D2 lbC00DC8A MOVEA.L $2E(A4),A1 BCLR #0,0(A4) BEQ.S lbC00DCD8 CMPI.W #$52,6(A4) BNE.S lbC00DCAE MOVE.W #1,4(A1) MOVE.L #lbW02190C,0(A1) BRA.S lbC00DD00 lbC00DCAE MOVE.L 10(A4),0(A1) MOVE.W 14(A4),D0 LSR.W #1,D0 MOVE.W D0,4(A1) BSET #1,0(A4) MOVE.W 4(A4),$9C(A0) MOVE.W 2(A4),D0 BSET #15,D0 MOVE.W D0,$96(A0) BRA.S lbC00DD00 lbC00DCD8 MOVE.W $1E(A0),D0 AND.W 4(A4),D0 BEQ.S lbC00DD00 MOVE.W 4(A4),$9C(A0) BCLR #1,0(A4) BEQ.S lbC00DD00 MOVE.L $10(A4),0(A1) MOVE.W $14(A4),D0 LSR.W #1,D0 MOVE.W D0,4(A1) lbC00DD00 MOVE.L $16(A4),D0 BSR.L lbC00DE66 SWAP D0 MOVE.W D0,6(A1) LEA $32(A4),A4 DBRA D2,lbC00DC8A RTS InitSong BSR.L lbC00D9BC BSR.L lbC00DDB8 TryAgain BSR.L lbC00D94A CLR.W lbW0255BE MOVE.W #3,lbW0219A8 BSET #0,lbB021936 RTS lbC00DD3C CMPI.W #$46,(A0) BEQ.S lbC00DD70 CMPI.W #$56,(A0) BNE.L lbC00DD64 MOVE.L 8(A0),D0 CLR.L D1 LEA lbW0255C0,A1 lbC00DD56 CMP.L 0(A1,D1.L),D0 BEQ.S lbC00DD60 ADDQ.L #4,D1 BRA.S lbC00DD56 lbC00DD60 MOVE.L D1,8(A0) lbC00DD64 CMPI.W #$46,(A0) BEQ.S lbC00DD6E ADDA.W #12,A0 lbC00DD6E BRA.S lbC00DD3C lbC00DD70 RTS lbC00DD72 CMPI.W #$46,(A0) BEQ.S lbC00DDB6 CMPI.W #$56,(A0) BNE.L lbC00DDAA MOVE.L 8(A0),D0 LEA lbW0255C0,A1 MOVE.L 0(A1,D0.L),8(A0) MOVE.L #lbL031E56,D0 ADDI.L #8,D0 CMP.L 8(A0),D0 BNE.L lbC00DDAA MOVE.L 0(A1),8(A0) lbC00DDAA CMPI.W #$46,(A0) BEQ.S lbC00DDB4 ADDA.W #12,A0 lbC00DDB4 BRA.S lbC00DD72 lbC00DDB6 RTS lbC00DDB8 ; LEA lbW02CE56,A0 move.l lbW02CE56,A0 tst.w 24(A0) bne.b InitDone ADDA.W #$10,A0 MOVE.L A0,lbW025632 BSR.S lbC00DE0A MOVE.L A0,lbW025664 BSR.S lbC00DE0A MOVE.L A0,lbW025696 BSR.S lbC00DE0A MOVE.L A0,lbW0256C8 MOVEA.L lbW025632,A0 BSR.L lbC00DD72 MOVEA.L lbW025664,A0 BSR.L lbC00DD72 MOVEA.L lbW025696,A0 BSR.L lbC00DD72 MOVEA.L lbW0256C8,A0 BSR.L lbC00DD72 InitDone RTS lbC00DE0A CMPI.W #$46,(A0) BEQ.S lbC00DE1C CMPI.W #$46,(A0) BEQ.S lbC00DE1A ADDA.W #12,A0 lbC00DE1A BRA.S lbC00DE0A lbC00DE1C ADDA.W #12,A0 RTS InitSamples LEA lbL031E56,A5 ADDA.W #$8E,A5 LEA lbW0255C0,A4 MOVEQ #$13,D0 lbC00DE34 MOVE.L (A5)+,D1 ADDI.L #lbL031E56,D1 ADDI.L #8,D1 MOVE.L D1,(A4)+ DBRA D0,lbC00DE34 LEA lbW0255C0,A0 MOVEQ #$13,D7 lbC00DE50 MOVEA.L (A0)+,A1 MOVE.W -4(A1),D6 BRA.S lbC00DE5C lbC00DE58 SUBI.B #$80,(A1)+ lbC00DE5C DBRA D6,lbC00DE58 DBRA D7,lbC00DE50 RTS lbC00DE66 TST.L D0 BEQ.S lbC00DE96 MOVEM.L D1/D2,-(SP) LSR.L #3,D0 MOVE.L #$369E99,D1 DIVU.W D0,D1 MOVE.W D1,D2 SWAP D2 CLR.W D1 DIVU.W D0,D1 MOVE.W D1,D2 MOVE.L D2,D0 MOVEM.L (SP)+,D1/D2 CMP.L lbL02190E,D0 BGE.S lbC00DE96 MOVE.L D0,lbL02190E lbC00DE96 RTS lbW0218EA dc.w $52 dc.w $2710 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w $46 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w 0 dc.w 0 lbW02190C dc.w 0 lbL02190E dc.l $7C0000 lbW021912 dc.w 3 lbB021936 dc.w 0 lbW0219A8 dc.w 0 lbW0255BE dc.w 0 lbW0255C0 ds.b 20*4 lbW025610 ds.b 34 lbW025632 ds.b 16 lbW025642 ds.b 34 lbW025664 ds.b 16 lbW025674 ds.b 34 lbW025696 ds.b 16 lbW0256A6 ds.b 34 lbW0256C8 ds.b 16 ds.b 600 lbL025930 ds.b 600 ds.b 600 ds.b 600 lbW02CE56 dc.l 0 StartPositions ds.b 8*4*4 Song1 incbin ram:1.Song Song2 incbin ram:2.Song Song3 incbin ram:3.Song Song4 incbin ram:4.Song Song5 incbin ram:5.Song Song6 incbin ram:6.Song Song7 incbin ram:7.Song Song8 incbin ram:8.Song lbL031E56 incbin ram:Samples Pro_End