Mortal Kombat 2/3/UMK3 Audio
-
Thought maybe I would get lucky and have it be OK when I updated Retropie. I think I'll always hope that the next update will fix it.
-
well, i had a go at investigating this:
https://github.com/libretro/mame2003-libretro/issues/43Tested on Raspberry Pi 3 and OSX x64, and the DCS speedhack on/off, with same results.
If you play MK2 for around 10 minutes, it will start to distort the audio (heavy buzzing and overlapping samples), for about a minute, before eventually settling down, but with an ever increasing audio latency. if you keep playing for another 10 minutes, the process will repeat, with the latency getting worse and worse.
i debugged this by enabling all the various logs in dcs.c here https://github.com/libretro/mame2003-libretro/blob/master/src/sndhrdw/dcs.c#L13, and replacing all
logerror(..)
withprintf(..)
. this prints a variety of info to the console. mostly a lot of this:DCS dac update: bytes in buffer = 398 DCS dac update: bytes in buffer = 531 DCS dac update: bytes in buffer = 424 DCS dac update: bytes in buffer = 557 DCS dac update: bytes in buffer = 449 DCS dac update: bytes in buffer = 342 DCS dac update: bytes in buffer = 475 DCS dac update: bytes in buffer = 368 DCS dac update: bytes in buffer = 500 DCS dac update: bytes in buffer = 393
i noticed that during the periods of distortion, the bytes used by the buffer, reported by https://github.com/libretro/mame2003-libretro/blob/master/src/sndhrdw/dcs.c#L915, are close to the defined DCS_BUFFER_SIZE of 4096 (https://github.com/libretro/mame2003-libretro/blob/master/src/sndhrdw/dcs.c#L23). the distortion goes away as it begins to go over 4096 bytes, and then will start up again as it reaches 8192, etc.
if you raise DCS_BUFFER_SIZE to 8192, it takes longer for the issues to start, but it still has the same problem, as the bytes in the buffer will continue to rise forever.
i don't know ANYTHING about audio programming, but i would have thought the buffer size should act as a limit, which cannot be exceeded? it seems this is quite happy to go above the buffer :) i want to try and preempt this behavior and reset the buffer before it reaches of DCS_BUFFER_SIZE, but i'm not sure if this is the right approach, or how to do it.
PS, if you want to quickly recreate this, just set DCS_BUFFER_SIZE to 1024 or something lower, and it will start happening in a few minutes.
(so that's about as far as I got... i'll need help from someone who knows audio programming to get much further)
-
Wow man, nice find. Hopefully this can be resolved, but sounds like it needs an audio specialist as you speculated. Maybe this issue was inherent with the emulators back in 2003 and was since fixed in new Mame iterations. Although the audio in MK is even worse with other cores.
-
@dankcushions , or anyone, how do I get into service menus with lr-mame4all? It's F2 on lr-mame2003 but I get no response while in lr-mame4all. The reason I ask is because I am trying to test audio for MK games on mame4all but it is so quiet. Also, my controls are seriously jacked in mame4all. Mame2003 has the "tab" button feature to just remap per game.
-
@GreenHawk84 i don't think any of that stuff works on lr-imame4all i'm afraid.
-
@dankcushions, so is there no way to access the service menu in mame4all?
-
@GreenHawk84 that's what i said...
-
@dankcushions , I see you have made discoveries recently regarding this issue. Awesome, so glad you continue to investigate. I wish I could buy you a beer !
-
@dankcushions , I see you updated both MK3 and UMK3 in the Mame2003 compatibility list. These had poor audio for me as well, but I will go back in and play them extensively and report back.
-
@GreenHawk84 said in Mortal Kombat 2/3/UMK3 Audio:
@dankcushions , I see you updated both MK3 and UMK3 in the Mame2003 compatibility list. These had poor audio for me as well, but I will go back in and play them extensively and report back.
i didn't... i had them all as 'has issues' someone seems to have turned both to 'ok' on the pi3, despite the issue log linked in the notes.
i've now reverted the all back to 'has issues'
-
@dankcushions , okay, that's what sucks about those lists, they are wide open for editing. I think known confirmed issues should be somehow locked until an admin has confirmed the fix. I also added a similar note to Rampage: World Tour.
-
@GreenHawk84 said in Mortal Kombat 2/3/UMK3 Audio:
@dankcushions , okay, that's what sucks about those lists, they are wide open for editing. I think known confirmed issues should be somehow locked until an admin has confirmed the fix. I also added a similar note to Rampage: World Tour.
that was supposed to be what's good about these sheets :)
however i've noticed the mame2003 sheet is completely screwed again despite all the editing rules i put on it. people can't be trusted so i'm reverting the last week or so and making it read only.
-
Just wanted to add a note here that MK2 on Mame2003 does not play the coin sounds at the start screen, only the continue screen. A very small detail but Mame4All plays the sound and it is based on and older romset.
-
Every once in a while I go back to MK2 and MK3 to see if any updates helped it, but to no avail. I hope one day my fav. games will be OK again. :(
-
@dankcushions, Anything new on this topic? If not that's fine, I was just curious.
-
Anything new to report? This sound issue is so frustrating. Other than that, the games run awesome and I love the MK series.
-
it's a shame there's this issue :( i'll update here and the github issue if there's anything to report. i tried an earlier version of lr-mame2003 but that first version i could compile on my mac (my dev environment) had the issue already. maybe i could port an even earlier version to mac but that's a pain.
basically nothing will happen with this issue unless you can find someone who knows C & audio programming well. i've done all i can :(
-
I note you said in your earlier post above dankcushions that you could increase the DCS_BUFFER_SIZE to at least delay the onset of the crackling audio.
You said you went from 4096 bytes to 8192 bytes. Have you tried pushing that to 16384 bytes or even higher?
Are you able to tell me how I can change this option in retropie on my Rpi3? Even if you can point me in the direction of the relevant config file, I can locate and edit the setting and do some testing.
Cheers
DM -
@darkmenace i replied to your other thread :) https://retropie.org.uk/forum/topic/7084/mame2003-audio-crackling-mortal-kombat-games/2
-
So still no luck with this one? I thought what will happen when lowering the buffer size?
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.