YM2151 FM synthesis sound card

774 views
Skip to first unread message

Ed Brindley

unread,
Feb 28, 2022, 4:41:14 AM2/28/22
to RC2014-Z80
Hi there!

Since November I've been working on and off on a YM2151 sound card for the RC2014. This came about after talking to Sheila Dixon at the Retro Computer Festival in Cambridge, which inspired me to get working on the idea!

The KiCad files for the board are here: https://github.com/electrified/mdxplay-rc2014

And the port of mdxplay to z88dk/C from the original Arduino/C++ code is here: https://github.com/electrified/mdxplay-rc2014

A modified version of jblang/ Maccasoft's VGM player with added YM2151 playback is here https://github.com/electrified/rc2014-ym2151/tree/main/software/vgmplay

The first version of the board, I failed to wire up the interrupt pin. That's now been corrected, fixing the mdx file playback speed issues in the YouTube video, and I'm looking at doing another spin of the board. 

Before doing that I though I'd post here to see if anyone has any design suggestions! The current schematic is attached.


The software is definitely rough round the edges at the moment and I've only tested mdxplay via z80ctrl's CP/M emulation.

Many thanks,
Ed
opm-r1.jpg

rc2014-ym2151-schematic.pdf

shadow 338

unread,
Mar 1, 2022, 8:23:55 AM3/1/22
to RC2014-Z80

This is awesome! thanks for sharing. I don't see the Kicad files in the repo though.

Do you know if this module can be programed from BASIC the same as your awesome YM2149F/AY-3-8190 card?


cheers.

Ed Brindley

unread,
Mar 1, 2022, 12:36:14 PM3/1/22
to RC2014-Z80
Hi,

The Kicad files are in the top level of the repository (they are KiCad 6 format so extensions .kicad_pcb / .kicad_sch / kicad_pro)

Yes programming from basic is possible, see this example which plays a beep https://github.com/electrified/rc2014-ym2151/blob/main/software/test_programs/beep.bas I hope to provide some more sophisticated examples in the future.

Programming is considerably more complicated than the AY however, as there are a much larger number of registers (see the application note https://github.com/electrified/rc2014-ym2151/blob/main/docs/LSI-_______%20Yamaha%20YM2151%20(OPM)%20Application%20Manual.pdf )

Cheers,
Ed

Greg Dyke

unread,
Jun 13, 2022, 6:20:57 AM6/13/22
to RC2014-Z80
Morning,

Really like this design, I had a lot of fun with your YM board so I thought I'd give this a spin...

I don't suppose there are any known issues between the latest Kicad files and the zipped gerbers in the release section? Something seems to be halting boot when the board is in the backplane (an SC126). I'd suspected a grounded reset pin (or maybe INT) but having removed those from the equation and leaving really only address, data and bus control signals I'm slightly stumped.

It's entirely my own fault for being in a rush and not verifying the schema and generating the gerbers myself from the Kicad source (and I'll do that next batch), but I thought I'd ask!

Regards,

Greg

Ed Brindley

unread,
Jul 26, 2022, 6:57:41 AM7/26/22
to RC2014-Z80
Hi Greg, apologies for the slow reply.

The files in the release section were what I sent to JLCPCB and are the boards I'm currently using. The INT pin isn't wired up on that version (vs the checked in Kicad files), but other than that there are no known issues.

Did you get to the bottom of what was wrong?

What power supply are you using? The YM takes a fair bit so you may be running into the limits if you are powering it over USB.

Cheers,
Ed

Joao Miguel Duraes

unread,
Jun 12, 2025, 6:39:32 PMJun 12
to RC2014-Z80
Hey Ed,

A few questions if I may:

- What's the purpose of J1? Could you expand a little more about it?
- Did you ever fix the INT issue?
- Finally, any plans to release further updates to it?

Cheers,

Joao

Ed Brindley

unread,
Jun 30, 2025, 3:32:30 PMJun 30
to RC2014-Z80
Hi Joao,

- J1 is to select the I/O port used by the board. I didn't want to pick an address and then find it conflicted with one chosen by another board, so this lets you choose. Quite a few boards use similar decoding logic using a 74x688 - see some of the SCC boards.
- No I never invested any further time in the software! I can't remember what I was trying to use the internal timers / interrupt generator for.
- No plans at the moment. Time to work on projects has got scarce, (and the availability of YM2151s has gone down too) :-(. I may tidy up the docs / update for Kicad 9 but no planned board changes.

Thanks,
Ed

Joao Miguel Duraes

unread,
Jun 30, 2025, 4:46:24 PMJun 30
to rc201...@googlegroups.com


That's JP1 (the one that says "Base Address"). I kind of figured that one out. 😂 

I mean J1 on the right side of the board. I have left it unplugged as I'm guessing that is for experimenting with things, and it doesn't seem to not work without it. 

I get it, mate. Too many things so little time. I'm having loads of fun with your cards (I've built others as well) so thank you for having taken the time to create them and sharing. 

