Advanced Usage

This page documents the advanced features of ZSNES, probably not useful for most end users.

Movie Dumping

Please note that ZSNES does not support real-time video encoding. ZSNES only encodes existing ZMV (ZSNES movie) files. Refer to the GUI page for instructions on recording movies.

All instructions in this section assume that you are using the default settings of the zmovie.cfg file. If you are smart enough to edit zmovie.cfg, you had better be smart enough to dump movies with whatever new settings you've created.

You can dump video output alone, audio output alone, both at the same time (to separate files), or both to the same file (merged). If you choose to dump audio output, you can choose to dump that audio output uncompressed or compressed to MP3. Both uncompressed and compressed audio can be merged with the video.

About Video Encoding

Video encoding requires MEncoder.

About Audio Encoding

Audio encoding requires LAME. Currently, Windows users must use this fixed LAME build due to a bug in the official versions.

You have a choice of dumping audio either in uncompressed PCM format with WAV header, or compressed as MP3. ZSNES uses LAME for MP3, so you can expect high-quality audio, given the bit rate.

When dumping audio to a separate file (not merged with video), audio compressed to MP3 will be about 6% of the size of the same uncompressed PCM audio.

Dumping a Movie

  1. Place your MEncoder (mencoder.exe) and LAME (lame.exe) binaries in the same directory as ZSNES. Alternatively, configure your PATH environment variable to include the directories where MEncoder and LAME are installed.
  2. Start ZSNES and load a game.
  3. Open the Movie Options dialog. (Misc Menu->Movie Opt).
  4. Make sure to select the correct movie slot, depending on which movie slot you used to record a ZMV.
  5. Select the Dumping tab, and configure the Video Options and Audio Options to your liking.
  6. Hit the Start button.
  7. ZSNES will then exit the GUI and start playing back the previously recorded movie. If you chose to encode the video and/or audio output, you will see a console window appear, showing the progress of encoding. Don't worry if ZSNES slows down while playing back the movie; it needs to do this because the encoding process takes a lot of processor time.
  8. ZSNES will indicate when the movie has finished playback (and encoding). You can now look in your ZSNES directory for the newly created file(s).

Note: ZSNES does not create an uncompressed temporary file and then encode it. Instead, the output stream is directly encoded. The only output files will be the finished, compressed files. Because ZSNES must encode the output stream as it is generated, ZSNES may delay the output of new frames of video/audio to give more time to MEncoder/LAME to compress the current frame. This means that you should not worry if you see the playback of your movie slow down while ZSNES is dumping it. The dumped file(s) will play back at full speed!

Configuration Files

Every time you run ZSNES, it checks to see if these files are present in the same directory as the ZSNES executable. If they are not, ZSNES will create them with their default values. Thus, if you are having weird problems with ZSNES, try deleting these files.

If there are any missing or invalid lines in zsnes*.cfg, ZSNES will insert or replace the lines with their default values.

zsnes*.cfg

Almost every option available in ZSNES can be configured in this file. If there is something you don't understand in this file, please refrain from changing it, and instead set the option from within the ZSNES GUI.

The last letter of the filename is different for each port. Windows: zsnesw.cfg. SDL: zsnesl.cfg. DOS: zsnes.cfg.

zmovie.cfg

This file contains movie-dumping configuration information.

You can edit this file to make ZSNES use something other than MEncoder or LAME, or to tweak options. Read the MEncoder and LAME manuals to see what options you can tweak. If you choose other applications, they must support stream input via stdin and raw video (in the case of video encoding). Refer to the appropriate documentation for more information.

Unfortunately, you're on your own if wish to play with this.

zfont.txt

This file contains the font data for the ZSNES GUI. You can edit this file to customize the font.

  • Comments are preceded by a ; and can be up to 99 characters in length.
    • In the default file, each comment precedes the character it's labeling.
  • Each letter is represented by a block of five rows, each containing 8 bits. Only the first five columns of bits are used for font data; ZSNES uses a 5x5 font. The last three columns of bits should always be zeros.
    • There are characters for English, Hiragana, and Katakana scripts.
  • In case it isn't obvious, a 1 means the pixel is on in that location. A 0 means it's off. If you view zfont.txt, you should be able to figure it out.
  • The file terminates on the EOF+newline character or the last character (whichever comes first).

The absolute ordering of each and every line in this file is important. If you're missing a single line, things might start messing up. Just so you know, the last line of data should be on line 846, followed by the EOF character on line 847.

