aboutsummaryrefslogtreecommitdiff
path: root/source/docs/controls.txt
diff options
context:
space:
mode:
authorNebuleon Fumika2012-12-17 20:59:21 -0500
committerNebuleon Fumika2012-12-17 20:59:21 -0500
commit2b23b5cbaf15bccc2aae0ff3ee91cedd26f101bd (patch)
tree41a0a905763d79d85812380b1296ad11b0ef42bf /source/docs/controls.txt
parent43bcd26dca5a747953e3a3083d4d4b4bad8e1c7c (diff)
downloadsnes9x2005-2b23b5cbaf15bccc2aae0ff3ee91cedd26f101bd.tar.gz
snes9x2005-2b23b5cbaf15bccc2aae0ff3ee91cedd26f101bd.tar.bz2
snes9x2005-2b23b5cbaf15bccc2aae0ff3ee91cedd26f101bd.zip
Switch to the more complete Snes9x 1.53 documentation.
Diffstat (limited to 'source/docs/controls.txt')
-rw-r--r--source/docs/controls.txt97
1 files changed, 97 insertions, 0 deletions
diff --git a/source/docs/controls.txt b/source/docs/controls.txt
new file mode 100644
index 0000000..703cd33
--- /dev/null
+++ b/source/docs/controls.txt
@@ -0,0 +1,97 @@
+This lists the available commands, excluding the ones you get back from
+S9xGetAllSnes9xCommands(). The various meta-characters are:
+ # - A number. The range is detemined by the context
+ ## - A two-digit number (i.e. with leading zeros)
+ [...] - Something optional
+ (...) - For grouping with |
+ | - "or", choose one of the options.
+ <...> - A named field
+ {...} - A list of possible values. Multiple values may be used, but they
+ must be in the order listed and joined with +-signs.
+ "" - 'ditto', used to indicate the same list as the above line.
+
+Speeds are: Var, Slow, Med, and Fast. 'Var' starts slow and speeds up as the
+button is held.
+
+Axes are: Left/Right, Right/Left, Up/Down, Down/Up, Y/A, A/Y, X/B, B/X, L/R,
+and R/L. Negative is listed first (i.e. "Y/A" means negative deflection is
+towards Y, while "A/Y" means negative deflection is towards A).
+
+AxisToPointer, ButtonToPointer, and AxisToButtons allow for translating
+between different input types. There are 8 'pointers' with IDs
+PseudoPointerBase+0 to PseudoPointerBase+7, and 256 'buttons' with IDs
+PseudoButtonBase+0 to PseudoButtonBase+255. So for example,
+"AxisToButtons 0/255 T=50%" would take the axis data, and do
+S9xReportButton(PseudoButtonBase+0,1) when said axis goes past 50% in the
+negative direction and S9xReportButton(PseudoButtonBase+255,1) when it goes
+over 50% deflection in the positive direction. Similarly, it will do
+S9xReportButton(...,0) when the deflection drops under 50% in either
+direction. "ButtonToPointer 1u Slow" would move the pointer with ID
+PseudoPointerBase+0 up one pixel per frame as long as the button is pressed
+(reporting this change at the end of each frame).
+
+---------------
+Button Commands
+---------------
+
+Joypad# {Up, Down, Left, Right, A, B, X, Y, L, R, Start, Select}
+Joypad# Turbo ""
+Joypad# Sticky ""
+Joypad# StickyTurbo ""
+Joypad# ToggleTurbo ""
+Joypad# ToggleSticky ""
+Joypad# ToggleStickyTurbo ""
+
+Mouse# (L|R|LR)
+
+Superscope AimOffscreen
+Superscope {Fire, Cursor, ToggleTurbo, Pause}
+Superscope AimOffscreen ""
+
+Justifier# AimOffscreen
+Justifier# {Trigger, Start}
+Justifier# AimOffscreen ""
+
+ButtonToPointer #[u|d][l|r] <speed> ; NOTE: "# <speed>" is invalid
+
+-------------
+Axis Commands
+-------------
+
+Joypad# Axis <axis> T=#% ; T = 0.1 to 100 by tenths
+AxisToButtons #/# T=#% ; neg then pos, range 0-255, T as above
+AxisToPointer #(h|v) [-]<speed> ; NOTE: '-' inverts the axis
+
+----------------
+Pointer Commands
+----------------
+
+Pointer {Mouse1, Mouse2, Superscope, Justifier1, Justifier2}
+
+------
+Multis
+------
+
+Multis are a type of button command. The basic format of a multi is "{...}",
+where the '...' consists of 1 or more valid non-multi button command
+strings. The braces are literal, not metacharacters. Subcommands separated
+by commas are executed one after the next. Semicolons skip one frame before
+continuing subcommand execution. Semicolons may be repeated. When the multi
+button is pressed, each subcommand is 'pressed', and when the multi button
+is released each subcommand is 'released'.
+
+There are also press-only multis, defined as "+{...}". These act just like
+regular multis, with two differences: the multi is only run when you press
+the button (release isignored), and each subcommand must be prefixed with
+'+' or '-' to indicate whether the the subcommand should be pressed or
+released.
+
+For example: {Joypad1 A,Joypad2 A;Joypad3 A;;;;;QuickSave000}
+ This presses (or releases) A on pads 1 and 2, then waits one frame, then
+ presses A on pad 3, then waits 5 frames, then saves to snapshot 0 (on press
+ only).
+
+You may access the multi number in the returned s9xcommand_t structure as
+cmd.button.multi_idx. This may be used to assign the same multi to multiple
+buttons:
+ MULTI#<num> ; NOTE: that's a literal octothorpe