home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: IFF Samples File Conversion / Lowe_IFFSamplesFileConversion.img / MGMANUAL.DOC < prev    next >
Encoding:
Text File  |  1994-09-12  |  19.3 KB  |  569 lines

  1. ******************************************************************************
  2.                   SEGA MEGA DRIVE EDITOR Version 1.6
  3. ******************************************************************************
  4.  
  5. NEW FEATURES IN THIS VERSION
  6.  
  7. 1.6  Release date 12/09/94
  8. --------------------------
  9. 1. 'ALT X' added to convert MEGADRIVE format .SND file to SNES format.
  10. Procedure is:a) Alt L to load in MEGDRIVE file b) Alt X to convert c)Alt S to
  11. Save (use NEW filename to avoid writing over MEGDRIVE file).
  12. N.B. The SNES .SND files do not have 2 SUB banks, so only files with a maximum
  13. of 256 SUBs can be converted.
  14.  
  15.  
  16.  
  17.  
  18. 1.5  Release date 23/08/94
  19. --------------------------
  20. 1. Improved editor clock accuracy.
  21.  
  22. 2. Improved sample playback (much clearer with no music in other channels). A
  23. single sample can now be replayed with no interference from other channels.
  24. A slight 'glitch' will be heard every time a new note is started in another
  25. channel, and bending notes causes a glitch every frame as the frequency is
  26. updated. The worst case is when using mutes in the editor, as each muted
  27. channel has 'note offs' sent every frame. So, for clearest sample replay, use
  28. slower tempo music (avoid semiquaver hihat lines!) and avoid bending notes.
  29.  
  30. 3. New command 'I' (Info toggle) toggles between note names and chanoffset
  31. (useful with music) and note value and length (more useful with effects).
  32.  
  33. 4. 'Play' indicator now in hex as well as decimal.
  34.  
  35. 5. Filename for load/save no longer corrupted after a 'Find'.
  36.  
  37. 6. All downloads to console now verified. Single byte edits are still sent to
  38. the console immediately, but any block edits (C/R/A/ALT A/ALT C/ALT E) are
  39. only updated on the PC. When the next 'Play' command is sent, the console is
  40. updated and the new data verified. This ensures:
  41. a) On-screen editing is always as quick as possible.
  42. b) The data is only sent and verified when next needed. If your ESYS has any
  43. problems downloading you will know straight away (normally you can just try
  44. downloading straight away unless a hardware problem has occurred).
  45.  
  46.  
  47.  
  48.  
  49. 1.4  Release date 08/07/94
  50. --------------------------
  51. 1. Voice limit changed to 128 ($00-$7F)
  52.  
  53. 2. Screen playinfo update much faster.
  54.  
  55. 3. New pan/note length display.
  56.  
  57. 4. All mutes reset to off when starting editor (previously, any muted channels
  58. in the driver would remain muted when re-entering the editor so that the two
  59. could be 'out of sync'.
  60.  
  61. 5. Samples now stop properly at the end of a SUB/TRK or when a rest starts.
  62.  
  63. 6. Keyboard repeat speed forced to maximum for quick movement while editing.
  64.  
  65. 7. GLB VOL added (opcode $9D) same as SNES system.
  66.  
  67. 8. RANDNOTE and RAND DUR added(opcodes $9B and $9C).
  68.  
  69. 9. All Z80BUS references changed to word accesses.
  70.  
  71.  
  72.  
  73.  
  74. 1.3  Release date 30/06/94
  75. ---------------------------
  76. 1. Pause toggle command added to editor (ALT P)
  77.  
  78. 2. ESYS error messages no longer corrupt screen - message holds until any key
  79. is pressed.
  80.  
  81. 3. Maximum .SND file size increased from 25,000 to 40,000 bytes.
  82.  
  83. 4. Editor and controller now call the driver via the JUMPTABLE rather than
  84. directly.
  85.  
  86. 4. Editor Mutes improved (now work properly with chords).
  87.  
  88. 5. Rests now work properly with chords.
  89.  
  90. 6. More problem solving examples at the end of this manual.
  91.  
  92.  
  93.  
  94.  
  95. 1.2  Release date 24/06/94
  96. --------------------------
  97. 1. FM 'hanging on' after sample cured.
  98.  
  99. 2. Pause & Continue added (this even preserves any sample, which will carry on
  100. from the stopped point when Continued). This can be tested using the new
  101. controller pad keys (START is now used to pause/ continue).
  102.  
  103. 3. Fade added (samples stop dead/ FM fade in 1.5 seconds). 'F' key starts fade
  104. in editor.
  105.  
  106. 4. Priorities can only now be set between $00 and $3F (64 levels). This is to
  107. make allow for SUB banks (see below).
  108.  
  109. 5. Two banks of SUB allowed 'a' and 'b' (allowing a maximum of 512) using bit
  110. 6 of priority byte (see below in CALL PARAMETERS). SUB bank plotted in editor.
  111.  
  112. 6. Alt A now checks for max limits (e.g. Trying to add a call $80 will give an
  113. error message). The current limits are:
  114. 128 samples (16 each in 8 banks/ maximum 256k sample size)
  115. 256 voices ($00-$FF)
  116. 512 subs   ($0000-$01FF)
  117. 256 trks   ($00-$FF)
  118. 128 calls  ($00-$7F/ $80=INIT)
  119.  
  120.  
  121.  
  122.  
  123. 1.0  Release date 22/03/94
  124. --------------------------
  125. Initial release.
  126.  
  127.  
  128.  
  129. ------------------------------------------------------------------------------
  130. FUNCTIONS
  131.  
  132. ESC              Escape from disk operation or editor
  133. Alt A            Add a column at the cursor position
  134. Alt C            Compress a music file
  135. Alt D            Download current music file
  136. Alt E            Expand a compressed column to full size
  137. Alt F            Find 1 or 2 hex bytes
  138. Alt L            Load a music file
  139. Alt N            find Next matching hex byte
  140. Alt O            Download ON/OFF
  141. Alt P            Pause toggle
  142. Alt S            Save a music file
  143. Alt T            Time signature (e.g. 6/8)
  144. Alt X            convert MEGADRIVRE to SNES .SND format
  145. F1-F6            Toggle channel Mute
  146. Return/Enter     Play current music track
  147. Spacebar         Stop all music/effects
  148. F                Fade music (1.5 seconds)
  149. H                Half switching (toggle between halves of voice parameters)
  150. I                Info switch (toggle between length/ chanoffset display
  151. K                Keymode (toggle between sharps and flats)
  152.  
  153.  
  154. MOVEMENT
  155.  
  156. Home             Move cursor to top of column
  157. Ctrl Home        Move cursor to beginning of column data
  158. End              Move cursor to bottom of column
  159. Ctrl End         Move cursor to end of column data
  160. Right & Left     Change edit column
  161. Up & Page Up     Move cursor up
  162. Down & Page Down Move cursor down
  163.  
  164. + & Shift +      Channel up
  165. - & Shift -      Channel down
  166.  
  167. [ & ]            Play up/down
  168. P                Play (using setting above)
  169.  
  170.  
  171. EDITING
  172.  
  173. < & >            Up/Down current parameter
  174. Keypad *         Zero current parameter
  175.  
  176. D                Down 1 octave for current parameter
  177. U                Up 1 octave for current parameter
  178. 1/2/4/8          Bitflip current parameter
  179.  
  180. Insert           Insert a byte at current cursor position
  181. Delete           Delete a byte at current cursor position
  182.  
  183.  
  184. BLOCK
  185.  
  186. C                Copy current column into buffer
  187. R                Replace current column with buffer
  188. A                Append buffer to current column
  189.  
  190.  
  191.  
  192. ------------------------------------------------------------------------------
  193. DEMO FUNCTIONS
  194.  
  195. To help test the music files, there is an equate DEMO at the top of the
  196. D-MEGA??.ASM file. Leave this with a value of '1' during sound development
  197. to interface with the music editor (M-MEGA.COM) It also enables the following
  198. test functions using a MEGADRIVE joypad plugged into CONTROL 1.
  199. The joypad keys to use are as follows:
  200.  
  201. UP/DOWN          Increment/Decrement current call number.
  202. LEFT or RIGHT    Start music/effect.
  203. A                Stop all sound calls.
  204. START            Pause/ Continue sounds.
  205. B/C              Increment/Decrement & send new level
  206. RESET            Resets call number=0/level number=0
  207.  
  208.  
  209.  
  210.  
  211. ------------------------------------------------------------------------------
  212. PRODUCING CUSTOMER DRIVER FILES
  213.  
  214. When producing the final file for a customer, two things need to be obtained:
  215.  
  216. 1. A starting ROM (cartridge) address on an $8000 boundary (Samples must start
  217. ona 32k boundary). For the editor this defaults to $8000. Other examples are
  218. $10000,$18000,$20000,$28000 etc.
  219.  
  220. 2. A starting RAM (variables) address which must be even. The current version
  221. of the driver uses 324 bytes
  222.  
  223. When these two values have been obtained, simply enter them into the equates
  224. at the top of D-MEGA??.ASM as shown and run ALLASM.BAT this will produce a
  225. file called D-MEGA??.BIN (this is the standard file used with the editor).
  226. With the DEMO equate set to '1' you will get a huge file which consists of the
  227. demo code, an empty area and then the driver itself. You can use this to check
  228. that everything still works (using M-MEGA as normal) and to find the JUMP
  229. address on the editor screen. This should be supplied to the programmer with
  230. the MEGA01.DOC (the format of PROJECT.DOC is a useful way to do this).
  231.  
  232. The final driver is produced be setting DEMO to '0' and running ALLASM.BAT
  233. This again produces a file called D-MEGA??.BIN, usefully renamed MEGAMUS1.DRV
  234. This single file will then contain the driver, all sample banks and all sound
  235. files.
  236.  
  237.  
  238.  
  239.  
  240. ------------------------------------------------------------------------------
  241. VOICE PARAMETERS (VCE)
  242.  
  243. dtmult           Bits 0-3 (00-0Fh) set Multiple
  244.                  Bits 4-6 (00,10,20,30,40,50,60,70h) set Detune
  245.                  Bit 7    (80h) is not used
  246.  
  247. tlevel           Bits 0-6 (00-7Fh) set Total Level (00=largest/7F=smallest)
  248.                  Bit 7    (80h) is unused
  249.  
  250. ks/atk           Bits 0-4 (00-1Fh) set Attack rate
  251.                  Bit 5    (20h)    is unused
  252.                  Bits 6-7 (00/40/80/C0) set keyboard scaling
  253.  
  254. amdec1           Bits 0-4 (00-1Fh) set the initial decay rate
  255.                  Bits 5/6 (20,40h) are unused
  256.                  Bit 7    (80h)    controls Amplitude Modulation (on/off)
  257.  
  258. decay2           Bits 0-4 (00-1Fh) set the secondary decay rate
  259.                  Bits 5-7 (20,40,80h) are unused
  260.  
  261. susrel           Bits 0-4 (00-1Fh) set the release rate
  262.                  Bits 5-7 (20,40,80h) set the sustain level
  263.  
  264.  
  265. fb/alg           Bits 0-2 (00-07h) set the type of algorithm
  266.                  Bits 3-5 (08,10,20h) set the feedback level
  267.                  Bits 6,7 (40,80h) are unused
  268.  
  269. lrampm           Bits 0-2 (00-07h) set the amount of vibrato
  270.                  Bit 3 (08h is unused
  271.                  Bits 4,5 (10,20h) set the amount of tremolo
  272.                  Bit 6 (40h) sets the right output on
  273.                  Bit 7 (80h) sets the left output on
  274.  
  275. offset           signed Offset to note (e.g. $0C=up 1 octave/$FF=down 1 note)
  276.  
  277. specls           Bit 2 ($04) DrumBend added to every note (but not chords)
  278.                  Bit 3 ($08) Chords (use note1-4 for offset)
  279.                  Bit 6 ($40) Fixed (unaffected by global offsets e.g. for drums)
  280.                  Bit 7 ($80) Sample (Ignored if not in channel 5)
  281.                  80-8Fh = sample from bank0 (maximum 32k)
  282.                  90-9Fh = sample from bank1 (maximum 32k)
  283.                  A0-AFh = sample from bank2 (maximum 32k)
  284.                  B0-BFh = sample from bank3 (maximum 32k)
  285.                  C0-CFh = sample from bank4 (maximum 32k)
  286.                  D0-DFh = sample from bank5 (maximum 32k)
  287.                  E0-EFh = sample from bank6 (maximum 32k)
  288.                  F0-FFh = sample from bank7 (maximum 32k)
  289.  
  290. note1/2/3/4      note1 used by drumbend
  291.                  offset for chords if special $08 used
  292.  
  293.  
  294. SUBROUTINE PARAMETERS (SUB)
  295.  
  296. NAME             NO.      PARAMETERS
  297. ------------------------------------------------------------------------------
  298. note             $00-$5E  ,duration ($00-$7F)
  299.                  $3C = C3 = middle C
  300.                  $00-$4F  ,duration ($00-7F or $FF) sample only
  301.                  duration = $FF waits for the sample to end
  302.                  N.B. sample 'notes' set the sample rate, and do not
  303.                  correspond to actual notes
  304.  
  305.  
  306. VOICENUM         $80      ,number
  307.  
  308.                  The number is:
  309.                  $00-$3F
  310.  
  311.  
  312. REST             $81      ,duration ($00-$7F)
  313.  
  314.                  Starts the 'release' time
  315.  
  316.  
  317. CHNTEMPO         $82      ,tempo ($01-$FF default=$FF)
  318.  
  319.  
  320. GLBTEMPO         $83      ,channelbits,tempo,dummy ($01-$FF default=$FF)
  321.  
  322.                  Sets the channel tempo of all associated channels. This is
  323.                  the value shown as TEMPO on the PC screen.
  324.  
  325.  
  326. SETGATE          $85      ,notelength (default=$FF)
  327.  
  328.                  At the end of the gated duration a note off is sent. This
  329.                  allows staccato notes to be produced. The default value of
  330.                  $FF is reset at the beginning of each new subroutine.
  331.  
  332.  
  333. CHNOFFST         $8A      ,transpose
  334.  
  335.                  Acts similarly to the GLOBOFFS command, but on the current
  336.                  channel only. Channel offsets are independent, and
  337.                  can be used in tandem with a global offset.
  338.  
  339.  
  340. GLBOFFST         $8B      ,channelbits,transpose,dummy (default=$00)
  341.  
  342.                  Adds ($00-$7F) or subtracts ($FF-$80) the transpose setting
  343.                  to all subsequent notes in all associated channels. It is
  344.                  reset to zero on starting any new piece of music, or by
  345.                  resetting the sound driver using the external command INIT
  346.                  (See SNES.DOC).
  347.  
  348.  
  349. CHANVOL          $8C      ,volume ($00-$FF default=$FF)
  350.  
  351.                  CHANVOL defaults to $FF when a new call is started, and
  352.                  affects all subsequent notes until another  CHANVOL command
  353.                  is issued.
  354.  
  355.  
  356. BEND             $92      ,speed,dummy,dummy
  357.  
  358.                  Starting from the next note, the pitch will bend up (speed
  359.                  $00-$7F) or down (speed $FF-$80) from the note value for the
  360.                  duration of the note. BEND is cancelled automatically at the
  361.                  start of the following note.
  362.  
  363.  
  364. RANDNOTE         $9B      ,and mask ($00-$FF default=$00=Off)
  365.  
  366.                  All following note pairs will have a random offset added to
  367.                  the normal note with a value set by the and mask. The default
  368.                  value of $00 is reset at the beginning of each new
  369.                  subroutine.
  370.  
  371.  
  372. RAND DUR         $9C      ,and mask ($00-$FF default=$00=Off)
  373.  
  374.                  All following note pairs will have a random duration added to
  375.                  the normal duration with a value set by the and mask.
  376.                  e.g. mask=$07 random added = 0,1,2,3,4,5,6 or 7
  377.                       mask=$04 random added = 0 or 4 ('4' bit randomly set)
  378.                  The defualt value of $00 is reset at the start of each new
  379.                  subroutine.
  380.  
  381.  
  382. GLB VOL          $9D      ,channelbits,volume,dummy ($00-$FF default=$FF)
  383.  
  384.                  Sets a master volume for each associated channel, from $FF
  385.                  (full) to $00 (off). This is useful for balancing music
  386.                  levels against effects without altering the music balance.
  387.  
  388.  
  389. END              $FF
  390.                  Indicates the final byte of a subroutine.
  391.  
  392.  
  393.  
  394.  
  395. TRK PARAMETERS
  396.  
  397. BYTE 1              BYTE 2              DETAILS
  398.  
  399. 00-3F no. of times  00-7F sequence no.  normal subroutine pair
  400.  
  401.  
  402. 40    loop end      -                   use only after loop start
  403.  
  404.  
  405. 41-7F loop start    -                   e.g. 46 = loop 6 times
  406.  
  407.  
  408. FC    call          00-FE call no.      start this call next
  409.  
  410.  
  411. FD    link          00-7F track no.     link to this track next
  412.  
  413.  
  414. FE    end           00    (dummy)       end in this channel
  415.  
  416.  
  417. FF    loop channel  00-7F loop point    loop channel to any step
  418.                                         e.g. FF/02=loop to step 02
  419.  
  420.  
  421.  
  422.  
  423. CALL PARAMETERS
  424.  
  425. prior            priority setting $00 (highest) to $3F (lowest)
  426.                  bit 6 set ($40) forces all SUB calls to bank b
  427.                  (All SUBs used by this call whether from TRK or
  428.                  direct call to SUB will be in the same bank)
  429.                  bit 7 set ($80) forces direct call to SUB
  430.  
  431. 0-7              TRK used in this channel (prior less than $80)
  432.                  SUB used by this channel (prior greater than $80)
  433.  
  434.  
  435.  
  436.  
  437. NOTE VALUES
  438.  
  439. NAME             NORMAL         DOTTED         DOUBLE DOT     TRIPLET
  440.  
  441. Semibreve        30h            48h            54h            20h
  442.  
  443. Minim            18h            24h            2Ah            10h
  444.  
  445. Crotchet         0Ch            12h            15h            08h
  446.  
  447. Quaver           06h            09h            -              04h
  448.  
  449. Semiquaver       03h            -              -              02h
  450.  
  451. Demisemiquaver   2/2/1/1        -              -              01h
  452.  
  453.  
  454.  
  455.  
  456. ------------------------------------------------------------------------------
  457. MEGADRIVE MUSIC PROBLEM SOLVING
  458. ------------------------------------------------------------------------------
  459.  
  460. PROBLEM 1:
  461. Editor 'locks up' when first run, or shows blanks where JUMP and MUSIC should
  462. be.
  463.  
  464. REASON:
  465. Megadrive code not properly initialised.
  466.  
  467. CURE:
  468. Exit editor and use S-MEGA to re-send driver to Megadrive. Press RESET when
  469. prompted and then wait until SEGA credit screen disappears. Then restart
  470. editor. If JUMP and MUSIC show a value then the Megadrive code is running OK.
  471.  
  472.  
  473.  
  474. PROBLEM 2:
  475. Editor locks up during intensive editing e.g. multiple deletion of many bytes.
  476.  
  477. REASON:
  478. ESYS hardware has 'fallen over'.
  479.  
  480. CURE:
  481. Switch off Megadrive & then switch on again - this will normally clear the
  482. blockage, leaving the latest music data intact on the editing screen. Use
  483. Alt D to download to ensure that what is on the screen is also in the console.
  484.  
  485.  
  486.  
  487. PROBLEM 3:
  488. On entering the editor, an error 'COMMS not found'.
  489.  
  490. REASON:
  491. Normally the Megadrive has not been switched on, but sometimes this could be
  492. caused by a faulty lead between the PC and ESYS.
  493.  
  494. CURE:
  495. Exit the editor, switch on the Megadrive and wait for initialisation, then re-
  496. enter the editor.
  497.  
  498.  
  499.  
  500. PROBLEM 4:
  501. Pressing the spacebar in the editor doesn't stop the sound properly.
  502.  
  503. REASON:
  504. Voice 00 is used as 'silence'. If this is set other than the default values
  505. (see BLANK.SND) then it will not work correctly.
  506.  
  507. CURE:
  508. Always leave Voice 00 with all parameters exactly like that of BLANK.SND
  509.  
  510.  
  511.  
  512. PROBLEM 5:
  513. The editor shows many many SUB parameters as 'unused'.
  514.  
  515. REASON:
  516. To maintain compatibility with SNES .SND files, parameters like panslide or
  517. echo are read by the driver as either 'unused2' or 'unused4'. This means that
  518. the appropriate 2 or 4 bytes are read by the Megadrive driver, but ignored as
  519. actual values. You can therefore take a SNES file and simply ignore any
  520. parameters that are not used by the Megadrive (it beats stripping out all the
  521. extras by hand!)
  522.  
  523. CURE:
  524. None is needed, but you can remove the extras if you want to be tidy.
  525.  
  526.  
  527.  
  528. PROBLEM 6:
  529. Converted SNES .SND files run slowly on the Megadrive.
  530.  
  531. REASON:
  532. Tempo commands have different values between the two formats.
  533.  
  534. CURE:
  535. After converting a SNES .SND file, simply place the cursor at the beginning of
  536. SUB00 and use Alt F to search for '82' from beginning to end, and then the
  537. same for '83' (Globtempo). Whenever a value is found, multiply the tempo by
  538. 1.265 e.g. SNES tempo=$7A becomes MEGA tempo=$9A.
  539.  
  540.  
  541.  
  542. PROBLEM 7:
  543. FM notes 'hang on' when a sound call has finished.
  544.  
  545. REASON:
  546. The VCE parameter 'susrel' uses $00-$1F to set the release time once a 'key
  547. off' has occurred. Normally another note comes along and overrides this.
  548.  
  549. CURE:
  550. If you don't want a long release at the end of a sound call set a short
  551. release time e.g. $1F. Set all release times to $1F except where specifically
  552. needed otherwise.
  553.  
  554.  
  555.  
  556. PROBLEM 8:
  557. Muting a channel from the editor leaves a decaying or hanging note.
  558.  
  559. REASON:
  560. The Mutes work by sending a rest immediately and then ignoring further notes
  561. until the mute is removed. This means that the current note will use the
  562. current voice's release time to fade away. If the release rate has been set in
  563. the voice as '00' then this note will hang indefinitely.
  564.  
  565. CURE:
  566. Set all release times to $1F except where specifically needed otherwise. This
  567. will ensure 'instant' mutes!
  568.  
  569.