First post, by koko
Hey guys, new member, first post.
A little background:
I am attempting to wire up a YMF262 directly to an Arduino Nano along with a whole bunch of twisty nobs and switches to directly control each of the settings of the four operators and handle midi input to play music. I am using 6-voice Polyphony, so all channels receive the same operator settings.
The YMF262 has a register that enables backwards compatibility with OPL2. Once you enable OPL3 mode, you can modify a second bank of registers, get access to more wave forms, and enable 4-op channels.
When I initialize the chip I go through the following steps:
• Hard-reset the chip (taking the reset pin low then high)
• Turn on OPL3 mode (write bit 1 of register 0x05 on the second register bank)
• Clear out the second bank of registers (0x20…0xF5 = 0x00)
• Turn on 4-op mode for all 6 channels (set register 0x04 on bank two to 0x3F)
After that, I set all of the operator properties (A, D, S, R, WaveForm, Level, etc.) They are all controlled by the pots and switches.
At this point, I can play notes through midi and get sound, but there is some really odd behavior. Basically, Op 3 and 4 of each channel won’t produce sound.
I know that:
• I am in OPL3 mode - because I have access to all 8 waveforms
• All 6 4-op voices do produce sound (so I know that I am getting sound from both banks
The YMF262 supports a few different Synthesis Modes:
• Mode 0: Op1 x Op2 x Op3 x Op4
• Mode 1: (Op1 x Op2) + (Op 3 x Op4)
• Mode 2: Op1 + (Op2 x Op3 x Op4)
• Mode 3: Op1 + (Op2 x Op3) + Op4
When I flip through the modes:
• Mode 0 produces NO sound
• Mode 1 produces what sounds like a two-op sound (and indeed, I can only audibly tweak the properties of Op1 and Op2)
• Mode 2 produces sound only from Op1 (tweaking the properties of the other 3 operators doesn’t change anything)
• Mode 3 has the same results as mode 2
My hypothesis is that Op3 and Op4 are somehow muted. Because of the way the sounds are combined, this would produce the behavior above.
Here is where things get weird… If I turn off OPL3 mode (write 0 to bit 1 of register 0x05) after setting things up, all four operators (of channels 1-3) turn on and are combined as if in 4-OP OPL3 mode. Of course you can only use the first 3 channels (because channels 4-6 are in the second register bank which is locked), and you are limited to the four OPL2 waveforms. But this is the only way I have been able to get a 4-OP sound.
What is going on???