Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ADPCM playback
#1
Here's my latest little demo, in which I decode an IMA-ADPCM-encoded song on the TLCS-900/H and play it back through the audio DACs using microDMA.

ROM + full source code (runs fine on a real NGPC, but not in any emulator that I know of)
youtube video recorded while running it on my NGPC. (Warning: there's a loud burst of noise right before the clip ends. I don't stop/loop the song when it ends, so when it goes past the end of the song it starts writing junk to the audio DACs).
Reply
#2
Very nice, mic_! I tweeted a link to this post, as your work deserves attention.
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
Nice work.

I just tried it in MESS, one of the sounds from the intro music keeps playing in the background and there is some slight stuttering which might be due to some timing issues between the timers and the dma timing Sad
Reply
#4
(10-12-2012, 05:41 AM)jdg Wrote: I just tried it in MESS, one of the sounds from the intro music keeps playing in the background and there is some slight stuttering which might be due to some timing issues between the timers and the dma timing Sad

You should get ahold of the MESS coder in charge of Neo Geo Pocket and have words with him!

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
#5
I've never used MESS, but Mednafen (and NeoPop, which Mednafen's NGPC emulation is based on) runs the timers at half their actual speed which causes an incorrect pitch. It also runs the ADPCM decoder routine way too fast because it doesn't seem to account for stuff like delays introduced by accessing data over the 8-bit bus that connects to the ROM, which causes a lot of skipping.
If you get stuttering then MESS is emulating the decoder routine slower than it runs on a real NGPC, so that it doesn't manage to fill the audio buffer with new data in time.
Reply
#6
By the way, jdg (aka Judge_) is the coder behind the NGP emulation in MESS, RAPE?, and RACE!.
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
#7
Ah. He's got his work cut out for him then Wink
Reply
#8
Interestingly enough, the other microdma playback test rom you posted works ok in mess now. I probably have a weird bug lurking somewhere.
Reply
#9
I've done another version with 24 kHz mono audio which is played back as 9-bit PCM (two 8-bit DACs combined for a mono stream): youtube | ROM
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)