# OpenBOR finally working fine on RETROPIE with ES

• OpenBOR is an Beat'em all engine with many games created for it, and some really really excellent <3

The last version of OpenBOR can be found here :
https://github.com/DCurrent/openbor/tree/master/engine
But there is a problem for us, it only work on Linux X86 and x64 NO ARM proc :(

4 years ago rofl0r made a Fork that works on PI
https://github.com/rofl0r/openbor/tree/afa9362429c3a35ec0c17cca60cc3e5bd5fecd96
It is not perfect, it is old engine, but most of the games are working fine with it.
It make the coffee to stand some one add ARM support to the officiel release, maybe it is not many work ... and i think it is possible to use the work made in this fork on the official one.

BUT the problem of this old version, and also the master version, there is no command line support to launch games :(
We can't easily use it with ES and have beautiful game list like other emulators.

It's why today i work on it found a solution and found a trick.
I have DL the old source code and make only one modification to add command line :

https://github.com/rofl0r/openbor/blob/afa9362429c3a35ec0c17cca60cc3e5bd5fecd96/sdl/sdlport.c

## MEDIA : Images and Logos

http://www.mediafire.com/file/36tfjsajlm25ptn/system.svg

http://www.mediafire.com/file/zbwtpa3gc21kk4m/system2.svg

## INFO updated the 2017-11-03

We are compatible with v3.0 Build 3400 Mods !
And newer mods should work as well as now unknown commands will just be ignored.

The good things :

• Most of games are old and working fine on PI
• The x360 or 8bitdo PAD working fine with OpenBOR
• Like we skip the menu, we no more time must use the Keyboard to launch game
• It's Full screen with Filters
• 4 player games compatible

The BUGS i found for the moment :

• When you start OpenBOR with GamePAD not connect it will be impossible to connect it after
• Same if you disconnect it in game, you lost it :(
• Some games are in 16/9, and not full screen, there are black bar, and it crash some filters.
• OpenBOR not saving Hi-score and game progression :(

## HOW to INSTALL updated the 2018-07-04

• Go to retropie-setup and install OpenBOR from experimental packages.
• Edit /opt/retropie/configs/all/emulationstation/es_systems.cfg to add this new system entry with :
    <name>openbor</name>
<fullname>OpenBOR</fullname>
<path>/home/pi/RetroPie/roms/ports/openbor</path>
<extension>.bor .BOR</extension>
<command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _PORT_ openbor %ROM%</command>
<platform>pc</platform>
<theme>openbor</theme>

• Edit openbor config by typing nano /opt/retropie/configs/ports/openbor/emulators.cfg
fill in following code from block this will enable calls via ROMs as we are used in all other emulator settings.
#openbor= "pushd /opt/retropie/ports/openbor; /opt/retropie/ports/openbor/OpenBOR; popd"
openbor= "pushd /opt/retropie/ports/openbor; /opt/retropie/ports/openbor/OpenBOR %ROM%; popd"
default = "openbor"

• Unpack them with the UNPACK option in PORT
• When it's done, rename the MODs dir with .bor / .BOR

Replace the OpenBOR EXE by mine in /opt/retropie/ports/openbor/
It's compiled to works with command line.

• Restard EmulationStation and you will see your games ready to play :)

• nano /opt/retropie/configs/all/runcommand-onstart.sh
and add code from codebox below ;)
• ES can't define between files and directories. My script does so this entry won't appear in my selection menu
touch "/home/pi/RetroPie/roms/ports/openbor/Access Selection Menu.bor"
### Access to Selection Menu
##
# $1 = systemname > openbor #$3 = full path of ROM-file

if [[ "$1" == "openbor" && "${3##*/}" == "Access Selection Menu.bor" ]]; then
# pkill runcommand.sh # Maybe needed to prevent first runcommand from being messed up
bash "/home/pi/RetroPie/roms/ports/OpenBOR - Beats of Rage Engine Selection.sh"
fi

##


Please consider to change pathes and filenames as you want.

All informations and links and pictures HERE !!!

Thanks a lot @cyperghost for his help to upgrade the launching commands ;)

::: REPAIR OPENBOR LAUNCH MENU to work with JOYSTICK :::

When you launch OpenBOR for the first time the problem is that the Gamepad is not working. You only have Keyboard.
When you are in game you can configure it, and after you can use Gamepad on games.
The menu.cfg is the controller configuration for the OpenBOR games launcher menu.
Take a game CFG that working with my controller, replace it and it will rocks now perfectly :D
BUT the MENU don't like the graphic options, like X2 640x480 and filters, it's why on this config you must Disable them.

## HOW to UNBOR a game from PC

For Windows users, you can download your .pak files and extract them with Windows Tools set. It's named Openbor Makepak & Extractor. I give you a special version that can also remove unused musics to squeeze size of PK file.

1. Extract the archive
2. Place the .pakfile and rename it bor.pak
3. Run Batchfile extract.bat
PAK file will be extracted in directory data ...
4. Now move that subfolder to \home\pi\retropie\roms\ports\openbor\ GAMENAME .bor\
4.1 gamename.bor can be choosen free
4.2 Place data directory inside gamename.bor

Thanks @BiZzAr721's for his working game lists HERE

• Thanks for sharing this, @darknior.

I've never really gotten into OpenBOR even though I've heard great things about it at always wanted to try it out.

Maybe this will be what I needed to try it out one day when I have the time to tinker yet again.

Thanks!

• Can you provide a list of working games ? I have only 2 working games (Dragon ball and Saint Seya). Maybe my others are not compliant...

• @febbweiss I think so many games works fine. The engine has 4 years old, and all the best OpenBOR came before.
Only a few are more recent and use some new script engine.

OpenBOR v3.0 Build 3016,

Yesterday with my children we are playing many games without any problem ...
I try them all for the moment :

• Asterix Cesar Challenge (4p)
• Bare Knuckle 6 (the best ever)
• Bare Knuckle Vacuum 3.01
• Bare Knuckle Z v2 (we play at 4 players with 4 x360 pads)
• Fatal Fyry Re-Bout 2 (4p)
• Final Fight DC - Alt v3 MCW (4p)
• Final Fight Gold (Update May 2015) [16-9]
• NightSlasherX (fix for v3)
• Super Maio Brawl [16-9] (We play near the end of the game at 2 players)

Now we must if some wants to help me :

• Try most of games to list the good one that working fine
• Try to fix some of the games crashing because it is script, and some time it is really easy to fix.

Found a SDL coder to fix :

• The gamePAD problem that can be really bad when the pad log out in game :(
• Save game problem, because i discover it save nothing when you progress in game :(
And later
• The 16/9 games not full screen.
• The sound lost some time when you save game settings

• @pjft Cool if you like it and will try some games :)

I search help for batch launching please.

Do you think i can launch better the games ? I don't really know what is on the %ROM% var ?
Can i try something like that :

es_systems.cfg

<extension>.bor .BOR</extension> (empty files)
<command>bash 'rom=/home/pi/RetroPie/roms/ports/openbor/%ROM%/' > /dev/null 2>&1</command>


Thanks

• @darknior I'm far from a runcommand.sh/es_systems.cfg expert, but tagging @meleu can only produce positive results :)

I suspect that %ROM% will be populated by whatever is in the gamelist.xml <path> tag, and given your extension I suspect it'll be something like XXX.BOR.

Is that what you're expecting?

Once again, it's only a suspicion - I do not have the experience with fiddling with those.

That being said, after trying to launch it, you can always open /dev/shm/runcommand.log and check what was passed there, I imagine.

• @darknior I don't know anything about this OpenBOR stuff, but as far as I understood the "rom" is a directory (I concluded that from your script in the OP). From this assumption here is my (untested) suggestion is:

1. rename (or create a symbolic link to) your directories with the games, putting a .bor in the end. Using the path from your script as an example, rename that dir to Bare Knuckle Vacuum.bor (or create a symbolic link to the dir using this name).

2. in your es_systems.cfg, the openbor entry would look like this:

    <name>openbor</name>
<fullname>OpenBOR</fullname>
<path>/home/pi/RetroPie/roms/openbor</path>
<extension>.bor .BOR</extension>
<command>/opt/retropie/ports/openbor/OpenBOR rom=%ROM%</command>
<platform>pc</platform>
<theme>openbor</theme>


I didn't test it, but I hope it helps! ;-)

• Thanks @pjft and @meleu :)
I will use the /dev/shm/runcommand.log to make some test.
And make feedback.

• And use the /dev/shm/runcommand.log to make some test.

Since the emulator is not being launched through runcommand.sh, the runcommand.log file will not be created.

• I have DL the old source code and make only one modification to add command line :

https://github.com/rofl0r/openbor/blob/afa9362429c3a35ec0c17cca60cc3e5bd5fecd96/sdl/sdlport.c

I had an include at the top :

#include "openbor.h"


Replace

Menu();


by

	// Trick to add Command line
int romArg = 0;
if(argc > 1) {
int argl = strlen(argv[1]);
if(argl > 4 && !memcmp(argv[1], "rom=", 4)) {
memcpy(packfile, argv[1] + 4, argl - 4);
romArg = 1;
}
}
if(!romArg)


Is there a reason to make the leading rom= string mandatory? I mean, why not just checking if argv[1] is a valid directory?

• If it can help i make two quick logo conversion tu use on ES ... but some one ca do it better.

http://www.mediafire.com/file/36tfjsajlm25ptn/system.svg

http://www.mediafire.com/file/zbwtpa3gc21kk4m/system2.svg

@UDb23 have you some free time for help :p

• Is there a reason to make the leading rom= string mandatory? I mean, why not just checking if argv[1] is a valid directory?

No it's not. You think it can give me some problems ?

I have try to change :

    <path>/home/pi/RetroPie/roms/ports/openbor</path>
<extension>.bor .BOR</extension>
<command>/opt/retropie/ports/openbor/OpenBOR rom=%ROM%</command>


Like that i let games where there are, and only rename them with .bor like it is for Daphne with .daphne

I see them and i can launch them :)
But it crash ...

