***************************************************** **** "Gauntlet II" - 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 GL_Start PLAYERHEADER PlayerTagArray dc.b "$VER: Gauntlet II - 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 " MINDSCAPE",10 dc.b " presents",10 dc.b " GAUNTLET II",10 dc.b 10 dc.b " Game Programmer:",10 dc.b " Richard Costello",10 dc.b " Video Graphics:",10 dc.b " Kevin Bulmer",10 dc.b " Special Thanks To:",10 dc.b " Bill Allen",10 dc.b " Stomper",10 dc.b " & Mugsie",10 dc.b 10 dc.b " (c) 1986 ATARI",10 dc.b " (c) 1988 TENGEN",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,GL_End-GL_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 'Gauntlet II 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 *************************************************************************** *************************************************************************** *************************************************************************** ; Title music from "Gauntlet 2" (c) 1988 by Atari/Tengen/Mindscape ;lbC000FFC MOVE.L #$39700,$A0(A6) ; MOVE.L #$39700,$B0(A6) ; MOVE.W #$EC10,$A4(A6) ; MOVE.W #$EC10,$B4(A6) ; MOVE.W #$40,$A8(A6) ; MOVE.W #$40,$B8(A6) ; MOVE.W #$2D9,$A6(A6) ; MOVE.W #$2D9,$B6(A6) ; RTS ;lbC001032 CMPI.W #$80,D7 ; BNE.S lbC001052 ; MOVE.W #$80,$9A(A6) ; MOVE.B #1,lbB0001FA ; MOVE.W #$8001,$96(A6) ; MOVE.W #$8080,$9A(A6) ;lbC001052 CMPI.W #$7A,D7 ; BNE.S lbC001072 ; MOVE.W #$100,$9A(A6) ; MOVE.B #1,lbB0001FB ; MOVE.W #$8002,$96(A6) ; MOVE.W #$8100,$9A(A6) ;lbC001072 RTS Init lea $DFF000,A6 move.w #$2D9,D0 move.w D0,$A6(A6) move.w D0,$B6(A6) lea Empty(PC),A0 move.l A0,SMP_Ptr move.l A0,$A0(A6) lea -584(A0),A0 move.l A0,$B0(A6) move.w #$40,$A8(A6) move.w #$40,$B8(A6) move.w #$A00,$A4(A6) move.w #$A00,$B4(A6) rts Play lea $DFF000,A6 move.l SMP_Ptr(PC),A0 lea 5120(A0),A0 cmp.l #'WTWT',(A0) bne.b NoRep lea Empty(PC),A0 bsr.w SongEnd NoRep move.l A0,SMP_Ptr move.w #$A00,$A4(A6) move.w #$A00,$B4(A6) move.l A0,$A0(A6) lea -584(A0),A0 move.l A0,$B0(A6) rts SMP_Ptr dc.l 0 ; clock = 3546895 (PAL) ; time = 0.2*6=0.12 sec ; period = $2D9 (729) ; delay = (clock * time/period) ; delay = 583.85 Delay ds.b 584 Empty ds.b 1016 incbin ram:Sample ds.b 1000 dc.l 'WTWT' GL_End