welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 02, 2014 12:26 pm

antitrad
That's an easy one, at Directory /home/pi theres a Hidden Folder .config, within it resides a retroarch Folder with the retroarch.cfg File inside. Just add the following Script to the bottom and Save.

input_player1_joypad_index = "0"
input_player1_b_btn = "1"
input_player1_y_btn = "3"
input_player1_select_btn = "8"
input_player1_start_btn = "9"
input_player1_up_axis = "-1"
input_player1_down_axis = "+1"
input_player1_left_axis = "-0"
input_player1_right_axis = "+0"
input_player1_a_btn = "0"
input_player1_x_btn = "2"
input_player1_l_btn = "4"
input_player1_r_btn = "5"
input_player1_l2_btn = "6"
input_player1_r2_btn = "7"
input_player1_l3_btn = "6"
input_player1_r3_btn = "7"
input_player1_l_x_plus_axis = "+0"
input_player1_l_x_minus_axis = "-0"
input_player1_l_y_plus_axis = "-1"
input_player1_l_y_minus_axis = "+1"
input_player1_r_x_plus_axis = "+2"
input_player1_r_x_minus_axis = "-2"
input_player1_r_y_plus_axis = "-3"
input_player1_r_y_minus_axis = "+3"

BTW, its well worth compiling the New PC Engine Core, it now works fullspeed with CD Titles!
Download Link - https://github.com/libretro/beetle-pce- ... c0a7a61ba2
Last edited by welshy on Wed Sep 17, 2014 12:12 pm, edited 1 time in total.
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sat Aug 02, 2014 1:25 pm

Hi and thank you for your support!

The joystick is recognized now, but I got two problems:

