0ldsk00l / nestopia

Cross-platform Nestopia emulator core with a GUI
http://0ldsk00l.ca/nestopia
GNU General Public License v2.0
690 stars 167 forks source link

Some Innacurate Sounds #29

Closed ghost closed 3 years ago

ghost commented 11 years ago

I haven't tested a whole lot of games, but one in particular has some minor sound issues.

Super Mario Bros 3 for instance sounds incorrect when Mario slides his feet while running (when compared to the real hardware). The sound of his feet sliding "skips" and kinda "pops". If you test it vs. the real thing you'll see what I mean. Heck you can test it vs. FCEU or BSNES (using the NES built in). Both of those emulators sound correct with this aspect.

It may be possible that this is not limited to only SMB3, but other games as well that use similar sounds perhaps? I'm not a coder so I wouldn't know.

Anyway, I thought you would like to know about this.

rdanbrook commented 11 years ago

I'll look into it. I've heard through the grapevine about other APU-related issues as well, which seem to be exposed by the libretro port, and the unix port with SDL sound under certain circumstances (probably pulseaudio), so it may be part of the same issue. What OS are you experiencing this on?

ghost commented 11 years ago

I've experienced it on Windows and on the Wii Retroarch Port.

anikom15 commented 11 years ago

Perhaps it has to do with latency? I will do some tests when I get a chance.

anikom15 commented 11 years ago

I checked SMB3 and noticed popping when Mario slides his feet. It's pretty subtle, but it doesn't seem like right behaviour.

rdanbrook commented 11 years ago

Yep, it's definitely there on every platform. It's a flaw in the core APU.

diggly commented 11 years ago

for some reason you don't hear the popping if you change the output to 11025 hz, but then everything else sounds worse :\

anikom15 commented 11 years ago

I think that would be due to the limited frequency response of 11025 Hz. The resolution is not high enough to produce a high frequency pop.

rdanbrook commented 11 years ago

Fixed! Let me know if the fix has created any new problems.

rdanbrook commented 11 years ago

Nevermind, it screwed up a lot of other things. But it did fix the SMB3 issues...

I'm gonna have to look deeper into the APU. I need to do some serious work on the APU anyway.

BParks21 commented 7 years ago

This ever gonna be fixed? It's been like 4 years, Marios sliding feet still sound crackly?

rdanbrook commented 7 years ago

It works in my own emulator, but it's hard to untangle the web of templates that is Nestopia. I may take another look at it in the future, since I do have a working APU of my own now and fully understand how it works. Going on sabbatical though, could be awhile.

ghost commented 5 years ago
NST_SINGLE_CALL dword Apu::Triangle::GetSample()
...
...
                amp -= Channel::OUTPUT_DECAY;
                step &= STEP_CHECK;

Change STEP_CHECK to 0x1F and SMB3 sliding should sound okay-ish. Triangle pattern should not reset when it's off but continue sliding up / down when it kicks back on. Since it currently resets to zero, we get the harsh treatment.

rdanbrook commented 5 years ago

There is still a horrible sound at the end of the slide with that value sometimes. I have it resolved in my own APU so I will maybe run a comparison one day. Won't have time to do that until Christmas. Maybe someone else can figure out the issue in the mean time.

rdanbrook commented 3 years ago

This has been fixed in another fork and the fix will be merged.