Snes9x: The Portable Super Nintendo Entertainment System Emulator
=================================================================
v1.26b OCTOBER-1999
===================
Home page: www.snes9x.com


Information
===========
This file contains DOS-port specific information.
Read readme.txt for more information.


Changes to DOS port
===================
1.26 to 1.26b
-------------
-Fixed a bug in the config file support, which caused Snes9x to 'do nothing'
 when no rom was loaded from the command line. Snes9x would fail to run
 anything and would show only a black screen.
 Now how come I didn't notice this earlier??
-Added an option to disable the GUI. Edit 'snes9x.ini' and set 'UseGUI = 0'.
-The debugger is back [for those who understand the concept of debugging].
 Press F5 to start the debugger. Debugger options and commands can be found
 in 'debugger.txt'.



1.25 to 1.26
------------
-Added Full Screen Bilinear Interpolation
       Full Screen Bilinear Interpolation + Grid.
 These ought to look like 3Dfx mode in the windows port, and
 they are faster than their 2xSaI counterparts.
-All full screen image processors have been partially rewritten using MMX.
-Oops. Forgot to change the display drivers of modes 9 to 12 back from
 VESA2L to AUTODETECT. VESA 1.x/3.0, VBE/AF support is back.
-Cheat codes can now be entered and removed from the GUI.
-Cheatfinder finally works. At the moment it's only possible to search for
 byte values, but that shouldn't be too much of a problem.


1.19 to 1.25
------------
-New Image Processing engines:
 Got a fast 450mhz PC and think 3dfx mode looks great? Take a look at this!
        2xSaI FULL SCREEN !!
        2xSaI FULL SCREEN + Grid !!
 Slower than 3dfx though, since it's all done in software.
-Added presets for the above full screen engines for some games, which
 normally wouldn't fill the entire screen. [e.g. Chrono Trigger]
-The DOS port now uses the SEAL library for sound.
-Added reverse stereo option [edit the .ini file].
-Added rapid fire. Press CTRL+[SNES key] to enable/disable for that key.
-Added cheat dialogs from the old [0.xx] GUI. Nothing seems to be working
 though....

See 'Changes.' to find out what's new in Snes9x.


Command line parameters
=======================
-cycles or -h <num>       Percentage of CPU cycles to execute every scan line (default 90)
-frameskip or -f <num>    Screen update frame skip rate (default 2)
-m  num     Screen mode:
            0 - 320x240 (modex, slower), 1 - 320x200 (faster but clipped)
            2 - 256x256 (fastest but non-standard), 3-6 - 640x480, 7 - 640x400
            8 - 800x600, 9 - 320x240 16 bit, 10 - 640x480 16 bit
-scale      Scale SNES screen to fit S-VGA screen
-forcehirom or -F or -FH  Force Hi-ROM memory map, useful for hacked ROM imagess.
-forcelorom or -FL        Force Lo-ROM memory map, useful for hacked ROM images.
-old or -o                Enable old-style SNES joypad emulation
-noold or -no             Disbale old-style SNES joypad emulation
-soundskip or -ss <num>   Sound CPU skip-waiting method, 0 - 3 (default 0)
-sound or -S              Enable digital sound output (default: enabled)
-nosound or -NS           Disable digital sound output
-sound or -S              Enable digital sound output (default: off)
-soundquality or -r <num> Sound sample playback rate/quality, 0-7 (default 4)
                          0 - off, 1 - 8192, 2 - 11025, 3 - 16500,
                          4 - 22050 (default), 5 - 29300, 6 - 36600,
                          7 - 44000
-stereo                   Enable stereo sound (default: mono sound)
-mono                     Enable mono sound (default: mono sound)
-buffersize or -B         Sound playback buffer size (default auto for playback rate)
-nospeedhacks or -N       Disable some internal speed ups that break a few  ROMs
-speedhacks or -SH        Enable some internal speed ups that break a few ROMs
-loadsnapshot or -l <filename>
                          Load saved game position snapshot file & required ROM
                          image.
-swapjoypads or -s        Swap joypad 1 and 2 around
-pal or -p                Fool ROM into thinking that this is a PAL SNES system
-ntsc or -n               Fool ROM into thinking that this is a NTCS SNES system
-interleaved or -i        ROM image is in interleaved format.
-interleaved2 or -i2      ROM image is in interleaved 2 format
-nohdma or -H             Disable H-DMA emulation (default: enabled)
-hdma or -NH              Enable H-DMA emulation (default: enabled)
-layering or -L           Swap some background priority levels - helps some games
-graphicwindows           Enable graphic window effects (default: enabled)
-nographicwindows or -nw  Disable graphic window effects (default: enabled)
-noirq or -I              Disable processor IRQ (for debugging)
-debug or -d              Enter debug mode once ROM has loaded
-trace or -t              Trace CPU instructions to file (WARNING: file gets very large!)
-four or -4               Single standard PC joystick has four buttons
-six or -6                Single standard PC joystick has six buttons
-nojoy or -j              Disable joystick support