If you mess something up, just delete zfont.txt, and ZSNES will re-generate it as normal.

Debugger

The debugger, now available in all ports, is enabled only when you enter ZSNES with a -d. (If you are using the DOS port, just type "zsnes -d" at the commandline. Win port users should add a "-d" after their ZSNES shortcut target). Loading a ROM via a command line will start ZSNES in debugger mode; otherwise press F1 to reach it.

Average users, however, should have no need to use the debugger.

Debugger Keys:

KeyFunction
1Enable/Disable SPC700 display
2Enable/Disable 65816 display
TTrace (in 65816 opcodes)
B65816 break point
SSPC break point
CClear counter
M65816 modify
ASPC modify
DDebug dump (SPC/DSPRAM dump only)
WBreak at signal (used only by the programmers)
F1Switch between debugger input and game input
F2Save state
F4Load state
EscExit entire program

KitchenSync (Win port only)

This makes NTSC games (60Hz) run at 120Hz, and PAL games (50Hz) run at 100Hz. To enable it, just start ZSNESw with the -ks switch. Alternatively, you can create a shortcut to ZSNESw that starts with this switch enabled, every time. First create a shortcut to ZSNESw in Windows. Next, right-click on the shortcut and choose Properties. Then, put the cursor right after the quotation marks in the Target box, press the space bar, and type -ks. Finally, click OK. If ZSNESw crashes or refuses to start after enabling this, your monitor does not support the 100/120 Hz refresh rate.

If your monitor supports 100Hz and not 120Hz, you can instead use the -kp switch for PAL only. This way, you will not have to disable the -ks switch every time you wish to play an NTSC game.

Command-Line Arguments

ZSNES supports execution arguments via the command line. More detailed descriptions of how to use the arguments with each port is forthcoming.

Clicking on the description of an argument will take you to the corresponding GUI option, if one exists.