I think the path is good and it found the game directory :

But maybe something is bad because it don't found the video.txt in the game dir and crash

• @darknior Please stop continuously tagging me in your posts. I also don't have time to respond to personal emails. If I want to respond to something I will do so on the forum.

• But maybe something is bad because it don't found the video.txt in the game dir and crash

Doesn't it happen when you launch it with your previous approach?

• @buzz I do it for help.
I made some update for systems, and i wish every one can use them.
And if i'm not tagging you, i don't know if you see them.

• ScummVM : it's now include in the official 1.10 source, you only have to update the git url on retropie-setup.
• PPSSPP : It's also in official source now, but you must DL the updated file alone, it's not in the EXE with a new build from source.
• OpenBOR i'm working on it, i think i will make a FORK because the official project is dead from 4 years ... if all works fine i wish you will update the GIT url in retropie-setup.
And maybe the es_systems.cfg ...

I will stop to tag you here, and i will make Pull Request on Retropie-Setup GIT when i have finish an update, like that you will have the information only one time in one place.

• Doesn't it happen when you launch it with your previous approach?

No it's work fine with .sh

But i found something strange with OpenBOR, if i launch it with :

/opt/retropie/ports/openbor/OpenBOR


It works but don't know really where is it and don't use the recorded settings, it don't find the .cfg files.
If i do :

