-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a high-level emulation of the MP2K audio mixer. #170
Conversation
Hi! I'm looking into what the specific reasoning was for this formula in the apu: sample[channel] += psg_sample * psg_volume * psg.master[channel] / (28.0 * 0x200); Hopefully looking to help resolve this issue with the information --> MiSTer-devel/GBA_MiSTer#143 Thank you so much! :) |
@birdybro However this is for the HQ mixer, which uses floating point math for the final mix. See https://github.com/nba-emu/NanoBoyAdvance/blob/master/src/nba/src/hw/apu/apu.cpp#L186-L196 for the more accurate implementation which has the 28 factor but not the 0x200 factor. |
Thank you! Much appreciated! :) |
After talking with the developer of that core when I noticed something different... NanoBoyAdvance/src/nba/src/hw/apu/apu.cpp Line 123 in a30da20
This ordering of the division factor is different than no$'s documentation (his would be represented as {4, 2, 1, 0} instead AFAICT). I am going to test making the MiSTer GBA core reflect your division factor since I suspect that's the root cause (and it's the easiest thing to test first lol). https://github.com/MiSTer-devel/GBA_MiSTer/blob/master/rtl/gba_sound.vhd#L421-L427 - is the area I changed and am going test later... Edit: nope, not the root cause. |
@birdybro this is what I'm seeing in GBATEK (see SOUNDCNT_H):
|
Yeah I was just being stupid and not reading it right. The core is correct. Sorry. |
No description provided.