***************************************************** **** "Full Metal Planete" - 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 FMP_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Full Metal Planete - 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 " FULL METAL PLANETE",10 dc.b 10 dc.b " AN INTERNATIONAL",10 dc.b " COPRODUCTION",10 dc.b " DESIGNED BY",10 dc.b " HITECH PRODUCTIONS",10 dc.b 10 dc.b " ALGORITHMS",10 dc.b " AND PROGRAMMS BY",10 dc.b " ROLAND MORLA",10 dc.b 10 dc.b " GRAPHICS BY",10 dc.b " NATHALIE DELANCE",10 dc.b " AND FRANCK DREVON",10 dc.b 10 dc.b " MUSIC AND SOUNDS",10 dc.b " BY STEPHANE PICQ",10 dc.b 10 dc.b " LICENSED BY",10 dc.b " LUDODELIRE",10 dc.b 10 dc.b " DIRECTED BY",10 dc.b " BERTRAND BROCARD",10 dc.b 10 dc.b " COPYRIGHT 1989",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,FMP_End-FMP_Start dc.l MI_Length,48 dc.l 0 *************************************************************************** ********************************* EP_GetPosNr ***************************** *************************************************************************** GetPosition move.l lbL01A76E(PC),D0 sub.l #lbL01A4B2,D0 divu.w #10,D0 rts *************************************************************************** ***************************** DTP_InitPlayer ****************************** *************************************************************************** InitPlayer move.l A5,EagleBase bsr.w InstallSamples 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 #$8001,$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 'Full Metal Planete Aud0 Interrupt',0,0 even Audio0 dc.l 0 *************************************************************************** ***************************** DTP_StopInt ********************************* *************************************************************************** StopInt lea $DFF000,A0 move.w #1,$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 "Full Metal Planete" (c) 1989 by Hitech Productions Play lbC01673A MOVEM.L D0/A0/A1,-(SP) MOVEQ #0,D0 ; MOVE.W #$80,$9C(A0) ; BRA.S lbC016770 ; MOVEM.L D0/A0/A1,-(SP) ; MOVEQ #1,D0 ; MOVE.W #$100,$9C(A0) ; BRA.S lbC016770 ; MOVEM.L D0/A0/A1,-(SP) ; MOVEQ #2,D0 ; MOVE.W #$200,$9C(A0) ; BRA.S lbC016770 ; MOVEM.L D0/A0/A1,-(SP) ; MOVEQ #3,D0 ; MOVE.W #$400,$9C(A0) lbC016770 MOVEA.L lbL01A76E,A1 ASL.W #4,D0 ADDA.W D0,A0 MOVE.W 8(A1),$A6(A0) LEA 10(A1),A1 TST.L (A1) BNE.S lbC01678E MOVEA.L lbL01E286,A1 bsr.w SongEnd lbC01678E MOVE.L (A1),$A0(A0) MOVE.W 6(A1),$A4(A0) MOVE.L A1,lbL01A76E MOVEM.L (SP)+,D0/A0/A1 RTS Init lbC0167A4 MOVE.W #15,$DFF096 MOVEQ #3,D1 LEA $DFF000,A0 lbC0167B4 MOVE.L #lbL01A772,$A0(A0) MOVE.W #2,$A4(A0) MOVE.W #$40,$A8(A0) LEA $10(A0),A0 DBRA D1,lbC0167B4 MOVEA.L lbL01E286,A1 MOVE.L A1,lbL01A76E LEA $DFF000,A0 MOVE.W 8(A1),$A6(A0) MOVE.L (A1),$A0(A0) MOVE.W 6(A1),$A4(A0) ; MOVE.W #$8201,$DFF096 ; MOVE.W #$8080,$DFF09A ; MOVEQ #$64,D0 ;lbC016804 DBRA D0,lbC016804 ; MOVE.W #1,lbW01E28A RTS InstallSamples ;lbC015516 LINK.W A5,#-$34 ; MOVEM.L D4/D5,-(SP) ; PEA -$30(A5) ; PEA musique.MSG(PC) ; JSR lbC017154 ; read, depack and install file ; ADDQ.W #8,SP ; MOVE.L D0,lbL01E354-DT(A4) bsr.w StepOne MOVEQ #0,D4 LEA lbL01A4B2(PC),A0 MOVE.L A0,LinkValue lbC01553C LEA lbW01A692(PC),A0 MOVEQ #0,D0 MOVE.B 0(A0,D4.W),D0 CMP.W #$FF,D0 BEQ.S lbC015584 LEA lbW01A692(PC),A0 MOVEQ #0,D0 MOVE.B 0(A0,D4.W),D0 MOVE.W D0,D5 MOVE.W D5,D0 EXT.L D0 ASL.L #2,D0 ; LEA -$30(A5),A0 lea SamplesPtr(PC),A0 MOVEA.L LinkValue,A1 MOVE.L 0(A0,D0.L),(A1) MOVEA.L LinkValue,A0 MOVE.L 4(A0),D0 ASR.L #1,D0 MOVE.L D0,4(A0) ADDQ.W #1,D4 ADDI.L #10,LinkValue BRA.S lbC01553C lbC015584 ; MOVEA.L LinkValue,A0 ; CLR.L (A0) ; MOVEM.L (SP)+,D4/D5 ; UNLK A5 RTS ;musique.MSG dc.b 'musique',0 StepOne move.l MusiquePtr(PC),A0 move.w (A0),Number clr.w Counter bra.b lbC01725A lbC017230 move.w Counter,D0 ext.l D0 asl.l #2,D0 move.l #SamplesPtr,A0 move.w Counter,D1 ext.l D1 asl.l #2,D1 move.l D1,A1 add.l MusiquePtr(PC),A1 move.l 2(A1),D1 add.l MusiquePtr(PC),D1 move.l D1,0(A0,D0.L) addq.w #1,Counter lbC01725A move.w Counter,D0 cmp.w Number,D0 blt.b lbC017230 rts LinkValue dc.l 0 MusiquePtr dc.l Module Number dc.w 0 Counter dc.w 0 SamplesPtr ds.b 10*4 lbL01A4B2 dc.l 0 dc.l $7AED dc.w $E6 dc.l 0 dc.l $597F dc.w $E6 dc.l 0 dc.l $7695 dc.w $E6 dc.l 0 dc.l $781F dc.w $E6 dc.l 0 dc.l $7695 dc.w $E6 dc.l 0 dc.l $1E5F dc.w $E6 dc.l 0 dc.l $592D dc.w $E6 dc.l 0 dc.l $7695 dc.w $E6 dc.l 0 dc.l $781F dc.w $E6 dc.l 0 dc.l $7695 dc.w $E6 dc.l 0 dc.l $1E5F dc.w $E6 dc.l 0 dc.l $592D dc.w $E6 dc.l 0 dc.l $7AED dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $1D87 dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $1D87 dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $3B57 dc.w $E6 dc.l 0 dc.l $592D dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $1D87 dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $1D87 dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $3B57 dc.w $E6 dc.l 0 dc.l $592D dc.w $E6 dc.l 0 dc.l $7695 dc.w $E6 dc.l 0 dc.l $781F dc.w $E6 dc.l 0 dc.l $7695 dc.w $E6 dc.l 0 dc.l $597F dc.w $E6 dc.l 0 dc.l $1D87 dc.w $E6 dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $3B57 dc.w $E6 dc.l 0 dc.l $592D dc.w $E6 dc.l 0 dc.l $597F dc.w $E6 dc.l 0 dc.l $768F dc.w $E6 dc.l 0 dc.l $768F dc.w $E6 dc.l 0 dc.l $768F dc.w $E6 dc.l 0 dc.l $7AED dc.w $E6 dc.l 0 dc.l $781F dc.w $1CC dc.l 0 dc.l $781F dc.w $1CC dc.l 0 dc.l $768F dc.w $1CC dc.l 0 dc.l $768F dc.w $1CC dc.l 0 dc.l $582D dc.w $E6 dc.l 0 dc.l $3B57 dc.w $E6 dc.l 0 dc.l $592D dc.w $E6 dc.l 0 dc.l 0 dc.w 0 lbW01A692 dc.w $907 dc.w $405 dc.w $406 dc.w $304 dc.w $504 dc.w $603 dc.w $900 dc.w $100 dc.w $100 dc.w $203 dc.w 1 dc.w 1 dc.w 2 dc.w $304 dc.w $504 dc.w $701 dc.w 2 dc.w $307 dc.w $808 dc.w $809 dc.w $505 dc.w $808 dc.w 2 dc.w $3FF lbL01A76E dc.l 0 lbL01A772 dc.l 0 lbL01E286 dc.l lbL01A4B2 Module incbin ram:musique FMP_End