Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
microDMA DAC playback example in C
#1
Here's another short example for the NGPC in C: Download

This one shows how you can play a stereo PCM stream through the audio DACs by combining a timer and an uDMA channel.
Note that the ROM doesn't work in Mednafen (as of 0.9.21) because Mednafen appears to run the timer too slow compared to a real NGPC, and more importantly it skips uDMA transfers with an initial transfer count (DMACn) of 0 instead of interpreting the 0 as 65536 like it should. The ROM works fine on a real NGPC though.

Compiles with Toshiba's compiler.
Reply
#2
Mic_

Thanks for keeping us updated with your developments! I've been pretty busy with travel and other real life stuff lately, so I haven't had a chance to check it out. Though, to be honest, I've got developments of my own piling up, so maybe I'll never dig myself out. Smile
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#3
No worries.
There isn't a whole lot of example code for the NGPC, so I figured I might as well write some. That way if someone stumbles in here in a few years looking for info on the NGPC they'll be able to find some. And the other purpose for doing these tests is to build up an understanding of the system, as I have plans to document the sound-programming aspects of the NGPC (sure, there are a few docs available + emulator sources, but they are usually incomplete and/or incorrect).
Reply
#4
You're right. This is all well-needed info, mic_. Thanks for publishing your info.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)