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

    Colecovision sound stutters

    Scheduled Pinned Locked Moved Help and Support
    colecovisionsound issue
    50 Posts 10 Posters 13.6k 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.
    • mediamogulM
      mediamogul Global Moderator @raymate
      last edited by

      @raymate

      The author of CoolCV is aware of the situation and has shown possible recent interest in updating the software with a few new features. If that happens, I'm sure he will address this slow down on the Pi as well. Be sure to watch this space for updates.

      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

      R 1 Reply Last reply Reply Quote 1
      • R
        raymate @mediamogul
        last edited by

        @mediamogul Good stuff, thanks for the info and reply

        RPi 1b / 2b / 3b / 3b+ / Zero W
        iBuffalo gamepad / Logitech F310 gamepad / NeoGeoX ArcadeStick / Retroflag case and Controller

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

          I have been debugging this, and it is the sdl2.0.5 update that has caused the issue.

          Unfortunately as it is closed source, I am unable to debug it further (at least debugging coolcv), and don't know what in SDL2 would have affected it as other SDL2 apps seem ok. (Changed my mind - I can debug SDL of course)

          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

          mediamogulM 1 Reply Last reply Reply Quote 1
          • mediamogulM
            mediamogul Global Moderator @BuZz
            last edited by

            @BuZz

            Thanks for taking the time to look into this. I've passed the information along to the developer here.

            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

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

              It's quite likely it's an issue with SDL2.0.5 (SDL 2.0.5 has had heaps of problems on the rpi) - I am going to try and git bisect it, but this will take some time.

              If I find the commit in SDL, I will revert it or backport any fix if there is one. If I can't (and the coolcv author cannot work around it), I may be forced to switch back to SDL2.0.4 again...

              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 1
              • BuZzB
                BuZz administrators
                last edited by

                I have found the commit that causes the issue (this references our git mirror, not the original repository)

                commit f0a9a821497b8e9d3e2496a5c5ab844cdddc5e4c
                Author: Sam Lantinga <slouken@libsdl.org>
                Date:   Wed Oct 12 22:25:19 2016 -0700
                
                    Work-around for a hang when USB devices are unplugged, contributed by James Zipperer
                
                diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
                index 3fdbd82..574d51b 100644
                --- a/src/audio/alsa/SDL_alsa_audio.c
                +++ b/src/audio/alsa/SDL_alsa_audio.c
                @@ -314,9 +314,20 @@ ALSA_PlayDevice(_THIS)
                     swizzle_alsa_channels(this, this->hidden->mixbuf, frames_left);
                 
                     while ( frames_left > 0 && SDL_AtomicGet(&this->enabled) ) {
                -        /* !!! FIXME: This works, but needs more testing before going live */
                -        /* ALSA_snd_pcm_wait(this->hidden->pcm_handle, -1); */
                -        int status = ALSA_snd_pcm_writei(this->hidden->pcm_handle,
                +        int status;
                +
                +        /* This wait is a work-around for a hang when USB devices are
                +           unplugged.  Normally it should not result in any waiting,
                +           but in the case of a USB unplug, it serves as a way to
                +           join the playback thread after the timeout occurs */
                +        status = ALSA_snd_pcm_wait(this->hidden->pcm_handle, 1000);
                +        if (status == 0) {
                +            /*fprintf(stderr, "ALSA timeout waiting for available buffer space\n");*/
                +            SDL_OpenedAudioDeviceDisconnected(this);
                +            return;
                +        }
                +
                +        status = ALSA_snd_pcm_writei(this->hidden->pcm_handle,
                                                          sample_buf, frames_left);
                 
                         if (status < 0) {
                

                I will see if this has been changed in newer versions and either revert or update.

                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 1
                • BuZzB
                  BuZz administrators
                  last edited by

                  Please can you update retropie-setup and update coolcv and let me know if that sorts it (I reverted the problematic commit in sdl2).

                  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 1
                  • BuZzB
                    BuZz administrators
                    last edited by

                    Issue has been reported upstream to sdl here - https://bugzilla.libsdl.org/show_bug.cgi?id=3599

                    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

                    edmaul69E 1 Reply Last reply Reply Quote 1
                    • B
                      barbudreadmon
                      last edited by

                      I'll try to fix fbalpha-libretro's colecovision inputs soon, that way you'll have an alternative to CoolCV.

                      FBNeo developer - github - forum

                      BuZzB RionR herb_fargusH 3 Replies Last reply Reply Quote 3
                      • BuZzB
                        BuZz administrators @barbudreadmon
                        last edited by BuZz

                        @barbudreadmon that would be great :) thanks.

                        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

                        mediamogulM 1 Reply Last reply Reply Quote 0
                        • mediamogulM
                          mediamogul Global Moderator @BuZz
                          last edited by

                          @BuZz

                          Everything is back up to speed and performing beautifully. It really does amaze me that a problem like this can be zeroed in on among an ocean of possible causes and rectified. Also, I know it doesn't "just happen", so again I thank you for taking the time to do this.

                          @barbudreadmon

                          I'll try to fix fbalpha-libretro's colecovision inputs soon, that way you'll have an alternative to CoolCV.

                          That would be fantastic! Thank you.

                          RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                          E 1 Reply Last reply Reply Quote 1
                          • E
                            EVEGames @mediamogul
                            last edited by

                            @mediamogul , does that mean there is a new CoolCV binary to be had, with these fixes in place? What would be our best way to get it installed over the top of our existing CoolCV?
                            Thanks!

                            mediamogulM 1 Reply Last reply Reply Quote 0
                            • mediamogulM
                              mediamogul Global Moderator @EVEGames
                              last edited by mediamogul

                              @EVEGames

                              There's no new binary, but BuZz fixed the root of the problem and it can be applied by using the 'Update from Binary' option for CoolCV in the RetroPie-Setup.

                              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                              E 1 Reply Last reply Reply Quote 1
                              • D
                                dman2552
                                last edited by

                                Is anyone else here running a USB sound device with CoolCV? It seems as long as my rpi3 is configured for USB sound, my screen goes blank and becomes unresponsive to any connected keyboard/controllers when I try to play any CV game (even launching a game from command line). I have to SSH in to reboot. This happens with a fresh 4.1 install to the latest 4.1.18 update with sound fix. So far everything else I use RetroPie for is fine.

                                RetroPie 4.1.18, RPi3B, 32GB microSD, Logitech F310, mini wireless keyboard

                                mediamogulM 1 Reply Last reply Reply Quote 0
                                • R
                                  raymate
                                  last edited by

                                  Sounds good, I updated from binary (think I did) and it didnt seem to change, I'm sure Im doing it wrong.

                                  For the newbies out here may just give us a quick guide.

                                  RPi 1b / 2b / 3b / 3b+ / Zero W
                                  iBuffalo gamepad / Logitech F310 gamepad / NeoGeoX ArcadeStick / Retroflag case and Controller

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

                                    @raymate you didn't update retropie-setup.

                                    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
                                    • mediamogulM
                                      mediamogul Global Moderator
                                      last edited by mediamogul

                                      My bad. I forgot to reiterate that above.

                                      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                      1 Reply Last reply Reply Quote 0
                                      • mediamogulM
                                        mediamogul Global Moderator @dman2552
                                        last edited by mediamogul

                                        @dman2552

                                        my screen goes blank and becomes unresponsive to any connected keyboard/controllers when I try to play any CV game

                                        I can't speak to the keyboard controls, but you might try adding the following to /opt/retropie/configs/all/runcommand-onstart.sh and see if it solves the screen issue. It was used to solve a similar issue in Kodi a while back and may work here.

                                        if [ "$2" = "coolcv" ]
                                        then
                                        fbset -depth 8
                                        fbset -depth 32
                                        fi
                                        

                                        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                        D 1 Reply Last reply Reply Quote 0
                                        • R
                                          raymate
                                          last edited by

                                          OK did from script and it works, sound normal. Perfect thank to all your hard work

                                          RPi 1b / 2b / 3b / 3b+ / Zero W
                                          iBuffalo gamepad / Logitech F310 gamepad / NeoGeoX ArcadeStick / Retroflag case and Controller

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            dman2552 @mediamogul
                                            last edited by

                                            @mediamogul said in Colecovision sound stutters:

                                            @dman2552

                                            my screen goes blank and becomes unresponsive to any connected keyboard/controllers when I try to play any CV game

                                            I can't speak to the keyboard controls, but you might try adding the following to /opt/retropie/configs/all/runcommand-onstart.sh and see if it solves the screen issue. It was used to solve a similar issue in Kodi a while back and may work here.

                                            if [ "$2" = "coolcv" ]
                                            then
                                            fbset -depth 8
                                            fbset -depth 32
                                            fi
                                            

                                            I tried as you suggested but it didn't work. I did find out what the problem was. I used the /etc/modprobe.d/alsa-base.conf method of setting the sound device but had to use the /etc/asound.conf method. All seems to be working great now.

                                            Thanks.

                                            RetroPie 4.1.18, RPi3B, 32GB microSD, Logitech F310, mini wireless keyboard

                                            1 Reply Last reply Reply Quote 1
                                            • 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.