The card appears to be working well for me and I'm not experiencing timing issues (that I know of), but the TPA limit for file sizes is a bit of a downer. I might study about the possibility of extending vgmplay further to handle that. 

Anyway, thanks again. 

JD

Ed Brindley

unread,
Jun 30, 2025, 6:12:42 PMJun 30
to RC2014-Z80
Ah sorry about the misunderstanding there!

The idea with J1 was that you could cut JP2 and JP3 and then power the op-amp with a separate voltage regulator / other power circuitry. I was planning on experimenting with different op-amps and voltage regulators to see if I could improve the quality of the output. I never tried this though

CT1 and CT2 from the YM were brought out as well as they sounded like they might be useful, but I didn't have any particular purpose for them.

Really great to hear you are enjoying the boards :) I've not had much feedback about this one so glad to hear someone is using it!

Cheers,
Ed

Joao Miguel Duraes

unread,
Jun 30, 2025, 6:36:15 PMJun 30
to rc201...@googlegroups.com
Thank you for clarifying. I was looking at the schematic and understood it, but not what your objective initially was. I get it now.

Yeah, nothing speaks nostalgia like those sweet FM tones and with the lack of an OPL2/3 option today (hint? 😏) this is the closest I could get to it. So yeah, found your repo when looking (and hoping) for more tunes kit, and immediately nabbed it - and the only reasonably priced YM2151 I could find.

I did a lot of my past hardware exploration on the speccy, but when I finally bit the rc2014 bullet, I was hooked all over again.

I'm now into Dean's MSX alternative as well, because I never really did much with a real one (speccy straight to PC child) so I am pretty intrigued about it. So I work on that, with rev 6.1 of Ed's YM2149 card blasting Mmcm's tunes in RomWBW on the rc2014.

What a great time to be alive. Barely... 😂

JD

--
You received this message because you are subscribed to a topic in the Google Groups "RC2014-Z80" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rc2014-z80/fi9vizSVriI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/e7f8533c-d508-48c5-8e23-b2af16d5b14en%40googlegroups.com.
Message has been deleted

Ed Brindley

unread,
Jul 2, 2025, 3:16:18 AMJul 2
to RC2014-Z80
Hint noted on the OPL2/3 ;-)

I am also interested in the MSX, I bought the majority of the components to build Serge Kiselev's Omega MSX recreation, but have never got round to building it.

My most recent RC2014-adjacent experiments have been with Fuzix on the Z180, with WizNet ethernet. I will pick that back up eventually but have been on a diversion into 68000 land (Amiga, Atari ST etc) for the most of this year.

Cheers,
Ed

Joao Miguel Duraes

unread,
Jul 2, 2025, 4:48:48 AMJul 2
to rc201...@googlegroups.com
Lol... I have only just last night placed a large order with Mouser and with JLCPCB for Sergey's Omega too! What a coincidence. 

After studying the schematic, I can see how similar the designs from Dean to Sergey are (or is it the other way around?) so I'll be using it to learn even more about it.

It strikes me that both have chosen a mono audio approach, but like you I prefer the golden ratio stereo option. To that end, I've created an interposer adapter PCB to be placed between the YM2149/AY38910 and the socket on their boards, with output circuitry straight from it. I may have totally ripped your circuit idea for that. 😂 I'll share it once I get and test my PCBs. 


Yes, I've been through the Amiga/St ohase in the early 2000s already, so got that itch scratched earlier. But the Z80 holds a special place in my heart, hence why I've come back to it. 

JD


Message has been deleted

Dean Netherton

unread,
Jul 3, 2025, 4:09:06 AMJul 3
to rc201...@googlegroups.com
> After studying the schematic, I can see how similar the designs from Dean to Sergey are (or is it the other way around?) so I'll be using it to learn even more about it.
Dean is definitely the follower....  I can only aspire to meet Sergey designs

You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/rc2014-z80/CAEnnA%2BQW64CVWPRgFDU16yAq4MM5B5oy9LnaNqzvdREm5fVk_g%40mail.gmail.com.
Message has been deleted
Message has been deleted

zugan2

unread,
Jul 4, 2025, 12:12:49 AMJul 4
to RC2014-Z80
Hi, Ed Brindley-san
Good day!

I also have made the YM2051board, and it finally worked !

The first step, I tested beep.bas, but unfortunately it didn't sounds.
I have tested signals with repeat access test program w/ osciroscope.
CS signals are fine, eventually I found  it was caused by my emvironment.
Because the sound is too small for my headphone, therefore I have changed C10 C11
coupling capacitor 4.7uF to 100uF.

