[ English ] [ Español ]

ePSXe on Linux HOWTO
By Psy-Q. Last change: March 4, 2003 / 18:37 CET


0. About This Document
1. Introduction
2. System Requirements
3. Note about $EPSXE
4. Note about Multiuser Systems
5. Basic Setup
6. 3D Acceleration
7. Using a Real PSX Joypad on Linux
8. Local Copies of the Files Needed
9. Screenshot to Tease You

0. About This Document

This isn't a traditional HOWTO as you'd see them from the Linux Documentation Project. It's just a plain HTML file (HTML 4.01 Strict for you nitpicky types), not DocBook SGML. That being said, contributions are very welcome, but they don't need to be in DocBook SGML either. Valid HTML 4.0 Strict or plain text is perfectly fine. For obvious reasons, this HOWTO won't be submitted to the LDP for consideration.

1. Introduction

ePSXe is quite a nice PSX emulator on Windows, but the Linux version leaves a few things to be desired. Don't get me wrong, it's a great piece of software once it works, but the whole thing isn't very Linuxy. From the non-standard packaging (a .zip file that doesn't even make its own directory when expanded? What happened to .tar.gz?) to complete ignorance of basic multi-user operating system concepts like file permissions and local per-user vs. global configuration files, ePSXe is a bit of a mess. However, if you face this mess and start cleaning things up, you're rewarded with a very good PSX emulator. For me, it has completely replaced my real PSX.

I noticed that there's barely any real documentation for ePSXe on Linux, so I'd like to share my experiences. Even if the guide's not perfect, I hope that it's enough to get you started.

This howto is aimed at beginners, and possibly intermediate users. Experienced users shouldn't have many problems setting up ePSXe, but maybe they can grab a few hints from here anyway. I do realize that it is simple to set up ePSXe just like in Windows, i.e. using a graphical file manager and inside your home directory, but this howto is meant to be distribution agnostic, window manager agnostic, anything agnostic. Therefore we'll do things in the shell, since any distro comes with a shell. Miracles of modern technology, huh?


2. System Requirements


3. Note About $EPSXE

I will be using the environment variable $EPSXE quite a lot in most of the instructions below. It should contain the path to your ePSXe installation. If you want to use this variable while following these intructions, you will have to set it yourself. Step 5.2 shows you how. Also, keep in mind that it will not exist in any new terminal window you open. So either always work in the same terminal or make sure that the variable is set (using echo $EPSXE) before you try using it in your paths. If you are unsure there, you can still always type out the entire path to your ePSXe directory instead of $EPSXE.


4. Note About Multiuser Systems

I tried to correct some of ePSXe's shortcomings in this respect by at least giving files the proper permissions for a multiuser system and trying to make sure they keep them. It's unlikely that multiple instances of ePSXe will ever run on a single system, and doing so breaks ePSXe, but this way you can at least start and use ePSXe as any user of your system, not just your main user. It will still save to the same memory card files, configuration files etc., but at least it will work. That's something that ePSXe usually doesn't do right out of the box if you attempt to install it like this.

However, you must be aware that the memory card files and config files are world-writable if you follow these instructions. That means any other user on the same machine can potentially overwrite your saves. This is a problem that ePSXe's authors should have addressed -- if you are not happy with the state of things, just chown -R the entire $EPSXE directory to your "main" user and chmod -R 755 it. That will make it so that only your main user can use ePSXe. On the other hand, you could argue that if you run a multiuser machine, you should be very familiar with the Linux permission system and you should know what you're doing without me holding your hand, so I'll leave it at that.

ePSXe is closed source, so this whole problem will remain until its authors either release the source or change it on their own. I'm not sure if any of this will ever happen, so prepare to live with it. Again, this is not a rant against ePSXe, it's an objective view of one of its major shortcomings. I'm happy enough that there is a decent PSX emulator for Linux, and I thank the ePSXe team for their work and dedication.


5. Basic Setup

  1. Download ePSXe for Linux from the ePSXe download page.

    For some reason, this is zipped instead of the more common .tar.gz or .tar.bz2. But don't let that confuse you.


  2. Become root and make a new directory to contain your ePSXe installation. I made mine in /usr/local/games/epsxe.

    mkdir /usr/local/games/epsxe

    To make things easier during the rest of these instructions, you can set an environment variable containing this path:

    export EPSXE='/usr/local/games/epsxe'


  3. Now we'll unzip the zip file you downloaded into this directory -- I'm assuming that all files you download reside in /tmp. If they're elsewhere, you need to adjust these paths accordingly. If you don't have unzip, you might have to install the "zip" or "unzip" package for your distribution. If all else fails, you can download the Linux unzip binary from Info-Zip.

    unzip -d $EPSXE /tmp/epsxe152lin.zip



  4. Assign proper permissions to the directories that were created:

    cd $EPSXE
    chmod 777 cfg sstates snap memcards
    touch memcards/epsxe000.mcr memcards/epsxe001.mcr .epsxerc
    chmod 666 memcards/*
    chmod 666 .epsxerc

    You might have noticed that we also created the memory card files and gave them useful permissions. This is to avoid problems when saving games later.


  5. Download a Sony PlayStation BIOS file. But first, read this carefully: you may not use such a file to play games in a PSX emulator if you do not own a Sony PlayStation, Sony PSOne or Sony PlayStation 2 console. Owning the BIOS image without owning the actual console is a violation of copyright law, so the lawyers say. You will have to look for the file yourself, I can't make it available here since I have no way to verify if you own a PSX. I recommend the SCPH-1001 BIOS, it can run most games. The file is often called SCPH1001.BIN. Be careful though, several dozen domain squatters and sleazy spammers are using scph1001 as keyword for their spyware-infested sites. In case you can't find the image anywhere, there are ways to transfer the BIOS from your PSX to your PC, but those are beyond the scope of this howto.

    Filenames you can try to search for: SCPH1001.zip, SCPH5000.zip, SCPH5500.zip, SCPH7001.zip, scph7502.zip, scph75021.zip, scph75023.zip, scph75024.zip. Any of these BIOS should work.


  6. Unzip the BIOS zip file to your ePSXe directory's bios directory.

    unzip -d $EPSXE/bios/ /tmp/SCPH1001.zip


  7. Download a GPU plug-in that works in ePSXe. This is what will generate all of the emulated console's graphics. Let's start with a basic one that should work for you, the excellent P.E.Op.S. Soft GPU. Download the X version, not the SDL one. This is a software-based GPU plug-in. It will even work on your machine if you don't have any 3D acceleration, or if your 3D acceleration isn't supported by X. Let's unzip it to the ePSXe plug-in directory:

    tar xfz /tmp/gpupeopssoftx112.tar.gz -C $EPSXE/plugins/


    Once that's done, you will need to move the included configuration utility and config file to ePSXe's "cfg" directory:

    mv $EPSXE/plugins/cfgPeopsSoft $EPSXE/cfg/
    mv $EPSXE/plugins/gpuPeopsSoftX.cfg $EPSXE/cfg/
    chmod 666 $EPSXE/cfg/gpuPeopsSoftX.cfg



  8. Download an SPU plug-in. I recommend the P.E.O.p.S. OSS PSX SPU. Then extract this plug-in to your plugins directory like so:

    tar xvfz /tmp/spupeopsoss104.tar.gz -C $EPSXE/plugins/

    Again, we will need to move the configuration utility:

    mv $EPSXE/plugins/cfgPeopsOSS $EPSXE/cfg/



  9. We're getting close to a working PSX emulator now! Unfortunately, there seem to be a few problems when using multithreading, which is apparently required for certain GPU and/or SPU plug-ins. ePSXe (or the plug-in) seems unable to locate libpthread, which is necessary for this. That's why you should locate the file "libpthread.so.0" (might be "libpthread-0.9.so" or some such name) on your system and copy it to your ePSXe directory. Then you'll need to apply this workaround, and the one in step 10:

    cp /lib/libpthread.so.0 $EPSXE/



  10. In order to circumvent the glitches mentioned in step 9 (and a few more), we should use a little shell script to start ePSXe for us instead of starting the binary directly. Put the following code in a file and copy it to /usr/local/bin/ (or anywhere else in your $PATH). I called mine start_epsxe.sh. Don't forget to set the path after export EPSXE to the actual location of your ePSXe directory.

    #!/bin/bash

    export EPSXE='/usr/local/games/epsxe'
    export LD_LIBRARY_PATH=$EPSXE
    cd $EPSXE
    ./epsxe
    chmod 666 $EPSXE/cfg/*.cfg $EPSXE/sstates/* \
    $EPSXE/memcards/*.mcr $EPSXE/snap/* 2>/dev/null


    After you created this script, chmod it like so:

    chmod 777 /usr/local/bin/start_epsxe.sh



  11. Let's try starting ePSXe! You should be able to type start_epsxe.sh in a shell now, as normal user, not root. In case you get "start_epsxe.sh: command not found", you may need to start the script using an absolute path (e.g. /usr/local/bin/start_epsxe.sh). You'll hopefully see epsxe's main window.

    If this doesn't work, please review the instructions. If it's still no go, there are a couple of things that could be wrong with your distribution that prevent you from using ePSXe, however unlikely that is. Even if ePSXe started successfully, there are still a few caveats left before you can properly use it, though, so please read on.


  12. Go to the menu Config -> BIOS to set up your BIOS path. You need to supply the full path to your PSX BIOS file, e.g. /usr/local/games/epsxe/bios/SCPH1001.BIN


  13. Go to the menu Config -> Video and verify that "P.E.Op.S. Softx Driver" is selected. Click the "Test" button to find out if the plug-in is working. Click "Configure" and immediately "OK", to create the config file (ePSXe will not run otherwise). You can use "Configure" to fine tune your video settings, but please leave them the way they are until you have verified that everything works -- the default settings should be very compatible with most games and most PCs. Exit the dialog with "OK".


  14. Go to the menu Config -> Sound and verify that "P.E.Op.S. OSS Audio Driver" is selected. Again, click "Test" to see if everything's okay. Click "Configure" and immediately "OK" to create the config file. Exit the dialog with "OK".


  15. Go to the menu config -> CDROM and make sure the path is correct for the CD-ROM drive you want to use. /dev/cdrom will be okay in most cases, but if you have multiple CD-ROM drives or a CD-ROM and a burner, your path may differ.


  16. In the Config -> Game Pad -> Pad 1 menu, you can set up the controls the way you like them. See the "Using a Real PSX Joypad on Linux" section if you want a real joypad -- there's extra hardware required, though. Set up keyboard-based controls anyway, just to see if things work.


  17. It's time to try a game! Go to the "File" menu and select one of the options to launch a game. If you have your game on its original PSX CD-ROM, you can insert that into the CD-ROM drive specified in step 15 and select File -> Run CDROM. It might take up to a minute or so for the game to start. Don't just cancel before you're sure the game won't run. Once the game is running, you can press ESC to get back to the ePSXe menu, where you can save your game state or change discs if it's a multi-disc game. To get back to the game, select Run -> Continue.


  18. If everything's okay, you're playing your PSX game already. You can now take your time to tune the emulator. Check out the "configure" dialogs of your GPU and SPU plug-ins, for example. If things are slow, completely disable sound. If things are still slow, look below for hints on how to use 3D acceleration for faster and more beautiful graphics.



6. 3D Acceleration

If you have a machine that's too slow to emulate the PSX at 100% speed, if you want the best possible performance or if you're looking for improved graphics quality, 3D acceleration is your friend. I've only tested this using an nVidia GeForce card, but it should work with any 3D card that has Linux OpenGL support.

  1. Make sure your system is configured for 3D acceleration. That means having the right X drivers and support libraries for your graphics card. Most often, they are supplied by your graphics card vendor. On many systems, you can use this command to find out if you have 3D acceleration enabled:

    glxinfo | grep 'direct'


    If it returns direct rendering: Yes, you're in luck. Otherwise please read your graphics card vendor's documentation or the XFree86 manuals or the Holy Bible to find out how to get acceleration up and running, since this is way beyond the scope of this howto. You can also try the little demo called "glxgears" to verify that your 3D acceleration REALLY works. Just run it and watch the console output to see how many frames per second you're getting. On my system (1 GHz T-Bird with no-name RAM, GeForce 4 Ti 4200) I get about 3000 fps. Based on that, if you're getting more than about 300 fps it might be safe to say that you have acceleration.


  2. Download Pete's MesaGL Linux PSX GPU plug-in. Remember to write Pete a thank-you e-mail if this works. Without him, proper PSX emulation on Linux would be pretty much impossible. Again, we need to unzip the plug-in and move the configuration utility (as root):

    tar xvfz /tmp/gpupetemesagl168.tar.gz -C $EPSXE/plugins/
    mv $EPSXE/plugins/*cfg* $EPSXE/cfg/
    chmod 666 $EPSXE/cfg/gpuPeteMesaGL.cfg



  3. Start epsxe with the cute start script you hopefully made at step 5.10.


  4. Go to the menu Config -> Video. Switch to "Pete's MesaGL Driver" and click "Test". If the plug-in is working, click "Configure". You can either mess around with these settings or just leave them as they are until you've tested that they work. Close both dialogs with "OK".


  5. As normal user, run a game! You can fine tune everything in the plug-in's configuration screen, but apart from the "Game Fixes" section for specific games and the graphics resolution, you shouldn't have to change anything to run most of the PSX games out there nicely.


7. Using a Real PSX Joypad on Linux

This exact solution will only work if you have USB ports or a USB controller supported by Linux. There are dozens of other ways to get joypad support working, so don't give up if this doesn't help.

  1. Buy a PSX to USB joypad converter that acts as a perfectly normal USB HID device. Mine is manufactured by "Boom" and came from Lik-Sang, your friendly online Hong Kong exporter.


  2. Download AmmoQ's PadJoy plug-in for ePSXe.


  3. Extract the plug-in from the .tgz file you downloaded. You can do this in /tmp if you like:

    cd /tmp
    tar xfz padJoy071.tgz
    cp padJoy/bin/libpadJoy-0.7.so $EPSXE/plugins/



  4. As root, load the following modules:

    /sbin/modprobe hid
    /sbin/modprobe joydev


    The USB modules for your system must already be loaded before this. Since there are different USB controllers out there, I can't guess which ones are right for you. If any of these modules produce a modprobe: cannot locate module error, you might have to install the modules separately. Some distributions include these in their "usb" or "joystick" packages, others require you to compile the modules yourself. They are part of any standard 2.4 kernel source. There are many good kernel compilation guides out there that can help you get the modules you need.


  5. Test that your joypad is working by running jstest. If you don't have jstest, it's usually part of the joystick utilities package of most distributions. The package is often simply called "joystick".

    I'm assuming that your joypad adapter is /dev/input/js0 here. It might be different if you have multiple joysticks or pads.

    jstest /dev/input/js0


    You should see a single line indicating which buttons are pressed and what value the analog sticks currently have. If you don't see anything change when pressing a button and are using a Dual Shock or Dual Shock 2 pad, try turning the analog functions on and off using the "Analog" selector in the middle of the joypad. If it still doesn't work, I'm amazed you got this far -- are you sure the joydev and hid modules are loaded? Verify this with /sbin/lsmod


  6. Now for the groovy part. Start ePSXe as usual, then go to "Config" -> "Ext. Game Pad". Select "ammoQ Joydevice Pad Driver" if it isn't already, and then "Test". If it works, use "Configure" to set it up to your tastes. Note that the analog sticks won't work with padJoy. There is a separate plug-in in the works (padAnalog, also by ammoQ) that might fix this.


8. Local Copies of the Files Needed

I took the liberty of making all the files you need to get the emu running available here, with the exception of a BIOS image. I didn't get official permission to do this, so if any of the authors feels offended feel free to send me a message and I'll remove your file.


9. Screenshot to Tease you

There you go (click to zoom):

ePSXe Screenshot (small)




ePSXe on Linux HOWTO - Psy-Q, 2003. All mentioned trademarks are the property of their respective owners.

Valid HTML 4.01!