FPGA Genesis with Sound
Moderator: BigEvilCorporation
FPGA Genesis with Sound
As mentioned in another post, my group is implementing a full Sega Genesis system on an FPGA. This is built off the fpgagen project by Gregory Estrade (Torlus): http://code.google.com/p/fpgagen/. We've ported the project from Altera to Xilinx and added an original YM2612 driver and cartridge/controller interfaces. Here are the preliminary results of our work:
http://www.youtube.com/watch?v=zDLWVD2OwmI
So far I have channels 1-4 plus the DAC output running. The other 2 channels would be easy to add but Xilinx is running out of memory trying to synthesize them. LFO and SSGEG are not implemented yet. As you can tell, there are a good number of bugs in the sound, but the basic channel output calculations are solid. Lots of thanks to Nemesis and the MAME authors for helping to get this off the ground.
Also thanks to everyone's help on this board for getting the sound to the output driver. I'll be releasing additional videos and open sourcing the code once everything's cleaned up if anyone's interested.
UPDATE: Fixed up most of the sound. Still a little bit of buzzing that we need to identify and get rid of. The problem was overflow in calculating the attenuation along with hardware issues. See the video here: http://www.youtube.com/watch?v=x17vwVRRScc
WARNING: I apologize for all the talking in the background (including myself). Our lab is pretty busy right now and there's not a lot of time to shoot the video. I'll get a clean version up when everything is completely done.
UPDATE2: Better video here: http://www.youtube.com/watch?v=zZyLj1gX0_k
UPDATE3: Source available at http://sourceforge.net/projects/teamgenesis/. Not cleaned up/commented in many places, peruse at your own risk.
http://www.youtube.com/watch?v=zDLWVD2OwmI
So far I have channels 1-4 plus the DAC output running. The other 2 channels would be easy to add but Xilinx is running out of memory trying to synthesize them. LFO and SSGEG are not implemented yet. As you can tell, there are a good number of bugs in the sound, but the basic channel output calculations are solid. Lots of thanks to Nemesis and the MAME authors for helping to get this off the ground.
Also thanks to everyone's help on this board for getting the sound to the output driver. I'll be releasing additional videos and open sourcing the code once everything's cleaned up if anyone's interested.
UPDATE: Fixed up most of the sound. Still a little bit of buzzing that we need to identify and get rid of. The problem was overflow in calculating the attenuation along with hardware issues. See the video here: http://www.youtube.com/watch?v=x17vwVRRScc
WARNING: I apologize for all the talking in the background (including myself). Our lab is pretty busy right now and there's not a lot of time to shoot the video. I'll get a clean version up when everything is completely done.
UPDATE2: Better video here: http://www.youtube.com/watch?v=zZyLj1gX0_k
UPDATE3: Source available at http://sourceforge.net/projects/teamgenesis/. Not cleaned up/commented in many places, peruse at your own risk.
Last edited by Shaho on Thu Dec 05, 2013 10:13 pm, edited 4 times in total.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 745
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Thanks guys! Especially Torlus, thank you so much for some clean, easily modifiable code . I'm glad you're still checking in here.
As for the board, we're using a Xilinx XUPV5-LX110T through our university. This is definitely overkill, and in fact would have probably been easier through with a DE1 or DE2, since we were forced to use DVI instead of VGA video output. The audio codec would have to be changed from AC97 to the codec on the Altera board, but that's fairly straightforward. I don't recall a cheap Xilinx board that combines DVI/VGA output with audio off the top of my head.
I've cleaned up the FM chip to be able to synthesize all six channels, but I haven't checked the board usage after this change. It was about 50% before with rather inefficient code so it should be better than that.
As for the board, we're using a Xilinx XUPV5-LX110T through our university. This is definitely overkill, and in fact would have probably been easier through with a DE1 or DE2, since we were forced to use DVI instead of VGA video output. The audio codec would have to be changed from AC97 to the codec on the Altera board, but that's fairly straightforward. I don't recall a cheap Xilinx board that combines DVI/VGA output with audio off the top of my head.
I've cleaned up the FM chip to be able to synthesize all six channels, but I haven't checked the board usage after this change. It was about 50% before with rather inefficient code so it should be better than that.
We added the 3 tone channels of the PSG. Sonic makes jumping noises now! We also cleaned up the YM2612 quite a bit. To my ears, it sounds pretty good, but please let me know if you see/hear anything wrong. New video is here: http://www.youtube.com/watch?v=zZyLj1gX0_k.
I'll also take requests if anyone wants to see/hear any game in particular, since we may not have access to this board after this week. We are still missing the LFO, SSGEG, and CH3/6 independent frequencies in the YM2612, and the white noise generator in the PSG.
I'll also take requests if anyone wants to see/hear any game in particular, since we may not have access to this board after this week. We are still missing the LFO, SSGEG, and CH3/6 independent frequencies in the YM2612, and the white noise generator in the PSG.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
The sound has fuzz in it that is not right for sure, but that may just be distortion from being too loud. Not sure.
SoR does not quite sound right either
SoR does not quite sound right either
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Thanks! I'll run through an emulator later and compare. One thing is we are outputting at ~53 kHz and sampling at 48 kHz, so there's a little bit of data loss there. Not sure how much that would affect it. We shifted everything to a 16 bit output with 14-bits of precision, where I think the Genesis used 9 bits.
Edit: I see what you mean about Streets of Rage. It's way off, especially the drums and punch effects. Only thing I noticed from the emulator debug was that Channel 3 special mode was being used, so I may have to implement that and see if it makes a difference. Again, thanks so much for pointing that out.
Edit: I see what you mean about Streets of Rage. It's way off, especially the drums and punch effects. Only thing I noticed from the emulator debug was that Channel 3 special mode was being used, so I may have to implement that and see if it makes a difference. Again, thanks so much for pointing that out.
Hi,
I designed the fpgaarcade replay board and have been looking at porting this to the board (based on a Spartan3 1600e) . I am happy to help out!
www.fpgaarcade.com
Best,
/Mike
I designed the fpgaarcade replay board and have been looking at porting this to the board (based on a Spartan3 1600e) . I am happy to help out!
www.fpgaarcade.com
Best,
/Mike