********************************************************* **** "Starray" - 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 ST_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Starray - 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 " STARRAY",10 dc.b 10 dc.b " Concept & Code:",10 dc.b " Erik von Hesse",10 dc.b " Game Graphics:",10 dc.b " Andreas Voigt",10 dc.b " Sound Design & Music:",10 dc.b " Nirto K. Fischer",10 dc.b " Additional Design:",10 dc.b " Thorsten Meyer",10 dc.b 10 dc.b " (c) 1988 by Hidden Treasures & Logotron",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,ST_End-ST_Start dc.l MI_Length,16 dc.l 0 *************************************************************************** ********************************* EP_GetPosNr ***************************** *************************************************************************** GetPosition move.l Position(PC),D0 sub.l #Samples,D0 lsr.l #3,D0 subq.w #1,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 'Starray 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 "Starray" (c) 1988 by Logotron Init lea $DFF000,A0 move.w #$40,$A8(A0) move.w #$40,$B8(A0) move.w #$DF,$A6(A0) move.w #$DF,$B6(A0) lea Samples(PC),A1 move.l (A1),$A0(A0) move.l (A1)+,$B0(A0) move.l (A1)+,D0 move.w D0,$A4(A0) move.w D0,$B4(A0) move.l A1,Position rts Repeat move.l #lbL00044A,Position bsr.w SongEnd Play move.l Position(PC),A1 move.l (A1)+,D0 beq.b Repeat move.l D0,$A0(A0) move.l D0,$B0(A0) move.l (A1)+,D0 move.w D0,$A4(A0) move.w D0,$B4(A0) move.l A1,Position rts Position dc.l 0 ; MOVE.L #$DC00,D0 ; offset ; MOVE.L #$10000,D2 ; size ; MOVE.L #Samp5,D1 ; address ; JSR lbC00049E ; MOVE.L #$1DC00,D0 ; MOVE.L #$4A00,D2 ; MOVE.L #Samp4,D1 ; JSR lbC00049E ; MOVEA.L #lbL000422,A4 ; MOVE.W #$40,$DFF0A8 ; MOVE.W #$DF,$DFF0A6 ; MOVE.W #$40,$DFF0B8 ; MOVE.W #$DF,$DFF0B6 ; MOVE.L #Samp5,$DFF0A0 ; MOVE.L #Samp5,$DFF0B0 ; MOVE.W #$7C9C,$DFF0A4 ; MOVE.W #$7C9C,$DFF0B4 ; MOVE.W #$8003,$DFF096 ; MOVE.L #$22600,D0 ; MOVE.L #Samp3,D1 ; MOVE.L #$F000,D2 ; JSR lbC00049E ; MOVE.W #$80,$DFF09C ;lbC0001AA MOVE.W $DFF01E,D0 ; ANDI.W #$80,D0 ; BEQ.L lbC0001AA ; MOVE.L (A4),$DFF0A0 ; MOVE.L (A4)+,$DFF0B0 ; MOVE.L (A4)+,D0 ; MOVE.W D0,$DFF0A4 ; MOVE.W D0,$DFF0B4 ; MOVE.L #$31600,D0 ; MOVE.L #$70000,D1 ; MOVE.L #$CA00,D2 ; JSR lbC00049E ; MOVE.W #$80,$DFF09C ;lbC0001F2 MOVE.W $DFF01E,D0 ; ANDI.W #$80,D0 ; BEQ.L lbC0001F2 ; MOVE.L (A4),$DFF0A0 ; MOVE.L (A4)+,$DFF0B0 ; MOVE.L (A4)+,D0 ; MOVE.W D0,$DFF0A4 ; MOVE.W D0,$DFF0B4 ; JSR lbC000858 ; MOVE.L #$3E000,D0 ; MOVE.L #Samp2,D1 ; MOVE.L #$1E400,D2 ; JSR lbC00049E ; MOVE.L #$5C400,D0 ; MOVE.L #Samp1,D1 ; MOVE.L #$F200,D2 ; JSR lbC00049E ; JSR lbC000502 ; MOVEA.L A4,A0 ; CLR.W lbW000C60 ;lbC00025E CMPA.L #lbL00049A,A0 ; BNE.L lbC00026E ; MOVEA.L #lbL00044A,A0 ;lbC00026E MOVE.W #$80,$DFF09C ; MOVE.W #$7FFF,D0 ;lbC00027A DBRA D0,lbC00027A ; MOVE.L (A0),$DFF0A0 ; MOVE.L (A0)+,$DFF0B0 ; MOVE.L (A0)+,D0 ; MOVE.W D0,$DFF0A4 ; MOVE.W D0,$DFF0B4 ; ADDQ.W #1,lbW000C60 ; CMPI.W #8,lbW000C60 ; BNE.L lbC0002B4 ; JSR lbC0008DE ; BRA.L lbC0002F8 ;lbC0002B4 CMPI.W #12,lbW000C60 ; BNE.L lbC0002CA ; JSR lbC000926 ; BRA.L lbC0002F8 ;lbC0002CA CMPI.W #$10,lbW000C60 ; BNE.L lbC0002E0 ; JSR lbC00096E ; BRA.L lbC0002F8 ;lbC0002E0 CMPI.W #$14,lbW000C60 ; BNE.L lbC0002F8 ; CLR.W lbW000C60 ; JSR lbC0009B6 ;lbC0002F8 BTST #6,$BFE001 ; BEQ.L lbC000322 ; BTST #7,$BFE001 ; BEQ.L lbC000322 ; MOVE.W $DFF01E,D0 ; ANDI.W #$80,D0 ; BEQ.L lbC0002F8 ; BRA.L lbC00025E ;lbC000322 MOVE.W #$3E,D0 ;lbC000326 MOVE.W D0,$DFF0A8 ; MOVE.W D0,$DFF0B8 ; MOVE.W #$1000,D1 ;lbC000336 DBRA D1,lbC000336 ; SUBQ.W #1,D0 ; BNE.L lbC000326 ; MOVE.W #3,$DFF096 ; MOVE.L #$60DF6,$DFF0A0 ; MOVE.L #$60DF6,$DFF0B0 ; MOVE.W #5,$DFF0A4 ; MOVE.W #5,$DFF0B4 ; CLR.W $DFF0A8 ; CLR.W $DFF0B8 Samples dc.l Samp5 dc.l $7C9C lbL000422 dc.l Samp4 dc.l $1FA4 dc.l Samp3 dc.l $77F4 dc.l Samp3 dc.l $77F4 dc.l Samp2 dc.l $F15B dc.l Samp2 dc.l $F15B lbL00044A dc.l Samp3 dc.l $77F4 dc.l Samp3 dc.l $77F4 dc.l Samp3 dc.l $77F4 dc.l Samp3 dc.l $77F4 dc.l Samp2 dc.l $F15B dc.l Samp2 dc.l $F15B dc.l Samp1 dc.l $7899 dc.l Samp1 dc.l $7899 dc.l Samp1 dc.l $7899 dc.l Samp1 dc.l $7899 lbL00049A dc.l 0 Samp1 incbin ram:Samp1 Samp2 incbin ram:Samp2 Samp3 incbin ram:Samp3 Samp4 incbin ram:Samp4 Samp5 incbin ram:Samp5 ST_End