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
108 \begin_layout Standard
109 Set the mapping XML file for main cartridge ROM.
110 If not specified, defaults are used.
113 \begin_layout Subsubsection
117 \begin_layout Standard
118 Load <file> (BS file format) as BS-X non-slotted flash memory.
119 Also sets system type to BS-X non-slotted (not compatible with --bsxslotted=<fi
120 le>, --dmg=<file>, --slot-a=<file> nor --slot-b=<file>).
123 \begin_layout Subsubsection
127 \begin_layout Standard
128 Set mapping XML file for BS-X non-slotted flash memory.
129 If not specified, defaults are used.
130 Only can be used together with --bsx=<file>.
133 \begin_layout Subsubsection
137 \begin_layout Standard
138 Load <file> (BS file format) as BS-X slotted flash memory.
139 Also sets system type to BS-X slotted (not compatible with --bsx=<file>,
140 --dmg=<file>, --slot-a=<file> nor --slot-b=<file>).
143 \begin_layout Subsubsection
144 --bsxslotted-xml=<file>
147 \begin_layout Standard
148 Set mapping XML file for BS-X slotted flash memory.
149 If not specified, defaults are used.
150 Only can be used together with --bsxslotted=<file>.
153 \begin_layout Subsubsection
157 \begin_layout Standard
158 Load <file> (GB file format) as Game Boy ROM.
159 Also sets system type to SGB (not compatible with --bsx=<file>, --bsxslotted=<f
160 ile>, --slot-a=<file> nor --slot-b=<file>).
163 \begin_layout Subsubsection
167 \begin_layout Standard
168 Set mapping XML file for Game Boy ROM.
169 If not specified, defaults are used.
170 Only can be used together with --dmg=<file>.
173 \begin_layout Subsubsection
177 \begin_layout Standard
178 Load <file> (ST file format) as Sufami turbo cartridge A ROM.
179 Also sets system type to Sufami Turbo (not compatible with --bsx=<file>,
180 --bsxslotted=<file> nor --dmg=<file>).
183 \begin_layout Subsubsection
187 \begin_layout Standard
188 Set mapping XML file for Sufami turbo cartridge A ROM.
189 If not specified, defaults are used.
190 Only can be used together with --slot-a=<file>.
193 \begin_layout Subsubsection
197 \begin_layout Standard
198 Load <file> (ST file format) as Sufami turbo cartridge B ROM.
199 Also sets system type to Sufami Turbo (not compatible with --bsx=<file>,
200 --bsxslotted=<file> nor --dmg=<file>).
203 \begin_layout Subsubsection
207 \begin_layout Standard
208 Set mapping XML file for Sufami turbo cartridge B ROM.
209 If not specified, defaults are used.
210 Only can be used together with --slot-b=<file>.
213 \begin_layout Subsubsection
217 \begin_layout Standard
218 Apply IPS patch <file> to main cartridge ROM.
219 Requires --rom=<file>.
222 \begin_layout Subsubsection
226 \begin_layout Standard
227 Apply IPS patch <file> to main cartridge ROM mapping XML.
228 Requires --rom-xml=<file>.
231 \begin_layout Subsubsection
235 \begin_layout Standard
236 Apply IPS patch <file> to BS-X non-slotted flash.
237 Requires --bsx=<file>.
240 \begin_layout Subsubsection
244 \begin_layout Standard
245 Apply IPS patch <file> to BS-X non-slotted flash mapping XML.
246 Requires --bsx-xml=<file>.
249 \begin_layout Subsubsection
250 --ips-bsxslotted=<file>
253 \begin_layout Standard
254 Apply IPS patch <file> to BS-X slotted flash.
255 Requires --bsxslotted=<file>.
258 \begin_layout Subsubsection
259 --ips-bsxslotted-xml=<file>
262 \begin_layout Standard
263 Apply IPS patch <file> to BS-X slotted flash mapping XML.
264 Requires --bsxslotted-xml=<file>.
267 \begin_layout Subsubsection
271 \begin_layout Standard
272 Apply IPS patch <file> to Game Boy ROM.
273 Requires --dmg=<file>.
276 \begin_layout Subsubsection
280 \begin_layout Standard
281 Apply IPS patch <file> to Game Boy ROM mapping XML.
282 Requires --dmg-xml=<file>.
285 \begin_layout Subsubsection
289 \begin_layout Standard
290 Apply IPS patch <file> to Sufami turbo cartridge A ROM.
291 Requires --slot-a=<file>.
294 \begin_layout Subsubsection
295 --ips-slot-a-xml=<file>
298 \begin_layout Standard
299 Apply IPS patch <file> to Sufami turbo cartridge A ROM mapping XML.
300 Requires --slot-a-xml=<file>.
303 \begin_layout Subsubsection
307 \begin_layout Standard
308 Apply IPS patch <file> to Sufami turbo cartridge B ROM.
309 Requires --slot-b=<file>.
312 \begin_layout Subsubsection
313 --ips-slot-b-xml=<file>
316 \begin_layout Standard
317 Apply IPS patch <file> to Sufami turbo cartridge B ROM mapping XML.
318 Requires --slot-b-xml=<file>.
321 \begin_layout Subsubsection
322 --ips-offset=<offset>
325 \begin_layout Standard
326 Set IPS apply offset to <offset> (can be negative).
327 IPS apply offset is added to all addresses inside IPS file before applying.
328 If the resulting address is negative, write is ignored (with a warning).
329 If resulting address exceeds ROM size, the ROM is extended.
332 \begin_layout Subsubsection
336 \begin_layout Standard
337 Force ROM to be considered PAL-only (warning: Will cause error if used on
338 anything except SNES and SGB).
341 \begin_layout Subsubsection
345 \begin_layout Standard
346 Force ROM to be considered NTSC-only (default for everything except SNES
350 \begin_layout Subsection
351 New session options (lsnes.exe only)
354 \begin_layout Standard
355 If filename is not specified, new session is started.
356 These options control the properties of new session:
359 \begin_layout Subsubsection
363 \begin_layout Standard
368 \begin_layout Itemize
369 none: No device connected
372 \begin_layout Itemize
373 gamepad: One gamepad (the default)
376 \begin_layout Itemize
377 multitap: Four gamepads (warning: makes most games refuse to start)
380 \begin_layout Itemize
384 \begin_layout Subsubsection
388 \begin_layout Standard
393 \begin_layout Itemize
394 none: No device connected (the default)
397 \begin_layout Itemize
401 \begin_layout Itemize
402 multitap: Four gamepads.
405 \begin_layout Itemize
409 \begin_layout Itemize
410 superscope: Super Scope
413 \begin_layout Itemize
414 justifier: One justifier
417 \begin_layout Itemize
418 justifiers: Two justifiers
421 \begin_layout Subsubsection
425 \begin_layout Standard
426 Set the name of game to <name>
429 \begin_layout Subsubsection
433 \begin_layout Standard
434 Add author with full name of <name> (no nickname).
437 \begin_layout Subsubsection
441 \begin_layout Standard
442 Add author with nickname of <name> (no full name).
445 \begin_layout Subsubsection
446 --author=<fullname>|<nickname>
449 \begin_layout Standard
450 Add author with full name of <fullname> and nickname of <nickname>.
453 \begin_layout Subsubsection
457 \begin_layout Standard
458 Set RTC second (0 is 1st January 1970 00:00:00Z).
461 \begin_layout Subsubsection
462 --rtc-subsecond=<value>
465 \begin_layout Standard
471 \begin_layout Subsection
475 \begin_layout Standard
476 If filename is specified on command line, it is loaded as initial state
477 (instead of constructing one).
478 Mandatory for lsnes-avidump.exe and movieinfo.exe.
481 \begin_layout Subsection
486 \begin_layout Subsubsection
487 --run=<file> (lsnes.exe only)
490 \begin_layout Standard
491 After running main RC file, run this file.
492 If multiple are specified, these execute in order specified.
495 \begin_layout Subsection
496 dump options (lsnes-avidump.exe only)
499 \begin_layout Subsubsection
503 \begin_layout Standard
506 \begin_inset Quotes eld
510 \begin_inset Quotes erd
516 \begin_layout Subsubsection
520 \begin_layout Standard
521 Set compression level (0-18).
525 \begin_layout Subsubsection
529 \begin_layout Standard
530 Set number of frames to dump.
534 \begin_layout Subsubsection
538 \begin_layout Standard
539 Run specified lua script (lsnes-avidump.exe does not have initialization
543 \begin_layout Subsubsection
547 \begin_layout Standard
548 Use JMD dumping instead of AVI dumping.
551 \begin_layout Section
552 Startup file lsnes.rc
555 \begin_layout Standard
556 Upon startup, lsnes (lsnes.exe only) executes file lsnes.rc as commands.
557 This file is located in:
560 \begin_layout Itemize
565 lsnes.rc (if %APPDATA% exists)
568 \begin_layout Itemize
569 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
572 \begin_layout Itemize
573 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
576 \begin_layout Itemize
577 All: ./lsnes.rc (fallback default).
580 \begin_layout Standard
581 If leading directories do not exist, attempt to create them is made.
584 \begin_layout Section
585 Game internal commands
588 \begin_layout Itemize
589 Commands beginning with '*' invoke the corresponding command without alias
593 \begin_layout Itemize
594 If command starts with '+' (after possible '*'), the command is executed
595 as-is when button is pressed, and when button is released, it is executed
596 with '+' replaced by '-'.
599 \begin_layout Subsection
603 \begin_layout Standard
604 Settings control various aspects of emulator behaviour.
607 \begin_layout Subsubsection
608 set-setting <setting> <value>
611 \begin_layout Standard
612 Sets setting <setting> to value <value> (may be empty).
615 \begin_layout Subsubsection
616 unset-setting <setting>
619 \begin_layout Standard
620 Try to unset setting <setting> (not all settings can be unset).
623 \begin_layout Subsubsection
624 get-setting <setting>
627 \begin_layout Standard
628 Read value of setting <setting>
631 \begin_layout Subsubsection
635 \begin_layout Standard
636 Print names and values of all settings.
639 \begin_layout Subsection
643 \begin_layout Standard
644 Keybindings bind commands or aliases to keys (or pseudo-keys).
648 \begin_layout Standard
652 \begin_layout Itemize
653 Do not bind edge active (+/-) commands to keys with modifiers, that won't
657 \begin_layout Itemize
658 Names of keys and modifiers are platform-dependent.
661 \begin_layout Itemize
662 Be careful before binding pseudo-keys (such as joystick axes, buttons or
663 hats) with modifiers.
664 That may or may not work right.
667 \begin_layout Subsubsection
668 bind-key [<mod>/<modmask>] <key> <command>
671 \begin_layout Standard
672 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
673 ed list) are set as <mod> (comma-seperated list).
676 \begin_layout Standard
677 The names of keys and modifiers are platform-dependent.
680 \begin_layout Subsubsection
681 unbind-key [<mod>/<modmask>] <key>
684 \begin_layout Standard
685 Unbind command from <key> (with specified <mod> and <modmask>).
688 \begin_layout Subsubsection
689 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
690 | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
691 [plus=<val>] [tolerance=<val>]
694 \begin_layout Standard
695 Set axis parameters for axis <axis>.
698 \begin_layout Itemize
699 disabled: Disable axis
702 \begin_layout Itemize
706 \begin_layout Itemize
707 axis-inverse: Inverse axis
710 \begin_layout Itemize
711 pressure0-: Pressure sensitive.
712 Released at 0, pressed at -.
715 \begin_layout Itemize
716 pressure0+: Pressure sensitive.
717 Released at 0, pressed at +.
720 \begin_layout Itemize
721 pressure-0: Pressure sensitive.
722 Released at -, pressed at 0.
725 \begin_layout Itemize
726 pressure-+: Pressure sensitive.
727 Released at -, pressed at +.
730 \begin_layout Itemize
731 pressure+0: Pressure sensitive.
732 Released at +, pressed at 0.
735 \begin_layout Itemize
736 pressure+-: Pressure sensitive.
737 Released at +, pressed at -.
740 \begin_layout Itemize
741 minus=<val>: Calibration at extreme minus position (-32768-32767)
744 \begin_layout Itemize
745 zero=<val>: Calibration at neutral position (-32768-32767)
748 \begin_layout Itemize
749 plus=<val>: Calibration at extreme plus position (-32768-32767)
752 \begin_layout Itemize
753 tolerance=<value>: Center band tolerance (0<x<1).
754 The smaller the value, the more sensitive the control is.
757 \begin_layout Subsubsection
761 \begin_layout Standard
762 Print all key bindings in effect.
765 \begin_layout Subsection
769 \begin_layout Standard
770 Aliases bind command to sequence of commands.
771 After alias has been defined, it replaces the command it shadows.
774 \begin_layout Standard
778 \begin_layout Itemize
779 You can't alias command to itself.
782 \begin_layout Itemize
783 Aliases starting with +/- are edge active just like ordinary commands starting
787 \begin_layout Itemize
788 One command can be aliased to multiple commands.
791 \begin_layout Subsubsection
792 alias-command <command> <expansion>
795 \begin_layout Standard
796 Append <expansion> to alias <command>.
797 If alias does not already exist, it is created.
800 \begin_layout Subsubsection
801 unalias-command <command>
804 \begin_layout Standard
805 Clear alias expansion for <command>.
808 \begin_layout Subsubsection
812 \begin_layout Standard
813 Print all aliases and their expansions in effect.
816 \begin_layout Subsection
817 run-script <script> (implemented for wxwidgets)
820 \begin_layout Standard
821 Run <script> as if commands were entered on the command line.
824 \begin_layout Subsection
828 \begin_layout Standard
829 Following commands control AVI video dumping:
832 \begin_layout Subsubsection
833 dump-avi <level> <prefix>
836 \begin_layout Standard
837 Dump AVI video to prefix <prefix> at level <level> (0-18).
841 \begin_layout Itemize
842 The codec is Camstudio Codec in gzip mode.
845 \begin_layout Itemize
846 Encoder and muxer are internal, available on all platforms.
849 \begin_layout Itemize
850 Audio enable/disable and framerate has no effect.
853 \begin_layout Itemize
854 Levels 10-18 are not compatible with AVISource.
857 \begin_layout Itemize
858 Recomended level is 7 if decoded by AVISource.
861 \begin_layout Itemize
862 Recomended level is 16 if decoded by ffmpeg, mencoder or FFMpegSource.
865 \begin_layout Itemize
866 Dumps of low-res PAL games are 256x239 (with all the consequences odd height
870 \begin_layout Itemize
871 The audio dumped to .avi is low-quality version.
872 The high-quality version is dumped to .sox file.
875 \begin_layout Subsubsection
879 \begin_layout Standard
880 End current AVI video dump (closing the emulator also closes the dump).
883 \begin_layout Subsection
887 \begin_layout Standard
888 Following commands control JMD video dumping:
891 \begin_layout Subsubsection
892 dump-jmd <level> <file>
895 \begin_layout Standard
896 Dump JMD video to file <file> at level <level> (0-9).
899 \begin_layout Subsubsection
903 \begin_layout Standard
904 End the current JMD dump in progress.
907 \begin_layout Subsection
911 \begin_layout Standard
912 <address> may be decimal or hexadecimal (prefixed with '0x').
913 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
917 \begin_layout Standard
918 The available element <sizes> are:
921 \begin_layout Itemize
925 \begin_layout Itemize
929 \begin_layout Itemize
933 \begin_layout Itemize
937 \begin_layout Standard
938 When reading RAM and ROM, multi-byte reads/writes are big-endian.
939 When dealing with DSP memory, multi-byte reads/writes are native-endian
940 (do not use operand sizes exceeding DSP bitness, except dword is OK for
944 \begin_layout Subsubsection
945 read-<size> <address>
948 \begin_layout Standard
949 Read the value of byte in <address>.
952 \begin_layout Subsubsection
953 read-s<size> <address>
956 \begin_layout Standard
957 Read the value of signed byte in <address>.
960 \begin_layout Subsubsection
961 write-<size> <address> <value>
964 \begin_layout Standard
965 Write <value> to byte in address <address>.
968 \begin_layout Subsubsection
972 \begin_layout Standard
973 Reset the memory search
976 \begin_layout Subsubsection
980 \begin_layout Standard
981 Print number of candidates remaining
984 \begin_layout Subsubsection
988 \begin_layout Standard
989 Print all candidates remaining
992 \begin_layout Subsubsection
993 search-memory <usflag><sizeflag><op>
996 \begin_layout Standard
997 Searches memory for addresses satisfying criteria.
1000 \begin_layout Standard
1004 \begin_layout Itemize
1008 \begin_layout Itemize
1012 \begin_layout Standard
1016 \begin_layout Itemize
1020 \begin_layout Itemize
1024 \begin_layout Itemize
1028 \begin_layout Itemize
1032 \begin_layout Standard
1036 \begin_layout Itemize
1037 lt: < previous value.
1040 \begin_layout Itemize
1041 le: <= previous value.
1044 \begin_layout Itemize
1045 eq: = previous value.
1048 \begin_layout Itemize
1049 ne: != previous value.
1052 \begin_layout Itemize
1053 ge: >= previous value.
1056 \begin_layout Itemize
1057 gt: > previous value.
1060 \begin_layout Subsubsection
1061 search-memory <sizeflag> <value>
1064 \begin_layout Standard
1065 Searches for addresses that currently have value <value>.
1066 <sizeflag> is as in previous command.
1069 \begin_layout Subsection
1073 \begin_layout Standard
1074 These commands are not available in lsnesrc, but are available after ROM
1078 \begin_layout Subsubsection
1079 quit-emulator [/y] (implemented for wxwidgets)
1082 \begin_layout Standard
1083 Quits the emulator (asking for confirmation).
1084 If /y is given, no confirmation is asked.
1087 \begin_layout Subsubsection
1088 pause-emulator (implemented for wxwidgets)
1091 \begin_layout Standard
1092 Toggle paused/unpaused
1095 \begin_layout Subsubsection
1096 +advance-frame (implemented for wxwidgets)
1099 \begin_layout Standard
1101 If the button is still held after configurable timeout expires, game unpauses
1102 for the duration frame advance is held.
1105 \begin_layout Subsubsection
1106 +advance-poll (implemented for wxwidgets)
1109 \begin_layout Standard
1111 If the button is still held after configurable timeout expires, game unpauses
1112 for the duration frame advance is held.
1115 \begin_layout Subsubsection
1116 advance-skiplag (implemented for wxwidgets)
1119 \begin_layout Standard
1120 Skip to first poll in frame after current.
1123 \begin_layout Subsubsection
1124 reset (implemented for wxwidgets)
1127 \begin_layout Standard
1128 Reset the SNES after this frame.
1131 \begin_layout Subsubsection
1132 load <filename> (implemented for wxwidgets)
1135 \begin_layout Standard
1136 Load savestate <filename> in current mode.
1139 \begin_layout Subsubsection
1140 load-state <filename> (implemented for wxwidgets)
1143 \begin_layout Standard
1144 Load savestate <filename> in readwrite mode.
1147 \begin_layout Subsubsection
1148 load-readonly <filename> (implemented for wxwidgets)
1151 \begin_layout Standard
1152 Load savestate <filename> in readonly mode.
1155 \begin_layout Subsubsection
1156 load-preserve <filename> (implemented for wxwidgets)
1159 \begin_layout Standard
1160 Load savestate <filename> in readonly mode, preserving current events.
1163 \begin_layout Subsubsection
1164 load-movie <filename> (implemented for wxwidgets)
1167 \begin_layout Standard
1168 Load savestate <filename>, ignoring save part in readonly mode.
1171 \begin_layout Subsubsection
1172 save-state <filename> (implemented for wxwidgets)
1175 \begin_layout Standard
1176 Save system state to <filename> as soon as possible.
1179 \begin_layout Subsubsection
1180 save-movie <filename> (implemented for wxwidgets)
1183 \begin_layout Standard
1184 Save movie to <filename>.
1187 \begin_layout Subsubsection
1188 set-rwmode (implemented for wxwidgets)
1191 \begin_layout Standard
1192 Set read-write mode.
1195 \begin_layout Subsubsection
1196 set-romode (implemented for wxwidgets)
1199 \begin_layout Standard
1203 \begin_layout Subsubsection
1204 toggle-rwmode (implemented for wxwidgets)
1207 \begin_layout Standard
1208 Toggle between read-only and read-write modes.
1211 \begin_layout Subsubsection
1212 set-gamename <name> (implemented for wxwidgets)
1215 \begin_layout Standard
1216 Set name of the game to <name>
1219 \begin_layout Subsubsection
1220 get-gamename (implemented for wxwidgets)
1223 \begin_layout Standard
1224 Print the name of the game.
1227 \begin_layout Subsubsection
1228 add-author <author> (implemented for wxwidgets)
1231 \begin_layout Standard
1232 Adds new author <author>.
1233 If <author> does not contain '|' it is full name.
1234 If it contains '|', '|' splits the full name and nickname.
1237 \begin_layout Subsubsection
1238 edit-author <num> <author> (implemented for wxwidgets)
1241 \begin_layout Standard
1242 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1246 \begin_layout Subsubsection
1247 remove-author <num> (implemented for wxwidgets)
1250 \begin_layout Standard
1251 Remove author in slot <num>
1254 \begin_layout Subsubsection
1255 print-authors (implemented for wxwidgets)
1258 \begin_layout Standard
1262 \begin_layout Subsubsection
1263 test-1, test-2, test-3 (N/A for wxwidgets)
1266 \begin_layout Standard
1267 Internal test commands.
1271 \begin_layout Subsubsection
1272 take-screenshot <filename> (implemented for wxwidgets)
1275 \begin_layout Standard
1276 Save screenshot to <filename>.
1279 \begin_layout Subsubsection
1280 +controller<num><button> (N/A for wxwidgets)
1283 \begin_layout Standard
1284 Press button <button> on controller <num> (1-8).
1285 The following button names are known:
1288 \begin_layout Itemize
1292 \begin_layout Itemize
1296 \begin_layout Itemize
1300 \begin_layout Itemize
1304 \begin_layout Itemize
1308 \begin_layout Itemize
1312 \begin_layout Itemize
1316 \begin_layout Itemize
1320 \begin_layout Itemize
1324 \begin_layout Itemize
1328 \begin_layout Itemize
1332 \begin_layout Itemize
1336 \begin_layout Itemize
1340 \begin_layout Itemize
1344 \begin_layout Itemize
1348 \begin_layout Itemize
1352 \begin_layout Subsubsection
1353 controllerh<num><button>
1356 \begin_layout Standard
1357 Hold/unhold button <button> on controller <num> (1-8).
1358 See +controller for button names.
1361 \begin_layout Subsubsection
1362 autofire (<pattern>|-)...
1366 \begin_layout Standard
1367 Set autofire pattern.
1368 Each parameter is comma-separated list of button names (in form of 1start,
1369 1A, 2B, etc..) to hold on that frame.
1370 After reaching the end of pattern, the pattern restarts from the beginning.
1373 \begin_layout Subsubsection
1374 repaint (N/A for wxwidgets)
1377 \begin_layout Standard
1381 \begin_layout Subsection
1382 Save jukebox (implemented for wxwidgets)
1385 \begin_layout Subsubsection
1386 cycle-jukebox-backward (N/A for wxwidgets)
1389 \begin_layout Standard
1390 Cycle save jukebox backwards.
1393 \begin_layout Subsubsection
1394 cycle-jukebox-forward (N/A for wxwidgets)
1397 \begin_layout Standard
1398 Cycle save jukebox forwards
1401 \begin_layout Subsubsection
1402 add-jukebox-save <filename> (N/A for wxwidgets)
1405 \begin_layout Standard
1406 Add <filename> to jukebox saves.
1409 \begin_layout Subsubsection
1410 load-jukebox (N/A for wxwidgets)
1413 \begin_layout Standard
1414 Do load from jukebox (current mode).
1417 \begin_layout Subsubsection
1418 save-jukebox (N/A for wxwidgets)
1421 \begin_layout Standard
1422 Do state save to jukebox.
1425 \begin_layout Subsection
1426 Lua (implemented for wxwidgets)
1429 \begin_layout Standard
1430 Only available if lua support is compiled in.
1433 \begin_layout Subsubsection
1434 <<<<<<< HEADevaluate-lua <luacode>=======eval-lua <luacode> (implemented
1435 for wxwidgets)>>>>>>> Wxwidgets Graphics plugin WIP
1438 \begin_layout Standard
1439 Run Lua code <luacode> using built-in Lua interpretter.
1442 \begin_layout Subsubsection
1443 run-lua <script> (implemented for wxwidgets)
1446 \begin_layout Standard
1447 Run specified lua file using built-in Lua interpretter.
1450 \begin_layout Subsection
1454 \begin_layout Subsubsection
1455 add-watch <name> <expression>
1458 \begin_layout Standard
1459 Adds new watch (or modifies old one).
1462 \begin_layout Subsubsection
1466 \begin_layout Standard
1470 \begin_layout Subsection
1471 Sound (implemented for wxwidgets)
1474 \begin_layout Subsubsection
1475 enable-sound <on/off> (implemented for wxwidgets)
1478 \begin_layout Standard
1479 Enable/Disable sound.
1482 \begin_layout Subsubsection
1483 set-sound-device <device> (implemented for wxwidgets)
1486 \begin_layout Standard
1487 Set sound device to <device>
1490 \begin_layout Subsubsection
1491 show-sound-status (implemented for wxwidgets)
1494 \begin_layout Standard
1495 Show status of sound system.
1498 \begin_layout Subsubsection
1499 show-sound-devices (N/A for wxwidgets)
1502 \begin_layout Standard
1503 Show all available devices.
1506 \begin_layout Subsection
1507 SDL Platform commands (implemented for wxwidgets)
1510 \begin_layout Standard
1511 The following are valid on SDL platform.
1514 \begin_layout Subsubsection
1515 identify-key (N/A for wxwidgets)
1518 \begin_layout Standard
1519 Asks to press a key and then identifies that (pseudo-)key.
1522 \begin_layout Subsubsection
1523 toggle-console (N/A for wxwidgets)
1526 \begin_layout Standard
1527 Toggle between windowed/fullscreen console.
1530 \begin_layout Subsubsection
1531 scroll-fullup (N/A for wxwidgets)
1534 \begin_layout Standard
1535 Scroll messages window as far back as it goes.
1538 \begin_layout Subsubsection
1539 scroll-fulldown (N/A for wxwidgets)
1542 \begin_layout Standard
1543 Scroll messages window as far forward as it goes.
1546 \begin_layout Subsubsection
1547 scroll-up (N/A for wxwidgets)
1550 \begin_layout Standard
1551 Scroll messages window back one screenful.
1554 \begin_layout Subsubsection
1555 scroll-down (N/A for wxwidgets)
1558 \begin_layout Standard
1559 Scroll messages window forward one screenful.
1562 \begin_layout Section
1566 \begin_layout Subsection
1570 \begin_layout Subsubsection
1574 \begin_layout Standard
1575 Set where bsnes looks for firmware files.
1577 \begin_inset Quotes eld
1581 \begin_inset Quotes erd
1587 \begin_layout Subsubsection
1591 \begin_layout Standard
1593 Numeric, range is 0.001 to
1594 \begin_inset Quotes eld
1598 \begin_inset Quotes erd
1602 Default is native framerate.
1605 \begin_layout Subsubsection
1609 \begin_layout Standard
1610 Set save compression level (integer 0-9).
1611 Default is 7 (0 is no compression).
1614 \begin_layout Subsubsection
1618 \begin_layout Standard
1619 Set the frame advance timeout in milliseconds.
1620 Numeric integer, range is 0-999999999.
1624 \begin_layout Subsection
1628 \begin_layout Subsubsection
1632 \begin_layout Standard
1633 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1637 \begin_layout Subsubsection
1641 \begin_layout Standard
1642 AVI dumper: Set the default left border thickness (unless lua overrides)
1648 \begin_layout Subsubsection
1652 \begin_layout Standard
1653 AVI dumper: Set the default right border thickness (unless lua overrides)
1659 \begin_layout Subsubsection
1663 \begin_layout Standard
1664 AVI dumper: Set the default top border thickness (unless lua overrides)
1670 \begin_layout Subsubsection
1674 \begin_layout Standard
1675 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1681 \begin_layout Subsubsection
1685 \begin_layout Standard
1686 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1691 \begin_layout Subsection
1692 SDL platform settings
1695 \begin_layout Subsubsection
1696 autorepeat-first-delay
1699 \begin_layout Standard
1700 Sets the delay for first character in typematic autorepeat.
1703 \begin_layout Subsubsection
1704 autorepeat-subsequent-delay
1707 \begin_layout Standard
1708 Sets the delay for subsequent characters in typematic autorepeat.
1711 \begin_layout Section
1715 \begin_layout Subsection
1716 Core (in main table)
1719 \begin_layout Subsubsection
1723 \begin_layout Standard
1724 Print line to message console.
1727 \begin_layout Subsubsection
1728 exec(string command)
1731 \begin_layout Standard
1732 Run command as it was entered on the command line
1735 \begin_layout Subsection
1739 \begin_layout Standard
1740 Bitwise logical functions and related.
1743 \begin_layout Subsubsection
1744 bit.none(number...) / bit.bnot(number...)
1747 \begin_layout Standard
1748 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1752 \begin_layout Subsubsection
1753 bit.any(number...) / bit.bor(number...)
1756 \begin_layout Standard
1757 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1760 \begin_layout Subsubsection
1761 bit.all(number...) / bit.band(number...)
1764 \begin_layout Standard
1765 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1769 \begin_layout Subsubsection
1770 bit.parity(number...) / bit.bxor(number...)
1773 \begin_layout Standard
1774 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1778 \begin_layout Subsubsection
1779 bit.lrotate(number base[, number amount[, number bits]])
1782 \begin_layout Standard
1783 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1786 \begin_layout Subsubsection
1787 bit.rrotate(number base[, number amount[, number bits]])
1790 \begin_layout Standard
1791 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1795 \begin_layout Subsubsection
1796 bit.lshift(number base[, number amount[, number bits]])
1799 \begin_layout Standard
1800 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1801 The new bits are filled with zeroes.
1804 \begin_layout Subsubsection
1805 bit.lrshift(number base[, number amount[, number bits]])
1808 \begin_layout Standard
1809 Shift bits-bit (max 48, default 48) number logically right by amount (default
1811 The new bits are filled with zeroes.
1814 \begin_layout Subsubsection
1815 bit.arshift(number base[, number amount[, number bits]])
1818 \begin_layout Standard
1819 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1821 The new bits are shifted in with copy of the high bit.
1824 \begin_layout Subsection
1828 \begin_layout Standard
1829 Most of these functions can only be called in on_paint and on_video callbacks.
1830 Exceptions are noted.
1833 \begin_layout Standard
1835 Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1836 16-23 are the red component, bits 24-31 are alpha component (0 is fully
1837 opaque, 255 is almost transparent).
1838 -1 is the fully transparent color.
1839 Alpha values greater than 127 do work.
1842 \begin_layout Standard
1843 Origin of coordinates is at top left corner of game display area.
1844 Left and top gaps correspond to negative coordinates.
1847 \begin_layout Subsubsection
1851 \begin_layout Standard
1852 Returns 2-tuple (hresolution, vresolution).
1855 \begin_layout Subsubsection
1856 gui.<class>_gap(number gap)
1859 \begin_layout Standard
1860 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1864 \begin_layout Subsubsection
1865 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1868 \begin_layout Standard
1869 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1874 \begin_layout Itemize
1875 x: X-coordinate to start the drawing from (and x-coordinate at begining
1879 \begin_layout Itemize
1880 y: Y-coordinate to start the drawing from.
1883 \begin_layout Itemize
1884 text: The text to draw.
1887 \begin_layout Itemize
1888 fgc: Text color (default is 0xFFFFFF (white))
1891 \begin_layout Itemize
1892 bgc: Background color (default is -1 (transparent))
1895 \begin_layout Subsubsection
1896 gui.rectangle(number x, number y, number width, number height[, number thickness[
1897 , number outline[, number fill]]])
1900 \begin_layout Standard
1901 Draw rectangle on the GUI.
1905 \begin_layout Itemize
1906 x: X-coordinate of left edge.
1909 \begin_layout Itemize
1910 y: Y-coordinate of upper edge.
1913 \begin_layout Itemize
1914 width: Width of rectangle.
1917 \begin_layout Itemize
1918 height: Height of rectangle.
1921 \begin_layout Itemize
1922 thickness: Thickness of outline (default is 1).
1925 \begin_layout Itemize
1926 outline: Color of outline (default is 0xFFFFFF (white))
1929 \begin_layout Itemize
1930 fill: Color of fil (default is -1 (transparent))
1933 \begin_layout Subsubsection
1934 gui.pixel(number x, number y[, number color])
1937 \begin_layout Standard
1938 Draw one pixel on the GUI.
1942 \begin_layout Itemize
1943 x: X-coordinate of the pixel
1946 \begin_layout Itemize
1947 y: Y-coordinate of the pixel
1950 \begin_layout Itemize
1951 color: Color of the pixel (default is 0xFFFFFF (white))
1954 \begin_layout Subsubsection
1955 gui.crosshair(number x, number y[, number length[, number color]])
1958 \begin_layout Standard
1963 \begin_layout Itemize
1964 x: X-coordinate of the crosshair
1967 \begin_layout Itemize
1968 y: Y-coordinate of the crosshair
1971 \begin_layout Itemize
1972 length: Length of the crosshair lines (default 10).
1975 \begin_layout Itemize
1976 color: Color of the crosshair (default is 0xFFFFFF (white))
1979 \begin_layout Subsubsection
1980 gui.line(number x1, number y1, number x2, number y2[, number color])
1983 \begin_layout Standard
1988 \begin_layout Itemize
1989 x1: X-coordinate of one end.
1992 \begin_layout Itemize
1993 y1: Y-coordinate of one end.
1996 \begin_layout Itemize
1997 x2: X-coordinate of the other end.
2000 \begin_layout Itemize
2001 y2: Y-coordinate of the other end.
2004 \begin_layout Itemize
2005 color: Color of the line (default is 0xFFFFFF (white)).
2008 \begin_layout Subsubsection
2009 gui.circle(number x, number y, number r[, number thick[, number border[,
2013 \begin_layout Standard
2018 \begin_layout Itemize
2019 x: X-coordinate of the center
2022 \begin_layout Itemize
2023 y: Y-coordinate of the center
2026 \begin_layout Itemize
2027 r: The radius of the circle
2030 \begin_layout Itemize
2031 thick: Border thickness
2034 \begin_layout Itemize
2035 border: Border color (default is 0xFFFFFF (white))
2038 \begin_layout Itemize
2039 fill: Fill color (default is -1 (transparent)).
2042 \begin_layout Subsubsection
2046 \begin_layout Standard
2047 Request on_repaint() to happen as soon as possible.
2048 Can be used anywhere.
2051 \begin_layout Subsubsection
2052 gui.subframe_update(boolean on)
2055 \begin_layout Standard
2056 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2057 or not happen (on=false).
2058 Can be used anywhere.
2061 \begin_layout Subsubsection
2062 gui.screenshot(string filename)
2065 \begin_layout Standard
2066 Write PNG screenshot of the current frame (no drawings) to specified file.
2067 Can be used anywhere.
2070 \begin_layout Subsubsection
2071 gui.color(number r, number g, number b[, number a])
2074 \begin_layout Standard
2075 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2076 each component in scale 0-255.
2077 If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2079 The default alpha is 256.
2082 \begin_layout Subsubsection
2083 gui.status(string name, string value)
2086 \begin_layout Standard
2088 \begin_inset Quotes eld
2092 \begin_inset Quotes erd
2095 to <value> in status area.
2096 Can be used anywhere.
2099 \begin_layout Subsection
2103 \begin_layout Standard
2105 Only available in on_input callback.
2108 \begin_layout Subsubsection
2109 input.get(number controller, number index)
2112 \begin_layout Standard
2113 Read the specified index (0-11) from specified controller (0-7).
2117 \begin_layout Itemize
2118 Uses physical controller numbering.
2119 Gamepad in port 2 is controller 4, not 1!
2122 \begin_layout Subsubsection
2123 input.set(number controller, number index, number value)
2126 \begin_layout Standard
2127 Write the specified index (0-11) from specified controller (0-7), storing
2132 \begin_layout Itemize
2133 Uses physical controller numbering.
2134 Gamepad in port 2 is controller 4, not 1!
2137 \begin_layout Subsubsection
2138 input.reset([number cycles])
2141 \begin_layout Standard
2143 If cycles is greater than zero, do delayed reset.
2144 0 (or no value) causes immediate reset.
2147 \begin_layout Itemize
2148 Only available with subframe flag false.
2151 \begin_layout Subsection
2155 \begin_layout Standard
2156 Host memory handling (extra memory saved to savestates).
2157 Host memory starts empty.
2160 \begin_layout Subsubsection
2161 hostmemory.read(number address)
2164 \begin_layout Standard
2165 Reads hostmemory slot address.
2166 Slot numbers out of range return false instead of numeric.
2169 \begin_layout Subsubsection
2170 hostmemory.write(number address, number value)
2173 \begin_layout Standard
2174 Writes hostmemory slot with 0-255.
2175 Slot numbers out of range cause extension of host memory slot space.
2178 \begin_layout Subsubsection
2179 hostmemory.readbyte(number address)
2182 \begin_layout Standard
2183 Read unsigned byte (1 element) from given address.
2184 Slots out of range return false.
2187 \begin_layout Subsubsection
2188 hostmemory.writebyte(number address, number value)
2191 \begin_layout Standard
2192 Write unsigned byte (1 element) to given slot.
2193 Slot numbers out of range cause extension.
2196 \begin_layout Subsubsection
2197 hostmemory.readsbyte(number address)
2200 \begin_layout Standard
2201 Read signed byte (1 element) from given address.
2202 Slots out of range return false.
2205 \begin_layout Subsubsection
2206 hostmemory.writesbyte(number address, number value)
2209 \begin_layout Standard
2210 Write signed byte (1 element) to given slot.
2211 Slot numbers out of range cause extension.
2214 \begin_layout Subsubsection
2215 hostmemory.readword(number address)
2218 \begin_layout Standard
2219 Read unsigned word (2 elements) from given address.
2220 Slots out of range return false.
2223 \begin_layout Subsubsection
2224 hostmemory.writeword(number address, number value)
2227 \begin_layout Standard
2228 Write unsigned word (2 elements) to given slot.
2229 Slot numbers out of range cause extension.
2232 \begin_layout Subsubsection
2233 hostmemory.readsword(number address)
2236 \begin_layout Standard
2237 Read signed word (2 elements) from given address.
2238 Slots out of range return false.
2241 \begin_layout Subsubsection
2242 hostmemory.writesword(number address, number value)
2245 \begin_layout Standard
2246 Write signed word (2 elements) to given slot.
2247 Slot numbers out of range cause extension.
2250 \begin_layout Subsubsection
2251 hostmemory.readdword(number address)
2254 \begin_layout Standard
2255 Read unsigned doubleword (4 elements) from given address.
2256 Slots out of range return false.
2259 \begin_layout Subsubsection
2260 hostmemory.writedword(number address, number value)
2263 \begin_layout Standard
2264 Write unsigned doubleword (4 elements) to given slot.
2265 Slot numbers out of range cause extension.
2268 \begin_layout Subsubsection
2269 hostmemory.readsdword(number address)
2272 \begin_layout Standard
2273 Read signed doubleword (4 elements) from given address.
2274 Slots out of range return false.
2277 \begin_layout Subsubsection
2278 hostmemory.writesdword(number address, number value)
2281 \begin_layout Standard
2282 Write signed doubleword (4 elements) to given slot.
2283 Slot numbers out of range cause extension.
2286 \begin_layout Subsubsection
2287 hostmemory.readqword(number address)
2290 \begin_layout Standard
2291 Read unsigned quadword (8 elements) from given address.
2292 Slots out of range return false.
2295 \begin_layout Subsubsection
2296 hostmemory.writeqword(number address, number value)
2299 \begin_layout Standard
2300 Write unsigned quadword (4 elements) to given slot.
2301 Slot numbers out of range cause extension.
2304 \begin_layout Subsubsection
2305 hostmemory.readsqword(number address)
2308 \begin_layout Standard
2309 Read signed quadword (8 elements) from given address.
2310 Slots out of range return false.
2313 \begin_layout Subsubsection
2314 hostmemory.writesqword(number address, number value)
2317 \begin_layout Standard
2318 Write signed quadword (8 elements) to given slot.
2319 Slot numbers out of range cause extension.
2322 \begin_layout Subsection
2326 \begin_layout Standard
2330 \begin_layout Subsubsection
2331 movie.currentframe()
2334 \begin_layout Standard
2335 Return number of current frame.
2338 \begin_layout Subsubsection
2342 \begin_layout Standard
2343 Return number of frames in movie.
2346 \begin_layout Subsubsection
2350 \begin_layout Standard
2351 Return true if in readonly mode, false if in readwrite.
2354 \begin_layout Subsubsection
2355 movie.set_readwrite()
2358 \begin_layout Standard
2359 Set readwrite mode (does not cause on_readwrite callback).
2362 \begin_layout Subsubsection
2363 movie.frame_subframes(number frame)
2366 \begin_layout Standard
2367 Count number of subframes in specified frame (frame numbers are 1-based)
2371 \begin_layout Subsubsection
2372 movie.read_subframe(number frame, number subframe)
2375 \begin_layout Standard
2376 Read specifed subframe in specified frame and return data as array (100
2377 elements, numbered 0-99 currently).
2380 \begin_layout Subsection
2384 \begin_layout Standard
2385 Routines for settings manipulation
2388 \begin_layout Subsubsection
2389 settings.get(string name)
2392 \begin_layout Standard
2393 Get value of setting.
2394 If setting is blank, returns false.
2395 If setting value can't be obtained, returns (nil, error message).
2398 \begin_layout Subsubsection
2399 settings.set(string name, string value)
2402 \begin_layout Standard
2403 Set value of setting.
2404 If setting can't be set, returns (nil, error message).
2407 \begin_layout Subsubsection
2408 settings.is_set(string name)
2411 \begin_layout Standard
2412 Returns if setting is set.
2413 If setting does not exist, returns (nil, error message).
2416 \begin_layout Subsubsection
2417 settings.blank(string name)
2420 \begin_layout Standard
2421 Blanks a setting and returns true.
2422 If setting can't be blanked, returns (nil, error message).
2425 \begin_layout Subsection
2429 \begin_layout Standard
2430 Contains various functions for managing memory
2433 \begin_layout Subsubsection
2437 \begin_layout Standard
2438 Returns the number of VMAs
2441 \begin_layout Subsubsection
2442 memory.read_vma(number index)
2445 \begin_layout Standard
2446 Reads the specified VMA (indices start from zero).
2447 Trying to read invalid VMA gives nil.
2448 The read VMA is table with the following fields:
2451 \begin_layout Itemize
2452 region_name (string): The readable name of the VMA
2455 \begin_layout Itemize
2456 baseaddr (number): Base address of the VMA
2459 \begin_layout Itemize
2460 lastaddr (number): Last address in the VMA.
2463 \begin_layout Itemize
2464 size (number): The size of VMA in bytes.
2467 \begin_layout Itemize
2468 readonly (boolean): True of the VMA corresponds to ROM.
2471 \begin_layout Itemize
2472 native_endian (boolean): True if the VMA has native endian as opposed to
2476 \begin_layout Subsubsection
2477 memory.find_vma(number address)
2480 \begin_layout Standard
2481 Finds the VMA containing specified address.
2482 Returns table in the same format as read_vma or nil if not found.
2485 \begin_layout Subsubsection
2486 memory.readbyte(number address)
2489 \begin_layout Standard
2490 Reads the specified address as unsigned byte and returns the result.
2493 \begin_layout Subsubsection
2494 memory.readsbyte(number address)
2497 \begin_layout Standard
2498 Reads the specified address as signed byte and returns the result.
2501 \begin_layout Subsubsection
2502 memory.writebyte(number address, number value)
2505 \begin_layout Standard
2506 Writes the specified value (negative values undergo 2's complement) to specified
2507 address (as a byte).
2510 \begin_layout Subsubsection
2511 memory.readword(number address)
2514 \begin_layout Standard
2515 Reads the specified address as unsigned word and returns the result.
2518 \begin_layout Subsubsection
2519 memory.readsword(number address)
2522 \begin_layout Standard
2523 Reads the specified address as signed word and returns the result.
2526 \begin_layout Subsubsection
2527 memory.writeword(number address, number value)
2530 \begin_layout Standard
2531 Writes the specified value (negative values undergo 2's complement) to specified
2532 address (as a word).
2535 \begin_layout Subsubsection
2536 memory.readdword(number address)
2539 \begin_layout Standard
2540 Reads the specified address as unsigned doubleword and returns the result.
2543 \begin_layout Subsubsection
2544 memory.readsdword(number address)
2547 \begin_layout Standard
2548 Reads the specified address as signed doubleword and returns the result.
2551 \begin_layout Subsubsection
2552 memory.writedword(number address, number value)
2555 \begin_layout Standard
2556 Writes the specified value (negative values undergo 2's complement) to specified
2557 address (as a doubleword).
2560 \begin_layout Subsubsection
2561 memory.readqword(number address)
2564 \begin_layout Standard
2565 Reads the specified address as unsigned quadword and returns the result.
2568 \begin_layout Subsubsection
2569 memory.readsqword(number address)
2572 \begin_layout Standard
2573 Reads the specified address as signed quadword and returns the result.
2576 \begin_layout Subsubsection
2577 memory.writeqword(number address, number value)
2580 \begin_layout Standard
2581 Writes the specified value (negative values undergo 2's complement) to specified
2582 address (as a quadword).
2585 \begin_layout Subsection
2589 \begin_layout Standard
2590 Various callbacks to Lua that can occur.
2593 \begin_layout Subsubsection
2594 Callback: on_paint()
2597 \begin_layout Standard
2598 Called when screen is being painted.
2599 Any gui.* calls requiring graphic context draw on the screen.
2602 \begin_layout Subsubsection
2603 Callback: on_video()
2606 \begin_layout Standard
2607 Called when video dump frame is being painted.
2608 Any gui.* calls requiring graphic context draw on the video.
2611 \begin_layout Subsubsection
2612 Callback: on_frame()
2615 \begin_layout Standard
2616 Called on each starting whole frame.
2619 \begin_layout Subsubsection
2620 Callback: on_startup()
2623 \begin_layout Standard
2624 Called when the emulator is starting (lsnes.rc and --run files has been run).
2627 \begin_layout Subsubsection
2628 Callback: on_pre_load(string name)
2631 \begin_layout Standard
2632 Called just before savestate/movie load occurs (note: loads are always delayed,
2633 so this occurs even when load was initiated by lua).
2636 \begin_layout Subsubsection
2637 Callback: on_err_load(string name)
2640 \begin_layout Standard
2641 Called if loadstate goes wrong.
2644 \begin_layout Subsubsection
2645 Callback: on_post_load(string name, boolean was_savestate)
2648 \begin_layout Standard
2649 Called on successful loadstate.
2650 was_savestate gives if this was a savestate or a movie.
2653 \begin_layout Subsubsection
2654 Callback: on_pre_save(string name, boolean is_savestate)
2657 \begin_layout Standard
2658 Called just before savestate save occurs (note: movie saves are synchronous
2659 and won't trigger these callbacks if called from Lua).
2662 \begin_layout Subsubsection
2663 Callback: on_err_save(string name)
2666 \begin_layout Standard
2667 Called if savestate goes wrong.
2670 \begin_layout Subsubsection
2671 Callback: on_post_save(string name, boolean is_savestate)
2674 \begin_layout Standard
2675 Called on successful savaestate.
2676 is_savestate gives if this was a savestate or a movie.
2679 \begin_layout Subsubsection
2683 \begin_layout Standard
2684 Called when emulator is shutting down.
2687 \begin_layout Subsubsection
2688 Callback: on_input(boolean subframe)
2691 \begin_layout Standard
2692 Called when emulator is just sending input to bsnes core.
2693 Warning: This is called even in readonly mode, but the results are ignored.
2696 \begin_layout Subsubsection
2697 Callback: on_reset()
2700 \begin_layout Standard
2701 Called when SNES is reset.
2704 \begin_layout Subsubsection
2705 Callback: on_readwrite()
2708 \begin_layout Standard
2709 Called when moving into readwrite mode as result of
2710 \begin_inset Quotes eld
2714 \begin_inset Quotes erd
2717 command (note: moving to rwmode by Lua won't trigger this, as per recursive
2721 \begin_layout Subsubsection
2722 Callback: on_snoop(number port, number controller, number index, number
2726 \begin_layout Standard
2727 Called each time bsnes asks for input.
2728 The value is the final value to be sent to bsnes core (readonly mode, autohold
2729 and autofire have been taken into account).
2730 Might be useful when translating movies to format suitable for console
2732 Note: There is no way to modify the value to be sent.
2735 \begin_layout Section
2736 Modifier and key names:
2739 \begin_layout Subsection
2743 \begin_layout Subsubsection
2747 \begin_layout Standard
2748 Following modifier names are known:
2751 \begin_layout Itemize
2752 ctrl, lctrl, rctrl: Control keys
2755 \begin_layout Itemize
2756 alt, lalt, ralt: ALT keys.
2759 \begin_layout Itemize
2760 shift, lshift, rshift: Shift keys.
2763 \begin_layout Itemize
2764 meta, lmeta, rmeta: Meta keys.
2767 \begin_layout Itemize
2768 num, caps: Numlock/Capslock (these are sticky!)
2771 \begin_layout Itemize
2775 \begin_layout Subsubsection
2779 \begin_layout Standard
2780 Following key names are known:
2783 \begin_layout Itemize
2784 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
2785 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
2786 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
2787 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
2788 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
2789 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
2790 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
2791 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
2792 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
2793 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
2794 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
2795 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
2796 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
2797 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
2798 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
2799 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
2800 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
2801 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
2802 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
2803 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
2804 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
2805 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
2806 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
2807 break, menu, power, euro, undo
2810 \begin_layout Itemize
2811 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
2812 hardware-dependent scan code of <n> (useful to bind those keys that don't
2813 have symbolic names).
2816 \begin_layout Standard
2817 In addition, following pseudo-keys are known (note: these do not work in
2818 conjunction with modifers):
2821 \begin_layout Itemize
2822 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
2825 \begin_layout Itemize
2826 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
2829 \begin_layout Itemize
2830 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
2833 \begin_layout Itemize
2834 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
2837 \begin_layout Itemize
2838 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
2841 \begin_layout Itemize
2842 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
2843 position (axis modes axis and axis_inverse).
2846 \begin_layout Itemize
2847 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
2848 position (axis modes axis and axis_inverse).
2851 \begin_layout Itemize
2852 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
2856 \begin_layout Subsubsection
2860 \begin_layout Itemize
2861 Escape: Enter/Exit Command mode, cancel modal dialogs.
2864 \begin_layout Itemize
2865 Return (also KPEnter): Execute command, ok modal dialog.
2868 \begin_layout Itemize
2869 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
2873 \begin_layout Itemize
2874 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
2878 \begin_layout Itemize
2879 Home (also KP7 if no num lock; command mode): Beginning of command.
2882 \begin_layout Itemize
2883 End (also KP1 if no num lock; command mode): End of command.
2886 \begin_layout Itemize
2887 Left (also KP4 if no num lock; command mode): Move cursor left.
2890 \begin_layout Itemize
2891 Right (also KP6 if no num lock; command mode): Move cursor right.
2894 \begin_layout Itemize
2896 if no num lock; command mode): Delete character to right of cursor.
2899 \begin_layout Itemize
2900 Insert (also KP0 if no num lock; command mode): Toggle between insert /
2904 \begin_layout Itemize
2905 Backspace (command mode): Delete character to left of cursor.
2908 \begin_layout Itemize
2909 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
2912 \begin_layout Subsubsection
2916 \begin_layout Standard
2917 If emulator does not reach internal polling loop in 15 seconds after leaving
2918 it or 15 seconds after starting, the emulator instantly bombs out.
2921 \begin_layout Section
2925 \begin_layout Standard
2926 Movie file is .zip archive in itself, normal ZIP archive tools work on it
2927 (note: If you recompress it, do not use compression methods other than
2928 store and deflate and especially do not use encryption of any kind).
2931 \begin_layout Subsection
2932 Detecting clean start/SRAM/Savestate
2935 \begin_layout Itemize
2937 \begin_inset Quotes eld
2941 \begin_inset Quotes erd
2944 it is savestate, otherwise:
2947 \begin_layout Itemize
2948 If file has members with names starting
2949 \begin_inset Quotes eld
2953 \begin_inset Quotes erd
2956 it is movie starting from SRAM, otherwise:
2959 \begin_layout Itemize
2960 It is movie starting from clear state.
2963 \begin_layout Subsection
2967 \begin_layout Standard
2968 Type of game ROM and region (as one line).
2972 \begin_layout Standard
2973 \begin_inset Tabular
2974 <lyxtabular version="3" rows="8" columns="3">
2975 <features tabularvalignment="middle">
2976 <column alignment="center" valignment="top" width="0">
2977 <column alignment="center" valignment="top" width="0">
2978 <column alignment="center" valignment="top" width="0">
2980 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2983 \begin_layout Plain Layout
2989 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2992 \begin_layout Plain Layout
2998 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3001 \begin_layout Plain Layout
3009 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3012 \begin_layout Plain Layout
3018 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3021 \begin_layout Plain Layout
3027 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3030 \begin_layout Plain Layout
3038 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3041 \begin_layout Plain Layout
3047 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3050 \begin_layout Plain Layout
3056 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3059 \begin_layout Plain Layout
3067 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3070 \begin_layout Plain Layout
3076 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3079 \begin_layout Plain Layout
3085 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3088 \begin_layout Plain Layout
3096 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3099 \begin_layout Plain Layout
3105 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3108 \begin_layout Plain Layout
3114 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3117 \begin_layout Plain Layout
3125 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3128 \begin_layout Plain Layout
3134 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3137 \begin_layout Plain Layout
3143 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3146 \begin_layout Plain Layout
3154 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3157 \begin_layout Plain Layout
3163 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3166 \begin_layout Plain Layout
3172 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3175 \begin_layout Plain Layout
3183 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3186 \begin_layout Plain Layout
3192 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3195 \begin_layout Plain Layout
3201 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3204 \begin_layout Plain Layout
3218 \begin_layout Standard
3222 \begin_layout Standard
3223 \begin_inset Tabular
3224 <lyxtabular version="3" rows="3" columns="2">
3225 <features tabularvalignment="middle">
3226 <column alignment="center" valignment="top" width="0">
3227 <column alignment="center" valignment="top" width="0">
3229 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3232 \begin_layout Plain Layout
3238 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3241 \begin_layout Plain Layout
3249 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3252 \begin_layout Plain Layout
3258 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3261 \begin_layout Plain Layout
3269 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3272 \begin_layout Plain Layout
3278 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3281 \begin_layout Plain Layout
3295 \begin_layout Subsection
3299 \begin_layout Standard
3300 Contains type of port #1 (as one line).
3301 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3302 If not present, defaults to 'gamepad'.
3305 \begin_layout Subsection
3309 \begin_layout Standard
3310 Contains type of port #2 (as one line).
3311 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3312 'justifier' and 'justifiers'.
3313 If not present, defaults to 'none'.
3316 \begin_layout Subsection
3320 \begin_layout Standard
3321 Contains name of the game (as one line).
3324 \begin_layout Subsection
3328 \begin_layout Standard
3329 Contains authors, one per line.
3330 Part before '|' is the full name, part after is the nickname.
3333 \begin_layout Subsection
3337 \begin_layout Standard
3339 \begin_inset Quotes eld
3343 \begin_inset Quotes erd
3347 Used to reject other saves.
3350 \begin_layout Subsection
3351 Member: controlsversion
3354 \begin_layout Standard
3356 \begin_inset Quotes eld
3360 \begin_inset Quotes erd
3364 Used to identify what controls are there.
3367 \begin_layout Subsection
3369 \begin_inset Quotes eld
3373 \begin_inset Quotes erd
3379 \begin_layout Standard
3380 Contains bsnes core version number (as one line).
3383 \begin_layout Subsection
3387 \begin_layout Standard
3388 Contains project ID (as one line).
3389 Used to identify if two movies are part of the same project.
3392 \begin_layout Subsection
3393 Member: {rom,slota,slotb}{,xml}.sha256
3396 \begin_layout Standard
3397 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3398 Absent if corresponding file is absent.
3401 \begin_layout Subsection
3402 Member: moviesram.<name>
3405 \begin_layout Standard
3406 Raw binary startup SRAM of kind <name>.
3407 Only present in savestates and movies starting from SRAM.
3410 \begin_layout Subsection
3414 \begin_layout Standard
3415 Raw binary movie state data.
3416 Only present in savestates.
3419 \begin_layout Standard
3423 \begin_layout Itemize
3424 32 bytes: SHA-256 of project ID.
3427 \begin_layout Itemize
3428 8 bytes: Big-endian current frame.
3431 \begin_layout Itemize
3432 100x4 bytes: Poll counters for each control (bit31 of each is
3433 \begin_inset Quotes eld
3437 \begin_inset Quotes erd
3443 \begin_layout Itemize
3444 8 bytes: Big-endian lag frame count.
3447 \begin_layout Itemize
3448 32 bytes: SHA-256 of past input
3451 \begin_layout Itemize
3452 32 bytes: SHA-256 of previous.
3455 \begin_layout Itemize
3456 (total of 512 bytes)
3459 \begin_layout Subsection
3463 \begin_layout Standard
3464 Raw binary dump of host memory.
3465 Only present in savestates.
3468 \begin_layout Subsection
3472 \begin_layout Standard
3473 The raw binary savestate itself.
3474 Savestate detection uses this file, only present in savestates.
3477 \begin_layout Subsection
3481 \begin_layout Standard
3482 Screenshot of current frame.
3483 Only present in savestates.
3484 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3486 Height of image is inferred from the width and size of data.
3489 \begin_layout Subsection
3493 \begin_layout Standard
3494 Raw binary SRAM of kind <name> at time of savestate.
3495 Only present in savestates.
3498 \begin_layout Subsection
3502 \begin_layout Standard
3503 The actual input track, one line per subframe (blank lines are skipped).
3506 \begin_layout Itemize
3507 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3508 part of same frame as previous, otherwise it starts a new frame.
3511 \begin_layout Itemize
3512 First subframe must start a new frame.
3515 \begin_layout Standard
3516 Length of movie in frames is number of lines in input file that start a
3520 \begin_layout Subsection
3524 \begin_layout Standard
3525 Contains textual base-10 rerecord count (as one line; emulator just writes
3526 this, it doesn't read it) + 1.
3529 \begin_layout Subsection
3533 \begin_layout Standard
3534 This member stores set of load IDs.
3535 There is one load ID per rerecord (plus one corresponding to start of project).
3538 \begin_layout Itemize
3539 This member constists of concatenation of records
3542 \begin_layout Itemize
3543 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3547 \begin_layout Itemize
3548 IDs are interpretted as 256-bit big-endian integers with warparound.
3551 \begin_layout Itemize
3552 Initial predicted ID is all zeroes.
3555 \begin_layout Standard
3556 Format of each record is:
3559 \begin_layout Itemize
3560 1 byte: Opcode byte.
3561 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3565 \begin_layout Itemize
3566 32-prefixlen bytes of ID.
3569 \begin_layout Itemize
3570 countlen bytes of big-endian count (count).
3573 \begin_layout Standard
3574 Records are processed as follows:
3577 \begin_layout Itemize
3578 To form the first ID encoded by record, take the first prefixlen bytes predicted
3579 ID and append the read ID value to it.
3580 The result is the first ID encoded.
3583 \begin_layout Itemize
3584 If countlen is 0, record encodes 1 ID.
3587 \begin_layout Itemize
3588 If countlen is 1, record encodes 2+count IDs.
3591 \begin_layout Itemize
3592 If countlen is 2, record encodes 258+count IDs.
3595 \begin_layout Itemize
3596 If countlen is 3, record encodes 65794+count IDs.
3599 \begin_layout Itemize
3600 The new predicted ID is the next ID after last one encoded by the record.
3603 \begin_layout Standard
3604 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3608 \begin_layout Subsection
3609 Member: starttime.second
3612 \begin_layout Standard
3613 Movie starting time, second part.
3614 Epoch is Unix epoch.
3615 Default is 1,000,000,000.
3618 \begin_layout Subsection
3619 Member: starttime.subsecond
3622 \begin_layout Standard
3623 Movie starting time, subsecond part.
3628 \begin_layout Subsection
3629 Member: savetime.second
3632 \begin_layout Standard
3633 Movie saving time, second part.
3634 Default is starttime.second.
3635 Only present in savestates.
3638 \begin_layout Subsection
3639 Member: savetime.subsecond
3642 \begin_layout Standard
3643 Movie saving time, subsecond part.
3644 Default is starttime.subsecond.
3645 Only present in savestates.
3648 \begin_layout Section
3652 \begin_layout Subsection
3656 \begin_layout Standard
3657 make ui=ui-libsnes profile=accuracy
3660 \begin_layout Standard
3661 For Bsnes v084 You need to apply the six patches in bsnes-patches/.
3662 These fix the following:
3665 \begin_layout Enumerate
3666 Make libsnes actually compile (it won't compile without!)
3669 \begin_layout Enumerate
3670 Bump the version number to be correct (nice to have)
3673 \begin_layout Enumerate
3674 Make RTC emulation time cleanly overridable (needed by games using RTC)
3677 \begin_layout Enumerate
3678 Save/Load controller state on savestate/loadstate (many games screw up without)
3681 \begin_layout Enumerate
3682 Fix unserialization of 64-bit integers (needed)
3685 \begin_layout Enumerate
3686 Allow frontend to control random number seed (just nice to have)
3689 \begin_layout Subsection
3690 Prerequisite libraries:
3693 \begin_layout Itemize
3697 \begin_layout Itemize
3701 \begin_layout Itemize
3702 SDLmain (Windows/Mac OS X only; Note you may have to extract the object
3706 \begin_layout Itemize
3710 \begin_layout Itemize
3714 \begin_layout Itemize
3715 boost conversion (header only)
3718 \begin_layout Subsection
3719 Compile options to make:
3722 \begin_layout Subsubsection
3726 \begin_layout Standard
3727 Set path to BSNES bsnes directory to <path>.
3730 \begin_layout Subsubsection
3734 \begin_layout Standard
3735 Don't use threads on Linux.
3738 \begin_layout Subsubsection
3742 \begin_layout Standard
3743 Try to use threads even on non-Linux systems.
3746 \begin_layout Subsubsection
3747 CROSS_PREFIX=<prefix>
3750 \begin_layout Standard
3751 Prepend this to all commands refering to cross-compiling environment with
3755 \begin_layout Subsubsection
3759 \begin_layout Standard
3760 Target C++ compiler to use.
3764 \begin_layout Standard
3765 Note: If crosscompiling, this has to be crosscompiler, and CROSS_PREFIX
3769 \begin_layout Subsubsection
3773 \begin_layout Standard
3774 Assume BSNES uses compatiblity core instead of accuracy core.
3777 \begin_layout Subsubsection
3781 \begin_layout Standard
3782 Compile lua support, using package <package>
3785 \begin_layout Subsubsection
3789 \begin_layout Standard
3790 Set graphics platform.
3791 Currently available choices are
3792 \begin_inset Quotes eld
3796 \begin_inset Quotes erd
3800 \begin_inset Quotes eld
3804 \begin_inset Quotes erd
3810 \begin_layout Subsubsection
3814 \begin_layout Standard
3816 Currently available choices are
3817 \begin_inset Quotes eld
3821 \begin_inset Quotes erd
3824 (requires SDL graphics),
3825 \begin_inset Quotes eld
3829 \begin_inset Quotes erd
3833 \begin_inset Quotes eld
3837 \begin_inset Quotes erd
3843 \begin_layout Subsubsection
3847 \begin_layout Standard
3848 Set joystick platform.
3849 Currently available choices are
3850 \begin_inset Quotes eld
3854 \begin_inset Quotes erd
3857 (requires SDL graphics),
3858 \begin_inset Quotes eld
3862 \begin_inset Quotes erd
3866 \begin_inset Quotes eld
3870 \begin_inset Quotes erd
3876 \begin_layout Section
3877 Quick'n'dirty encode guide
3880 \begin_layout Enumerate
3881 Start the emulator and load the movie file.
3884 \begin_layout Enumerate
3885 Set large AVI option 'set-setting avi-large on'
3888 \begin_layout Enumerate
3889 If dumping PAL, set bottom border to 2 'set-setting avi-bottom-border 2'
3892 \begin_layout Enumerate
3893 Enable dumping 'dump-avi 12 tmpdump' (note: Normally 10 and above are
3894 \begin_inset Quotes eld
3897 use only if you know what you are doing.
3898 \begin_inset Quotes erd
3902 In this case, these can be safely used because of how x264 internally works.
3905 \begin_layout Enumerate
3906 Unpause and let it run until you want to end dumping.
3909 \begin_layout Enumerate
3910 Close the emulator (closing the window is the easiest way)
3913 \begin_layout Enumerate
3914 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
3915 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
3918 \begin_layout Enumerate
3919 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
3922 \begin_layout Enumerate
3923 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
3924 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
3927 \begin_layout Enumerate
3928 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
3929 Now final.mkv contains quick'n'dirty encode.
3932 \begin_layout Section
3933 Axis configurations for some gamepad types:
3936 \begin_layout Subsection
3940 \begin_layout Standard
3941 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
3944 \begin_layout LyX-Code
3945 set-axis joystick0axis2 pressure-+
3948 \begin_layout LyX-Code
3949 set-axis joystick0axis5 pressure-+
3952 \begin_layout Subsection
3954 \begin_inset Quotes eld
3958 \begin_inset Quotes erd
3964 \begin_layout Standard
3965 Axes 8-19 should be disabled.
3968 \begin_layout LyX-Code
3969 set-axis joystick0axis8 disabled
3972 \begin_layout LyX-Code
3973 set-axis joystick0axis9 disabled
3976 \begin_layout LyX-Code
3977 set-axis joystick0axis10 disabled
3980 \begin_layout LyX-Code
3981 set-axis joystick0axis11 disabled
3984 \begin_layout LyX-Code
3985 set-axis joystick0axis12 disabled
3988 \begin_layout LyX-Code
3989 set-axis joystick0axis13 disabled
3992 \begin_layout LyX-Code
3993 set-axis joystick0axis14 disabled
3996 \begin_layout LyX-Code
3997 set-axis joystick0axis15 disabled
4000 \begin_layout LyX-Code
4001 set-axis joystick0axis16 disabled
4004 \begin_layout LyX-Code
4005 set-axis joystick0axis17 disabled
4008 \begin_layout LyX-Code
4009 set-axis joystick0axis18 disabled
4012 \begin_layout LyX-Code
4013 set-axis joystick0axis19 disabled
4016 \begin_layout Section
4020 \begin_layout Subsection
4021 Problems from BSNES core:
4024 \begin_layout Itemize
4025 The whole pending save stuff.
4028 \begin_layout Itemize
4029 Delay resets are slow.
4032 \begin_layout Itemize
4033 RTC is not emulated in sync-stable manner.
4036 \begin_layout Itemize
4037 Lack of layer hiding.
4040 \begin_layout Itemize
4044 \begin_layout Itemize
4045 Firmwares can't be loaded from ZIP archives.
4048 \begin_layout Itemize
4049 Manual polls can be corrupted if savestate occurs during those.
4052 \begin_layout Subsection
4056 \begin_layout Itemize
4057 Modifiers don't work with pseudo-keys (SDL).
4060 \begin_layout Itemize
4061 Audio for last dumped frame is not itself dumped.
4064 \begin_layout Itemize
4065 Audio in UI is pretty bad in quality.
4068 \begin_layout Itemize
4069 UI itself is 30fps max.
4072 \begin_layout Itemize
4073 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4076 \begin_layout Itemize
4077 No menus, command based interface (SDL).
4080 \begin_layout Itemize
4081 Long commands don't scroll.
4084 \begin_layout Itemize
4085 The SDL screen drawing is slow.
4088 \begin_layout Section
4092 \begin_layout Subsection
4096 \begin_layout Itemize
4100 \begin_layout Itemize
4101 Fix dumper video corruption with levels 10-18.
4104 \begin_layout Subsection
4108 \begin_layout Itemize
4112 \begin_layout Itemize
4113 Lots of code cleanups
4116 \begin_layout Itemize
4117 Lua interface to settings
4120 \begin_layout Itemize
4121 Allow specifying AVI borders without Lua
4124 \begin_layout Itemize
4125 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4128 \begin_layout Itemize
4129 on_snoop lua callback
4132 \begin_layout Itemize
4133 Faster movie loading and saving.
4136 \begin_layout Subsection
4140 \begin_layout Itemize
4144 \begin_layout Subsection
4148 \begin_layout Itemize
4152 \begin_layout Itemize
4153 Save jukebox functionality.
4156 \begin_layout Subsection
4160 \begin_layout Itemize
4161 Try to fix some nasty failing movie load edge cases
4164 \begin_layout Itemize
4165 Allow specifying scripts to run on command line.
4168 \begin_layout Subsection
4172 \begin_layout Itemize
4173 Major source code reorganization.
4176 \begin_layout Itemize
4177 Backup savestates before overwriting.
4180 \begin_layout Itemize
4181 Don't crash if loading initial state fails.
4184 \begin_layout Subsection
4188 \begin_layout Itemize
4192 \begin_layout Itemize
4193 Fix author name parsing
4196 \begin_layout Itemize
4197 Fix rerecord counting
4200 \begin_layout Itemize
4201 (SDL) Print messages to console if SDL is uninitialized
4204 \begin_layout Itemize
4205 Add movieinfo program
4208 \begin_layout Itemize
4209 Fix loading movies starting from SRAM.
4212 \begin_layout Subsection
4216 \begin_layout Itemize
4217 Add support for unattended dumping
4220 \begin_layout Itemize
4221 Fix compiling for Win32
4224 \begin_layout Itemize
4225 Don't lock up if sound can't be initialized
4228 \begin_layout Itemize
4229 Strip trailing CR from commands
4232 \begin_layout Itemize
4233 Don't try to do dubious things in global ctors (fix crash on startup)
4236 \begin_layout Subsection
4240 \begin_layout Itemize
4241 Small documentation tweaking
4244 \begin_layout Itemize
4248 \begin_layout Itemize
4249 Fix major bug in modifier matching
4252 \begin_layout Subsection
4256 \begin_layout Itemize
4257 Lots of documentation fixes
4260 \begin_layout Itemize
4261 Use dedicated callbacks for event backcomm., not commands.
4264 \begin_layout Itemize
4265 Ensure that the watchdog is not hit when executing delayed reset.
4268 \begin_layout Itemize
4269 Remove errant tab from joystick message.
4272 \begin_layout Subsection
4276 \begin_layout Itemize
4277 Make autofire operate in absolute time, not linear time
4280 \begin_layout Itemize
4281 Reinitialize controls when resuming from loadstate
4284 \begin_layout Itemize
4285 Some more code cleanups
4288 \begin_layout Itemize
4289 If Lua allocator fails, call OOM_panic()
4292 \begin_layout Itemize
4293 Byte/word/dword/qword sized host memory write/read functions.
4296 \begin_layout Itemize
4297 Dump at correct framerate if dumping interlaced NTSC (height=448).
4300 \begin_layout Subsection
4304 \begin_layout Itemize
4305 Actually include the complete source code
4308 \begin_layout Itemize
4312 \begin_layout Subsection
4316 \begin_layout Itemize
4317 Document {save,start}time.{,sub}second.
4320 \begin_layout Itemize
4321 Intercept time() from bsnes core.
4324 \begin_layout Subsection
4328 \begin_layout Itemize
4329 Allow disabling time() interception (allow build on Mac OS X)
4332 \begin_layout Itemize
4333 Use SDLMain on Mac OS X (make SDL not crash)
4336 \begin_layout Itemize
4337 Disable delayed resets (just plain too buggy for now).
4340 \begin_layout Itemize
4344 \begin_layout Itemize
4345 Use 16-bit for graphics/video instead of 32-bit.
4348 \begin_layout Itemize
4349 gui.rectangle/gui.pixel
4352 \begin_layout Itemize
4356 \begin_layout Itemize
4357 New CSCD writer implementation.
4360 \begin_layout Subsection
4364 \begin_layout Itemize
4365 Fix interaction of * and +.
4368 \begin_layout Itemize
4372 \begin_layout Itemize
4373 Use gettimeofday()/usleep(), these seem portable enough.
4376 \begin_layout Itemize
4377 Move joystick axis manipulation to keymapper code.
4380 \begin_layout Itemize
4381 Changes to how read-only works.
4384 \begin_layout Itemize
4385 Refactor controller input code.
4388 \begin_layout Subsection
4392 \begin_layout Itemize
4393 Fix mouseclick scale compensation.
4396 \begin_layout Itemize
4397 Draw area boundaries correctly in SDL code.
4400 \begin_layout Itemize
4404 \begin_layout Itemize
4405 Fix CSCD output (buffer overrun and race condition).
4408 \begin_layout Subsection
4412 \begin_layout Itemize
4413 JMD dumping support.
4416 \begin_layout Itemize
4417 Allow unattended dumping to JMD.
4420 \begin_layout Itemize
4424 \begin_layout Itemize
4425 Switch back to 32-bit colors.
4428 \begin_layout Itemize
4429 Add Lua function gui.color.
4432 \begin_layout Itemize
4433 Use some new C++11 features in GCC 4.6.
4436 \begin_layout Itemize
4437 Be prepared for core frequency changes.
4440 \begin_layout Itemize
4441 Pass colors in one chunk from Lua.
4444 \begin_layout Subsection
4448 \begin_layout Itemize
4449 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4450 memory.read_vma() and memory.find_vma().
4453 \begin_layout Itemize
4454 Numerious documentation fixups
4457 \begin_layout Itemize
4458 RTC time format changed
4461 \begin_layout Itemize
4462 Reformat flags display
4465 \begin_layout Itemize
4466 Allow lua package name to be overridden
4469 \begin_layout Itemize
4470 SDUMP (high-quality dumping).
4473 \begin_layout Itemize
4474 Split platform support to plugins.
4477 \begin_layout Itemize
4478 Make all sound plugins support basic sound commands
4481 \begin_layout Itemize
4482 Support portaudio for sound.
4485 \begin_layout Itemize
4486 Allow disable Lua/SDL searching.
4489 \begin_layout Itemize
4490 Upconvert colors when copying lcscreen to screen.
4493 \begin_layout Itemize
4494 Reorganize source tree.
4497 \begin_layout Itemize
4498 Evdev joystick support.
4501 \begin_layout Itemize
4502 Refactor more code into generic window code.
4505 \begin_layout Subsection
4509 \begin_layout Itemize
4510 Refactor message handling.
4513 \begin_layout Itemize
4517 \begin_layout Itemize
4521 \begin_layout Itemize
4522 Finish pending saves before load/quit.
4525 \begin_layout Itemize
4526 Wxwidgets graphics plugin.
4529 \begin_layout Subsection
4533 \begin_layout Itemize
4534 Get rid of win32-crap.[ch]pp.
4537 \begin_layout Itemize
4538 Move files around a lot.
4541 \begin_layout Itemize
4542 Get rid of need for host C++ compiler.
4545 \begin_layout Itemize
4549 \begin_layout Itemize
4550 Refactor inter-component communication.
4553 \begin_layout Itemize
4557 \begin_layout Itemize
4558 Fix crash on multiline aliases.
4561 \begin_layout Itemize
4562 Load/Save settings in wxwidgets gui.
4565 \begin_layout Subsection
4569 \begin_layout Itemize
4570 Patch problems in bsnes core
4573 \begin_layout Itemize
4574 SNES is little-endian, not big-endian!
4577 \begin_layout Itemize
4578 Fix memory corruption in lcscreen::load()