***************************************************** **** "Space Ace" demo music - 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 SA_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Space Ace demo music - 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 " ReadySoft Incorporated",10 dc.b " Presents",10 dc.b " Don Bluth's Space Ace",10 dc.b " demo was created in",10 dc.b " the ReadySoft torture dungeon by:",10 dc.b " David Foster and",10 dc.b " Simon Douglas - programming,",10 dc.b " Jorge Freitas - foregrounds,",10 dc.b " Hugh MacLeod - backgrounds.",10 dc.b 10 dc.b " Programming (c) 1989 ReadySoft, Inc",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,SA_End-SA_Start 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 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 "Space Ace demo Aud0 Interrupt",0,0 even Audio0 dc.l 0 *************************************************************************** ***************************** DTP_StopInt ********************************* *************************************************************************** StopInt lea $DFF000,A0 move.w #3,$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 "Space Ace" demo (c) 1989 by ReadySoft ; MOVE.W #$40,$DFF0A8 ; MOVE.W #$40,$DFF0B8 ; MOVE.W #$1000,$DFF0A4 ; MOVE.W #$1000,$DFF0B4 ; MOVE.W #$FF,$DFF09E ; LEA $454,A0 ; MOVE.L (A0),$468 ; ADDI.L #$1400A,(A0) ; LEA $458,A0 ; MOVE.L (A0),$472 ; BEQ.S lbC00057C ; ADDI.L #$1400A,(A0) ;lbC00057C LEA $434,A0 ; MOVEQ #3,D0 ; MOVEQ #0,D2 ;lbC000584 MOVEA.L (A0)+,A1 ; MOVE.W #$A4F,D1 ;lbC00058A MOVE.L D2,(A1)+ ; DBRA D1,lbC00058A ; DBRA D0,lbC000584 ; MOVE.B #1,$4AA ; MOVE.W #$13E,D1 ; MOVE.W #$F6,D2 ; TST.B $45D ; BEQ.S lbC0005B0 ; MOVE.W #$141,D1 ; MOVE.W #$F8,D2 ;lbC0005B0 MOVE.W #3,$DFF096 ; MOVEA.L $454,A6 ; TST.B $45E ; BNE.S lbC0005DE ; MOVE.W D1,$DFF0A6 ; MOVE.W D1,$DFF0B6 ; BCHG #7,$45C ; BEQ.S lbC0005EA ; MOVE.L $458,D0 ; BEQ.S lbC0005EA ; MOVEA.L D0,A6 ;lbC0005DE MOVE.W D2,$DFF0A6 ; MOVE.W D2,$DFF0B6 ;lbC0005EA MOVEQ #0,D0 ; MOVE.B (A6)+,D0 ; MOVE.L A6,$476 ; ADDA.L D0,A6 ; CLR.L $46C ; CLR.W $470 ; BSR.L lbC000874 ;lbC000874 LEA $DFF000,A0 ;lbC00087A BTST #6,2(A0) ; BNE.S lbC00087A ; MOVE.W #$9C0,$40(A0) ; MOVEA.L $460,A2 ; BCHG #7,$470 ; LEA $46C,A3 ; MOVEA.L (A3),A1 ; BEQ.S lbC0008C0 ; MOVE.W #$49C0,$40(A0) ; MOVEQ #0,D0 ; MOVE.W #$2000,D0 ; ADDA.W D0,A2 ; ADD.L D0,(A3) ; CMPA.L #$14000,A1 ; BNE.S lbC0008C0 ; MOVE.W #$80,$9A(A0) ; MOVE.W #3,$96(A0) ; RTS ;lbC0008C0 ADDA.L -4(A3),A1 ; MOVE.L A2,$54(A0) ; MOVE.L A2,$A0(A0) ; MOVE.L A2,$B0(A0) ; MOVE.L #$F0F0F0F0,$72(A0) ; MOVEQ #-1,D0 ; MOVE.L D0,$44(A0) ; MOVEQ #0,D0 ; MOVE.W D0,$42(A0) ; MOVE.W D0,$64(A0) ; MOVE.W D0,$66(A0) ; MOVE.L A1,$50(A0) ; MOVE.W #$1000,$58(A0) ; MOVE.W #$80,$9C(A0) ; MOVE.W #$8003,$96(A0) ; RTS Init lea $DFF000,A6 move.w #$141,D0 move.w D0,$A6(A6) move.w D0,$B6(A6) move.w #$40,$A8(A6) move.w #$40,$B8(A6) move.w #$1000,$A4(A6) move.w #$1000,$B4(A6) lea Buffer1,A1 move.l A1,Buffy_Ptr1 lea 8192(A1),A0 move.l A0,Buffy_Ptr2 move.l A1,$A0(A6) move.l A1,$B0(A6) lea Samples(PC),A0 move.l A0,SMP_Ptr bsr.w ChangeBuffy Copy_1 move.w #2048-1,D2 NextLong1 move.l (A0)+,D0 and.l #$F0F0F0F0,D0 move.l D0,(A1)+ dbf D2,NextLong1 st Mode rts Copy_2 move.w #2048-1,D2 NextLong move.l (A0)+,D0 lsl.l #4,D0 and.l #$F0F0F0F0,D0 move.l D0,(A1)+ dbf D2,NextLong clr.b Mode rts Play lea $DFF000,A6 move.l SMP_Ptr(PC),A0 tst.b Mode bne.b NoFirst lea 8192(A0),A0 cmp.l #'HALF',(A0) bne.b NoHalf move.w #$F8,D0 addq.l #4,A0 bra.b PartTwo NoHalf cmp.l #'WTWT',(A0) bne.b NoRep bsr.w SongEnd lea Samples(PC),A0 move.w #$141,D0 PartTwo move.w D0,$A6(A6) move.w D0,$B6(A6) NoRep move.l A0,SMP_Ptr move.l Buffy_Ptr1(PC),A1 move.l A1,A2 bsr.w Copy_1 bra.b SkipFirst NoFirst move.l Buffy_Ptr1(PC),A1 move.l A1,A2 bsr.w Copy_2 SkipFirst move.l A2,$A0(A6) move.l A2,$B0(A6) ChangeBuffy move.l Buffy_Ptr1(PC),D0 move.l Buffy_Ptr2(PC),D1 exg D0,D1 move.l D0,Buffy_Ptr1 move.l D1,Buffy_Ptr2 rts SMP_Ptr dc.l 0 Buffy_Ptr1 dc.l 0 Buffy_Ptr2 dc.l 0 Mode dc.w 0 Samples incbin ram:Part1 dc.l 'HALF' incbin ram:Part2 dc.l 'WTWT' SA_End Section Buffy,BSS_C Buffer1 ds.b 8192 MoreBuffy ds.b 8192