Midnight Resistance sound issues on lr-mame2003?
-
Hi all, and apologies for barging in here.
I have recently set up RetroPie on a Raspberry Pi 3 and it's been great! Thank you very much for putting together this project, and I'm looking forward to one day being able to revisit my childhood classics with my kids when they grow a bit older. :)
I seem to have experienced a similar symptom to @dankcushions ' https://github.com/libretro/mame2003-libretro/issues/43 playing Midnight Resistance from Data East - shortly after starting to play the sound starts to get choppy, slow, and the background audio seems to be playing multiple times at the same time, but time-shifted - so, as if the same track is playing, but with a constant delay, over the original one. This stays on until the audio eventually just turns into white noise permanently. It's weird.
My main concern is that I do not remember it doing this a couple of days ago, though I may just not have noticed as I was playing with the TV set audio quite low in order not to wake the kids, and that's why I'm starting this thread here before adding potentially noise or misinformation to the issue on GitHub.
Anything I can do to debug or troubleshoot this? If I launch lr-mame2003 with verbose logging, will the audio logs show somewhere? Is this a known issue anywhere - the compatibility lists don't seem to mention any sound issues, hence my question :| In fact, if others do confirm that they have played the game for a while with no trouble, I am inclined to believe it may have been a one off thing on my end (though I fail to speculate about what may have been the cause), or some configuration on my side.
As for relevant information:
Pi Model: RPi 3, with what I assume is the official 2.5A charger (I got the UCreate Starter Set from Amazon).
RetroPie Version Used: 4.0x, I believe. It was build from the RetroPie 3.8 image, installed, and then updated all binaries via the scripts. Followed all instructions, but it was done maybe 2 weeks ago already, so I suppose it'd be up to date - asides from any releasees in the past 2 weeks.
USB Devices connected: a keyboard and a USB pen drive where the ROMs are mounted from.
Controller used: PS3 controller. Set up the rotary controls on the MAME configuration to the shoulder buttons.
Error messages received: None.
File: midres.zip and midresu.zip
Emulator: lr-mame2003
Config files: I actually don't have my Pi here at the moment, but happy to get them. Which ones would be relevant? RetroArch? Mame? Both?Apologies for the trouble here, and let me know if there's a different place for me to record this - either a different issue, or maybe in a forum or something.
Thank you in advance for your time!
-
@pjft
firstly, thanks so much for this detailed post - really explains the issue :)this is interesting because it means that the issue seems to happen across different hardware and not something specific to that midway sound chip. i think it must be something to do with mame using a different sample rate or something like that for these games. but anyway, this gives me something to experiment with!
i will try and recreate this issue later and see if i can see anything the two games have in common. with the MK games it would take around 10 minutes before the issue surfaced, but here it happens sooner?
-
@dankcushions
By all means, thank you for the prompt reply.The reason I did not update the issue on GitHub is because I am unsure whether it is, effectively, related or not, and that's what's bugging me. I don't want to have anyone on a wild goose chase! :) What especially annoys me is that I didn't get the feeling that this was happening the first time around, though as I mentioned I did have the TV volume quite low. I remember I stopped playing and said to myself that I should play it some other day when I could have proper sound, as I was quite fond of the music in that game back in the day.
I'm happy to help in any way I can - I may record a video of it later, if it helps, and I'm more than happy to share any relevant .cfg files just in case it's a misconfiguration issue of sorts. Which ones would be the most helpful?
I've read that it could be power supply related, though I haven't observed any kind of rainbow square warning on my device. It may also have been a one-off, though it kept happening on several instances during the same play session (i.e. I'd exit back to emulationstation, and then tried to start again).
I tried changing sample rates, the audio latency, forcing audio sync, muting audio and even changed drivers from alsa to alsathread and some others (is "sdl" one of the drivers?) but nothing seemed to affect it.
Two weird things that may or may not be related:
- When I went to the RetroArch 1.3.6 audio section there are two options, I believe. Audio Enable, and Audio Mute or something. The first one is ON and the second one is OFF. When it gets to the "permanent white noise" stage, turning "Audio Enable" OFF or ON has no effect - the noise keeps coming. I was hoping that that would trigger some sort of audio engine reset, so I tried it :) The only way I could mute the sound was by turning "Audio Mute" ON. Still, going back to OFF did not change anything - still white noise. I'm not sure the option names are correct, but hopefully the message is understandable.
- I thought it could be a slowdown/lag issue, so I went to the Video settings and toggled the Frame Rate display so I could see if it was dropping. Surprisingly, not only was it not dropping but it was also higher than my limit, even though I have VSync on and, I suspect, have all options related to frame rate control turned on. The limit should be 50.0fps, but it went frequently to 58-59 fps. I know that this does not happen in FBA - i.e. the frame rate does not go over the intended one. Maybe it's something in my settings, but perhaps the fact that the audio is being synched to the frames, and the frame rates are going over the intended max causes this weird behavior? Unsure, just a thought.
I'll try it later in the day when I'm home and report back if anything changes - and if it may help, I might take a video of the game with the audio on so that it's easier to understand what I'm referring to. Yes, at the time it was happening 5 or so minutes in (getting to the permanent white noise stage), end of the first level, though the phased audio was noticeable already 1-2 mins into the game. This is what it should sound like:
As I said, I suspect I would have noticed it the first time I played it a couple of days ago, which is what baffles me - I feel like I remember the audio playing fine. In fact, I do have a save point on level 2-3 which, if I load, starts out with the correct audio where if yesterday I played the game through to the 2nd-3rd level (I don't quite recall where it is), the audio by then would already be a mess.
At this point in time, for better or for worse, I am strongly inclined to believe that it may be something on my system only, either configurations or power supply (?), and/or a one-off potentially caused by temperature-driven throttling - I had been running it for 1-2h by then playing some SNES games, and even though it didn't feel hot nor did I actually check the temperature, I cannot rule it out.
I will also try playing the game until the audio goes wrong, and then try to load a save state and see if it has any effect on the audio. Just for kicks. Unless the save state stores any state from the MAME audio device, or that it resets it, I doubt it would make any difference, but hopefully it'll be another data point.
Thanks for the availability here. I will report back as well after I try it tonight.
-
@pjft if i can recreate the issue, then you don't need to give me anything, but from what you're saying it might possibly not be the same issue - the MK2 issue would never go to full white noise, but just get very distorted, and then gradually get back to normal, and then repeat the process. the two systems have different audio code so it could yet be a similar issue just manifesting itself in different ways.
regardless, it's given me ideas about how i can solve the original issue, so it's useful! as you can see in the original issue, MK2 worked fine in older mame, just not the libretro core, which means there must be something that's changed in the libretro version that caused the issue. i have now spotted a few changes that are possible culprits, so i'm going to recompile older versions and see if i can find one that worked (at least, in MK2), and figure it out from there.
if you have a windows PC you can try midnight resistance in original mame. here's the link to a zip with the pc version of mame2003 (0.78): https://mirrors.xmission.com/mame/releases/mame078b.zip
-
@dankcushions
Thanks for the reply - I believe you may be correct. I'll let you know how it goes from my end, and thanks for looking into this. Also, happy to have given you some ideas on how to solve the MK2 issue :) Let me know how it goes!
I do not have a windows PC, but I'll report back on how it behaves in lr-mame2003 later today or tomorrow morning, and maybe in lr-fba-next - maybe that gives me some ideas on what may be happening.
Thanks! -
@dankcushions
Hi!
Ok, so I tried this a bit more and here's what I found - hope it helps:- It definitely happens again, every time. An easy way to get to that broken state is to play through it until the end of the first level. After you defeat the first tank, when you go up the stairs, the sounds should already be in a broken state.
- Loading a save state during the broken state stays the same - i.e. the sound stays broken.
- Resetting the game (via the MAME option) fixes the sound as well. Loading a save state after resetting loads the game at the save point, but the sound is now fine - until it breaks again. So that's useful at least, in the sense that it seems that the problem is with the Audio in mame, and not with the game itself.
- It doesn't happen on lr-fba-next.
It seems to be somewhat related with the sound channel playing at the same time as the music/background audio one, and that's where it starts to get mixed up.
In fact, an easy (if somewhat time consuming) way to replicate this is, in the (World) version of the game, just letting it run the attract sequence (i.e. the gameplay one, where the two guys run around shooting things) 3 times. After the second time, you should just be constantly listening to a regular noise, and the third attract sequence will no longer have music or background music, whereas the first two would.
The game has:
CPU: 68000 (12Mhz)
HuC6280 (3MHz) - sound
Sound:
1xYM2203 1.5MHz
1xYM3812 3MHz
1MSM6295 7.757kHznothing in common with MK3 or MK2.
Hope this helps somewhat :l
Do let me know if you can effectively replicate this on your end, though, and if there's anything else I can provide from my side.
Thanks a lot for your time!
-
Just to update this for future reference.
I tried to backport the code from recent MAMEs into 2003 for Midnight Resistance and all other Data East games, as the individual CPU clocks were all over the place in MAME2003, but for whatever reason even though the sound sync improved substantially, it never worked quite right in the end.
As such, I moved to MAME2010 for this particular game and works wonders, in case someone runs into the same issue.
Thanks!
-
just to let you know this has been fixed in 2003+ last week
-
@grant2258 well, these are great news! Thank you for the heads up!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.