-
Notifications
You must be signed in to change notification settings - Fork 44
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
Inaccurate Music Balance #143
Comments
I hear the difference, it's the little shaking sand like instrument a few seconds in after the 3-2-1 countdown. That one instrument is heavily de-emphasized in the MiSTer core compared to whatever recording you have. Just making sure regarding the recording off of your real GBA, is that a sound-modded GBA at all? |
No, it's a stock original model gba from 2002, to my ears the balance is the same on all the other real hardware examples I have like micro, gb player, sp, though ideally gba would get something like mdfourier to help this issue |
Robert confirmed it can be fixed, he linked me to the relevant code in NanoBoyAdvance and the mentioned issue above has the details. The equivalent code from this section of the APU of that emulator needs to be implemented: sample[channel] += psg_sample * psg_volume * psg.master[channel] / 28;
for(int fifo = 0; fifo < 2; fifo++) {
if(dma[fifo].enable[channel]) {
sample[channel] += latch[fifo] * dma_volume_tab[dma[fifo].volume];
}
}
sample[channel] += mmio.bias.level;
sample[channel] = std::clamp(sample[channel], s16(0), s16(0x3FF));
sample[channel] -= 0x200; Division operators should generally be avoided at all costs in hardware design languages and multipliers will infer DSP blocks to be used. Trying to do it all with bit shifts and adds/subtracts would probably not be very precise and could lead to longer chains, so I think using a LUT might be preferred, checking resource usage of the GBA2P core to see what is best to do. Yup, plenty of BRAM in GBA2P, limited DSP available in it though, so BRAM would probably be best. |
@DarthPidgey Can you please try this attached build for me and see if it's fixed? Thank you! |
It's not fixed but also unless i'm doing something wrong, everything sounds completely wrong now. like entire parts of the song are just missing now, like several channels are completely missing instead of just being too quiet, making for an even more flat sound |
Let me add a recording of your build as well for hot crater act 1 |
Yup, figured it wouldn't be that easy :p |
Try this one out and see how it sounds to you for me please. It's not complete, but more to make sure I'm hearing it correctly. |
I'm not a programmer in the slightest but I'd say what you have done is absolutely on the right track here, compared to the latest official core i can here the missing sound and the quiet sound is now more balanced. In one of my mentioned songs, the Pokemon Fire red Leaf green trainer battle song at the beginning there is a bit of sound corruption but without that it still sounds considerably closer to the real GBA. And Hot Crater act 1 seems pretty close already. |
How about this one, is it better? |
there's still the oddly loud sound in pokemon FRLG and i think Hot Crater Act 1 is still too quiet, i have at least another recording of your current build running Hot Crater Act 1. |
And here's a recording of the beginning of the Pokemon FRLG Trainer Battle. Notice the sudden sharp noise? That's normally a lot quieter on real hardware and the official mister builds. How vexing now that there's something that's too loud. |
Does that take awhile to get to the point of that sound in Pokemon? Do you have a save file? |
I am using one of the debug roms floating around cause it has a sound test. The sound test doesn't change the music as my real hardware recordings are also from the sound test. But i'll also make a save file in a stock rom in just a moment. |
Here. just walk down out of the lab and the rival will automatically challenge you and the trainer battle theme will start after the dialogue. |
In the meantime I have also redone my recording of the Pokemon FRLG Trainer Battle theme on a real GBA to get it under the upload limit |
Thanks to test roms I received and some advice from Robert, it looks like this is probably a bit deeper of a problem than just any volume balance. I'm gonna try and keep working on this, but the hack test example core i gave is not how it should be fixed unfortunately. I'll get back to you if I figure something out. Thanks for testing! |
the march 17th build didn't fix this |
It wasn't supposed to, they were just framework changes. |
In several cases I've found inaccurate music in games, for lack of a better term as a am not technically sound at GBA processing, the balance in instruments seems to be off or nearly gone? Notable examples include Game Corner (Pokemon Ruby Sapphire Emerald) Ever Grande City (Pokemon Ruby Sapphire Emerald) Trainer Battle (Pokemon Firered LeafGreen) Pokedex (Pokemon Pinball Ruby and Sapphire) Hot Crater Act 1 (Sonic Advance 2) A common thread seems to be static noise used as percussion or an instrument between all these songs? I have more song recordings but the upload limit seems to be a problem so I chose Hot Crater as the most noticeable example, around halfway through the song the static instrument seems to be nearly if not missing on MiSTer? It's missing through both HDMI and IO board.
Music Comparison.zip
The text was updated successfully, but these errors were encountered: