Author Topic: [TEST RELEASE] RetroArch for GCW0  (Read 36231 times)

zhongtiao1

  • Posts: 249
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #60 on: March 02, 2016, 03:25:54 pm »
Thanks for your answers, but the problem doesn't come from the bios, issue was the name declared into cue file which doesn't match the bin file. (iso loading is case sensitive)
If this can help some other people, allways check the content of the cue file  :)

edit: mess is a good emulator, but it is wearing the correct name, it's a mess to configure.
Also mess is now part of the mame emulator: https://github.com/libretro/mame

To get MESS, don't we have to just add the SUBTARGET=MESS to our build?

SpikeSpiegel

  • Posts: 15
    • [OPEN-HANDHEDS-News]
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #61 on: March 02, 2016, 04:04:49 pm »
I don't think so, because we need to compile the latest version of mame, not 2000 or 2003 version. I suppose MESS is only available with this version and i am not sure this one will compile on gcw. (also performances should be worth with this version on gcw)
« Last Edit: March 02, 2016, 04:09:38 pm by SpikeSpiegel »
_____________________________________________________
[OPEN-HANDHELDS-NEWS]: http://www.scoop.it/t/fth-oc-news
[OPEN-CONSOLES]: http://www.open-consoles.com/ | http://www.open-consoles-news.com/

pcercuei

  • Posts: 1688
    • My devblog
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #62 on: March 02, 2016, 04:49:58 pm »
Ok, will do some testing later.  Does GLES driver do scaling using the IPU too?  It seems there is no performance penalty between different resolutions, with gles gfx driver.
Well, the GLES backend uses GLES for scaling...

SpikeSpiegel

  • Posts: 15
    • [OPEN-HANDHEDS-News]
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #63 on: March 02, 2016, 07:24:25 pm »
New Build: http://www.mediafire.com/download/kdgi3ljd0mb43ud/cores-gcw0-20160302.zip

fb_alpha_cps1.so - CPS1 FBA v0.2.97.30
fb_alpha_cps2.so - CPS2 FBA v0.2.97.30
fb_alpha_neo.so - NEOGEO FBA v0.2.97.30

fceumm_libretro.so - NES (next)
gambatte_libretro.so - GB/GBC
genesis_plus_gx_libretro.so - SMS
gpsp_libretro.so - GBA (need bios)
gw_libretro.so - GAME AND WATCH
mame2000_libretro.so - Compatible with MAME 0.37b5 romset
mame2003_libretro.so - Compatible with MAME 0.78 romset (slow)
mednafen_lynx_libretro.so - ATARI LYNX
mednafen_ngp_libretro.so - NEO GEO POCKET

mednafen_pce_fast_libretro.so - PC-ENGINE / CD
mednafen_psx_libretro.so - PSX (if it's work slow)
mednafen_vb_libretro.so - VIRTUAL BOY (slow ?)
mednafen_wswan_libretro.so - WONDERSWAN

picodrive_libretro.so - MD
pocketsnes_libretro.so - SNES
prboom_libretro.so - DOOM (with doom1 shareware, into Makefiles.zip)
snes9x_next_libretro.so - SNES
stella_libretro.so - ATARI 2600
yabause_libretro.so - SATURN (if it's work very, very slow)

Makefiles: http://www.mediafire.com/download/rbfag5n5ffu9yve/Makefiles.zip
« Last Edit: March 03, 2016, 10:35:59 am by SpikeSpiegel »
_____________________________________________________
[OPEN-HANDHELDS-NEWS]: http://www.scoop.it/t/fth-oc-news
[OPEN-CONSOLES]: http://www.open-consoles.com/ | http://www.open-consoles-news.com/

David Knight

  • Posts: 577
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #64 on: March 03, 2016, 12:25:35 am »
You sir are a machine  ;D

Quickman

  • Posts: 220
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #65 on: March 03, 2016, 02:10:21 am »
Thank you @SpikeSpiegel !  And you were a machine too @David Knight thank U!

SpikeSpiegel

  • Posts: 15
    • [OPEN-HANDHEDS-News]
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #66 on: March 03, 2016, 06:46:33 am »
Thanks, but all the congrats goes to developers of those cores :) (all the difficulty is here)
« Last Edit: March 03, 2016, 05:50:12 pm by SpikeSpiegel »
_____________________________________________________
[OPEN-HANDHELDS-NEWS]: http://www.scoop.it/t/fth-oc-news
[OPEN-CONSOLES]: http://www.open-consoles.com/ | http://www.open-consoles-news.com/

SpikeSpiegel

  • Posts: 15
    • [OPEN-HANDHEDS-News]
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #67 on: March 03, 2016, 08:24:40 am »
Pack FBA: http://www.mediafire.com/download/bhwhs0bl8j0djcs/cores-gcw0-FBA-20160303.zip

fb_alpha_cps1_libretro.so - CPS1 FBA v0.2.97.30
fb_alpha_cps2_libretro.so - CPS2 FBA v0.2.97.30
fb_alpha_neo_libretro.so - NEOGEO FBA v0.2.97.30
fba_libretro.so - Port of Final Burn Alpha to Libretro (v0.2.97.37). (i suppose low performances)

I am waiting your feedbacks. Thanks.

FULL PACK: http://www.mediafire.com/download/nq82e6b1nhymbu5/cores-gcw0-20160303.zip
Makefiles: http://www.mediafire.com/download/rbfag5n5ffu9yve/Makefiles.zip
« Last Edit: March 03, 2016, 10:32:06 am by SpikeSpiegel »
_____________________________________________________
[OPEN-HANDHELDS-NEWS]: http://www.scoop.it/t/fth-oc-news
[OPEN-CONSOLES]: http://www.open-consoles.com/ | http://www.open-consoles-news.com/

the_gama (OP)

  • Posts: 155
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #68 on: March 03, 2016, 11:34:45 pm »
Some good news:

The gcw0 patches have been commited to the official libretro repositories by twinaphex!

And currently I am looking for a way to build the gpsp core (or tempgba) with the dynamic recompiler enabled.  I asked Nebuleon the other day about it, and learned that the current recompiler code cannot be built as a shared library (.so) as it is, thus there are two options: modify the recompiler code or link the core statically, the way RetroArch is built for most consoles.

The first option is very difficult to achieve, but the second option seems viable.  I have successfully built and linked retroarch with the gpsp core statically.  It still does not have the recompiler enabled but it is working.

One thing I noticed is that it runs a bit faster, but It could be my imagination.  So I wish someone else can test other core and compare it with the dynamic version of the frontend (the one from first post), and see if it runs any better.

These are the steps to build RetroArch and statically link a core with it.

1) First we must build a core as an static library (.a), therefore we need to modify the Makefile.  For instance, this is from the gpsp Makefile:

