FCEUX SDL Documentation

Last updated November 30, 2008
Valid as of FCEUX 2.0.4

Please note that this document is INCOMPLETE and may be INACCURATE. Contributions welcome.

Table of Contents:


Introduction

FCEUX is a cross platform, NTSC and PAL Famicom/NES emulator that is an evolution of the original FCE Ultra emulator. Over time FCE Ultra had separated into many separate branches.

The concept behind FCEUX is to merge elements from FCE Ultra, FCEU rerecording, FCEUXD, FCEUXDSP, and FCEU-mm into a single branch of FCEU. As the X implies, it is an all-encompassing FCEU emulator that gives the best of all worlds for the general player, the ROM-hacking community, and the Tool-Assisted Speedrun Community.

FCEUX stores configuration, savestates, movies, screenshots, amount other things in "~/.fceux". This is referred to as the "base directory".


Input

FCEUX emulates the standard NES gamepad, the Four-Score multiplayer adapter, the Zapper, the Power Pad, and the Arkanoid controller. The Famicom version of the Arkanoid controller, the "Space Shadow" gun, the Famicom 4-player adapter, and the Family Keyboard are also emulated.

Zapper

Most Zapper NES games expect the Zapper to be plugged into port 2. and most VS Unisystem games expect the Zapper to be plugged into port 1.

The left mouse button is the emulated trigger button for the Zapper. The right mouse button is also emulated as the trigger, but as long as you have the right mouse button held down, no color detection will take place, which is effectively like pulling the trigger while the Zapper is pointed away from the television screen. Note that you must hold the right button down for a short time to have the desired effect.


Famicom Disk System

You will need the FDS BIOS ROM image in the base FCEUX directory. It must be named "disksys.rom". FCEUX will not load FDS games without this file.

Two types of FDS disk images are supported: disk images with the FWNES-style header, and disk images with no header. The number of sides on headerless disk images is calculated by the total file size, so don't put extraneous data at the end of the file.

You should make backups of all of your FDS games you use with FCEUX. This is because FCEUX will write the disk image back to the storage medium, and the disk image in RAM might have been corrupted because of inaccurate emulation(this case is not likely to occur, but it could occur).

Game Genie

The Game Genie ROM image is loaded from the file "gg.rom" in the base directory the first time Game Genie emulation is enabled and a ROM image is loaded since the time FCEUX has run.

The ROM image may either be the 24592 byte iNES-format image, or the 4352 raw ROM image.

Remember that enabling/disabling Game Genie emulation will not take effect until a new game is loaded(this statement shouldn't concern any of the "run once" command-line driven ports).

VS Unisystem

FCE Ultra currently only supports VS Unisystem ROM images in the iNES format. DIP switches and coin insertion are both emulated. The following games are supported, and have palettes provided(though not necessarily 100% accurate or complete):

Automatic IPS Patching

Place the IPS file in the same directory as the file to load, and name it filename.ips.

        Examples:       Boat.nes - Boat.nes.ips
                        Boat.zip - Boat.zip.ips
                        Boat.nes.gz - Boat.nes.gz.ips
                        Boat     - Boat.ips
        

Some operating systems and environments will hide file extensions. Keep this in mind if you are having trouble.

Patching is supported for all supported formats(iNES, FDS, UNIF, and NSF), but it will probably only be useful for the iNES format. It can be used with the FDS format, but be warned that it will permanently patch your disk image, as the disk image is written back to disk when the game is unloaded(unless the disk image is in a zip file, in which case it isn't written back to disk). UNIF files can't be patched well with the IPS format because they are chunk-based with no fixed offsets.


Using FCEUX

Hotkey Assignments

NOTE:There is not a GUI available to remap these hotkeys for SDL. If you really want to remap the hotkeys, you can edit the config file manually and replace the values with SDL keysyms. However, hotkey remapping is planned for gfceux in the near future.

Key:Action:
F1Cheat menu (command-line only).
F2Toggles savestate binding to movies.
F3Load lua script.
F4Toggle background rendering.
F5Save state.
F6Toggle skipping lag in frame advance.
F7Load state.
F8Toggle lag counter display.
F9Toggle movie frame counter.
F10Toggle movie subtitles.
F11Reset emulation.
F12Save screen snapshot.
Shift + F5Begin movie recording.
Shift + F7Open a movie for playback.
0-9Select save state slot.
-Decrease emulation speed.
=Increase emulation speed.
PausePause emulation.
\Advance a single frame.

VS Unisystem

Could someone test this please?
Key:Action:
F8Insert coin.
F6Show/Hide dip switches.
1-8Toggle dip switches(when dip switches are shown).

Famicom Disk System

Could someone test this please?
Key:Action:
F6Select disk and disk side.
F8Eject or Insert disk.

Gamepad

These are the default keys for the first player gamepad. These can be remapped using the --inputcfg command line parameter or using gfceux.
Key:Button on Emulated Gamepad:
KB
JA
Enter/ReturnStart
TabSelect
WUp
ALeft
SDown
DRight

Power Pad

Could someone test this please?
Side B
OP []
KL;'
M,./

Side A
P [
KL;'
,.

Family Keyboard

All emulated keys are mapped to the closest open key on the PC keyboard, with a few exceptions. The emulated "@" key is mapped to the "`"(grave) key, and the emulated "kana" key is mapped to the "Insert" key(in the 3x2 key block above the cursor keys).

To enable or disable Family Keyboard input, press the "Scroll Lock" key. When Family Keyboard input is enabled, FCE Ultra will also attempt to prevent any key presses from being passed to the GUI or system.

Command-line

FCEUX supports arguments passed on the command line. Arguments are taken in the form of "--parameter value". Most arguments that have both a parameter and a value will be saved in the configuration file.

NOTE: This list is incomplete! For a full list of options, run fceux without any arguments.

Argument:Value Type:Default value:Description:
--pal0|10Emulate a PAL NES. Otherwise emulate an NTSC NES.
--gamegenie0|10Emulate a gamie genie (gg.rom required).
--nospritelim0|11Disbales the 8 sprites per scanline limitation.
--frameskipinteger0Sets number of frames to skip per emulated frame (must be built with frameskip support).
--palettefilename0Load a custom global palette from given file. Specifying "0" will cause FCEUX to stop using the custom global palette.
--ntsccolor0|10Enable NTSC NES colors.
--sound0|11Enable sound
--soundvol xinteger100Set sound volume.
--soundq x0|11Enable high-quality sound emulation.
--clipsides0|10Clip leftmost and rightmost 8 columns of pixels of the video output.
--slend integer231Last scanline to be rendered.
--slstartinteger0First scanline to be rendered

Credits

Name:Contribution(s):
punkrockguy318 FCEUX SDL Documentation rewrite.