- I cannot move (I'm using a Hori Dead Or Alive 4 Arcade Stick for Xbox360) but buttons are OK

- since I've enabled in /etc/rc.local the following code to enable the arcade stick

Code: Select all

xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
sleep 1
...RetroArch audio is stuttering, and everything seems slower, stuttering, not fluid (if I turn "OFF" xboxdrv it is all perfect).

Any suggestions? Maybe should I use a joystick that doesn't require xboxdrv? Or a different driver for the arcade stick?

Thank you very much!

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 02, 2014 2:08 pm

antitriad
OK, some 'Fighting Sticks' don't work with the drivers, but -

1. you need to add the --detach-kernel-driver switch (in rc.local) if you are running the latest version of Raspbian
2. --wid is for Wireless controllers, it need to be -id

The 'Hat' controllers on the Stick may be different to the standard USB Pad, run jstest (sudo atp-get install joystick to download it) then press the buttons/sticks and it should give you the correct SDL Codes. Then change the Axis codes accordingly in the retroarch.cfg File

input_player1_up_axis = "-1"
input_player1_down_axis = "+1"
input_player1_left_axis = "-0"
input_player1_right_axis = "+0"

If not, you could always try adding --dpad-only in the rc.local, that may help! All details/options for the xbox drivers can be found at the Thread

Here - http://www.raspberrypi.org/forums/viewt ... 39#p492539
Last edited by welshy on Sat Aug 02, 2014 4:29 pm, edited 2 times in total.
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sat Aug 02, 2014 3:44 pm

Thank you very much, I'll check it.
But it is normal that RetroArch is sensibly slower with xboxdrv activated? :(

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 02, 2014 4:27 pm

antitriad
Not in my experience with a standard USB XBox360 Pad, no.
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sun Aug 03, 2014 9:51 am

Hi welshy,
I bought a cheap USB controller, and it works like a charm! :D
Thank you!

Just one more question about shaders: I've downloaded a pack of shaders yet optimized for Raspberry Pi (for Retropie). These are a lot of .glslp files in my retro/shader/ folder. How can I enable one of it?

I launch retroarch with

Code: Select all

retroarch --menu
then I go to the shader options and I choose the .gls file, but it seems that nothing happens.

Thank you very much!

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sun Aug 03, 2014 10:04 am

antiriad
I cant help you there my friend as I don't use shaders! I'm not a great fan of the various effects/filters in emulators like HQ2, supereagle etc. (I think they look awful!).
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sun Aug 03, 2014 10:09 am

welshy wrote:antiriad
I cant help you there my friend as I don't use shaders! I'm not a great fan of the various effects/filters in emulators like HQ2, supereagle etc. (I think they look awful!).
I usually play on real CRT, but I'd like to try the phosphor shader on HDMI. ;)
Nevertheless, thank you very much for all your support!

P.S. It is possible, while playing, to assign a joystick button to go back to the Retroarch Menu?
P.S.S. Actually I use PC Engine, Picodrive and FCEUMM cores. There are other cores that run in full speed on Raspberry?

Thanks!

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sun Aug 03, 2014 10:23 am

antiriad wrote: I usually play on real CRT, but I'd like to try the phosphor shader on HDMI. ;)
Nevertheless, thank you very much for all your support!

P.S. It is possible, while playing, to assign a joystick button to go back to the Retroarch Menu?
P.S.S. Actually I use PC Engine, Picodrive and FCEUMM cores. There are other cores that run in full speed on Raspberry?

Thanks!
Well, like MAME I think RetroArch uses a basic interpolation filter as 'Default' to smooth edges. I haven't tried to change the Menu key to Pad as yet, but as I plan to produce a RetroArch SD Card Image for MegaDrive/Mega CD and PC Engine/CD ROM to replace an existing one (now the PC Engine CD works fullspeed) its something which needs addressing (I'm sure its as simple as changing some settings in the config). I have tested most of the Cores but other than the ones you have mentioned there are better alternatives available, but I do like to 'Tinker' with RetroArch from time to time as new Cores become available or are updated.

EDIT: Ok, just tested with my Xbox360 Pad (you need to change the values to yours accordingly) and assigning the Menu to a Pad is pretty straight forward. In my case I have set the 'Hotkey' (Back) and set Menu (Start), so holding Back then pressing Start returns to the RetroArch Menu

Add to retroarch.cfg

input_enable_hotkey_btn = "8"
input_menu_toggle_btn = "9"
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Mon Aug 04, 2014 6:11 am

Hi, another (easy one?) question please.
I'd like to run the retroarch --menu command at boot of Raspberry.
I'd like also to shut down Raspberry when I quit the Retroarch menu.
Maybe it is possible to set at boot the two commands, one after the other? (I mean: when "retroarch --menu" is ended/quitted run "shutdown -hP now")
THANKS :D

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Mon Aug 04, 2014 11:36 am

antiriad
Ok, ANY program can be started on Boot by altering the rc.local File. Just make sure you list it LAST after the Pad drivers (so they load first before RetroArch)

Add -
/home/pi/'Location'/'Program'

e.g.
/home/pi/RetroArch/retroarch

Now the only proviso is as the program loads a ROOT, the config will be located in the Root DIR! So Boot your RPi, then save the retroarch.cfg from the Menu. Exit, then log in as Root and startx (so you have permissions to change folders/configs etc.). Again it saves the config in a hidden Folder (.config/retroarch/retroarch.cfg) but NOT at /home/pi, its right at the top of the Root Directory, just open File Manager and goto the top of the directory Tree (just click the 'Up' arrow), now copy the retroarch.cfg file from the /home/pi/.config/retroarch folder and put in this Folder. On reboot all should be fine!

As for exiting, I NEVER use it, I just remove the power, so long as you do it from console (not XWindows) there shouldn't be a problem. (although exit retroarch FIRST!).
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Tue Aug 05, 2014 12:05 pm

Thank you very much for your explanation, especially about the different location of the config file.

But maybe it is possible, in the rc.local, to add, after Retroarch, a command of shutdown so that when Retroarch is terminated (quitted) the RPi goes correctly off? If I remove the power in command line (no X, no apps running) I always receive a warning of fsck at boot (I really hate it! :) ).
What about SNES performances on Retroarch and Raspberry?

Thank you

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Tue Aug 05, 2014 6:53 pm

antiriad wrote:If I remove the power in command line (no X, no apps running) I always receive a warning of fsck at boot (I really hate it!
Have you set Raspbian for 'quiet' Boot? It speeds up Boot time and you shouldn't get the warning. As for RetroArch, the Pocket SNES Core is your best bet but overall I would probably recommend PiSNES (Non-RetroArch) for SNES Emulation.
"The list of things I have heard now contains everything!"

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 12:08 pm

I have just been doing some testing with the newest version of RetroArch (v1.0.0.2) and have encountered an issue. When running PicoDrive Mega/Sega CD Titles wouldn't run (No Bios Found msg). However, after a little research and tinkering I have found the solution, it requires changing the File Name

Old Names Required for Bios
Mega CD (EU): eu_mcd1_9210.bin
Mega CD (JP): jp_mcd1_9112.bin
Sega CD (USA): us_scd1_9210.bin

New Names Required for Bios
Mega CD (EU): bios_CD_E.bin
Mega CD (JP): bios_CD_J.bin
Sega CD (USA): bios_CD_U.bin

As I have indicated in the Subject Title, it MAY affect RetroPie and UltraSlim if updated (as they are based on RertoArch). Hope this post helps users experiencing similar issues.
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 4:58 pm

Thanks to this thread and your suggestion finally I have an almost-perfect Sega Genesis and Nintendo NES micro-console in my rPi! Scrolling is perfectly fluid, controls are perfect... THANK YOU! :D
I'm even using the shader "scanlines" with no noticeable impact on speed. :twisted:

On the "Ecosystem" page of Retroarch website here:

http://www.libretro.com/index.php/ecosystem/

...I've noticed that there are multiple cores for SNES and arcade games (MAME etc.).
I'd like to know if anyone has tested them all, and if effectively SNES emulation is slow with all cores etc.
I know that there is PiSNES, but it would be nice to have all in one ecosystem.

Likewise, about Arcade emulators, I know there is iMame4ALL Pi but it is based on an old version of mame that does not support some Irem games (like Undercover Cops). If anyone has tested the various FBA and MAME cores, I'd like to know your opinion about speed.

Thanks to the tutorial it is now clear for me how to compile cores, but I don't know what kind of "adjustements" apply to the core sources before compiling... I will try to compile some cores "as they are", in the meantime if somebody has some suggestions... THANKS! :D

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 5:30 pm

antiriad wrote:...I've noticed that there are multiple cores for SNES and arcade games (MAME etc.).
I'd like to know if anyone has tested them all, and if effectively SNES emulation is slow with all cores etc.
I know that there is PiSNES, but it would be nice to have all in one ecosystem.
As I always mention, there is no 'One Size Fits All' solution with emulation! If you check the 1st page of this thread I did make note of some tested Cores. However, MAME4ALLPi and PiFBA are faster with better ROMS compatible than any of the RetroArch Cores I have tried. As far as SNES Emulation is concerned, there is little to choose between PiSNES and the PocketSNES Core.
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 6:44 pm

welshy wrote:
antiriad wrote:As far as SNES Emulation is concerned, there is little to choose between PiSNES and the PocketSNES Core.
Hi and thank you.
Do you mean that PiSNES and PocketSNES Core are almost the same, or that PiSNES is much faster?

By the way, it seems that there are some MAME cores with a better roms support than iMAME4All Pi (in which a lot of Irem games are without sound, and Golden Axe is buggy).
Thanks

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 6:58 pm

antiriad
PiSNES and the RetroArch PocketSNES Core are similar in performance, but differ from ROM to ROM on compatibility/accuracy. PocketSNES, unlike PiSNES will run SperFX Titles but not at a good enough speed to be realistically playable. As far as MAME4ALLPi is concerned I haven't noticed any issue with Golden Axe or any Irem Title's on M70-80 Boards (the famous ones such as R-Type, R-Type II, Vigilante, Ninja Spirit, Hammering Harry etc.), which ones are you having problems with?
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 7:12 pm

welshy wrote:antiriad
PiSNES and the RetroArch PocketSNES Core are similar in performance, but differ from ROM to ROM on compatibility/accuracy. PocketSNES, unlike PiSNES will run SperFX Titles but not at a good enough speed to be realistically playable. As far as MAME4ALLPi is concerned I haven't noticed any issue with Golden Axe or any Irem Title's on M70-80 Boards (the famous ones such as R-Type, R-Type II, Vigilante, Hammering Harry etc.), which ones are you having problems with?
I remember that in MAME4ALLPi the games Golden Axe, Moonwalker and Riot City have speech audio crackling with some noise (a user here even started a fork, it should be in the forum thread). About Golden Axe, the japanese uncensored/bloodier revision (not a bootleg) is not supported (and since it's rare, it is the one to emulate! ;) ).
About Irem games: Undercover Cops, In the Hunt and Blade Master (M-72, if I remember well) are emulated but with no audio (not decrypted at the time of the MAME version of MAME4ALL). Again, these are rare boards of great games.
There are a lot of other rare titles that are not supported: Golden Axe Revenge of the Death Adder, Shadow Force, Night Slashers, DJ Boy etc.

So it would be nice to see a more recent version of MAME almost-optimized (maybe via one of the RetroArch cores?) for Raspberry Pi.

Thank you!

P.S. Could you add in the tutorial the PocketSNES core compiling guide? Excluding SuperFX titles (not emulated in Pi SNES) it seems that performances are good, right? ;)

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: RetroArch on Raspbian: the tutorial

Sat Aug 09, 2014 7:26 pm

antiriad
I'm not convinced by the Golden Axe uncensored/bloodier revision (I think its a fake/hack!), it does work in AdvMAME though! In the Hunt is an M92 Board Title so may well work in AdvMAME but wouldn't be fast enough to be viable. I seem to recall the PocketSNES Core was a simple configure and make, but if you check the README file it will probably give instructions on how to compile it.
"The list of things I have heard now contains everything!"

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sun Aug 10, 2014 8:44 am

welshy wrote:antiriad
I'm not convinced by the Golden Axe uncensored/bloodier revision (I think its a fake/hack!), it does work in AdvMAME though! In the Hunt is an M92 Board Title so may well work in AdvMAME but wouldn't be fast enough to be viable. I seem to recall the PocketSNES Core was a simple configure and make, but if you check the README file it will probably give instructions on how to compile it.
Hi, I was able to compile the PocketSNES Core easily, thank you.
It is very good indeed, but it still can be optimized (I will write to the author :) )

Until now I was using rPi on my HD TV, but today I've tried it on my old CRT TV and the feeling is great!!!

But I have a question: it would be technically possible to set the Raspberry Pi resolution via Composite (on CRT TV) as nearest as possible to the original resolution of Sega Genesis / Megadrive and/or Super Nintendo?
E.g. 256×224 / 256×448 / 320×224 / 320×448 pixel

Thank you... :)

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Sun Aug 10, 2014 3:07 pm

Hi, on page 3 of this thread Vanfanel wrote:
Vanfanel wrote: However, if you want to squeeze the last bit of performance, you can do various things:
-Add specific Rpi CPU CFLAGS to the Makefiles (or Makefile.libretro) you use to compile.
These are:

Code: Select all

-Ofast -march=armv6 -mfpu=vfp -mfloat-abi=hard
This is really interesting, so I'd like to recompile the Picodrive core with these flags. But how can I add the flags?
It has sense to recompile also RetroArch with these flags? Thank you!
-Use 640x480 video mode for RetroArch: you can use tvservice command to set a 640x480 video mode, use RetroArch + core, and then go back to your planel's native video mode usin tvservice again. This is the script I use to launch my NES emulator:

Code: Select all

sudo /etc/init.d/dropbear stop
tvservice -e "CEA 1"
fbset -xres 640 -yres 480 -vxres 640 -vyres 480 
sleep 1
sync
nice -n -10 ./retroarch -c cfg/nes.cfg "$1"
tvservice -e "DMT 39" 
sleep 1
fbset -xres 1360 -yres 768 -vxres 1360 -vyres 768 
sudo /etc/init.d/dropbear start
clear
All in all, you SHOULD have rock-solid, lag-less, tearing-less, smooth, hardware full-screen-scaled emulation...
...why 640x480 and not, for instance, 320x240? Using in config.txt the framebuffer width and height options will bring the same performance improvements? What could be the most accurate resolution config for Picodrive on a CRT TV via composite cable?

Thank you very much, I'm learning a lot!

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Wed Sep 17, 2014 11:30 am

It is possible to compile Retroarch without RGUI?

Thanks.

Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: RetroArch on Raspbian: the tutorial

Thu Sep 18, 2014 12:37 pm

Hi, Antiriad.

I don't think it's possible to have a physical 320x240 or similar, old console-native video mode, because I don't see them listed here:

http://elinux.org/RPiconfig

So setting a 320x240 buffer size would, I guess, render the game in a small screen area in one of the supported video modes.

As for adding the CFLAGS, which should make sense in both RetroArch and cores, you have to edit the corresponding Makefile or Makefile.libretro and add them in the "CFLAGS = ..." section.
As for standalone picodrive, I don't know much about it. Anything emulating outside RetroArch has no sense for me, as audio and video won't be perfectly synced.

User avatar
antiriad
Posts: 136
Joined: Sun Nov 17, 2013 7:38 pm
Location: Italy
Contact: Twitter

Re: RetroArch on Raspbian: the tutorial

Thu Sep 18, 2014 12:40 pm

Vanfanel wrote:Hi, Antiriad.

I don't think it's possible to have a physical 320x240 or similar, old console-native video mode, because I don't see them listed here:

http://elinux.org/RPiconfig

So setting a 320x240 buffer size would, I guess, render the game in a small screen area in one of the supported video modes.

As for adding the CFLAGS, which should make sense in both RetroArch and cores, you have to edit the corresponding Makefile or Makefile.libretro and add them in the "CFLAGS = ..." section.
As for standalone picodrive, I don't know much about it. Anything emulating outside RetroArch has no sense for me, as audio and video won't be perfectly synced.
Hey thank you for all the answers! :D

It is possible to compile Retroarch without RGUI?
And why if I compile different versions of the source, in RGUI it always says it is the Retroarch 1.0.0.2? O_o

Thank you again!

Return to “Gaming”