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
892 dump-avi <level> <prefix>
895 \begin_layout Standard
896 Dump AVI video to prefix <prefix> at level <level> (0-18).
900 \begin_layout Itemize
901 The codec is Camstudio Codec in gzip mode.
904 \begin_layout Itemize
905 Encoder and muxer are internal, available on all platforms.
908 \begin_layout Itemize
909 Audio enable/disable and framerate has no effect.
912 \begin_layout Itemize
913 Levels 10-18 are not compatible with AVISource.
916 \begin_layout Itemize
917 Recomended level is 7 if decoded by AVISource.
920 \begin_layout Itemize
921 Recomended level is 16 if decoded by ffmpeg, mencoder or FFMpegSource.
924 \begin_layout Itemize
925 Dumps of low-res PAL games are 256x239 (with all the consequences odd height
929 \begin_layout Itemize
930 The audio dumped to .avi is low-quality version.
931 The high-quality version is dumped to .sox file.
934 \begin_layout Subsubsection
938 \begin_layout Standard
939 End current AVI video dump (closing the emulator also closes the dump).
942 \begin_layout Subsection
946 \begin_layout Standard
947 Following commands control JMD video dumping:
950 \begin_layout Subsubsection
951 dump-jmd <level> <file>
954 \begin_layout Standard
955 Dump JMD video to file <file> at level <level> (0-9).
958 \begin_layout Subsubsection
962 \begin_layout Standard
963 End the current JMD dump in progress.
966 \begin_layout Subsection
970 \begin_layout Standard
971 <address> may be decimal or hexadecimal (prefixed with '0x').
972 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
976 \begin_layout Standard
977 The available element <sizes> are:
980 \begin_layout Itemize
984 \begin_layout Itemize
988 \begin_layout Itemize
992 \begin_layout Itemize
996 \begin_layout Standard
997 When reading RAM and ROM, multi-byte reads/writes are big-endian.
998 When dealing with DSP memory, multi-byte reads/writes are native-endian
999 (do not use operand sizes exceeding DSP bitness, except dword is OK for
1003 \begin_layout Subsubsection
1004 read-<size> <address>
1007 \begin_layout Standard
1008 Read the value of byte in <address>.
1011 \begin_layout Subsubsection
1012 read-s<size> <address>
1015 \begin_layout Standard
1016 Read the value of signed byte in <address>.
1019 \begin_layout Subsubsection
1020 write-<size> <address> <value>
1023 \begin_layout Standard
1024 Write <value> to byte in address <address>.
1027 \begin_layout Subsubsection
1031 \begin_layout Standard
1032 Reset the memory search
1035 \begin_layout Subsubsection
1039 \begin_layout Standard
1040 Print number of candidates remaining
1043 \begin_layout Subsubsection
1047 \begin_layout Standard
1048 Print all candidates remaining
1051 \begin_layout Subsubsection
1052 search-memory <usflag><sizeflag><op>
1055 \begin_layout Standard
1056 Searches memory for addresses satisfying criteria.
1059 \begin_layout Standard
1063 \begin_layout Itemize
1067 \begin_layout Itemize
1071 \begin_layout Standard
1075 \begin_layout Itemize
1079 \begin_layout Itemize
1083 \begin_layout Itemize
1087 \begin_layout Itemize
1091 \begin_layout Standard
1095 \begin_layout Itemize
1096 lt: < previous value.
1099 \begin_layout Itemize
1100 le: <= previous value.
1103 \begin_layout Itemize
1104 eq: = previous value.
1107 \begin_layout Itemize
1108 ne: != previous value.
1111 \begin_layout Itemize
1112 ge: >= previous value.
1115 \begin_layout Itemize
1116 gt: > previous value.
1119 \begin_layout Subsubsection
1120 search-memory <sizeflag> <value>
1123 \begin_layout Standard
1124 Searches for addresses that currently have value <value>.
1125 <sizeflag> is as in previous command.
1128 \begin_layout Subsection
1132 \begin_layout Standard
1133 These commands are not available in lsnesrc, but are available after ROM
1137 \begin_layout Subsubsection
1138 quit-emulator [/y] (implemented for wxwidgets)
1141 \begin_layout Standard
1142 Quits the emulator (asking for confirmation).
1143 If /y is given, no confirmation is asked.
1146 \begin_layout Subsubsection
1147 pause-emulator (implemented for wxwidgets)
1150 \begin_layout Standard
1151 Toggle paused/unpaused
1154 \begin_layout Subsubsection
1155 +advance-frame (implemented for wxwidgets)
1158 \begin_layout Standard
1160 If the button is still held after configurable timeout expires, game unpauses
1161 for the duration frame advance is held.
1164 \begin_layout Subsubsection
1165 +advance-poll (implemented for wxwidgets)
1168 \begin_layout Standard
1170 If the button is still held after configurable timeout expires, game unpauses
1171 for the duration frame advance is held.
1174 \begin_layout Subsubsection
1175 advance-skiplag (implemented for wxwidgets)
1178 \begin_layout Standard
1179 Skip to first poll in frame after current.
1182 \begin_layout Subsubsection
1183 reset (implemented for wxwidgets)
1186 \begin_layout Standard
1187 Reset the SNES after this frame.
1190 \begin_layout Subsubsection
1191 load <filename> (implemented for wxwidgets)
1194 \begin_layout Standard
1195 Load savestate <filename> in current mode.
1198 \begin_layout Subsubsection
1199 load-state <filename> (implemented for wxwidgets)
1202 \begin_layout Standard
1203 Load savestate <filename> in readwrite mode.
1206 \begin_layout Subsubsection
1207 load-readonly <filename> (implemented for wxwidgets)
1210 \begin_layout Standard
1211 Load savestate <filename> in readonly mode.
1214 \begin_layout Subsubsection
1215 load-preserve <filename> (implemented for wxwidgets)
1218 \begin_layout Standard
1219 Load savestate <filename> in readonly mode, preserving current events.
1222 \begin_layout Subsubsection
1223 load-movie <filename> (implemented for wxwidgets)
1226 \begin_layout Standard
1227 Load savestate <filename>, ignoring save part in readonly mode.
1230 \begin_layout Subsubsection
1231 save-state <filename> (implemented for wxwidgets)
1234 \begin_layout Standard
1235 Save system state to <filename> as soon as possible.
1238 \begin_layout Subsubsection
1239 save-movie <filename> (implemented for wxwidgets)
1242 \begin_layout Standard
1243 Save movie to <filename>.
1246 \begin_layout Subsubsection
1247 set-rwmode (implemented for wxwidgets)
1250 \begin_layout Standard
1251 Set read-write mode.
1254 \begin_layout Subsubsection
1255 set-romode (implemented for wxwidgets)
1258 \begin_layout Standard
1262 \begin_layout Subsubsection
1263 toggle-rwmode (implemented for wxwidgets)
1266 \begin_layout Standard
1267 Toggle between read-only and read-write modes.
1270 \begin_layout Subsubsection
1271 set-gamename <name> (implemented for wxwidgets)
1274 \begin_layout Standard
1275 Set name of the game to <name>
1278 \begin_layout Subsubsection
1279 get-gamename (implemented for wxwidgets)
1282 \begin_layout Standard
1283 Print the name of the game.
1286 \begin_layout Subsubsection
1287 add-author <author> (implemented for wxwidgets)
1290 \begin_layout Standard
1291 Adds new author <author>.
1292 If <author> does not contain '|' it is full name.
1293 If it contains '|', '|' splits the full name and nickname.
1296 \begin_layout Subsubsection
1297 edit-author <num> <author> (implemented for wxwidgets)
1300 \begin_layout Standard
1301 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1305 \begin_layout Subsubsection
1306 remove-author <num> (implemented for wxwidgets)
1309 \begin_layout Standard
1310 Remove author in slot <num>
1313 \begin_layout Subsubsection
1314 print-authors (implemented for wxwidgets)
1317 \begin_layout Standard
1321 \begin_layout Subsubsection
1322 test-1, test-2, test-3 (N/A for wxwidgets)
1325 \begin_layout Standard
1326 Internal test commands.
1330 \begin_layout Subsubsection
1331 take-screenshot <filename> (implemented for wxwidgets)
1334 \begin_layout Standard
1335 Save screenshot to <filename>.
1338 \begin_layout Subsubsection
1339 +controller<num><button> (N/A for wxwidgets)
1342 \begin_layout Standard
1343 Press button <button> on controller <num> (1-8).
1344 The following button names are known:
1347 \begin_layout Itemize
1351 \begin_layout Itemize
1355 \begin_layout Itemize
1359 \begin_layout Itemize
1363 \begin_layout Itemize
1367 \begin_layout Itemize
1371 \begin_layout Itemize
1375 \begin_layout Itemize
1379 \begin_layout Itemize
1383 \begin_layout Itemize
1387 \begin_layout Itemize
1391 \begin_layout Itemize
1395 \begin_layout Itemize
1399 \begin_layout Itemize
1403 \begin_layout Itemize
1407 \begin_layout Itemize
1411 \begin_layout Subsubsection
1412 controllerh<num><button>
1415 \begin_layout Standard
1416 Hold/unhold button <button> on controller <num> (1-8).
1417 See +controller for button names.
1420 \begin_layout Subsubsection
1421 autofire (<pattern>|-)...
1425 \begin_layout Standard
1426 Set autofire pattern.
1427 Each parameter is comma-separated list of button names (in form of 1start,
1428 1A, 2B, etc..) to hold on that frame.
1429 After reaching the end of pattern, the pattern restarts from the beginning.
1432 \begin_layout Subsubsection
1433 repaint (N/A for wxwidgets)
1436 \begin_layout Standard
1440 \begin_layout Subsection
1441 Save jukebox (implemented for wxwidgets)
1444 \begin_layout Subsubsection
1445 cycle-jukebox-backward (N/A for wxwidgets)
1448 \begin_layout Standard
1449 Cycle save jukebox backwards.
1452 \begin_layout Subsubsection
1453 cycle-jukebox-forward (N/A for wxwidgets)
1456 \begin_layout Standard
1457 Cycle save jukebox forwards
1460 \begin_layout Subsubsection
1461 add-jukebox-save <filename> (N/A for wxwidgets)
1464 \begin_layout Standard
1465 Add <filename> to jukebox saves.
1468 \begin_layout Subsubsection
1469 load-jukebox (N/A for wxwidgets)
1472 \begin_layout Standard
1473 Do load from jukebox (current mode).
1476 \begin_layout Subsubsection
1477 save-jukebox (N/A for wxwidgets)
1480 \begin_layout Standard
1481 Do state save to jukebox.
1484 \begin_layout Subsection
1485 Lua (implemented for wxwidgets)
1488 \begin_layout Standard
1489 Only available if lua support is compiled in.
1492 \begin_layout Subsubsection
1493 <<<<<<< HEADevaluate-lua <luacode>=======eval-lua <luacode> (implemented
1494 for wxwidgets)>>>>>>> Wxwidgets Graphics plugin WIP
1497 \begin_layout Standard
1498 Run Lua code <luacode> using built-in Lua interpretter.
1501 \begin_layout Subsubsection
1502 run-lua <script> (implemented for wxwidgets)
1505 \begin_layout Standard
1506 Run specified lua file using built-in Lua interpretter.
1509 \begin_layout Subsection
1513 \begin_layout Subsubsection
1514 add-watch <name> <expression>
1517 \begin_layout Standard
1518 Adds new watch (or modifies old one).
1521 \begin_layout Subsubsection
1525 \begin_layout Standard
1529 \begin_layout Subsection
1530 Sound (implemented for wxwidgets)
1533 \begin_layout Subsubsection
1534 enable-sound <on/off> (implemented for wxwidgets)
1537 \begin_layout Standard
1538 Enable/Disable sound.
1541 \begin_layout Subsubsection
1542 set-sound-device <device> (implemented for wxwidgets)
1545 \begin_layout Standard
1546 Set sound device to <device>
1549 \begin_layout Subsubsection
1550 show-sound-status (implemented for wxwidgets)
1553 \begin_layout Standard
1554 Show status of sound system.
1557 \begin_layout Subsubsection
1558 show-sound-devices (N/A for wxwidgets)
1561 \begin_layout Standard
1562 Show all available devices.
1565 \begin_layout Subsection
1566 SDL Platform commands (implemented for wxwidgets)
1569 \begin_layout Standard
1570 The following are valid on SDL platform.
1573 \begin_layout Subsubsection
1574 identify-key (N/A for wxwidgets)
1577 \begin_layout Standard
1578 Asks to press a key and then identifies that (pseudo-)key.
1581 \begin_layout Subsubsection
1582 toggle-console (N/A for wxwidgets)
1585 \begin_layout Standard
1586 Toggle between windowed/fullscreen console.
1589 \begin_layout Subsubsection
1590 scroll-fullup (N/A for wxwidgets)
1593 \begin_layout Standard
1594 Scroll messages window as far back as it goes.
1597 \begin_layout Subsubsection
1598 scroll-fulldown (N/A for wxwidgets)
1601 \begin_layout Standard
1602 Scroll messages window as far forward as it goes.
1605 \begin_layout Subsubsection
1606 scroll-up (N/A for wxwidgets)
1609 \begin_layout Standard
1610 Scroll messages window back one screenful.
1613 \begin_layout Subsubsection
1614 scroll-down (N/A for wxwidgets)
1617 \begin_layout Standard
1618 Scroll messages window forward one screenful.
1621 \begin_layout Section
1625 \begin_layout Subsection
1629 \begin_layout Subsubsection
1633 \begin_layout Standard
1634 Set where bsnes looks for firmware files.
1636 \begin_inset Quotes eld
1640 \begin_inset Quotes erd
1646 \begin_layout Subsubsection
1650 \begin_layout Standard
1652 Numeric, range is 0.001 to
1653 \begin_inset Quotes eld
1657 \begin_inset Quotes erd
1661 Default is native framerate.
1664 \begin_layout Subsubsection
1668 \begin_layout Standard
1669 Set save compression level (integer 0-9).
1670 Default is 7 (0 is no compression).
1673 \begin_layout Subsubsection
1677 \begin_layout Standard
1678 Set the frame advance timeout in milliseconds.
1679 Numeric integer, range is 0-999999999.
1683 \begin_layout Subsection
1687 \begin_layout Subsubsection
1691 \begin_layout Standard
1692 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1696 \begin_layout Subsubsection
1700 \begin_layout Standard
1701 AVI dumper: Set the default left border thickness (unless lua overrides)
1707 \begin_layout Subsubsection
1711 \begin_layout Standard
1712 AVI dumper: Set the default right border thickness (unless lua overrides)
1718 \begin_layout Subsubsection
1722 \begin_layout Standard
1723 AVI dumper: Set the default top border thickness (unless lua overrides)
1729 \begin_layout Subsubsection
1733 \begin_layout Standard
1734 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1740 \begin_layout Subsubsection
1744 \begin_layout Standard
1745 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1750 \begin_layout Subsection
1751 SDL platform settings
1754 \begin_layout Subsubsection
1755 autorepeat-first-delay
1758 \begin_layout Standard
1759 Sets the delay for first character in typematic autorepeat.
1762 \begin_layout Subsubsection
1763 autorepeat-subsequent-delay
1766 \begin_layout Standard
1767 Sets the delay for subsequent characters in typematic autorepeat.
1770 \begin_layout Section
1774 \begin_layout Subsection
1775 Core (in main table)
1778 \begin_layout Subsubsection
1782 \begin_layout Standard
1783 Print line to message console.
1786 \begin_layout Subsubsection
1787 exec(string command)
1790 \begin_layout Standard
1791 Run command as it was entered on the command line
1794 \begin_layout Subsection
1798 \begin_layout Standard
1799 Bitwise logical functions and related.
1802 \begin_layout Subsubsection
1803 bit.none(number...) / bit.bnot(number...)
1806 \begin_layout Standard
1807 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1811 \begin_layout Subsubsection
1812 bit.any(number...) / bit.bor(number...)
1815 \begin_layout Standard
1816 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1819 \begin_layout Subsubsection
1820 bit.all(number...) / bit.band(number...)
1823 \begin_layout Standard
1824 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1828 \begin_layout Subsubsection
1829 bit.parity(number...) / bit.bxor(number...)
1832 \begin_layout Standard
1833 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1837 \begin_layout Subsubsection
1838 bit.lrotate(number base[, number amount[, number bits]])
1841 \begin_layout Standard
1842 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1845 \begin_layout Subsubsection
1846 bit.rrotate(number base[, number amount[, number bits]])
1849 \begin_layout Standard
1850 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1854 \begin_layout Subsubsection
1855 bit.lshift(number base[, number amount[, number bits]])
1858 \begin_layout Standard
1859 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1860 The new bits are filled with zeroes.
1863 \begin_layout Subsubsection
1864 bit.lrshift(number base[, number amount[, number bits]])
1867 \begin_layout Standard
1868 Shift bits-bit (max 48, default 48) number logically right by amount (default
1870 The new bits are filled with zeroes.
1873 \begin_layout Subsubsection
1874 bit.arshift(number base[, number amount[, number bits]])
1877 \begin_layout Standard
1878 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1880 The new bits are shifted in with copy of the high bit.
1883 \begin_layout Subsection
1887 \begin_layout Standard
1888 Most of these functions can only be called in on_paint and on_video callbacks.
1889 Exceptions are noted.
1892 \begin_layout Standard
1894 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1895 16-23 are the red component, bits 24-31 are alpha component (0 is fully
1896 opaque, 255 is almost transparent).
1897 -1 is the fully transparent color.
1898 Alpha values greater than 127 do work.
1901 \begin_layout Standard
1902 Origin of coordinates is at top left corner of game display area.
1903 Left and top gaps correspond to negative coordinates.
1906 \begin_layout Subsubsection
1910 \begin_layout Standard
1911 Returns 2-tuple (hresolution, vresolution).
1914 \begin_layout Subsubsection
1915 gui.<class>_gap(number gap)
1918 \begin_layout Standard
1919 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1923 \begin_layout Subsubsection
1924 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1927 \begin_layout Standard
1928 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1933 \begin_layout Itemize
1934 x: X-coordinate to start the drawing from (and x-coordinate at begining
1938 \begin_layout Itemize
1939 y: Y-coordinate to start the drawing from.
1942 \begin_layout Itemize
1943 text: The text to draw.
1946 \begin_layout Itemize
1947 fgc: Text color (default is 0xFFFFFF (white))
1950 \begin_layout Itemize
1951 bgc: Background color (default is -1 (transparent))
1954 \begin_layout Subsubsection
1955 gui.rectangle(number x, number y, number width, number height[, number thickness[
1956 , number outline[, number fill]]])
1959 \begin_layout Standard
1960 Draw rectangle on the GUI.
1964 \begin_layout Itemize
1965 x: X-coordinate of left edge.
1968 \begin_layout Itemize
1969 y: Y-coordinate of upper edge.
1972 \begin_layout Itemize
1973 width: Width of rectangle.
1976 \begin_layout Itemize
1977 height: Height of rectangle.
1980 \begin_layout Itemize
1981 thickness: Thickness of outline (default is 1).
1984 \begin_layout Itemize
1985 outline: Color of outline (default is 0xFFFFFF (white))
1988 \begin_layout Itemize
1989 fill: Color of fil (default is -1 (transparent))
1992 \begin_layout Subsubsection
1993 gui.pixel(number x, number y[, number color])
1996 \begin_layout Standard
1997 Draw one pixel on the GUI.
2001 \begin_layout Itemize
2002 x: X-coordinate of the pixel
2005 \begin_layout Itemize
2006 y: Y-coordinate of the pixel
2009 \begin_layout Itemize
2010 color: Color of the pixel (default is 0xFFFFFF (white))
2013 \begin_layout Subsubsection
2014 gui.crosshair(number x, number y[, number length[, number color]])
2017 \begin_layout Standard
2022 \begin_layout Itemize
2023 x: X-coordinate of the crosshair
2026 \begin_layout Itemize
2027 y: Y-coordinate of the crosshair
2030 \begin_layout Itemize
2031 length: Length of the crosshair lines (default 10).
2034 \begin_layout Itemize
2035 color: Color of the crosshair (default is 0xFFFFFF (white))
2038 \begin_layout Subsubsection
2039 gui.line(number x1, number y1, number x2, number y2[, number color])
2042 \begin_layout Standard
2047 \begin_layout Itemize
2048 x1: X-coordinate of one end.
2051 \begin_layout Itemize
2052 y1: Y-coordinate of one end.
2055 \begin_layout Itemize
2056 x2: X-coordinate of the other end.
2059 \begin_layout Itemize
2060 y2: Y-coordinate of the other end.
2063 \begin_layout Itemize
2064 color: Color of the line (default is 0xFFFFFF (white)).
2067 \begin_layout Subsubsection
2068 gui.circle(number x, number y, number r[, number thick[, number border[,
2072 \begin_layout Standard
2077 \begin_layout Itemize
2078 x: X-coordinate of the center
2081 \begin_layout Itemize
2082 y: Y-coordinate of the center
2085 \begin_layout Itemize
2086 r: The radius of the circle
2089 \begin_layout Itemize
2090 thick: Border thickness
2093 \begin_layout Itemize
2094 border: Border color (default is 0xFFFFFF (white))
2097 \begin_layout Itemize
2098 fill: Fill color (default is -1 (transparent)).
2101 \begin_layout Subsubsection
2105 \begin_layout Standard
2106 Request on_repaint() to happen as soon as possible.
2107 Can be used anywhere.
2110 \begin_layout Subsubsection
2111 gui.subframe_update(boolean on)
2114 \begin_layout Standard
2115 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2116 or not happen (on=false).
2117 Can be used anywhere.
2120 \begin_layout Subsubsection
2121 gui.screenshot(string filename)
2124 \begin_layout Standard
2125 Write PNG screenshot of the current frame (no drawings) to specified file.
2126 Can be used anywhere.
2129 \begin_layout Subsubsection
2130 gui.color(number r, number g, number b[, number a])
2133 \begin_layout Standard
2134 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2135 each component in scale 0-255.
2136 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2138 The default alpha is 256.
2141 \begin_layout Subsubsection
2142 gui.status(string name, string value)
2145 \begin_layout Standard
2147 \begin_inset Quotes eld
2151 \begin_inset Quotes erd
2154 to <value> in status area.
2155 Can be used anywhere.
2158 \begin_layout Subsection
2162 \begin_layout Standard
2164 Only available in on_input callback.
2167 \begin_layout Subsubsection
2168 input.get(number controller, number index)
2171 \begin_layout Standard
2172 Read the specified index (0-11) from specified controller (0-7).
2176 \begin_layout Itemize
2177 Uses physical controller numbering.
2178 Gamepad in port 2 is controller 4, not 1!
2181 \begin_layout Subsubsection
2182 input.set(number controller, number index, number value)
2185 \begin_layout Standard
2186 Write the specified index (0-11) from specified controller (0-7), storing
2191 \begin_layout Itemize
2192 Uses physical controller numbering.
2193 Gamepad in port 2 is controller 4, not 1!
2196 \begin_layout Subsubsection
2197 input.reset([number cycles])
2200 \begin_layout Standard
2202 If cycles is greater than zero, do delayed reset.
2203 0 (or no value) causes immediate reset.
2206 \begin_layout Itemize
2207 Only available with subframe flag false.
2210 \begin_layout Subsection
2214 \begin_layout Standard
2215 Host memory handling (extra memory saved to savestates).
2216 Host memory starts empty.
2219 \begin_layout Subsubsection
2220 hostmemory.read(number address)
2223 \begin_layout Standard
2224 Reads hostmemory slot address.
2225 Slot numbers out of range return false instead of numeric.
2228 \begin_layout Subsubsection
2229 hostmemory.write(number address, number value)
2232 \begin_layout Standard
2233 Writes hostmemory slot with 0-255.
2234 Slot numbers out of range cause extension of host memory slot space.
2237 \begin_layout Subsubsection
2238 hostmemory.readbyte(number address)
2241 \begin_layout Standard
2242 Read unsigned byte (1 element) from given address.
2243 Slots out of range return false.
2246 \begin_layout Subsubsection
2247 hostmemory.writebyte(number address, number value)
2250 \begin_layout Standard
2251 Write unsigned byte (1 element) to given slot.
2252 Slot numbers out of range cause extension.
2255 \begin_layout Subsubsection
2256 hostmemory.readsbyte(number address)
2259 \begin_layout Standard
2260 Read signed byte (1 element) from given address.
2261 Slots out of range return false.
2264 \begin_layout Subsubsection
2265 hostmemory.writesbyte(number address, number value)
2268 \begin_layout Standard
2269 Write signed byte (1 element) to given slot.
2270 Slot numbers out of range cause extension.
2273 \begin_layout Subsubsection
2274 hostmemory.readword(number address)
2277 \begin_layout Standard
2278 Read unsigned word (2 elements) from given address.
2279 Slots out of range return false.
2282 \begin_layout Subsubsection
2283 hostmemory.writeword(number address, number value)
2286 \begin_layout Standard
2287 Write unsigned word (2 elements) to given slot.
2288 Slot numbers out of range cause extension.
2291 \begin_layout Subsubsection
2292 hostmemory.readsword(number address)
2295 \begin_layout Standard
2296 Read signed word (2 elements) from given address.
2297 Slots out of range return false.
2300 \begin_layout Subsubsection
2301 hostmemory.writesword(number address, number value)
2304 \begin_layout Standard
2305 Write signed word (2 elements) to given slot.
2306 Slot numbers out of range cause extension.
2309 \begin_layout Subsubsection
2310 hostmemory.readdword(number address)
2313 \begin_layout Standard
2314 Read unsigned doubleword (4 elements) from given address.
2315 Slots out of range return false.
2318 \begin_layout Subsubsection
2319 hostmemory.writedword(number address, number value)
2322 \begin_layout Standard
2323 Write unsigned doubleword (4 elements) to given slot.
2324 Slot numbers out of range cause extension.
2327 \begin_layout Subsubsection
2328 hostmemory.readsdword(number address)
2331 \begin_layout Standard
2332 Read signed doubleword (4 elements) from given address.
2333 Slots out of range return false.
2336 \begin_layout Subsubsection
2337 hostmemory.writesdword(number address, number value)
2340 \begin_layout Standard
2341 Write signed doubleword (4 elements) to given slot.
2342 Slot numbers out of range cause extension.
2345 \begin_layout Subsubsection
2346 hostmemory.readqword(number address)
2349 \begin_layout Standard
2350 Read unsigned quadword (8 elements) from given address.
2351 Slots out of range return false.
2354 \begin_layout Subsubsection
2355 hostmemory.writeqword(number address, number value)
2358 \begin_layout Standard
2359 Write unsigned quadword (4 elements) to given slot.
2360 Slot numbers out of range cause extension.
2363 \begin_layout Subsubsection
2364 hostmemory.readsqword(number address)
2367 \begin_layout Standard
2368 Read signed quadword (8 elements) from given address.
2369 Slots out of range return false.
2372 \begin_layout Subsubsection
2373 hostmemory.writesqword(number address, number value)
2376 \begin_layout Standard
2377 Write signed quadword (8 elements) to given slot.
2378 Slot numbers out of range cause extension.
2381 \begin_layout Subsection
2385 \begin_layout Standard
2389 \begin_layout Subsubsection
2390 movie.currentframe()
2393 \begin_layout Standard
2394 Return number of current frame.
2397 \begin_layout Subsubsection
2401 \begin_layout Standard
2402 Return number of frames in movie.
2405 \begin_layout Subsubsection
2409 \begin_layout Standard
2410 Return true if in readonly mode, false if in readwrite.
2413 \begin_layout Subsubsection
2414 movie.set_readwrite()
2417 \begin_layout Standard
2418 Set readwrite mode (does not cause on_readwrite callback).
2421 \begin_layout Subsubsection
2422 movie.frame_subframes(number frame)
2425 \begin_layout Standard
2426 Count number of subframes in specified frame (frame numbers are 1-based)
2430 \begin_layout Subsubsection
2431 movie.read_subframe(number frame, number subframe)
2434 \begin_layout Standard
2435 Read specifed subframe in specified frame and return data as array (100
2436 elements, numbered 0-99 currently).
2439 \begin_layout Subsection
2443 \begin_layout Standard
2444 Routines for settings manipulation
2447 \begin_layout Subsubsection
2448 settings.get(string name)
2451 \begin_layout Standard
2452 Get value of setting.
2453 If setting is blank, returns false.
2454 If setting value can't be obtained, returns (nil, error message).
2457 \begin_layout Subsubsection
2458 settings.set(string name, string value)
2461 \begin_layout Standard
2462 Set value of setting.
2463 If setting can't be set, returns (nil, error message).
2466 \begin_layout Subsubsection
2467 settings.is_set(string name)
2470 \begin_layout Standard
2471 Returns if setting is set.
2472 If setting does not exist, returns (nil, error message).
2475 \begin_layout Subsubsection
2476 settings.blank(string name)
2479 \begin_layout Standard
2480 Blanks a setting and returns true.
2481 If setting can't be blanked, returns (nil, error message).
2484 \begin_layout Subsection
2488 \begin_layout Standard
2489 Contains various functions for managing memory
2492 \begin_layout Subsubsection
2496 \begin_layout Standard
2497 Returns the number of VMAs
2500 \begin_layout Subsubsection
2501 memory.read_vma(number index)
2504 \begin_layout Standard
2505 Reads the specified VMA (indices start from zero).
2506 Trying to read invalid VMA gives nil.
2507 The read VMA is table with the following fields:
2510 \begin_layout Itemize
2511 region_name (string): The readable name of the VMA
2514 \begin_layout Itemize
2515 baseaddr (number): Base address of the VMA
2518 \begin_layout Itemize
2519 lastaddr (number): Last address in the VMA.
2522 \begin_layout Itemize
2523 size (number): The size of VMA in bytes.
2526 \begin_layout Itemize
2527 readonly (boolean): True of the VMA corresponds to ROM.
2530 \begin_layout Itemize
2531 native_endian (boolean): True if the VMA has native endian as opposed to
2535 \begin_layout Subsubsection
2536 memory.find_vma(number address)
2539 \begin_layout Standard
2540 Finds the VMA containing specified address.
2541 Returns table in the same format as read_vma or nil if not found.
2544 \begin_layout Subsubsection
2545 memory.readbyte(number address)
2548 \begin_layout Standard
2549 Reads the specified address as unsigned byte and returns the result.
2552 \begin_layout Subsubsection
2553 memory.readsbyte(number address)
2556 \begin_layout Standard
2557 Reads the specified address as signed byte and returns the result.
2560 \begin_layout Subsubsection
2561 memory.writebyte(number address, number value)
2564 \begin_layout Standard
2565 Writes the specified value (negative values undergo 2's complement) to specified
2566 address (as a byte).
2569 \begin_layout Subsubsection
2570 memory.readword(number address)
2573 \begin_layout Standard
2574 Reads the specified address as unsigned word and returns the result.
2577 \begin_layout Subsubsection
2578 memory.readsword(number address)
2581 \begin_layout Standard
2582 Reads the specified address as signed word and returns the result.
2585 \begin_layout Subsubsection
2586 memory.writeword(number address, number value)
2589 \begin_layout Standard
2590 Writes the specified value (negative values undergo 2's complement) to specified
2591 address (as a word).
2594 \begin_layout Subsubsection
2595 memory.readdword(number address)
2598 \begin_layout Standard
2599 Reads the specified address as unsigned doubleword and returns the result.
2602 \begin_layout Subsubsection
2603 memory.readsdword(number address)
2606 \begin_layout Standard
2607 Reads the specified address as signed doubleword and returns the result.
2610 \begin_layout Subsubsection
2611 memory.writedword(number address, number value)
2614 \begin_layout Standard
2615 Writes the specified value (negative values undergo 2's complement) to specified
2616 address (as a doubleword).
2619 \begin_layout Subsubsection
2620 memory.readqword(number address)
2623 \begin_layout Standard
2624 Reads the specified address as unsigned quadword and returns the result.
2627 \begin_layout Subsubsection
2628 memory.readsqword(number address)
2631 \begin_layout Standard
2632 Reads the specified address as signed quadword and returns the result.
2635 \begin_layout Subsubsection
2636 memory.writeqword(number address, number value)
2639 \begin_layout Standard
2640 Writes the specified value (negative values undergo 2's complement) to specified
2641 address (as a quadword).
2644 \begin_layout Subsection
2648 \begin_layout Standard
2649 Contains copy of global variables from time of Lua initialization.
2653 \begin_layout Subsection
2657 \begin_layout Standard
2658 Various callbacks to Lua that can occur.
2661 \begin_layout Subsubsection
2662 Callback: on_paint()
2665 \begin_layout Standard
2666 Called when screen is being painted.
2667 Any gui.* calls requiring graphic context draw on the screen.
2670 \begin_layout Subsubsection
2671 Callback: on_video()
2674 \begin_layout Standard
2675 Called when video dump frame is being painted.
2676 Any gui.* calls requiring graphic context draw on the video.
2679 \begin_layout Subsubsection
2680 Callback: on_frame()
2683 \begin_layout Standard
2684 Called on each starting whole frame.
2687 \begin_layout Subsubsection
2688 Callback: on_startup()
2691 \begin_layout Standard
2692 Called when the emulator is starting (lsnes.rc and --run files has been run).
2695 \begin_layout Subsubsection
2696 Callback: on_pre_load(string name)
2699 \begin_layout Standard
2700 Called just before savestate/movie load occurs (note: loads are always delayed,
2701 so this occurs even when load was initiated by lua).
2704 \begin_layout Subsubsection
2705 Callback: on_err_load(string name)
2708 \begin_layout Standard
2709 Called if loadstate goes wrong.
2712 \begin_layout Subsubsection
2713 Callback: on_post_load(string name, boolean was_savestate)
2716 \begin_layout Standard
2717 Called on successful loadstate.
2718 was_savestate gives if this was a savestate or a movie.
2721 \begin_layout Subsubsection
2722 Callback: on_pre_save(string name, boolean is_savestate)
2725 \begin_layout Standard
2726 Called just before savestate save occurs (note: movie saves are synchronous
2727 and won't trigger these callbacks if called from Lua).
2730 \begin_layout Subsubsection
2731 Callback: on_err_save(string name)
2734 \begin_layout Standard
2735 Called if savestate goes wrong.
2738 \begin_layout Subsubsection
2739 Callback: on_post_save(string name, boolean is_savestate)
2742 \begin_layout Standard
2743 Called on successful savaestate.
2744 is_savestate gives if this was a savestate or a movie.
2747 \begin_layout Subsubsection
2751 \begin_layout Standard
2752 Called when emulator is shutting down.
2755 \begin_layout Subsubsection
2756 Callback: on_input(boolean subframe)
2759 \begin_layout Standard
2760 Called when emulator is just sending input to bsnes core.
2761 Warning: This is called even in readonly mode, but the results are ignored.
2764 \begin_layout Subsubsection
2765 Callback: on_reset()
2768 \begin_layout Standard
2769 Called when SNES is reset.
2772 \begin_layout Subsubsection
2773 Callback: on_readwrite()
2776 \begin_layout Standard
2777 Called when moving into readwrite mode as result of
2778 \begin_inset Quotes eld
2782 \begin_inset Quotes erd
2785 command (note: moving to rwmode by Lua won't trigger this, as per recursive
2789 \begin_layout Subsubsection
2790 Callback: on_snoop(number port, number controller, number index, number
2794 \begin_layout Standard
2795 Called each time bsnes asks for input.
2796 The value is the final value to be sent to bsnes core (readonly mode, autohold
2797 and autofire have been taken into account).
2798 Might be useful when translating movies to format suitable for console
2800 Note: There is no way to modify the value to be sent.
2803 \begin_layout Section
2804 Modifier and key names:
2807 \begin_layout Subsection
2811 \begin_layout Subsubsection
2815 \begin_layout Standard
2816 Following modifier names are known:
2819 \begin_layout Itemize
2820 ctrl, lctrl, rctrl: Control keys
2823 \begin_layout Itemize
2824 alt, lalt, ralt: ALT keys.
2827 \begin_layout Itemize
2828 shift, lshift, rshift: Shift keys.
2831 \begin_layout Itemize
2832 meta, lmeta, rmeta: Meta keys.
2835 \begin_layout Itemize
2836 num, caps: Numlock/Capslock (these are sticky!)
2839 \begin_layout Itemize
2843 \begin_layout Subsubsection
2847 \begin_layout Standard
2848 Following key names are known:
2851 \begin_layout Itemize
2852 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
2853 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
2854 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
2855 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
2856 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
2857 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
2858 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
2859 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
2860 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
2861 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
2862 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
2863 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
2864 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
2865 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
2866 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
2867 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
2868 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
2869 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
2870 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
2871 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
2872 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
2873 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
2874 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
2875 break, menu, power, euro, undo
2878 \begin_layout Itemize
2879 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
2880 hardware-dependent scan code of <n> (useful to bind those keys that don't
2881 have symbolic names).
2884 \begin_layout Standard
2885 In addition, following pseudo-keys are known (note: these do not work in
2886 conjunction with modifers):
2889 \begin_layout Itemize
2890 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
2893 \begin_layout Itemize
2894 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
2897 \begin_layout Itemize
2898 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
2901 \begin_layout Itemize
2902 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
2905 \begin_layout Itemize
2906 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
2909 \begin_layout Itemize
2910 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
2911 position (axis modes axis and axis_inverse).
2914 \begin_layout Itemize
2915 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
2916 position (axis modes axis and axis_inverse).
2919 \begin_layout Itemize
2920 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
2924 \begin_layout Subsubsection
2928 \begin_layout Itemize
2929 Escape: Enter/Exit Command mode, cancel modal dialogs.
2932 \begin_layout Itemize
2933 Return (also KPEnter): Execute command, ok modal dialog.
2936 \begin_layout Itemize
2937 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
2941 \begin_layout Itemize
2942 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
2946 \begin_layout Itemize
2947 Home (also KP7 if no num lock; command mode): Beginning of command.
2950 \begin_layout Itemize
2951 End (also KP1 if no num lock; command mode): End of command.
2954 \begin_layout Itemize
2955 Left (also KP4 if no num lock; command mode): Move cursor left.
2958 \begin_layout Itemize
2959 Right (also KP6 if no num lock; command mode): Move cursor right.
2962 \begin_layout Itemize
2964 if no num lock; command mode): Delete character to right of cursor.
2967 \begin_layout Itemize
2968 Insert (also KP0 if no num lock; command mode): Toggle between insert /
2972 \begin_layout Itemize
2973 Backspace (command mode): Delete character to left of cursor.
2976 \begin_layout Itemize
2977 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
2980 \begin_layout Subsubsection
2984 \begin_layout Standard
2985 If emulator does not reach internal polling loop in 15 seconds after leaving
2986 it or 15 seconds after starting, the emulator instantly bombs out.
2989 \begin_layout Section
2993 \begin_layout Standard
2994 Movie file is .zip archive in itself, normal ZIP archive tools work on it
2995 (note: If you recompress it, do not use compression methods other than
2996 store and deflate and especially do not use encryption of any kind).
2999 \begin_layout Subsection
3000 Detecting clean start/SRAM/Savestate
3003 \begin_layout Itemize
3005 \begin_inset Quotes eld
3009 \begin_inset Quotes erd
3012 it is savestate, otherwise:
3015 \begin_layout Itemize
3016 If file has members with names starting
3017 \begin_inset Quotes eld
3021 \begin_inset Quotes erd
3024 it is movie starting from SRAM, otherwise:
3027 \begin_layout Itemize
3028 It is movie starting from clear state.
3031 \begin_layout Subsection
3035 \begin_layout Standard
3036 Type of game ROM and region (as one line).
3040 \begin_layout Standard
3041 \begin_inset Tabular
3042 <lyxtabular version="3" rows="8" columns="3">
3043 <features tabularvalignment="middle">
3044 <column alignment="center" valignment="top" width="0">
3045 <column alignment="center" valignment="top" width="0">
3046 <column alignment="center" valignment="top" width="0">
3048 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3051 \begin_layout Plain Layout
3057 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3060 \begin_layout Plain Layout
3066 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3069 \begin_layout Plain Layout
3077 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3080 \begin_layout Plain Layout
3086 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3089 \begin_layout Plain Layout
3095 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3098 \begin_layout Plain Layout
3106 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3109 \begin_layout Plain Layout
3115 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3118 \begin_layout Plain Layout
3124 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3127 \begin_layout Plain Layout
3135 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3138 \begin_layout Plain Layout
3144 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3147 \begin_layout Plain Layout
3153 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3156 \begin_layout Plain Layout
3164 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3167 \begin_layout Plain Layout
3173 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3176 \begin_layout Plain Layout
3182 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3185 \begin_layout Plain Layout
3193 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3196 \begin_layout Plain Layout
3202 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3205 \begin_layout Plain Layout
3211 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3214 \begin_layout Plain Layout
3222 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3225 \begin_layout Plain Layout
3231 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3234 \begin_layout Plain Layout
3240 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3243 \begin_layout Plain Layout
3251 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3254 \begin_layout Plain Layout
3260 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3263 \begin_layout Plain Layout
3269 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3272 \begin_layout Plain Layout
3286 \begin_layout Standard
3290 \begin_layout Standard
3291 \begin_inset Tabular
3292 <lyxtabular version="3" rows="3" columns="2">
3293 <features tabularvalignment="middle">
3294 <column alignment="center" valignment="top" width="0">
3295 <column alignment="center" valignment="top" width="0">
3297 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3300 \begin_layout Plain Layout
3306 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3309 \begin_layout Plain Layout
3317 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3320 \begin_layout Plain Layout
3326 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3329 \begin_layout Plain Layout
3337 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3340 \begin_layout Plain Layout
3346 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3349 \begin_layout Plain Layout
3363 \begin_layout Subsection
3367 \begin_layout Standard
3368 Contains type of port #1 (as one line).
3369 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3370 If not present, defaults to 'gamepad'.
3373 \begin_layout Subsection
3377 \begin_layout Standard
3378 Contains type of port #2 (as one line).
3379 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3380 'justifier' and 'justifiers'.
3381 If not present, defaults to 'none'.
3384 \begin_layout Subsection
3388 \begin_layout Standard
3389 Contains name of the game (as one line).
3392 \begin_layout Subsection
3396 \begin_layout Standard
3397 Contains authors, one per line.
3398 Part before '|' is the full name, part after is the nickname.
3401 \begin_layout Subsection
3405 \begin_layout Standard
3407 \begin_inset Quotes eld
3411 \begin_inset Quotes erd
3415 Used to reject other saves.
3418 \begin_layout Subsection
3419 Member: controlsversion
3422 \begin_layout Standard
3424 \begin_inset Quotes eld
3428 \begin_inset Quotes erd
3432 Used to identify what controls are there.
3435 \begin_layout Subsection
3437 \begin_inset Quotes eld
3441 \begin_inset Quotes erd
3447 \begin_layout Standard
3448 Contains bsnes core version number (as one line).
3451 \begin_layout Subsection
3455 \begin_layout Standard
3456 Contains project ID (as one line).
3457 Used to identify if two movies are part of the same project.
3460 \begin_layout Subsection
3461 Member: {rom,slota,slotb}{,xml}.sha256
3464 \begin_layout Standard
3465 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3466 Absent if corresponding file is absent.
3469 \begin_layout Subsection
3470 Member: moviesram.<name>
3473 \begin_layout Standard
3474 Raw binary startup SRAM of kind <name>.
3475 Only present in savestates and movies starting from SRAM.
3478 \begin_layout Subsection
3482 \begin_layout Standard
3483 Contains frame number (as one line) of frame movie was saved on.
3484 Only present in savestates.
3487 \begin_layout Subsection
3491 \begin_layout Standard
3492 Current value of lag counter (as one line).
3493 Only present in savestates.
3496 \begin_layout Subsection
3497 Member: pollcounters
3500 \begin_layout Standard
3501 Contains poll counters (currently 100 of them), one per line.
3502 Each line is raw poll count if DRDY is set for it.
3503 Otherwise it is negative poll count minus one.
3504 Only present in savestates.
3507 \begin_layout Subsection
3511 \begin_layout Standard
3512 Raw binary dump of host memory.
3513 Only present in savestates.
3516 \begin_layout Subsection
3520 \begin_layout Standard
3521 The raw binary savestate itself.
3522 Savestate detection uses this file, only present in savestates.
3525 \begin_layout Subsection
3529 \begin_layout Standard
3530 Screenshot of current frame.
3531 Only present in savestates.
3532 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3534 Height of image is inferred from the width and size of data.
3537 \begin_layout Subsection
3541 \begin_layout Standard
3542 Raw binary SRAM of kind <name> at time of savestate.
3543 Only present in savestates.
3546 \begin_layout Subsection
3550 \begin_layout Standard
3551 The actual input track, one line per subframe (blank lines are skipped).
3554 \begin_layout Itemize
3555 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3556 part of same frame as previous, otherwise it starts a new frame.
3559 \begin_layout Itemize
3560 First subframe must start a new frame.
3563 \begin_layout Standard
3564 Length of movie in frames is number of lines in input file that start a
3568 \begin_layout Subsection
3572 \begin_layout Standard
3573 Contains textual base-10 rerecord count (as one line; emulator just writes
3574 this, it doesn't read it) + 1.
3577 \begin_layout Subsection
3581 \begin_layout Standard
3582 This member stores set of load IDs.
3583 There is one load ID per rerecord (plus one corresponding to start of project).
3586 \begin_layout Itemize
3587 This member constists of concatenation of records
3590 \begin_layout Itemize
3591 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3595 \begin_layout Itemize
3596 IDs are interpretted as 256-bit big-endian integers with warparound.
3599 \begin_layout Itemize
3600 Initial predicted ID is all zeroes.
3603 \begin_layout Standard
3604 Format of each record is:
3607 \begin_layout Itemize
3608 1 byte: Opcode byte.
3609 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3613 \begin_layout Itemize
3614 32-prefixlen bytes of ID.
3617 \begin_layout Itemize
3618 countlen bytes of big-endian count (count).
3621 \begin_layout Standard
3622 Records are processed as follows:
3625 \begin_layout Itemize
3626 To form the first ID encoded by record, take the first prefixlen bytes predicted
3627 ID and append the read ID value to it.
3628 The result is the first ID encoded.
3631 \begin_layout Itemize
3632 If countlen is 0, record encodes 1 ID.
3635 \begin_layout Itemize
3636 If countlen is 1, record encodes 2+count IDs.
3639 \begin_layout Itemize
3640 If countlen is 2, record encodes 258+count IDs.
3643 \begin_layout Itemize
3644 If countlen is 3, record encodes 65794+count IDs.
3647 \begin_layout Itemize
3648 The new predicted ID is the next ID after last one encoded by the record.
3651 \begin_layout Standard
3652 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3656 \begin_layout Subsection
3657 Member: starttime.second
3660 \begin_layout Standard
3661 Movie starting time, second part.
3662 Epoch is Unix epoch.
3663 Default is 1,000,000,000.
3666 \begin_layout Subsection
3667 Member: starttime.subsecond
3670 \begin_layout Standard
3671 Movie starting time, subsecond part.
3676 \begin_layout Subsection
3677 Member: savetime.second
3680 \begin_layout Standard
3681 Movie saving time, second part.
3682 Default is starttime.second.
3683 Only present in savestates.
3686 \begin_layout Subsection
3687 Member: savetime.subsecond
3690 \begin_layout Standard
3691 Movie saving time, subsecond part.
3692 Default is starttime.subsecond.
3693 Only present in savestates.
3696 \begin_layout Section
3700 \begin_layout Subsection
3704 \begin_layout Standard
3705 make ui=ui-libsnes profile=accuracy
3708 \begin_layout Standard
3709 For Bsnes v084 You need to apply the six patches in bsnes-patches/.
3710 These fix the following:
3713 \begin_layout Enumerate
3714 Make libsnes actually compile (it won't compile without!)
3717 \begin_layout Enumerate
3718 Bump the version number to be correct (nice to have)
3721 \begin_layout Enumerate
3722 Make RTC emulation time cleanly overridable (needed by games using RTC)
3725 \begin_layout Enumerate
3726 Save/Load controller state on savestate/loadstate (many games screw up without)
3729 \begin_layout Enumerate
3730 Fix unserialization of 64-bit integers (needed)
3733 \begin_layout Enumerate
3734 Allow frontend to control random number seed (just nice to have)
3737 \begin_layout Subsection
3738 Prerequisite libraries:
3741 \begin_layout Itemize
3745 \begin_layout Itemize
3749 \begin_layout Itemize
3750 SDLmain (Windows/Mac OS X only; Note you may have to extract the object
3754 \begin_layout Itemize
3758 \begin_layout Itemize
3762 \begin_layout Itemize
3763 boost conversion (header only)
3766 \begin_layout Subsection
3767 Compile options to make:
3770 \begin_layout Subsubsection
3774 \begin_layout Standard
3775 Set path to BSNES bsnes directory to <path>.
3778 \begin_layout Subsubsection
3782 \begin_layout Standard
3783 Don't use threads on Linux.
3786 \begin_layout Subsubsection
3790 \begin_layout Standard
3791 Try to use threads even on non-Linux systems.
3794 \begin_layout Subsubsection
3795 CROSS_PREFIX=<prefix>
3798 \begin_layout Standard
3799 Prepend this to all commands refering to cross-compiling environment with
3803 \begin_layout Subsubsection
3807 \begin_layout Standard
3808 Target C++ compiler to use.
3812 \begin_layout Standard
3813 Note: If crosscompiling, this has to be crosscompiler, and CROSS_PREFIX
3817 \begin_layout Subsubsection
3821 \begin_layout Standard
3822 Assume BSNES uses compatiblity core instead of accuracy core.
3825 \begin_layout Subsubsection
3829 \begin_layout Standard
3830 Compile lua support, using package <package>
3833 \begin_layout Subsubsection
3837 \begin_layout Standard
3838 Set graphics platform.
3839 Currently available choices are
3840 \begin_inset Quotes eld
3844 \begin_inset Quotes erd
3848 \begin_inset Quotes eld
3852 \begin_inset Quotes erd
3858 \begin_layout Subsubsection
3862 \begin_layout Standard
3864 Currently available choices are
3865 \begin_inset Quotes eld
3869 \begin_inset Quotes erd
3872 (requires SDL graphics),
3873 \begin_inset Quotes eld
3877 \begin_inset Quotes erd
3881 \begin_inset Quotes eld
3885 \begin_inset Quotes erd
3891 \begin_layout Subsubsection
3895 \begin_layout Standard
3896 Set joystick platform.
3897 Currently available choices are
3898 \begin_inset Quotes eld
3902 \begin_inset Quotes erd
3905 (requires SDL graphics),
3906 \begin_inset Quotes eld
3910 \begin_inset Quotes erd
3914 \begin_inset Quotes eld
3918 \begin_inset Quotes erd
3924 \begin_layout Section
3925 Quick'n'dirty encode guide
3928 \begin_layout Enumerate
3929 Start the emulator and load the movie file.
3932 \begin_layout Enumerate
3933 Set large AVI option 'set-setting avi-large on'
3936 \begin_layout Enumerate
3937 Enable dumping 'dump-avi 12 tmpdump' (note: Normally 10 and above are
3938 \begin_inset Quotes eld
3941 use only if you know what you are doing.
3942 \begin_inset Quotes erd
3946 In this case, these can be safely used because of how x264 internally works).
3949 \begin_layout Enumerate
3950 Unpause and let it run until you want to end dumping.
3953 \begin_layout Enumerate
3954 Close the emulator (closing the window is the easiest way).
3958 \begin_layout Enumerate
3959 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
3960 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
3963 \begin_layout Enumerate
3964 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
3967 \begin_layout Enumerate
3968 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
3969 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
3972 \begin_layout Enumerate
3973 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
3974 Now final.mkv contains quick'n'dirty encode.
3977 \begin_layout Section
3978 Axis configurations for some gamepad types:
3981 \begin_layout Subsection
3985 \begin_layout Standard
3986 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
3989 \begin_layout LyX-Code
3990 set-axis joystick0axis2 pressure-+
3993 \begin_layout LyX-Code
3994 set-axis joystick0axis5 pressure-+
3997 \begin_layout Subsection
3999 \begin_inset Quotes eld
4003 \begin_inset Quotes erd
4009 \begin_layout Standard
4010 Axes 8-19 should be disabled.
4013 \begin_layout LyX-Code
4014 set-axis joystick0axis8 disabled
4017 \begin_layout LyX-Code
4018 set-axis joystick0axis9 disabled
4021 \begin_layout LyX-Code
4022 set-axis joystick0axis10 disabled
4025 \begin_layout LyX-Code
4026 set-axis joystick0axis11 disabled
4029 \begin_layout LyX-Code
4030 set-axis joystick0axis12 disabled
4033 \begin_layout LyX-Code
4034 set-axis joystick0axis13 disabled
4037 \begin_layout LyX-Code
4038 set-axis joystick0axis14 disabled
4041 \begin_layout LyX-Code
4042 set-axis joystick0axis15 disabled
4045 \begin_layout LyX-Code
4046 set-axis joystick0axis16 disabled
4049 \begin_layout LyX-Code
4050 set-axis joystick0axis17 disabled
4053 \begin_layout LyX-Code
4054 set-axis joystick0axis18 disabled
4057 \begin_layout LyX-Code
4058 set-axis joystick0axis19 disabled
4061 \begin_layout Section
4065 \begin_layout Subsection
4066 Problems from BSNES core:
4069 \begin_layout Itemize
4070 The whole pending save stuff.
4073 \begin_layout Itemize
4074 Lack of layer hiding.
4077 \begin_layout Itemize
4081 \begin_layout Itemize
4082 Firmwares can't be loaded from ZIP archives.
4085 \begin_layout Subsection
4089 \begin_layout Itemize
4090 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4093 \begin_layout Itemize
4094 Audio for last dumped frame is not itself dumped.
4097 \begin_layout Itemize
4098 Audio in UI is pretty bad in quality.
4101 \begin_layout Itemize
4102 UI itself is 30fps max (SDL).
4105 \begin_layout Itemize
4106 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4109 \begin_layout Itemize
4110 No menus, command based interface (SDL).
4113 \begin_layout Itemize
4114 Long commands don't scroll.
4117 \begin_layout Itemize
4118 The SDL screen drawing is slow.
4121 \begin_layout Itemize
4122 Wxwidgets UI slows down with time.
4125 \begin_layout Itemize
4126 Movies use way too much (like at least 10x what would be needed) memory.
4129 \begin_layout Section
4133 \begin_layout Subsection
4137 \begin_layout Itemize
4141 \begin_layout Itemize
4142 Fix dumper video corruption with levels 10-18.
4145 \begin_layout Subsection
4149 \begin_layout Itemize
4153 \begin_layout Itemize
4154 Lots of code cleanups
4157 \begin_layout Itemize
4158 Lua interface to settings
4161 \begin_layout Itemize
4162 Allow specifying AVI borders without Lua
4165 \begin_layout Itemize
4166 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4169 \begin_layout Itemize
4170 on_snoop lua callback
4173 \begin_layout Itemize
4174 Faster movie loading and saving.
4177 \begin_layout Subsection
4181 \begin_layout Itemize
4185 \begin_layout Subsection
4189 \begin_layout Itemize
4193 \begin_layout Itemize
4194 Save jukebox functionality.
4197 \begin_layout Subsection
4201 \begin_layout Itemize
4202 Try to fix some nasty failing movie load edge cases
4205 \begin_layout Itemize
4206 Allow specifying scripts to run on command line.
4209 \begin_layout Subsection
4213 \begin_layout Itemize
4214 Major source code reorganization.
4217 \begin_layout Itemize
4218 Backup savestates before overwriting.
4221 \begin_layout Itemize
4222 Don't crash if loading initial state fails.
4225 \begin_layout Subsection
4229 \begin_layout Itemize
4233 \begin_layout Itemize
4234 Fix author name parsing
4237 \begin_layout Itemize
4238 Fix rerecord counting
4241 \begin_layout Itemize
4242 (SDL) Print messages to console if SDL is uninitialized
4245 \begin_layout Itemize
4246 Add movieinfo program
4249 \begin_layout Itemize
4250 Fix loading movies starting from SRAM.
4253 \begin_layout Subsection
4257 \begin_layout Itemize
4258 Add support for unattended dumping
4261 \begin_layout Itemize
4262 Fix compiling for Win32
4265 \begin_layout Itemize
4266 Don't lock up if sound can't be initialized
4269 \begin_layout Itemize
4270 Strip trailing CR from commands
4273 \begin_layout Itemize
4274 Don't try to do dubious things in global ctors (fix crash on startup)
4277 \begin_layout Subsection
4281 \begin_layout Itemize
4282 Small documentation tweaking
4285 \begin_layout Itemize
4289 \begin_layout Itemize
4290 Fix major bug in modifier matching
4293 \begin_layout Subsection
4297 \begin_layout Itemize
4298 Lots of documentation fixes
4301 \begin_layout Itemize
4302 Use dedicated callbacks for event backcomm., not commands.
4305 \begin_layout Itemize
4306 Ensure that the watchdog is not hit when executing delayed reset.
4309 \begin_layout Itemize
4310 Remove errant tab from joystick message.
4313 \begin_layout Subsection
4317 \begin_layout Itemize
4318 Make autofire operate in absolute time, not linear time
4321 \begin_layout Itemize
4322 Reinitialize controls when resuming from loadstate
4325 \begin_layout Itemize
4326 Some more code cleanups
4329 \begin_layout Itemize
4330 If Lua allocator fails, call OOM_panic()
4333 \begin_layout Itemize
4334 Byte/word/dword/qword sized host memory write/read functions.
4337 \begin_layout Itemize
4338 Dump at correct framerate if dumping interlaced NTSC (height=448).
4341 \begin_layout Subsection
4345 \begin_layout Itemize
4346 Actually include the complete source code
4349 \begin_layout Itemize
4353 \begin_layout Subsection
4357 \begin_layout Itemize
4358 Document {save,start}time.{,sub}second.
4361 \begin_layout Itemize
4362 Intercept time() from bsnes core.
4365 \begin_layout Subsection
4369 \begin_layout Itemize
4370 Allow disabling time() interception (allow build on Mac OS X)
4373 \begin_layout Itemize
4374 Use SDLMain on Mac OS X (make SDL not crash)
4377 \begin_layout Itemize
4378 Disable delayed resets (just plain too buggy for now).
4381 \begin_layout Itemize
4385 \begin_layout Itemize
4386 Use 16-bit for graphics/video instead of 32-bit.
4389 \begin_layout Itemize
4390 gui.rectangle/gui.pixel
4393 \begin_layout Itemize
4397 \begin_layout Itemize
4398 New CSCD writer implementation.
4401 \begin_layout Subsection
4405 \begin_layout Itemize
4406 Fix interaction of * and +.
4409 \begin_layout Itemize
4413 \begin_layout Itemize
4414 Use gettimeofday()/usleep(), these seem portable enough.
4417 \begin_layout Itemize
4418 Move joystick axis manipulation to keymapper code.
4421 \begin_layout Itemize
4422 Changes to how read-only works.
4425 \begin_layout Itemize
4426 Refactor controller input code.
4429 \begin_layout Subsection
4433 \begin_layout Itemize
4434 Fix mouseclick scale compensation.
4437 \begin_layout Itemize
4438 Draw area boundaries correctly in SDL code.
4441 \begin_layout Itemize
4445 \begin_layout Itemize
4446 Fix CSCD output (buffer overrun and race condition).
4449 \begin_layout Subsection
4453 \begin_layout Itemize
4454 JMD dumping support.
4457 \begin_layout Itemize
4458 Allow unattended dumping to JMD.
4461 \begin_layout Itemize
4465 \begin_layout Itemize
4466 Switch back to 32-bit colors.
4469 \begin_layout Itemize
4470 Add Lua function gui.color.
4473 \begin_layout Itemize
4474 Use some new C++11 features in GCC 4.6.
4477 \begin_layout Itemize
4478 Be prepared for core frequency changes.
4481 \begin_layout Itemize
4482 Pass colors in one chunk from Lua.
4485 \begin_layout Subsection
4489 \begin_layout Itemize
4490 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4491 memory.read_vma() and memory.find_vma().
4494 \begin_layout Itemize
4495 Numerious documentation fixups
4498 \begin_layout Itemize
4499 RTC time format changed
4502 \begin_layout Itemize
4503 Reformat flags display
4506 \begin_layout Itemize
4507 Allow lua package name to be overridden
4510 \begin_layout Itemize
4511 SDUMP (high-quality dumping).
4514 \begin_layout Itemize
4515 Split platform support to plugins.
4518 \begin_layout Itemize
4519 Make all sound plugins support basic sound commands
4522 \begin_layout Itemize
4523 Support portaudio for sound.
4526 \begin_layout Itemize
4527 Allow disable Lua/SDL searching.
4530 \begin_layout Itemize
4531 Upconvert colors when copying lcscreen to screen.
4534 \begin_layout Itemize
4535 Reorganize source tree.
4538 \begin_layout Itemize
4539 Evdev joystick support.
4542 \begin_layout Itemize
4543 Refactor more code into generic window code.
4546 \begin_layout Subsection
4550 \begin_layout Itemize
4551 Refactor message handling.
4554 \begin_layout Itemize
4558 \begin_layout Itemize
4562 \begin_layout Itemize
4563 Finish pending saves before load/quit.
4566 \begin_layout Itemize
4567 Wxwidgets graphics plugin.
4570 \begin_layout Subsection
4574 \begin_layout Itemize
4575 Get rid of win32-crap.[ch]pp.
4578 \begin_layout Itemize
4579 Move files around a lot.
4582 \begin_layout Itemize
4583 Get rid of need for host C++ compiler.
4586 \begin_layout Itemize
4590 \begin_layout Itemize
4591 Refactor inter-component communication.
4594 \begin_layout Itemize
4598 \begin_layout Itemize
4599 Fix crash on multiline aliases.
4602 \begin_layout Itemize
4603 Load/Save settings in wxwidgets gui.
4606 \begin_layout Subsection
4610 \begin_layout Itemize
4611 Patch problems in bsnes core
4614 \begin_layout Itemize
4615 SNES is little-endian, not big-endian!
4618 \begin_layout Itemize
4619 Fix memory corruption in lcscreen::load()
4622 \begin_layout Subsection
4626 \begin_layout Itemize
4627 Fix interpretting repeat counts in rrdata loading.
4630 \begin_layout Itemize
4631 New lua callback: on_frame()
4634 \begin_layout Itemize
4635 Remove calls to runtosave() that aren't supposed to be there
4638 \begin_layout Itemize
4639 Lua function: movie.read_rtc()
4642 \begin_layout Itemize
4643 Ignore src/fonts/font.cpp
4646 \begin_layout Itemize
4647 Fix more bsnes core problems
4650 \begin_layout Itemize
4651 Control bsnes random seeding
4654 \begin_layout Itemize
4658 \begin_layout Itemize
4659 Some bsnes core debugging features (state dump and state hash)
4662 \begin_layout Itemize
4663 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4664 it was 'lsnes rr0-beta21').
4667 \begin_layout Subsection
4671 \begin_layout Itemize
4672 Fix memory corruption due to macro/field mixup
4675 \begin_layout Itemize
4676 search-memory update
4679 \begin_layout Itemize
4680 Allow direct-mapped framebuffer
4683 \begin_layout Itemize
4684 SDL: Use SDL_ANYFORMAT if possible
4687 \begin_layout Itemize
4688 SDMP2SOX: 2s delay modes.
4691 \begin_layout Itemize
4695 \begin_layout Itemize
4696 Use sed -E, not sed -r.
4697 Fixes building on Mac OS X.
4700 \begin_layout Itemize
4701 Wxwidgets: Save jukebox on exit
4704 \begin_layout Itemize
4705 Fix RTC if using load-movie on savestate.
4708 \begin_layout Itemize
4709 Fix crash related to full console mode.
4712 \begin_layout Subsection
4716 \begin_layout Itemize
4717 Wxwidgets: Allow bringing application to foreground on Mac OS X.
4720 \begin_layout Itemize
4721 Wxwidgets: Allow compiling on Mac OS X.
4724 \begin_layout Itemize
4725 Use movie compare instead of movie hashing (faster save/load).
4728 \begin_layout Itemize
4732 \begin_layout Subsection
4736 \begin_layout Itemize
4737 sdmp2sox: Pad soundtrack if using -l or -L.
4740 \begin_layout Itemize
4741 sdmp2sox: Fix NTSC overscan.
4744 \begin_layout Itemize
4745 sdmp2sox: Add AR correction mode.
4748 \begin_layout Itemize
4749 call lua_close() when exiting.
4752 \begin_layout Itemize
4753 Fix zip_writer bug causing warnings from info-zip and error from advzip.
4756 \begin_layout Subsection
4760 \begin_layout Itemize
4761 Fix IPS patching code (use bsnes core IPS patcher).
4764 \begin_layout Itemize
4765 Implement BPS patching (using bsnes core IPS patcher).
4768 \begin_layout Itemize
4769 Add feature to load headered ROMs.
4772 \begin_layout Subsection
4776 \begin_layout Itemize
4777 Show command names when showing keybindings
4780 \begin_layout Subsection
4784 \begin_layout Itemize
4785 Fix pause-on-end to be actually controllable
4788 \begin_layout Itemize
4789 SDL: Poll all events in queue, not just first one (fixes slowness in command
4793 \begin_layout Itemize
4794 Wxwidgets: Fix ROM loading.