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 38.1k 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.
    • GreenHawk84G
      GreenHawk84
      last edited by GreenHawk84

      I find that the Arcade Mortal Kombat games are very good on lr-Mame2003, however, MK2/3/UMK3 become scratchy in audio over lengthy play. It feels like a sync problem. MK1 does not seem to have this issue. I changed the driver to SDL in retroarch.cfg. I am not sure what other setting to use in order to stop this.

      1 Reply Last reply Reply Quote 2
      • BuZzB
        BuZz administrators
        last edited by

        You need to provide more information when posting (eg are you overclocked, which model etc)

        https://retropie.org.uk/forum/topic/3/read-this-first

        There is a speedhack option for those games - I think it's on lr-mame2003 in the core options. Have you tried that ?

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

          Pi Model: 3 Model B
          RetroPie Version Used: 4.0 beta (latest)
          Built From: SD Image
          USB Devices connected: MS wired keyboard
          Controller used: Xin Mo
          Error messages received: N/AP
          Guide used: N/AP
          File: mk2, mk3, umk3
          Emulator: lr-mame2003
          Overclocked: No
          Issue: Scratchy Audio over extended play (starts fine and slowly becomes awful over time)

          I didnt know about a speedhack. Is that accessed through 'TAB' key during a game?

          1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators
            last edited by

            accessed via the retroarch gui core options menu. (start+x)

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

              When I load up the game, pressing start and X do nothing. Pressing F1 as I read to access RGUI does nothing.

              1 Reply Last reply Reply Quote 0
              • BuZzB
                BuZz administrators
                last edited by

                Then it sounds like you have changed your hotkeys for entering RGUI. I'm afraid I don't currently have time to advise further.

                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

                  I got into RGUI. The DCS speed hack was already enabled so I disabled it, yet still the same issue. It happens right around the same time every time. I just let it go this time and the audio eventually came back around. It has to be a timing/sync thing (IMO).

                  I played with lowering sample rate and increasing audio latency but same exact issue.

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

                    re-enable the speed hack.

                    then try lowering the volume a bit in these games via the service menu: https://github.com/RetroPie/RetroPie-Setup/wiki/lr-mame2003#service-menu

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

                      Thanks @dankcushions , I was thinking the same thing at this moment (lowering the volume in service). I will try that later when I get home. When I setup MK2 I did turn the Volume in service up to like 75%. I'll dial it back to 50% and even lesser if I still get it.

                      Remember this isn't the whole time, it's only extended playing after like 10-15min, then it goes away and comes back in the same amount of time.

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

                        @GreenHawk84 yeah that is strange! I will have to test the same on my setup (I only played these games briefly). If not it could be a performance thing as I think these games are particularly intensive to emulate. it took the pi3 before MK1 was good in mame2003 (it is fine in mame4all on pi2, FYI). if so it may need overclocks to help out if there are still issues.

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

                          MK1 runs fantastic on my RPi3. As a matter of fact most everything does run amazing (Sega Genesis, SNES, NES, most arcade titles). I have yet to experience a single issue with most games. I will go back and play extensively on MK1 and see if anything turns up. I hope that arcade MK2 and MK3 continue to get support in order to run best on RPi3. I know that it can be done, it's already so close. Seems like it's just the audio issues.

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

                            Okay so I made a little video to show what is happening. I turned the volume down in the service menu to <50% and just turned my amp up.

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

                              I tested a few things to try and weed it out. I tried "alsathread" and "sdl2" drivers, same problem. Whats the default sound driver for arcade anyway? I tried disabling smoothing, no dice. I am convinced smoothing doesn't have such a huge hit on the system. Not sure where to go from here.. hopefully someone can figure it out or within an update to Retropie. Mortal Kombat was one of the main reasons I built my cabinet. Anyway, I'll continue to search and try things.

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

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

                                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:

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