OpenBOR finally working fine on RETROPIE with ES
-
@zanac oh, that is awesome. Its a childhood dream to me :)
@capninja said in OpenBOR finally working fine on RETROPIE with ES:
It's a comics crossover in the real life, How can i not be amazed? And with all caracteristics to make a solid one. Hero came from another universe, there's the initial misunderstanding, the big fight, the mistake is resolved and then they fight together against the real villain.
HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA this is SO TRUE.
-
@oilusionista I read your comment in chronocrash. Even if CLI will not be coded then there will be other ways. I think about using diff and patch tool so the git will be openbor main branch and patches are provided from here.
-
@cyperghost said in OpenBOR finally working fine on RETROPIE with ES:
@oilusionista I read your comment in chronocrash. Even if CLI will not be coded then there will be other ways. I think about using diff and patch tool so the git will be openbor main branch and patches are provided from here.
Another thing that i needed for fulfill my requirements was that inserting coins in my arcade cabinet i want to increment credit, 'cause as i said i use openbor in ancient arcade machine... and i want to simulate old arcade games :)
a very bad hack that i have made is to use the screenshot keys, i assigned it to the coin key (when i insert a coin in my cab a key is pressed)... and simply increment credits on player 1 and 2, it is just a dirty hack, next step i will look into "noshare variable" that is used for make a unique credit variable by all users :)
The cleanest way is to have a new button like btn_attack1, btn_attack2, btn_jump, special, btn_screenshot..... btn_credit :)
This could be another cool thing that in a future release someone could implement, for now i just use a bad hack (don't blame me, i'm bad and dirty... and my goal is just to play games :))
here you are the bad-shit-patch:
if(_pause != 2 && !noscreenshot && (bothnewkeys & FLAG_SCREENSHOT))
{
//screenshot(vscreen, getpal, 1);
++player[0].credits;
++player[1].credits;
} -
I'm the midst of all this exciting news I have a question (or 3).
Is .Pak the way it looks like we're going, moving forward?
Would that make emulation station boot up faster by not having to scan all those files in .bor directory?
Is there sacrafice for using .pak? (loading times - RAM issues)
-
@zanac found the patch you made
You forced videomode to case 0
Can you recompile with use case 255 instead? I think this will work, too and you change just one setting ;) -
@cyperghost said in OpenBOR finally working fine on RETROPIE with ES:
I think about using diff and patch tool so the git will be openbor main branch and patches are provided from here.
It's the BEST solution for sure :)
And the diff patch can be add to the Retropie Setup ;) -
@darknior yes I think so. I just compared the changes from openbor C code. It is really a small patch. The second change was done to SDL section which I haven't checked so far.
So we will provide patches and do likely use archived openbor versions. But for the sake of using the main openbor branch I think it is worth to act like this. Advantage we can patch other things like CLI fir ex in those files.
-
@cyperghost Yes that's it :)
I love the idea
And the last version permit to recover Gamepads when they shut down, it is fantastic and will change our life lol
Like on RetroArch :p -
@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.
-
Are all these changes going to be available in source code form as well? I would like to have these running on my Odroid for instance.
-
@oilusionista as far ASD I checked there are hardcoded values for resolution. I did not check all the files but it seems just little modification.
-
-
These days i cannot try make new patch suggested but my poc is public even source, just try all you want
@cyperghost said in OpenBOR finally working fine on RETROPIE with ES:
@zerojay they are already available check the postings from @zanac
-
@zanac said in OpenBOR finally working fine on RETROPIE with ES:
These days i cannot try make new patch suggested but my poc is public even source, just try all you want
+1 for this
Take your time I will step in the next days
-
So here is a small How To to compile a bare OpenBOR v3.0 rev 6412
Tested with current RetroPie image v 4.4 (md5sum: 56988addb60361a2257a61c69d9fceac) on RPi 3B 1.2We need following dependencies before
entersudo apt install libsdl2-gfx-dev libvorbisidec-dev libvpx-dev
- Download archive @zanac with
wget http://raw.githubusercontent.com/zanac/OpenPB4/master/openbor/openbor-engine-gl.tar.gz
- Extract it with
tar -xvzf openbor-engine-gl.tar.gz
- EnterFile directory with
cd engine-gl
- Now compile the whole thing
make BUILD_PANDORA=1
To play:
Just put one PAK file intoPaks
folder. This will automatically start the single title. If you insert more PAKs into this, the selection menu will be displayedTodo:
- Raise resolution
- Raise colordepth
- Make optionmenu according to RPi possibilites
- Debounce Joypad (can someone confirm?)
- Make sound louder
- ....
It's far away from complete but with enough manpower this thing will work.
Need some time for code review ;)
tagline
@BiZzAr721 @darknior @zerojay @oilusionista - Download archive @zanac with
-
I probably will not be able to test until tomorrow evening, but I will as soon as possible!
EDIT
It failed on make with error:Linking PANDORA Port: OpenBOR.elf... /usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/libSDL2.a(SDL_rpimouse.o): undefined reference to symbol 'vc_dispmanx_element_remove' //usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:661: recipe for target 'OpenBOR.elf' failed make: *** [OpenBOR.elf] Error 1
I was using the image I was testing on - I uninstalled OpenBOR through RetroPie Menu then restarted before running commands. Sorry, I did not get a chance to retry. I also realized I wasn't logged in with root.
Tried again, this time with root and had an issue with dependencies. Tried
apt --fix-broken install
like it said and then when I ransudo apt install libsdl2-gfx-dev libvorbisidec-dev libvpx-dev
again I receivedThe following packages have unmet dependencies: libsdl2-gfx-dev : Depends: libsdl2-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.
Maybe I need to start from 100% clean image again
-
@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. -
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!
-
@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
-
@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.
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.