'
' PLAYER DTM sous GFA
'
' (c) 1995 FRONTIER SOFTWARE
'
' Coded by MC JEE
'
'
' Reservation des differents buffers
'
DIM digit|(1000),play|(50000)                   ! Reservation routine
digit%=V:digit|(0)                              ! en DIM 100% free of bug
play%=V:play|(0)
'
IF play%=0
  PRINT "Memory Error..."
  END
ENDIF
'
BLOAD "a:\sources\gfa\binaire.prg",play%                       ! chargement du source asm
'
' On charge le module desir‚ ici...
'
FILESELECT "*.dtm","",module$                   ! selection du module
'
OPEN "I",#1,module$                             ! on ouvre le fichier
len%=LOF(#1)                                    ! on prend sa taille
CLOSE #1
'
DIM module|(len%+300000)
module%=V:module|(0)
'
IF module%=0
  VOID GEMDOS(73,L:play%)
  END
ENDIF
'
PRINT "Loading "+module$+" len :"+STR$(len%)
'
BLOAD module$,module%
'
' Initialise le DSP...
'
a%=XBIOS(113)
a$="a:\sources\gfa\new_calc.lod"+CHR$(0)
ad%=V:a$
b%=XBIOS(108,L:ad%,W:a%,L:digit%)
IF b%=0 THEN
  a%=C:play%(W:0,L:module%,L:module%+len%)
  IF a%<>0 THEN
    PRINT "This module isn't a DTM mod !!!"
  ELSE
    PRINT
    PRINT "Playing..."
    PRINT
    a%=C:play%(W:1)
    PRINT "Hit a key !"
    ~INP(2)                             ! attend la pression d'une touche
    a%=C:play%(W:2)
  ENDIF
ELSE
  PRINT "DSP loading error..."
ENDIF
end:
'
CLEAR
EDIT
