********************************************************* **** "Galactic Conqueror" - 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 GC_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Galactic Conqueror - 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_GetPositionNr,GetPosition dc.l EP_Get_ModuleInfo,Get_ModuleInfo dc.l TAG_DONE PlayerName dc.b "CustomPlay",0 Text dc.b 10 dc.b " GALACTIC CONQUEROR",10 dc.b 10 dc.b " (C) 1989 BY TITUS",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,GC_End-GC_Start dc.l MI_Length,19 dc.l 0 *************************************************************************** ********************************* EP_GetPosNr ***************************** *************************************************************************** GetPosition move.l Position(PC),D0 rts *************************************************************************** ***************************** 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 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 'Galactic Conqueror Aud0 Interrupt',0 even Audio0 dc.l 0 *************************************************************************** ***************************** DTP_StopInt ********************************* *************************************************************************** StopInt move.w #3,$DFF096 move.l A6,-(A7) moveq #INTB_AUD0,D0 move.l Audio0(PC),A1 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 "Galactic Conqueror" (c) 1989 by Titus Position dc.l 0 Samp dc.l Samples Init clr.l Position Play move.l Position,D1 lsl.w #2,D1 lea lbL00F508(PC),A0 move.l (A0,D1.W),D0 lea lbL00F4F0(PC),A0 lea lbL00F4D8(PC),A2 lsl.w #2,D0 add.w D0,A0 add.w D0,A2 lea $DFF0A0,A1 move.l (A2),D0 add.l Samp(PC),D0 move.l D0,(A1) move.l D0,$10(A1) move.l (A0),D0 lsr.l #1,D0 move.w D0,4(A1) move.w D0,$14(A1) move.w #64,D1 move.w D1,8(A1) move.w D1,$18(A1) move.w #$1AC,D1 cmp.l #5,Position ble.b PeriodOK cmp.l #12,Position bge.b PeriodOK move.w #$1C0,D1 PeriodOK move.w D1,6(A1) move.w D1,$16(A1) cmp.l #$12,Position bne.b NoEnd bsr.w SongEnd clr.l Position bra.b Done NoEnd addq.l #1,Position Done rts lbL00F4D8 dc.l 0 dc.l $54A dc.l $215C dc.l $3EA8 dc.l $7DA0 dc.l $BCA2 lbL00F4F0 dc.l $54A dc.l $1C12 dc.l $1D4C dc.l $3EF8 dc.l $3F02 dc.l $3A98 lbL00F508 dc.l 0 dc.l 1 dc.l 1 dc.l 1 dc.l 1 dc.l 2 dc.l 3 dc.l 3 dc.l 4 dc.l 3 dc.l 3 dc.l 4 dc.l 3 dc.l 3 dc.l 4 dc.l 3 dc.l 3 dc.l 4 dc.l 5 Samples incbin ram:MUSIC. GC_End