Raspberry Pi NES Emulator

  

This tutorial will demonstrate how to install Nintendo NES/Famicom emulator on the Raspberry Pi running Debian.  Begin by installing the necessary dependencies. In a terminal, enter:

sudo apt-get install scons libsdl1.2-dev libsdl1.2debian-esd subversion libgtk2.0-dev

Checkout the most recent sources using subversion:

svn checkout https://fceultra.svn.sourceforge.net/svnroot/fceultra/fceu fceultra

The repo has moved here:

svn checkout svn://svn.code.sf.net/p/fceultra/code/fceu fceultra

Change directory into the root of the source tree

cd fceultra/

Compile and install FCEU using the scons build tool:

sudo scons GTK=1 install

That’s it! To run:

fceux

Then select the ROM with from the title bar menu, File->Open ROM, or with Ctrl+O.

You can easily setup a gamepad too, like the USB NES RetroPort. This adapter converts an authentic NES controller to USB.   To configure, run fceux using the inputcfg flag to setup configure.  Press the corresponding buttons in series as they are prompted. Note: There are two dashes ( – - ) together in the command below:

fceux –inputcfg gamepad1

 

24 Comments

  1. Nice work; I seem to get no sound despite enabling the ALSA drivers (although this is not a surprise) and it’s a little too slow to be playable, but it’s certainly a starting point!

    • Agreed… the 2D graphics performance is quite poor, hopefully this will improve with newer releases. The sound, however, is at least now functional in the newer builds, 2012-06-18-wheezy-beta.zip and more recent.

  2. I kept getting error messages for the downloading, same with apt-get update. Just a problem with my network (internet seems fine otherwise) or a broken link down the line?

    • I was having some issues with apt-get yesterday. Took a trouble tries to update. Working fine now.

      • I’ve had intermittent issues with the apt sources recently as well… glad to hear you got it working!

  3. Hi, great work! I definitely have to try out this emulator! I have used the RetroArch emulator so far and still have sound problems with the current wheezy beta. This might be another interesting alternative for the SNES emulator …

    If you are interested in how to connect an original SNES controller to the Raspberry check out my recent post at

    http://petrockblog.wordpress.com/2012/07/03/snesdev-rpi-a-snes-adapter-for-the-raspberry-pi/

    You find a demo video at the end of the post.

    • Nice work Florian! The gameplay for the SNES in your video is much smoother than I have been able achieve so far on the NES. I was not previously familiar with RetroArch project, but it certainly looks very promising as multi-emulator frontend for the Raspberry Pi!

  4. Hi, the svn repository is moved to this address: svn://svn.code.sf.net/p/fceultra/code/fceu the one in this blogpost got this message in the root: “DO NOT USE THIS REPOSITORY. WE MOVED AGAIN. SORRY. CHECK THE SF PAGE”

  5. Hnrique Martins

    hi,

    when i try install the package libsdl1.2debian-esd i received this information

    pi@raspberrypi ~ $ sudo apt-get install libsdl1.2debian-esd
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package libsdl1.2debian-esd is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    libsdl1.2debian

    E: Package ‘libsdl1.2debian-esd’ has no installation candidate”

    and… when i execute the “sudo scons GTK=1 install” i get this

    “/home/pi/fceultra/src/lua-engine.cpp:5768: undefined reference to `lua_pushnil’
    /home/pi/fceultra/src/lua-engine.cpp:5769: undefined reference to `lua_setfield’
    /home/pi/fceultra/src/lua-engine.cpp:5775: undefined reference to `lua_settop’
    collect2: ld returned 1 exit status
    scons: *** [src/fceux] Error 1
    scons: building terminated because of errors.”

    any suggestions on how to solve this problem?

  6. Hi I have the exact same problem as Hnrique,

    as the libsdl1.2debian-esd is not available I installed the libsdl1.2debian.

    But “sudo scons GTK=1 install”
    Results into
    scons: *** [src/fceux] Error 1
    scons: building terminated because of errors.”

    • Try this?

      sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev

  7. you are missing the lua language software or something ( i’m no good at linux )
    i did install it by using “apt-get install liblua51-dev” i think search a bit around internet youll find it :)

  8. 1) Make sure to ‘sudo apt-get update’

    2) As of yesterday liblua was retrieved with ‘sudo apt-get install lublua51′

    3) It takes a while to compile, so you might want to find something else to do for 15 minutes or so.

    4) My pi is connected to a composite tv. The display is not working very well at all. Seem I can only see game screen when I hit pause. Any suggestions on tweaks in FCEU settings or Raspbian?

  9. Only works for me if I disable sound:
    fceux –sound 0 myrom.nes

    Also, it is too slow to be playable, overclocked at 1100

  10. I get an error message saying;

    scons: *** No SConstruct file found.

    what should I do?

    • Actually Michael missed a step. After you CD to “fceultra” folder, you still need to CD one more time into “trunk” folder. You should be in “~/fceultra/trunk” after you finished that step. You can now issue the command “sudo scons GTK=1 install”. I bet you will continue to face several problems before successfully installing the program (because I had experienced it).

Trackbacks/Pingbacks

  1. NES Emulator | Raspberry Pi Video Game Console - [...] using this post to install an NES emulator; however, as you can see in the posts, there’s a lot …

Leave a Reply