Snes9x Documentation

repository·master·Indexed 25 days ago

https://github.com/snes9xgit/snes9x

Snes9x is a portable Super Nintendo Entertainment System (TM) emulator available as a standalone application and a Libretro core. The documentation covers developer guides for translation templates, the Snes9xConfig class for managing display, NTSC filter, and netplay settings, the Snes9xCheats class for cheat database interaction, and input management via JoyDevices and JoyDevice. It also details display driver implementations including S9xOpenGLDisplayDriver and S9xXVDisplayDriver.

Tokens
10.1K
Snippets
8
Records
76
Agent score
85%

What's inside Snes9x

  1. Generate a new translation template (POT file)

    master

    To update the translation template with the latest strings from the source code, you can either run the provided shell script updatepot.sh or execute the xgettext command manually from the gtk directory. This generates or updates the snes9x-gtk.pot file.

    xgettext -f po/POTFILES.in --from-code=UTF-8 -o po/snes9x-gtk.pot -kmaybegettext -k_
  2. Apply IPS, UPS, or BPS Patches

    master

    Snes9x supports automatic patching without overwriting the original ROM.

    To patch a ROM:

    1. Place the .ips, .ups, or .bps file in the same folder as the ROM (or in your configured patch folder).
    2. Rename the patch file to match the ROM filename exactly (e.g., game.sfc and game.ips).
    3. For multiple IPS patches: Use extensions like .000.ips, .001.ips, etc.
    4. Open and load the ROM image normally.
  3. Set up Netplay (Multiplayer over Network)

    master

    Netplay allows up to five players to play simultaneously over TCP/IP.

    Server Setup:

    1. Load a game.
    2. Select 'Act as server' from the Netplay menu.
    3. The server machine should be the fastest machine in the group.

    Client Connection:

    1. Select 'Connect to server...' from the Netplay menu.
    2. Enter the IP address or hostname of the server machine.

    Important Notes:

    • The server may request clients to load a specific game or a freeze file to ensure synchronization.
    • To prevent desync, avoid moving the Snes9x window unnecessarily or using Ctrl+Alt+Del during play.
    • Note: Netplay is noted as having not been maintained/tested recently and may be unstable.
  4. Record and Playback Movies

    master

    Movie support allows you to record gameplay actions for playback.

    Recording:

    1. Go to File > Movie > Record.
    2. Choose 'Record from reset' (start from the beginning) or 'Record from now' (start from current state).
    3. Select which controllers to record.

    Playback:

    1. Go to File > Movie > Play and select your file.
    2. Note: The movie must be played with the same ROM used during recording.

    Re-recording: If you make a mistake while recording, create a freeze file. Loading a freeze file while a movie is playing or recording will trigger the 'movie re-record' function.

  5. Use Cheat Codes (Game Genie, PAR, and Raw)

    master

    Snes9x supports Game Genie, Pro-Action Replay (PAR), and raw hex formats. Cheats are saved in .cht files and auto-loaded for matching filenames.

    Entering Cheats:

    1. Open the Cheat Code Entry and Editor dialog from the Cheats menu.
    2. Game Genie: Type the code (include the - character).
    3. PAR/Raw: Type in the format address=value (hexadecimal).
    4. Click Add or press Return.

    Managing Cheats:

    • Toggle: Double-click a cheat line or click the 'En' column.
    • Bulk Toggle: Use the 'Apply cheats' checkbox in the Cheat menu.
    • Search Database: Use the 'Search Database' button with a game loaded to find existing cheats.
  6. Download Snes9x libretro core nightly builds

    master

    If you are using a Libretro-compatible frontend (such as RetroArch), you can download the Snes9x libretro core nightly builds for the following platforms:

    • Linux: amd64, i386, armhf, armv7-neon-hf, arm64
    • Android: arm, arm64
    • Web: Emscripten
    • macOS: amd64
    • Consoles/Other: Nintendo Wii, Nintendo Switch, Nintendo GameCube, PSP
  7. Enable special input devices (Mouse, Super Scope, etc.)

    master

    Devices like the SNES Mouse, Super Scope, Justifier, and Multi Player 5 are disabled by default.

    To enable them:

    1. Load a game.
    2. Select the desired controller from the Input menu, OR press '7' to cycle through them.

    Default Input Device Mappings:

    • `: Superscope turbo button
    • ~: Superscope pause button
    • 7: Rotates between Multi Player 5, SNES mouse (port 1), SNES mouse (port 2), SuperScope, and Justifier emulation.
  8. Configure Keyboard and Gamepad mappings

    master

    Before configuring Snes9x, ensure your gamepad is calibrated using the Windows Control Panel applet.

    To map controls in Snes9x:

    1. Open the Joy-pad Configuration dialog.
    2. Select the controller number (#1 to #5) from the combo box.
    3. Ensure the 'enabled' box is checked for that controller.
    4. Click the text box next to a direction (e.g., 'UP') and press the desired key or button.
    5. The focus moves automatically to the next direction.

    Diagonal Keys: If you are a keyboard user having trouble pressing multiple buttons simultaneously, use the 'toggle diagonals' option to enable special diagonal keys.

  9. Save and Load game states (SRAM and Freeze files)

    master

    Snes9x provides two methods for saving progress:

    1. SRAM Emulation (.srm files)

    Emulates the real SNES battery-backed RAM. Snes9x saves the contents to a .srm file when you load a new game or quit. This file is automatically loaded the next time you play the same game.

    2. Freezing/Snapshotting (Freeze files)

    Saves the entire game state at any moment. This is ideal for saving before difficult sections.

    • Save (Freeze): Press Shift + F1 through F9 to save into slots 1-9.
    • Load (Defrost): Press F1 through F9 to load from slots 1-9.

    Configuration: By default, files are saved in a Saves folder located where snes9x.exe resides. You can change this directory via the Settings Dialog in the Options menu.