ROM image needs to be in Super MagiCom (*.smc), Super FamiCom (*.sfc),
*.fig, or split (*.1, *.2, or sf32527a, sf32527b, etc) format and can be
compressed with gzip or compress.



Keys
====
Here's a list of keys that which can be used in the emulator:

ESC             Hide/Unhide the GUI
F1              Save SPC
F2              Save a game using a slot
F3              Select a slot to Save/Load
F4              Load a game using a slot
F5              Start the debugger. Only for people who know what they're
                doing. NOT FOR THE AVERAGE USER !!
                If you enter the debugger by accident, enter 'g' to return.
F8              Capture Screen to a .bmp file
F10             Change Scaling Preset. Interpolation needs to be enabled
F11             Change Renderer. Interpolation needs to be enabled
F12             Change Renderer. Interpolation needs to be enabled
ALT+F1          Show frames per second [fps]
ALT+F2          Load game from a file you specify
ALT+F3          Save game to a file you specify
SCROLL LOCK     Pause

'|' or '\'      Fast Forward
'1'-'5'         Toggle Background Layers
'6'             Swap Joypads
'7'             Change SNES input device [joypad, mouse, SuperScope etc.]
'8'             Change Background Layering Method
'9'             Enable/Disable Transparency
'-' and '+'     Decrease/Increase FrameSkip

CTRL+SNES Key   Enable/Disable Rapid Fire for a SNES key.
                For example CTRL+'D' to enable rapid fire for SNESKEY A

Default Keyboard controls for player 1
--------------------------------------
Cursor Up       SNES Up
Cursor Down     SNES Down
Cursor Left     SNES Left
Cursor Right    SNES Right

D               SNES A
C               SNES B
S               SNES X
X               SNES Y
A               SNES L
Z               SNES R
Space Bar       SNES Select
Enter/Return    SNES Start

See 'Readme.txt' for more keys which are not covered in this document.



When interpolation is enabled [-y]
==================================
The renderers are:
1. No renderer: Normal 2x Scale
2. TVMode:      25% scanlines [default renderer in modes 10 and 12]
3. 2xSaI:       \
4. Super2xSaI:  | Non-linear 2x Scale Engines. 
5. SuperEagle:  /
6. Interpolation: Standard "blur" filter.
7. Full Screen: Normal Stretch
8. Full Screen Bilinear Interpolation + Grid.
9. 2xSaI Full Screen + Grid: Same as 11, but only rendering
   half the pixels [a lot faster].
10. Full Screen Bilinear Interpolation.
11. 2xSaI Full Screen: Special version of 2xSaI which scales to Full Screen
    

Press F11 to go up the list. Press F12 to go down the list.
These buttons do nothing when interpolation is not enabled.

Renderers 1 to 6 only work in screen modes 10 and 12.
Renderers 7 to 10 work in screen modes 9,10,11 and 12.

2xSaI and SuperEagle use MMX instructions when an MMX CPU has been detected.
A 266-300Mhz+ system is recommended for 2xSaI, SuperEagle and Super2xSaI.

2xSaI and Bilinear Interpolation Full Screen are real CPU crunchers [400mhz+
recommended]. Image quality improves [and speed decreases] with higher
resolutions. 320x240 looks bad, 512x384 looks okay, 640x480 looks better,
800x600 etc. Recommended is 512x384.
Use one of the renderers with grid for a lot more speed!



About Scaling presets
=====================
Some games will not entirely fill the whole screen when renderers 7,8,9 or 10
are selected. Try pressing F10 to remedy this problem. Note not that this
won't always work :(, as it is impossible to have presets for all games.
These are just presets for some of my favorites :).

Default SNES Width/Height = Auto/Auto.
Press F10 1 time: Width/Height = Auto/211 [e.g. Chrono Trigger]
Press F10 2 times: Width/Height = Auto/192 [e.g. SuperStreetFighter2, GundamWing]
Press F10 3 times: Width/Height = Auto/198 [e.g. X-Men: Mutant Apocalypse]
Press F10 4 times: Width/Height = 240/214 [e.g. Final Fantasy 3, Terranigma]
Press F10 5 times: Width/Height = 224/190 [e.g. StarFox]

