2022-01-12 02:54:52 +00:00
FCEUX SDL 2.6.0 SDL README
2012-03-06 15:45:24 +00:00
==========================
2020-07-13 00:54:18 +00:00
Originally By Lukas Sabota (sf: punkrockguy318)
Updated By mjbudd77
2012-03-06 15:45:24 +00:00
2021-04-12 10:47:14 +00:00
[NOTE: This only applies to Qt/SDL builds]
2016-09-01 22:37:57 +00:00
2012-03-06 15:45:24 +00:00
http://www.fceux.com
2022-01-12 02:54:52 +00:00
Last Modified: January 11, 2022
2012-03-06 15:45:24 +00:00
Table of Contents
-----------------
1. Requirements
2. Installation
3. Compile-time options
4. GUI
5. LUA Scripting
5. FAQ
6. Contact
1 - Requirements
----------------
2020-10-22 02:54:31 +00:00
* sdl2 - Version >= 2.0 (sdl2 >= 2.8 recommended)
2020-07-13 00:54:18 +00:00
* cmake - Required to build fceux.
2021-10-21 23:50:38 +00:00
* qt5 OR qt6 - (qt version >= 5.11 recommended)
- Required Qt Modules: Widgets and OpenGL
- Optional Qt Modules: Help
2020-07-13 00:54:18 +00:00
* liblua5.1 (optional) - Will statically link internally if the system cannot provide this.
2021-06-23 11:02:47 +00:00
* libx264 (optional) - H.264 video encoder for avi recording (recommended)
2021-09-01 01:13:42 +00:00
* libx265 (optional) - H.265 video encoder for avi recording (recommended)
2021-09-30 11:12:20 +00:00
* ffmpeg libraries (optional) - for avi recording (recommended)
* - ffmpeg libraries used: libavcodec libavformat libavutil libswresample libswscale
2020-07-13 00:54:18 +00:00
* minizip
* zlib
* openGL
2021-05-13 22:46:17 +00:00
* c++ compiler -- you may use g++ from gcc or clang++ from llvm or msvc 2019
2012-03-06 15:45:24 +00:00
2 - Installation
----------------
2020-08-12 00:31:53 +00:00
The old scons build system is no longer supported.
2020-07-13 00:54:18 +00:00
Fceux can be compiled and built using the cmake build system. To compile, run:
2012-03-06 15:45:24 +00:00
2020-07-13 00:54:18 +00:00
mkdir build; cd build;
2020-10-22 02:54:31 +00:00
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. # For a release build
2020-07-13 00:54:18 +00:00
To build a binary with debug information included in it:
2020-10-22 02:54:31 +00:00
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
2020-07-13 00:54:18 +00:00
2020-08-12 00:31:53 +00:00
The Qt version of the GUI builds by default and this is the preferred GUI for use.
2021-04-12 10:47:14 +00:00
For those who must have GTK/Gnome style, there is a GTK style plugin for Qt that
can be installed to the OS and selected for use via the GUI.
The previous GTK version of the GUI is now retired and has been removed from the build.
2020-10-22 02:54:31 +00:00
2021-04-12 10:47:14 +00:00
The Qt version GUI by far exceeds the old GTK gui in capability and performance.
The Qt GUI can build/link against both Qt5 and Qt6. To enable building against Qt6, use -DQT6=1 argument:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DQT6=1 -DCMAKE_BUILD_TYPE=Debug ..
2020-08-12 00:31:53 +00:00
2020-07-13 00:54:18 +00:00
To do the actual compiling:
make
To compile faster with multiple processes in parallel:
make -j `nproc`
2012-03-06 15:45:24 +00:00
After a sucessful compilation, the fceux binary will be generated to
2020-07-13 00:54:18 +00:00
./build/src/fceux . You can install fceux to your system with the following command:
2012-03-06 15:45:24 +00:00
2020-09-18 03:12:01 +00:00
sudo make install
2012-03-06 15:45:24 +00:00
2020-10-22 02:54:31 +00:00
By default cmake will use an installation prefix of /usr/local.
The recommended installation prefix is /usr (this is where the installed fceux.desktop file expects everything to be)
2012-03-06 15:45:24 +00:00
You can choose to install the lua scripts (located in output/luaScripts) to a directory of your choosing:
cp -R output/luaScripts /usr/local/some/directory/that/i/will/find/later
2020-07-13 00:54:18 +00:00
If you would like to do a full clean build a 'make clean' like function, you can do either of following:
make clean # from inside build directory
2012-11-24 20:51:09 +00:00
2020-07-13 00:54:18 +00:00
OR:
Delete build directory and start over at initial cmake step:
rm -rf build;
2012-11-24 20:51:09 +00:00
2012-03-06 15:45:24 +00:00
3 - Compile-time options
------------------------
You can enable and disable certain features of fceux at build time.
2020-07-13 00:54:18 +00:00
Look in the src/CMakeList.txt file to tweak options.
2012-03-06 15:45:24 +00:00
4 - GUI
-------
2021-04-12 10:47:14 +00:00
The Qt GUI is required and automatically builds as part of the build. The Qt GUI is the default.
When invoking cmake, Qt6 can be used (instead of Qt5) by specifying a -DQT6=1 on the command line.
2020-08-12 00:31:53 +00:00
See above build instructions.
2020-08-12 00:58:54 +00:00
OpenGL options:
For Linux builds, the OpenGL library preference can be either GLVND or LEGACY (default).
To use GLVND OpenGL, add a -DGLVND=1 on the cmake command line.
2012-03-06 15:45:24 +00:00
2021-10-21 23:50:38 +00:00
Qt Help Engine options:
The GUI supports both online and offline documentation options.
Online documentation requires an internet connection and a browser.
Qt supports an help engine that can read compiled html files (made via the Qt qhelpgenerator tool),
these files can reside locally on ones computer and be accessed by the GUI using the Qt help engine module.
The Qt help engine is an optional dependency and can be enabled in the build by
adding a -DQHELP=1 on the cmake command line.
2020-10-22 02:54:31 +00:00
Qt Styling Options:
2021-10-21 00:59:56 +00:00
The Qt GUI can use custom Qt widget styling by providing it a Qt stylesheet file.
Use the GUI config window to set style options.
2020-10-22 02:54:31 +00:00
2012-03-06 15:45:24 +00:00
5 - LUA Scripting
-----------------
2020-07-13 00:54:18 +00:00
FCEUX provides a LUA 5.1 engine that allows for in-game scripting capabilities. LUA is enabled either way. It is just a matter of whether LUA is statically linked internally or dynamically linked to a system library.
2012-03-06 15:45:24 +00:00
2012-05-11 06:08:04 +00:00
A collection of LUA scripts are provided with the source distribuition in the output directory:
2012-03-06 15:45:24 +00:00
$source_directory/output/luaScripts
2012-05-11 06:08:04 +00:00
You should be able to run most of the scripts in this directory out of the box. However, some of the the lua scripts require functionality from the "auxlib.lua" library. This file can be copied from "./bin/auxlib.lua" or "./src/auxlib.lua". You will need to place this file in the LUA library search path if a script bombs out looking for auxlib.lua. If the script bombs out, the console output will let you know what the search path are (/usr/local/lib/lua/5.1/ on my particular system). You can simply copy the auxlib to a preferred location to utilize the functions in the auxiliary lua library.
2012-03-06 15:45:24 +00:00
In addition, some of the lua scripts require functionality from the "iup" GUI library. You can obtain binaries and source for "iup" upstream (http://www.tecgraf.puc-rio.br/iup/), but I would recommend obtaining packages from your Linux distribution if you are able, as it can be difficult to compile or get the binaries working correctly on a given system.
You will need to add the location that the libiup*.so files to the LUA_CPATH. This can be done with the following command (please note that the location where iup is installed with vary based on how you installed iup):
export LUA_CPATH="/path/to/iup/lib/lib?51.so;"
2012-05-11 06:08:04 +00:00
For example, if libiuplua51.so is located in '/usr/lib', you can run the following command before executing fceux to place the library in the search path:
2012-03-06 15:45:24 +00:00
2012-05-11 06:08:04 +00:00
export LUA_CPATH="/usr/lib/lib?51.so;"
2012-03-06 15:45:24 +00:00
Finally, if any scripts complaints about "attempt to index global 'iup' (a nil value)", this means that "iup" needs to be explicitly loaded into the script. You can add the following line to the head of script to manually load "iup":
require("iuplua")
2020-07-13 00:54:18 +00:00
The latest version of iup (3.5 at the time of writing) is recommended.
2012-03-06 15:45:24 +00:00
6 - FAQ
-------
2012-03-06 23:34:26 +00:00
* Q. Im having issues with my sound!
2020-08-12 00:31:53 +00:00
* A. Try different SDL audio drivers to see if this makes any difference. You can do this by using this command before running fceux:
2012-03-06 15:45:24 +00:00
export SDL_AUDIODRIVER=driver
2013-03-10 20:15:38 +00:00
where driver is either: 'pulse' for pulseaudio;' alsa' for ALSA; 'dsp' for OSS; 'esd' for ESD; see SDL documentation for details (http://www.libsdl.org/docs/html/sdlenvvars.html)
2012-03-06 15:45:24 +00:00
There are sound options that you can tweak at runtime through command line switches:
* -soundq x internal sound quality hack value (0 off)
* -soundrate x sound rate (sane values: 28000 48000
* -soundbuffersize x (in ms) sane values (30, 50, 100, 120)
Running fceux through esddsp is known to fix some audio issues with pulseaudio on some older Ubuntu versions.
7 - Contact
-----------
2020-07-13 00:54:18 +00:00
If you have an issue with fceux, report it in the github bug tracker (see fceux at github.com). If you would like to contact the author of this readme personally, e-mail LTsmooth42 <at> gmail <dot> com. You can also check us out at #fceu on irc.freenode.net.