Usage : zsnes* [-d,-f #, ... ] filename.sfc

Example : zsnes* -s -r 2 game.sfc

*Fill in the appropriate letter for your port when entering this into the command line.

Universal Switches

ArgumentSub-ArgumentDescription
-1 #/-2 #Select Player 1/2 Input
0None
1Keyboard
-dStart with debugger enabled
-ddDisable sound SPC700/DSP emulation, which also disables sound output
-dhDisable ROM-specific hacks
-dsDisable sound output
-f #[0...9]Enable fixed frame rate
-g #[0...15]Specify gamma correction value
-hForce HiROM
-jDisable Mouse (Automatically turns off right mouse-click)
-k #[0...100]Set volume level
-lForce LoROM
-mDisable GUI (must specify ROM filename)
-mcExit ZSNES when closing a movie (use with -zm)
-md #Dump video (use with -zm)
1Raw
2FFV1
3x264
4XviD
5Custom
-ml #Define movie dump length in amount of frames (use with -md)
-n #Enable scanlines (when available)
0None
1Full
225%
350%
-oDisable MMX support
-p #[50...150]Percentage of instructions to execute
-r #Set sound sampling rate
08000Hz
111025Hz
222050Hz
344100Hz
416000Hz
532000Hz
648000Hz
-sEnable sound output and enable SPC700/DSP emulation
-saShow all extensions in GUI (*.*)
-tForce NTSC timing
-uForce PAL timing
-v8Grayscale mode
-yEnable Interpolation graphics filter
-zDisable stereo sound
-zm #[0...9]Auto load specified movie slot on startup
-zs #[0...99]Auto load specified save state slot on startup

Windows-only Switches

From the Windows NT command-line, you can use the following command to view the accepted command-line input for a given ZSNES binary: zsnesw -? | more. Typing zsnesw -? does not work.

Users of any flavor of Windows can use the following command to output to a file the same information returned from the command above: zsnesw -? > commands.txt.

ArgumentSub-ArgumentDescription
-3Enable triple buffering (disables VSync)
-6 #[50...180]Force a user-specified refresh rate for fullscreen modes
-js #[0...32767]Set joystick sensitivity
-kpEnable the KitchenSync for PAL only (100Hz)
-ksEnable the KitchenSync for NTSC and PAL (120Hz/100Hz)
-v #Select Video Mode:
0256x224 R WIN
1256x224 R FULL
2512x448 R WIN
3512x448 DR WIN
4640x480 S WIN
5640x480 DS WIN
6640x480 DR FULL
7640x480 DS FULL
8640x480 S FULL
9768x672 R WIN
10768x672 DR WIN
11800x600 S WIN
12800x600 DS WIN
13800x600 S FULL
14800x600 DR FULL
15800x600 DS FULL
161024x768 S WIN
171024x768 DS WIN
181024x768 S FULL
191024x768 DR FULL
201024x768 DS FULL
211024x896 R WIN
221024x896 DR WIN
231280x960 S WIN
241280x960 DS WIN
251280x960 S FULL
261280x960 DR FULL
271280x960 DS FULL
281280x1024 S WIN
291280x1024 DS WIN
301280x1024 S FULL
311280x1024 DR FULL
321280x1024 DS FULL
331600x1200 S WIN
341600x1200 DS WIN
351600x1200 DR FULL
361600x1200 DS FULL
371600x1200 S FULL
38CUSTOM D WIN
39CUSTOM DS FULL
40CUSTOM WIN
41CUSTOM S FULL
42CUSTOM DR FULL
-wEnable VSync (disables triple buffering)

SDL-only Switches

ArgumentSub-ArgumentDescription
-ad <>Audio Driver (note you may not have all of these):
autoSelect a driver automatically - uses SDL without libao
nullNo sound, only available with libao
ossOpen Sound System, only available with libao on UNIX systems with OSS
alsaAdvanced Linux Sound Architecture, only available with libao on Linux systems with ALSA
alsa09Advanced Linux Sound Architecture, only available with libao on Linux systems with ALSA
polyppolypaudio (next generation GNOME sound server), only available with libao and new versions of GNOME
esdESounD or Enlightened Sound Daemon, only available with libao and ESD installed
sunSun Microsystem's audio system, only available with libao and Solaris or certain BSD systems
irixIRIX audio system, only available with libao and IRIX systems
nasNetwork Audio System, only available with libao and NAS installed
artsAnalog RealTime Synthesizer sound, only available with libao on systems with aRts (KDE)
sdlSimple DirectMedia Layer sound
-js #[0...32767]Set joystick sensitivity
-v #Select Video Mode:
0256x224 R WIN
1256x224 R FULL
2512x448 DR WIN
3512x448 DR FULL
4640x480 DR FULL
5256x224 OR WIN
6512x448 ODR WIN
7640x480 ODS FULL
8640x480 ODS WIN
9640x560 ODR WIN
10768x672 ODR WIN
11800x600 ODS FULL
12800x600 ODS WIN
13896x784 ODR WIN
141024x768 ODS FULL
151024x768 ODS WIN
161024x896 ODR WIN
171280x960 ODS FULL
181280x1024 ODS FULL
191600x1200 ODS FULL
20VARIABLE ODR WIN
21VARIABLE ODS WIN
22CUSTOM OD FULL

DOS-only Switches

ArgumentSub-ArgumentDescription
-0Force black background in 8-bit modes
-1 #/-2 #Select Player 1/2 Input:
22 Button
34 Button
46 Button
58 Button
6Sidewinder #1
7Sidewinder #2
8Sidewinder #3
9Sidewinder #4
10Gamepad Pro #0
11Gamepad Pro #1
12LPT1 #1
13LPT1 #2
14LPT1 #3
15LPT1 #4
16LPT1 #5
-3Enable triple buffering (disables VSync)
-8Force 8-bit sound
-cEnable full/wide screen (when available)
-ccEnable small screen (when available)
-spReport sound detection information
-v #Select Video Mode:
0256x224x8B (MODEQ)
1256x240x8B (MODEQ)
2256x256x8B (MODEQ)
3320x224x8B (MODEX)
4320x240x8B (MODEX)
5320x256x8B (MODEX)
6640x480x16B (VESA1)*
7320x240x8B (VESA2)
8320x240x16B (VESA2)
9320x480x8B (VESA2)
10320x480x16B (VESA2)
11512x384x8B (VESA2)
12512x384x16B (VESA2)
13640x400x8B (VESA2)
14640x400x16B (VESA2)
15640x480x8B (VESA2)
16640x480x16B (VESA2)
17800x600x8B (VESA2)
18800x600x16B (VESA2)
-wEnable VSync (disables triple buffering)

*The 640x480x16B (VESA1) video mode is compatible with many video cards, but can also be very slow. We recommend that you use a VESA2 mode if your video card supports it. Please see the system requirements for more information.