You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.8 KiB

This lists the available commands, excluding the ones you get back from
S9xGetAllSnes9xCommands(). The various meta-characters are:
# - A number. The range is determined 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 is ignored), 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