Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.12 KB | None | 0 0
  1. General Pointer List: 0F0000 (JE)
  2. Music Pointer List: 0F0116 (JE)
  3. SFX Pointer List: 0F93E4 (JE)
  4. Mod. Pointer List: 0F002C (JE)
  5. PSG Pointer List: 0F004E (JE)
  6. Z80 DAC Driver Offset: 0FACC8 (JE)
  7. DAC Pointer Table: 0FAE5E (JE)
  8. Pan Animation List: 0F06CC (JE)
  9. Sound RAM: C000 (68k RAM)
  10.  
  11.  
  12. DAC Table
  13. ---------
  14. DAC List Format: (all little endian values)
  15. 2 bytes - Data Length
  16. 1 byte - Pitch
  17. 2 bytes - Start Offset (relative to entry offset)
  18. -> 5 bytes
  19.  
  20. The DAC pitch calculation is different compared to other SMPS drivers.
  21. Every loop, the pitch value gets added to a counter. On overflow, a sample is processed.
  22. So high pitch values mean a high frequency.
  23.  
  24. The DAC driver also is able to do 2-channel mixing.
  25.  
  26.  
  27. Notes:
  28. - Song 0E uses the data of song 01.
  29. - The DAC driver knows 3 "channels".
  30. SMPS notes 81-90 get sent to BGM channel 1. (Z80 RAM 1FFC/FD)
  31. SMPS notes 91-A0 get sent to BGM channel 2. (Z80 RAM 1FFE/FF)
  32. SMPS notes A1-B0 get sent to both BGM channels. (and so they are twice as loud)
  33. DAC SFX get sent to their own channel and overridde BGM channel 2. (Z80 RAM 1FFA/B)
  34.  
  35. The DAC driver ANDs BGM sounds with 0F before playing them, so 81 = 91 = A1.
  36. This isn't done with SFX sounds, because there are valid SFX sounds from 88 to 92.
  37. - The Sound Test -> Sound ID list locations are:
  38. BGM: 0154A4 (JE)
  39. SE: 0154BE (JE)
  40. - The Sound RAM begins at C000. (68k RAM)
  41. - There are a few special coordination flags. There is also a special DAC mode, where it reads 2 notes (one for each channel)
  42. E5 - set DAC channel to 2-note mode (temporarily, disabled after the reading the note)
  43. E9 - set DAC channel to 2-note mode (permanently)
  44. ED - turn DAC channel's to 2-note mode off
  45. EE vv oo oo - Conditional Jump (condition is true when vv == SndRAM+0Eh)
  46. F1 - sets TrkRAM+08h = SndRAM+32h
  47. F4 - sets SndRAM+32h = TrkRAM+08h and adds a random value to TrkRAM+08h (The random value can be 01..0F or F0.)
  48. FF 01 xx [xx] - pauses and resumes music, but seems to be able to fade it in/out, too
  49. - SFX CD (sound test SE 45) uses command F1/F4
  50. - Music 99 (sound test BGM 24) uses command E9/ED
  51.  
  52. ; --- Golden Axe III SMPS Command Definition ---
  53. ; modified SMPS 68k Type 2
  54.  
  55. ;Flag Type SubType Len JmpOfs
  56. [Main]
  57. E0 PANAFMS PAFMS_PAN 02
  58. E1 DETUNE 02
  59. E2 SET_COMM 02
  60. E3 TRK_END TEND_MUTE 01
  61. E4 PAN_ANIM 82
  62. E5 DAC_GAXE3 GA3_2NOTE_TEMP 01 ; enable 2-note DAC mode (temporarily)
  63. E6 VOLUME VOL_NN_FM 02
  64. E7 HOLD 01
  65. E8 NOTE_STOP NSTOP_NORMAL 02
  66. E9 DAC_GAXE3 GA3_2NOTE_PERM 01 ; enable 2-note DAC mode (permanently)
  67. EA TEMPO TEMPO_SET 02
  68. EB SND_CMD 02
  69. EC VOLUME VOL_NN_PSG 02
  70. ED DAC_GAXE3 GA3_2NOTE_OFF 01 ; disable 2-note DAC mode
  71. EE COND_JUMP CJMP_EQ 04 02 ; conditional jump (jump if C00E == parameter)
  72. EF INSTRUMENT INS_N_FM 02
  73. F0 MOD_SETUP 05
  74. F1 IGNORE 01 ; set Transpose value from SndRAM+032
  75. F2 TRK_END TEND_STD 01
  76. F3 PSG_NOISE PNOIS_SET 02
  77. F4 IGNORE 01 ; save Transpose value to SndRAM+032, then add a random value (F0, 01..0F)
  78. F5 INSTRUMENT INS_N_PSG 02
  79. F6 GOTO 03 01
  80. F7 LOOP 05 03
  81. F8 GOSUB 03 01
  82. F9 RETURN 01
  83. FA TICK_MULT TMULT_CUR 02
  84. FB TRANSPOSE TRNSP_ADD 02
  85. FC MOD_SET MODS_ON 01
  86. FD MOD_SET MODS_OFF 01
  87. FE SPC_FM3 05
  88. FF META_CF 01
  89.  
  90. [Meta]
  91. 00 SSG_EG SEG_FULLATK 05
  92. 01 MUS_PAUSE MUSP_68K 82 ; Pause/Resume Music, Note: if param is 81-FF, length is 03
  93. 02 TICK_MULT TMULT_ALL 02
  94.  
  95. ; --- Golden Axe III Drum Definition ---
  96.  
  97. [Main]
  98. DrumMode = Normal
  99. DrumIDBase = 81 ; Note: DrumID 80 will result in -1 and stop the DAC sound.
  100.  
  101. ; Note: "Chn" is a bitmask, so 01 = channel 1, 02 = channel 2, 03 = channel 1+2
  102. ; If the value is 00 or omitted, channel 1 is used.
  103. ; The Chn value is only used by DAC drums.
  104. [Drums]
  105. ;Note Type DrumID Pitch Chn
  106. 80..8F DAC 80 01
  107. 90..9F DAC 80 02
  108. A0..AF DAC 80 03
  109. ; not used by any SMPS, but for completeness:
  110. B0..BF DAC 80 03
  111. C0..CF DAC 80 01
  112. D0..DF DAC 80 02
  113.  
  114. ; --- Golden Axe III Driver Definition ---
  115. ; modified SMPS 68k Type 2
  116.  
  117. [Settings]
  118. DefTimingMode = 00
  119. LockTimingMode = True
  120.  
  121. [Main]
  122. PtrFmt = 68k
  123. InsMode = Default
  124. ;FMChnOrder = 16 0 1 2 4 5 6
  125. TempoMode = Tout+Oflw ; 00-7F - Timeout, 80-FF - Overflow
  126. Tempo1Tick = DoTempo
  127. FMBaseNote = B
  128. FMBaseOctave = 0
  129. DetuneOctWrap = False
  130. NoteOnPrevent = Rest
  131. DelayFreq = Reset
  132. ModAlgo = 68k
  133. EnvMult = 68k
  134. VolMode = Algo
  135. FMFreqs = Def_68k
  136. PSGFreqs = Def_68k
  137. FM3Freqs = $000 $180 $1F4 $260
  138.  
  139. FadeMode = Z80 ; fits better than the 68k mode
  140. ; algorithm: FadeCnt += FadeSpeed [$30], execute on overflow
  141. ; Only a few tracks are updated per execution. Every track is updated after 4 steps.
  142. ; FM volume: ChnVol + FadeVol
  143. ; PSG volume: ChnVol + FadeVol/8 + 2
  144. FadeOutSteps = $0C ; $30 / 4
  145. FadeOutDelay = $15 ; $100 / $30 * 4
  146. FadeOutVolAddFM = 4
  147. FadeOutVolAddPSG = 1 ; actually 0.5
  148.  
  149. DrumChMode = GAxe3
  150. DACChns = 2
  151. DACVolDiv = 2
  152.  
  153. [EnvelopeCmds]
  154. 80 = RESET
  155. 81 = HOLD
  156. 82 = LOOP
  157. 83 = STOP
  158. 84 = CHG_MULT
  159.  
  160. ; Pan Anim
  161. dc.b $40, $80 ; 0F06D8 (JE)
  162. dc.b $40, $C0, $80 ; 0F06DA (JE)
  163. dc.b $C0, $80, $C0, $40, $00 ; 0F06DD (JE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement