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

Re: RetroArch on Raspbian: the tutorial

Tue Apr 22, 2014 10:34 am

You can build a WonderSwan core from the Mednafen sources. Look at the Makefile: by default it builds a PSX core, but you can change that to pce-fast for PcEngine, and there's another parameter for WonderSwan, too. I don't remember wich parameter it was, but I once built it. It's just that I didn't find any interesting games in the system so I eventually deleted the core, but it was fullspeed on the Pi.

iomartin
Posts: 7
Joined: Tue Apr 22, 2014 3:25 pm

Re: RetroArch on Raspbian: the tutorial

Tue Apr 22, 2014 3:42 pm

I followed the instructions on the first post but could not launch RetroArch. This is the output I get (I followed the exact instructions on the first post).

Running MegaDrive

Code: Select all

RetroArch [WARN] :: system_directory is not set in config. Assuming system directory is same folder as game: "".
RetroArch: [libretro INFO] :: %05i:%03i: couldn't open carthw.cfg!

RetroArch: [libretro INFO] :: %05i:%03i: sram: %06x - %06x; eeprom: %i

RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
RetroArch [ERROR] :: Cannot init input driver. Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video_input()"
Running NES

Code: Select all

RetroArch [WARN] :: system_directory is not set in config. Assuming system directory is same folder as game: "".
Frontend supports RGB565 - will use that instead of XRGB1555.
RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
RetroArch [ERROR] :: Cannot init input driver. Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video_input()"
Any idea what might be wrong?

Thanks

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

Re: RetroArch on Raspbian: the tutorial

Tue Apr 22, 2014 9:24 pm

iomartin: try adding

input_driver="linuxraw"

to your config file and try again.
If that doesn't work, please run
./retroarch --features
and post the results back

iomartin
Posts: 7
Joined: Tue Apr 22, 2014 3:25 pm

Re: RetroArch on Raspbian: the tutorial

Tue Apr 22, 2014 9:48 pm

I assume that by the configuration file you mean ~/RetroArch/retroarch.cfg (I'm new to this project, and there were quite a few config* files) . I added the option there, but got the same error.

Code: Select all

$ ./retroarch --features

Features:
	SDL:
		SDL drivers: no
	Threads:
		Threading support: yes
	OpenGL:
		OpenGL driver: yes
	KMS:
		KMS/EGL context support: no
	UDEV:
		UDEV/EVDEV input driver support: no
	EGL:
		EGL context support: yes
	OpenVG:
		OpenVG output support: yes
	XVideo:
		XVideo output: no
	ALSA:
		audio driver: yes
	OSS:
		audio driver: no
	Jack:
		audio driver: no
	RSound:
		audio driver: no
	RoarAudio:
		audio driver: no
	PulseAudio:
		audio driver: no
	DirectSound:
		audio driver: no
	XAudio2:
		audio driver: no
	zlib:
		PNG encode/decode and .zip extraction: yes
	OpenAL:
		audio driver: no
	External:
		External filter and plugin support: yes
	Cg:
		Cg pixel shaders: no
	libxml2:
		libxml2 XML parsing: no
	SDL_image:
		SDL_image image loading: no
	FBO:
		OpenGL render-to-texture (multi-pass shaders): yes
	Dynamic:
		Dynamic run-time loading of libretro library: yes
	FFmpeg:
		On-the-fly recording of gameplay with libavcodec: no
	FreeType:
		TTF font rendering with FreeType: yes
	Netplay:
		Peer-to-peer netplay: yes
	Python:
		Script support in shaders: no

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

Re: RetroArch on Raspbian: the tutorial

Wed Apr 23, 2014 12:34 pm

iomartin: ouch, my fault. This tutorial is outdated. I should update it someday...
Please, re-run the configure script like this:

Code: Select all

CFLAGS="-Ofast -march=armv6j -mfpu=vfp -mfloat-abi=hard" ./configure --disable-x11 --disable-bsv_movie --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss

then run "make" again.
Then put the input_driver="udev" in the retroarch.cfg file and try again.

If all this doesn't work, I will upload my recent binary.

iomartin
Posts: 7
Joined: Tue Apr 22, 2014 3:25 pm

Re: RetroArch on Raspbian: the tutorial

Wed Apr 23, 2014 1:28 pm

Hi Vanfanel,

Still the same problem :(

I noticed that ./retroarch --features yielded the same result now as before. Also, I guess it makes no difference, but I'm outputting video through RCA, not HDMI.

Are you able to you compile with these flags on your RPi and run it? Also, would you please post your binary? Ideally I'd like to compile RetroArch myself, as I'd like to tweak it a little, but at least with the binary I can ensure that it's working.

Thanks!

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

Re: RetroArch on Raspbian: the tutorial

Sat Apr 26, 2014 5:06 pm

Hi again, iomartin

Sorry it took me so long to answer...
Please take a patient look at the configure process. If you're still missing the udev input driver, then it means you don't have libudev-dev package installed, and you should find an error.

Just in case, I've uploaded some pre-built binaries here:

https://onedrive.live.com/redir?resid=D ... DC0A%21179

iomartin
Posts: 7
Joined: Tue Apr 22, 2014 3:25 pm

Re: RetroArch on Raspbian: the tutorial

Sun Apr 27, 2014 5:42 pm

I was missing the libudev-dev package, thanks. Your latest configure worked for me.

An unrelated question: I'm launching RetroArch through an SSH session. Do you know how I can configure keyboard control over ssh as well? If I launch it directly at the Pi it recognizes the keyboard automatically.

Thanks

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

Re: RetroArch on Raspbian: the tutorial

Mon Apr 28, 2014 8:38 am

I wouldn't waste my time trying to run it over ssh: I don't think it will work. No idea/interest, sorry :P

iomartin
Posts: 7
Joined: Tue Apr 22, 2014 3:25 pm

Re: RetroArch on Raspbian: the tutorial

Mon Apr 28, 2014 2:32 pm

Vanfanel wrote:I wouldn't waste my time trying to run it over ssh: I don't think it will work. No idea/interest, sorry :P
Thanks, anyway - your help configuring and making RetroArch were very important. :D

Just for the record, launching it through ssh works fine - I can't see any reason why it wouldn't work. Unless you understood that I'm trying to ssh -X, in which case I believe it would be extremely slow. But I'm running it on the screen attached to the RPi and it's running fine. I just need to figure out how to configure the controllers.

zzediker
Posts: 22
Joined: Mon Jul 15, 2013 9:29 pm

Re: RetroArch on Raspbian: the tutorial

Tue Apr 29, 2014 4:24 am

vanfanel,

i'm kinda new at compiling and building, and ive been looking at the github and i'm not quite sure how to change the default build from the psx core.

could you explain how i might go about pulling out the wonderswan and neo geo pocket emulators? i can see the folders associated with those emulators, so is it just modifying the ' git clone git://github.com/libretro/RetroArch.git' part of the walkthrough?

sorry for the foolish questions, i feel a little out of my depth but would love to understand how it works more

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: RetroArch on Raspbian: the tutorial

Tue Apr 29, 2014 8:17 am

Does anyone know if there has been any performance updates to the snes core? Is RetroArch still 0.9.9?

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

Re: RetroArch on Raspbian: the tutorial

Tue Apr 29, 2014 8:24 am

zzeditker: this tutorial is an excuse for learning, so asking basic things is the best thing you can do! :)
Ok, let's say you want to built your Wonderswan emulator.
You need two things: the libRetro front-end (wich includes the lowlevel graphics, sound and input functions), called RetroArch, and the emulator per se.
Let's s start with the libRetro frontend. First, clone the RetroArch repo:

Code: Select all

git clone https://github.com/libretro/RetroArch.git
then run the configure utility, wich will generate the compilation script, called Makefile (be sure libudev-dev is installed):

Code: Select all

CFLAGS="-Ofast -march=armv6j -mfpu=vfp -mfloat-abi=hard" ./configure --disable-x11 --disable-bsv_movie --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss
And now we build it:

Code: Select all

make -j2
The building process is SLOW if you don't have distcc set up. With distcc, it's a breeze. I HIGHLY recommend building EVERYTHING using distcc. But that is covered in a different tutorial.

Ok, we should have the executable RetroArch file ready! Now, let's go for the Wonderswan core.
Now edit the Makefile in this project and change the line:

Code: Select all

core = psx
into

Code: Select all

core = wswan
Also, you can change this line:

Code: Select all

FLAGS += -O2 $(EXTRA_GCC_FLAGS)
into this one

Code: Select all

FLAGS += -Ofast -march=armv6j -mfpu=vfp -mfloat-abi=hard $(EXTRA_GCC_FLAGS)
And now we build again

Code: Select all

make -j2
When building ends, we should have a mednafen-wswan-libreto.so (or similar) file in the building dir. That's the emulator itself.
Put these things in place (move RetroArch and the emulator .so file to a common dir, along with some rom dumps, etc) and run it with

Code: Select all

./retroarch -L mednafen-wswan-libretro.so <rom_dump_name>.pce
Now it's a matter of configuring it by editing ~/.configure/retroarch/retroarch.cfg. For example, on the Raspberry Pi, you'd be better using vg as the video driver instead of GLES2, etc...

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

Re: RetroArch on Raspbian: the tutorial

Tue Apr 29, 2014 8:28 am

KitchUK: RetroArch is 1.0.0.2 now, but forger about SNES emulation on the Pi. There's no CPU power to do the SPC700 right plus the custom video hardware. The SNES isn't that powerful, but the way it's designed, it's a pain to emulate.
People is using an OLD Snes9X version with broken audio, but I wouldn't touch that with a 10mts pole, and RetroArch people would never allow such an atrocity to run under RA.

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: RetroArch on Raspbian: the tutorial

Tue Apr 29, 2014 9:37 am

Vanfanel wrote:KitchUK: RetroArch is 1.0.0.2 now, but forger about SNES emulation on the Pi. There's no CPU power to do the SPC700 right plus the custom video hardware. The SNES isn't that powerful, but the way it's designed, it's a pain to emulate.
People is using an OLD Snes9X version with broken audio, but I wouldn't touch that with a 10mts pole, and RetroArch people would never allow such an atrocity to run under RA.
Thanks for the info Vanfanel. I was hoping there might have been a fix to the snes emu being able to play Mario All-Stars. It pays fine but the controls an non responsive when n game.. :(

zzediker
Posts: 22
Joined: Mon Jul 15, 2013 9:29 pm

Re: RetroArch on Raspbian: the tutorial

Tue Apr 29, 2014 6:24 pm

Vanfanel,

firstly, thank you so much for taking the time to help me out and explain, it is very much appreciated!

ok, i followed your excellent instructions and everything built beautifully! so i went ahead and build wonderswan and pce as a test

unfortunately i got the following errors with each:

pcefast:

RetroArch [WARN] :: system_directory is not set in config. Assuming system directory is same as game: "".
RetroArch [ERROR] :: dylib_load() failed: "mednafen_pce_fast_libretro.so: cannot open shared object file: no such file or directory".
RetroArch [ERROR] :: Failed to open dynamic libraby: "mednafen_pce_fast_libretro.so"
RetroArch [ERROR] :: Fatal error received in: "load_dynamic()"


wonderswan:(if executed from the menu, i get same as above)

from console:

RetroArch [WARN] :: system_directory is not set in config. Assuming system directory is same as game: "".
RetroArch [WARN] :: [libretro WARN] :: System directory is not defined. Fallback on using same dir as ROM for system directory later ...
RetroArch [WARN] :: [libretro WARN] :: save directory is not defined. Fallback on using SYSTEM directory ...
RetroArch [ERROR] :: Failed to load game.
RetroArch [libretro INFO] :: [Mednafen Wonderswan]: Samples / Frame: nan
RetroArch [libretro INFO] :: [Mednafen Wonderswan]: Estimated FPS: nan

(also if i run pce fast in console i get this as well)


now if i open the retroarch.cfg in .config/retroarch/retroarch.cfg i only get one line of code at the top:

config_save_on_exit = "true"

am i sposed to manually add the line about video plugin preference? and the system directory info? sorry i feel like i must have messed up a step...

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

Re: RetroArch on Raspbian: the tutorial

Fri May 02, 2014 2:00 pm

This is a temporal cfg file for wonderswan emulation:

http://paste.ubuntu.com/7379693/

Put your wswan core under cores/ , create a cfg file with these contents, and run the wswan emulation like this:

./retroarch -c ws.cfg game.wsc

It should work. I guess the problem is that it needs some backend specified (video? audio? I don't know, as I always use CFGs)

However, WonderSwan color emulation isn't fullspeed on the slow Pi :P

I recommend you setting up scripts for loading the games on each system. That way, you can do something like:
nes mario.nes

and the nes scripts would load the corresponding cfg file, the core is specified on the cfg file and you just have to pass the ROM.

AmigaGamer
Posts: 92
Joined: Sat Feb 01, 2014 9:02 pm

Re: RetroArch on Raspbian: the tutorial

Sun Jun 15, 2014 1:23 pm

Thanks for posting this guide.

Often with emulation on RPI I find something usually annoys me or spoils my immersion from the gaming. (eg screen tearing / frameskip/ video lag /input lag/ nasty sdl crashes which require a ssh to power down / etc etc etc).

None of these troubles with retroarch and the recommended cores!

I picked up a classic style sega controller from Funstock for the true retro feel. Setup with picodrive/fceumm correctly I totally forgot I was using "emulation" - the experience was that smooth.
Its also so nice to be able to adjust aspect ratios in the options without crashing the PI or having to reset!
This really does show the PI is a capable little machine when software uses the video hardware and supported api's correctly.

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

Re: RetroArch on Raspbian: the tutorial

Thu Jun 26, 2014 10:11 am

New PC Engine/TurboGrafx-16 CD Core
As regular readers of my postings will no doubt have realised by now, I’m rather fond of the PC Engine, it kick started the 'Grey Import' market in the UK and I didn't hesitate to purchase one myself in 1988 after being “Astonished” witnessing R-Type running on NEC's little White Marvel. Due to updates and performance improvements by the RetroArch Team it now offers 'Fullspeed' emulation of the PC Engine/TurboGrafx-16 CD System! For those wishing to compile their own Core it is available at the RetroArch Github. I have tested with various older versions of RetroArch and can confirm compatibility, a simple 'make' command is sufficient to compile the Core.
Download - https://github.com/libretro/beetle-pce- ... c0a7a61ba2
"The list of things I have heard now contains everything!"

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: RetroArch on Raspbian: the tutorial

Thu Jun 26, 2014 5:30 pm

welshy wrote:New PC Engine/TurboGrafx-16 CD Core
As regular readers of my postings will no doubt have realised by now, I’m rather fond of the PC Engine, it kick started the 'Grey Import' market in the UK and I didn't hesitate to purchase one myself in 1988 after being “Astonished” witnessing R-Type running on NEC's little White Marvel. Due to updates and performance improvements by the RetroArch Team it now offers 'Fullspeed' emulation of the PC Engine/TurboGrafx-16 CD System! For those wishing to compile their own Core it is available at the RetroArch Github. I have tested with various older versions of RetroArch and can confirm compatibility, a simple 'make' command is sufficient to compile the Core.
Download - https://github.com/libretro/beetle-pce- ... c0a7a61ba2
Welshy, I compiled this core and changed my Emulation Station start command to the new core name, but I keep getting the below error:

Code: Select all

unhandled setting F: pce_fast.mouse_sensitivity
RetroArch: [libretro INFO] MDFN_MakeFName:
retroarch: mednafen/pce_fast/input.cpp;59: void PCE_Fast::PCEINPUT_SetInput(int, const char*, void*) Assertion 'port < 5' failed

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

Re: RetroArch on Raspbian: the tutorial

Thu Jun 26, 2014 6:32 pm

KitchUK
I have tried Vanfanel's Core (from his posted Binary) and this one self compiled with 3 versions of RetroArch with no issues so I'm guessing its an Emulation Station problem. Unfortunately I cant be of much assistance as I don't use Emulation Station. Try running RetroArch 'Stand Alone' without ES, if it works, at least you have identified it as the issue. If not, perhaps you can update to a newer revision of RA.
"The list of things I have heard now contains everything!"

ateeq72
Posts: 8
Joined: Fri Jul 04, 2014 12:55 pm

Re: RetroArch on Raspbian: the tutorial

Fri Jul 04, 2014 1:02 pm

am trying to run .nes games. i succesfully compiled and installed retroarch and the cores! but still it wont work!
but i can just run the .nes game using command itself i.e

Code: Select all

retroarch -L ~/core/fceuxxxx_libretro.so ~/roms/nes/Contra.nes
but cannot using the emulationstation can anyone say me what am i doing wrong?


and yeah i have installed all the dependencies!

no matter what i do am stuck up with this error!

Code: Select all

RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
RetroArch [ERROR] :: Cannot init input driver. Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video_input()"

cacophony555
Posts: 140
Joined: Sat Jan 18, 2014 5:54 pm

Re: RetroArch on Raspbian: the tutorial

Thu Jul 10, 2014 5:20 am

ateeq72 wrote: no matter what i do am stuck up with this error!

Code: Select all

RetroArch [WARN] :: [GL]: Stock GLSL shaders will be used.
RetroArch [ERROR] :: Cannot init input driver. Exiting ...
RetroArch [ERROR] :: Fatal error received in: "init_video_input()"
Sounds like the same problem mentioned earlier in this thread:
http://direct.raspberrypi.org/forums/vi ... 65#p538965
(see solution in the next few replies)

I had a similar issue after upgrading some software on my pi, and while the solution allowed me to launch retroarch games again the directional pad on my controller no longer works! (the A and B buttons still work, though). I've verified that the expected inputs are occurring for the d pad via jstest, so I'm not sure why retroarch no longer gets them.

User avatar
JakeTheGreat
Posts: 6
Joined: Mon Jul 21, 2014 4:59 pm

Re: RetroArch on Raspbian: the tutorial

Mon Jul 21, 2014 5:38 pm

Vanfanel wrote:@kalehlr:

run "./retroarch --features"

You should see:

Code: Select all

ALSA:
		audio driver: yes
somewhere in the output.
If you don't then you haven't ALSA support compiled in, so you should do:

Code: Select all

sudo apt-get install libasound2-dev
re-run the configure script and make again. It should work then :)
If not, ask here again.

(Instructions updated to reflect what LemmeFatale and Kalehr have reported)
I have been having a similar problem whenever i try to run any ROMS in Emulation Station. Here is the error message I have been getting:

Code: Select all

Performance
Running on HDMI with explicit settings (CEA mode 1)
RetroArch [ERROR] :: Couldn't find any audio driver named "ext"
Available Audio Drivers are:
RetroArch [ERROR] :: fatal error received in: "find_audio_driver()"
Running on HDMI with preferred settings
___and*
I ran "./retroarch --features" and it had

Code: Select all

ALSA:
      audio driver: yes
in the output, so i don't know where to go from here, so could someone please help me? Thanks, Jake
Thanks,
Jake
(I'm a beginner)

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 11:42 am

Hi!
thanks to this GREAT tutorial I've downloaded and compiled Retroarch with Picodrive and FCEUMM cores. :D
All it's running correctly, but I can't get my Xbox 360 wired controller work: it is yet configured with xboxdrv, and when I plug it in/out it correctly appears a message of connection/disconnection in Retroarch.
Nevertheless, none of the buttons work, so I can't get in the games, or play.

Some suggestions? thank you!

Return to “Gaming”