If you want more presets in the next version, make a snapshot of the SNES
image [and NOT of the screen]. Measure [in pixels] the width and height of
the actual picture [Don't measure the black bands], and the horizontal
and vertical offsets.




The Cheat Dialogs
=================
To enter:
        Octal values: prefix 'o'
        Hexadecimal values: prefix '$'
        Decimal values: prefix '#' (Usually not necessary).

The CheatFinder
---------------
Reset:  Resets the cheat finder. Do this before starting a new search.

Exact searching:
        This is the quickest search possible.  All it does is scan RAM and
        Save RAM for the exact value you enter.  This is ideal for exact
        numbers you can observe, like number of lives, and experience.
        Usually after searching for the second time, you'll be down to
        one or two matches, which, at that point, would be just trial and
        error.

Near searching:
        This mode is ideal for searching for energy bars, and values you
        cannot locate via the Exact function on the search.  You have
        to assign a value to the current amount (say, like 100 or 0), and
        then enter estimates of how the value is changing.  Just be aware that
        you MUST keep the values between 0 and 255, or you may mess up
        your search history.  It's easiest to use the value as a percentage.
        Snes9x really only looks at if you changed the value, or not, and in
        what direction (greater than, less than, or equal).
        Searching this way takes a LONG time to narrow it down to just a few
        matches.

Changed searching:
        This mode is for searching for anything that cannot be located by
        the other two methods.  One example of this is something like fixing
        a character's state in a game (e.g. Powered-up, special weapon, etc).
        Here, you just assign values to the various states you're searching
        for, and search for that specific value when you have the state.
        Searching this way takes a LONG time to narrow it down to just a few
        matches.

Note: At the moment the cheatfinder can only find byte values [0-255, $0-$ff].
      If you enter a value larger than 255, the cheat finder will look for
      the lower byte of that value [=value MOD 256].


Example use of the cheatfinder: How to get 10000gp in Chrono Trigger
--------------------------------------------------------------------
1. Check the amount of money you have. That's 400gp at the beginning of
   the game.
2. Open the cheatfinder window, press the reset button to start a new search,
   select 'EXACT', and enter '400' as value. Now press 'Search'.
   The cheatfinder will now search the game memory.
3. After the search is complete, it'll say how many matches it has found.
   Press list to view them. You'll see all the addresses that were found, a
   history of the values at those addresses, and the current values.
   Now why does it say it found 120 or some other number of addresses
   containing 144, when you wanted to search for the value 400?
   That's because 400 is too big to fit in one byte, and 144 is the lower byte
   of 400. [144 = 400 MOD 256]. Anyway don't worry about it.
4. Leave the cheatfinder. Talk to Chrono's mom. She'll give you 200gp.
   Now you have 600gp!!
5. Now reopen the cheatfinder window. DO NOT PRESS RESET!!!
   Enter '600' as value, select 'Exact' and press 'Search'.
   The cheatfinder will now search all the addresses it has previously found
   [in step 3] for addresses containing the value 88 [88 is the lower byte
   of 600]. Press list to view the result.
6a.One match. We have found what we're looking for. Remember that
    address [I found $7e2c53] and goto step 7.
 b.More than one match... We need to search a few more times.
   Spend/Earn money. Each time searching for your new amount of money
   in the cheatfinder. Eventually [hopefully], your search will be narrowed
   down to one match.
6. Close the cheatfinder, and open the 'Apply Patch' dialog.
   We want to have 10000gp. But 10000 is also larger than 255, so it
   won't fit in a byte. No problem!
   10000 decimal = $2710 hexadecimal [Use a calculator].
   Split $2710 in 2-digit parts, starting from the right: $10 and $27.
   Enter the address you found in step 6 [I enter $7e2c53], $10 as value,
   and press 'Add'. Now enter (address+1) [I enter $7e2c54], $27 as value.
   Press 'Add'. Return to the game, check your money..
   YaY, Now we have 10000gp !!


Known bugs
==========
There are a few bugs in this emulator which are known by the
authors and are being worked on, for your reading pleasure a 
list is given here:
-Changing display resolutions from within the GUI causes crashes.
 [When it says it might crash, it probably will!!]
-Selecting the Sound Blaster AWE32 driver will cause Snes9x to run very slow.
 Select SoundBlaster, SoundBlasterPro, or SoundBlaster16 instead.
-Sometimes the GUI hangs when a ROM is loaded from the command line.
 Start Snes9x, wait for the GUI, and then load the ROM!
-SyncSound does nothing right now. It's not yet implemented.


Credits
=======
Previous DOS port maintainers (in chronological order):
-------------------------------------------------------
Chad Kitching,
Gary Henderson,
CyberWarriorX,
TeleKawaru.


Snes9x DOS was made using these programs:
Many thanks to their authors!
-----------------------------
-DJGPP: Port of GCC to DOS by DJ Delorie
-NASM:  Netwide Assembler by Simon Tathan & Julian Hall
-ALLEGRO: Game programming library by Shawn Hargreaves
-SEAL: Synthetic Audio Library by Carlos Hasan
-ZLIB: Compression Library by Jean-Loup Gailly & Mark Adler
-BGUI: GUI Enhancement for Allegro by Dan Huizenga
-RHIDE: IDE for DJGPP by Robert Hohne
-NASMIDE: IDE for NASM by Rob Anderton
-UPX: Executable packer by Markus FXJ Oberhumer & Laszlo Molnar


See the files 'Readme.txt' and 'Changes.' for additional credits
----------------------------------------------------------------------
Do not contact the author(s) for Commercial ROMS. You will be ignored.
Kreed [derek-liauw@usa.net]
http://www.snes9x.com
