Thanks for this video. It helped to get me started with the YM2149. If you look me up you will see I'm most familiar with the C64 6581 SID sound chip. It has 16 bits for pitch unlike the 12 bits for the YM2149. It is also adjusts pitch INVERTED to the YM chip. The larger the number the higher the pitch...so on the SID it gets more difficult to get accurate pitches at the lower frequencies. (fewer bits=less accuracy)The inverse is true with the YM2149. That is why I think it would be better to create your pitch table using a much lower A maybe even A 110~ as the starting point or even 55~ and use a tuner or scope to verify the pitch. Anyway, that's how I will do it, but thanks for this great video. I'm using a PIC16F887 at 20 mhz as the controller, and subdivided down to 2mhz for the YM2149, internally running at 4 mhz. The PIC is so fast that I must write in some delays so the YM can switch properly. I'm writing in raw assembler (MPASM) for the PIC. Thanks again !!
Thank you for all these resources, I would like to build a midi device with an ay-3-8912, and I feel a lot smarter, even if the two psg-s aren't exactly the same
Hi, I'm currently playing around with an AY-3-8910 and got it working on an Arduino before I move on to integrating it into a 6502 computer setup I am working on. After finding your video I'm amazed with what you've accomplished, this is beyond anything I've seen yet! I was hoping maybe you could answer this question I have regarding the fundamental timing of the AY-3-8910 registers. After reading the timing diagrams of the datasheet I don't understand how the AY-3-8910 able to read the inputs to its registers from the Arduino during the write register functions, if the clock speed max for the AY-3-8910 is 2MHz and the Arduino runs at 16MHz, does the Arduino latch slower than I am thinking? The timing diagrams say the minimum timing for the AY-3-8910 address writes and data writes are 500ns and 650ns respectively (I'm assuming when it is using a 2MHz clock. I may be wrong since I am pretty new to understanding timing diagrams, but that is how I am interpreting it. On top of that, you would be restricted to a speed slower than the AY-3-8910 on the 6502 if there was no VIA connected, since writes from the 6502 are very brief. For a 2MHz 6502 clock: (250ns - 130ns) = 120ns that the 6502 is writing... It looks like if I want to use a clock frequency faster than the AY-3-8910 I would have to use a VIA like you implemented and some type of timer + interrupt to correctly write to the registers on the AY-3-8910 without going under the minimum register write speed limit. Though I was hoping I could avoid using any type of interface adapter... Any input is gratefully appreciated. Thank you.
Hi, Jake. I haven't had any timing issues. While the Arduino may be running a faster clock, the effective rate of change at the PSG is slower (i.e., many Arduino clock cycles are required to write to the PSG. If it would be helpful, I can post my Arduino code that is directly interfacing with the PSGs. I can also post the schematic to my Arduino controller / sound card PCB. Just let me know. Thanks!
I see. I did manage to get it working on the arduino but I never looked into how many clock cycles was running. I tried just a few hours ago hooking it up directly to a 6502 address and data bus, using A9 as a chip select, and pulling A8 high on the AY. Though I was running into a bug where the AD lines would cause interference on the 6502 data lines even when the A9 line on the AY was pulled high. It probably would be better to just use a 6522, especially to time things correctly like with a 60hz timer… thank you for your reply!
I have a new old stock AY-3-8910 in my parts collection. This video will be a phenomenal resource! Thanks much!
Thanks for this video. It helped to get me started with the YM2149. If you look me up you will see I'm most familiar with the C64 6581 SID sound chip. It has 16 bits for pitch unlike the 12 bits for the YM2149. It is also adjusts pitch INVERTED to the YM chip. The larger the number the higher the pitch...so on the SID it gets more difficult to get accurate pitches at the lower frequencies. (fewer bits=less accuracy)The inverse is true with the YM2149. That is why I think it would be better to create your pitch table using a much lower A maybe even A 110~ as the starting point or even 55~ and use a tuner or scope to verify the pitch. Anyway, that's how I will do it, but thanks for this great video. I'm using a PIC16F887 at 20 mhz as the controller, and subdivided down to 2mhz for the YM2149, internally running at 4 mhz. The PIC is so fast that I must write in some delays so the YM can switch properly. I'm writing in raw assembler (MPASM) for the PIC. Thanks again !!
Thank you for all these resources, I would like to build a midi device with an ay-3-8912, and I feel a lot smarter, even if the two psg-s aren't exactly the same
Thanks for taking the time to walk through this!
You're welcome! Hopefully, it will be helpful for those wishing to experiment with these PSGs.
Hi, I'm currently playing around with an AY-3-8910 and got it working on an Arduino before I move on to integrating it into a 6502 computer setup I am working on. After finding your video I'm amazed with what you've accomplished, this is beyond anything I've seen yet! I was hoping maybe you could answer this question I have regarding the fundamental timing of the AY-3-8910 registers. After reading the timing diagrams of the datasheet I don't understand how the AY-3-8910 able to read the inputs to its registers from the Arduino during the write register functions, if the clock speed max for the AY-3-8910 is 2MHz and the Arduino runs at 16MHz, does the Arduino latch slower than I am thinking? The timing diagrams say the minimum timing for the AY-3-8910 address writes and data writes are 500ns and 650ns respectively (I'm assuming when it is using a 2MHz clock. I may be wrong since I am pretty new to understanding timing diagrams, but that is how I am interpreting it.
On top of that, you would be restricted to a speed slower than the AY-3-8910 on the 6502 if there was no VIA connected, since writes from the 6502 are very brief. For a 2MHz 6502 clock: (250ns - 130ns) = 120ns that the 6502 is writing... It looks like if I want to use a clock frequency faster than the AY-3-8910 I would have to use a VIA like you implemented and some type of timer + interrupt to correctly write to the registers on the AY-3-8910 without going under the minimum register write speed limit. Though I was hoping I could avoid using any type of interface adapter... Any input is gratefully appreciated. Thank you.
Hi, Jake. I haven't had any timing issues. While the Arduino may be running a faster clock, the effective rate of change at the PSG is slower (i.e., many Arduino clock cycles are required to write to the PSG. If it would be helpful, I can post my Arduino code that is directly interfacing with the PSGs. I can also post the schematic to my Arduino controller / sound card PCB. Just let me know. Thanks!
I see. I did manage to get it working on the arduino but I never looked into how many clock cycles was running. I tried just a few hours ago hooking it up directly to a 6502 address and data bus, using A9 as a chip select, and pulling A8 high on the AY. Though I was running into a bug where the AD lines would cause interference on the 6502 data lines even when the A9 line on the AY was pulled high. It probably would be better to just use a 6522, especially to time things correctly like with a 60hz timer… thank you for your reply!
@@rehsd Hey just want to update: After using the 6522 I got it working fine running the CPU at 5 MHz which is perfect!
@@JakeTheCake254 Nice!
oh
1234567890