Another AY entry :)

Hello everyone 🙂

After my previous post on Arduino an AY-3-3910 / YM2149 a lots of people complain that I didn’t deliver the code for the playing with a YM/AY chip with an Arduino, WITHOUT using any external hardware especially not a quartz 🙂

I know that lots of people complain the first time that I didn’t deliver the code for the playing with a YM/AY chip with an Arduino, WITHOUT using any external hardware especially not a quartz 🙂

I told at the time that I won’t deliver until I made a YM player.

Well I didn’t do a YM player.  Sorry to tell that.

20140517-231552.jpg
A AY-3-8910 in all it’s beauty in a 40 PIN DIP package, look at all those wire that dance around him, he surely make some music 🙂

In fact I made a MYM player.

MYM is just the same thing, but a bit more simple. There is nearly no change since my first version, I just move two IO to get the RS232 port free, all other part are exactly the same as before 🙂

Of course the code on the Arduino change a bit, but not that much, only to take register value from the serial and set the YM with them.

I’ve also made a small tool for your computer, base on tools from mym (here I used the base of the mym2ym tool) to send the YM data to the Arduino through serial. The tool is mainly UNIX/OS X based, and wont work under windows without changes, but the serial protocol is really simple: for each 14 bytes received, send them sequentially to the AY, byte 0 for reg 0, byte 1 for reg 1 and so on.

Any application that can open a serial port is able to make the Arduino working.

One advantage of the solution without a quartz is that it is easy to change the AY clock to another value, like 1MHz, 2MHz of even more (I’ve tested 4 and 6 MHz it still work 🙂

I will publish a video later showing the whole device working.

20140517-231542.jpg
The arduino is receiving some data, maybe some music? 🙂

I will also publish a Fritzing schematics for how to connect the AY (it’s not obvious from the code unfortunately as it’s somewhat optimized to toggle IO as quick as possible.)

The best could be to produce a Arduino shield for an AY, but as AY/YM chip are no longer manufactured, I don’t think it’s worth to do this, or it would be another FPGA shield filled with the code to make it act like a AY-3-8910.

20140517-231600.jpg
An arduino and a AY-3-8910 working together 🙂

This time the code is available on Github, you can find it here:

https://github.com/Godzil/AY-3-3910-Player

I hope you will enjoy playing MYM files with your Arduino 🙂

One thing, I won’t provide a ym2mym tool as there exist a lot of them. I can recommend the version used by the OSDK (the Oric SDK) as MYM is currently the prefered ym format on this platform.

The next step on this project will be to make it autonomous, I may use the Gameduino 2 as an interface to search for YM/MYM file on a SD card and show the play progression.

Update: Here is the breadboard schematics
project-ay-3-3910-breadboard

3 thoughts on “Another AY entry :)”

  1. Bien joué !
    It works rather well and was easy to build. I’ve made a video of my settings: https://youtu.be/GeTfZhwXkNo

    The sound is quite rough, with much saturation (even with earphones), and worse than with an emulator. Is it because the setup is quite simple, or the arduino not fast enough, or is my ay-3-8910 chip defective?

    1. If the sound saturate it’s due to the schematic, the schematic I put on this post is really crude. I will post an update on this that should improve the sound output

Leave a Reply to Godzil Cancel reply

Your email address will not be published. Required fields are marked *