Advertisement

Quick Links

Programmer's Guide to Yamaha YM3806 (OPQ) FM
Synthesizer
Version 1.1 Feb 27, 2021
Written by Jari Kangas
This document can be distributed freely if not modified.
Summary
This document contains a programmer's guide and a minimal data sheet for Yamaha OPQ
FM synthesizer chips. The information applies to YM3806 and very propably to YM3533
also.
Disclaimer
Because most of the information presented here is based on reverse engineering, it is very
probable that there are misunderstandings and omissions. The writer assumes no
responsibility for any damages arising out of use of this text. No warranty is provided about
correctness of any information in this file.

Advertisement

Table of Contents
loading

Summary of Contents for Yamaha YM3806

  • Page 1 Written by Jari Kangas This document can be distributed freely if not modified. Summary This document contains a programmer’s guide and a minimal data sheet for Yamaha OPQ FM synthesizer chips. The information applies to YM3806 and very propably to YM3533 also.
  • Page 2: Table Of Contents

    OPQ Programmer’s Guide V 1.1 Table of Contents 1 Introduction........................3 2 The OPQ synthesizer chip....................3 3 OPQ synthesizer basics....................5 3.1 Operators and channels....................5 3.2 Algorithms........................6 3.3 Triggering principles....................6 3.4 Frequency settings....................7 3.5 Envelopes........................7 3.6 Waveforms.........................8 3.7 Timer and interrupts....................8 4 Register structure......................9 4.1 Register address groups....................9 4.2 Register groups 2...7....................9 4.3 Register group 1......................10...
  • Page 3: Introduction

    OPQ Programmer’s Guide V 1.1 Introduction This document contains a programmer’s guide and a minimal data sheet for Yamaha OPQ FM synthesizer chips. The information applies to YM3806 and very propably to YM3533 also. There is no official information available for these chips. Everything presented in this document is based on three sources: •...
  • Page 4 OPQ Programmer’s Guide V 1.1 state logic implemented in hardware, but to my understanding it is not used when accessing the OPQ chip. This gives some rough idea about the bus timing specifications. The chip comes in a 40-pin DIP package and the pinout is: Pin functions: VDD, VSS 5V supply...
  • Page 5: Opq Synthesizer Basics

    3.1 Operators and channels Against Yamaha tradition, I will be numbering everything starting from 0, also the operators. This table summarizes which operators form each channel’s channel-specific operators: Table 1.
  • Page 6: Algorithms

    OPQ Programmer’s Guide V 1.1 • In all algorithms, Op0 is always a modulator, never a carrier. It is also the only operator which can use feedback. The feedback possibility is indicated with the feeback loop around Op0 in the algorithm picture on next page. 3.2 Algorithms There are 8 algorithms to select from.
  • Page 7: Frequency Settings

    OPQ Programmer’s Guide V 1.1 Also during release phase Op3 affects on the other operators: if Op3’s retrigger is disabled and it has long release time, it will not retrigger before its output level has decreased near zero. During that time any other same channel’s operator won’t retrigger either, even if its own release time has already ended.
  • Page 8: Waveforms

    Sustain level defines the level, where the decay phase ends and sustain phase starts. So it affects to decay time also. It looks like Yamaha DX-11 envelope system is exactly the same, just terminology differs. What I call here ”sustain” they call ”decay2”.
  • Page 9: Register Structure

    OPQ Programmer’s Guide V 1.1 Register structure OPQ synthesizer has 256 8-bit registers, or at least 256 register addresses, not all have any functionality. All registers are write-only, except register 00H, which is read-only. One big difference to OPL3 is that all registers are directly addressable, because the chip has 8 address lines.
  • Page 10: Register Group 1

    OPQ Programmer’s Guide V 1.1 But I like to think this in even simpler way. The setting can be written directly to specific channel’s specific operator by dividing address bits like this: RG2...RG0 (2...7): Register group number according to table 2. ON1...ON0 (0...3): Channel’s operator number, Op0...Op3.
  • Page 11: Register Group 0

    OPQ Programmer’s Guide V 1.1 4.4 Register group 0 Register group 0 is the most heterogeneous one, it needs some subdivision. • Addresses 00H...0FH contain couple of general (not channel or operator specific) settings and the status register. Most of the registers are not in use. •...
  • Page 12: Register Contents

    OPQ Programmer’s Guide V 1.1 Register contents Each register is 8 bits wide. They are described here by register groups. All registers are write-only, the value written cannot be read back. Only exception is register 00H, which is read-only. Before writing to any register, software must check that BUSY-bit in register 00H is zero. At least this is how the PSR-70 firmware does it, I have not tested what happens, if you don’t obey this.
  • Page 13: Register 04H: Lfo Control

    OPQ Programmer’s Guide V 1.1 5.1.3 Register 04H: LFO control This controls the Low Frequency Oscillator. LFO can be used for tremolo and vibrato. LFO waveform is always triangle. LDIS LFO2 LFO1 LFO0 LDIS LFO enable/disable. 0 = LFO on, 1 = LFO off LFO2...LFO0 LFO frequency, 0...7.
  • Page 14: Register Addresses 10H

    OPQ Programmer’s Guide V 1.1 5.2 Register addresses 10H...1FH This register area contains channel specific settings. All settings affect the whole channel. Channel number is the 3 least siginficant bits of the register address. 5.2.1 Registers 10H...17H: Algorithm / feedback / output channel OCH1 OCH2 ALG2...
  • Page 15: Register Addresses 20H

    OPQ Programmer’s Guide V 1.1 5.3 Register addresses 20H...3FH Register group 1 contains operator frequency settings. All settings are operator pair specific. The addessing scheme is described in chapter 4.3. 5.3.1 Registers 20H...2FH: Octave / frequency hi-nibble OCT2 OCT1 OCT0 FRQ11 FRQ10 FRQ9...
  • Page 16: Register Addresses 40H

    OPQ Programmer’s Guide V 1.1 Note Freq number 6C6H 72DH 79AH 80EH 889H 90AH There is quite a large range of frequency numbers both under and above of the basic octave. According to my own measurements, the highest note which can be reached by changing only the frequency number, is the next octave’s G#.
  • Page 17: Msb = 1: Frequency Multiplier

    OPQ Programmer’s Guide V 1.1 5.4.2 MSB = 1: Frequency multiplier MF3...MF0 Operator’s frequency multiplication factor value 0...15. The actual frequency multiplier depends on the factor value according to the table below. The nominal frequency set by registers 20H...3FH will be multiplied by this.
  • Page 18: Output Attenuation

    OPQ Programmer’s Guide V 1.1 5.5.1 Output attenuation ATT6 ATT5 ATT4 ATT3 ATT2 ATT1 ATT0 ATT6...ATT0 Operator’s output attenuation 0...127. 0 = no attenuation (max output level) … 127 = max attenuation (operator silent) Varying output level of a carrier varies the channel volume, and possibly timbre, if there are multiple carriers.
  • Page 19: Registers A0H

    OPQ Programmer’s Guide V 1.1 5.6.2 Registers A0H...BFH: Envelope: decay rate / waveform TE/RD TE/RD Tremolo (AM by LFO) enable. This bit defines whether the channel’s tremolo is applied to this operator. At the same time, this bit acts as a re-trigger disable. When this bit is set and operator has a long release time, it won’t trigger again before release curve has decreased near zero.
  • Page 20: Registers E0H

    OPQ Programmer’s Guide V 1.1 5.6.4 Registers E0H...FFH: Envelope: sustain level / release rate SL3...SL0 Sustain level 0...15. This is the level where decay phase ends and sustain phase starts. 0 = max level … 15 = zero level (no sound during sustain phase) Setting sustain level = 0 also leads to the length of decay phase being RR3...RR0 Release rate 0...15.
  • Page 21: Opq Register Table

    OPQ Programmer’s Guide V 1.1 OPQ register table Notes General BUSY INT1 INT2 Read only Unused Unused Timer LDIS LFO freq KEY3 KEY2 KEY1 KEY0 Channel nr Triggers 06H...0FH Unused Algorithm / feedback / output – channel specific OCH1 OCH2 Feedback Algorithm Channel 0...
  • Page 22 OPQ Programmer’s Guide V 1.1 Octave / frequency – operator pair specific Channel / Op Octave Frequency Hi Channel 0 Octave Frequency Hi Channel 1 Octave Frequency Hi Channel 2 Octave Frequency Hi Channel 3 & Octave Frequency Hi Channel 4 Octave Frequency Hi Channel 5...
  • Page 23 OPQ Programmer’s Guide V 1.1 Detune – operator specific Same registers as multiplication factor, MSB = 0 Channel / Op Detune Channel 0 Detune Channel 1 Detune Channel 2 Detune Channel 3 Detune Channel 4 Detune Channel 5 Detune Channel 6 Detune Channel 7 Detune...
  • Page 24 OPQ Programmer’s Guide V 1.1 Multiplication factor – operator specific Same registers as detune, MSB = 1 Channel / Op Multiplication factor Channel 0 Multiplication factor Channel 1 Multiplication factor Channel 2 Multiplication factor Channel 3 Multiplication factor Channel 4 Multiplication factor Channel 5 Multiplication factor...
  • Page 25 OPQ Programmer’s Guide V 1.1 Output attenuation – operator specific Channel / Op Attenuation Channel 0 Attenuation Channel 1 Attenuation Channel 2 Attenuation Channel 3 Attenuation Channel 4 Attenuation Channel 5 Attenuation Channel 6 Attenuation Channel 7 Attenuation Channel 0 Attenuation Channel 1 Attenuation...
  • Page 26 OPQ Programmer’s Guide V 1.1 Envelope: attack rate / key scaler – operator specific Channel / Op Key scaler Attack rate Channel 0 Key scaler Attack rate Channel 1 Key scaler Attack rate Channel 2 Key scaler Attack rate Channel 3 Key scaler Attack rate Channel 4...
  • Page 27 OPQ Programmer’s Guide V 1.1 Envelope: decay rate / waveform / tremolo enable – operator specific Channel / Op TE/RD Decay rate Channel 0 TE/RD Decay rate Channel 1 TE/RD Decay rate Channel 2 TE/RD Decay rate Channel 3 TE/RD Decay rate Channel 4 TE/RD...
  • Page 28 OPQ Programmer’s Guide V 1.1 Envelope: sustain rate – operator specific Channel / Op Sustain rate Channel 0 Sustain rate Channel 1 Sustain rate Channel 2 Sustain rate Channel 3 Sustain rate Channel 4 Sustain rate Channel 5 Sustain rate Channel 6 Sustain rate Channel 7...
  • Page 29 OPQ Programmer’s Guide V 1.1 Envelope: sustain level / release rate – operator specific Channel / Op Sustain level Release rate Channel 0 Sustain level Release rate Channel 1 Sustain level Release rate Channel 2 Sustain level Release rate Channel 3 Sustain level Release rate Channel 4...
  • Page 30 OPQ Programmer’s Guide V 1.1 Version history V 1.0 Mar 18, 2020 First version V 1.1 Feb 27, 2021 Additions: - Chapter 5.6.2: TR/RD-bit controls also tremolo - Chapter 6 added Corrections: - Chapter 4.3: H-bit values corrected - Chapter 5.3.1: typo FRQ9 → FRQ8...

Table of Contents