|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
Help finding AY-3-8910 VGM files
Posted: Thu Jan 08, 2015 1:11 am
|
I'm currently building an Arduino controlled VGM player.
So far, I have it playing VGM files from an SD card using the SN76489 chip and it sounds amazing. ;-) I plan on implementing a couple more chips with the next one being the AY-3-8910 (AY-3-8912, technically). Anyway, I can send commands to the AY and have it play simple beeps but I need real music to play. I cannot seem to find any though. I believe the AY wasn't introduced into the official VGM format until version 1.51 I think? Every file I've found (all from here) has been 1.50 or lower and none seem to have the AY. Can someone point me in the right direction to download some of these VGM's? It would be awesome to have some that are AY-3-8910 only and some that are mixed with the SN76489 (to get 6 voices effectively). Thanks for any help. |
|
|
Posted: Thu Jan 08, 2015 1:45 am |
Well, I don't understand what you're doing, I don't know if those chips are often paired together in the first place. Have you checked http://vgmrips.net/packs/chip/ay8910 ?
This site mainly focuses on the sms/gg/mk III. Not clear if you wanted a mix with both chips (i don't personally know if it is possible). VGMs have their own format, so each chip may have completely different hex values representing commands. If you know what you're doing, you might be able to write a conversion program, but I doubt anyone has had any interest in doing that (least that I know).. You should look up the source to vgm play and study the vgm 1.71 specification. Though this might do for now: http://www.smspower.org/uploads/Music/vgmspec160.txt Good luck. I wish I understood how to do things like that. Sounds fun. |
|
|
Posted: Thu Jan 08, 2015 1:50 am |
Wow. Talk about timing! lol
Yeah, I just found that site. And I didn't realize that vgz files are just zipped up vgm files. So I got it working! Sorta...lol Anyway, what I am doing is creating a hardware vgm playing using the 1.70 spec. I plan on having 3-4 different audio chips in there. You'll be able to just play VGM files for the most part. Oh, and I am open-sourcing the whole thing. So I got the AY to play now (http://vgmrips.net/packs/pack/sorcerian-selected-sorcerian-vol-3-sharp-x1-turbo-psg-opm) but it starts to flake out after a while and gets fuzzy. More than likely my wiring. Anyway, this is great news to me! :-D Here is what I have done in the past (minus the AY chip) |
|
|
Posted: Thu Jan 08, 2015 3:08 am |
I have seen YM/AY/PSG arduino players before and they are hella fun. I happen to be designing something similar myself, but I can't talk about it right now.
in any case, can we see the wiring of your AY? Maybe we can help. |
|
|
Posted: Thu Jan 08, 2015 3:58 am |
Neat. That looks pretty cool.
How do you get the chip to read the vgm commands? Did you write a program to convert it back to code recognized by the chip? VGM hex doesn't necessarily match the original system. How does it work..do you program the chip directly? Or is there some cpu somewhere. Kinda hard to imagine how it works. (I don't know much about this stuff). Thanks for sharing |
|
|
Posted: Thu Jan 08, 2015 4:11 am |
The sound chips are whats called "Programmable sound generators." You must have a CPU manipulating sound registers built into the sound chips to produce the sounds, traditionally through a parallel interface (address bus/data bus). Registers may include: frequency, duty, volume, waveform, attack/decay, noise/pulse, etc. They also include start bits, length bits/bytes and sometimes sweeps or even sample playback. The YM's even contain FM operator registers. His microprocessor will read a VGM file from the Sd card and process each command in sequence, manipulating the sound registers accordingly. The PSG idea is pretty common and although each chip differs greatly in sounds and registers, all are controlled pretty much the same. AY's, YM's, SID's, 2a03's, etc. |
|
|
Posted: Thu Jan 08, 2015 7:21 am |
Thanks for the explanation. I think I understand a bit more, though I'd probably have to see it in person to really understand.
I'm guessing I would start with this (theoretically) https://www.westfloridacomponents.com/IC443PD12/AY-3-8912+AY38912+Programmable+S... and then find some way to install it on a mainboard with cpu and...do alot of things I can't wrap my mind around specifically. When I was looking it up, I saw some nds psg chips...do you guys play around with more modern chips as well? |
|
|
Posted: Thu Jan 08, 2015 10:10 am |
What's a nds psg chip? If you mean Nintend0 DS audio, it works by mixing 8/16-bit digital samples stored in RAM. |
|
|
Posted: Fri Jan 09, 2015 12:36 am |
This is pretty much spot on to what I'm doing. I will give out more detail at a later date (feel free to ask anytime though). But basically, here is what I have at a high level: The SN76489 is connected to an 8bit shift register. The AY38912 is connected to another 8bit shift register. I have a microcontroller (Arduino Micro) reading bytes off the SD card and sending those to the appropriate shift register (based off the command) to play the music. Each PSG is different but like stated, they all pretty much behave in a similar fashion. I'm not happy with the way the AY is sounding. There is a background hiss I cannot figure out where it's coming from. And, it's not always there. Also, I have one clock source for the PSG's. It's a 14.31818 MHz (4 times NTSC color burst) clock that runs through a 12 stage ripple counter. The ripple counter divides the clock into two different frequencies for each PSG. The SN76489 gets the NTSC color burst rate of 3.59..MHz while the AY38912 gets half that (1.79MHz). The specs on the AY say 1 - 2MHz max (8913 can go to 2.5MHz) but when I read the binary data in a few VGM's, they are set to 1.79MHz so that's what I use (seems logical anyway). That's about it for now. I still have a lot of work to do. Hopefully, this weekend, I will post some pics and new videos. Thanks! |
|
|
Posted: Fri Jan 09, 2015 11:24 pm |
I would like to suggest you wire some ceramic 100nf capacitors very close to your IC's, the AY and PSG's most notably. An electrolytic 47uF cap could help too since the arduino nano does not have any on board (like an arduino uno).
Noise comes from your power supplies most often, and these bypass caps will help to remove some of that. Also, how do you have the AY audio outputs hooked up to your amplifier or recorder? Directly? Try this in the attachment: (ignore the rest of the circuit since you have the clock and control buses all taken care of) |
|
|
Posted: Sat Jan 10, 2015 2:38 am |
Thanks for the tips! Yeah, I'm going to put some caps on those IC's. And, yes, unfortunately I have my three channels tied to one wire that is tied directly to some Logitech speakers. The good news is that I optimized the play routine for the AY and it's starting to sound pretty damn good!! It's still just a little off. The kids are in bed so I will try to post a video tomorrow so I can crank up the audio. Stay "tuned". lol Couldn't resist. |
|