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

    OpenBOR finally working fine on RETROPIE with ES

    Scheduled Pinned Locked Moved Ideas and Development
    openbortrick
    353 Posts 32 Posters 182.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.
    • cyperghostC
      cyperghost @BiZzAr721
      last edited by cyperghost

      @bizzar721 I think you have used the libvpx file from @zanac opengl archive and put it to location libvpx.so.1 => /usr/lib/arm-linux-gnueabihf/vfp/neon/libvpx.so.1

      please delete or rename that file and directory structure.
      This lib is the last step before creating ELF file to binary.

      Z 1 Reply Last reply Reply Quote 0
      • Z
        zanac @cyperghost
        last edited by

        One little problem that i encoutered on allwinner is that the GPU used is compatible only to GLES-2.0, and therefore openbor use OpenGL, this means that if i try to use hardware filters with GL it crash :(

        With my solution openbor run in SDL and software filters and run very well... if in a future developers will implement a layer that wrap GL function to more then a backend (GL or GLES-2.0) we will be able to use also gpu hardware for bilinear filter!

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

          @zanac Okay prepared a patch in unified format. There developers see your changes. Thank you for preparing this one. I hope that this will be the kick-off for new development.

          This is Patchversion 1: Codename Анна

          --- sdl/menu.c	Fri Aug 10 10:15:18 2018
          +++ sdl/menu.c	Fri Aug 31 08:10:54 2018
          @@ -696,6 +696,7 @@
           {
               int i;
               int delay = 500;
          +    return;
           
               if(savedata.logo) return;
           
          --- sdl/video.c	Fri Aug 10 10:15:18 2018
          +++ sdl/video.c	Fri Aug 31 08:10:02 2018
          @@ -68,12 +68,13 @@
           #endif
           
           	SDL_GetCurrentDisplayMode(0, &video_info);
          -	nativeWidth = video_info.w;
          -	nativeHeight = video_info.h;
          +	nativeWidth = 384;
          +	nativeHeight = 224;
           	printf("debug:nativeWidth, nativeHeight, bpp, Hz  %d, %d, %d, %d\n", nativeWidth, nativeHeight, SDL_BITSPERPIXEL(video_info.format), video_info.refresh_rate);
           
           	SDL_initFramerate(&framerate_manager);
           	SDL_setFramerate(&framerate_manager, 200);
          +	printf("debug:nativeWidth, nativeHeight, bpp, Hz  %d, %d, %d, %d\n", nativeWidth, nativeHeight, SDL_BITSPERPIXEL(video_info.format), video_info.refresh_rate);
           }
           
           void video_set_window_title(const char* title)
          @@ -86,10 +87,12 @@
           
           int SetVideoMode(int w, int h, int bpp, bool gl)
           {
          +        w = 384;
          +        h = 224;
           	int flags = SDL_WINDOW_SHOWN | SDL_WINDOW_INPUT_FOCUS;
           	static bool last_gl = false;
          -	static int last_x = SDL_WINDOWPOS_UNDEFINED;
          -	static int last_y = SDL_WINDOWPOS_UNDEFINED;
          +	static int last_x = 0;//SDL_WINDOWPOS_UNDEFINED;
          +	static int last_y = 0;//SDL_WINDOWPOS_UNDEFINED;
           
           	if(gl) flags |= SDL_WINDOW_OPENGL;
           	if(savedata.fullscreen) flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
          @@ -232,9 +235,7 @@
           	SDL_UpdateTexture(texture, NULL, surface->data, surface->pitch);
           	blit();
           
          -#if WIN || LINUX
           	SDL_framerateDelay(&framerate_manager);
          -#endif
           
           	return 1;
           }
          --- source/scriptlib/ScriptVariant.c	Fri Aug 10 10:15:18 2018
          +++ source/scriptlib/ScriptVariant.c	Wed Aug 22 12:53:24 2018
          @@ -926,6 +926,7 @@
               {
               case VT_DECIMAL:
                   svar->dblVal = -(svar->dblVal);
          +		break;
               case VT_INTEGER:
                   svar->lVal = -(svar->lVal);
               default:
          --- Makefile	Fri Aug 10 10:15:18 2018
          +++ Makefile	Fri Aug 31 08:11:36 2018
          @@ -22,6 +22,7 @@
           # Defines
           #----------------------------------------------------------------------------------------------------
           
          +#define BUILD_PANDORA
           
           ifdef BUILD_PSP
           TARGET          = $(VERSION_NAME)
          @@ -135,16 +136,20 @@
           
           ifdef BUILD_PANDORA
           TARGET 	        = $(VERSION_NAME).elf
          -TARGET_FINAL    = $(VERSION_NAME)
          +TARGET_FINAL    = $(VERSION_NAME)-gl
           TARGET_PLATFORM = PANDORA
           BUILD_LINUX     = 1
           BUILD_SDL       = 1
          +BUILD_GLES      = 1
          +BUILD_OPENGL    = 1
          +BUILD_LOADGL    = 1
          +BUILD_WEBM      = 1
           BUILD_GFX       = 1
           BUILD_PTHREAD   = 1
           BUILD_SDL_IO    = 1
           BUILD_TREMOR    = 1
           BUILDING        = 1
          -CC  	        = $(PNDDEV)/bin/arm-none-linux-gnueabi-gcc
          +CC  	        = gcc
           INCLUDES        = $(PNDDEV)/include \
                             $(PNDDEV)/include/SDL
           OBJTYPE         = elf
          @@ -199,7 +204,7 @@
           STRIP           = $(PREFIX)strip $(TARGET) -o $(TARGET_FINAL)
           endif
           ifdef BUILD_PANDORA
          -STRIP 	        = $(PNDDEV)/bin/arm-none-linux-gnueabi-strip $(TARGET) -o $(TARGET_FINAL)
          +STRIP 	        = strip $(TARGET) -o $(TARGET_FINAL)
           endif
           ifdef BUILD_WII
           STRIP           = elf2dol $< $@
          @@ -444,6 +449,7 @@
           
           CFLAGS 	       += $(addprefix -I", $(addsuffix ", $(INCS))) $(ARCHFLAGS) -D$(TARGET_PLATFORM)
           CFLAGS 	       += -g -Wall -Werror -fsigned-char -std=gnu99
          +CFLAGS         += -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard  -fomit-frame-pointer -ffast-math -O3
           
           
           ifndef BUILD_DARWIN
          --- openbor.c	Fri Aug 10 10:15:18 2018
          +++ openbor.c	Thu Aug 23 14:10:26 2018
          @@ -36635,22 +36635,22 @@
           #endif
           
           VIDEOMODES:
          -    videomodes.mode    = videoMode;
          +    videomodes.mode    = 0;//videoMode;
               videomodes.filter  = savedata.swfilter;
               switch (videoMode)
               {
                   // 320x240 - All Platforms
               case 0:
          -        videomodes.hRes    = 320;
          -        videomodes.vRes    = 240;
          +        videomodes.hRes    = 384;
          +        videomodes.vRes    = 224;
                   videomodes.hScale  = 1;
                   videomodes.vScale  = 1;
                   videomodes.hShift  = 0;
                   videomodes.vShift  = 0;
          -        videomodes.dOffset = 231;
          -        PLAYER_MIN_Z       = 160;
          -        PLAYER_MAX_Z       = 232;
          -        BGHEIGHT           = 160;
          +        videomodes.dOffset = 220;
          +        PLAYER_MIN_Z       = 140;
          +        PLAYER_MAX_Z       = 220;
          +        BGHEIGHT           = 140;
                   break;
           
                   // 480x272 - All Platforms
          
          Z 1 Reply Last reply Reply Quote 2
          • Z
            zanac @cyperghost
            last edited by

            @cyperghost i tweaked the source again, today with gl4es lib and some small change i was able to make a version that run fullscreen with GL filters at full fps speed! Tomorrow i will try to share gl4es binary, openbor binary and a new source patched.. In My allwinner run much better dont know on rasbperry but i think that that Board is much similar.

            cyperghostC 3 Replies Last reply Reply Quote 3
            • cyperghostC
              cyperghost @zanac
              last edited by cyperghost

              @zanac I was able to compile old OpenBOR-3400 with full PAK and full load/save feature from the source you've provided I've also patched @darknior CLI patch in. So we have a full running OpenBOR maschine with working Video Menu, PAK support, load/save feature, highscore.
              Maybe you can help out. All userdata is stored to homedirectory. Do you know a patch to locate those files next to binary? Working!! Watch out user rights!

              You can download binary from my github account: https://github.com/crcerror/RetroPie-OpenBOR-scripts/tree/master/binary

              • PAK support
              • Highscore support
              • load/save feature working

              Everything is working!

              ATTENTION UNSUPPORTED!!
              Tagging @BiZzAr721 @darknior
              Thx @zanac

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

                @zanac I would be glad to test if you are ready.

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

                  @oilusionista said in OpenBOR finally working fine on RETROPIE with ES:

                  @cyperghost said in OpenBOR finally working fine on RETROPIE with ES:

                  The second change was done to SDL section which I haven't checked so far.

                  Can you explain what was done with SDL? I remember there was something wrong in some versions, I can't remember.

                  You can see the changes done to video.c in sdl directory ;) It is a hardcoded resolution posted here

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

                    @zanac said in OpenBOR finally working fine on RETROPIE with ES:

                    My allwinner run much better [with GL4ES] dont know on rasbperry but i think that that Board is much similar.

                    Buy a Pie ;) Just round about 35$

                    Z 1 Reply Last reply Reply Quote 0
                    • Z
                      zanac @cyperghost
                      last edited by

                      @cyperghost said in OpenBOR finally working fine on RETROPIE with ES:

                      @zanac said in OpenBOR finally working fine on RETROPIE with ES:

                      My allwinner run much better [with GL4ES] dont know on rasbperry but i think that that Board is much similar.

                      Buy a Pie ;) Just round about 35$

                      I cannot use a pie, i run in an embedded board attached to jamma pinout.
                      https://en.m.wikipedia.org/wiki/Japan_Amusement_Machine_and_Marketing_Association

                      I use a jamma pandora box (search on web for info) that use allwinner chipset inside

                      Here you are a video of openbor run on jamma pandora inside My arcade cab (The boy is My son)

                      https://m.facebook.com/groups/148961237813?view=permalink&id=10157471340597814

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

                        @darknior @cyperghost @zanac This is exciting - your baby is growing up so fast! ;p

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

                          @bizzar721 Well it is the excessive work from @zanac that makes this possible. With GL4ES much more things will happen with better speed and the OpenBOR Video Settings Menus should work as expected....
                          I just make some code reviews and compile a bit - far away from developing.

                          But here we come to a possible turning point. The Jamma Pandora BOX uses an Mali MP400 GPU... up to know we relied on working SDL framework and a similar CPU. This worked fine so far. If the binary with the GL4ES patch runs fine we can shake hands because then it should be possible to speedup the whole thing again, due better driver support for the Pie ;)

                          @zanac Watched some videos about the Jamma Pandora thing. Very interesting, it's a small PCB with JAMMA IO interface and the screen output is CRT with various frequencies for real RetroFeeling. The price for the box itself is not so much ... 60-80 USD. But I think the JAMMA things are not so cheap. All in all it seems very common to a Pie ;) So again ;)

                          @cyperghost said in OpenBOR finally working fine on RETROPIE with ES:

                          Buy a Pie ;) Just round about 35$

                          :D

                          But here is a real "PANDORAS BOX" .... portable

                          About the gaming video you have posted... I have no FB account.

                          EDIT:
                          @darknior May you can take a look at the path thing of the OpenBOR PAK version? Source is here: https://github.com/zanac/OpenPB4/tree/master/openbor
                          I can't find out why directories are stored to UserPath and not next to binary.

                          EDIT 2:
                          Function getBasePath in /source/utils.c seem to be responsible for this.

                          Is working!

                          Z 1 Reply Last reply Reply Quote 1
                          • Z
                            zanac @cyperghost
                            last edited by zanac

                            @cyperghost
                            here you find a binary... if it work in rpi i will upload the source package.

                            https://drive.google.com/open?id=1CphOM9RoniMhAaAsBeAbSnQUXn4WW8VH

                            It has inside libs used by OpenBOR, it refer some X11 libs but are not really used (gl4es link them but i forced framebuffer ;)) you must of course deploy the same but don't worry

                            the libGL.so is not open gl, is a compilation of gl4es, a wrapper that emulate open gl using gles2! Embedded boards, like rpi or allwinner, use gles2 and so we need this wrapper!

                            first to start OpenBOR insert in a script this line (if it work you can try other resolution, using gl4es you can force by this var the resolution!):
                            export LIBGL_FBOMAKECURRENT=384x224

                            If is the 6315 version that seems the most stable, if it will work i will share patched code of gl4es and openbor, i tested on allwinner as said is not the same actually, but if you're lucky.... ;)

                            If it will work you can go in video option, enable full screen, and switch from SDL to GL and use bilinear filter or so on using GPU!

                            Let me know, in allwinner this work very fine!

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

                              I'm out of buisness today maybe @darknior or @BiZzAr721 can test this for a quick run.
                              Watched your video.... that seems run very smooth now.

                              Z 1 Reply Last reply Reply Quote 0
                              • Z
                                zanac @cyperghost
                                last edited by

                                @cyperghost said in OpenBOR finally working fine on RETROPIE with ES:

                                I'm out of buisness today maybe @darknior or @BiZzAr721 can test this for a quick run.
                                Watched your video.... that seems run very smooth now.

                                If gl4es don't work i just discover that in rpi it could be compiled with specific api for rpi driver...

                                from: https://github.com/ptitSeb/gl4es/blob/master/COMPILE.md
                                for the Raspberry Pi
                                cmake . -DBCMHOST=1; make GL

                                try anyway my binary, if it don't work i suggest you to recompile gl4es using that cmake string, after that edit src/gl/init.c and around line 34 change "#define DEFAULT_ES 1" with "#define DEFAULT_ES 2" after this just "make GL"

                                the bin created in this way should be usable on rpi if you "export LIBGL_FB=1" or "export LIBGL_FB=2".....

                                If you all works my OpenBOR binary should use GLES rpi driver, using gl4es wrapper

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

                                  @darknior I changed some code from your sdlport.c, removed some checks ... this is really a fine work you've done.

                                  	// Test command line argument to launch MOD
                                  	int romArg = 0;
                                  	if(argc == 2) {
                                  		loadsettings();
                                  		memcpy(packfile, argv[1], strlen(argv[1]));
                                  		if(fileExists(packfile)) {
                                  			romArg = 1;
                                  		}
                                  	}
                                  

                                  I force usage of one argue (this makes sense) and check just presence of file
                                  The rest makes ES

                                  I just re-released the binary today. I don't want to share the old OpenBOR-code as it uses agressive words against OpenBOR developers. What a pity!

                                  @zanac I've just downloaded the binary and started. It says libvpx.1 is missing. Didn't get deeper now .... lack of time now. The next patch will be Борис (Boris)

                                  darkniorD 1 Reply Last reply Reply Quote 1
                                  • darkniorD
                                    darknior @cyperghost
                                    last edited by

                                    @cyperghost said in OpenBOR finally working fine on RETROPIE with ES:

                                    I just re-released the binary today. I don't want to share the old OpenBOR-code as it uses agressive words against OpenBOR developers. What a pity!

                                    They are stupid guys, share your code, OpenBOR is free with free license. Every one can use it. If they don't want to use our modification it's not important.

                                    @zanac I've just downloaded the binary and started. It says libvpx.1 is missing. Didn't get deeper now .... lack of time now. The next patch will be Борис (Boris)

                                    Same for me, not working :(
                                    /opt/retropie/ports/openbor/OpenBOR_gl4es_6315: error while loading shared libraries: libSDL2_gfx-1.0.so.0: cannot open shared object file: No such file or directory
                                    I don't understand where to put the .so files ? And i think i forgot to install SDL2 ?
                                    Is there an easy way to do it ?

                                    I have modify emulators.cfg

                                    openbor= "pushd /opt/retropie/ports/openbor; /opt/retropie/ports/openbor/OpenBOR %ROM%; popd"
                                    OpenBOR_3400_pak= "pushd /opt/retropie/ports/openbor; /opt/retropie/ports/openbor/OpenBOR_3400_pak %ROM%; popd"
                                    OpenBOR_darknior= "pushd /opt/retropie/ports/openbor; /opt/retropie/ports/openbor/OpenBOR_darknior %ROM%; popd"
                                    OpenBOR_gl4es_6315= "pushd /opt/retropie/ports/openbor; /opt/retropie/ports/openbor/OpenBOR_gl4es_6315 %ROM%; popd"
                                    default = "openbor"
                                    

                                    The 3400 version works fine but only with .PAK files, .BOR directories crash.
                                    And i can save my Highscore :)
                                    Perfect work for me :) It can replace my version.

                                    Life is game, just play it !

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

                                      @darknior said in OpenBOR finally working fine on RETROPIE with ES:

                                      They are stupid guys, share your code, OpenBOR is free with free license.

                                      I don't know if it was translation, but saying it like that sounds very inconsiderate. I don't know if you followed the thread while you were inactive for that little while, but this was discussed. Out of respect for the dev team is why @cyperghost did not want to share the source, and only made binary available. I agree it would be great if they released older source just for this purpose.

                                      Your initial post about OpenBOR along with your CLI patch got me interested in setting it up, releasing a working games list which @cyperghost saw, which he unified with those scripts, getting the attention of @zanac who brought along the blueprints to the latest OpenBOR for Raspberry - to hopefully integrating into official source reaching a whole new audience. That is freaking awesome! I see Daphne is on the up & up as well. Nice work.

                                      Do you know of an easy way to batch pack our .bor folders to .pak?

                                      Z cyperghostC darkniorD 3 Replies Last reply Reply Quote 1
                                      • Z
                                        zanac @BiZzAr721
                                        last edited by

                                        Just a tip, libs should be deployed into lib directory, if you miss the vpx i can share again it

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

                                          @bizzar721 said in OpenBOR finally working fine on RETROPIE with ES:

                                          Out of respect for the dev team is why @cyperghost did not want to share the source, and only made binary available.

                                          Yes exactly. Some comments are no fine netiquette and sounds agressive.
                                          @darknior We are on a good way on development now and I think the OpenBOR devs are open for our ideas. But not if we are using the old abondenend code. I compiled it because it makes PAK files useable and is just a testing ground for new 6xxx verions.

                                          Z darkniorD 2 Replies Last reply Reply Quote 0
                                          • Z
                                            zanac @cyperghost
                                            last edited by

                                            @cyperghost said in OpenBOR finally working fine on RETROPIE with ES:

                                            @bizzar721 said in OpenBOR finally working fine on RETROPIE with ES:

                                            Out of respect for the dev team is why @cyperghost did not want to share the source, and only made binary available.

                                            Yes exactly. Some comments are no fine netiquette and sounds agressive.
                                            @darknior We are on a good way on development now and I think the OpenBOR devs are open for our ideas. But not if we are using the old abondenend code. I compiled it because it makes PAK files useable and is just a testing ground for new 6xxx verions.

                                            Mens, actually the old version if you will complete the porting of 6xxx will be quite useless, i use the old version now only for one game (Saint Seyia Death and Rebirth), all other games seems run fine with 6xxx

                                            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.