Skip to content
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

The Maze of the Kings (NAOMI GD-ROM): Repeating and cut off SFX #483

Closed
RavenMacDaddy opened this issue Jan 5, 2022 · 8 comments
Closed
Labels
audio Audio input/output related issue bug Something isn't working

Comments

@RavenMacDaddy
Copy link

Platform / OS / Hardware:

Windows 11 - 22000.376
Ryzen 3600
GTX 1080 - driver 497.29

Github hash: 7555263 (v1.2)

Description of the Issue

The Sega NAOMI GD-ROM game The Maze of the Kings seems to have been a tricky one to emulate, especially sound-wise.

The most apparent area being the first boss with a waterfall in the background.

As you hit the waterfall while shooting the triangles being fired at you, the intended SFX will start to disappear and repeat more and more, and after a while, it will only play the sound of hitting the waterfall.

The game overall gets its SFX cut off and repeated constantly - the above is simply a great example.

The same exact issues were seen in the now-old DEMUL emulator.

Debugging Steps Tested

  • Playing with DSP enabled and disabled (didn't see anything else of importance, especially since this has been a problem for seemingly all emulators).

Logs Gathered

00:13:118 hw\mem\_vmem.cpp:505 N[VMEM]: Info: nvmem is enabled, with addr space of size 512MB
00:13:142 hw\mem\_vmem.cpp:505 N[VMEM]: Info: nvmem is enabled, with addr space of size 512MB
00:18:393 hw\naomi\naomi_cart.cpp:367 N[NAOMI]: NAOMI GAME ID [THE MAZE OF THE KINGS]
00:18:394 emulator.cpp:227 N[BOOT]: Game ID is [THE MAZE OF THE KINGS]
@RavenMacDaddy RavenMacDaddy added the bug Something isn't working label Jan 5, 2022
@flyinghead
Copy link
Owner

I tested with the latest build and didn't notice any audio issue. I fixed an audio problem recently that used to affect Demul as well. So it's possible it fixed this problem as well.

Let me know if the issue persists with the latest build (77a2bbb).

@flyinghead flyinghead added the audio Audio input/output related issue label Apr 30, 2022
@RavenMacDaddy
Copy link
Author

RavenMacDaddy commented Apr 30, 2022

image

The issue is still there - I appreciate you working on it.

image

This is the problematic area.

I'm pretty sure there are other areas as well, but that's at least one of the first where it's really noticeable.

@superblobster
Copy link

superblobster commented Jul 21, 2022

The issue persists in the latest nightly build [76bf574]. I can upload a save state if it would make testing easier.
The first level sounds all fine until the first boss. From then on the bug happens sporadically in all subsequent levels.
It only seems to affect gunfire and enemy hit reactions. Music, voices and cutscenes sound okay, so it may give the false impression that everything is normal.

Also, I did some digging: the last version of demul (0.7 apr 28 2018) does not have this bug.

@flyinghead
Copy link
Owner

I was able to reproduce it but I have no idea what could be the cause.

@RavenMacDaddy
Copy link
Author

With the latest builds (started testing again with the release of NAOMI 2 support - great job BTW), currently running aa97a6d and e0d87eb, the issue is more severe - cutting SFX already when only shooting at enemies and the floor/walls, no water involved (i.e., more SFX involved).

Hopefully it provides some clues to what's the cause; some recent change might've made it worse.

Attempting to find exactly in which build it happened led to a dead end, cause both the oldest and newest commits under master and dev respectively give the same results.

...or maybe it's simply been a while since I last played the game, and I'm hallucinating that the issue has gotten worse when in reality it's unchanged.

@flyinghead
Copy link
Owner

I don't think any recent change would have any effect on this bug. One not-so-recent change could however: the clock speed of the audio cpu was doubled to fix a naomi 2 bug. This could have made things worse for this bug.

flyinghead added a commit that referenced this issue Dec 31, 2023
Some games rely on the channel still being processed and CA/LP being
updated. Courtesy of @kihato
Issues #472, #483, #1180, #1249, #1030 (partial)
@flyinghead
Copy link
Owner

Should be fixed in the latest dev build.

@RavenMacDaddy
Copy link
Author

Indeed, it seems to be — fantastic job!

I'll let you know if the issue creeps up in the feature — closing as completed.

flyinghead added a commit that referenced this issue Aug 29, 2024
CA was reset to 0 for non-looping sound when ending, but not for looping
ones when they reach full attenuation. This confuses some games.
Disable the channel when it reaches full attenuation and reset CA to 0.
Revert a7702c6
Issue #1602
Better fix for
Issues #472, #483, #1180, #1249, #1030 (partial)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Audio input/output related issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants