Coder Social home page Coder Social logo

Inaccurate Music Balance about gba_mister HOT 19 OPEN

DarthPidgey avatar DarthPidgey commented on July 26, 2024
Inaccurate Music Balance

from gba_mister.

Comments (19)

DarthPidgey avatar DarthPidgey commented on July 26, 2024 1

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

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

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?

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

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.

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

@DarthPidgey Can you please try this attached build for me and see if it's fixed?

Thank you!

GBA.zip

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

Let me add a recording of your build as well for hot crater act 1
experimental build hot crater act 1.zip

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

Yup, figured it wouldn't be that easy :p

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

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.

GBA.zip

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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.

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

GBA.zip

How about this one, is it better?

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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.
experimental build 3.zip

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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.
Experimental build 3 Pokemon FRLG Trainer Battle.zip

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

Does that take awhile to get to the point of that sound in Pokemon? Do you have a save file?

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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.

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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.
Pokemon Firered Save.zip

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

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
Pokemon FRLG Trainer Battle Real GBA.zip

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

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!

from gba_mister.

DarthPidgey avatar DarthPidgey commented on July 26, 2024

the march 17th build didn't fix this

from gba_mister.

birdybro avatar birdybro commented on July 26, 2024

It wasn't supposed to, they were just framework changes.

from gba_mister.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.