********************************************************* **** "Knight Force" - 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 KF_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Knight Force - 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 " KNIGHT FORCE",10 dc.b 10 dc.b " (C) 1990 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,KF_End-KF_Start dc.l MI_Length,92 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 'Knight Force 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 "Knight Force" (c) 1990 by Titus Position dc.l 0 Init clr.l Position Play move.l Position,D1 lsl.w #1,D1 lea lbW00E9CC(PC),A0 move.w (A0,D1.W),D0 cmp.w #9,D0 ble.b PeriodHalf cmp.w #$14,D0 beq.b PeriodHalf move.w #$358,D2 bra.b PutPer PeriodHalf move.w #$358/2,D2 PutPer lea lbL00E2C0(PC),A0 lea lbL00F0E6(PC),A2 lsl.w #2,D0 add.w D0,A0 add.w D0,A2 lea $DFF0A0,A1 move.l (A2),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 #63,D1 move.w D1,8(A1) move.w D1,$18(A1) move.w D2,6(A1) move.w D2,$16(A1) cmp.l #91,Position bne.b NoEnd bsr.w SongEnd clr.l Position bra.b Done NoEnd addq.l #1,Position Done rts lbL00E2C0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l $745E dc.l $3A92 dc.l $3A9E dc.l $3A26 dc.l 0 dc.l $25C dc.l $4EE dc.l $7A0 dc.l $6A2 dc.l $DD0 dc.l $4C4 dc.l $33E dc.l 0 dc.l 0 dc.l $2DC2 dc.l $15BA dc.l $1876 dc.l $734 dc.l $610 dc.l $ED6 dc.l $398 lbL00F0E6 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l Samples+$2DC2+$15BA+$1876+$734+$610+$ED6+$398 dc.l Samples+$2DC2+$15BA+$1876+$734+$610+$ED6+$398+$745E dc.l Samples+$2DC2+$15BA+$1876+$734+$610+$ED6+$398+$745E+$3A92 dc.l Samples+$2DC2+$15BA+$1876+$734+$610+$ED6+$398+$745E+$3A92+$3A9E dc.l 0 dc.l $25C dc.l $4EE dc.l $7A0 dc.l $6A2 dc.l $DD0 dc.l $4C4 dc.l $33E dc.l 0 dc.l 0 dc.l Samples dc.l Samples+$2DC2 dc.l Samples+$2DC2+$15BA dc.l Samples+$2DC2+$15BA+$1876 dc.l Samples+$2DC2+$15BA+$1876+$734 dc.l Samples+$2DC2+$15BA+$1876+$734+$610 dc.l Samples+$2DC2+$15BA+$1876+$734+$610+$ED6 lbW00E9CC dc.w $18 dc.w $17 dc.w $18 dc.w $17 dc.w $18 dc.w $17 dc.w $19 dc.w $19 dc.w $18 dc.w $17 dc.w $18 dc.w $17 dc.w $16 dc.w $14 dc.w $14 dc.w $15 dc.w $18 dc.w $17 dc.w $18 dc.w $17 dc.w $18 dc.w $17 dc.w $16 dc.w $18 dc.w $17 dc.w $18 dc.w $15 dc.w 6 dc.w 7 dc.w 8 dc.w 7 dc.w 9 dc.w 6 dc.w 7 dc.w 8 dc.w 7 dc.w 9 dc.w $15 dc.w $18 dc.w $17 dc.w $18 dc.w $18 dc.w $17 dc.w $18 dc.w $16 dc.w $1A dc.w $1A dc.w $1A dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $18 dc.w $1A dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $1A dc.w $18 dc.w $15 dc.w $18 dc.w $17 dc.w $18 dc.w $17 dc.w $18 dc.w $16 dc.w $18 dc.w $17 dc.w $19 dc.w $18 dc.w $17 dc.w $15 dc.w 6 dc.w 7 dc.w 8 dc.w 7 dc.w 9 dc.w 6 dc.w 7 dc.w 8 dc.w 7 dc.w 9 dc.w $15 dc.w 0 Samples incbin ram:Q KF_End