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

FCEUX - NES Emulator; Joystick/GamePad Support

Thu Aug 15, 2013 12:35 pm

I have been doing some work on my 'Custom' Emulation 'Image' since setting up an XBox360 wired controller. I have been casting my mind back to distant 'Threads'...
Andrey released an excellent port of fceux, a Nintendo Famicom/NES Emulator with native Open GLES 2 support (Direct Link Here - https://www.dropbox.com/s/uu751ibdqmvq0co/fceux.zip). It is certainly THE BEST Famicom/NES Emulator I have come across thus far. Some users have reported problems with configuring Joysticks/Joypads but this it is easily remedied -

Configure the gamepad by running fceux --inputcfg gamepad1 (In 'X' NOT Console)

You will be presented with a black window with a titlebar indicating what button to map which is then automatically saved to the Config File

Hope this helps any user having 'Issues'
Last edited by welshy on Fri Aug 16, 2013 6:09 am, edited 2 times in total.
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Thu Aug 15, 2013 12:59 pm

wow, whelsy, now that's some truly valuable info!
Thanks for sharing!!

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Thu Aug 15, 2013 8:07 pm

You will be presented with a black window with a titlebar indicating what button to map which is then automatically saved to the Config File
There isn't any title bar indicating what button to map.
I'm just greeted with a completely black screen.
I keep pressing the buttons and gamepad is wrongly mapped.
Could you please write the order in which buttons to map are presented?
I can then try to blindly map them.
Thank you

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Thu Aug 15, 2013 8:21 pm

kalehrl
Your video output/overscan settings obviously need altering to see the top of the window!
Give me a few minutes to log them and ill post back...
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Thu Aug 15, 2013 8:48 pm

kalehrl
It looks for two of the same keypress/joystick event in a row (1), (2). If it doesn't find two of the same keypresses in a row, it will allow you to map the button to two separate keys.

Gamepad #1: A (1), (2)
Gamepad #1: B (1), (2)
Gamepad #1: Select (1), (2)
Gamepad #1: Start (1), (2)
Gamepad #1: Up (1), (2)
Gamepad #1: Down (1), (2)
Gamepad #1: Left (1), (2)
Gamepad #1: Right (1), (2)
Gamepad #1: Rapid A (1), (2)
Gamepad #1: Rapid B (1), (2)
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 12:50 am

kalehrl wrote:
You will be presented with a black window with a titlebar indicating what button to map which is then automatically saved to the Config File
There isn't any title bar indicating what button to map.
I'm just greeted with a completely black screen.
I keep pressing the buttons and gamepad is wrongly mapped.
Could you please write the order in which buttons to map are presented?
I can then try to blindly map them.
Thank you
I didn't see it in the begining, either: the button being configured doesn't appear on the visible part of the window, but on the window decoration, so you must run "./fceux --inputcfg gamepad1" from an LXTERMINAL and not from a framebuffer console terminal.
After that, you can forget again about the lame, slow-as-a-dog Xorg system and use the configured fceux.

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 6:14 am

Yes, it must be run in 'X' NOT Console (it was a bit cryptic: original post edited), apologies.
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 9:50 am

I noticed some odd sound issued when using different PRG versions of roms with this emulator. Other than that it runs flawless on just about everything. Thank you for the extra advice whelshy!

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 10:01 am

KitchUK
I not advocating its use because its 'perfect' (what emulator is) and it does have some sound problems (even if run at 48000Hz), but its the best I've found as mednafen is too slow without output resolution/scaling restrictions and MESS has imperfect colours and sound/graphical issues (for instance, the background 'crowd' in Punch Out is 'garbage') which Andreys fceux doesn't suffer from .
"The list of things I have heard now contains everything!"

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 1:12 pm

Thanks for the help guys!
I've mapped the keys correctly but I can't use keyboard and gamepad at the same time.
Once I mapped gamepad, the keyboard mapping got lost.
All keyboard entries were erased and in their stead gamepad ones appeared.
fceux identifies both my keyboard and gamepad as SDL.Input.GamePad.0?!

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 1:29 pm

kalehrl
I haven't tried it but suggest for the (1), (2) map (1): Joypad, (2): Keyboard as it suggests 'If it doesn't find two of the same keypresses in a row, it will allow you to map the button to two separate keys.' That may work.
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 2:17 pm

welshy wrote:KitchUK
I not advocating its use because its 'perfect' (what emulator is) and it does have some sound problems (even if run at 48000Hz)
Good to hear someone else noticed these sound issues, welshy.
I reported them to Andrey but he said he couldn't hear them.
I'm sure audio is popping and crackling because the emulator is synced to video and produces too much or too few audio samples.
Solution would be to slightly pitch up the audio emulation to keep smooth video & smooth audio, but I don't know fceux's sources.

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Fri Aug 16, 2013 5:45 pm

welshy wrote:kalehrl
I haven't tried it but suggest for the (1), (2) map (1): Joypad, (2): Keyboard as it suggests 'If it doesn't find two of the same keypresses in a row, it will allow you to map the button to two separate keys.' That may work.
It doesn't work unfortunately but I'm not planning on using keyboard since the gamepad works now. :)

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Sat Jan 18, 2014 8:16 pm

