Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AMIGA get working
#11
(02-09-2019, 03:12 AM)alexkidd Wrote: should fix by adding  "amiberry" to emulatornames in /home/pi/RetrOrangePi/Background_Music/bgmusic.py

i think i have broken something cause i dont have background music now Sad

Code:
import os
import time
import random
#import pygame # if you don't have pygame: sudo apt-get install python-pygame
#also that line is commented out as we import the mixer specifically a bit further down.

#CONFIG SECTION
startdelay = 0 # Value (in seconds) to delay audio start.  If you have a splash screen with audio and the script is playing music over the top of it, increase this value to delay the script from starting.
musicdir = '/home/pi/RetroPie/music'
maxvolume = 0.50
volumefadespeed = 0.02
restart = True # If true, this will cause the script to fade the music out and -stop- the song rather than pause it.
startsong = "" # if this is not blank, this is the EXACT, CaSeSeNsAtIvE filename of the song you always want to play first on boot.

#local variables
bgm = [mp3 for mp3 in os.listdir(musicdir) if mp3[-4:] == ".mp3" or mp3[-4:] == ".ogg"] # Find everything that's .mp3 or .ogg
lastsong = -1
currentsong = -1
from pygame import mixer # import PyGame's music mixer
mixer.init() # Prep that bad boy up.
random.seed()
volume = maxvolume # Store this for later use to handle fading out.

#TODO: Fill in all of the current RetroPie Emulator process names in this list.
emulatornames = ["amiberry","wolf4sdl-3dr-v14", "wolf4sdl-gt-v14", "wolf4sdl-spear", "wolf4sdl-sw-v14", "xvic","xvic cart","xplus4","xpet","x128","x64sc","x64","PPSSPPSDL","prince","OpenBOR","Xorg","retroarch","ags","uae4all2","uae4arm","capricerpi","linapple","hatari","stella","atari800","xroar","vice","daphne.bin","reicast","pifba","osmose","gpsp","jzintv","basiliskll","mame","advmame","dgen","openmsx","mupen64plus","gngeo","dosbox","ppsspp","simcoupe","scummvm","snes9x","pisnes","frotz","fbzx","fuse","gemrb","cgenesis","zdoom","eduke32","lincity","love","kodi","alephone","micropolis","openbor","openttd","opentyrian","cannonball","tyrquake","ioquake3","residualvm","xrick","sdlpop","uqm","stratagus","wolf4sdl","solarus_run","mplayer"]

#test: Ran into some issues with script crashing on a cold boot, so we're camping for emulationstation (if ES can start, so can we!)
esStarted = False
while not esStarted:
    time.sleep(1)
    pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
    for pid in pids:
        try:
            procname = open(os.path.join('/proc',pid,'comm'),'rb').read()
            if procname[:-1] == "emulationstatio": # Emulation Station's actual process name is apparently short 1 letter.
                esStarted=True
        except IOError:    
            continue

#ES Should be going, see if we need to delay our start

if startdelay > 0:
    time.sleep(startdelay) # Delay audio start per config option above
    
#Look for OMXplayer - if it's running, someone's got a splash screen going!
pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
for pid in pids:
    try:
        procname = open(os.path.join('/proc',pid,'comm'),'rb').read()
        if procname[:-1] == "omxplayer" or procname[:-1] == "omxplayer.bin": # Looking for a splash screen!
            while os.path.exists('/proc/'+pid):
                time.sleep(1) #OMXPlayer is running, sleep 1 to prevent the need for a splash.
    except IOError:    
        continue
        
#Check for a starting song
if not startsong == "":
    try:
        currentsong = bgm.index(startsong) #Set the currentsong to the index in BGM that is our startingsong.
    except:
        currentsong = -1 #If this triggers, you probably screwed up the filename, because our startsong wasn't found in the list.

#This is where the magic happens.
while True:
    while not esStarted: #New check (4/23/16) - Make sure EmulationStation is actually started.  There is code further down that, as part of the emulator loop, makes sure eS is running.
        if mixer.music.get_busy():
            mixer.music.stop(); #halt the music, emulationStation is not running!
        time.sleep(10)
        pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
        for pid in pids:
            try:
                procname = open(os.path.join('/proc',pid,'comm'),'rb').read()
                if procname[:-1] == "emulationstatio": # Emulation Station's actual process name is apparently short 1 letter.
                    esStarted=True # Will cause us to break out of the loop because ES is now running.
            except IOError:    
                continue
                
    #Check to see if the DisableMusic file exists; if it does, stop doing everything!
    if os.path.exists('/home/pi/RetrOrangePi/Background_Music/DisableMusic'):
        #print "DisableMusic found!"
        if mixer.music.get_busy():
            mixer.music.stop();
        while (os.path.exists('/home/pi/RetrOrangePi/Background_Music/DisableMusic')):
            time.sleep(15)
        #print "DisableMusic gone!"

    if not mixer.music.get_busy(): # We aren't currently playing any music
        while currentsong == lastsong and len(bgm) > 1:    #If we have more than one BGM, choose a new one until we get one that isn't what we just played.
            currentsong = random.randint(0,len(bgm)-1)
        song = os.path.join(musicdir,bgm[currentsong])
        mixer.music.load(song)
        lastsong=currentsong
        mixer.music.set_volume(maxvolume) # Pygame sets this to 1.0 on new song; in case max volume -isnt- 1, set it to max volume.
        mixer.music.play()
        #print "BGM Now Playing: " + song
        
    #Emulator check
    pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
    emulator = -1;
    esStarted=False #New check 4-23-16 - set this to False (assume ES is no longer running until proven otherwise)
    for pid in pids:
        try:
            procname = open(os.path.join('/proc',pid,'comm'),'rb').read()
            if procname[:-1] == "emulationstatio": # Killing 2 birds with one stone, while we look for emulators, make sure EmulationStation is still running.
                    esStarted=True # And turn it back to True, because it wasn't done running.  This will prevent the loop above from stopping the music.
            
            if procname[:-1] in emulatornames: #If the process name is in our list of known emulators
                emulator = pid;
                #Turn down the music
                #print "Emulator found! " + procname[:-1] + " Muting the music..."
                while volume > 0:
                    volume = volume - volumefadespeed
                    if volume < 0:
                        volume=0
                    mixer.music.set_volume(volume);
                    time.sleep(0.05)            
                if restart:
                    mixer.music.stop() #we aren't going to resume the audio, so stop it outright.
                else:
                    mixer.music.pause() #we are going to resume, so pause it.
                #print("Muted.  Monitoring emulator.")
                while os.path.exists("/proc/" + pid):
                    time.sleep(1); # Delay 1 second and check again.
                #Turn up the music
                #print "Emulator finished, resuming audio..."
                if not restart:
                    mixer.music.unpause() #resume
                    while volume < maxvolume:
                        volume = volume + volumefadespeed;
                        if volume > maxvolume:
                            volume=maxvolume
                        mixer.music.set_volume(volume);
                        time.sleep(0.05)                
                #print "Restored."
                volume=maxvolume # ensures that the volume is manually set (if restart is True, volume would be at zero)

        except IOError: #proc has already terminated, ignore.
            continue

    time.sleep(1);
    #end of the main while loop
    
print "An error has occurred that has stopped Test1.py from executing." #theoretically you should never get this far.
Reply
#12
Hello, 

I cannot get UAE4Arm to work on my RetroStone so have tried Amiberry as suggested in this thread, however I cannot install Amiberry due to some dependencies that can not load such as libsdl1.2-dev.

This is a fresh install of Ropi 4.2 full on RetroStone. Any advice welcome.

UPDATE: I have included my RP_Setup log output below:

Log started at: Sun Apr  7 02:01:47 CEST 2019

RetroPie-Setup version: 4.4.7 (09e34b0)
System: Linux RetrOrangePi 3.4.113-sun8i #12 SMP PREEMPT Fri Aug 17 01:23:50 CEST 2018 armv7l GNU/Linux

= = = = = = = = = = = = = = = = = = = = =
Installing dependencies for 'amiberry' : Amiga emulator with JIT support (forked from uae4arm)
= = = = = = = = = = = = = = = = = = = = =

Did not find needed package(s): libsdl1.2-dev libsdl-gfx1.2-dev libsdl-ttf2.0-dev libguichan-dev libmpg123-dev libxml2-dev libflac-dev libmpeg2-4-dev. I am trying to install them now.
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [7,340 B]
Ign http://httpredir.debian.org jessie-backports InRelease
Hit http://httpredir.debian.org jessie Release.gpg
Ign http://httpredir.debian.org jessie-backports Release.gpg
Hit http://httpredir.debian.org jessie Release
Ign http://httpredir.debian.org jessie-backports Release
Get:3 http://security.debian.org jessie/updates/main armhf Packages [795 kB]
Hit http://apt.armbian.com jessie InRelease
Get:4 http://httpredir.debian.org jessie/main armhf Packages [8,898 kB]
Get:5 http://security.debian.org jessie/updates/contrib armhf Packages [994 B]
Get:6 http://security.debian.org jessie/updates/non-free armhf Packages [4,416 B]
Get:7 http://apt.armbian.com jessie/main armhf Packages [454 kB]
Get:8 http://httpredir.debian.org jessie/contrib armhf Packages [44.3 kB]
Get:9 http://httpredir.debian.org jessie/non-free armhf Packages [74.9 kB]
Get:10 http://apt.armbian.com jessie/jessie-utils armhf Packages [7,949 B]
Err http://httpredir.debian.org jessie-backports/main armhf Packages
  
Err http://httpredir.debian.org jessie-backports/contrib armhf Packages
  
Get:11 http://apt.armbian.com jessie/jessie-desktop armhf Packages [22.6 kB]
Err http://httpredir.debian.org jessie-backports/non-free armhf Packages
  
Err http://httpredir.debian.org jessie-backports/main armhf Packages
  
Err http://httpredir.debian.org jessie-backports/contrib armhf Packages
  
Err http://httpredir.debian.org jessie-backports/non-free armhf Packages
  
Err http://httpredir.debian.org jessie-backports/main armhf Packages
  
Err http://httpredir.debian.org jessie-backports/non-free armhf Packages
  
Err http://httpredir.debian.org jessie-backports/main armhf Packages
  404  Not Found [IP: 151.101.184.204 80]
Err http://httpredir.debian.org jessie-backports/contrib armhf Packages
  404  Not Found [IP: 151.101.184.204 80]
Err http://httpredir.debian.org jessie-backports/non-free armhf Packages
  404  Not Found [IP: 151.101.184.204 80]
Fetched 10.4 MB in 15s (651 kB/s)
W: Failed to fetch http://httpredir.debian.org/debian/dists.../InRelease  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://httpredir.debian.org/debian/dists...f/Packages  404  Not Found [IP: 151.101.184.204 80]

W: Failed to fetch http://httpredir.debian.org/debian/dists...f/Packages  404  Not Found [IP: 151.101.184.204 80]

W: Failed to fetch http://httpredir.debian.org/debian/dists...f/Packages  404  Not Found [IP: 151.101.184.204 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  liballegro4-dev libasound2-dev libcaca-dev libcaca0 libdirectfb-dev
  libdrm-amdgpu1 libdrm-dev libdrm-exynos1 libdrm-freedreno1 libdrm-nouveau2
  libdrm-omap1 libdrm-radeon1 libdrm-tegra0 libdrm2 libfreetype6-dev
  libgl1-mesa-dev libgl1-mesa-glx libglapi-mesa libgles1-mesa libgles2-mesa
  libglib2.0-0 libglib2.0-bin libglib2.0-dev libglu1-mesa-dev libjbig-dev
  libjpeg-dev libjpeg62-turbo libjpeg62-turbo-dev liblzma-dev libogg-dev
  libpng12-dev libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0
  libpulse0 libpulsedsp libsdl-image1.2-dev libsdl1.2debian libslang2-dev
  libsoxr0 libtiff5 libtiff5-dev libtiffxx5 libwebp-dev libx11-dev
  libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev
  libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev
  libxcb-sync-dev libxcb-xfixes0-dev libxcb1-dev libxcursor-dev libxdamage-dev
  libxdmcp-dev libxext-dev libxfixes-dev libxml2 libxpm-dev libxrender-dev
  libxshmfence-dev libxxf86vm-dev mesa-common-dev pkg-config pulseaudio
  pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-utils
  x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev
  x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-render-dev
  x11proto-xext-dev x11proto-xf86vidmode-dev xtrans-dev
Suggested packages:
  libasound2-doc libglib2.0-doc liblzma-doc libsdl-gfx1.2-doc libxcb-doc
  libxext-doc paprefs avahi-daemon
Recommended packages:
  xdg-user-dirs libx11-doc xml-core pulseaudio-module-x11 rtkit
The following NEW packages will be installed:
  liballegro4-dev libasound2-dev libcaca-dev libdirectfb-dev libdrm-amdgpu1
  libdrm-dev libdrm-tegra0 libflac-dev libfreetype6-dev libgl1-mesa-dev
  libglib2.0-dev libglu1-mesa-dev libguichan-dev libjbig-dev libjpeg-dev
  libjpeg62-turbo-dev liblzma-dev libmpeg2-4-dev libmpg123-dev libogg-dev
  libpng12-dev libpthread-stubs0-dev libpulse-dev libsdl-gfx1.2-dev
  libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libslang2-dev libsoxr0
  libtiff5-dev libwebp-dev libx11-dev libx11-xcb-dev libxau-dev
  libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
  libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev
  libxext-dev libxfixes-dev libxml2-dev libxpm-dev libxrender-dev
  libxshmfence-dev libxxf86vm-dev mesa-common-dev pkg-config x11proto-core-dev
  x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev
  x11proto-input-dev x11proto-kb-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xf86vidmode-dev xtrans-dev
The following packages will be upgraded:
  libcaca0 libdrm-exynos1 libdrm-freedreno1 libdrm-nouveau2 libdrm-omap1
  libdrm-radeon1 libdrm2 libgl1-mesa-glx libglapi-mesa libgles1-mesa
  libgles2-mesa libglib2.0-0 libglib2.0-bin libjpeg62-turbo
  libpulse-mainloop-glib0 libpulse0 libpulsedsp libsdl1.2debian libtiff5
  libtiffxx5 libxml2 pulseaudio pulseaudio-module-bluetooth
  pulseaudio-module-gconf pulseaudio-utils
25 upgraded, 67 newly installed, 0 to remove and 258 not upgraded.
Need to get 21.3 MB of archives.
After this operation, 47.5 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  libdrm2 libgles2-mesa libgles1-mesa libgl1-mesa-glx libglapi-mesa
  libglib2.0-bin libglib2.0-0 libpulsedsp pulseaudio-utils
  pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio
  libpulse-mainloop-glib0 libpulse0 libdrm-amdgpu1 libdrm-radeon1
  libdrm-nouveau2 libdrm-omap1 libdrm-freedreno1 libdrm-exynos1 libdrm-tegra0
  libdrm-dev mesa-common-dev libgl1-mesa-dev libglib2.0-dev libpulse-dev
E: There are problems and -y was used without --force-yes
Could not install package(s): libsdl1.2-dev libsdl-gfx1.2-dev libsdl-ttf2.0-dev libguichan-dev libmpg123-dev libxml2-dev libflac-dev libmpeg2-4-dev.

Log ended at: Sun Apr  7 02:02:39 CEST 2019
Total running time: 0 hours, 0 mins, 52 secs

I'm getting similar error when installing Amiberry or UAE4Arm on a fresh install of 4.2 Full
Reply
#13
I found this with a search on Google from a couple weeks ago. Looks to be a change in repo for the Jesse Backports:
https://unix.stackexchange.com/questions...repository

Though I am new to the Platform (Ropi) and am unsure if this is something I can resolve on my end. Again, any guidance would be appreciated.
Reply
#14
please follow https://github.com/retr0rangepi/RetrOrangePi/issues/46

working on a solution as we speak
Reply
#15
Fixed.
Reply
#16
(04-08-2019, 05:36 PM)alexkidd Wrote: Fixed.

Brilliant! Thanks Smile

(04-13-2019, 10:25 PM)luckithroe Wrote:
(04-08-2019, 05:36 PM)alexkidd Wrote: Fixed.

Brilliant! Thanks Smile

Still unable to install the amiberry. End result is same as before, is something I'm doing incorrectly? 

First attempt == same result.
Second attempt, updated retropie setup script again == still same result.
Reply
#17
Whoops - in the wise words of my first mentor when I was brand new to software engineering: "If you did it right, it would work". *D'oh*

I had failed to first execute the RetroOrangePi update. After doing so, now the fetches appear to be working correctly. Thanks so much, and hopefully this thread (and your hard work) can benefit many others.

*cheers*
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Reicast update script not working Gakros 11 735 03-29-2019, 12:02 AM
Last Post: alexkidd
  Don't Working GPIO Joypad on OPi Zero... intelis 3 898 12-04-2018, 02:30 PM
Last Post: intelis
Sad DESKTOP MODE AUDIO NOT WORKING (4.2 FULL OrangePi PC) Roy 2 952 11-10-2018, 01:55 PM
Last Post: Roy
  USB Gamepad not working in retroarch solved ) dee098 1 814 09-11-2018, 09:52 PM
Last Post: alexkidd

Forum Jump:


Users browsing this thread: 1 Guest(s)