Code: [Select]
# GCW0
else ifeq ($(platform), gcw0)
TARGET := $(TARGET_NAME)_libretro_gcw0.a
CC = /opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc
AR = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ar
STATIC_LINKING = 1

I changed the .so extension to .a.  And replaced the -fpic an shared options with STATIC_LINKING = 1.

2) Now type:

Code: [Select]
make platform=gcw0

3 ) Copy the gpsp_libretro_gcw0.a file to the RetroArch folder.

4) Follow the steps from first post to build the frontend, but use the following command to configure:

Code: [Select]
./configure --global-config-dir=/mnt/RetroArch  --host=mipsel-gcw0-linux-uclibc --prefix=/tmp --enable-gles --disable-kms --enable-opendingux_fbdev --enable-alsa --disable-freetype --disable-stb_font --with-libretro="gpsp_libretro_gcw0.a" --with-gles_libs="-lGLESv2 -lEGL"

The important option is --with-libretro="gpsp_libretro_gcw0.a".  RetroArch will be built in a non-dynamic mode and linked with the 'libretro' core, statically.  In this mode only that core will be available.

4) Launch retroarch from telnet as before and load a game. 


Well I hope someone else can test other cores to see if they do run better when linked statically.



« Last Edit: March 04, 2016, 03:48:36 am by the_gama »

pcercuei

  • Posts: 1688
    • My devblog
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #69 on: March 04, 2016, 10:18:25 am »
I'm curious, how is --enable-opendingux_fbdev different from regular fbdev?

the_gama (OP)

  • Posts: 155
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #70 on: March 04, 2016, 02:23:48 pm »
I'm curious, how is --enable-opendingux_fbdev different from regular fbdev?

I tested the vivante context driver first but could not get it working because of the missing fbCreateWindow and fbGetDisplayByIndex calls. 

The opendingux_fbdev_ctx.c file is basically the same file as vivante_fbdev_ctx.c, except for one minor change.   I think it would be better to just add an #ifdef in vivante_fbdev_ctx.c file to include that little change, but I created a separate file called opendingux_fbdev_ctx.c in case other changes were made later and to make it easier to use a patch that could work even if the vivante sources were changed in the official repo.




SpikeSpiegel

  • Posts: 15
    • [OPEN-HANDHEDS-News]
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #71 on: March 07, 2016, 07:26:30 pm »
@the_gama, some users have report a problem with this combo:
- Enabled Menu toggle with Up + L1 + R1 + Y combo.
It is: Down + L1 + R1 + Y

Please, could you confirm ? and update the first post. Thanks.
« Last Edit: March 07, 2016, 07:36:13 pm by SpikeSpiegel »
_____________________________________________________
[OPEN-HANDHELDS-NEWS]: http://www.scoop.it/t/fth-oc-news
[OPEN-CONSOLES]: http://www.open-consoles.com/ | http://www.open-consoles-news.com/

