***************************************************** **** "Carrier Command" - Custom Module **** **** all adaptions by Wanted Team **** ***************************************************** incdir "dh2:include/" include 'misc/eagleplayer2.01.i' include 'hardware/intbits.i' include 'exec/exec_lib.i' SECTION Player,Code_C CC_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Carrier Command - 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_StartInt,StartInt dc.l DTP_StopInt,StopInt dc.l DTP_InitPlayer,InitPlayer dc.l DTP_EndPlayer,EndPlayer dc.l DTP_InitSound,InitSound dc.l DTP_EndSound,EndSound dc.l EP_Get_ModuleInfo,Get_ModuleInfo dc.l TAG_DONE PlayerName dc.b "CustomPlay",0 Text dc.b 10 dc.b " CARRIER COMMAND",10 dc.b 10 dc.b " WRITTEN BY REALTIME GAMES SOFTWARE LTD",10 dc.b " PUBLISHED BY RAINBIRD SOFTWARE",10 dc.b 10 dc.b 10 dc.b " COPYRIGHT REALTIME GAMES SOFTWARE LTD 1987/88",0 even EagleBase dc.l 0 *************************************************************************** ***************************** EP_Get_ModuleInfo *************************** *************************************************************************** Get_ModuleInfo lea InfoBuffer(PC),A0 rts InfoBuffer dc.l MI_SpecialInfo,Text dc.l MI_LoadSize,CC_End-CC_Start dc.l 0 *************************************************************************** ***************************** DTP_InitPlayer ****************************** *************************************************************************** InitPlayer move.l A5,EagleBase move.l dtg_AudioAlloc(A5),A0 jmp (A0) *************************************************************************** ***************************** DTP_EndPlayer ******************************* *************************************************************************** EndPlayer move.l dtg_AudioFree(A5),A0 jmp (A0) *************************************************************************** ***************************** DTP_InitSound ******************************* *************************************************************************** InitSound lea $DFF000,A6 bra.w Init *************************************************************************** ***************************** DTP_EndSound ******************************** *************************************************************************** EndSound 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) rts *************************************************************************** ***************************** DTP_StartInt ******************************** *************************************************************************** StartInt movem.l D0/A6,-(A7) lea InterruptStruct(PC),A1 moveq #INTB_AUD0,D0 move.l 4.W,A6 ; baza biblioteki exec do A6 jsr _LVOSetIntVector(A6) move.l D0,Audio0 movem.l (A7)+,D0/A6 move.w #$8080,$DFF09A move.w #$8003,$DFF096 rts InterruptStruct dc.l 0 dc.l 0 dc.b NT_INTERRUPT dc.b 5 ; priority dc.l Name ; ID string dc.l 0 dc.l Interrupt Name dc.b 'Carrier Command Aud0 Interrupt',0,0 even Audio0 dc.l 0 *************************************************************************** ***************************** DTP_StopInt ********************************* *************************************************************************** StopInt lea $DFF000,A0 move.w #3,$96(A0) move.w #$80,$9A(A0) move.w #$80,$9C(A0) moveq #INTB_AUD0,D0 move.l Audio0(PC),A1 move.l A6,-(A7) move.l 4.W,A6 jsr _LVOSetIntVector(a6) move.l (A7)+,A6 rts *************************************************************************** ***************************** DTP_Intterrupt ****************************** *************************************************************************** Interrupt movem.l D1-A6,-(SP) move.w #$80,$DFF09A move.w #$80,$DFF09C bsr.w Play move.w #$8080,$DFF09A movem.l (SP)+,D1-A6 moveq #0,D0 rts SongEnd movem.l A1/A5,-(A7) move.l EagleBase(PC),A5 move.l dtg_SongEnd(A5),A1 jsr (A1) movem.l (A7)+,A1/A5 rts *************************************************************************** *************************************************************************** *************************************************************************** ; Music from "Carrier Command" (c) 1988 by Realtime ;lbW0000F0 dc.w 0 ; dc.b 'sample' Init lbC0000F8 MOVE.W #$18D,D0 ; TST.B $876 ; BEQ.S lbC000106 ; MOVE.W #$95,D0 lbC000106 MOVE.W D0,$A6(A6) MOVE.W D0,$B6(A6) ; MOVE.W #15,$9E(A6) MOVEQ #0,D0 MOVE.W D0,$A8(A6) MOVE.W D0,$B8(A6) ; MOVE.W D0,$23EA ; LEA $59AAA,A0 ; MOVE.L A0,$23E2 ; MOVE.L A0,$23E6 ; ADDQ.W #2,A0 lea Empty(PC),A0 move.l A0,SMP_Ptr move.w #$40,$A8(A6) move.w #$40,$B8(A6) MOVE.L A0,$A0(A6) MOVE.L A0,$B0(A6) ; SF $23EC MOVE.W #$A00,$A4(A6) MOVE.W #$A00,$B4(A6) ; MOVE.W #$8003,$96(A6) BCLR #1,$BFE001 RTS Play MOVEM.L D0/A0/A6,-(SP) LEA $DFF000,A6 ; MOVEA.L $23E2,A0 ; CLR.W (A0) ; TST.B $23EC ; SNE $23ED ; BEQ.S lbC00018C ; CLR.W $A8(A6) ; CLR.W $B8(A6) ; MOVE.L #lbW0000F0,$23E2 ; MOVEA.L $23E6,A0 ; BRA.L lbC0001C0 ;lbC00018C MOVE.W #$40,$A8(A6) ; MOVE.W #$40,$B8(A6) ; MOVEA.L $23E6,A0 ; MOVE.L A0,$23E2 ; MOVE.W $23EA,D0 ; LEA $1402(A0),A0 move.l SMP_Ptr(PC),A0 lea 5120(A0),A0 cmp.l #'WTWT',(A0) bne.b NoRep lea Empty(PC),A0 bsr.w SongEnd NoRep move.l A0,SMP_Ptr ; ADDQ.W #1,D0 ; CMP.W #4,D0 ; BNE.S lbC0001B8 ; CLR.W D0 ; LEA $59AAA,A0 ;lbC0001B8 MOVE.L A0,$23E6 ; MOVE.W D0,$23EA ;lbC0001C0 TST.W (A0) ; BEQ.S lbC0001E0 ; SF $23EC MOVE.W #$A00,$A4(A6) MOVE.W #$A00,$B4(A6) ; ADDQ.W #2,A0 MOVE.L A0,$A0(A6) MOVE.L A0,$B0(A6) ; BRA.S lbC0001F0 ;lbC0001E0 MOVE.W #$40,$A4(A6) ; MOVE.W #$40,$B4(A6) ; ST $23EC ;lbC0001F0 MOVE.W #$80,$9C(A6) MOVEM.L (SP)+,D0/A0/A6 ; RTE rts SMP_Ptr dc.l 0 Empty ds.b 5120 incbin ram:sample dc.l 'WTWT' CC_End