background image

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. 

Содержание YM3806

Страница 1: ...ta 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 a...

Страница 2: ...gister 05H Key on key off triggers 13 5 2 Register addresses 10H 1FH 14 5 2 1 Registers 10H 17H Algorithm feedback output channel 14 5 2 2 Registers 18H 1FH Vibrato tremolo echo 14 5 3 Register addresses 20H 3FH 15 5 3 1 Registers 20H 2FH Octave frequency hi nibble 15 5 3 2 Registers 30H 3FH Frequency lo byte 15 5 3 3 Octave and frequency numbering 15 5 4 Register addresses 40H 5FH 16 5 4 1 MSB 0 ...

Страница 3: ... especially the excellent document Programmer s Guide to Yamaha YMF 262 OPL3 FM Music Synthesizer by Vladimir Arnost Testing things using Dexed soft synth closely modeled on the original DX 7 characteristics gave some insight Also DX 11 seems to be very close to OPQ in many respects The OPQ is not that widely used but it is found at least in PSR 60 PSR 70 and CLP 100 keyboards 2 The OPQ synthesize...

Страница 4: ... functions VDD VSS 5V supply D7 D0 Data bus from to CPU A7 A0 Address bus from CPU WR RD Write read signals from CPU CS EN EN Chip select and enable signals from address decoding In PSR 70 only CS is used EN and EN are connected permanently active IRQ Interrupt request to CPU IC Inital clear reset from reset logic SO RSH LSH Serial data out to DAC In YM3012 signals SD SAM1 SAM2 respectively ø10 Cl...

Страница 5: ...e named LSH and RSH which gives a clue of Left and Right but it is better to think that there are two separate output channels and each voice channel can be sent to either of them or both This can be useful for routing purposes but it is not stereo The arrangement is similar to OPL3 synthesizer Even PSR 70 does not use the output channels as left and right it uses them for controlling the effects ...

Страница 6: ...L3 is that the triggering is not done per channel it is done per operator This means that even same channel s operators can be turned on or off at different times Turning operator on starts its envelope s attack phase and turning it off starts the release phase This gives quite a few new possibilities in sound design I have not noticed that PSR 70 firmware would make use of this possibility There ...

Страница 7: ...eed to be in a harmonic relation which again opens up interesting possibilities in sound design There is also possibility to detune each operator from its nominal frequency And of course the frequency multiplication is available as always in FM 3 5 Envelopes Each operator has individually controllable envelope curve In fact half of the registers are used for the envelope settings OPQ envelope is a...

Страница 8: ...nterrupts In PSR 70 this is used as real time interrupt with 10 ms interval I did not find out how this is actually controlled I can get out 10 ms interrupts by mimicking the actions of the PSR 70 firmware but that s all I don t know how to alter the interval for example Timer is the only thing inside OPQ which can cause interrupts Sound generation does not use interrupts for anything The followin...

Страница 9: ...gisters can be done by grouping the registers in groups of 32 registers The register group number is the 3 most significant bits in the register address Register group nr Register adresses Group s functionality 0 00H 1FH General and channel specific settings 1 20H 3FH Frequency settings 2 40H 5FH Frequency multiplier detune settings 3 60H 7FH Output level settings 4 80H 9FH Envelope attack rate se...

Страница 10: ...erator pair specific The operator pairs are Op1 Op3 and Op0 Op2 for each channel so there are 16 operator pairs altogether Although there are only 16 frequencies to be set two for each channel register group 1 still needs 32 registers This is because each frequency is set by a 16 bit value so there must be a high byte and a low byte for each operator pair The address is formatted like this A7 A6 A...

Страница 11: ...al not channel or operator specific settings and the status register Most of the registers are not in use Addresses 10H 1FH contain channel specific settings They affect the channel as a whole all operators at the same time The 3 least significant bits of the address are the channel number 10H 17H algorithm feedback output channel 18H 1FH vibrato tremolo echo control ...

Страница 12: ...time PSR 70 firmware wants to write to any register it first waits that this bit goes to 0 INT1 OPQ interrupt is active This bit is 1 when OPQ has set its IRQ line active INT2 Unknown PSR 70 firmware tests for interrupt by masking register 00H value with 05H so also this bit could be counted as an active interrupt In my own tests I have never seen this bit active 5 1 2 Register 03H Timer control T...

