Stereo DAC on YM2612
Posted: Sat Mar 26, 2011 7:57 pm
Hello there, allow me to introduce myself.
I go by the name of MarkeyJester and I am usually found hanging around on SonicRetro frequently, I don't usually browse or acknowledge SpritesMind (sorry), however a discussion on an irc channel on badnik.net about "Stereo" DAC playback lead me to being advised to share this here.
We were discussing PCM sample playback on the YM2612 and quality differences, when one individual noted that "Stereo" sample playback was not possible except the direct speaker choice (Left, Right or Both), in order to prove otherwise I wrote and assembled an MC68k software controlled PCM playback system.
by using a method of switching the FM6 panning to left speaker, flushing the left speaker PCM byte to the DAC channel port, then switching the FM6 panning to right speaker, and flushing the right speaker PCM byte to the DAC channel port, simultaneously in a loop. With MC68k being a fast enough processor, I was able to have it play a 44,100 mhz stereo 8-bit (just under 1 minute) music track by Duran Duran.
"andlabs" a user in the channel at the time suggested that you people here at SpritesMind would be interested in this. So I've decided to comply with that and registered to make this post.
http://mrjester.hapisan.com/00_PRVT/PCM.rar
here is a link to the source code along with a pre-built rom, it works reasonably well in Kega, Gens seems to have issues with it though, but on real hardware it's turned out more crispy and in more brilliant quality than I expected myself (I guess it goes to show how bad Mega Drive emulators are at emulating PCM playback).
I'd also like to pardon my ignorance, as I said, I don't usually read these forums and although I ran a quick (although non-thorough) search, I didn't find any topics similar to this, I do apologise if this is not something any of you are interested in or if it's something that happens to be last year's old news.
Whatever the cost, enjoy.
I go by the name of MarkeyJester and I am usually found hanging around on SonicRetro frequently, I don't usually browse or acknowledge SpritesMind (sorry), however a discussion on an irc channel on badnik.net about "Stereo" DAC playback lead me to being advised to share this here.
We were discussing PCM sample playback on the YM2612 and quality differences, when one individual noted that "Stereo" sample playback was not possible except the direct speaker choice (Left, Right or Both), in order to prove otherwise I wrote and assembled an MC68k software controlled PCM playback system.
by using a method of switching the FM6 panning to left speaker, flushing the left speaker PCM byte to the DAC channel port, then switching the FM6 panning to right speaker, and flushing the right speaker PCM byte to the DAC channel port, simultaneously in a loop. With MC68k being a fast enough processor, I was able to have it play a 44,100 mhz stereo 8-bit (just under 1 minute) music track by Duran Duran.
"andlabs" a user in the channel at the time suggested that you people here at SpritesMind would be interested in this. So I've decided to comply with that and registered to make this post.
http://mrjester.hapisan.com/00_PRVT/PCM.rar
here is a link to the source code along with a pre-built rom, it works reasonably well in Kega, Gens seems to have issues with it though, but on real hardware it's turned out more crispy and in more brilliant quality than I expected myself (I guess it goes to show how bad Mega Drive emulators are at emulating PCM playback).
I'd also like to pardon my ignorance, as I said, I don't usually read these forums and although I ran a quick (although non-thorough) search, I didn't find any topics similar to this, I do apologise if this is not something any of you are interested in or if it's something that happens to be last year's old news.
Whatever the cost, enjoy.