***************************************************** **** Limes & Napoleon - Custom Module **** **** all adaptions by Wanted Team **** ***************************************************** incdir "dh2:include/" include 'misc/eagleplayer2.01.i' SECTION Player,Code_C LN_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Limes & Napoleon - 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_Interrupt,Interrupt 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 EP_GetPositionNr,GetPosition dc.l TAG_DONE PlayerName dc.b "CustomPlay",0 Text dc.b 10 dc.b " Limes and Napoleon",10 dc.b 10 dc.b " © 1989 by EAS",10 dc.b " Original Version",10 dc.b " Andreas Mettler",10 dc.b " AMIGA Version",10 dc.b " Markus Gietzen",10 dc.b " Graphic",10 dc.b " Martin Mettel",10 dc.b " Titelgraphic",10 dc.b " EAS",10 dc.b " Music",10 dc.b " Hans-Hermann Franck",10 dc.b " Thanks for checking",10 dc.b " the Muzakreplay to",10 dc.b " Michael Schwendt",0 even EagleBase dc.l 0 *************************************************************************** ********************************* EP_GetPosNr ***************************** *************************************************************************** GetPosition move.l lbL01007E(PC),D0 rts *************************************************************************** ***************************** EP_Get_ModuleInfo *************************** *************************************************************************** Get_ModuleInfo lea InfoBuffer(PC),A0 rts InfoBuffer dc.l MI_SpecialInfo,Text dc.l MI_LoadSize,LN_End-LN_Start Length dc.l MI_Length,34 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_Intterrupt ****************************** *************************************************************************** Interrupt movem.l D1-A6,-(SP) moveq #0,D4 ; fix bsr.w Play movem.l (SP)+,D1-A6 moveq #0,D0 rts DMAWait movem.l D0/D1,-(SP) moveq #8,D0 .dma1 move.b $DFF006,D1 .dma2 cmp.b $DFF006,D1 beq.b .dma2 dbeq D0,.dma1 movem.l (SP)+,D0/D1 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 *************************************************************************** ***************************** DTP_InitSound ******************************* *************************************************************************** InitSound lea Module,A0 lea Module+67328,A1 moveq #0,D1 bra.w Init *************************************************************************** ***************************** DTP_EndSound ******************************** *************************************************************************** EndSound bra.w End *************************************************************************** *************************************************************************** *************************************************************************** ; Music from "Limes and Napoleon" (c) 1989 by EAS Init BRA.L lbC0103D8 End BRA.L lbC010450 BRA.L lbC01043C dc.b 'MUSIC-REPLAY MODULE BY MICHAEL ''THE MAGE'' ' dc.b 'SCHWENDT',0,0 Play MOVEM.L D0-D7/A0-A6,-(SP) BSR.L lbC01004E MOVEM.L (SP)+,D0-D7/A0-A6 RTS lbC01004E LEA lbW010076(PC),A6 TST.W 0(A6) BMI.L lbC01005C RTS lbC01005C MOVE.W 4(A6),-12(A6) ADDI.W #1,2(A6) CMPI.W #6,2(A6) BEQ.L lbC01008C BRA.L lbC010236 lbW010076 dc.w 0 dc.w 0 dc.w 6 dc.w 0 lbL01007E dc.l 0 lbL010082 dc.l 0 lbL010086 dc.l 0 dc.w 0 lbC01008C CLR.W 2(A6) CLR.W 6(A6) LEA lbL010540(PC),A0 MOVEA.L (A0),A0 ADDA.L #$100,A0 lbC0100A0 MOVE.L 8(A6),D1 CLR.L D2 MOVE.B 0(A0,D1.L),D2 BNE.L lbC0100B8 MOVE.L $10(A6),8(A6) bsr.w SongEnd BRA.L lbC0100A0 lbC0100B8 SUBQ.B #1,D2 MULU.W #$500,D2 ADDA.L #$94,A0 ADDA.L D2,A0 ADDA.L 12(A6),A0 LEA $DFF0A0,A1 LEA lbL010378(PC),A2 MOVEQ #3,D5 lbC0100D6 BSR.L lbC01015E ADDA.L #$10,A1 ADDA.L #$18,A2 DBRA D5,lbC0100D6 ; MOVE.W #$12C,D1 ;lbC0100EE DBRA D1,lbC0100EE bsr.w DMAWait ORI.W #$8000,6(A6) MOVE.W 6(A6),$DFF096 LEA $DFF0A0,A1 LEA lbL010378(PC),A2 MOVEQ #3,D5 lbC01010C CMPI.W #1,14(A2) BNE.L lbC01011C MOVE.W 14(A2),4(A1) lbC01011C ADDA.L #$10,A1 ADDA.L #$18,A2 DBRA D5,lbC01010C ADDI.L #$14,12(A6) CMPI.L #$500,12(A6) BNE.L lbC01014C lbC010140 CLR.L 12(A6) ADDI.L #1,8(A6) lbC01014C TST.W $14(A6) BEQ.L lbC01015C CLR.W $14(A6) BRA.L lbC010140 lbC01015C RTS lbC01015E MOVE.B 0(A0),0(A2) MOVE.B 1(A0),1(A2) MOVE.B 2(A0),2(A2) MOVE.B 3(A0),3(A2) MOVE.B 4(A0),$16(A2) TST.B 1(A2) BEQ.L lbC0101DE LEA lbL010478(PC),A3 LEA lbL010540(PC),A4 MOVEA.L (A4),A4 CLR.W D1 MOVE.B 1(A2),D1 SUBQ.B #1,D1 MOVE.B D1,1(A2) MOVE.W D1,D2 LSL.W #2,D1 MOVE.L 0(A3,D1.W),4(A2) LSL.W #3,D2 MOVE.W 0(A4,D2.W),8(A2) CLR.L D3 MOVE.W 4(A4,D2.W),D3 ADD.L 4(A2),D3 MOVE.L D3,10(A2) MOVE.W 2(A4,D2.W),14(A2) CMPI.W #1,2(A4,D2.W) BEQ.L lbC0101D4 MOVE.L D3,4(A2) MOVE.W 2(A4,D2.W),8(A2) lbC0101D4 CLR.W D4 MOVE.B 2(A2),D4 MOVE.W D4,8(A1) lbC0101DE TST.B 0(A2) BEQ.L lbC01022C LEA lbW0104F8(PC),A3 MOVE.B 0(A2),D4 SUBQ.B #1,D4 SUB.B 7(A4,D2.W),D4 MOVE.B D4,$14(A2) LSL.B #1,D4 MOVE.W 0(A3,D4.L),$10(A2) MOVE.B 3(A0),$15(A2) MOVE.B 4(A0),$17(A2) MOVE.W $12(A2),D4 OR.W D4,6(A6) MOVE.W D4,$DFF096 MOVE.L 4(A2),0(A1) MOVE.W 8(A2),4(A1) MOVE.W $10(A2),6(A1) lbC01022C ADDA.L #5,A0 BRA.L lbC010280 lbC010236 LEA $DFF0A0,A1 LEA lbL010378(PC),A2 MOVEQ #3,D5 lbC010242 BSR.L lbC010258 ADDA.L #$10,A1 ADDA.L #$18,A2 DBRA D5,lbC010242 RTS lbC010258 TST.B 3(A2) BEQ.L lbC0102A0 CMPI.B #1,3(A2) BEQ.L lbC0102FC CMPI.B #1,3(A2) BEQ.L lbC01031A CMPI.B #10,3(A2) BEQ.L lbC010338 lbC01027E RTS lbC010280 CMPI.B #13,3(A2) BEQ.L lbC010352 CMPI.B #14,3(A2) BEQ.L lbC01035C CMPI.B #15,3(A2) BEQ.L lbC01033A RTS lbC0102A0 TST.B $17(A2) BEQ.L lbC01027E CMPI.W #1,2(A6) BEQ.S lbC0102D0 CMPI.W #2,2(A6) BEQ.S lbC0102DA CMPI.W #3,2(A6) BEQ.S lbC0102E6 CMPI.W #4,2(A6) BEQ.S lbC0102D0 CMPI.W #5,2(A6) BEQ.S lbC0102DA lbC0102D0 CLR.W D1 MOVE.B $17(A2),D1 LSR.B #4,D1 BRA.S lbC0102E8 lbC0102DA CLR.W D1 MOVE.B $17(A2),D1 ANDI.B #15,D1 BRA.S lbC0102E8 lbC0102E6 CLR.W D1 lbC0102E8 ADD.B $14(A2),D1 LSL.W #1,D1 LEA lbW0104F8(PC),A3 MOVE.W 0(A3,D1.W),D2 MOVE.W D2,6(A1) RTS lbC0102FC CLR.W D1 MOVE.B $17(A2),D1 MOVE.W $10(A2),D2 SUB.W D1,D2 CMPI.W #$71,D2 BPL.L lbC010314 MOVE.W #$71,D2 lbC010314 MOVE.W D2,6(A1) RTS lbC01031A CLR.W D1 MOVE.B $17(A2),D1 MOVE.W $10(A2),D2 ADD.W D1,D2 CMPI.W #$358,D2 BPL.L lbC010332 MOVE.W #$71,D2 lbC010332 MOVE.W D2,6(A1) RTS lbC010338 RTS lbC01033A CLR.W D1 MOVE.B $17(A2),D1 MOVE.W D1,4(A6) CLR.W 2(A6) lbC010348 CLR.B $15(A2) CLR.B $17(A2) RTS lbC010352 MOVE.W #$FFFF,$14(A6) BRA.L lbC010348 lbC01035C MOVE.B $16(A2),D1 ANDI.B #1,D1 ASL.B #1,D1 ANDI.B #$FD,$BFE001 OR.B D1,$BFE001 BRA.L lbC010348 lbL010378 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 1 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 2 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 4 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 8 dc.l 0 lbC0103D8 LEA lbL010540(PC),A2 MOVE.L A0,0(A2) MOVE.L A1,4(A2) MOVE.L D1,-(SP) LEA lbL010540(PC),A0 MOVEA.L 4(A0),A1 MOVEA.L 0(A0),A0 LEA lbL010478(PC),A2 CLR.W D1 MOVE.W #$1E,D4 MOVE.L A1,(A2)+ MOVE.L A1,D3 CLR.W (A1) lbC010402 CLR.L D2 MOVE.W 0(A0,D1.W),D2 LSL.W #1,D2 ADD.L D2,D3 MOVE.L D3,(A2)+ MOVEA.L D3,A1 CLR.W (A1) ADDI.W #8,D1 DBRA D4,lbC010402 MOVE.L (SP)+,D1 LEA lbL010540(PC),A1 MOVEA.L (A1),A1 ADDA.L #$180,A1 CLR.L D2 MOVE.B 0(A1,D1.L),D2 LEA lbL010086(PC),A0 MOVE.L D2,(A0) LEA lbL01007E(PC),A0 MOVE.L lbL010086(PC),(A0) lbC01043C LEA lbW010076(PC),A0 MOVE.W #$FFFF,(A0) CLR.W 2(A0) LEA lbL010082(PC),A0 CLR.L (A0) RTS lbC010450 MOVE.W #15,$DFF096 LEA lbW010076(PC),A0 CLR.W (A0) CLR.W $DFF0A8 CLR.W $DFF0B8 CLR.W $DFF0C8 CLR.W $DFF0D8 RTS lbL010478 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 dc.l 0 lbW0104F8 dc.w $358 dc.w $328 dc.w $2FA dc.w $2D0 dc.w $2A6 dc.w $280 dc.w $25C dc.w $23A dc.w $21A dc.w $1FC dc.w $1E0 dc.w $1C5 dc.w $1AC dc.w $194 dc.w $17D dc.w $168 dc.w $153 dc.w $140 dc.w $12E dc.w $11D dc.w $10D dc.w $FE dc.w $F0 dc.w $E2 dc.w $D6 dc.w $CA dc.w $BE dc.w $B4 dc.w $AA dc.w $A0 dc.w $97 dc.w $8F dc.w $87 dc.w $7F dc.w $78 dc.w $71 lbL010540 dc.l 0 dc.l 0 Module incbin ram:music LN_End