We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

H-Sound Engine: Difference between revisions

From SnesLab
Jump to: navigation, search
(Create Sol's H-Sound engine page)
 
(Add VCMD identification)
Line 41: Line 41:


==Voice Command Format==
==Voice Command Format==
''TODO VCMD format''
{| class="wikitable sortable"
|-
! VCMD ID !! Description !! Arguments
|-
|<tt>$00-$60</tt> || Note Length ||
|-
|<tt>$61-$71</tt> || Invalid Velocity ||
|-
|<tt>$72-$79</tt> || Velocity ||
|-
|<tt>$7A-$7F</tt> || Quantization ||
|-
|<tt>$80-$C7</tt> || Note ||
|-
|<tt>$C8</tt> || Instant Slide To Note ||
|-
|<tt>$C9</tt> || Tie ||
|-
|<tt>$CA-$DF</tt> || Drumkit ||
|-
|<tt>$E0</tt> || Instrument || <tt>xx</tt>
|-
|<tt>$E1</tt> || Panning || <tt>xx</tt>
|-
|<tt>$E2</tt> || Note Volume || <tt>xx</tt>
|-
|<tt>$E3</tt> || NOP || <tt>xx</tt>
|-
|<tt>$E4</tt> || Pitch Offset || <tt>xx</tt>
|-
|<tt>$E5</tt> || Absolute Transposition || <tt>xx</tt>
|-
|<tt>$E6</tt> || Global Absolute Transposition || <tt>xx</tt>
|-
|<tt>$E7</tt> || Loop Section Start ||
|-
|<tt>$E8</tt> || Loop Section End || <tt>xx</tt>
|-
|<tt>$E9</tt> || Tempo || <tt>xx</tt>
|-
|<tt>$EA</tt> || NOP ||
|-
|<tt>$EB</tt> || Activate Drumkit Mode ||
|-
|<tt>$EC</tt> || Echo On ||
|-
|<tt>$ED</tt> || Echo Off ||
|-
|<tt>$EE</tt> || ADSR || <tt>xx yy</tt>
|-
|<tt>$EF</tt> || GAIN || <tt>xx</tt>
|-
|<tt>$F0-$F1</tt> || NOP ||
|-
|<tt>$F2</tt> || Jump || <tt>xx xx</tt>
|-
|<tt>$F3</tt> || Noise Clock || <tt>xx</tt>
|-
|<tt>$F4</tt> || Noise On ||
|-
|<tt>$F5</tt> || Noise Off ||
|-
|<tt>$F6</tt> || Key Off On Quantization Elapse Enable ||
|-
|<tt>$F7</tt> || Key Off On Quantization Elapse Disable ||
|-
|<tt>$F8</tt> || FIR Coefficient Table ID || <tt>xx</tt>
|-
|<tt>$F9</tt> || Echo Volume || <tt>xx</tt>
|-
|<tt>$FA</tt> || Echo Feedback || <tt>xx</tt>
|-
|<tt>$FB-$FD</tt> || NOP ||
|-
|<tt>$FE</tt> || End of Song ||
|-
|<tt>$FF</tt> || NOP ||
|}
''TODO VCMD documentation''


[[Category:SPC Sound Engines]]
[[Category:SPC Sound Engines]]

Revision as of 19:51, 13 October 2020

H-Sound is a sound engine created by Tsutomu Hagiwara of Sol for the SPC700 [1] [2]. The sound driver was used in five games.

Only one version, 0.5, was ever used. However, there are technically three different builds, each with very minor differences:

  • Yuujin no Furi Furi Girls, compared to Kamen Rider SD, has extra valid drumkit note slots and a single extra opcode that overwrites the timer value to use at the start, thus almost not even qualifying as a build variant.
  • The other three games, compared to Kamen Rider SD, are missing an optional inversion operation for the echo volume. This is not controlled by a VCMD within the song.
Game Name Build ID VCMD Table Location ($E0 and up) ROM Offset
Kamen Rider SD 1 0x0C3D 0x0C9B91
Yuujin no Furi Furi Girls 2 0x0C45 0x888000
Hisshou Pachi-Slot Fun 3 0x0C69 0x088000
Honkakuha Igo - Gosei 3 0x0C69 0x0C8000
Janyuuki Gokuu Randa 3 0x0C69 0x1D8000

Instrument Format

The instrument format is N-SPC/Kankichi-kun compatible minus noise support for SRCN values above 127.

The instrument format is defined as direct writes to DSP registers for the first four bytes, followed by two pitch-related bytes. They are defined in this order, from top to bottom...

  • SRCN
  • ADSR1
  • ADSR2
  • GAIN
  • Pitch Base Multiplier
  • Pitch Base Fractional Multiplier (in 256ths)

Header Format

Each song's header is a series of eight four byte entries, one per channel. Each entry contains the following bytes in order...

  • Two-byte little endian track pointer
  • Master track ID (Zero for music, non-zero for SFX)
  • Unused byte

Voice Command Format

VCMD ID Description Arguments
$00-$60 Note Length
$61-$71 Invalid Velocity
$72-$79 Velocity
$7A-$7F Quantization
$80-$C7 Note
$C8 Instant Slide To Note
$C9 Tie
$CA-$DF Drumkit
$E0 Instrument xx
$E1 Panning xx
$E2 Note Volume xx
$E3 NOP xx
$E4 Pitch Offset xx
$E5 Absolute Transposition xx
$E6 Global Absolute Transposition xx
$E7 Loop Section Start
$E8 Loop Section End xx
$E9 Tempo xx
$EA NOP
$EB Activate Drumkit Mode
$EC Echo On
$ED Echo Off
$EE ADSR xx yy
$EF GAIN xx
$F0-$F1 NOP
$F2 Jump xx xx
$F3 Noise Clock xx
$F4 Noise On
$F5 Noise Off
$F6 Key Off On Quantization Elapse Enable
$F7 Key Off On Quantization Elapse Disable
$F8 FIR Coefficient Table ID xx
$F9 Echo Volume xx
$FA Echo Feedback xx
$FB-$FD NOP
$FE End of Song
$FF NOP

TODO VCMD documentation