The second step,
I made main.com to run from $100. and execute on Z80ctrl "main biri.mdx".
The result is shown on a Youtube link below.

The third step is to play VGM music.
I compiled it using SjasmPlus and succeeded in creating VGMPLAY.com.

Therefore, my check was almost done !!
And I'm very  relieved to know the YM2151 chip from Aliexpress was not fake parts.

Again, I would like to send special thanks to RC2014 world support persons like
J.B. Langton-san, Ed Brindley-san, and many other related persons.

Best regards,
Zugan2
IMG_2397.JPG
YM 2025-07-02 233701.png
IMG_2398.JPG

Ed Brindley

unread,
Jul 4, 2025, 2:43:13 PMJul 4
to RC2014-Z80
Hi Zugan2,

Glad to hear you also got the board working :)

Kind regards,
Ed
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

zugan2

unread,
Jul 6, 2025, 4:03:47 AMJul 6
to RC2014-Z80

Hi, Ed Brindley-san
Good day! 
Thank you for your kind reply !

I would like to ask you one thing.
I already made YM2149 board Rev.3.0 also.

Then, I would like to made newest YM2149 board.
But,  unfortunately KICad file seems only for KiCad 9.0.
https://github.com/electrified/rc2014-ym2149

Actually I'm using KiCad 8.0, therfore I couldn't open the sch file.
Could you kindly please show me YM2149_RC2149_sch Rev6.1 in PDF schematic files ?

Your help is highly appreciated.
Best regards,
Zugan2
Message has been deleted
Message has been deleted
Message has been deleted

zugan2

unread,
Jul 9, 2025, 4:35:23 AMJul 9
to RC2014-Z80
Hi Ed-san, Thank you so much for your quick reply on the GitHub Issue (https://github.com/electrified/rc2014-ym2149/issues/12)
and for sharing the YM2149 Rev6.1 PDF.

I really appreciate you confirming that Rev6.1.
Then,I’m now all set to build the YM2149 Rev6.1 also. Thanks for your awesome work on this sound card and for supporting the RC2014 community!
I’m excited to get it up and running and will share my progress. Kind regards, Zugan2

Martin Giese

unread,
Aug 14, 2025, 7:11:51 AMAug 14
to RC2014-Z80
I have obtained a YM2151 (or that’s what it says on the package at least) and hooked it up to an Arduino so I can speak MIDI to it.

I’ve already noticed that some of the documentation of the YM2151 is rather misleading and/or incomplete.

But one thing in particular I find puzzling, and I’m wondering if it’s something I’m doing wrong, or have misunderstood, or that is documented wrongly.  It’s about the LFO doing amplitude and/or pitch modulation.  (The YM2151 app note says phase modulation, but I think in the case of the LFO, it really is frequency or pitch modulation).

There is an AM enable bit for each operator in each channel.  There is a pair of AMS (2 bit) and PMS (3 bit) "sensitivity" registers per channel, shared between operators.  And there are AMD and PMD modulation "depth" parameters which are common for all channels and operators.

AMD/PMD are special in that both are located at register 0x19.  According to the YM2151 documentation, when the most significant bit of the written value is high, the PM depth is written, otherwise the AM depth.  So there are actually two "shadow" registers holding these two values.  This is also the way it works in this cycle accurate emulation Nuked-OPM.

Now I did some experiments with my ears and a scope yesterday.  And unless something in the Arduino code is subtly broken, what happens is
  • The amount of amplitude modulation, when enabled, is controlled by AMS and PMD (i.e. the value written to 0x19 with the MSB at 1)
  • The amount of pitch modulation is controlled by PMS and AMD (i.e. the value written to 0x19 with the MSB at 0)
  • Moreover, there will be no pitch modulation as long as the PMD value (i.e. the one that happens to control AM) is 0.  You can achieve PM without AM by setting AMS to 0 or not setting the enable bits.  But independently of all that, a PMD of 0 will turn of pitch modulation that is otherwise controlled by AMD.
Has anybody else observed something similar?  I don’t think it’s my wiring since everything else seems to work as it should.

Martin

Martin Giese

unread,
Aug 18, 2025, 8:20:28 AMAug 18
to RC2014-Z80
Observing the signals sent to the YM2151 confirms the observation: The role of the highest bit for distinguishing AMD and PMD is reversed, and there is no PM without setting a tiny bit of AM in addition.

I haven‘t found any mention of this confusion on the internet, so I wonder if my chip is some kind of relabelled almost-clone 🤔 

Martin

Reply all
Reply to author
Forward
0 new messages