Questions: LibGME, NES APU & ad-oc Sound effects via C++ =)

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
jgarcia
Posts: 2
Joined: Tue Aug 14, 2018 6:10 am

Questions: LibGME, NES APU & ad-oc Sound effects via C++ =)

Post by jgarcia »

Hello everyone. (Apologies if this is posted in the wrong thread. I'm new here.)

I have somewhat of an odd-ball task at hand and am wondering if it's even worth continuing to explore, hence registering for this forum and asking for advice =).

I'm currently in the middle of porting a game my team and I wrote for an arduino platform to the new ODROID-GO. For the port, I manually migrated the music over to Famitracker and got the device to play music via LibGME and it sounds exactly as I envisioned: (demo: https://twitter.com/ModusJesus/status/1 ... 7681816576)

After getting this prototype to work, I decided to dive into the internals of LibGME to understand if I could generate SFX by leveraging C++ to take control of the registers in the APU Emulation and am running into problems. My hypothesis is that I could play an NSF (generated by Famitracker) and mute any particular channel via APU register writes and once the SFX is done, "release control" of the channel so that music would resume.

Has anyone attempted this? I have an active prototype working, but managing the timing of control of a particular channel and it's length is proving extremely challenging.

Am I nuts for attempting this?
jgarcia
Posts: 2
Joined: Tue Aug 14, 2018 6:10 am

Re: Questions: LibGME, NES APU & ad-oc Sound effects via C++

Post by jgarcia »

Given the deafening sounds of crickets, I am going to assume that the idea is definitely not worth the time. =)

Thanks to all who at least read the request and considered a response. This is a great community! Thank you to all of you who contributed to the wealth of documentation. I've learned a ton from what's been published and discussed here.
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Questions: LibGME, NES APU & ad-oc Sound effects via C++

Post by Banshaku »

If that make you feel better I never saw that first mail at all so maybe I'm not the only one that missed it :lol:

Since I do not know libGME I wouldn't be able to help you much on it but I would try instead to find a way to play the sounfx in a different thread or something, maybe with the same library? It's not like you are programming on the nes where you have no choice to mute the APU channels to be able to play sound fx: you can just play sound fx and mix them with the main one unless you want to reproduce what the nes does? This is the part I'm not sure about.

Maybe some people with libGME may be able to help you how that this thread has at the least 3 messages so it may get their attention, who knows? :)
Post Reply