1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
6 \use_default_options true
7 \maintain_unincluded_children false
9 \language_package default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
23 \default_output_format default
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
38 \paperorientation portrait
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
52 \paperpagestyle default
53 \tracking_changes false
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
75 Syntax: lsnes.exe <rom-options> <misc-options> (<new-session-options>|<filename>)
79 Syntax: lsnes-avidump <dump-options> <misc-options> <rom-options> <filename>
83 Syntax: movieinfo.exe <filename>
86 \begin_layout Subsection
90 \begin_layout Standard
91 These options control loading the ROM.
94 \begin_layout Subsubsection
98 \begin_layout Standard
99 Load <file> (SFC file format) as main SNES cartridge ROM.
100 This is the game ROM for SNES and cartridge BIOS for other types.
104 \begin_layout Subsubsection
105 --headered-rom=<file>
108 \begin_layout Standard
109 Same as --rom, but strips first 512 bytes off the file as copier header.
110 Handy for loading .smc and .fig (also some others) files.
113 \begin_layout Subsubsection
117 \begin_layout Standard
118 Set the mapping XML file for main cartridge ROM.
119 If not specified, defaults are used.
122 \begin_layout Subsubsection
126 \begin_layout Standard
127 Load <file> (BS file format) as BS-X non-slotted flash memory.
128 Also sets system type to BS-X non-slotted (not compatible with --bsxslotted=<fi
129 le>, --dmg=<file>, --slot-a=<file> nor --slot-b=<file>).
132 \begin_layout Subsubsection
133 --headered-bsx=<file>
136 \begin_layout Standard
137 Same as --bsx but strips first 512 bytes off the file as copier header.
138 Handy for loading .smc and .fig (also some others) files.
141 \begin_layout Subsubsection
145 \begin_layout Standard
146 Set mapping XML file for BS-X non-slotted flash memory.
147 If not specified, defaults are used.
148 Only can be used together with --bsx=<file>.
151 \begin_layout Subsubsection
155 \begin_layout Standard
156 Load <file> (BS file format) as BS-X slotted flash memory.
157 Also sets system type to BS-X slotted (not compatible with --bsx=<file>,
158 --dmg=<file>, --slot-a=<file> nor --slot-b=<file>).
161 \begin_layout Subsubsection
162 --headered-bsxslotted=<file>
165 \begin_layout Standard
166 Same as --bsxslotted but strips first 512 bytes off the file as copier header.
167 Handy for loading .smc and .fig (also some others) files.
170 \begin_layout Subsubsection
171 --bsxslotted-xml=<file>
174 \begin_layout Standard
175 Set mapping XML file for BS-X slotted flash memory.
176 If not specified, defaults are used.
177 Only can be used together with --bsxslotted=<file>.
180 \begin_layout Subsubsection
184 \begin_layout Standard
185 Load <file> (GB file format) as Game Boy ROM.
186 Also sets system type to SGB (not compatible with --bsx=<file>, --bsxslotted=<f
187 ile>, --slot-a=<file> nor --slot-b=<file>).
190 \begin_layout Subsubsection
191 --headered-dmg=<file>
194 \begin_layout Standard
195 Same as --dmg but strips first 512 bytes off the file as copier header.
196 Handy for loading .smc and .fig (also some others) files.
199 \begin_layout Subsubsection
203 \begin_layout Standard
204 Set mapping XML file for Game Boy ROM.
205 If not specified, defaults are used.
206 Only can be used together with --dmg=<file>.
209 \begin_layout Subsubsection
213 \begin_layout Standard
214 Load <file> (ST file format) as Sufami turbo cartridge A ROM.
215 Also sets system type to Sufami Turbo (not compatible with --bsx=<file>,
216 --bsxslotted=<file> nor --dmg=<file>).
219 \begin_layout Subsubsection
220 --headered-slot-a=<file>
223 \begin_layout Standard
224 Same as --slot-a but strips first 512 bytes off the file as copier header.
225 Handy for loading .smc and .fig (also some others) files.
228 \begin_layout Subsubsection
232 \begin_layout Standard
233 Set mapping XML file for Sufami turbo cartridge A ROM.
234 If not specified, defaults are used.
235 Only can be used together with --slot-a=<file>.
238 \begin_layout Subsubsection
242 \begin_layout Standard
243 Load <file> (ST file format) as Sufami turbo cartridge B ROM.
244 Also sets system type to Sufami Turbo (not compatible with --bsx=<file>,
245 --bsxslotted=<file> nor --dmg=<file>).
248 \begin_layout Subsubsection
249 --headered-slot-b=<file>
252 \begin_layout Standard
253 Same as --slot-b but strips first 512 bytes off the file as copier header.
254 Handy for loading .smc and .fig (also some others) files.
257 \begin_layout Subsubsection
261 \begin_layout Standard
262 Set mapping XML file for Sufami turbo cartridge B ROM.
263 If not specified, defaults are used.
264 Only can be used together with --slot-b=<file>.
267 \begin_layout Subsubsection
271 \begin_layout Standard
272 Apply IPS patch <file> to main cartridge ROM.
273 Requires --rom=<file>.
276 \begin_layout Subsubsection
280 \begin_layout Standard
281 Apply IPS patch <file> to main cartridge ROM mapping XML.
282 Requires --rom-xml=<file>.
285 \begin_layout Subsubsection
289 \begin_layout Standard
290 Apply IPS patch <file> to BS-X non-slotted flash.
291 Requires --bsx=<file>.
294 \begin_layout Subsubsection
298 \begin_layout Standard
299 Apply IPS patch <file> to BS-X non-slotted flash mapping XML.
300 Requires --bsx-xml=<file>.
303 \begin_layout Subsubsection
304 --ips-bsxslotted=<file>
307 \begin_layout Standard
308 Apply IPS patch <file> to BS-X slotted flash.
309 Requires --bsxslotted=<file>.
312 \begin_layout Subsubsection
313 --ips-bsxslotted-xml=<file>
316 \begin_layout Standard
317 Apply IPS patch <file> to BS-X slotted flash mapping XML.
318 Requires --bsxslotted-xml=<file>.
321 \begin_layout Subsubsection
325 \begin_layout Standard
326 Apply IPS patch <file> to Game Boy ROM.
327 Requires --dmg=<file>.
330 \begin_layout Subsubsection
334 \begin_layout Standard
335 Apply IPS patch <file> to Game Boy ROM mapping XML.
336 Requires --dmg-xml=<file>.
339 \begin_layout Subsubsection
343 \begin_layout Standard
344 Apply IPS patch <file> to Sufami turbo cartridge A ROM.
345 Requires --slot-a=<file>.
348 \begin_layout Subsubsection
349 --ips-slot-a-xml=<file>
352 \begin_layout Standard
353 Apply IPS patch <file> to Sufami turbo cartridge A ROM mapping XML.
354 Requires --slot-a-xml=<file>.
357 \begin_layout Subsubsection
361 \begin_layout Standard
362 Apply IPS patch <file> to Sufami turbo cartridge B ROM.
363 Requires --slot-b=<file>.
366 \begin_layout Subsubsection
367 --ips-slot-b-xml=<file>
370 \begin_layout Standard
371 Apply IPS patch <file> to Sufami turbo cartridge B ROM mapping XML.
372 Requires --slot-b-xml=<file>.
375 \begin_layout Subsubsection
376 --ips-offset=<offset>
379 \begin_layout Standard
380 Set IPS apply offset to <offset> (can be negative).
381 IPS apply offset is added to all addresses inside IPS file before applying.
382 If the resulting address is negative, write is ignored (with a warning).
383 If resulting address exceeds ROM size, the ROM is extended.
386 \begin_layout Standard
387 Using offset of -512 is handy for applying IPS patches meant for SMC/FIG
391 \begin_layout Subsubsection
395 \begin_layout Standard
396 Force ROM to be considered PAL-only (warning: Will cause error if used on
397 anything except SNES and SGB).
400 \begin_layout Subsubsection
404 \begin_layout Standard
405 Force ROM to be considered NTSC-only (default for everything except SNES
409 \begin_layout Subsection
410 New session options (lsnes.exe only)
413 \begin_layout Standard
414 If filename is not specified, new session is started.
415 These options control the properties of new session:
418 \begin_layout Subsubsection
422 \begin_layout Standard
427 \begin_layout Itemize
428 none: No device connected
431 \begin_layout Itemize
432 gamepad: One gamepad (the default)
435 \begin_layout Itemize
436 multitap: Four gamepads (warning: makes most games refuse to start)
439 \begin_layout Itemize
443 \begin_layout Subsubsection
447 \begin_layout Standard
452 \begin_layout Itemize
453 none: No device connected (the default)
456 \begin_layout Itemize
460 \begin_layout Itemize
461 multitap: Four gamepads.
464 \begin_layout Itemize
468 \begin_layout Itemize
469 superscope: Super Scope
472 \begin_layout Itemize
473 justifier: One justifier
476 \begin_layout Itemize
477 justifiers: Two justifiers
480 \begin_layout Subsubsection
484 \begin_layout Standard
485 Set the name of game to <name>
488 \begin_layout Subsubsection
492 \begin_layout Standard
493 Add author with full name of <name> (no nickname).
496 \begin_layout Subsubsection
500 \begin_layout Standard
501 Add author with nickname of <name> (no full name).
504 \begin_layout Subsubsection
505 --author=<fullname>|<nickname>
508 \begin_layout Standard
509 Add author with full name of <fullname> and nickname of <nickname>.
512 \begin_layout Subsubsection
516 \begin_layout Standard
517 Set RTC second (0 is 1st January 1970 00:00:00Z).
520 \begin_layout Subsubsection
521 --rtc-subsecond=<value>
524 \begin_layout Standard
530 \begin_layout Subsection
534 \begin_layout Standard
535 If filename is specified on command line, it is loaded as initial state
536 (instead of constructing one).
537 Mandatory for lsnes-avidump.exe and movieinfo.exe.
540 \begin_layout Subsection
545 \begin_layout Subsubsection
546 --run=<file> (lsnes.exe only)
549 \begin_layout Standard
550 After running main RC file, run this file.
551 If multiple are specified, these execute in order specified.
554 \begin_layout Subsection
555 dump options (lsnes-avidump.exe only)
558 \begin_layout Subsubsection
562 \begin_layout Standard
565 \begin_inset Quotes eld
569 \begin_inset Quotes erd
575 \begin_layout Subsubsection
579 \begin_layout Standard
580 Set compression level (0-18).
584 \begin_layout Subsubsection
588 \begin_layout Standard
589 Set number of frames to dump.
593 \begin_layout Subsubsection
597 \begin_layout Standard
598 Run specified lua script (lsnes-avidump.exe does not have initialization
602 \begin_layout Subsubsection
606 \begin_layout Standard
607 Use JMD dumping instead of AVI dumping.
610 \begin_layout Section
611 Startup file lsnes.rc
614 \begin_layout Standard
615 Upon startup, lsnes (lsnes.exe only) executes file lsnes.rc as commands.
616 This file is located in:
619 \begin_layout Itemize
624 lsnes.rc (if %APPDATA% exists)
627 \begin_layout Itemize
628 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
631 \begin_layout Itemize
632 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
635 \begin_layout Itemize
636 All: ./lsnes.rc (fallback default).
639 \begin_layout Standard
640 If leading directories do not exist, attempt to create them is made.
643 \begin_layout Section
644 Game internal commands
647 \begin_layout Itemize
648 Commands beginning with '*' invoke the corresponding command without alias
652 \begin_layout Itemize
653 If command starts with '+' (after possible '*'), the command is executed
654 as-is when button is pressed, and when button is released, it is executed
655 with '+' replaced by '-'.
658 \begin_layout Subsection
662 \begin_layout Standard
663 Settings control various aspects of emulator behaviour.
666 \begin_layout Subsubsection
667 set-setting <setting> <value>
670 \begin_layout Standard
671 Sets setting <setting> to value <value> (may be empty).
674 \begin_layout Subsubsection
675 unset-setting <setting>
678 \begin_layout Standard
679 Try to unset setting <setting> (not all settings can be unset).
682 \begin_layout Subsubsection
683 get-setting <setting>
686 \begin_layout Standard
687 Read value of setting <setting>
690 \begin_layout Subsubsection
694 \begin_layout Standard
695 Print names and values of all settings.
698 \begin_layout Subsection
702 \begin_layout Standard
703 Keybindings bind commands or aliases to keys (or pseudo-keys).
707 \begin_layout Standard
711 \begin_layout Itemize
712 Do not bind edge active (+/-) commands to keys with modifiers, that won't
716 \begin_layout Itemize
717 Names of keys and modifiers are platform-dependent.
720 \begin_layout Itemize
721 Be careful before binding pseudo-keys (such as joystick axes, buttons or
722 hats) with modifiers.
723 That may or may not work right.
726 \begin_layout Subsubsection
727 bind-key [<mod>/<modmask>] <key> <command>
730 \begin_layout Standard
731 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
732 ed list) are set as <mod> (comma-seperated list).
735 \begin_layout Standard
736 The names of keys and modifiers are platform-dependent.
739 \begin_layout Subsubsection
740 unbind-key [<mod>/<modmask>] <key>
743 \begin_layout Standard
744 Unbind command from <key> (with specified <mod> and <modmask>).
747 \begin_layout Subsubsection
748 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
749 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
750 [plus=<val>] [tolerance=<val>]
753 \begin_layout Standard
754 Set axis parameters for axis <axis>.
757 \begin_layout Itemize
758 disabled: Disable axis
761 \begin_layout Itemize
765 \begin_layout Itemize
766 axis-inverse: Inverse axis
769 \begin_layout Itemize
770 pressure0-: Pressure sensitive.
771 Released at 0, pressed at -.
774 \begin_layout Itemize
775 pressure0+: Pressure sensitive.
776 Released at 0, pressed at +.
779 \begin_layout Itemize
780 pressure-0: Pressure sensitive.
781 Released at -, pressed at 0.
784 \begin_layout Itemize
785 pressure-+: Pressure sensitive.
786 Released at -, pressed at +.
789 \begin_layout Itemize
790 pressure+0: Pressure sensitive.
791 Released at +, pressed at 0.
794 \begin_layout Itemize
795 pressure+-: Pressure sensitive.
796 Released at +, pressed at -.
799 \begin_layout Itemize
800 minus=<val>: Calibration at extreme minus position (-32768-32767)
803 \begin_layout Itemize
804 zero=<val>: Calibration at neutral position (-32768-32767)
807 \begin_layout Itemize
808 plus=<val>: Calibration at extreme plus position (-32768-32767)
811 \begin_layout Itemize
812 tolerance=<value>: Center band tolerance (0<x<1).
813 The smaller the value, the more sensitive the control is.
816 \begin_layout Subsubsection
820 \begin_layout Standard
821 Print all key bindings in effect.
824 \begin_layout Subsection
828 \begin_layout Standard
829 Aliases bind command to sequence of commands.
830 After alias has been defined, it replaces the command it shadows.
833 \begin_layout Standard
837 \begin_layout Itemize
838 You can't alias command to itself.
841 \begin_layout Itemize
842 Aliases starting with +/- are edge active just like ordinary commands starting
846 \begin_layout Itemize
847 One command can be aliased to multiple commands.
850 \begin_layout Subsubsection
851 alias-command <command> <expansion>
854 \begin_layout Standard
855 Append <expansion> to alias <command>.
856 If alias does not already exist, it is created.
859 \begin_layout Subsubsection
860 unalias-command <command>
863 \begin_layout Standard
864 Clear alias expansion for <command>.
867 \begin_layout Subsubsection
871 \begin_layout Standard
872 Print all aliases and their expansions in effect.
875 \begin_layout Subsection
876 run-script <script> (implemented for wxwidgets)
879 \begin_layout Standard
880 Run <script> as if commands were entered on the command line.
883 \begin_layout Subsection
887 \begin_layout Standard
888 Following commands control AVI video dumping:
891 \begin_layout Subsubsection
895 \begin_layout Standard
896 Dump AVI video to prefix <prefix> Notes:
899 \begin_layout Itemize
900 The codec is Camstudio Codec in gzip mode.
903 \begin_layout Itemize
904 Encoder and muxer are internal, available on all platforms.
907 \begin_layout Itemize
908 Audio enable/disable and framerate has no effect.
911 \begin_layout Itemize
912 Levels 10-18 are not compatible with AVISource.
915 \begin_layout Itemize
916 Recomended level is 7 if decoded by AVISource.
919 \begin_layout Itemize
920 Recomended level is 16 if decoded by ffmpeg, mencoder or FFMpegSource.
923 \begin_layout Itemize
924 Dumps of low-res PAL games are 256x239 (with all the consequences odd height
928 \begin_layout Itemize
929 The audio dumped to .avi is low-quality version.
930 The high-quality version is dumped to .sox file.
933 \begin_layout Subsubsection
937 \begin_layout Standard
938 End current AVI video dump (closing the emulator also closes the dump).
941 \begin_layout Subsection
945 \begin_layout Standard
946 Following commands control JMD video dumping:
949 \begin_layout Subsubsection
953 \begin_layout Standard
954 Dump JMD video to file <file>.
957 \begin_layout Subsubsection
961 \begin_layout Standard
962 End the current JMD dump in progress.
965 \begin_layout Subsection
969 \begin_layout Standard
970 <address> may be decimal or hexadecimal (prefixed with '0x').
971 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
975 \begin_layout Standard
976 The available element <sizes> are:
979 \begin_layout Itemize
983 \begin_layout Itemize
987 \begin_layout Itemize
991 \begin_layout Itemize
995 \begin_layout Standard
996 When reading RAM and ROM, multi-byte reads/writes are big-endian.
997 When dealing with DSP memory, multi-byte reads/writes are native-endian
998 (do not use operand sizes exceeding DSP bitness, except dword is OK for
1002 \begin_layout Subsubsection
1003 read-<size> <address>
1006 \begin_layout Standard
1007 Read the value of byte in <address>.
1010 \begin_layout Subsubsection
1011 read-s<size> <address>
1014 \begin_layout Standard
1015 Read the value of signed byte in <address>.
1018 \begin_layout Subsubsection
1019 write-<size> <address> <value>
1022 \begin_layout Standard
1023 Write <value> to byte in address <address>.
1026 \begin_layout Subsubsection
1030 \begin_layout Standard
1031 Reset the memory search
1034 \begin_layout Subsubsection
1038 \begin_layout Standard
1039 Print number of candidates remaining
1042 \begin_layout Subsubsection
1046 \begin_layout Standard
1047 Print all candidates remaining
1050 \begin_layout Subsubsection
1051 search-memory <usflag><sizeflag><op>
1054 \begin_layout Standard
1055 Searches memory for addresses satisfying criteria.
1058 \begin_layout Standard
1062 \begin_layout Itemize
1066 \begin_layout Itemize
1070 \begin_layout Standard
1074 \begin_layout Itemize
1078 \begin_layout Itemize
1082 \begin_layout Itemize
1086 \begin_layout Itemize
1090 \begin_layout Standard
1094 \begin_layout Itemize
1095 lt: < previous value.
1098 \begin_layout Itemize
1099 le: <= previous value.
1102 \begin_layout Itemize
1103 eq: = previous value.
1106 \begin_layout Itemize
1107 ne: != previous value.
1110 \begin_layout Itemize
1111 ge: >= previous value.
1114 \begin_layout Itemize
1115 gt: > previous value.
1118 \begin_layout Subsubsection
1119 search-memory <sizeflag> <value>
1122 \begin_layout Standard
1123 Searches for addresses that currently have value <value>.
1124 <sizeflag> is as in previous command.
1127 \begin_layout Subsection
1131 \begin_layout Standard
1132 These commands are not available in lsnesrc, but are available after ROM
1136 \begin_layout Subsubsection
1137 quit-emulator [/y] (implemented for wxwidgets)
1140 \begin_layout Standard
1141 Quits the emulator (asking for confirmation).
1142 If /y is given, no confirmation is asked.
1145 \begin_layout Subsubsection
1146 pause-emulator (implemented for wxwidgets)
1149 \begin_layout Standard
1150 Toggle paused/unpaused
1153 \begin_layout Subsubsection
1154 +advance-frame (implemented for wxwidgets)
1157 \begin_layout Standard
1159 If the button is still held after configurable timeout expires, game unpauses
1160 for the duration frame advance is held.
1163 \begin_layout Subsubsection
1164 +advance-poll (implemented for wxwidgets)
1167 \begin_layout Standard
1169 If the button is still held after configurable timeout expires, game unpauses
1170 for the duration frame advance is held.
1173 \begin_layout Subsubsection
1174 advance-skiplag (implemented for wxwidgets)
1177 \begin_layout Standard
1178 Skip to first poll in frame after current.
1181 \begin_layout Subsubsection
1182 reset (implemented for wxwidgets)
1185 \begin_layout Standard
1186 Reset the SNES after this frame.
1189 \begin_layout Subsubsection
1190 load <filename> (implemented for wxwidgets)
1193 \begin_layout Standard
1194 Load savestate <filename> in current mode.
1197 \begin_layout Subsubsection
1198 load-state <filename> (implemented for wxwidgets)
1201 \begin_layout Standard
1202 Load savestate <filename> in readwrite mode.
1205 \begin_layout Subsubsection
1206 load-readonly <filename> (implemented for wxwidgets)
1209 \begin_layout Standard
1210 Load savestate <filename> in readonly mode.
1213 \begin_layout Subsubsection
1214 load-preserve <filename> (implemented for wxwidgets)
1217 \begin_layout Standard
1218 Load savestate <filename> in readonly mode, preserving current events.
1221 \begin_layout Subsubsection
1222 load-movie <filename> (implemented for wxwidgets)
1225 \begin_layout Standard
1226 Load savestate <filename>, ignoring save part in readonly mode.
1229 \begin_layout Subsubsection
1230 save-state <filename> (implemented for wxwidgets)
1233 \begin_layout Standard
1234 Save system state to <filename> as soon as possible.
1237 \begin_layout Subsubsection
1238 save-movie <filename> (implemented for wxwidgets)
1241 \begin_layout Standard
1242 Save movie to <filename>.
1245 \begin_layout Subsubsection
1246 set-rwmode (implemented for wxwidgets)
1249 \begin_layout Standard
1250 Set read-write mode.
1253 \begin_layout Subsubsection
1254 set-romode (implemented for wxwidgets)
1257 \begin_layout Standard
1261 \begin_layout Subsubsection
1262 toggle-rwmode (implemented for wxwidgets)
1265 \begin_layout Standard
1266 Toggle between read-only and read-write modes.
1269 \begin_layout Subsubsection
1270 set-gamename <name> (implemented for wxwidgets)
1273 \begin_layout Standard
1274 Set name of the game to <name>
1277 \begin_layout Subsubsection
1278 get-gamename (implemented for wxwidgets)
1281 \begin_layout Standard
1282 Print the name of the game.
1285 \begin_layout Subsubsection
1286 add-author <author> (implemented for wxwidgets)
1289 \begin_layout Standard
1290 Adds new author <author>.
1291 If <author> does not contain '|' it is full name.
1292 If it contains '|', '|' splits the full name and nickname.
1295 \begin_layout Subsubsection
1296 edit-author <num> <author> (implemented for wxwidgets)
1299 \begin_layout Standard
1300 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1304 \begin_layout Subsubsection
1305 remove-author <num> (implemented for wxwidgets)
1308 \begin_layout Standard
1309 Remove author in slot <num>
1312 \begin_layout Subsubsection
1313 print-authors (implemented for wxwidgets)
1316 \begin_layout Standard
1320 \begin_layout Subsubsection
1321 test-1, test-2, test-3 (N/A for wxwidgets)
1324 \begin_layout Standard
1325 Internal test commands.
1329 \begin_layout Subsubsection
1330 take-screenshot <filename> (implemented for wxwidgets)
1333 \begin_layout Standard
1334 Save screenshot to <filename>.
1337 \begin_layout Subsubsection
1338 +controller<num><button> (N/A for wxwidgets)
1341 \begin_layout Standard
1342 Press button <button> on controller <num> (1-8).
1343 The following button names are known:
1346 \begin_layout Itemize
1350 \begin_layout Itemize
1354 \begin_layout Itemize
1358 \begin_layout Itemize
1362 \begin_layout Itemize
1366 \begin_layout Itemize
1370 \begin_layout Itemize
1374 \begin_layout Itemize
1378 \begin_layout Itemize
1382 \begin_layout Itemize
1386 \begin_layout Itemize
1390 \begin_layout Itemize
1394 \begin_layout Itemize
1398 \begin_layout Itemize
1402 \begin_layout Itemize
1406 \begin_layout Itemize
1410 \begin_layout Subsubsection
1411 controllerh<num><button>
1414 \begin_layout Standard
1415 Hold/unhold button <button> on controller <num> (1-8).
1416 See +controller for button names.
1419 \begin_layout Subsubsection
1420 autofire (<pattern>|-)...
1424 \begin_layout Standard
1425 Set autofire pattern.
1426 Each parameter is comma-separated list of button names (in form of 1start,
1427 1A, 2B, etc..) to hold on that frame.
1428 After reaching the end of pattern, the pattern restarts from the beginning.
1431 \begin_layout Subsubsection
1432 repaint (N/A for wxwidgets)
1435 \begin_layout Standard
1439 \begin_layout Subsection
1440 Save jukebox (implemented for wxwidgets)
1443 \begin_layout Subsubsection
1444 cycle-jukebox-backward (N/A for wxwidgets)
1447 \begin_layout Standard
1448 Cycle save jukebox backwards.
1451 \begin_layout Subsubsection
1452 cycle-jukebox-forward (N/A for wxwidgets)
1455 \begin_layout Standard
1456 Cycle save jukebox forwards
1459 \begin_layout Subsubsection
1460 add-jukebox-save <filename> (N/A for wxwidgets)
1463 \begin_layout Standard
1464 Add <filename> to jukebox saves.
1467 \begin_layout Subsubsection
1468 load-jukebox (N/A for wxwidgets)
1471 \begin_layout Standard
1472 Do load from jukebox (current mode).
1475 \begin_layout Subsubsection
1476 save-jukebox (N/A for wxwidgets)
1479 \begin_layout Standard
1480 Do state save to jukebox.
1483 \begin_layout Subsection
1484 Lua (implemented for wxwidgets)
1487 \begin_layout Standard
1488 Only available if lua support is compiled in.
1491 \begin_layout Subsubsection
1492 <<<<<<< HEADevaluate-lua <luacode>=======eval-lua <luacode> (implemented
1493 for wxwidgets)>>>>>>> Wxwidgets Graphics plugin WIP
1496 \begin_layout Standard
1497 Run Lua code <luacode> using built-in Lua interpretter.
1500 \begin_layout Subsubsection
1501 run-lua <script> (implemented for wxwidgets)
1504 \begin_layout Standard
1505 Run specified lua file using built-in Lua interpretter.
1508 \begin_layout Subsection
1512 \begin_layout Subsubsection
1513 add-watch <name> <expression>
1516 \begin_layout Standard
1517 Adds new watch (or modifies old one).
1520 \begin_layout Subsubsection
1524 \begin_layout Standard
1528 \begin_layout Subsection
1529 Sound (implemented for wxwidgets)
1532 \begin_layout Subsubsection
1533 enable-sound <on/off> (implemented for wxwidgets)
1536 \begin_layout Standard
1537 Enable/Disable sound.
1540 \begin_layout Subsubsection
1541 set-sound-device <device> (implemented for wxwidgets)
1544 \begin_layout Standard
1545 Set sound device to <device>
1548 \begin_layout Subsubsection
1549 show-sound-status (implemented for wxwidgets)
1552 \begin_layout Standard
1553 Show status of sound system.
1556 \begin_layout Subsubsection
1557 show-sound-devices (N/A for wxwidgets)
1560 \begin_layout Standard
1561 Show all available devices.
1564 \begin_layout Subsection
1565 SDL Platform commands (implemented for wxwidgets)
1568 \begin_layout Standard
1569 The following are valid on SDL platform.
1572 \begin_layout Subsubsection
1573 identify-key (N/A for wxwidgets)
1576 \begin_layout Standard
1577 Asks to press a key and then identifies that (pseudo-)key.
1580 \begin_layout Subsubsection
1581 toggle-console (N/A for wxwidgets)
1584 \begin_layout Standard
1585 Toggle between windowed/fullscreen console.
1588 \begin_layout Subsubsection
1589 scroll-fullup (N/A for wxwidgets)
1592 \begin_layout Standard
1593 Scroll messages window as far back as it goes.
1596 \begin_layout Subsubsection
1597 scroll-fulldown (N/A for wxwidgets)
1600 \begin_layout Standard
1601 Scroll messages window as far forward as it goes.
1604 \begin_layout Subsubsection
1605 scroll-up (N/A for wxwidgets)
1608 \begin_layout Standard
1609 Scroll messages window back one screenful.
1612 \begin_layout Subsubsection
1613 scroll-down (N/A for wxwidgets)
1616 \begin_layout Standard
1617 Scroll messages window forward one screenful.
1620 \begin_layout Section
1624 \begin_layout Subsection
1628 \begin_layout Subsubsection
1632 \begin_layout Standard
1633 Set where bsnes looks for firmware files.
1635 \begin_inset Quotes eld
1639 \begin_inset Quotes erd
1645 \begin_layout Subsubsection
1649 \begin_layout Standard
1651 Numeric, range is 0.001 to
1652 \begin_inset Quotes eld
1656 \begin_inset Quotes erd
1660 Default is native framerate.
1663 \begin_layout Subsubsection
1667 \begin_layout Standard
1668 Set save compression level (integer 0-9).
1669 Default is 7 (0 is no compression).
1672 \begin_layout Subsubsection
1676 \begin_layout Standard
1677 Set the frame advance timeout in milliseconds.
1678 Numeric integer, range is 0-999999999.
1682 \begin_layout Subsection
1686 \begin_layout Subsubsection
1690 \begin_layout Standard
1691 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1695 \begin_layout Subsubsection
1699 \begin_layout Standard
1700 AVI dumper: Set the default left border thickness (unless lua overrides)
1706 \begin_layout Subsubsection
1710 \begin_layout Standard
1711 AVI dumper: Set the default right border thickness (unless lua overrides)
1717 \begin_layout Subsubsection
1721 \begin_layout Standard
1722 AVI dumper: Set the default top border thickness (unless lua overrides)
1728 \begin_layout Subsubsection
1732 \begin_layout Standard
1733 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1739 \begin_layout Subsubsection
1743 \begin_layout Standard
1744 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1749 \begin_layout Subsection
1750 SDL platform settings
1753 \begin_layout Subsubsection
1754 autorepeat-first-delay
1757 \begin_layout Standard
1758 Sets the delay for first character in typematic autorepeat.
1761 \begin_layout Subsubsection
1762 autorepeat-subsequent-delay
1765 \begin_layout Standard
1766 Sets the delay for subsequent characters in typematic autorepeat.
1769 \begin_layout Section
1773 \begin_layout Subsection
1774 Core (in main table)
1777 \begin_layout Subsubsection
1781 \begin_layout Standard
1782 Print line to message console.
1785 \begin_layout Subsubsection
1786 exec(string command)
1789 \begin_layout Standard
1790 Run command as it was entered on the command line
1793 \begin_layout Subsection
1797 \begin_layout Standard
1798 Bitwise logical functions and related.
1801 \begin_layout Subsubsection
1802 bit.none(number...) / bit.bnot(number...)
1805 \begin_layout Standard
1806 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1810 \begin_layout Subsubsection
1811 bit.any(number...) / bit.bor(number...)
1814 \begin_layout Standard
1815 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1818 \begin_layout Subsubsection
1819 bit.all(number...) / bit.band(number...)
1822 \begin_layout Standard
1823 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1827 \begin_layout Subsubsection
1828 bit.parity(number...) / bit.bxor(number...)
1831 \begin_layout Standard
1832 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1836 \begin_layout Subsubsection
1837 bit.lrotate(number base[, number amount[, number bits]])
1840 \begin_layout Standard
1841 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1844 \begin_layout Subsubsection
1845 bit.rrotate(number base[, number amount[, number bits]])
1848 \begin_layout Standard
1849 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1853 \begin_layout Subsubsection
1854 bit.lshift(number base[, number amount[, number bits]])
1857 \begin_layout Standard
1858 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1859 The new bits are filled with zeroes.
1862 \begin_layout Subsubsection
1863 bit.lrshift(number base[, number amount[, number bits]])
1866 \begin_layout Standard
1867 Shift bits-bit (max 48, default 48) number logically right by amount (default
1869 The new bits are filled with zeroes.
1872 \begin_layout Subsubsection
1873 bit.arshift(number base[, number amount[, number bits]])
1876 \begin_layout Standard
1877 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1879 The new bits are shifted in with copy of the high bit.
1882 \begin_layout Subsection
1886 \begin_layout Standard
1887 Most of these functions can only be called in on_paint and on_video callbacks.
1888 Exceptions are noted.
1891 \begin_layout Standard
1893 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1894 16-23 are the red component, bits 24-31 are alpha component (0 is fully
1895 opaque, 255 is almost transparent).
1896 -1 is the fully transparent color.
1897 Alpha values greater than 127 do work.
1900 \begin_layout Standard
1901 Origin of coordinates is at top left corner of game display area.
1902 Left and top gaps correspond to negative coordinates.
1905 \begin_layout Subsubsection
1909 \begin_layout Standard
1910 Returns 2-tuple (hresolution, vresolution).
1913 \begin_layout Subsubsection
1914 gui.<class>_gap(number gap)
1917 \begin_layout Standard
1918 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1922 \begin_layout Subsubsection
1923 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1926 \begin_layout Standard
1927 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1932 \begin_layout Itemize
1933 x: X-coordinate to start the drawing from (and x-coordinate at begining
1937 \begin_layout Itemize
1938 y: Y-coordinate to start the drawing from.
1941 \begin_layout Itemize
1942 text: The text to draw.
1945 \begin_layout Itemize
1946 fgc: Text color (default is 0xFFFFFF (white))
1949 \begin_layout Itemize
1950 bgc: Background color (default is -1 (transparent))
1953 \begin_layout Subsubsection
1954 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1957 \begin_layout Standard
1958 Like gui.text, but draw using double-width.
1961 \begin_layout Subsubsection
1962 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1965 \begin_layout Standard
1966 Like gui.text, but draw using double-height.
1969 \begin_layout Subsubsection
1970 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1973 \begin_layout Standard
1974 Like gui.text, but draw using double-width/double-height.
1977 \begin_layout Subsubsection
1978 gui.rectangle(number x, number y, number width, number height[, number thickness[
1979 , number outline[, number fill]]])
1982 \begin_layout Standard
1983 Draw rectangle on the GUI.
1987 \begin_layout Itemize
1988 x: X-coordinate of left edge.
1991 \begin_layout Itemize
1992 y: Y-coordinate of upper edge.
1995 \begin_layout Itemize
1996 width: Width of rectangle.
1999 \begin_layout Itemize
2000 height: Height of rectangle.
2003 \begin_layout Itemize
2004 thickness: Thickness of outline (default is 1).
2007 \begin_layout Itemize
2008 outline: Color of outline (default is 0xFFFFFF (white))
2011 \begin_layout Itemize
2012 fill: Color of fil (default is -1 (transparent))
2015 \begin_layout Subsubsection
2016 gui.pixel(number x, number y[, number color])
2019 \begin_layout Standard
2020 Draw one pixel on the GUI.
2024 \begin_layout Itemize
2025 x: X-coordinate of the pixel
2028 \begin_layout Itemize
2029 y: Y-coordinate of the pixel
2032 \begin_layout Itemize
2033 color: Color of the pixel (default is 0xFFFFFF (white))
2036 \begin_layout Subsubsection
2037 gui.crosshair(number x, number y[, number length[, number color]])
2040 \begin_layout Standard
2045 \begin_layout Itemize
2046 x: X-coordinate of the crosshair
2049 \begin_layout Itemize
2050 y: Y-coordinate of the crosshair
2053 \begin_layout Itemize
2054 length: Length of the crosshair lines (default 10).
2057 \begin_layout Itemize
2058 color: Color of the crosshair (default is 0xFFFFFF (white))
2061 \begin_layout Subsubsection
2062 gui.line(number x1, number y1, number x2, number y2[, number color])
2065 \begin_layout Standard
2070 \begin_layout Itemize
2071 x1: X-coordinate of one end.
2074 \begin_layout Itemize
2075 y1: Y-coordinate of one end.
2078 \begin_layout Itemize
2079 x2: X-coordinate of the other end.
2082 \begin_layout Itemize
2083 y2: Y-coordinate of the other end.
2086 \begin_layout Itemize
2087 color: Color of the line (default is 0xFFFFFF (white)).
2090 \begin_layout Subsubsection
2091 gui.circle(number x, number y, number r[, number thick[, number border[,
2095 \begin_layout Standard
2100 \begin_layout Itemize
2101 x: X-coordinate of the center
2104 \begin_layout Itemize
2105 y: Y-coordinate of the center
2108 \begin_layout Itemize
2109 r: The radius of the circle
2112 \begin_layout Itemize
2113 thick: Border thickness
2116 \begin_layout Itemize
2117 border: Border color (default is 0xFFFFFF (white))
2120 \begin_layout Itemize
2121 fill: Fill color (default is -1 (transparent)).
2124 \begin_layout Subsubsection
2128 \begin_layout Standard
2129 Request on_repaint() to happen as soon as possible.
2130 Can be used anywhere.
2133 \begin_layout Subsubsection
2134 gui.subframe_update(boolean on)
2137 \begin_layout Standard
2138 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2139 or not happen (on=false).
2140 Can be used anywhere.
2143 \begin_layout Subsubsection
2144 gui.screenshot(string filename)
2147 \begin_layout Standard
2148 Write PNG screenshot of the current frame (no drawings) to specified file.
2149 Can be used anywhere.
2152 \begin_layout Subsubsection
2153 gui.color(number r, number g, number b[, number a])
2156 \begin_layout Standard
2157 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2158 each component in scale 0-255.
2159 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2161 The default alpha is 256.
2164 \begin_layout Subsubsection
2165 gui.status(string name, string value)
2168 \begin_layout Standard
2170 \begin_inset Quotes eld
2174 \begin_inset Quotes erd
2177 to <value> in status area.
2178 Can be used anywhere.
2181 \begin_layout Subsection
2185 \begin_layout Standard
2187 Only available in on_input callback.
2190 \begin_layout Subsubsection
2191 input.get(number controller, number index)
2194 \begin_layout Standard
2195 Read the specified index (0-11) from specified controller (0-7).
2199 \begin_layout Itemize
2200 Uses physical controller numbering.
2201 Gamepad in port 2 is controller 4, not 1!
2204 \begin_layout Subsubsection
2205 input.set(number controller, number index, number value)
2208 \begin_layout Standard
2209 Write the specified index (0-11) from specified controller (0-7), storing
2214 \begin_layout Itemize
2215 Uses physical controller numbering.
2216 Gamepad in port 2 is controller 4, not 1!
2219 \begin_layout Subsubsection
2220 input.reset([number cycles])
2223 \begin_layout Standard
2225 If cycles is greater than zero, do delayed reset.
2226 0 (or no value) causes immediate reset.
2229 \begin_layout Itemize
2230 Only available with subframe flag false.
2233 \begin_layout Subsection
2237 \begin_layout Standard
2238 Host memory handling (extra memory saved to savestates).
2239 Host memory starts empty.
2242 \begin_layout Subsubsection
2243 hostmemory.read(number address)
2246 \begin_layout Standard
2247 Reads hostmemory slot address.
2248 Slot numbers out of range return false instead of numeric.
2251 \begin_layout Subsubsection
2252 hostmemory.write(number address, number value)
2255 \begin_layout Standard
2256 Writes hostmemory slot with 0-255.
2257 Slot numbers out of range cause extension of host memory slot space.
2260 \begin_layout Subsubsection
2261 hostmemory.readbyte(number address)
2264 \begin_layout Standard
2265 Read unsigned byte (1 element) from given address.
2266 Slots out of range return false.
2269 \begin_layout Subsubsection
2270 hostmemory.writebyte(number address, number value)
2273 \begin_layout Standard
2274 Write unsigned byte (1 element) to given slot.
2275 Slot numbers out of range cause extension.
2278 \begin_layout Subsubsection
2279 hostmemory.readsbyte(number address)
2282 \begin_layout Standard
2283 Read signed byte (1 element) from given address.
2284 Slots out of range return false.
2287 \begin_layout Subsubsection
2288 hostmemory.writesbyte(number address, number value)
2291 \begin_layout Standard
2292 Write signed byte (1 element) to given slot.
2293 Slot numbers out of range cause extension.
2296 \begin_layout Subsubsection
2297 hostmemory.readword(number address)
2300 \begin_layout Standard
2301 Read unsigned word (2 elements) from given address.
2302 Slots out of range return false.
2305 \begin_layout Subsubsection
2306 hostmemory.writeword(number address, number value)
2309 \begin_layout Standard
2310 Write unsigned word (2 elements) to given slot.
2311 Slot numbers out of range cause extension.
2314 \begin_layout Subsubsection
2315 hostmemory.readsword(number address)
2318 \begin_layout Standard
2319 Read signed word (2 elements) from given address.
2320 Slots out of range return false.
2323 \begin_layout Subsubsection
2324 hostmemory.writesword(number address, number value)
2327 \begin_layout Standard
2328 Write signed word (2 elements) to given slot.
2329 Slot numbers out of range cause extension.
2332 \begin_layout Subsubsection
2333 hostmemory.readdword(number address)
2336 \begin_layout Standard
2337 Read unsigned doubleword (4 elements) from given address.
2338 Slots out of range return false.
2341 \begin_layout Subsubsection
2342 hostmemory.writedword(number address, number value)
2345 \begin_layout Standard
2346 Write unsigned doubleword (4 elements) to given slot.
2347 Slot numbers out of range cause extension.
2350 \begin_layout Subsubsection
2351 hostmemory.readsdword(number address)
2354 \begin_layout Standard
2355 Read signed doubleword (4 elements) from given address.
2356 Slots out of range return false.
2359 \begin_layout Subsubsection
2360 hostmemory.writesdword(number address, number value)
2363 \begin_layout Standard
2364 Write signed doubleword (4 elements) to given slot.
2365 Slot numbers out of range cause extension.
2368 \begin_layout Subsubsection
2369 hostmemory.readqword(number address)
2372 \begin_layout Standard
2373 Read unsigned quadword (8 elements) from given address.
2374 Slots out of range return false.
2377 \begin_layout Subsubsection
2378 hostmemory.writeqword(number address, number value)
2381 \begin_layout Standard
2382 Write unsigned quadword (4 elements) to given slot.
2383 Slot numbers out of range cause extension.
2386 \begin_layout Subsubsection
2387 hostmemory.readsqword(number address)
2390 \begin_layout Standard
2391 Read signed quadword (8 elements) from given address.
2392 Slots out of range return false.
2395 \begin_layout Subsubsection
2396 hostmemory.writesqword(number address, number value)
2399 \begin_layout Standard
2400 Write signed quadword (8 elements) to given slot.
2401 Slot numbers out of range cause extension.
2404 \begin_layout Subsection
2408 \begin_layout Standard
2412 \begin_layout Subsubsection
2413 movie.currentframe()
2416 \begin_layout Standard
2417 Return number of current frame.
2420 \begin_layout Subsubsection
2424 \begin_layout Standard
2425 Return number of frames in movie.
2428 \begin_layout Subsubsection
2432 \begin_layout Standard
2433 Return true if in readonly mode, false if in readwrite.
2436 \begin_layout Subsubsection
2437 movie.set_readwrite()
2440 \begin_layout Standard
2441 Set readwrite mode (does not cause on_readwrite callback).
2444 \begin_layout Subsubsection
2445 movie.frame_subframes(number frame)
2448 \begin_layout Standard
2449 Count number of subframes in specified frame (frame numbers are 1-based)
2453 \begin_layout Subsubsection
2454 movie.read_subframe(number frame, number subframe)
2457 \begin_layout Standard
2458 Read specifed subframe in specified frame and return data as array (100
2459 elements, numbered 0-99 currently).
2462 \begin_layout Subsection
2466 \begin_layout Standard
2467 Routines for settings manipulation
2470 \begin_layout Subsubsection
2471 settings.get(string name)
2474 \begin_layout Standard
2475 Get value of setting.
2476 If setting is blank, returns false.
2477 If setting value can't be obtained, returns (nil, error message).
2480 \begin_layout Subsubsection
2481 settings.set(string name, string value)
2484 \begin_layout Standard
2485 Set value of setting.
2486 If setting can't be set, returns (nil, error message).
2489 \begin_layout Subsubsection
2490 settings.is_set(string name)
2493 \begin_layout Standard
2494 Returns if setting is set.
2495 If setting does not exist, returns (nil, error message).
2498 \begin_layout Subsubsection
2499 settings.blank(string name)
2502 \begin_layout Standard
2503 Blanks a setting and returns true.
2504 If setting can't be blanked, returns (nil, error message).
2507 \begin_layout Subsection
2511 \begin_layout Standard
2512 Contains various functions for managing memory
2515 \begin_layout Subsubsection
2519 \begin_layout Standard
2520 Returns the number of VMAs
2523 \begin_layout Subsubsection
2524 memory.read_vma(number index)
2527 \begin_layout Standard
2528 Reads the specified VMA (indices start from zero).
2529 Trying to read invalid VMA gives nil.
2530 The read VMA is table with the following fields:
2533 \begin_layout Itemize
2534 region_name (string): The readable name of the VMA
2537 \begin_layout Itemize
2538 baseaddr (number): Base address of the VMA
2541 \begin_layout Itemize
2542 lastaddr (number): Last address in the VMA.
2545 \begin_layout Itemize
2546 size (number): The size of VMA in bytes.
2549 \begin_layout Itemize
2550 readonly (boolean): True of the VMA corresponds to ROM.
2553 \begin_layout Itemize
2554 native_endian (boolean): True if the VMA has native endian as opposed to
2558 \begin_layout Subsubsection
2559 memory.find_vma(number address)
2562 \begin_layout Standard
2563 Finds the VMA containing specified address.
2564 Returns table in the same format as read_vma or nil if not found.
2567 \begin_layout Subsubsection
2568 memory.readbyte(number address)
2571 \begin_layout Standard
2572 Reads the specified address as unsigned byte and returns the result.
2575 \begin_layout Subsubsection
2576 memory.readsbyte(number address)
2579 \begin_layout Standard
2580 Reads the specified address as signed byte and returns the result.
2583 \begin_layout Subsubsection
2584 memory.writebyte(number address, number value)
2587 \begin_layout Standard
2588 Writes the specified value (negative values undergo 2's complement) to specified
2589 address (as a byte).
2592 \begin_layout Subsubsection
2593 memory.readword(number address)
2596 \begin_layout Standard
2597 Reads the specified address as unsigned word and returns the result.
2600 \begin_layout Subsubsection
2601 memory.readsword(number address)
2604 \begin_layout Standard
2605 Reads the specified address as signed word and returns the result.
2608 \begin_layout Subsubsection
2609 memory.writeword(number address, number value)
2612 \begin_layout Standard
2613 Writes the specified value (negative values undergo 2's complement) to specified
2614 address (as a word).
2617 \begin_layout Subsubsection
2618 memory.readdword(number address)
2621 \begin_layout Standard
2622 Reads the specified address as unsigned doubleword and returns the result.
2625 \begin_layout Subsubsection
2626 memory.readsdword(number address)
2629 \begin_layout Standard
2630 Reads the specified address as signed doubleword and returns the result.
2633 \begin_layout Subsubsection
2634 memory.writedword(number address, number value)
2637 \begin_layout Standard
2638 Writes the specified value (negative values undergo 2's complement) to specified
2639 address (as a doubleword).
2642 \begin_layout Subsubsection
2643 memory.readqword(number address)
2646 \begin_layout Standard
2647 Reads the specified address as unsigned quadword and returns the result.
2650 \begin_layout Subsubsection
2651 memory.readsqword(number address)
2654 \begin_layout Standard
2655 Reads the specified address as signed quadword and returns the result.
2658 \begin_layout Subsubsection
2659 memory.writeqword(number address, number value)
2662 \begin_layout Standard
2663 Writes the specified value (negative values undergo 2's complement) to specified
2664 address (as a quadword).
2667 \begin_layout Subsection
2671 \begin_layout Standard
2672 Contains copy of global variables from time of Lua initialization.
2676 \begin_layout Subsection
2680 \begin_layout Standard
2681 Various callbacks to Lua that can occur.
2684 \begin_layout Subsubsection
2685 Callback: on_paint()
2688 \begin_layout Standard
2689 Called when screen is being painted.
2690 Any gui.* calls requiring graphic context draw on the screen.
2693 \begin_layout Subsubsection
2694 Callback: on_video()
2697 \begin_layout Standard
2698 Called when video dump frame is being painted.
2699 Any gui.* calls requiring graphic context draw on the video.
2702 \begin_layout Subsubsection
2703 Callback: on_frame()
2706 \begin_layout Standard
2707 Called on each starting whole frame.
2710 \begin_layout Subsubsection
2711 Callback: on_startup()
2714 \begin_layout Standard
2715 Called when the emulator is starting (lsnes.rc and --run files has been run).
2718 \begin_layout Subsubsection
2719 Callback: on_pre_load(string name)
2722 \begin_layout Standard
2723 Called just before savestate/movie load occurs (note: loads are always delayed,
2724 so this occurs even when load was initiated by lua).
2727 \begin_layout Subsubsection
2728 Callback: on_err_load(string name)
2731 \begin_layout Standard
2732 Called if loadstate goes wrong.
2735 \begin_layout Subsubsection
2736 Callback: on_post_load(string name, boolean was_savestate)
2739 \begin_layout Standard
2740 Called on successful loadstate.
2741 was_savestate gives if this was a savestate or a movie.
2744 \begin_layout Subsubsection
2745 Callback: on_pre_save(string name, boolean is_savestate)
2748 \begin_layout Standard
2749 Called just before savestate save occurs (note: movie saves are synchronous
2750 and won't trigger these callbacks if called from Lua).
2753 \begin_layout Subsubsection
2754 Callback: on_err_save(string name)
2757 \begin_layout Standard
2758 Called if savestate goes wrong.
2761 \begin_layout Subsubsection
2762 Callback: on_post_save(string name, boolean is_savestate)
2765 \begin_layout Standard
2766 Called on successful savaestate.
2767 is_savestate gives if this was a savestate or a movie.
2770 \begin_layout Subsubsection
2774 \begin_layout Standard
2775 Called when emulator is shutting down.
2778 \begin_layout Subsubsection
2779 Callback: on_input(boolean subframe)
2782 \begin_layout Standard
2783 Called when emulator is just sending input to bsnes core.
2784 Warning: This is called even in readonly mode, but the results are ignored.
2787 \begin_layout Subsubsection
2788 Callback: on_reset()
2791 \begin_layout Standard
2792 Called when SNES is reset.
2795 \begin_layout Subsubsection
2796 Callback: on_readwrite()
2799 \begin_layout Standard
2800 Called when moving into readwrite mode as result of
2801 \begin_inset Quotes eld
2805 \begin_inset Quotes erd
2808 command (note: moving to rwmode by Lua won't trigger this, as per recursive
2812 \begin_layout Subsubsection
2813 Callback: on_snoop(number port, number controller, number index, number
2817 \begin_layout Standard
2818 Called each time bsnes asks for input.
2819 The value is the final value to be sent to bsnes core (readonly mode, autohold
2820 and autofire have been taken into account).
2821 Might be useful when translating movies to format suitable for console
2823 Note: There is no way to modify the value to be sent.
2826 \begin_layout Section
2827 Modifier and key names:
2830 \begin_layout Subsection
2834 \begin_layout Subsubsection
2838 \begin_layout Standard
2839 Following modifier names are known:
2842 \begin_layout Itemize
2843 ctrl, lctrl, rctrl: Control keys
2846 \begin_layout Itemize
2847 alt, lalt, ralt: ALT keys.
2850 \begin_layout Itemize
2851 shift, lshift, rshift: Shift keys.
2854 \begin_layout Itemize
2855 meta, lmeta, rmeta: Meta keys.
2858 \begin_layout Itemize
2859 num, caps: Numlock/Capslock (these are sticky!)
2862 \begin_layout Itemize
2866 \begin_layout Subsubsection
2870 \begin_layout Standard
2871 Following key names are known:
2874 \begin_layout Itemize
2875 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
2876 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
2877 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
2878 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
2879 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
2880 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
2881 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
2882 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
2883 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
2884 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
2885 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
2886 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
2887 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
2888 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
2889 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
2890 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
2891 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
2892 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
2893 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
2894 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
2895 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
2896 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
2897 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
2898 break, menu, power, euro, undo
2901 \begin_layout Itemize
2902 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
2903 hardware-dependent scan code of <n> (useful to bind those keys that don't
2904 have symbolic names).
2907 \begin_layout Standard
2908 In addition, following pseudo-keys are known (note: these do not work in
2909 conjunction with modifers):
2912 \begin_layout Itemize
2913 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
2916 \begin_layout Itemize
2917 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
2920 \begin_layout Itemize
2921 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
2924 \begin_layout Itemize
2925 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
2928 \begin_layout Itemize
2929 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
2932 \begin_layout Itemize
2933 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
2934 position (axis modes axis and axis_inverse).
2937 \begin_layout Itemize
2938 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
2939 position (axis modes axis and axis_inverse).
2942 \begin_layout Itemize
2943 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
2947 \begin_layout Subsubsection
2951 \begin_layout Itemize
2952 Escape: Enter/Exit Command mode, cancel modal dialogs.
2955 \begin_layout Itemize
2956 Return (also KPEnter): Execute command, ok modal dialog.
2959 \begin_layout Itemize
2960 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
2964 \begin_layout Itemize
2965 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
2969 \begin_layout Itemize
2970 Home (also KP7 if no num lock; command mode): Beginning of command.
2973 \begin_layout Itemize
2974 End (also KP1 if no num lock; command mode): End of command.
2977 \begin_layout Itemize
2978 Left (also KP4 if no num lock; command mode): Move cursor left.
2981 \begin_layout Itemize
2982 Right (also KP6 if no num lock; command mode): Move cursor right.
2985 \begin_layout Itemize
2987 if no num lock; command mode): Delete character to right of cursor.
2990 \begin_layout Itemize
2991 Insert (also KP0 if no num lock; command mode): Toggle between insert /
2995 \begin_layout Itemize
2996 Backspace (command mode): Delete character to left of cursor.
2999 \begin_layout Itemize
3000 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3003 \begin_layout Subsubsection
3007 \begin_layout Standard
3008 If emulator does not reach internal polling loop in 15 seconds after leaving
3009 it or 15 seconds after starting, the emulator instantly bombs out.
3012 \begin_layout Section
3016 \begin_layout Standard
3017 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3018 (note: If you recompress it, do not use compression methods other than
3019 store and deflate and especially do not use encryption of any kind).
3022 \begin_layout Subsection
3023 Detecting clean start/SRAM/Savestate
3026 \begin_layout Itemize
3028 \begin_inset Quotes eld
3032 \begin_inset Quotes erd
3035 it is savestate, otherwise:
3038 \begin_layout Itemize
3039 If file has members with names starting
3040 \begin_inset Quotes eld
3044 \begin_inset Quotes erd
3047 it is movie starting from SRAM, otherwise:
3050 \begin_layout Itemize
3051 It is movie starting from clear state.
3054 \begin_layout Subsection
3058 \begin_layout Standard
3059 Type of game ROM and region (as one line).
3063 \begin_layout Standard
3064 \begin_inset Tabular
3065 <lyxtabular version="3" rows="8" columns="3">
3066 <features tabularvalignment="middle">
3067 <column alignment="center" valignment="top" width="0">
3068 <column alignment="center" valignment="top" width="0">
3069 <column alignment="center" valignment="top" width="0">
3071 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3074 \begin_layout Plain Layout
3080 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3083 \begin_layout Plain Layout
3089 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3092 \begin_layout Plain Layout
3100 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3103 \begin_layout Plain Layout
3109 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3112 \begin_layout Plain Layout
3118 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3121 \begin_layout Plain Layout
3129 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3132 \begin_layout Plain Layout
3138 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3141 \begin_layout Plain Layout
3147 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3150 \begin_layout Plain Layout
3158 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3161 \begin_layout Plain Layout
3167 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3170 \begin_layout Plain Layout
3176 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3179 \begin_layout Plain Layout
3187 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3190 \begin_layout Plain Layout
3196 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3199 \begin_layout Plain Layout
3205 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3208 \begin_layout Plain Layout
3216 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3219 \begin_layout Plain Layout
3225 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3228 \begin_layout Plain Layout
3234 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3237 \begin_layout Plain Layout
3245 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3248 \begin_layout Plain Layout
3254 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3257 \begin_layout Plain Layout
3263 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3266 \begin_layout Plain Layout
3274 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3277 \begin_layout Plain Layout
3283 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3286 \begin_layout Plain Layout
3292 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3295 \begin_layout Plain Layout
3309 \begin_layout Standard
3313 \begin_layout Standard
3314 \begin_inset Tabular
3315 <lyxtabular version="3" rows="3" columns="2">
3316 <features tabularvalignment="middle">
3317 <column alignment="center" valignment="top" width="0">
3318 <column alignment="center" valignment="top" width="0">
3320 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3323 \begin_layout Plain Layout
3329 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3332 \begin_layout Plain Layout
3340 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3343 \begin_layout Plain Layout
3349 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3352 \begin_layout Plain Layout
3360 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3363 \begin_layout Plain Layout
3369 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3372 \begin_layout Plain Layout
3386 \begin_layout Subsection
3390 \begin_layout Standard
3391 Contains type of port #1 (as one line).
3392 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3393 If not present, defaults to 'gamepad'.
3396 \begin_layout Subsection
3400 \begin_layout Standard
3401 Contains type of port #2 (as one line).
3402 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3403 'justifier' and 'justifiers'.
3404 If not present, defaults to 'none'.
3407 \begin_layout Subsection
3411 \begin_layout Standard
3412 Contains name of the game (as one line).
3415 \begin_layout Subsection
3419 \begin_layout Standard
3420 Contains authors, one per line.
3421 Part before '|' is the full name, part after is the nickname.
3424 \begin_layout Subsection
3428 \begin_layout Standard
3430 \begin_inset Quotes eld
3434 \begin_inset Quotes erd
3438 Used to reject other saves.
3441 \begin_layout Subsection
3442 Member: controlsversion
3445 \begin_layout Standard
3447 \begin_inset Quotes eld
3451 \begin_inset Quotes erd
3455 Used to identify what controls are there.
3458 \begin_layout Subsection
3460 \begin_inset Quotes eld
3464 \begin_inset Quotes erd
3470 \begin_layout Standard
3471 Contains bsnes core version number (as one line).
3474 \begin_layout Subsection
3478 \begin_layout Standard
3479 Contains project ID (as one line).
3480 Used to identify if two movies are part of the same project.
3483 \begin_layout Subsection
3484 Member: {rom,slota,slotb}{,xml}.sha256
3487 \begin_layout Standard
3488 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3489 Absent if corresponding file is absent.
3492 \begin_layout Subsection
3493 Member: moviesram.<name>
3496 \begin_layout Standard
3497 Raw binary startup SRAM of kind <name>.
3498 Only present in savestates and movies starting from SRAM.
3501 \begin_layout Subsection
3505 \begin_layout Standard
3506 Contains frame number (as one line) of frame movie was saved on.
3507 Only present in savestates.
3510 \begin_layout Subsection
3514 \begin_layout Standard
3515 Current value of lag counter (as one line).
3516 Only present in savestates.
3519 \begin_layout Subsection
3520 Member: pollcounters
3523 \begin_layout Standard
3524 Contains poll counters (currently 100 of them), one per line.
3525 Each line is raw poll count if DRDY is set for it.
3526 Otherwise it is negative poll count minus one.
3527 Only present in savestates.
3530 \begin_layout Subsection
3534 \begin_layout Standard
3535 Raw binary dump of host memory.
3536 Only present in savestates.
3539 \begin_layout Subsection
3543 \begin_layout Standard
3544 The raw binary savestate itself.
3545 Savestate detection uses this file, only present in savestates.
3548 \begin_layout Subsection
3552 \begin_layout Standard
3553 Screenshot of current frame.
3554 Only present in savestates.
3555 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3557 Height of image is inferred from the width and size of data.
3560 \begin_layout Subsection
3564 \begin_layout Standard
3565 Raw binary SRAM of kind <name> at time of savestate.
3566 Only present in savestates.
3569 \begin_layout Subsection
3573 \begin_layout Standard
3574 The actual input track, one line per subframe (blank lines are skipped).
3577 \begin_layout Itemize
3578 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3579 part of same frame as previous, otherwise it starts a new frame.
3582 \begin_layout Itemize
3583 First subframe must start a new frame.
3586 \begin_layout Standard
3587 Length of movie in frames is number of lines in input file that start a
3591 \begin_layout Subsection
3595 \begin_layout Standard
3596 Contains textual base-10 rerecord count (as one line; emulator just writes
3597 this, it doesn't read it) + 1.
3600 \begin_layout Subsection
3604 \begin_layout Standard
3605 This member stores set of load IDs.
3606 There is one load ID per rerecord (plus one corresponding to start of project).
3609 \begin_layout Itemize
3610 This member constists of concatenation of records
3613 \begin_layout Itemize
3614 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3618 \begin_layout Itemize
3619 IDs are interpretted as 256-bit big-endian integers with warparound.
3622 \begin_layout Itemize
3623 Initial predicted ID is all zeroes.
3626 \begin_layout Standard
3627 Format of each record is:
3630 \begin_layout Itemize
3631 1 byte: Opcode byte.
3632 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3636 \begin_layout Itemize
3637 32-prefixlen bytes of ID.
3640 \begin_layout Itemize
3641 countlen bytes of big-endian count (count).
3644 \begin_layout Standard
3645 Records are processed as follows:
3648 \begin_layout Itemize
3649 To form the first ID encoded by record, take the first prefixlen bytes predicted
3650 ID and append the read ID value to it.
3651 The result is the first ID encoded.
3654 \begin_layout Itemize
3655 If countlen is 0, record encodes 1 ID.
3658 \begin_layout Itemize
3659 If countlen is 1, record encodes 2+count IDs.
3662 \begin_layout Itemize
3663 If countlen is 2, record encodes 258+count IDs.
3666 \begin_layout Itemize
3667 If countlen is 3, record encodes 65794+count IDs.
3670 \begin_layout Itemize
3671 The new predicted ID is the next ID after last one encoded by the record.
3674 \begin_layout Standard
3675 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3679 \begin_layout Subsection
3680 Member: starttime.second
3683 \begin_layout Standard
3684 Movie starting time, second part.
3685 Epoch is Unix epoch.
3686 Default is 1,000,000,000.
3689 \begin_layout Subsection
3690 Member: starttime.subsecond
3693 \begin_layout Standard
3694 Movie starting time, subsecond part.
3699 \begin_layout Subsection
3700 Member: savetime.second
3703 \begin_layout Standard
3704 Movie saving time, second part.
3705 Default is starttime.second.
3706 Only present in savestates.
3709 \begin_layout Subsection
3710 Member: savetime.subsecond
3713 \begin_layout Standard
3714 Movie saving time, subsecond part.
3715 Default is starttime.subsecond.
3716 Only present in savestates.
3719 \begin_layout Section
3723 \begin_layout Subsection
3727 \begin_layout Standard
3728 make ui=ui-libsnes profile=accuracy
3731 \begin_layout Standard
3732 For Bsnes v084 You need to apply the six patches in bsnes-patches/.
3733 These fix the following:
3736 \begin_layout Enumerate
3737 Make libsnes actually compile (it won't compile without!)
3740 \begin_layout Enumerate
3741 Bump the version number to be correct (nice to have)
3744 \begin_layout Enumerate
3745 Make RTC emulation time cleanly overridable (needed by games using RTC)
3748 \begin_layout Enumerate
3749 Save/Load controller state on savestate/loadstate (many games screw up without)
3752 \begin_layout Enumerate
3753 Fix unserialization of 64-bit integers (needed)
3756 \begin_layout Enumerate
3757 Allow frontend to control random number seed (just nice to have)
3760 \begin_layout Subsection
3761 Prerequisite libraries:
3764 \begin_layout Itemize
3768 \begin_layout Itemize
3772 \begin_layout Itemize
3773 SDLmain (Windows/Mac OS X only; Note you may have to extract the object
3777 \begin_layout Itemize
3781 \begin_layout Itemize
3785 \begin_layout Itemize
3786 boost conversion (header only)
3789 \begin_layout Subsection
3790 Compile options to make:
3793 \begin_layout Subsubsection
3797 \begin_layout Standard
3798 Set path to BSNES bsnes directory to <path>.
3801 \begin_layout Subsubsection
3805 \begin_layout Standard
3806 Don't use threads on Linux.
3809 \begin_layout Subsubsection
3813 \begin_layout Standard
3814 Try to use threads even on non-Linux systems.
3817 \begin_layout Subsubsection
3818 CROSS_PREFIX=<prefix>
3821 \begin_layout Standard
3822 Prepend this to all commands refering to cross-compiling environment with
3826 \begin_layout Subsubsection
3830 \begin_layout Standard
3831 Target C++ compiler to use.
3835 \begin_layout Standard
3836 Note: If crosscompiling, this has to be crosscompiler, and CROSS_PREFIX
3840 \begin_layout Subsubsection
3844 \begin_layout Standard
3845 Assume BSNES uses compatiblity core instead of accuracy core.
3848 \begin_layout Subsubsection
3852 \begin_layout Standard
3853 Compile lua support, using package <package>
3856 \begin_layout Subsubsection
3860 \begin_layout Standard
3861 Set graphics platform.
3862 Currently available choices are
3863 \begin_inset Quotes eld
3867 \begin_inset Quotes erd
3871 \begin_inset Quotes eld
3875 \begin_inset Quotes erd
3881 \begin_layout Subsubsection
3885 \begin_layout Standard
3887 Currently available choices are
3888 \begin_inset Quotes eld
3892 \begin_inset Quotes erd
3895 (requires SDL graphics),
3896 \begin_inset Quotes eld
3900 \begin_inset Quotes erd
3904 \begin_inset Quotes eld
3908 \begin_inset Quotes erd
3914 \begin_layout Subsubsection
3918 \begin_layout Standard
3919 Set joystick platform.
3920 Currently available choices are
3921 \begin_inset Quotes eld
3925 \begin_inset Quotes erd
3928 (requires SDL graphics),
3929 \begin_inset Quotes eld
3933 \begin_inset Quotes erd
3937 \begin_inset Quotes eld
3941 \begin_inset Quotes erd
3947 \begin_layout Section
3948 Quick'n'dirty encode guide
3951 \begin_layout Enumerate
3952 Start the emulator and load the movie file.
3955 \begin_layout Enumerate
3956 Set large AVI option 'set-setting avi-large on'
3959 \begin_layout Enumerate
3960 Enable dumping 'dump-avi tmpdump'
3963 \begin_layout Enumerate
3964 Unpause and let it run until you want to end dumping.
3967 \begin_layout Enumerate
3968 Close the emulator (closing the window is the easiest way).
3972 \begin_layout Enumerate
3973 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
3974 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
3977 \begin_layout Enumerate
3978 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
3981 \begin_layout Enumerate
3982 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
3983 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
3986 \begin_layout Enumerate
3987 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
3988 Now final.mkv contains quick'n'dirty encode.
3991 \begin_layout Section
3992 Axis configurations for some gamepad types:
3995 \begin_layout Subsection
3999 \begin_layout Standard
4000 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4003 \begin_layout LyX-Code
4004 set-axis joystick0axis2 pressure-+
4007 \begin_layout LyX-Code
4008 set-axis joystick0axis5 pressure-+
4011 \begin_layout Subsection
4013 \begin_inset Quotes eld
4017 \begin_inset Quotes erd
4023 \begin_layout Standard
4024 Axes 8-19 should be disabled.
4027 \begin_layout LyX-Code
4028 set-axis joystick0axis8 disabled
4031 \begin_layout LyX-Code
4032 set-axis joystick0axis9 disabled
4035 \begin_layout LyX-Code
4036 set-axis joystick0axis10 disabled
4039 \begin_layout LyX-Code
4040 set-axis joystick0axis11 disabled
4043 \begin_layout LyX-Code
4044 set-axis joystick0axis12 disabled
4047 \begin_layout LyX-Code
4048 set-axis joystick0axis13 disabled
4051 \begin_layout LyX-Code
4052 set-axis joystick0axis14 disabled
4055 \begin_layout LyX-Code
4056 set-axis joystick0axis15 disabled
4059 \begin_layout LyX-Code
4060 set-axis joystick0axis16 disabled
4063 \begin_layout LyX-Code
4064 set-axis joystick0axis17 disabled
4067 \begin_layout LyX-Code
4068 set-axis joystick0axis18 disabled
4071 \begin_layout LyX-Code
4072 set-axis joystick0axis19 disabled
4075 \begin_layout Section
4079 \begin_layout Subsection
4080 Problems from BSNES core:
4083 \begin_layout Itemize
4084 The whole pending save stuff.
4087 \begin_layout Itemize
4088 Lack of layer hiding.
4091 \begin_layout Itemize
4095 \begin_layout Itemize
4096 Firmwares can't be loaded from ZIP archives.
4099 \begin_layout Subsection
4103 \begin_layout Itemize
4104 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4107 \begin_layout Itemize
4108 Audio for last dumped frame is not itself dumped.
4111 \begin_layout Itemize
4112 Audio in UI is pretty bad in quality.
4115 \begin_layout Itemize
4116 UI itself is 30fps max (SDL).
4119 \begin_layout Itemize
4120 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4123 \begin_layout Itemize
4124 No menus, command based interface (SDL).
4127 \begin_layout Itemize
4128 Long commands don't scroll.
4131 \begin_layout Itemize
4132 The SDL screen drawing is slow.
4135 \begin_layout Itemize
4136 Wxwidgets UI slows down with time.
4139 \begin_layout Itemize
4140 Movies use way too much (like at least 10x what would be needed) memory.
4143 \begin_layout Section
4147 \begin_layout Subsection
4151 \begin_layout Itemize
4155 \begin_layout Itemize
4156 Fix dumper video corruption with levels 10-18.
4159 \begin_layout Subsection
4163 \begin_layout Itemize
4167 \begin_layout Itemize
4168 Lots of code cleanups
4171 \begin_layout Itemize
4172 Lua interface to settings
4175 \begin_layout Itemize
4176 Allow specifying AVI borders without Lua
4179 \begin_layout Itemize
4180 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4183 \begin_layout Itemize
4184 on_snoop lua callback
4187 \begin_layout Itemize
4188 Faster movie loading and saving.
4191 \begin_layout Subsection
4195 \begin_layout Itemize
4199 \begin_layout Subsection
4203 \begin_layout Itemize
4207 \begin_layout Itemize
4208 Save jukebox functionality.
4211 \begin_layout Subsection
4215 \begin_layout Itemize
4216 Try to fix some nasty failing movie load edge cases
4219 \begin_layout Itemize
4220 Allow specifying scripts to run on command line.
4223 \begin_layout Subsection
4227 \begin_layout Itemize
4228 Major source code reorganization.
4231 \begin_layout Itemize
4232 Backup savestates before overwriting.
4235 \begin_layout Itemize
4236 Don't crash if loading initial state fails.
4239 \begin_layout Subsection
4243 \begin_layout Itemize
4247 \begin_layout Itemize
4248 Fix author name parsing
4251 \begin_layout Itemize
4252 Fix rerecord counting
4255 \begin_layout Itemize
4256 (SDL) Print messages to console if SDL is uninitialized
4259 \begin_layout Itemize
4260 Add movieinfo program
4263 \begin_layout Itemize
4264 Fix loading movies starting from SRAM.
4267 \begin_layout Subsection
4271 \begin_layout Itemize
4272 Add support for unattended dumping
4275 \begin_layout Itemize
4276 Fix compiling for Win32
4279 \begin_layout Itemize
4280 Don't lock up if sound can't be initialized
4283 \begin_layout Itemize
4284 Strip trailing CR from commands
4287 \begin_layout Itemize
4288 Don't try to do dubious things in global ctors (fix crash on startup)
4291 \begin_layout Subsection
4295 \begin_layout Itemize
4296 Small documentation tweaking
4299 \begin_layout Itemize
4303 \begin_layout Itemize
4304 Fix major bug in modifier matching
4307 \begin_layout Subsection
4311 \begin_layout Itemize
4312 Lots of documentation fixes
4315 \begin_layout Itemize
4316 Use dedicated callbacks for event backcomm., not commands.
4319 \begin_layout Itemize
4320 Ensure that the watchdog is not hit when executing delayed reset.
4323 \begin_layout Itemize
4324 Remove errant tab from joystick message.
4327 \begin_layout Subsection
4331 \begin_layout Itemize
4332 Make autofire operate in absolute time, not linear time
4335 \begin_layout Itemize
4336 Reinitialize controls when resuming from loadstate
4339 \begin_layout Itemize
4340 Some more code cleanups
4343 \begin_layout Itemize
4344 If Lua allocator fails, call OOM_panic()
4347 \begin_layout Itemize
4348 Byte/word/dword/qword sized host memory write/read functions.
4351 \begin_layout Itemize
4352 Dump at correct framerate if dumping interlaced NTSC (height=448).
4355 \begin_layout Subsection
4359 \begin_layout Itemize
4360 Actually include the complete source code
4363 \begin_layout Itemize
4367 \begin_layout Subsection
4371 \begin_layout Itemize
4372 Document {save,start}time.{,sub}second.
4375 \begin_layout Itemize
4376 Intercept time() from bsnes core.
4379 \begin_layout Subsection
4383 \begin_layout Itemize
4384 Allow disabling time() interception (allow build on Mac OS X)
4387 \begin_layout Itemize
4388 Use SDLMain on Mac OS X (make SDL not crash)
4391 \begin_layout Itemize
4392 Disable delayed resets (just plain too buggy for now).
4395 \begin_layout Itemize
4399 \begin_layout Itemize
4400 Use 16-bit for graphics/video instead of 32-bit.
4403 \begin_layout Itemize
4404 gui.rectangle/gui.pixel
4407 \begin_layout Itemize
4411 \begin_layout Itemize
4412 New CSCD writer implementation.
4415 \begin_layout Subsection
4419 \begin_layout Itemize
4420 Fix interaction of * and +.
4423 \begin_layout Itemize
4427 \begin_layout Itemize
4428 Use gettimeofday()/usleep(), these seem portable enough.
4431 \begin_layout Itemize
4432 Move joystick axis manipulation to keymapper code.
4435 \begin_layout Itemize
4436 Changes to how read-only works.
4439 \begin_layout Itemize
4440 Refactor controller input code.
4443 \begin_layout Subsection
4447 \begin_layout Itemize
4448 Fix mouseclick scale compensation.
4451 \begin_layout Itemize
4452 Draw area boundaries correctly in SDL code.
4455 \begin_layout Itemize
4459 \begin_layout Itemize
4460 Fix CSCD output (buffer overrun and race condition).
4463 \begin_layout Subsection
4467 \begin_layout Itemize
4468 JMD dumping support.
4471 \begin_layout Itemize
4472 Allow unattended dumping to JMD.
4475 \begin_layout Itemize
4479 \begin_layout Itemize
4480 Switch back to 32-bit colors.
4483 \begin_layout Itemize
4484 Add Lua function gui.color.
4487 \begin_layout Itemize
4488 Use some new C++11 features in GCC 4.6.
4491 \begin_layout Itemize
4492 Be prepared for core frequency changes.
4495 \begin_layout Itemize
4496 Pass colors in one chunk from Lua.
4499 \begin_layout Subsection
4503 \begin_layout Itemize
4504 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4505 memory.read_vma() and memory.find_vma().
4508 \begin_layout Itemize
4509 Numerious documentation fixups
4512 \begin_layout Itemize
4513 RTC time format changed
4516 \begin_layout Itemize
4517 Reformat flags display
4520 \begin_layout Itemize
4521 Allow lua package name to be overridden
4524 \begin_layout Itemize
4525 SDUMP (high-quality dumping).
4528 \begin_layout Itemize
4529 Split platform support to plugins.
4532 \begin_layout Itemize
4533 Make all sound plugins support basic sound commands
4536 \begin_layout Itemize
4537 Support portaudio for sound.
4540 \begin_layout Itemize
4541 Allow disable Lua/SDL searching.
4544 \begin_layout Itemize
4545 Upconvert colors when copying lcscreen to screen.
4548 \begin_layout Itemize
4549 Reorganize source tree.
4552 \begin_layout Itemize
4553 Evdev joystick support.
4556 \begin_layout Itemize
4557 Refactor more code into generic window code.
4560 \begin_layout Subsection
4564 \begin_layout Itemize
4565 Refactor message handling.
4568 \begin_layout Itemize
4572 \begin_layout Itemize
4576 \begin_layout Itemize
4577 Finish pending saves before load/quit.
4580 \begin_layout Itemize
4581 Wxwidgets graphics plugin.
4584 \begin_layout Subsection
4588 \begin_layout Itemize
4589 Get rid of win32-crap.[ch]pp.
4592 \begin_layout Itemize
4593 Move files around a lot.
4596 \begin_layout Itemize
4597 Get rid of need for host C++ compiler.
4600 \begin_layout Itemize
4604 \begin_layout Itemize
4605 Refactor inter-component communication.
4608 \begin_layout Itemize
4612 \begin_layout Itemize
4613 Fix crash on multiline aliases.
4616 \begin_layout Itemize
4617 Load/Save settings in wxwidgets gui.
4620 \begin_layout Subsection
4624 \begin_layout Itemize
4625 Patch problems in bsnes core
4628 \begin_layout Itemize
4629 SNES is little-endian, not big-endian!
4632 \begin_layout Itemize
4633 Fix memory corruption in lcscreen::load()
4636 \begin_layout Subsection
4640 \begin_layout Itemize
4641 Fix interpretting repeat counts in rrdata loading.
4644 \begin_layout Itemize
4645 New lua callback: on_frame()
4648 \begin_layout Itemize
4649 Remove calls to runtosave() that aren't supposed to be there
4652 \begin_layout Itemize
4653 Lua function: movie.read_rtc()
4656 \begin_layout Itemize
4657 Ignore src/fonts/font.cpp
4660 \begin_layout Itemize
4661 Fix more bsnes core problems
4664 \begin_layout Itemize
4665 Control bsnes random seeding
4668 \begin_layout Itemize
4672 \begin_layout Itemize
4673 Some bsnes core debugging features (state dump and state hash)
4676 \begin_layout Itemize
4677 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4678 it was 'lsnes rr0-beta21').
4681 \begin_layout Subsection
4685 \begin_layout Itemize
4686 Fix memory corruption due to macro/field mixup
4689 \begin_layout Itemize
4690 search-memory update
4693 \begin_layout Itemize
4694 Allow direct-mapped framebuffer
4697 \begin_layout Itemize
4698 SDL: Use SDL_ANYFORMAT if possible
4701 \begin_layout Itemize
4702 SDMP2SOX: 2s delay modes.
4705 \begin_layout Itemize
4709 \begin_layout Itemize
4710 Use sed -E, not sed -r.
4711 Fixes building on Mac OS X.
4714 \begin_layout Itemize
4715 Wxwidgets: Save jukebox on exit
4718 \begin_layout Itemize
4719 Fix RTC if using load-movie on savestate.
4722 \begin_layout Itemize
4723 Fix crash related to full console mode.
4726 \begin_layout Subsection
4730 \begin_layout Itemize
4731 Wxwidgets: Allow bringing application to foreground on Mac OS X.
4734 \begin_layout Itemize
4735 Wxwidgets: Allow compiling on Mac OS X.
4738 \begin_layout Itemize
4739 Use movie compare instead of movie hashing (faster save/load).
4742 \begin_layout Itemize
4746 \begin_layout Subsection
4750 \begin_layout Itemize
4751 sdmp2sox: Pad soundtrack if using -l or -L.
4754 \begin_layout Itemize
4755 sdmp2sox: Fix NTSC overscan.
4758 \begin_layout Itemize
4759 sdmp2sox: Add AR correction mode.
4762 \begin_layout Itemize
4763 call lua_close() when exiting.
4766 \begin_layout Itemize
4767 Fix zip_writer bug causing warnings from info-zip and error from advzip.
4770 \begin_layout Subsection
4774 \begin_layout Itemize
4775 Fix IPS patching code (use bsnes core IPS patcher).
4778 \begin_layout Itemize
4779 Implement BPS patching (using bsnes core IPS patcher).
4782 \begin_layout Itemize
4783 Add feature to load headered ROMs.
4786 \begin_layout Subsection
4790 \begin_layout Itemize
4791 Show command names when showing keybindings
4794 \begin_layout Subsection
4798 \begin_layout Itemize
4799 Fix pause-on-end to be actually controllable
4802 \begin_layout Itemize
4803 SDL: Poll all events in queue, not just first one (fixes slowness in command
4807 \begin_layout Itemize
4808 Wxwidgets: Fix ROM loading.
4811 \begin_layout Subsection
4815 \begin_layout Itemize
4816 Lua: Add gui.textH, gui.textV, gui.textHV
4819 \begin_layout Itemize
4820 Fix text colors on SDL on Mac OS X
4823 \begin_layout Itemize
4824 Mode 'F' for finished in readonly mode.
4827 \begin_layout Itemize
4831 \begin_layout Itemize
4832 Reliably pause after skip poll
4835 \begin_layout Itemize
4836 Split UI and core into their own threads
4839 \begin_layout Subsection
4843 \begin_layout Itemize
4844 Remove leftover dummy SRAM slot
4847 \begin_layout Itemize
4848 Fix controller numbers.
4851 \begin_layout Subsection
4855 \begin_layout Itemize
4856 Fix lsnes-dumpavi after interface change.
4859 \begin_layout Itemize
4860 Also give BSNES patches for v085.
4863 \begin_layout Itemize
4864 Pack movie data in memory.