VRC7 audio

From NESdev Wiki
Revision as of 18:49, 13 April 2012 by Rainwarrior (talk | contribs) (filling out VRC7 info)
Jump to navigationJump to search

The Konami VRC7, in addition to being a mapper chip, also produces 6 channels of 2-operator FM Synthesis Audio. The synthesis core appears to be mostly compatible with the Yamaha YM2413 OPLL.

Registers

Audio Register Select ($9010)

7......0
VVVVVVVV
++++++++- The 8-bit internal register to select for use with $9030

Audio Register Write ($9030)

7......0
VVVVVVVV
++++++++- The 8-bit value to write to the internal register selected with $9010

Internal Audio Registers

The VRCVII appears to have 26 internal registers, with other register values in $9010 being ignored. Registers $00-$07 define a custom patch that can be played on any channel set to use instrument $0. Registers $10-$15, $20-25, and $30-35 control 6 channels for FM synthesis.

Register Bitfield Description
$00 TVSK MMMM Modulator tremolo (T), vibrato (V), sustain (S), key scaling (K), multiplier (M)
$01 TVSK MMMM Carrier tremolo (T), vibrato (V), sustain (S), key scaling (K), multiplier (M)
$02 KKOO OOOO Modulator key scale level (K), output level (O)
$03 KK-Q WEEE Carrier key scale level (K), unused 0 ? (-), carrier waveform (Q), modulator waveform (W), feedback (E)
$04 AAAA DDDD Modulator attack (A), decay (D)
$05 AAAA DDDD Carrier attack (A), decay (D)
$06 SSSS RRRR Modulator sustain (S), release (R)
$07 SSSS RRRR Carrier sustain (S), release (R)
$10-$15 LLLL LLLL Channel low 8 bits of frequency
$20-$25 --ST OOOH Channel sustain (S), trigger (T), octave (O), high bit of frequency (H)
$30-$35 IIII VVVV Channel instrument (I), volume (V)

Channels

TODO output frequency, what do the bits do, etc.

Custom patch

TODO how custom patch works

Internal patch set

There are 16 different instrument patches available on the VRC7. With the exception of instrument $0, which can be controlled by registers $00-$07 (see above), these are hardwired into the chip and cannot be altered.

Exact values for the fixed patch set are not yet known, the following table is conjectural:

     00 01 02 03 04 05 06 07
     -----------------------
 0 | -- -- -- -- -- -- -- --
 1 | 31 22 23 07 F0 F0 E8 F7
 2 | 03 31 68 05 F2 74 79 9C
 3 | 01 51 72 04 F1 D3 9D 8B
 4 | 22 61 1B 05 C0 A1 F8 E8
 5 | 22 61 2C 03 D2 A1 A7 E8
 6 | 31 22 FA 01 F1 F1 F4 EE
 7 | 21 61 28 06 F1 F1 CE 9B
 8 | 27 61 60 00 F0 F0 FF FD
 9 | 60 21 2B 06 85 F1 79 9D
 A | 31 A1 FF 0A 53 62 5E AF
 B | 03 A1 70 0F D4 A3 94 BE
 C | 2B 61 E4 07 F6 93 BD AC
 D | 21 63 ED 07 77 F1 C7 E8
 E | 21 61 2A 03 F3 E2 B6 D9
 F | 21 63 37 03 F3 E2 B6 D9

Differences with OPLL

  • Register layout is the same
  • VRC7 has 6 channels, OPLL has 9
  • VRC7 has no rhythm channels, OPLL does (the last 3 channels are either FM or Rhythm on OPLL)
  • VRC7 built-in instruments are NOT the same as OPLL instruments (except for instruments 4,5,7,8 which might be the same on both)
  • VRC7 has no readily-accessible status register, under normal circumstances it is write-only; OPLL has an undocumented, 2-bit 'internal state' register.
  • VRC7 has an internal state output pin (may be serial version of the 2 bit internal state register) and has one output pin for audio, multiplexed for all 6 channels; OPLL has two output pins, one for FM and one for Rhythm, and has no special status pin.

References

  • VRC7 chip info by Kevin Horton: [kevtris.org/nes/vrcvii.txt kevtris.org/nes/vrcvii.txt]