SpikeSpiegel

  • Posts: 15
    • [OPEN-HANDHEDS-News]
« Last Edit: March 10, 2016, 07:15:08 pm by SpikeSpiegel »
_____________________________________________________
[OPEN-HANDHELDS-NEWS]: http://www.scoop.it/t/fth-oc-news
[OPEN-CONSOLES]: http://www.open-consoles.com/ | http://www.open-consoles-news.com/

the_gama (OP)

  • Posts: 155
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #73 on: March 18, 2016, 03:07:33 pm »
Hi, I wrote a new tempgba core using Nebuleon sources (https://github.com/Nebuleon/TempGBA). 
The most important thing is that the dynamic recompiler is working!  Audio, video and input seems to be working correctly too.

I found one bug though, not related to the core itself but when launching a new core from the menu.  If someone wants to test this:

1) Please download this file: retroarch_static_cores.zip.  It contains two cores linked statically to the frontend, tempgba and catsfc.

2) Extract the contents somewhere on the sdcard.

3) Change the variable libretro_dyrectory, in retroarch.cfg, to point to the folder where you extracted the .elf files.

4) Run tempgba_libretro_gcw0.elf or catsfc_libretro_gcw0.elf from telnet. 

5) Now, go to the 'Load core' option in the menu and select one of the two .elf files shown there.


The new core should be launched successfully but the screen will flicker, and the colors will be messed up.  Also if you try to load a game the screen will be corrupted.

I hope someone can test this and give some hints of what could be the cause.  Retroarch linux_frontend uses the command execv to launch the statically linked cores.

[EDIT] After some testing, it seems the problem is related to the egl driver.  I wrote a simple test using the mesa Cube example found here: https://github.com/laanwj/mesatest_gles.  At the end of the program I put execv("path/cube") to recursively launch the program again.   The app segfaults around the third time the app is executed.

I added eglDestroyContext and eglTerminate calls before execv and the app segfaults the second time the program is executed.
« Last Edit: March 20, 2016, 02:25:58 am by the_gama »

zhongtiao1

  • Posts: 249
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #74 on: March 31, 2016, 10:12:34 pm »
just so you guys know, the Dreamcast core doesn't build :D

Sent from my Q5 using Forum Fiend OSP v1.3.3.

Senor Quack

  • Posts: 225
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #75 on: April 01, 2016, 12:17:35 pm »
just so you guys know, the Dreamcast core doesn't build :D

There is no way the GCW Zero could ever hope to emulate Dreamcast. You'd need a far more powerful CPU and likely GPU.

Maybe there are a few games that would be somewhat playable if MIPS dynarec is made, but I doubt it.
« Last Edit: April 01, 2016, 02:24:42 pm by Senor Quack »

zhongtiao1

  • Posts: 249
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #76 on: April 01, 2016, 08:34:58 pm »
just so you guys know, the Dreamcast core doesn't build :D

There is no way the GCW Zero could ever hope to emulate Dreamcast. You'd need a far more powerful CPU and likely GPU.

Maybe there are a few games that would be somewhat playable if MIPS dynarec is made, but I doubt it.

I know, I just tried it for fun. It doesn't even compile.

zhongtiao1

  • Posts: 249
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #77 on: April 25, 2016, 08:35:34 pm »
@the_gama I tried redownloading the source from libretro, but now the egl patch will not work. What do I have to do to fix it?

the_gama (OP)

  • Posts: 155
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #78 on: April 25, 2016, 09:46:51 pm »
@the_gama I tried redownloading the source from libretro, but now the egl patch will not work. What do I have to do to fix it?

Hi, since twinaphex added the patches to retroarch master branch, there is no need to apply the patch anymore.  There is a typo in gfx/drivers_context/opendingux_fbdev_ctx.c though, in line 259.

It can be easily fixed with this change:

Code: [Select]
256 #ifdef HAVE_EGL
257    return egl_get_proc_address(symbol);
258 #else
259    return 0;
260 }

zhongtiao1

  • Posts: 249
Re: [TEST RELEASE] RetroArch for GCW0
« Reply #79 on: April 26, 2016, 03:18:57 pm »
@the_gama I tried redownloading the source from libretro, but now the egl patch will not work. What do I have to do to fix it?

Hi, since twinaphex added the patches to retroarch master branch, there is no need to apply the patch anymore.  There is a typo in gfx/drivers_context/opendingux_fbdev_ctx.c though, in line 259.

It can be easily fixed with this change:

Code: [Select]
256 #ifdef HAVE_EGL
257    return egl_get_proc_address(symbol);
258 #else
259    return 0;
260 }

Okay, Thanks :)

Now I get this error: http://pastebin.com/Hu7n7D9B

« Last Edit: April 26, 2016, 03:35:09 pm by zhongtiao1 »

 

Post a new topic