home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Applications / Musique / ays-t23d.lha / THX-Replayer.doc < prev    next >
Text File  |  1998-04-11  |  6KB  |  152 lines

  1. ;-------------------T-----------T-----------------T---------T---------------
  2.  
  3. ;=============================================================================
  4. ;=============================================================================
  5. ;===================== t h x - s o u n d   s y s t e m =======================
  6. ;=============================================================================
  7. ;================= b i n a r y - r e p l a y e r   d o c u ===================
  8. ;=============================================================================
  9. ;=============================================================================
  10. ;========================= v e r s i o n   2 . 3 d ===========================
  11. ;=============================================================================
  12. ;=============================================================================
  13.  
  14. - Note that 68000er DeliPlayer as Noteplayer is NOT possible!
  15.  
  16. How to use the replayer in my own productions ??
  17.  - Here we go (take a look at the example source!-and contact me!)
  18.  
  19. 1. Include the "THX-Offsets.I" file
  20. 2. Include the "THX-Replayer.BIN" file (100% pc-relative) <needn't be chip>
  21. 3. Call the following procedures as described:
  22.    for example: jsr thxReplayer+thxInitCIA
  23.                 jsr thxReplayer+thxInitPlayer
  24.                 jsr thxReplayer+thxInitModule (or BSR if in the same section!)
  25. 4. To access e.g. the volume etc. (the thx_p... variables as seen in the
  26.    "THX-Offsets.I" file), proceed like this: (access them by byte!)
  27.  
  28.  
  29. ;---- thxVoiceControl
  30. ;thxVoiceControl
  31. ;               ;is easily possibly, but I'm outta time, just contact me AFTER
  32. ;               ;Mekka & Symposium '98... -> Dexter.Abyss@iName !!
  33.  
  34.  
  35. ;---- thxGetSubsongs
  36. ;thxGetSubsongs move.l      a6,-(sp)
  37. ;               move.l      thxReplayer+thxBSS_P(pc),a6  ;get ptr to
  38. ;               moveq       #0,d0                        ;players public
  39. ;               move.b      thx_pSubsongs(a6),d0         ;memory
  40. ;               move.l      (sp)+,a6                     ;and get nr. of
  41. ;               RTS                                      ;subsongs from there
  42.  
  43.    You may then also set the thx_pPlaying flag to non-0 if the immediate play
  44.    value was set to non-zero in thxInitSubSong or you may set the volume, get
  45.    your external timing (if you read out the ext. timing value, be sure to
  46.    clear the BYTE after reading it!) or see if the song has reached its end.
  47.  
  48. 5. That's it, now some technical information!
  49.  
  50.  
  51.  
  52. ;            ----==== a Little Function-Overview ====----
  53.  
  54.  
  55. ; All Inputs are LONGWORDS, please!
  56.  
  57.  
  58. ;---- thxInitCIA
  59. ;
  60. ; Inputs: a0: pointer to your cia-interrupt (return with RTS please!)
  61. ;             - or -
  62. ;  *NEW*  a0: pointer to a routine that sets the cia-timer (tempo is
  63. ;             given you over in d0.w, which will then be whether 28419/2,
  64. ;             28419/4, 28419/6 or 28419/8)  - if using your own cia (d0=1)
  65. ;             You need NOT save the registers here!
  66. ;         d0: 0 for system-friendly level 1 i think (called by exec.cause)
  67. ;               others are NOT YET included!
  68. ;    *NEW*    1 for using your own cia - pass a tempo_set routine in a0 then
  69. ;
  70. ; Output: d0:  0 for success
  71. ;             -1 for error (so don't call thxKillCIA then later!)
  72. ;
  73. : Function: will try to get one of amiga's cia-interrupts (system-method!)
  74. ;   *NEW*   but now also supports multiple-speed modules using your own cia!
  75.  
  76.  
  77. ;---- thxInitPlayer
  78. ;
  79. ; Inputs: a0: pointer to 412150 bytes of public (fast) memory
  80. ;         a1: pointer to   2560 bytes of explicit chip memory
  81. ;      or null-pointer(s) (sub.l a0,a0 and/or sub.l a1,a1) for auto-allocation!
  82. ; *NEW*   d0: zero (0) for LoadWavesFile if possible (should normally be used)!
  83. ;             one (1) for ExplicitWavesPrecalcing
  84. ; *NEW*   d1: zero (0) for Filters (standard setting!)
  85. ;             one (1) for No Filters (use only if playing THXv1.xx modules!
  86. ;
  87. ; Output: d0: non-zero (-1) for failure, zero (0) for no error!
  88. ;
  89. : Function: will precalc the few waveforms and (if a0/a1 = 0) allocate
  90. ;           player's memory-blocks (auto-allocation is recommended!)
  91. ;           This function will also precalc the filter-waves, so
  92. ;           it may take some time depending on your cpu power (or if
  93. ;           possible loads it from your hdd)
  94. ; *NEW*     This function now also turns the audiohardware on.
  95.  
  96.  
  97. ;---- thxInitModule
  98. ;
  99. ; Inputs: a0: pointer to a THX-Module
  100. ;
  101. ; Output: d0: non-zero (-1) for failure, zero (0) for no error!
  102. ; *NEW*   d0: minus-two (-2) for 2x/3x/4x-speed module failed due no cia
  103. ;             was initialized (2x/3x/4x only works with cia!)
  104. ; *NEW*   d1: number of subsongs
  105. ;
  106. ; Function: initializes the given THX-Module
  107. ;
  108. ; Bugs: No output value WAS returned until version v2.0 - Sorry
  109.  
  110.  
  111. ;---- thxInitSubSong
  112. ;
  113. ; Inputs: d0: subsong number (0 means main tune, 1 means first subsong etc.)
  114. ;         d1: immediate play (zero means immediately play when thxInterrupt is
  115. ;                             called, non-zero means wait until thx_pPlaying
  116. ;                             flag is set to non-zero) normally use 0 here!
  117. ;
  118. ; Function: initializes the given subsong
  119.  
  120.  
  121. ;---- thxInterrupt
  122. ;
  123. ; Function: plays 1/50 of a second, so you'll have to call it every 1/50 sec.!
  124. ;           If possible, use thxInitCIA (with thx's or your own cia), as you
  125. ;           can't play 2x/3x/4x-speed tunes with vbl-irq !!!
  126.  
  127.  
  128. ;---- thxStopSong
  129. ;
  130. ; Function: stops the current playing song.
  131.  
  132.  
  133. ;---- thxKillPlayer
  134. ;
  135. ; Function: shuts down the audio-channels and deallocates the two memory
  136. ;           blocks as long as they were allocated by thxInitPlayer itsself!
  137. ; *BUG*     did not shut down the audio-channels before v2.1n
  138. ; *NEW*     now shuts down the audio-channels!
  139.  
  140. ;---- thxKillCIA
  141. ;
  142. ; Function: Removes the cia-interrupt from system, call only if you're
  143. ;           sure it was initialized correctly!! (thxInitCIA returns 0/-1)
  144. ;   *NEW*   Please do also call thxKillCIA if you were using your own CIA!
  145.  
  146.  
  147.  
  148. ; If ya wanna e.g. set the volume, contact me, i'll tell you !
  149. ; If ya need a shorter replayer for your production, contact me, i'll do!
  150.  
  151. ; Take a look at the example source!!        - dexter/abyss! signing off!
  152.