marqs
Posts: 200
Joined: Sat Jun 09, 2012 11:34 am

Re: RetroArch Emulator Frontend

Tue Aug 07, 2012 5:24 pm

For those interested in using real retro controllers with Retroarch etc, I've adapted the gamecon driver to support Pi's GPIO. Currently, up to 4 NES/SNES/N64 pads can be connected to Pi (50mA current limit on 3.3V pin should be just enough for 4). I've tested the driver with 1st party SNES and N64 pads, but NES controllers should work too since they are similar to SNES.

My goal is to add support for PSX and multisystem joysticks at some point. There are also a few other joystick drivers in kernel, which could be adapted for Pi (or preferably for GPIO in general if possible).

The driver (source code, module built for 3.1.9+ kernel and instructions) can be downloaded here.

petrockblog
Posts: 269
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: RetroArch Emulator Frontend

Tue Aug 07, 2012 6:30 pm

marqs wrote:For those interested in using real retro controllers with Retroarch etc, I've adapted the gamecon driver to support Pi's GPIO. Currently, up to 4 NES/SNES/N64 pads can be connected to Pi (50mA current limit on 3.3V pin should be just enough for 4). I've tested the driver with 1st party SNES and N64 pads, but NES controllers should work too since they are similar to SNES.

My goal is to add support for PSX and multisystem joysticks at some point. There are also a few other joystick drivers in kernel, which could be adapted for Pi (or preferably for GPIO in general if possible).

The driver (source code, module built for 3.1.9+ kernel and instructions) can be downloaded here.
This sounds like a perfect match for my plans. I will test this out in the next days. Do you have a blog or repository for further feedback?
fun stuff for technics enthusiasts: www.petrockblock.com

marqs
Posts: 200
Joined: Sat Jun 09, 2012 11:34 am

Re: RetroArch Emulator Frontend

Tue Aug 07, 2012 7:05 pm

petrockblog wrote:This sounds like a perfect match for my plans. I will test this out in the next days. Do you have a blog or repository for further feedback?
Just PM me for now if you have any feedback. Perhaps I'll write a proper article about this after adding support for those other controllers and when this has been tested more thoroughly (e.g. the communication with N64 pads is quite timing sensitive, and I'm not sure if my code works with 3rd party controllers etc.)

mongrol
Posts: 76
Joined: Wed Aug 01, 2012 2:43 am

Re: RetroArch Emulator Frontend

Wed Aug 08, 2012 11:08 am

Has anyone used the imame4all core with a keyboard yet? I'm beat if I can find out how to map certain expected mame functions to different keys. Looking at the imame4all site or source is no use as it's primarily developed for touchscreens.

rui
Posts: 8
Joined: Tue Aug 07, 2012 3:39 pm

Re: RetroArch Emulator Frontend

Fri Aug 10, 2012 12:44 pm

So I am having some issues when I try to run a game right now. I get the following:

Code: Select all

RetroArch: ROM loading skipped. Implementation will load on it's own.
Segmentation fault
Any ideas? Just as a note, I have this installed using the RetroPie-Setup script.

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: RetroArch Emulator Frontend

Mon Aug 13, 2012 5:11 am

Isn't there some verbose mode?
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

petrockblog
Posts: 269
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: RetroArch Emulator Frontend

Mon Aug 13, 2012 7:27 am

rui wrote:So I am having some issues when I try to run a game right now. I get the following:

Code: Select all

RetroArch: ROM loading skipped. Implementation will load on it's own.
Segmentation fault
Any ideas? Just as a note, I have this installed using the RetroPie-Setup script.
Hmmm, which emulator core are you using?
Does this happen will all cores?
Which distribution are you using?
fun stuff for technics enthusiasts: www.petrockblock.com

MIDItheKID
Posts: 8
Joined: Mon Aug 13, 2012 9:06 pm

Re: RetroArch Emulator Frontend

Mon Aug 13, 2012 9:35 pm

Hey everybody. I've made a lot of progress, but I'm stuck at one part.

I now have my RPi boot up, and automatically launch EmulationStation (Big ups to Aloshi for that). I can then control the EmulationStation frontend with my RetroLink SNES controller, and pick a rom to play, and launch it. Then the controller works in game, and I can play away. It's awesome.

Here's where the trouble starts. For some reason, after launching an Emulator/Rom, I lose my keyboard. So I am unable to exit games (normally press esc). Ideally, I don't even want to be using a keyboard at all.

Does anybody know if there's a way to edit the retroarch.cfg to give me the ability to exit an emulator by using the controller? And if so, is there a way to make it a multi button command?

I ask for a multi button command because the USB SNES controller I'm using already has all the buttons on it mapped. It would be great if I could make it so something like L + R + Start + Select will close the emulator, and bring me back to EmulationStation.

Thanks in advance for any suggestions you might have.

arimal
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm

Re: RetroArch Emulator Frontend

Mon Aug 13, 2012 11:00 pm

A few people have had the problem of losing the keyboard after launching a rom, I'm unaware of a fix specifically but if you add

Code: Select all

input_exit_emulator_btn = "btn#"
to your retroarch.cfg you will be able to exit the emulator on a button press. I know of no way to do this with multiple buttons.

User avatar
SQLEinstein
Posts: 13
Joined: Thu Jul 19, 2012 4:13 pm

Re: RetroArch Emulator Frontend

Tue Aug 14, 2012 1:16 pm

First of all I would like to thank everyone who has contributed to this great project. Especially Toad King, Aloshi, and petrockblog. But has anyone been able to get proper sound running yet? I've tested several roms for NES, SNES, and Atari. They all run great, but the sound is horrible! Is there a configuration or setting that can fix this? Does anyone know what needs to be done to fix the problems with the Alsa? Is it possible to force RetroArch to use a different sound driver?

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: RetroArch Emulator Frontend

Tue Aug 14, 2012 1:25 pm

SQLEinstein wrote:First of all I would like to thank everyone who has contributed to this great project. Especially Toad King, Aloshi, and petrockblog. But has anyone been able to get proper sound running yet? I've tested several roms for NES, SNES, and Atari. They all run great, but the sound is horrible! Is there a configuration or setting that can fix this? Does anyone know what needs to be done to fix the problems with the Alsa? Is it possible to force RetroArch to use a different sound driver?
Same for me. In addition, NES and SNES runs really slow. Maybe some of you could post (good) working configuration files?
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo


forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: RetroArch Emulator Frontend

Tue Aug 14, 2012 7:23 pm

I looked for these products some time ago and read a lot of user's ratings.

The adapter works fine with one controller, but NOT with two (crappy reaction times and complete blackouts).

The imitation gamepads do work, but they don't work very long. Soon the buttons get loose and the controller sometimes doesn't react anymore.

So the best thing would be to buy TWO adapters or try the GPIO-hack with real SNES controllers.
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

MIDItheKID
Posts: 8
Joined: Mon Aug 13, 2012 9:06 pm

Re: RetroArch Emulator Frontend

Tue Aug 14, 2012 7:43 pm


I am using one of these: http://www.amazon.com/Nintendo-Retrolin ... B002824SNS
It works perfectly. The only issue I had is that the joyconfig script that you have to run, didn't seem to pick up on all the buttons (up, and right) - si I had to go into the retroarch.cfg and change the values manually. Works fine after that.

MIDItheKID
Posts: 8
Joined: Mon Aug 13, 2012 9:06 pm

Re: RetroArch Emulator Frontend

Tue Aug 14, 2012 8:26 pm

Does anybody know if the retroarch.cfg accepts inputs from the GPIO pins? If it does not, is there something I could add to the retroarch.cfg to set it up to allow input from the GPIO pins?

Maybe something like:

GPIO.setup(13, GPIO.IN)
input_exit_emulator_btn = GPIO.input(13, True)

Theoretically making it so if I trigger GPIO13, it will return to the emulator screen in EmulationStation. Basically what i'm trying to do here is make an external "reset" button for the emulator where I can mount a momentary push button that will run the "input_exit_emulator_btn" command.

User avatar
SQLEinstein
Posts: 13
Joined: Thu Jul 19, 2012 4:13 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 1:36 pm

Toad King,

The dependicies listed on GitHub for RetroArch-Rpi state that "RetroArch needs at least one of these audio driver libraries":

•ALSA
•OSS
•RoarAudio
•RSound
•OpenAL
•JACK
•SDL
•XAudio2 (Win32)
•PulseAudio

Does this mean that we can force RetroArch to use a different audio driver other than Alsa? If the answer is yes could you please explain how. I would like to see which drivers perform best.

Thanks!

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 2:26 pm

Someone correct me if I'm wrong, but I think you can specify it in the config file with:

Code: Select all

audio_driver = alsa
etc. Depending on configuration possible candidates are: alsa, pulse, oss, jack, rsound, roar, openal, sdl, and xaudio.

User avatar
SQLEinstein
Posts: 13
Joined: Thu Jul 19, 2012 4:13 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 3:28 pm

Aloshi wrote:Someone correct me if I'm wrong, but I think you can specify it in the config file with:

Code: Select all

audio_driver = alsa
etc. Depending on configuration possible candidates are: alsa, pulse, oss, jack, rsound, roar, openal, sdl, and xaudio.
Thanks Aloshi! I'll check my config file and I'll give that a try tonight.