Страница 13: ...r is different from the basic principles in OPQ Normally there is a register for each channel or each operator but this one register handles them all D7 D6 D5 D4 D3 D2 D1 D0 KEY3 KEY2 KEY1 KEY0 CN2 CN1 CN0 KEY3 Key on off for this channel s Op3 KEY2 Key on off for this channel s Op2 KEY1 Key on off for this channel s Op1 KEY0 Key on off for this channel s Op0 CN2 CN0 Channel number 0 7 Writing a 1...

Страница 14: ... feedback 7 max feedback ALG2 ALG0 Channel s algorithm 0 7 Algorithm numbering according to figure on page 6 At least one of bits OCH1 or OCH2 must be set to hear the channel In PSR 70 output channel 1 is connected through chorus effect not part of OPQ chip channel 2 is connected directly 5 2 2 Registers 18H 1FH Vibrato tremolo echo D7 D6 D5 D4 D3 D2 D1 D0 ECHO VIB2 VIB1 VIB0 TR1 TR0 ECHO This bit...

Страница 15: ...ters 30H 3FH Frequency lo byte D7 D6 D5 D4 D3 D2 D1 D0 FRQ7 FRQ6 FRQ5 FRQ4 FRQ3 FRQ2 FRQ1 FRQ0 FRQ7 FRQ0 8 least significant bits of the 12 bit frequency number Octave and frequency number together define the operator s nominal frequency The actual output frequency is still affected by detune and multiplier defined in registers 40H 5FH 5 3 3 Octave and frequency numbering Octaves are numbered so t...

Страница 16: ...resses 40H 5FH Register group 2 contains frequency multiplier and detune settings All settings are operator specific The addressing scheme is described in chapter 4 2 These registers serve dual purpose the most significant bit defines the interpretation of the lower bits 5 4 1 MSB 0 Detune D7 D6 D5 D4 D3 D2 D1 D0 0 DET5 DET4 DET3 DET2 DET1 DET0 DET5 DET0 Operator s detune amount 0 63 Operator s fr...

Страница 17: ...epends on the factor value according to the table below The nominal frequency set by registers 20H 3FH will be multiplied by this Factor value Multiplier 0 0 5 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 12 12 15 13 16 14 17 15 18 5 5 Register addresses 60H 7FH Register group 3 contains operator output level settings All settings are operator specific The addressing scheme is described in chapter...

Страница 18: ...addresses 80H FFH Rest of the register groups 4 7 contain envelope related settings All settings are operator specific The addressing scheme is described in chapter 4 2 5 6 1 Registers 80H 9FH Envelope attack rate key scaler D7 D6 D5 D4 D3 D2 D1 D0 KSE2 KSE1 KSE0 AR4 AR3 AR2 AR1 AR0 KSE2 KSE0 Key scaler for envelope 0 7 Scales all envelope times attack decay release by shortening times towards hig...

Страница 19: ...ime it won t trigger again before release curve has decreased near zero Why these two completely separate settings are combined to this same bit I cannot understand WF Basic waveform of this operator 0 sine wave 1 half sine DR4 DR0 Decay rate 0 31 0 very slow very long decay time 31 very fast decay time about zero 5 6 3 Registers C0H DFH Envelope sustain rate D7 D6 D5 D4 D3 D2 D1 D0 SR4 SR3 SR2 SR...

Страница 20: ...RR3 RR2 RR1 RR0 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 0 RR3 RR0 Release rate 0 15 0 very slow very long release time 15 very fast release time about zero ...

Страница 21: ...hm Channel 2 13H OCH1 OCH2 Feedback Algorithm Channel 3 14H OCH1 OCH2 Feedback Algorithm Channel 4 15H OCH1 OCH2 Feedback Algorithm Channel 5 16H OCH1 OCH2 Feedback Algorithm Channel 6 17H OCH1 OCH2 Feedback Algorithm Channel 7 Vibrato tremolo echo channel specific 18H Echo Vibrato FM Tremolo AM Channel 0 19H Echo Vibrato FM Tremolo AM Channel 1 1AH Echo Vibrato FM Tremolo AM Channel 2 1BH Echo Vi...

