Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- General Pointer List: 0F0000 (JE)
- Music Pointer List: 0F0116 (JE)
- SFX Pointer List: 0F93E4 (JE)
- Mod. Pointer List: 0F002C (JE)
- PSG Pointer List: 0F004E (JE)
- Z80 DAC Driver Offset: 0FACC8 (JE)
- DAC Pointer Table: 0FAE5E (JE)
- Pan Animation List: 0F06CC (JE)
- Sound RAM: C000 (68k RAM)
- DAC Table
- ---------
- DAC List Format: (all little endian values)
- 2 bytes - Data Length
- 1 byte - Pitch
- 2 bytes - Start Offset (relative to entry offset)
- -> 5 bytes
- The DAC pitch calculation is different compared to other SMPS drivers.
- Every loop, the pitch value gets added to a counter. On overflow, a sample is processed.
- So high pitch values mean a high frequency.
- The DAC driver also is able to do 2-channel mixing.
- Notes:
- - Song 0E uses the data of song 01.
- - The DAC driver knows 3 "channels".
- SMPS notes 81-90 get sent to BGM channel 1. (Z80 RAM 1FFC/FD)
- SMPS notes 91-A0 get sent to BGM channel 2. (Z80 RAM 1FFE/FF)
- SMPS notes A1-B0 get sent to both BGM channels. (and so they are twice as loud)
- DAC SFX get sent to their own channel and overridde BGM channel 2. (Z80 RAM 1FFA/B)
- The DAC driver ANDs BGM sounds with 0F before playing them, so 81 = 91 = A1.
- This isn't done with SFX sounds, because there are valid SFX sounds from 88 to 92.
- - The Sound Test -> Sound ID list locations are:
- BGM: 0154A4 (JE)
- SE: 0154BE (JE)
- - The Sound RAM begins at C000. (68k RAM)
- - There are a few special coordination flags. There is also a special DAC mode, where it reads 2 notes (one for each channel)
- E5 - set DAC channel to 2-note mode (temporarily, disabled after the reading the note)
- E9 - set DAC channel to 2-note mode (permanently)
- ED - turn DAC channel's to 2-note mode off
- EE vv oo oo - Conditional Jump (condition is true when vv == SndRAM+0Eh)
- F1 - sets TrkRAM+08h = SndRAM+32h
- F4 - sets SndRAM+32h = TrkRAM+08h and adds a random value to TrkRAM+08h (The random value can be 01..0F or F0.)
- FF 01 xx [xx] - pauses and resumes music, but seems to be able to fade it in/out, too
- - SFX CD (sound test SE 45) uses command F1/F4
- - Music 99 (sound test BGM 24) uses command E9/ED
- ; --- Golden Axe III SMPS Command Definition ---
- ; modified SMPS 68k Type 2
- ;Flag Type SubType Len JmpOfs
- [Main]
- E0 PANAFMS PAFMS_PAN 02
- E1 DETUNE 02
- E2 SET_COMM 02
- E3 TRK_END TEND_MUTE 01
- E4 PAN_ANIM 82
- E5 DAC_GAXE3 GA3_2NOTE_TEMP 01 ; enable 2-note DAC mode (temporarily)
- E6 VOLUME VOL_NN_FM 02
- E7 HOLD 01
- E8 NOTE_STOP NSTOP_NORMAL 02
- E9 DAC_GAXE3 GA3_2NOTE_PERM 01 ; enable 2-note DAC mode (permanently)
- EA TEMPO TEMPO_SET 02
- EB SND_CMD 02
- EC VOLUME VOL_NN_PSG 02
- ED DAC_GAXE3 GA3_2NOTE_OFF 01 ; disable 2-note DAC mode
- EE COND_JUMP CJMP_EQ 04 02 ; conditional jump (jump if C00E == parameter)
- EF INSTRUMENT INS_N_FM 02
- F0 MOD_SETUP 05
- F1 IGNORE 01 ; set Transpose value from SndRAM+032
- F2 TRK_END TEND_STD 01
- F3 PSG_NOISE PNOIS_SET 02
- F4 IGNORE 01 ; save Transpose value to SndRAM+032, then add a random value (F0, 01..0F)
- F5 INSTRUMENT INS_N_PSG 02
- F6 GOTO 03 01
- F7 LOOP 05 03
- F8 GOSUB 03 01
- F9 RETURN 01
- FA TICK_MULT TMULT_CUR 02
- FB TRANSPOSE TRNSP_ADD 02
- FC MOD_SET MODS_ON 01
- FD MOD_SET MODS_OFF 01
- FE SPC_FM3 05
- FF META_CF 01
- [Meta]
- 00 SSG_EG SEG_FULLATK 05
- 01 MUS_PAUSE MUSP_68K 82 ; Pause/Resume Music, Note: if param is 81-FF, length is 03
- 02 TICK_MULT TMULT_ALL 02
- ; --- Golden Axe III Drum Definition ---
- [Main]
- DrumMode = Normal
- DrumIDBase = 81 ; Note: DrumID 80 will result in -1 and stop the DAC sound.
- ; Note: "Chn" is a bitmask, so 01 = channel 1, 02 = channel 2, 03 = channel 1+2
- ; If the value is 00 or omitted, channel 1 is used.
- ; The Chn value is only used by DAC drums.
- [Drums]
- ;Note Type DrumID Pitch Chn
- 80..8F DAC 80 01
- 90..9F DAC 80 02
- A0..AF DAC 80 03
- ; not used by any SMPS, but for completeness:
- B0..BF DAC 80 03
- C0..CF DAC 80 01
- D0..DF DAC 80 02
- ; --- Golden Axe III Driver Definition ---
- ; modified SMPS 68k Type 2
- [Settings]
- DefTimingMode = 00
- LockTimingMode = True
- [Main]
- PtrFmt = 68k
- InsMode = Default
- ;FMChnOrder = 16 0 1 2 4 5 6
- TempoMode = Tout+Oflw ; 00-7F - Timeout, 80-FF - Overflow
- Tempo1Tick = DoTempo
- FMBaseNote = B
- FMBaseOctave = 0
- DetuneOctWrap = False
- NoteOnPrevent = Rest
- DelayFreq = Reset
- ModAlgo = 68k
- EnvMult = 68k
- VolMode = Algo
- FMFreqs = Def_68k
- PSGFreqs = Def_68k
- FM3Freqs = $000 $180 $1F4 $260
- FadeMode = Z80 ; fits better than the 68k mode
- ; algorithm: FadeCnt += FadeSpeed [$30], execute on overflow
- ; Only a few tracks are updated per execution. Every track is updated after 4 steps.
- ; FM volume: ChnVol + FadeVol
- ; PSG volume: ChnVol + FadeVol/8 + 2
- FadeOutSteps = $0C ; $30 / 4
- FadeOutDelay = $15 ; $100 / $30 * 4
- FadeOutVolAddFM = 4
- FadeOutVolAddPSG = 1 ; actually 0.5
- DrumChMode = GAxe3
- DACChns = 2
- DACVolDiv = 2
- [EnvelopeCmds]
- 80 = RESET
- 81 = HOLD
- 82 = LOOP
- 83 = STOP
- 84 = CHG_MULT
- ; Pan Anim
- dc.b $40, $80 ; 0F06D8 (JE)
- dc.b $40, $C0, $80 ; 0F06DA (JE)
- dc.b $C0, $80, $C0, $40, $00 ; 0F06DD (JE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement