RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    OpenBOR 6xxx OpenBeta Testphase

    Scheduled Pinned Locked Moved Ideas and Development
    betaopenbor
    520 Posts 54 Posters 268.3k 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.
    • OliBO
      OliB @mitu
      last edited by

      @mitu THX ! Yes, using the phyton script - will try it now....

      1 Reply Last reply Reply Quote 0
      • OliBO
        OliB @mitu
        last edited by

        @mitu Sorry, I'm still "learning" Can you tell me where I have to do the changes in this script?

        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 = 5 # 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/roms/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 = "heymf.mp3" # 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 = ["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","lr-scummvm","snes9x","pisnes","frotz","fbzx","fuse","gemrb","cgenesis","zdoom","eduke32","lincity","love","kodi","alephone","micropolis","openbor","openttd","opentyrian","cannonball","tyrquake","ioquake3","lr-tyrquake","lr-prboom","residualvm","xrick","sdlpop","uqm","stratagus","wolf4sdl","solarus","drastic","ports","smw","quake","doom","wolf3d","wolf4sdl-sw-v14","coolcv","lr-blueMSX","lr-freeintv","amiberry","pcsx-rearmed"]

        #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/PyScripts/DisableMusic'):
        	print "DisableMusic found!"
        	if mixer.music.get_busy():
        		mixer.music.stop();
        	while (os.path.exists('/home/pi/PyScripts/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.

        1 Reply Last reply Reply Quote 0
        • OliBO
          OliB
          last edited by

          I guess I must do it at this section:

          #TODO: Fill in all of the current RetroPie Emulator process names in this list.
          emulatornames =

          But, what is the correct name of openbor beta? Is it "OpenBOR OPENBETA" Same as the .sh file is named?

          THX

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            I think it's openbor or openbor-beta ?

            OliBO cyperghostC 2 Replies Last reply Reply Quote 0
            • OliBO
              OliB @mitu
              last edited by

              @mitu openbor is already there. Try it with openebor-beta now
              But did you think the section in the script is the right one?

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @OliB
                last edited by

                @OliB said in OpenBOR 6xxx OpenBeta Testphase:

                But did you think the section in the script is the right one?

                Yes, there should be just one section with the emulator names.

                1 Reply Last reply Reply Quote 1
                • cyperghostC
                  cyperghost @mitu
                  last edited by cyperghost

                  @mitu @OliB No... it's OpenBOR
                  For that reason I don't like the python-script, every call has to be checked twice. Hence there will be a BGM Player inside ES I prefer and recommend the mpg123 method ;)

                  OliBO 2 Replies Last reply Reply Quote 2
                  • OliBO
                    OliB @cyperghost
                    last edited by

                    @cyperghost THX Try it now....

                    1 Reply Last reply Reply Quote 0
                    • OliBO
                      OliB @cyperghost
                      last edited by

                      @cyperghost said in OpenBOR 6xxx OpenBeta Testphase:

                      OpenBOR

                      YES !!! It Works THX to ALL

                      cyperghostC 1 Reply Last reply Reply Quote 0
                      • cyperghostC
                        cyperghost @OliB
                        last edited by

                        @OliB You're welcome
                        It would be better if the py script would check for a file like mutebgm
                        This file is created by runcommand-onstart.sh and will be removed by runcommand-onend
                        But I do not use that script so my interest in improve this script is very low. Maybe if I find some time.

                        OliBO 1 Reply Last reply Reply Quote 1
                        • OliBO
                          OliB @cyperghost
                          last edited by

                          @cyperghost Maybe I can give that a try.. if I find the time... ;-)

                          1 Reply Last reply Reply Quote 1
                          • OliBO
                            OliB
                            last edited by

                            Hi guys I need help. Im running retropie 4.4.4 on Pi3b+. I've Installed the newest branch
                            from: wget http://raw.githubusercontent.com/crcerror/OpenBOR-63xx-RetroPie-openbeta/master/scriptmodules/openbor-6xxx.sh -O /home/pi/RetroPie-Setup/scriptmodules/ports/openbor-6xxx.sh
                            After Restart ES, I go to ports menu and there was an entry named "OpenBor Beats of Rage Engine. After Start I, get this screen (see pic1)1pic.jpg

                            Is this really the 6xxxxx Version?

                            THX

                            mituM 1 Reply Last reply Reply Quote 0
                            • mituM
                              mitu Global Moderator @OliB
                              last edited by

                              @OliB I think this is the normal screen when you start OpenBOR without parameters.

                              OliBO 1 Reply Last reply Reply Quote 0
                              • OliBO
                                OliB @mitu
                                last edited by OliB

                                @mitu Sorry, I'm a noob and I'm a little bit confused. A few games are running well. Examples: Crisis Evil 1 & 2, but He-Man didn't start. Some questions:

                                1. What kind of parameters do you mean?
                                2. Which, let's say *.pak romsets are compatible with my installed version?
                                3. Is it mandatory to replace the OpenBOR EXE provided by darknior?

                                THX

                                cyperghostC 1 Reply Last reply Reply Quote 0
                                • cyperghostC
                                  cyperghost @OliB
                                  last edited by cyperghost

                                  @OliB if you installied 6xxx branch there should be a script OpenBOR - Module Selection you may set openbor 6xxx AS default Emulator for Rom. Press a button if loading screen appears and select proper Binary in UserMenu

                                  1 Reply Last reply Reply Quote 0
                                  • W
                                    Winklepicker
                                    last edited by

                                    Can someone upload a video how to install the newest version of OpenBOR to retropie?

                                    It would really help alot of people! (including myself) on how to get this up and running.

                                    cyperghostC 1 Reply Last reply Reply Quote 0
                                    • cyperghostC
                                      cyperghost @Winklepicker
                                      last edited by cyperghost

                                      @Winklepicker Why don't you use the scriptmodules provided here?
                                      Just follow instructions and you've OpenBOR 6510-dev from Oct.2018 on your system. I do not update the patcher as long 6510 versions are in developing status. But you can compile on your own you want? Video instructions? For what? Half year later it is deprecated.

                                      W 1 Reply Last reply Reply Quote 0
                                      • W
                                        Winklepicker @cyperghost
                                        last edited by

                                        @cyperghost said in OpenBOR 6xxx OpenBeta Testphase:

                                        @Winklepicker Why don't you use the scriptmodules provided here?
                                        Just follow instructions and you've OpenBOR 6412-dev from Nov.2018 on your system. I do not update the patcher as long 6412 are in developing status. But you can compile on your own you want? Video instructions? For what? Half year later it is deprecated.

                                        I did try that, but there is no sign of "OpenBOR" install in the "experimental packages" section, it does not show.

                                        cyperghostC 1 Reply Last reply Reply Quote 0
                                        • cyperghostC
                                          cyperghost @Winklepicker
                                          last edited by

                                          @Winklepicker there should be at least one entry from openbor as default install in exp section. Please recheck that

                                          W 1 Reply Last reply Reply Quote 0
                                          • darkniorD
                                            darknior
                                            last edited by

                                            Hi
                                            On the last Double Dragon game i have some bugs because it's made for the last OpenBOR build.
                                            And i read they fix many problem on OpenBOR with the last build ... and the stable version 4.0 is coming too :)

                                            http://www.chronocrash.com/forum/index.php?topic=4000.new;topicseen#new

                                            Is some one as compiled the last build and can share it here ?
                                            I'm always on the old Retropie v3 :p

                                            Life is game, just play it !

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