********************************************************* **** "Dark Helmets" - 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 DH_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Dark Helmets - 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 " Dark Helmets",10 dc.b 10 dc.b " Released at The Gathering 2003",10 dc.b " Visuals by Slummy / Spaceballs",10 dc.b " Music by Lug00ber / The Silents",10 dc.b 10 dc.b " Additional audio mastering by",10 dc.b " Optimize / Kvasigen",10 dc.b " The music was compressed using",10 dc.b " the NTSP-system developed by",10 dc.b " SP/Contraz & Nightraver/Contraz.",10 dc.b 10 dc.b " Greetings to Leia (cash),",10 dc.b " Gloom (060) and Alex&JÖrg (germans)..",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,DH_End-DH_Start+1820*2 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 move.l #2933,Counter move.l MusicPtr(PC),lbL000C86 bra.w Init MusicPtr dc.l SPNT+8 Counter dc.l 0 *************************************************************************** ***************************** 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/A1/A6,-(A7) movea.l 4.W,A6 lea StructInt(PC),A1 moveq #INTB_AUD0,D0 jsr _LVOSetIntVector(A6) ; SetIntVector move.l D0,Channel0 lea StructInt(PC),A1 moveq #INTB_AUD1,D0 jsr _LVOSetIntVector(A6) move.l D0,Channel1 lea StructInt(PC),A1 moveq #INTB_AUD2,D0 jsr _LVOSetIntVector(A6) move.l D0,Channel2 lea StructInt(PC),A1 moveq #INTB_AUD3,D0 jsr _LVOSetIntVector(A6) move.l D0,Channel3 movem.l (A7)+,D0/A1/A6 move.w #$8780,$DFF09A move.w #$800F,$DFF096 rts Channel0 dc.l 0 Channel1 dc.l 0 Channel2 dc.l 0 Channel3 dc.l 0 StructInt dc.l 0 dc.l 0 dc.w $205 dc.l IntName dc.l 0 dc.l Interrupt IntName dc.b 'Dark Helmets Audio Interrupt',0 even *************************************************************************** ***************************** DTP_StopInt ********************************* *************************************************************************** StopInt lea $DFF000,A0 move.w #15,$96(A0) move.w #$780,$9A(A0) move.w #$780,$9C(A0) move.l A6,-(A7) movea.l 4.W,A6 movea.l Channel0(PC),A1 moveq #INTB_AUD0,D0 jsr _LVOSetIntVector(A6) movea.l Channel1(PC),A1 moveq #INTB_AUD1,D0 jsr _LVOSetIntVector(A6) movea.l Channel2(PC),A1 moveq #INTB_AUD2,D0 jsr _LVOSetIntVector(A6) movea.l Channel3(PC),A1 moveq #INTB_AUD3,D0 jsr _LVOSetIntVector(A6) move.l (A7)+,A6 rts *************************************************************************** ***************************** DTP_Intterrupt ****************************** *************************************************************************** Interrupt movem.l D1-A6,-(SP) bsr.w Play subq.l #1,Counter bne.b NoEnd move.l #2933,Counter move.l MusicPtr(PC),lbL000C86 bsr.b SongEnd NoEnd 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 "Dark Helmets" demo Play ;lbC000AB4 MOVEM.L D0-D7/A0-A6,-(SP) ; TST.B lbL000B04 ; BEQ.S lbC000AEE LEA $DFF000,A6 MOVE.W $1E(A6),D0 BTST #7,D0 BEQ.L lbC000AE4 BSR.L lbC000BE8 BSR.L lbC000BD0 MOVE.L lbL000C8C,D0 BSR.L lbC000B78 lbC000AE4 MOVE.W #$780,$DFF09C ; BRA.S lbC000AF6 ;lbC000AEE MOVE.W #$780,$DFF09C ;lbC000AF6 MOVEM.L (SP)+,D0-D7/A0-A6 ; NOP ; NOP ; RTE rts ; NOP ; NOP ;lbL000B04 dc.l 0 ;lbC000B08 ST lbL000B04 ; RTS ;lbC000B10 SF lbL000B04 ; RTS Init lbC000B18 BSR.L lbC000BE8 BSR.L lbC000BD0 MOVE.L lbL000C8C,D0 BSR.L lbC000B78 ; BSR.L lbC000B08 ; LEA $DFF000,A6 ; MOVEA.L lbL000644,A0 ; MOVE.L $70(A0),lbL000640 ; MOVE.L #lbC000AB4,$70(A0) ; BSET #1,$BFE001 ; MOVE.W $1C(A6),D0 ; MOVE.W #$7FFF,$9A(A6) ; NOP ; ORI.W #$C080,D0 ; MOVE.W D0,$9A(A6) RTS ;lbC000B68 MOVEA.L lbL000644,A0 ; MOVE.L lbL000640,$70(A0) ; RTS lbC000B78 LEA $DFF000,A6 MOVE.L D0,$A0(A6) MOVE.L D0,$B0(A6) MOVE.L D0,$C0(A6) MOVE.L D0,$D0(A6) MOVEQ #$3F,D0 MOVE.W D0,$A8(A6) MOVE.W D0,$B8(A6) MOVE.W D0,$C8(A6) MOVE.W D0,$D8(A6) MOVE.W #$A1,D0 MOVE.W D0,$A6(A6) MOVE.W D0,$B6(A6) MOVE.W D0,$C6(A6) MOVE.W D0,$D6(A6) MOVE.W #$384,D0 MOVE.W D0,$A4(A6) MOVE.W D0,$B4(A6) MOVE.W D0,$C4(A6) MOVE.W D0,$D4(A6) MOVE.W #$820F,$96(A6) RTS lbC000BD0 MOVE.L lbL000C8C(PC),D0 MOVE.L lbL000C90(PC),D1 EXG D0,D1 MOVE.L D0,lbL000C8C MOVE.L D1,lbL000C90 RTS lbC000BE8 MOVEA.L lbL000C86(PC),A0 MOVEA.L lbL000C90(PC),A1 MOVE.W #$C7,D5 MOVEQ #0,D0 lbC000BF6 MOVEQ #0,D6 MOVE.B (A0)+,D6 MOVE.L D6,D0 LSR.B #5,D6 MOVE.B D6,D4 SUBQ.B #1,D4 BPL.S lbC000C06 MOVEQ #0,D4 lbC000C06 LSL.B #3,D0 ASR.B #3,D0 LSL.B D4,D0 MOVE.B D0,(A1)+ MOVE.B (A0)+,D0 MOVE.L D0,D1 ASR.B #4,D0 ANDI.L #15,D1 LSL.L D6,D0 ; LSL.L #8,D0 move.b D0,(A1)+ LSL.B #4,D1 ASR.B #4,D1 LSL.L D6,D1 ; MOVE.B D1,D0 move.b D1,(A1)+ MOVE.B (A0)+,D1 ; MOVE.W D0,(A1)+ MOVE.L D1,D0 ASR.B #4,D1 ANDI.L #15,D0 LSL.L D6,D1 ; LSL.L #8,D1 move.b D1,(A1)+ LSL.B #4,D0 ASR.B #4,D0 LSL.L D6,D0 ; MOVE.B D0,D1 move.b D0,(A1)+ MOVE.B (A0)+,D0 ; MOVE.W D1,(A1)+ MOVE.L D0,D1 ASR.B #4,D0 ANDI.L #15,D1 LSL.L D6,D0 ; LSL.L #8,D0 move.b D0,(A1)+ LSL.B #4,D1 ASR.B #4,D1 LSL.L D6,D1 ; MOVE.B D1,D0 move.b D1,(A1)+ MOVE.B (A0)+,D1 ; MOVE.W D0,(A1)+ MOVE.L D1,D0 ASR.B #4,D1 ANDI.L #15,D0 LSL.L D6,D1 ; LSL.L #8,D1 move.b D1,(A1)+ LSL.B #4,D0 ASR.B #4,D0 LSL.L D6,D0 move.b D0,(A1)+ ; MOVE.B D0,D1 ; MOVE.W D1,(A1)+ DBRA D5,lbC000BF6 ADDI.L #$3E8,lbL000C86 RTS lbL000C86 dc.l SPNT+8 ; dc.w $40 lbL000C8C dc.l Buffer1 lbL000C90 dc.l Buffer2 ; original size 2932808 (in demo 2932908) SPNT incbin ram:music ds.b 1100 DH_End Section Buffer,BSS_C Buffer1 ds.b 1820 Buffer2 ds.b 1820