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

    [Tutorial] OpenBOR - the complete guide

    Scheduled Pinned Locked Moved Ideas and Development
    openborcyperghost
    112 Posts 22 Posters 67.4k 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.
    • BiZzAr721B
      BiZzAr721
      last edited by

      @spud11 said in [Tutorial] OpenBOR - the complete guide:

      @bizzar721 I'm not at my Pi at the moment but does F10 exit OpenBor?

      Yes, F10 immediately shuts down OpenBOR. Runcommand log also logs shutdown called from leave_game which I get if I exit normally or by d-pad press (so I assume it's not crashing)

      Here's something odd, I went to runcommand (during loading screen) to remove controller config and instead of button press selecting, buttons moved up and down! Top L button worked like select. Running out the door to work, but I will investigate further tonight. (Pie was just turned on as well, with no joypad's switched)

      Also, with Gamepad disabled in options, hitting LEFT still exits.

      One time it exited, I swore I saw a line of text flash on the screen. Is there a way to see commands on the screen behind ES? There's been many times I had info flash on the screen while configuring things that I wish I could read - hell, I even used my phone to record it to read them.

      @cyperghost Here are the updated Joypad configs (renamed to match your file names listed in Joypad.txt)

      S cyperghostC 2 Replies Last reply Reply Quote 1
      • S
        spud11 @BiZzAr721
        last edited by

        @bizzar721 I have a bit of a similar issue. I installed my arcade joysticks the wrong way around so pushing left goes up, pushing right goes down - ie I'm 90 degrees off with my physical installation of the joysticks.

        I suspect your issue is similar to mine. Because you've mapped your joystick in emulationstation, it works properly in that environment. When you are messing around with runcommand, you are outside the emulationstation environment (at least that's my understanding) and so the mapping you've done in emulationstation isn't operative. I could be wrong but I think that's the point.

        With runcommand, you could choose verbose mode and I'm assuming you would get more information on exiting a game. I'm invoking xboxdrv via runcommand-onstart for each emulator with the parameters >> /dev/shm/runcommand.log 2>&1 so I get a lot of information recorded to the /dev/shm/runcommand.log after exiting a game.

        RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

        1 Reply Last reply Reply Quote 1
        • hansolo77H
          hansolo77
          last edited by

          I know with my setup the way it is now, I can't even access the runcommand window without pressing L1 on my Xbox controller. If I press any other button, nothing happens. But L1? That's not supposed to be assigned to anything except navigating by pages in ES and then as a shoulder button INSIDE a game. Why is it mapped as an ENTER key for runcommand? I even have to use it as a select button when navigating inside runcommand. It's weird, and I've gotten used to it now. But it doesn't make sense. I think the joy2key "addon" is bugged.

          Who's Scruffy Looking?

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

            @bizzar721 said in [Tutorial] OpenBOR - the complete guide:

            Here are the updated Joypad configs (renamed to match your file names listed in Joypad.txt)

            Uploaded them. Thank you

            @hansolo77
            About the joy2key tool. It is mapped to enter because of the dialog windows. DPAD is mapped to arrows direction. A is mapped to ENTER and B is TAB. This makes it impossible to use radiolists ore filemenu because therefore you need space key. That's the reason why the tools I wrote (BashROMManager, SaveStateManager....) looks so complicated. But it's the fault of the limited keymappings. But I really don't know why there are problems with mappings. Mine are working perfect with all controller types.

            @BiZzAr721
            Start OpenBOR and connect to SSH. type now ps -ais there a session of joy2key still present? If yes then this is faulty.

            @spud11

            I did find with SoRR that it has no exit key (unless you go through the menu). I wound up creating a bash script which "hard" exits SoRR which I invoke via xboxdrv

            You can call Multi Switch Shutdown tool with multi_switch.sh --es-closeemu this will terminate the current emulator and will send you back to ES. I think that's rather easier then to make a fake-keypress, isn't it?

            S 1 Reply Last reply Reply Quote 1
            • BiZzAr721B
              BiZzAr721
              last edited by BiZzAr721

              I will try things out later this evening. Since my clone image/test image still works fine, is there any specific files I should grab to compare? I already have the runcommand log and runcommand.sh on my pc to compare.

              PS - appreciate being made aware of the multi switch shutdown script - thats something I see being very useful in certain situations

              1 Reply Last reply Reply Quote 0
              • BiZzAr721B
                BiZzAr721
                last edited by BiZzAr721

                Here's my results:
                Ran @darknior 's original openBOR call bypassing runcommand and all worked well.

                Verified runcommand.sh & joy2key.py are identical on bor test image vs everyday image.
                Doing ps-a it showed the bor test image was NOT running joy2key.py while the one I am having trouble with IS running joy2key.py.

                Any idea on what I should do next? I don't know much about joy2key.

                Edit
                Joy2key is running on other ports as well, but does not exit when hitting left
                On OpenBOR test image, those same ports do not show joy2key running when using ps -a

                I also did not see Launch with verbose logging on the runcommand menu for OpenBOR mods

                1 Reply Last reply Reply Quote 0
                • S
                  spud11 @cyperghost
                  last edited by spud11

                  @cyperghost Thanks. I wasn't aware of this script. Is it specific to ES and might require adaptation for Attract Mode?

                  RetroPie v4.4.1 • RPi3 Model B • 5.1V 2.5A PSU • 32GB SanDisk Extreme microSD • 2TB Toshiba Canvio Basics Portable USB 3.0 hard drive • 4 x DragonRise USB Arcade joysticks • 2 x TurboTwist spinners • 1 x USB trackball • 1 x PS4 wireless • 1 x 8BitDo Zero

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

                    @spud11 Well as long as there is a runcommand.sh call also in Attract mode then it will work, too. But the reboot and restart things won't .... these are specfic to ES.

                    @BiZzAr721 So you see a running joy2key session really running if the emulator already started? It is supposed to get finished after all dialog actions are done. So after the grey box is gone away this process should be terminated by runcommand itself. That's the case in my setups and I think that's the usual way.

                    You can try to get PID of joy2key process by typing ps -a you see maybe the number 1234 and then with kill 1234 you can terminate this process. After this you can try if OpenBOR still finishes by pressing left DPAD key.

                    fredcobainF 1 Reply Last reply Reply Quote 1
                    • BiZzAr721B
                      BiZzAr721
                      last edited by

                      @cyperghost said in [Tutorial] OpenBOR - the complete guide:

                      You can try to get PID of joy2key process by typing ps -a you see maybe the number 1234 and then with kill 1234 you can terminate this process. After this you can try if OpenBOR still finishes by pressing left DPAD key.

                      Thanks, you were on the money. I killed Joy2key and then no issues! Now, at least I know the culprit. I don't want to steer this thread any more off course, so I'll open a new thread this evening. I will report the solution back here to help others. (All ports are running with joy2key, yet it seems only OpenBOR has this bug). Could run with a runcommand startup script to kill joy2key but I feel like that may open the door to a bunch of new issues.

                      1 Reply Last reply Reply Quote 1
                      • S
                        shift
                        last edited by

                        @cyperghost Thanks to your instructions I can launch all the .bor games in my folder, but there is a problem, the list shows the double titles, what is due?

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

                          @shift Do you mean the bash script to show list menu? Or do you see two entries in ports menu? Can you post a screenshot of this case with more explaination?

                          @BiZzAr721 No problem, you are welcome. You might investigate runcommand-onstart.sh maybe there is the reason why the joy2key call occours.

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            shift @cyperghost
                            last edited by shift

                            @cyperghost said in [Tutorial] OpenBOR - the complete guide:

                            Do you mean the bash script to show list menu? Or do you see two entries in ports menu? Can you post a screenshot of this case with more explaination?

                            The bash script, the one that shows the list, but I understood where the error was. The shell extract.sh I had edited. The shell creates an empty diretory with the name "* .bor" that duplicated (I do not know why) all the games.

                            This is extract.sh I use now (now works well):

                            #!/bin/bash
                            PORTDIR="/opt/retropie/ports/openbor"
                            BORROMDIR="/home/pi/RetroPie/roms/ports/openbor"
                            mkdir $BORROMDIR/original/
                            mkdir $BORROMDIR/original/borpak/
                            mv $BORROMDIR/*.pak $BORROMDIR/original/
                            cp $PORTDIR/unpack.sh $BORROMDIR/original/
                            cp $PORTDIR/borpak $BORROMDIR/original/borpak/
                            cd $BORROMDIR/original/

                            for i in *.pak
                            do
                            CURRENTFILE=basename "$i" .pak
                            ./unpack.sh "$i"
                            mkdir "$CURRENTFILE.bor"
                            mv data/ "$CURRENTFILE.bor"/
                            mv "$CURRENTFILE.bor"/ ../
                            done

                            for i in *.PAK
                            do
                            CURRENTFILE=basename "$i" .PAK
                            ./unpack.sh "$i"
                            mkdir "$CURRENTFILE.bor"
                            mv data/ "$CURRENTFILE.bor"/
                            mv "$CURRENTFILE.bor"/ ../
                            done

                            cd $BORROMDIR/original/
                            rm *.pak
                            rm *.PAK
                            cd $BORROMDIR/
                            rmdir *.bor

                            echo "Your games are extracted and ready to be played."

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

                              @BiZzAr721 @shift I think I can quickly improve the extracting tool, too. The scripts I've seen so far a totally messed up! Please locate PAK files to /home/pi/RetroPie/roms/ports/openbor/pak

                              Inside this folder the pak-files will be renamed from gamename.pak to gamename.pak.originalafter extraktion.

                              The extract.sh below is independent now from location because borpak offers come usefull command line usage. I asked me why it was not used this way! Instead of this they copied some executables and scripts and moved whole folders... OMG!

                              #!/bin/bash
                              # PAK EXTRACT v0.65
                              # by cyperghost for retropie.org.uk
                              # 1. PLACE  BARE PAK FILES to /home/pi/RetroPie/roms/ports/openbor/pak
                              # 2. RUN THE SCRIPT (with user pi!)
                              # Change pathes as you like!
                              
                              EXTRACT_BOREXE="/opt/retropie/ports/openbor/borpak"
                              BORROM_DIR="/home/pi/RetroPie/roms/ports/openbor"
                              BORPAK_DIR="$BORROM_DIR/pak"
                              
                              if [[ -f $EXTRACT_BOREXE ]]; then
                              
                                  mkdir -p "$BORPAK_DIR"
                                  cd "$BORPAK_DIR"
                              
                                  for i in *.[Pp][Aa][Kk]; do
                                      FILE="${i%%.*}"
                              
                                      if [[ $FILE == '*' ]]; then
                                          echo "Aborting... No files to extract in $BORPAK_DIR!"
                                          exit
                                      fi
                              
                                      mkdir -p "$BORROM_DIR/$FILE.bor"
                                      echo "Extracting file: $i"
                                      echo "to dir: $BORROM_DIR/$FILE.bor"
                                      sleep 3
                                      "$EXTRACT_BOREXE" -d "$BORROM_DIR/$FILE.bor" "$i"
                                      echo "-------- Done Extracting: $i ---------"
                                      echo "-- Backup $i >> $i.original --"
                                      mv "$i" "$i.original"
                                      sleep 5
                                  done
                              
                                  echo "Extraction done without errors!"
                              
                              else
                              
                                  echo "borpak executive file not found in $EXTRACT_BOREXE"
                                  echo "Exit now...."
                              
                              fi
                              
                              sleep 5
                              
                              S giandeejayG 2 Replies Last reply Reply Quote 1
                              • hansolo77H
                                hansolo77
                                last edited by

                                Is there a link or wget method to get the actual utility used in the extraction method for Linux? I've been doing it manually in Windows them moving the files over SFTP. If this extraction script works, I'd love to try it.

                                Who's Scruffy Looking?

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

                                  @hansolo77 wget http://raw.githubusercontent.com/crcerror/RetroPie-OpenBOR-scripts/master/extract.sh
                                  @BiZzAr721 I've updated the script a bit ;) It works now with spaces in filenames and mixed upper/lower PAK filename

                                  1 Reply Last reply Reply Quote 2
                                  • S
                                    shift @cyperghost
                                    last edited by

                                    @cyperghost Thank you for the script! I added the deletion of the original files because in any case I have them somewhere else.

                                    1 Reply Last reply Reply Quote 0
                                    • BiZzAr721B
                                      BiZzAr721
                                      last edited by

                                      Default OpenBor Controller Mapping

                                      0_1533523725666_OpenBor_Default_Layout.png

                                      cyperghostC hansolo77H 2 Replies Last reply Reply Quote 2
                                      • cyperghostC
                                        cyperghost @BiZzAr721
                                        last edited by cyperghost

                                        @bizzar721 I link this to first posting ;) Really nice

                                        1 Reply Last reply Reply Quote 0
                                        • hansolo77H
                                          hansolo77 @BiZzAr721
                                          last edited by

                                          @bizzar721 I like this picture..Makes it very straight forward. Is this the same layout used in Streets of Rage (via RetroArch/etc)?

                                          Who's Scruffy Looking?

                                          BiZzAr721B 1 Reply Last reply Reply Quote 0
                                          • dishinsD
                                            dishins
                                            last edited by

                                            Hello, the PS3 controller joypad config is not working for me, controls get all funny, i have Sony Original PS3 controllers, is there any way i can sorta debug this? i tried some other input configs also but none of them are working for me.

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