
An experimental adventure into Yamaha's "OPJ" FM chip.
I felt like experimenting with some reverse engineering and... FM synthesis.
I stared at my Electone HS-6 organ for a bit... then decided that that one is for a later date.
Then I remembered: I still have the PCB from my old Yamaha PSR-2 keyboard! Lets see what I can do with it.
The YM7137 "OPJ" FM chip
I've just started this project, so please wait a bit for me to fully flesh out this project and page, thank you :)
Here is the absolute minimum circuit to get this chip to do things:
As you can see it's a very "standalone" kind of solution.
The opamp on the output is a necessity as the chip can't provide much power at all. Both outputs work, but output the same signal so usually only one is connected.
Of course a setup with diodes to simulated key and button presses is very awkward, but it allows for experimentation on a breadboard. Depending on the firmware version you can use PB6 as a "B6" for an extra half-octave of notes.
Some additional functionality can be found as well:
- Pulling PA6 low will set it to single-finger chords mode or auto-accompaniment mode, depending on firmware.
- Pulling PA7 low will set it to fingered chords mode, depending on firmware.
- Connecting PD pins to PA pins with a diode makes chords sound, so I think this is another unused feature.
As for the clock:
you could use the original clock oscillator, of course, but it's much more fun to feed it a variable source. You can just give the chip any clock signal on pin 18 (OSC) and it will happily do its thing.
Yes you can go very low with the clock and you can even heavily modulate it, the chip doesn't care at all. I've yet to make it crash and I've given it some really mangled up square waves :)
So... Let's create some CHAOS.
Creating Chaos
To the left you can see a WIP schematic for an FM noise and chaos device using the YM7137 (click to enlarge image).
This is the first concept that I've breadboarded and it's already lots of fun. Since the chip is so accepting when it comes to the clock you can go from normal tones to complete chaotic noise that sounds like a machine screaming in pain... Or something to that effect.
I'm still planning to add two low pass filters and I want to experiment with the PT2399 delay chip. I have some interesting ideas on modulating that chip, that may prove a neat concept for another project I'm working on (HelvraetOrgan).
This schematic will be further updated as the project comes along.
External CPU mode
There's two pins that really caught my attention: M1 and M2 (sometimes also called M0 and M1 for some reason).
These pins set the configuration of the chip. In the minimal circuit this is set to 1,0 i.e. "single chip mode"
But as you can see 1,1 sets it to... "external CPU mode"? Interesting!
The two expansion modes are for the WaveROM that holds the PCM drum samples... I think, maybe. No clue what these configurations do.
Unfortunately service manuals for the PortaSound (PSS) series of keyboards that use the YM7137 are impossible to find unless you want to shell out money to some idiot pay-walling service manuals. Yes, I still hate that with a passion!
The reason I'm interested in the PortaSounds specifically because they tend to have a lot more going on internally, making for much nicer sounds and I suspect that one of these may use the "external CPU mode" for the YM7137... Maybe.
Either way, some deduction and experimentation is needed. So lets set it to that mode and whip out the oscilloscope...
NEXT SECTION IS WIP/TODO.
So to check if pins were floating I simply made sure nothing was connected to said pins before powering the chip.
To the left you can see the results (for now).
PORTC may be the data bus?
PORTD may have 3 control pins, what PD2 and PD0 are for I have no clue.
PD5 emits a solid 56.3KHz square wave with 55% duty cycle. This may be double the sampling rate for the PCM WaveROM?