I'm running 2012-07-15-wheezy-raspbian.zip and I used the RetroPie script to install so does anyone know if the other audio drivers are already installed or will they need to be installed seperately? Also do all the listed audio drivers work with HDMI? And will installing multiple audio drivers cause certain conflicts? Finally has anyone tried any of the other audio drivers and if so to what success?

Thanks!

Jasperklaren
Posts: 2
Joined: Thu Aug 09, 2012 3:17 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 3:28 pm

Aloshi wrote:Someone correct me if I'm wrong, but I think you can specify it in the config file with:

Code: Select all

audio_driver = alsa
etc. Depending on configuration possible candidates are: alsa, pulse, oss, jack, rsound, roar, openal, sdl, and xaudio.
I was thinking the same, why would we stick to a faulty (early development stage) ALSA driver and not pick a working one? Im not a linux guru, but this doesnt sound all to hard? :roll:

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 3:40 pm

I think it's because the other drivers are slower. Which drivers RetoArch has available are decided at compile time I believe, you can check what is available by running retroarch --features or something (check the command-line help text).

When I tried playing with sound, I found that ALSA worked the best with the fceumm core. I had Mega Man 2 working almost perfect on keyboard - but for some reason, when I use my 360 controller and move the analog sticks, audio starts to cut out, and if I keep moving them, disappears completely (nearly permanently). The pocketsnes core never had even close to perfect sound with the drivers I tried (OSS, ALSA, PulseAudio, and SDL I think - this was a while ago).

Also, a lot of my sound problems got better when I overclocked to 800MHz.

User avatar
SQLEinstein
Posts: 13
Joined: Thu Jul 19, 2012 4:13 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 6:12 pm

Aloshi wrote:I think it's because the other drivers are slower. Which drivers RetoArch has available are decided at compile time I believe, you can check what is available by running retroarch --features or something (check the command-line help text).

When I tried playing with sound, I found that ALSA worked the best with the fceumm core. I had Mega Man 2 working almost perfect on keyboard - but for some reason, when I use my 360 controller and move the analog sticks, audio starts to cut out, and if I keep moving them, disappears completely (nearly permanently). The pocketsnes core never had even close to perfect sound with the drivers I tried (OSS, ALSA, PulseAudio, and SDL I think - this was a while ago).

Also, a lot of my sound problems got better when I overclocked to 800MHz.
Do you think using a USB sound card with a powered hub make a difference with ALSA? And this might be a stupid question but if I use a usb sound card would that prevent the audio from outputting via HDMI?

ratherDashing
Posts: 39
Joined: Tue Jun 05, 2012 3:00 am

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 7:44 pm

Do you want audio from the HDMI port? Then just use the HDMI plug.

If you want to get a USB sound card then you plug that into the USB and then plug whatever you want to receive the audio into that card.

The USB sound card does not take the audio onto the USB card and then push it back over the HDMI plug if that's somehow what you were thinking.

User avatar
Toad King
Posts: 157
Joined: Sun Dec 18, 2011 8:03 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 8:19 pm

One of the devs said that using the Rsound driver and forwarding the audio to his PC gave him basically perfect sound on his Raspberry Pi, so if you have a spare PC that can work I guess. :P

Also, any sound going through the 3.5mm jack or HDMI on the board will be either A: the ALSA driver or B: the OpenMax IL libraries.

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 10:29 pm

Toad King wrote:One of the devs said that using the Rsound driver and forwarding the audio to his PC gave him basically perfect sound on his Raspberry Pi, so if you have a spare PC that can work I guess. :P

Also, any sound going through the 3.5mm jack or HDMI on the board will be either A: the ALSA driver or B: the OpenMax IL libraries.
Does that mean we have no chance of getting RetroArch work on the RasPi in a playable way, until the ALSA drivers are OK?
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

User avatar
Toad King
Posts: 157
Joined: Sun Dec 18, 2011 8:03 pm

Re: RetroArch Emulator Frontend

Wed Aug 15, 2012 10:34 pm

forenbenutzer wrote:
Toad King wrote:One of the devs said that using the Rsound driver and forwarding the audio to his PC gave him basically perfect sound on his Raspberry Pi, so if you have a spare PC that can work I guess. :P

Also, any sound going through the 3.5mm jack or HDMI on the board will be either A: the ALSA driver or B: the OpenMax IL libraries.
Does that mean we have no chance of getting RetroArch work on the RasPi in a playable way, until the ALSA drivers are OK?
If someone wants to take a shot at making a OpenMAX IL driver for RetroArch, they can feel free too. All it has to do is play streaming PCM audio and implement audio blocking (for sync purposes).

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 2 guests