RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Mortal Kombat 2/3/UMK3 Audio

    Scheduled Pinned Locked Moved Help and Support
    76 Posts 13 Posters 37.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dankcushionsD
      dankcushions Global Moderator @GreenHawk84
      last edited by

      @GreenHawk84 said in Mortal Kombat 2/3/UMK3 Audio:

      Do games ever improve on a core from updates or will this game forever be this way?

      it depends on your issue. i've done some updates to mame2003.

      anyway, i could recreate it - it briefly did the distortion for one round. CPU useage wasn't that high so i don't think it is performance. not sure.

      1 Reply Last reply Reply Quote 0
      • GreenHawk84G
        GreenHawk84
        last edited by

        @dankcushions , I wonder why yours was brief vs. mine being a couple rounds worth.

        1 Reply Last reply Reply Quote 0
        • GreenHawk84G
          GreenHawk84
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • dankcushionsD
            dankcushions Global Moderator
            last edited by

            well, i had a go at investigating this:
            https://github.com/libretro/mame2003-libretro/issues/43

            Tested 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(..) with printf(..). 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)

            1 Reply Last reply Reply Quote 1
            • GreenHawk84G
              GreenHawk84
              last edited by GreenHawk84

              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.

              1 Reply Last reply Reply Quote 0
              • GreenHawk84G
                GreenHawk84
                last edited by

                @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.

                dankcushionsD 1 Reply Last reply Reply Quote 0
                • dankcushionsD
                  dankcushions Global Moderator @GreenHawk84
                  last edited by

                  @GreenHawk84 i don't think any of that stuff works on lr-imame4all i'm afraid.

                  GreenHawk84G 1 Reply Last reply Reply Quote 0
                  • GreenHawk84G
                    GreenHawk84 @dankcushions
                    last edited by

                    @dankcushions, so is there no way to access the service menu in mame4all?

                    dankcushionsD 1 Reply Last reply Reply Quote 0
                    • dankcushionsD
                      dankcushions Global Moderator @GreenHawk84
                      last edited by

                      @GreenHawk84 that's what i said...

                      1 Reply Last reply Reply Quote 0
                      • GreenHawk84G
                        GreenHawk84
                        last edited by

                        @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 !

                        1 Reply Last reply Reply Quote 1
                        • GreenHawk84G
                          GreenHawk84
                          last edited by

                          @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.

                          dankcushionsD 1 Reply Last reply Reply Quote 0
                          • dankcushionsD
                            dankcushions Global Moderator @GreenHawk84
                            last edited by

                            @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'

                            1 Reply Last reply Reply Quote 0
                            • GreenHawk84G
                              GreenHawk84
                              last edited by

                              @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.

                              dankcushionsD 1 Reply Last reply Reply Quote 0
                              • dankcushionsD
                                dankcushions Global Moderator @GreenHawk84
                                last edited by

                                @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.

                                1 Reply Last reply Reply Quote 1
                                • GreenHawk84G
                                  GreenHawk84
                                  last edited by

                                  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.

                                  1 Reply Last reply Reply Quote 0
                                  • GreenHawk84G
                                    GreenHawk84
                                    last edited by

                                    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. :(

                                    1 Reply Last reply Reply Quote 1
                                    • GreenHawk84G
                                      GreenHawk84
                                      last edited by GreenHawk84

                                      @dankcushions, Anything new on this topic? If not that's fine, I was just curious.

                                      1 Reply Last reply Reply Quote -1
                                      • D
                                        darkmenace
                                        last edited by

                                        Anything new to report? This sound issue is so frustrating. Other than that, the games run awesome and I love the MK series.

                                        1 Reply Last reply Reply Quote 0
                                        • dankcushionsD
                                          dankcushions Global Moderator
                                          last edited by

                                          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 :(

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            darkmenace
                                            last edited by

                                            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

                                            dankcushionsD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.