Страница 22: ...quency Hi Channel 2 2BH Octave Frequency Hi Channel 3 2CH Octave Frequency Hi Channel 4 2DH Octave Frequency Hi Channel 5 2EH Octave Frequency Hi Channel 6 2FH Octave Frequency Hi Channel 7 30H Frequency Lo Channel 0 Op1 Op3 31H Frequency Lo Channel 1 32H Frequency Lo Channel 2 33H Frequency Lo Channel 3 34H Frequency Lo Channel 4 35H Frequency Lo Channel 5 36H Frequency Lo Channel 6 37H Frequency...

Страница 23: ...etune Channel 1 4AH 0 Detune Channel 2 4BH 0 Detune Channel 3 4CH 0 Detune Channel 4 4DH 0 Detune Channel 5 4EH 0 Detune Channel 6 4FH 0 Detune Channel 7 50H 0 Detune Channel 0 Op2 51H 0 Detune Channel 1 52H 0 Detune Channel 2 53H 0 Detune Channel 3 54H 0 Detune Channel 4 55H 0 Detune Channel 5 56H 0 Detune Channel 6 57H 0 Detune Channel 7 58H 0 Detune Channel 0 Op3 59H 0 Detune Channel 1 5AH 0 De...

Страница 24: ... factor Channel 3 4CH 1 Multiplication factor Channel 4 4DH 1 Multiplication factor Channel 5 4EH 1 Multiplication factor Channel 6 4FH 1 Multiplication factor Channel 7 50H 1 Multiplication factor Channel 0 Op2 51H 1 Multiplication factor Channel 1 52H 1 Multiplication factor Channel 2 53H 1 Multiplication factor Channel 3 54H 1 Multiplication factor Channel 4 55H 1 Multiplication factor Channel ...

Страница 25: ...nel 2 6BH Attenuation Channel 3 6CH Attenuation Channel 4 6DH Attenuation Channel 5 6EH Attenuation Channel 6 6FH Attenuation Channel 7 70H Attenuation Channel 0 Op2 71H Attenuation Channel 1 72H Attenuation Channel 2 73H Attenuation Channel 3 74H Attenuation Channel 4 75H Attenuation Channel 5 76H Attenuation Channel 6 77H Attenuation Channel 7 78H Attenuation Channel 0 Op3 79H Attenuation Channe...

Страница 26: ...hannel 4 8DH Key scaler Attack rate Channel 5 8EH Key scaler Attack rate Channel 6 8FH Key scaler Attack rate Channel 7 90H Key scaler Attack rate Channel 0 Op2 91H Key scaler Attack rate Channel 1 92H Key scaler Attack rate Channel 2 93H Key scaler Attack rate Channel 3 94H Key scaler Attack rate Channel 4 95H Key scaler Attack rate Channel 5 96H Key scaler Attack rate Channel 6 97H Key scaler At...

Страница 27: ...hannel 3 ACH TE RD WF Decay rate Channel 4 ADH TE RD WF Decay rate Channel 5 AEH TE RD WF Decay rate Channel 6 AFH TE RD WF Decay rate Channel 7 B0H TE RD WF Decay rate Channel 0 Op2 B1H TE RD WF Decay rate Channel 1 B2H TE RD WF Decay rate Channel 2 B3H TE RD WF Decay rate Channel 3 B4H TE RD WF Decay rate Channel 4 B5H TE RD WF Decay rate Channel 5 B6H TE RD WF Decay rate Channel 6 B7H TE RD WF ...

Страница 28: ... Sustain rate Channel 3 CCH Sustain rate Channel 4 CDH Sustain rate Channel 5 CEH Sustain rate Channel 6 CFH Sustain rate Channel 7 D0H Sustain rate Channel 0 Op2 D1H Sustain rate Channel 1 D2H Sustain rate Channel 2 D3H Sustain rate Channel 3 D4H Sustain rate Channel 4 D5H Sustain rate Channel 5 D6H Sustain rate Channel 6 D7H Sustain rate Channel 7 D8H Sustain rate Channel 0 Op3 D9H Sustain rate ...

Страница 29: ... 4 EDH Sustain level Release rate Channel 5 EEH Sustain level Release rate Channel 6 EFH Sustain level Release rate Channel 7 F0H Sustain level Release rate Channel 0 Op2 F1H Sustain level Release rate Channel 1 F2H Sustain level Release rate Channel 2 F3H Sustain level Release rate Channel 3 F4H Sustain level Release rate Channel 4 F5H Sustain level Release rate Channel 5 F6H Sustain level Releas...

Страница 30: ... V 1 1 30 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 ...

Отзывы: