Path: blob/main/misc/emulator/xnes/snes9x/docs/controls.txt
28798 views
This lists the available commands, excluding the ones you get back from1S9xGetAllSnes9xCommands(). The various meta-characters are:2# - A number. The range is detemined by the context3## - A two-digit number (i.e. with leading zeros)4[...] - Something optional5(...) - For grouping with |6| - "or", choose one of the options.7<...> - A named field8{...} - A list of possible values. Multiple values may be used, but they9must be in the order listed and joined with +-signs.10"" - 'ditto', used to indicate the same list as the above line.1112Speeds are: Var, Slow, Med, and Fast. 'Var' starts slow and speeds up as the13button is held.1415Axes are: Left/Right, Right/Left, Up/Down, Down/Up, Y/A, A/Y, X/B, B/X, L/R,16and R/L. Negative is listed first (i.e. "Y/A" means negative deflection is17towards Y, while "A/Y" means negative deflection is towards A).1819AxisToPointer, ButtonToPointer, and AxisToButtons allow for translating20between different input types. There are 8 'pointers' with IDs21PseudoPointerBase+0 to PseudoPointerBase+7, and 256 'buttons' with IDs22PseudoButtonBase+0 to PseudoButtonBase+255. So for example,23"AxisToButtons 0/255 T=50%" would take the axis data, and do24S9xReportButton(PseudoButtonBase+0,1) when said axis goes past 50% in the25negative direction and S9xReportButton(PseudoButtonBase+255,1) when it goes26over 50% deflection in the positive direction. Similarly, it will do27S9xReportButton(...,0) when the deflection drops under 50% in either28direction. "ButtonToPointer 1u Slow" would move the pointer with ID29PseudoPointerBase+0 up one pixel per frame as long as the button is pressed30(reporting this change at the end of each frame).3132---------------33Button Commands34---------------3536Joypad# {Up, Down, Left, Right, A, B, X, Y, L, R, Start, Select}37Joypad# Turbo ""38Joypad# Sticky ""39Joypad# StickyTurbo ""40Joypad# ToggleTurbo ""41Joypad# ToggleSticky ""42Joypad# ToggleStickyTurbo ""4344Mouse# (L|R|LR)4546Superscope AimOffscreen47Superscope {Fire, Cursor, ToggleTurbo, Pause}48Superscope AimOffscreen ""4950Justifier# AimOffscreen51Justifier# {Trigger, Start}52Justifier# AimOffscreen ""5354ButtonToPointer #[u|d][l|r] <speed> ; NOTE: "# <speed>" is invalid5556-------------57Axis Commands58-------------5960Joypad# Axis <axis> T=#% ; T = 0.1 to 100 by tenths61AxisToButtons #/# T=#% ; neg then pos, range 0-255, T as above62AxisToPointer #(h|v) [-]<speed> ; NOTE: '-' inverts the axis6364----------------65Pointer Commands66----------------6768Pointer {Mouse1, Mouse2, Superscope, Justifier1, Justifier2}6970------71Multis72------7374Multis are a type of button command. The basic format of a multi is "{...}",75where the '...' consists of 1 or more valid non-multi button command76strings. The braces are literal, not metacharacters. Subcommands separated77by commas are executed one after the next. Semicolons skip one frame before78continuing subcommand execution. Semicolons may be repeated. When the multi79button is pressed, each subcommand is 'pressed', and when the multi button80is released each subcommand is 'released'.8182There are also press-only multis, defined as "+{...}". These act just like83regular multis, with two differences: the multi is only run when you press84the button (release isignored), and each subcommand must be prefixed with85'+' or '-' to indicate whether the the subcommand should be pressed or86released.8788For example: {Joypad1 A,Joypad2 A;Joypad3 A;;;;;QuickSave000}89This presses (or releases) A on pads 1 and 2, then waits one frame, then90presses A on pad 3, then waits 5 frames, then saves to snapshot 0 (on press91only).9293You may access the multi number in the returned s9xcommand_t structure as94cmd.button.multi_idx. This may be used to assign the same multi to multiple95buttons:96MULTI#<num> ; NOTE: that's a literal octothorpe979899