YM2612 Hardware interface

Discussion in 'General Sega Discussion' started by TasuLife, Oct 28, 2008.

  1. TasuLife

    TasuLife

    Member
    2
    0
    0
    Hello everyone!

    I've been working on a really simple circuit where a Pic Microcontroller
    makes writes to a YM2612 chip, which in turn happily dumps out an audio signal.

    The patch that is programmed is the "Grand Piano" that is defined at the bottom of the SEGA2.DOC Technical reference manual.

    two nights ago I made the very first sounds, and last night I made a programmed c scale
    and tonite I got a midi interface working where KeyOn/Off and Pitch are Recognized.

    Here are some unpolished demo videos of my progress so far:

    http://www.youtube.com/watch?v=p63t3O9LIsc
    http://www.youtube.com/watch?v=TOsozYpKqhY
    http://www.youtube.com/watch?v=0JSV9F905Fs

    so what, you may ask is the goal of this project?
    The overarching goal is to create a synthesizer module out of the YM2612 which is entirely controlled by midi.
    After that, I'm want to explore having the system read VGMs.
    I'm trying to get my hands on some SN76489 chips to fully realize this next device.

    So with all that said - what other protocols would be useful to interface with the YM2612/SN76489?
    I'm having a blast building this stuff so I'm looking for exciting ideas.



    also, I'll be updating this post whenever I have something new to flap around.
     
  2. drx

    drx

    mfw Researcher
    2,244
    320
    63
    :rolleyes:
    This is actually pretty interesting, I don't know why I'm the only one to jump on this.

    BTW, you might be better off reading the original YM2612 hardware references, SEGA2 is very flawed when it comes to this chip.
     
  3. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    I expressed myself already on Spritesmind...

    Your dedicated HW variant is nice, but it has to be more than regular MIDI, as there's a TON of things FM chips can do and samplers can't... and there's no MIDI messages for these extras. Also, MIDI inteface itself is not enough to allow effective use of the DAC part, unless you have extra on device memory for storing samples... 31.5kbit is not too nice to transfer large amounts of data.
    Also, you would need some 128 FM instruments... and believe me, FM (good) instruments are pain to create ;)

    The idea is certainly interesting, I prefer having MD do all the dirty work with the sound chips :P I provide/recive data from one of the controller port through the MoD's MCD cable... I achieved 128Kbit/sec bi-directional data transfer rate using the cable.
     
  4. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    I can't help much on the hardware level, but I wouldn't mind teaming up with some others to create a solid, good sounding set of voices to represent the General MIDI standard. I had always considered doing such a thing for soundfont, but it'd be even better to do it for an actual hardware, MIDI-compatible YM2612 synth. :)

    Great stuff! ;)
     
  5. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    I have made only around 30 instruments for YM2612, in a General MIDI spec, and sounding close to my Yamaha YMF718 sound card... mostly basses, some synth, few lead and other instruments... pain in the rear end. I'm going to drop the "trying to be close to MIDI" stuff in my tracker.
     
  6. nineko

    nineko

    I am the Holy Cat Tech Member
    I will kill for a good FM Orchestra Hit voice.
    Then again, the one on the Sound Blaster 16 used to suck, too, so I doubt it's possible at all.
     
  7. roxahris

    roxahris

    Everyone's a hypocrite. Take my word for it. Member
    1,224
    0
    0
    Doing anything at all
     
  8. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    18,098
    299
    63
    Berkshire, England
    Learning Cymraeg
    Honestly, I would have replied but most of this flew over my head. I can see the technical achievement and the potential uses here but I couldn't do much more than say "awesome win" =P
     
  9. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    You need all the channels to get an Orchestra Hit in FM... single channel will never do... using a PCM sample is much more convenient IMO.
    Batman on MD has quite nice orchestra hits, not too real, but better than any FM hits I've heard.
     
  10. TasuLife

    TasuLife

    Member
    2
    0
    0
    Thanks for everyone's input. I like the idea of trying to get PCM samples to play in this environment and adding some fixed library of patches (to be used with general MIDI) is also a great idea.

    I think the Fixed General Midi library will be quite a bit easier to implement in the near future, because that is something I can do without learning new disciplines or buying new parts. If there are certain YM2612 configurations that you guys particularly like, I'd be happy to add them. I'll just need the values that are stored in the ym2612 registers.

    I was thinking about adding a vgm file reader into the hardware because the format uses the ym2612 addresses and values natively. It sounds feesible that a single PCM sample could be saved as a VGM file, and loaded into the project where it could be played in various ways. This is harder, because I'll need to get PCM VGM files, and also build a SD card or USB memory stick interface.

    TmEE, I can use some of the control change messages in the Midi Format to change the "extra" items in the FM synthesizer. The control change messages begin with a status byte of B0 through BF (channels 0-16), and have a Control Change Byte next:
    http://www.midi.org/about-midi/table3.shtml
    after that you just dump the data byte read from the control (like a knob or fader). My platform will read these and adjust the Ym2612 registers (like feedback amount, operator configuration and LFO).
     
  11. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    Sounds good, I guess you're about to set a standard then, if there's more YM2612 MIDI devices, then they should use same controllers for their things.