Is there any way to configure the "exit" button so that I can use a gamepad to exit to a frontend (like emulationstation)?

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Sat Jan 18, 2014 8:33 pm

cacophony555
There isn't a GUI to change the HotKeys, it has to be done manually from the config file

Documentation is Here - http://www.fceux.com/web/fceux-sdl-docs.html
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Sun Jan 19, 2014 12:06 am

Thanks welshy, unfortunately I can't seem to get it to work.

I found the fceux.cfg file in .fceux. It seems to be autogenerated, but I can override the values by making a new .cfg file in a new cfg.d directory.

So I tried adding the following override:

SDL.Hotkeys.Quit = 10

The default was "27" which maps to the ESC key on the keyboard. I got the value of "10" using jstest on the controller (it's the L3 button).

But when I start up fceux I can no longer exit with any key. I know the override is being read because ESC no longer works, but neither does any button on my controller. I also tried other values like "5" which is one of the triggers.

So maybe this SDL key numbering is different than what the controller uses? In the doc it says "replace the values with SDL keysyms", but I'm not sure what that means. I did find this: /usr/include/SDL/SDL_keysym.h
But I don't know how those values relate to what my gamepad outputs.

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Sun Jan 19, 2014 9:48 am

cacophony555
'I tried adding the following override: SDL.Hotkeys.Quit = 10'
That will change the Key to the SDL Keyboard Map '10' which doesn't look as if its assigned a keycode (the numbers in the /usr/include/SDL/SDL_keysym.h file are the SDL Keycodes). Replacing 27 with '10' (which would make sense) seems to cause fceux to replace it with '0' when run? I tried a few things (looking at other emulator config files) but couldn't get it to work with the joypad either! This is where the note in the Thread comes in -

'One last thing, there is NEVER a ‘Perfect’ solution with emulation! Each have their own distinct advantages/disadvantages, it’s all about what you are willing to compromise on and your criteria, be it performance, accuracy, ROM/Image compatibility or ease of use'

There are plenty on good NES emulators that can be used (RetroArch has at least 3 cores that are available for instance, also Mednafen and AdvanceMESS). Not really being an NES fan (its wasn't a big success in the UK so doesn't have the following it has in the USA for instance) I haven't done much experimenting with different emu's for the System so unfortunately cannot help further in this instance. Perhaps another user will see this and post a solution.
Last edited by welshy on Mon Jan 20, 2014 11:04 am, edited 1 time in total.
"The list of things I have heard now contains everything!"

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Mon Jan 20, 2014 7:33 am

Thanks for the input welshy. Glad to hear there are lots of other good nes options.

wilddean
Posts: 2
Joined: Sun Mar 01, 2015 10:24 pm

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Sun Mar 01, 2015 10:28 pm

Sorry To bump an old thread,

am a bit of a linux newb, but been windows through and through,

In regards to the Mapping of the Controller -Cheers for that BTW

Did you have any joy mapping the Quit key for the emulator?

Is there a linux program so that you could do it in reverse, Perhaps map the Home Buttom on the 360 controller to act as an ESC key, as currently whilst using it on Kodi ect it doesnt serve any other purpose,

Would be nice to know your thoughts as to if this is possible

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

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Mon Mar 02, 2015 12:25 am

wilddean wrote: Did you have any joy mapping the Quit key for the emulator?
I never got it working and ended up just using the retroarch core of fceux. For the raspberry pi 2 the nestopia core seems to be a better option than either so I'd suggest going that route instead.

wilddean
Posts: 2
Joined: Sun Mar 01, 2015 10:24 pm

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Mon Mar 02, 2015 1:44 pm

Started playing around with Mapping last night to see if i could get the home button to map to an ESC key, so far no joy, but will keep you updated

What are the other builds like of FCEUX, and how do you acquire and install?

jalopezsuarez
Posts: 1
Joined: Sun Jul 24, 2016 5:18 pm

Re: FCEUX - NES Emulator; Joystick/GamePad Support

Sun Jul 24, 2016 5:28 pm

cacophony555 wrote:Is there any way to configure the "exit" button so that I can use a gamepad to exit to a frontend (like emulationstation)?
Hi. I have the same problem, not only form FCEUX. I made a personal compilation of emulators and ports for my Raspberry Pi3, but some of the Emulators (like FCEUX) doesn't have a nice way to configure a HOTKEY to come back to EmualtionStation menu front.

I found some alternatives likes RetroArch Hotkey... and so on... But I decided to develop PiBack, a generic application to help to exit from any application no matter what (emulators, ports, or other), and go back to EmulationStation, with a GamePad combination of keys.

Check it out here, there is the source code and a binary complied, just to test. Check the Readme.md to configure PiBack.

https://github.com/jalopezsuarez/piback/


So I decided to

Return to “Gaming”