cd /opt/retropie/ports/openbor
./OpenBOR


It works fine because i think it is in the good directory.
It's a bug in OpenBOR.

• @darknior we will move to new scummvm when it's released. Previously there were too many issues to track master

PPSSPP bins were updated the other day. From source we track bleeding edge afair

I have a WIP open or based on latest code, but have been busy on other things.

I just don't have the time now due to the size of the project to be involved in every discussion on the forum. I do read and keep track. Other developers can comment also. I'm not against tagging me in general, but it can be too much.

• @darknior my new suggestion for the openbor entry in es_systems:

<command>cd /opt/retropie/ports/openbor/; ./OpenBOR rom=%ROM%</command>


• I learn today why OpenBOR can't read .PAK ...

https://github.com/rofl0r/openbor/releases/tag/pak-change

But i have add PAK support to command line for future ...
And a test to very if the MOD Directory exist before launching.

	// Test command line argument to launch MOD
int romArg = 0;
if(argc > 1) {
int argl = strlen(argv[1]);
if(argl > 4) {
memcpy(packfile, argv[1], argl);
if(dirExists(packfile, 0)) {
if(packfile[argl-1] != '/')
strcat(packfile, "/");
romArg = 1;
}
else if(memcmp( &packfile[strlen(packfile) - 4], ".pak", 4)) {
if(fileExists(packfile))
romArg = 1;
}
}
}
if(!romArg)


Now we can use :

    <name>openbor</name>
<fullname>OpenBOR</fullname>
<path>/home/pi/RetroPie/roms/ports/openbor</path>
<extension>.bor .BOR</extension>
<command>cd /opt/retropie/ports/openbor/ && ./OpenBOR %ROM% > /dev/null 2>&1</command>
<platform>pc</platform>
<theme>openbor</theme>


To launch games MOD directories :)

And i have write a bad info last day, because OpenBOR write : OpenBOR v3.0 Build 3016 2011-08-30

https://github.com/rofl0r/openbor/releases/tag/compatible-official-3400%2B

But if you read GIT it is better, we are compatible with v3.0 Build 3400 Mods !
And newer mods should work as well as now unknown commands will just be ignored.

I found this old version on my PC to try mods directly on Windows :D
I search the real v3400 if some one can help :p

https://www.mediafire.com/file/au9my6mp3dh0and/OpenBor PC v3.2637.rar

• I have make a fork, if some one want help :

https://github.com/Darknior/openbor/blob/master/sdl/sdlport.c

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.