Snes9x: The Portable Super Nintendo Entertainment System Emulator ================================================================= v1.39 15-SEP-2001 ================= Home page: http://www.snes9x.com Contents ======== Changes Since Last Release Introduction What's Emulated What's Not What You Will Need Getting Started/Command Line Options Keyboard Controls Joystick Support Game Saving Netplay Support Super FX SA-1 C4 3Dfx Support Problems With ROMs Sound Problems Converting ROM Images Speeding up the Emulation Credits Changes Since Last Release ========================== Check the CHANGES file for a complete history of Snes9x changes between versions. Introduction ============ Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you to play most games designed for the SNES and Super Famicom Nintendo game systems on your PC or Workstation. The games include some real gems that were only ever released in Japan. Snes9x is the result of over four years worth of part-time hacking, coding, recoding, debugging, etc. Snes9x is coded in C++, with three assembler CPU emulation cores on the i386 Linux, DOS and Windows ports. Snes9x is better than a real SNES: o Freeze a game at any position, then restore the game to that exact spot at a later date - ideal for saving a game just before a difficult bit. o Built-in cheat cartridge. o Built-in peripheral emulation. The SNES mouse, Multi-player 5 and SuperScope external add-ons are all emulated, they cost extra money with a real SNES. o Stereo sound - yes I know the SNES produced stereo sound, but who actually paid the inflated price for the special lead just so you could hear it? o No more cartridge contact cleaning! o Some SNES hardware features that can be turned on and off during game play, games might be using one of these features to deliberately make a section of the game more difficult. Easy, just turn the feature off! o Networked game play on some ports. o Speed up or slow down SNES games. o Save screen shots to impress(?!) your friends. Snes9x is worse than a real SNES: o Unless your computer is very fast (Pentium II+), some games just can't hit every frame being rendered and the emulator starts to skip the drawing of some frames to keep the emulator running at a constant speed - to you it appears as if the graphics aren't moving as smoothly as they could. o Not all games work; bugs and missing features cause some games to fail to work or renders them un-playable. o You have to wait for your computer to boot before you can play games, no waiting on the real SNES! o The SNES has an analogue low-pass sound filter that give a nice bass to all the sounds and music - Snes9x doesn't emulate this. If you have a posh sound card, you could try fiddling with it mixer controls to produce a similar effect. Turning on interpolated sound helps a lot. What's Emulated =============== - The 65c816 main CPU. - The Sony SPC700 sound CPU. - SNES variable length machine cycles. - 8 channel DMA and H-DMA (raster effects). - All background modes, 0 to 7. - Sound DSP, with eight 16-bit, stereo channels, compressed samples, hardware attack-decay-sustain-release volume processing, echo, pitch modulation and digital FIR sound filter. - 8x8, 16x8 and 16x16 tile sizes, flipped in either direction. - 32x32, 32x64, 64x32 and 64x64 screen tile sizes. - H-IRQ, V-IRQ and NMI. - Mode 7 screen rotation, scaling and screen flipping. - Vertical offset-per-tile in modes 2, and 4. - Horizontal offset-per-tile in modes 2, 4 and 6. - 256x224, 256x239, 512x224, 512x239, 512x448 and 512x478 SNES screen resolutions. - Sub-screen and fixed colour blending effects. - Mosaic effect. - Single and dual graphic clip windows, with all four logic combination modes. - Colour blending effects only inside or outside a window. - 128 8x8, 16x16, 32x32 or 64x64 sprites, flipped in either direction. - SNES palette changes during frame (15/16-bit internal rendering only). - Direct colour mode - uses tile and palette-group data directly as RGB value. - Super FX, a 21/10MHz RISC CPU found in the cartridge of several games. - S-DD1, a data decompression chip used only in Star Ocean and Street Fighter 2 Alpha. Snes9x's implementation, like zsnes's, is a bit of a cheat - nobody can figure out the compression algorithm the chip uses, so instead the actual chip was used decompress the data, the data saved and made available for download. The decompressed graphics packs must be downloaded in order to play the two S-DD1 games. - S-RTC, a real-time clock chip. Dai Kaijyu Monogatari II is the only game that uses it. - SA-1, a faster version of CPU found in the main SNES unit together with some custom game-accelerator hardware. - C4, a custom Capcom chip used only in Megaman X2 and X3. Its a sprite scaler/ rotator/line drawer/simple maths co-processor chip used to enhance some in-game effects. - Partial DSP-1 support, enough to play Mario Kart, Pilotwings, SD Racer, Suzuka 8 Hours and a few other DSP-1 games. - SNES mouse. - SuperScope (light gun) emulated using computer mouse. - Multi-player 5 - allowing up to five people to play games simultaneously on games that support that many players. - Game-Genie and Action Replay cheat codes. - Multiple ROM image formats, with or without a 512 byte copier header. - Single or split images, compressed using gzip, and interleaved in one of two ways. - Auto S-RAM (battery backed RAM) loading and saving. - Freeze-game support, now portable between different Snes9x ports. - Interpolated sound. What's Not ========== - Only partial DSP-1 support, enough to play Mario Kart, Pilotwings and a few other DSP-1 games. The DSP-1 is a math co-processor chip that was inside the cartridge of several games. There are a few versions of the chip, but only the first version is supported by Snes9x. - Any other odd chips that manufactures sometimes placed inside the cartridge to enhance games and as a nice side-effect, also act as an anti-piracy measure. - Pseudo hi-res. mode - SNES hardware uses interpolation to give apparent increase in horizontal resolution, use one of the output image processing options to get the same effect. - Mosaic effect on mode 7. - A couple of SPC700 instructions that I can't work exactly out what they should do. - Fixed colour and mosaic effects in SNES hi-res. (512x448) modes. - Offset-per-tile in mode 6. Luckily I haven't found a game that uses it, yet. What You Will Need ================== CPU --- Faster the better, but 486DX4 100 minimum when using 8-bit graphics and minimal or no sound, Pentium 166 or higher for transparency effects and Pentium 200 or higher for Super FX and SA-1 games. Memory ------ 16Mb or more for Linux. Sun workstations shouldn't have a problem. Screen ------ X Window System ports need an 8, 15, 16, 24 or 32 bit X server running; transparency effects are available at all depths, but don't look good with only an 8-bit display. For maximum emulation speed, have the X server switched to 8-bit and don't enable transparency effects, or 15 or 16-bit with transparency effects enabled. The Linux SVGA port is very limited at the moment due to no 16-bit screen modes being supported on my main development machine. However, the Linux X Window System version now has a full-screen mode, so there's hopefully no need to use the SVGA version. If you want to use the 3dfx bi-linear and scaling features of Snes9x, you will need a Voodoo 1, 2 or 3 graphics card and the glide library installing; glide comes with most Linux distributions or you can download it from http://glide.xxedgexx.com/3DfxRPMS.html If you want to make use of OpenGL support, you'll need to have a suitable OpenGL implementation installed. Most newer Linux distributions come with Mesa, which will do fine. You'll need to make sure that you have hardware OpenGL render drivers linked into your X server. Nvidia chipset users will need to download the latest Linux drivers from http://www.nvidia.com as the Nvidia drivers shipped with the X server don't support all Nvidia chipsets or all their accelerated functions. Disk Space ---------- 1Mb for the emulator. Software -------- Access to SNES ROM images in *.smc, *.sfc, *.fig or *.1, *.2, or sf32xxxa, sf32xxxb, etc., format otherwise you will have nothing to run! Some home-brewed ROM images can be downloaded from http://www.snes9x.com. To find commercial games, you could try a web search engine and some imaginative use of search strings, alternatively, I've heard http://www.pe2000.net, http://www.cherryroms.com or http://www.edgeemu.com are good places to try. Please note, it is illegal in most countries to have commercial ROM images without also owning the actual SNES ROM cartridge. Getting Started =============== From a shell just type: snes9x to start the X Window System port or gsnes9x to start the X Window System/Voodoo port or osnes9x to start the X Window System/OpenGL port. ROM images are normally loaded from the directory ./roms. This can be changed by specifying a pathname with the image name or setting the environment variable SNES96_ROM_DIR to point to a different directory. Freeze game files and S-RAM save files are normally read from and written to the directory $HOME/.snes96_snapshots. This can be changed by setting the environment variable SNES96_SNAPSHOT_DIR to point to a different directory. To enable full-screen mode on the Linux X Window System and SVGA ports, or to use the Voodoo 3D card without the 3dfx Linux kernel driver installed, Snes9x needs special system access permissions to allow it to write directly to video RAM and alter video chipset register values. In the directory where Snes9x is located, typing: su root chown root snes9x gsnes9x chmod 4755 snes9x gsnes9x will give the binaries the required access. As an alternative for the voodoo port, rather than making the binary set-uid root, download and install the 3dfx kernel driver, again available with most Linux distributions or download from http://glide.xxedgexx.com/3DfxRPMS.html Lots of command line flags are available: Graphics options: -tr or transparency (default: off) Enable transparency effects, also enables 16-bit screen mode selection. Transparency effects are automatically enabled if the depth of your X server is 15-bit or greater. -16 or -sixteen (default: off) Enable 16-bit internal screen rendering, allows palette changes but no transparency effects. -hires or -hi (default: lo-res.) Enable support for SNES hi-res. and interlace modes. USE ONLY IF GAME REQUIRES IT (FEW DO) BECAUSE IT REALLY SLOWS DOWN THE EMULATOR. -y or -interpolate (default: off) Enables 'TV mode', hires support, 16-bit internal rendering and transparency effects. TV mode scales the SNES image by x2 by inserting an extra blended pixel between each SNES pixel and 80% brightness 'scan-lines' between each horizontal line. The result looks very nice but needs a fast machine. Use with the full-screen X mode and a 15 or 16 depth X server, or the SVGA port for fastest operation. -y2 or -interpolate2 Enable Kreed's Super 2xSaI image processing mode. -y3 or -interpolate3 Enable Kreed's Super Eagle image processing mode. -y4 or -interpolate4 Enable Kreed's 2xSaI image processing mode. -y5 or -interpolate5 Enable Kreed's software bi-linear filtering and image scaling mode. -nms or -nomodeswitch (default: switch modes) The Linux X Windows System port can change the screen resolution when switching to full-screen mode so the SNES display fills the whole screen. Specify this option to stop it if causes you problems. -fullscreen or -fs Start the emulator in full screen mode, rather than a window on the X11 port if supported by your X server, a suitable screen mode is defined in your XF86Config file and the snes9x binary has root permissions (see above). -scale or -sc (default: off) Stretch the SNES display to fit the whole of the computer display. Linux X Window System full-screen mode or SVGA port only. Use only if you have a very fast machine. -displayframerate or -dfr Display a frame rate counter superimposed over the bottom, left-hand corner of the SNES display. The value before the slash (/) indicates how many frames per second are being rendered compared to a real SNES, the value of which is displayed after the slash. Sound options: -ns or -nosound Disable sound CPU emulation and sound output, useful for the Starfox 2 beta floating around that has corrupt sound CPU code, causing the game to hang with sound emulation turned on. Disabling sound also speeds up emulation speed, at the expense of no music or sound effects during the game and reduced game compatibility. -sk 0-3 or -soundskip 0-3 (default: 0) ONLY USED IF SOUND IS DISABLED. The algorithm to use when trying to fool a ROM into thinking that the SPC700 sound CPU is there when actual emulation of it is turned off (for speed reasons). -stereo or -st (default: stereo) Enable stereo sound output. -mono (default: stereo) Enable mono sound output. Slightly faster, but doesn't sound as nice. -r 0-7 or -soundquality or -sq 0-7 (default: 4) Sound playback rate/quality: 0 - disable sound, 1 - 8192, 2 - 11025, 3 - 16500, 4 - 22050 (default), 5 - 29300, 6 - 36600, 7 - 44000. -envx or -ex (default: off) Enable volume envelope height reading by the sound CPU. Can cure sound repeat problems with some games (e.g. Mortal Kombat series), while causing others to lock if enabled (eg. Bomberman series). Use with -sy option below to fix the problems this option can otherwise create. -ts or -threadsound Starts to feed data to the sound card using a separate thread rather than using timers, signals and polling. Use to work around a bug in the beat Sound Blaster Live Linux driver that keeps telling Snes9x that the sound card can accept more sound data, when it actually cannot and Snes9x slows down or locks up. A multi-CPU system could benifit from using this option - sound processing could take place on another CPU for speed. -sy or -soundsync Turns on sound-sync code where sound data is generated in sync with the emulation of the SNES sound CPU instructions. Slightly slower emulation speed but helps reduce note and sound effects timing problems and one or two games actually require this mode, notably Williams Arcade Classics. Also turns on interpolated sound and envelope height reading. Pressing the ']' key during gameplay toggles sound-sync only on and off. Not very effective/useless when thread sound is enabled due to mutex data locking timing problems. -is or -interpolatedsound (default: off) Turns on interpolated sound. Any samples played at a lower frequency than the current playback rate (-r option) have additional sample points computed and played where previously the same sample data was played repeatedly. Lower frequency sounds have improved bass and sound much less harsh - I suspect the real SNES does this. Pressing '[' during gameplay toggles the feature on and off. -b size or -buffersize size or -bs size (default: auto-select) Sound playback buffer size in bytes 128-4096. -nosamplecaching or -nsc or -nc (default: on) Disable decompressed sound sample caching. Decompressing samples takes time, slowing down the emulator. Normally the decompressed samples are saved just in case they need to be played again, but the way samples are stored and played on the SNES, it can result in a click sound or distortion when caching samples with loops in them. -alt or -altsampledecode (defalt: off) Switch to using Anti Resonance's sample decoding method. Some games, notably Squaresoft RPG games, make use of a SNES hardare sample decoding bug/ feature to generate wind and swish-type sound effects; selecting this option enables code that tries to simulate the feature. The disadvantage is that it can decode some 'normal' samples incorrectly. -noecho or -ne (default: on) Turn off sound echo and FIR filter effects. Processing these effects can really slow down a non-MMX Pentium machine due to the number of calculations required to implement these features. -ratio 1+ or -ra 1+ (default: 2) (OBSOLETE) Ratio of 65c816 to SPC700 instructions. The value is no longer used because SPC700 cycle counting is now implemented giving much more accurate timing. -nomastervolume or -nmv (default: on) Disable emulation of the sound DSP master volume control. Some ROMs set the volume level very low requiring you to turn up the volume level of your speakers introducing more background noise. Use this option to always have the master volume set on full and to by-pass a bug which prevents the music and sound effects being heard on Turrican. Cheat options: -gg or -gamegenie Supply a Game Genie code for the current ROM. Up to 10 codes can be in affect at once. Game Genie codes for many SNES games are available from: http://vgstrategies.miningco.com/games/vgstrategies/library/ggn/bl_ggnsnes.htm -ar or -actionreplay Supply a Pro-Action Reply code for the current ROM. Up to 10 codes can be in affect at once. At the moment, codes which alter RAM do not work. -gf or -goldfinger Supply a Gold Finger code for the current ROM. Up to 10 codes can be active at once. Speed up/slow down options: (See "Speeding Up The Emulation") -f or -frameskip (default: auto-adjust) Set this value to deliberately fix the frame skip rate and disable auto- speed regulation. Use a larger value faster emulation but more jerky movement and a smaller value for smooth but slower screen updates. Use '+' and '-' keys to modify the value during a game. Ideal for some Super FX games that confuse the auto-adjust code or for games that deliberately flash the screen every alternate frame. -frametime