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 Subsection
457 \begin_layout Standard
458 If filename is specified on command line, it is loaded as initial state
459 (instead of constructing one).
460 Mandatory for lsnes-avidump.exe and movieinfo.exe.
463 \begin_layout Subsection
468 \begin_layout Subsubsection
469 --run=<file> (lsnes.exe only)
472 \begin_layout Standard
473 After running main RC file, run this file.
474 If multiple are specified, these execute in order specified.
477 \begin_layout Subsection
478 dump options (lsnes-avidump.exe only)
481 \begin_layout Subsubsection
485 \begin_layout Standard
488 \begin_inset Quotes eld
492 \begin_inset Quotes erd
498 \begin_layout Subsubsection
502 \begin_layout Standard
503 Set compression level (0-18).
507 \begin_layout Subsubsection
511 \begin_layout Standard
512 Set number of frames to dump.
516 \begin_layout Subsubsection
520 \begin_layout Standard
521 Run specified lua script (lsnes-avidump.exe does not have initialization
525 \begin_layout Section
526 Startup file lsnes.rc
529 \begin_layout Standard
530 Upon startup, lsnes (lsnes.exe only) executes file lsnes.rc as commands.
531 This file is located in:
534 \begin_layout Itemize
539 lsnes.rc (if %APPDATA% exists)
542 \begin_layout Itemize
543 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
546 \begin_layout Itemize
547 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
550 \begin_layout Itemize
551 All: ./lsnes.rc (fallback default).
554 \begin_layout Standard
555 If leading directories do not exist, attempt to create them is made.
558 \begin_layout Section
559 Game internal commands
562 \begin_layout Itemize
563 Commands beginning with '*' invoke the corresponding command without alias
567 \begin_layout Itemize
568 If command starts with '+', the command is executed as-is when button is
569 pressed, and when button is released, it is executed with '+' replaced
573 \begin_layout Subsection
577 \begin_layout Standard
578 Settings control various aspects of emulator behaviour.
581 \begin_layout Subsubsection
582 set-setting <setting> <value>
585 \begin_layout Standard
586 Sets setting <setting> to value <value> (may be empty).
589 \begin_layout Subsubsection
590 unset-setting <setting>
593 \begin_layout Standard
594 Try to unset setting <setting> (not all settings can be unset).
597 \begin_layout Subsubsection
598 get-setting <setting>
601 \begin_layout Standard
602 Read value of setting <setting>
605 \begin_layout Subsubsection
609 \begin_layout Standard
610 Print names and values of all settings.
613 \begin_layout Subsection
617 \begin_layout Standard
618 Keybindings bind commands or aliases to keys (or pseudo-keys).
622 \begin_layout Standard
626 \begin_layout Itemize
627 Do not bind edge active (+/-) commands to keys with modifiers, that won't
631 \begin_layout Itemize
632 Names of keys and modifiers are platform-dependent.
635 \begin_layout Itemize
636 Be careful before binding pseudo-keys (such as joystick axes, buttons or
637 hats) with modifiers.
638 That may or may not work right.
641 \begin_layout Subsubsection
642 bind-key [<mod>/<modmask>] <key> <command>
645 \begin_layout Standard
646 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
647 ed list) are set as <mod> (comma-seperated list).
650 \begin_layout Standard
651 The names of keys and modifiers are platform-dependent.
654 \begin_layout Subsubsection
655 unbind-key [<mod>/<modmask>] <key>
658 \begin_layout Standard
659 Unbind command from <key> (with specified <mod> and <modmask>).
662 \begin_layout Subsubsection
666 \begin_layout Standard
667 Print all key bindings in effect.
670 \begin_layout Subsection
674 \begin_layout Standard
675 Aliases bind command to sequence of commands.
676 After alias has been defined, it replaces the command it shadows.
679 \begin_layout Standard
683 \begin_layout Itemize
684 You can't alias command to itself.
687 \begin_layout Itemize
688 Aliases starting with +/- are edge active just like ordinary commands starting
692 \begin_layout Itemize
693 One command can be aliased to multiple commands.
696 \begin_layout Subsubsection
697 alias-command <command> <expansion>
700 \begin_layout Standard
701 Append <expansion> to alias <command>.
702 If alias does not already exist, it is created.
705 \begin_layout Subsubsection
706 unalias-command <command>
709 \begin_layout Standard
710 Clear alias expansion for <command>.
713 \begin_layout Subsubsection
717 \begin_layout Standard
718 Print all aliases and their expansions in effect.
721 \begin_layout Subsection
725 \begin_layout Standard
726 Run <script> as if commands were entered on the command line.
729 \begin_layout Subsection
733 \begin_layout Standard
734 Following commands control AVI video dumping:
737 \begin_layout Subsubsection
738 dump-avi <level> <prefix>
741 \begin_layout Standard
742 Dump AVI video to prefix <prefix> at level <level> (0-18).
746 \begin_layout Itemize
747 The codec is Camstudio Codec in gzip mode.
750 \begin_layout Itemize
751 Encoder and muxer are internal, available on all platforms.
754 \begin_layout Itemize
755 Audio enable/disable and framerate has no effect.
758 \begin_layout Itemize
759 Levels 10-18 are not compatible with AVISource.
762 \begin_layout Itemize
763 Recomended level is 7 if decoded by AVISource.
766 \begin_layout Itemize
767 Recomended level is 16 if decoded by ffmpeg, mencoder or FFMpegSource.
770 \begin_layout Itemize
771 Dumps of low-res PAL games are 256x239 (with all the consequences odd height
775 \begin_layout Itemize
776 The audio dumped to .avi is low-quality version.
777 The high-quality version is dumped to .sox file.
780 \begin_layout Subsubsection
784 \begin_layout Standard
785 End current AVI video dump (closing the emulator also closes the dump).
788 \begin_layout Subsection
792 \begin_layout Standard
793 <address> may be decimal or hexadecimal (prefixed with '0x').
794 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
798 \begin_layout Standard
799 The available element <sizes> are:
802 \begin_layout Itemize
806 \begin_layout Itemize
810 \begin_layout Itemize
814 \begin_layout Itemize
818 \begin_layout Standard
819 When reading RAM and ROM, multi-byte reads/writes are big-endian.
820 When dealing with DSP memory, multi-byte reads/writes are native-endian
821 (do not use operand sizes exceeding DSP bitness, except dword is OK for
825 \begin_layout Subsubsection
826 read-<size> <address>
829 \begin_layout Standard
830 Read the value of byte in <address>.
833 \begin_layout Subsubsection
834 read-s<size> <address>
837 \begin_layout Standard
838 Read the value of signed byte in <address>.
841 \begin_layout Subsubsection
842 write-<size> <address> <value>
845 \begin_layout Standard
846 Write <value> to byte in address <address>.
849 \begin_layout Subsubsection
853 \begin_layout Standard
854 Reset the memory search
857 \begin_layout Subsubsection
861 \begin_layout Standard
862 Print number of candidates remaining
865 \begin_layout Subsubsection
869 \begin_layout Standard
870 Print all candidates remaining
873 \begin_layout Subsubsection
874 search-memory <usflag><sizeflag><op>
877 \begin_layout Standard
878 Searches memory for addresses satisfying criteria.
881 \begin_layout Standard
885 \begin_layout Itemize
889 \begin_layout Itemize
893 \begin_layout Standard
897 \begin_layout Itemize
901 \begin_layout Itemize
905 \begin_layout Itemize
909 \begin_layout Itemize
913 \begin_layout Standard
917 \begin_layout Itemize
918 lt: < previous value.
921 \begin_layout Itemize
922 le: <= previous value.
925 \begin_layout Itemize
926 eq: = previous value.
929 \begin_layout Itemize
930 ne: != previous value.
933 \begin_layout Itemize
934 ge: >= previous value.
937 \begin_layout Itemize
938 gt: > previous value.
941 \begin_layout Subsubsection
942 search-memory <sizeflag> <value>
945 \begin_layout Standard
946 Searches for addresses that currently have value <value>.
947 <sizeflag> is as in previous command.
950 \begin_layout Subsection
954 \begin_layout Standard
955 These commands are not available in lsnesrc, but are available after ROM
959 \begin_layout Subsubsection
963 \begin_layout Standard
964 Quits the emulator (asking for confirmation).
965 If /y is given, no confirmation is asked.
968 \begin_layout Subsubsection
972 \begin_layout Standard
973 Toggle paused/unpaused
976 \begin_layout Subsubsection
980 \begin_layout Standard
982 If the button is still held after configurable timeout expires, game unpauses
983 for the duration frame advance is held.
986 \begin_layout Subsubsection
990 \begin_layout Standard
992 If the button is still held after configurable timeout expires, game unpauses
993 for the duration frame advance is held.
996 \begin_layout Subsubsection
1000 \begin_layout Standard
1001 Skip to first poll in frame after current.
1004 \begin_layout Subsubsection
1008 \begin_layout Standard
1009 Reset the SNES after this frame.
1012 \begin_layout Subsubsection
1013 load-state <filename>
1016 \begin_layout Standard
1017 Load savestate <filename> in readwrite mode.
1020 \begin_layout Subsubsection
1021 load-readonly <filename>
1024 \begin_layout Standard
1025 Load savestate <filename> in readonly mode.
1028 \begin_layout Subsubsection
1029 load-preserve <filename>
1032 \begin_layout Standard
1033 Load savestate <filename> in readonly mode, preserving current events.
1036 \begin_layout Subsubsection
1037 load-movie <filename>
1040 \begin_layout Standard
1041 Load savestate <filename>, ignoring save part in readonly mode.
1044 \begin_layout Subsubsection
1045 save-state <filename>
1048 \begin_layout Standard
1049 Save system state to <filename> as soon as possible.
1052 \begin_layout Subsubsection
1053 save-movie <filename>
1056 \begin_layout Standard
1057 Save movie to <filename>.
1060 \begin_layout Subsubsection
1064 \begin_layout Standard
1065 Set read-write mode.
1068 \begin_layout Subsubsection
1072 \begin_layout Standard
1073 Set name of the game to <name>
1076 \begin_layout Subsubsection
1080 \begin_layout Standard
1081 Print the name of the game.
1084 \begin_layout Subsubsection
1088 \begin_layout Standard
1089 Adds new author <author>.
1090 If <author> does not contain '|' it is full name.
1091 If it contains '|', '|' splits the full name and nickname.
1094 \begin_layout Subsubsection
1095 edit-author <num> <author>
1098 \begin_layout Standard
1099 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1103 \begin_layout Subsubsection
1107 \begin_layout Standard
1108 Remove author in slot <num>
1111 \begin_layout Subsubsection
1115 \begin_layout Standard
1119 \begin_layout Subsubsection
1120 test-1, test-2, test-3
1123 \begin_layout Standard
1124 Internal test commands.
1128 \begin_layout Subsubsection
1129 take-screenshot <filename>
1132 \begin_layout Standard
1133 Save screenshot to <filename>.
1136 \begin_layout Subsubsection
1137 +controller<num><button>
1140 \begin_layout Standard
1141 Press button <button> on controller <num> (1-8).
1142 The following button names are known:
1145 \begin_layout Itemize
1149 \begin_layout Itemize
1153 \begin_layout Itemize
1157 \begin_layout Itemize
1161 \begin_layout Itemize
1165 \begin_layout Itemize
1169 \begin_layout Itemize
1173 \begin_layout Itemize
1177 \begin_layout Itemize
1181 \begin_layout Itemize
1185 \begin_layout Itemize
1189 \begin_layout Itemize
1193 \begin_layout Itemize
1197 \begin_layout Itemize
1201 \begin_layout Itemize
1205 \begin_layout Itemize
1209 \begin_layout Subsubsection
1210 controllerh<num><button>
1213 \begin_layout Standard
1214 Hold/unhold button <button> on controller <num> (1-8).
1215 See +controller for button names.
1218 \begin_layout Subsubsection
1219 autofire (<pattern>|-)...
1222 \begin_layout Standard
1223 Set autofire pattern.
1224 Each parameter is comma-separated list of button names (in form of 1start,
1225 1A, 2B, etc..) to hold on that frame.
1226 After reaching the end of pattern, the pattern restarts from the beginning.
1229 \begin_layout Subsubsection
1233 \begin_layout Standard
1237 \begin_layout Subsection
1241 \begin_layout Subsubsection
1242 cycle-jukebox-backward
1245 \begin_layout Standard
1246 Cycle save jukebox backwards.
1249 \begin_layout Subsubsection
1250 cycle-jukebox-forward
1253 \begin_layout Standard
1254 Cycle save jukebox forwards
1257 \begin_layout Subsubsection
1258 add-jukebox-save <filename>
1261 \begin_layout Standard
1262 Add <filename> to jukebox saves.
1265 \begin_layout Subsubsection
1269 \begin_layout Standard
1270 Do R/W load from jukebox.
1273 \begin_layout Subsubsection
1277 \begin_layout Standard
1278 Do state save to jukebox.
1281 \begin_layout Subsection
1285 \begin_layout Standard
1286 Only available if lua support is compiled in.
1289 \begin_layout Subsubsection
1293 \begin_layout Standard
1294 Run Lua code <luacode> using built-in Lua interpretter.
1297 \begin_layout Subsubsection
1301 \begin_layout Standard
1302 Run specified lua file using built-in Lua interpretter.
1305 \begin_layout Subsection
1309 \begin_layout Subsubsection
1310 add-watch <name> <expression>
1313 \begin_layout Standard
1314 Adds new watch (or modifies old one).
1317 \begin_layout Subsubsection
1321 \begin_layout Standard
1325 \begin_layout Subsection
1326 SDL Platform commands
1329 \begin_layout Standard
1330 The following are valid on SDL platform.
1333 \begin_layout Subsubsection
1337 \begin_layout Standard
1338 Enable sounds in GUI (has no effect on video dumping).
1341 \begin_layout Subsubsection
1345 \begin_layout Standard
1346 Disable sounds in GUI (has no effect on video dumping).
1349 \begin_layout Subsubsection
1353 \begin_layout Standard
1354 Asks to press a key and then identifies that (pseudo-)key.
1357 \begin_layout Subsubsection
1361 \begin_layout Standard
1362 Toggle between windowed/fullscreen console.
1365 \begin_layout Subsubsection
1369 \begin_layout Standard
1370 Scroll messages window as far back as it goes.
1373 \begin_layout Subsubsection
1377 \begin_layout Standard
1378 Scroll messages window as far forward as it goes.
1381 \begin_layout Subsubsection
1385 \begin_layout Standard
1386 Scroll messages window back one screenful.
1389 \begin_layout Subsubsection
1393 \begin_layout Standard
1394 Scroll messages window forward one screenful.
1397 \begin_layout Subsubsection
1398 axismode <axis> <mode>
1401 \begin_layout Standard
1402 Set joystick axis mode.
1404 \begin_inset Quotes eld
1407 joystick<num>axis<axis>
1408 \begin_inset Quotes erd
1413 \begin_inset Quotes eld
1417 \begin_inset Quotes erd
1424 \begin_layout Itemize
1425 axis: Normal axis mode
1428 \begin_layout Itemize
1429 axis_inverse: Inverse axis mode.
1432 \begin_layout Itemize
1433 pressure_0m: Pressure sensitive.
1434 Released at 0, pressed at full negative.
1437 \begin_layout Itemize
1438 pressure_0p: Pressure sensitive.
1439 Released at 0, pressed at full positive.
1442 \begin_layout Itemize
1443 pressure_m0: Pressure sensitive.
1444 Released at full negative, pressed at 0.
1447 \begin_layout Itemize
1448 pressure_mp: Pressure sensitive.
1449 Released at full negative, pressed at full positive.
1451 XBox360 Pad axes 2 and 5.
1454 \begin_layout Itemize
1455 pressure_p0: Pressure sensitive.
1456 Released at full positive, pressed at 0.
1459 \begin_layout Itemize
1460 pressure_pm: Pressure sensitive.
1461 Released at full positive, pressed at full negative.
1464 \begin_layout Itemize
1465 disabled: Disable the axis.
1466 On PS3 controller, axes 8-19 should be disabled since those controls are
1467 digital buttons as well.
1470 \begin_layout Section
1474 \begin_layout Subsection
1478 \begin_layout Subsubsection
1482 \begin_layout Standard
1483 Set where bsnes looks for firmware files.
1485 \begin_inset Quotes eld
1489 \begin_inset Quotes erd
1495 \begin_layout Subsubsection
1499 \begin_layout Standard
1501 Numeric, range is 0.001 to
1502 \begin_inset Quotes eld
1506 \begin_inset Quotes erd
1510 Default is native framerate.
1513 \begin_layout Subsubsection
1517 \begin_layout Standard
1518 Set save compression level (integer 0-9).
1519 Default is 7 (0 is no compression).
1522 \begin_layout Subsubsection
1526 \begin_layout Standard
1527 Set the frame advance timeout in milliseconds.
1528 Numeric integer, range is 0-999999999.
1532 \begin_layout Subsection
1536 \begin_layout Subsubsection
1540 \begin_layout Standard
1541 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1545 \begin_layout Subsubsection
1549 \begin_layout Standard
1550 AVI dumper: Set the default left border thickness (unless lua overrides)
1556 \begin_layout Subsubsection
1560 \begin_layout Standard
1561 AVI dumper: Set the default right border thickness (unless lua overrides)
1567 \begin_layout Subsubsection
1571 \begin_layout Standard
1572 AVI dumper: Set the default top border thickness (unless lua overrides)
1578 \begin_layout Subsubsection
1582 \begin_layout Standard
1583 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1589 \begin_layout Subsubsection
1593 \begin_layout Standard
1594 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1599 \begin_layout Subsection
1600 SDL platform settings
1603 \begin_layout Subsubsection
1604 autorepeat-first-delay
1607 \begin_layout Standard
1608 Sets the delay for first character in typematic autorepeat.
1611 \begin_layout Subsubsection
1612 autorepeat-subsequent-delay
1615 \begin_layout Standard
1616 Sets the delay for subsequent characters in typematic autorepeat.
1619 \begin_layout Section
1623 \begin_layout Subsection
1624 Core (in main table)
1627 \begin_layout Subsubsection
1631 \begin_layout Standard
1632 Print line to message console.
1635 \begin_layout Subsubsection
1636 exec(string command)
1639 \begin_layout Standard
1640 Run command as it was entered on the command line
1643 \begin_layout Subsection
1647 \begin_layout Standard
1648 Bitwise logical functions and related.
1651 \begin_layout Subsubsection
1652 none(number...) / bnot(number...)
1655 \begin_layout Standard
1656 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1660 \begin_layout Subsubsection
1661 any(number...) / bor(number...)
1664 \begin_layout Standard
1665 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1668 \begin_layout Subsubsection
1669 all(number...) / band(number...)
1672 \begin_layout Standard
1673 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1677 \begin_layout Subsubsection
1678 parity(number...) / bxor(number...)
1681 \begin_layout Standard
1682 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1686 \begin_layout Subsubsection
1687 lrotate(number base[, number amount[, number bits]])
1690 \begin_layout Standard
1691 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1694 \begin_layout Subsubsection
1695 rrotate(number base[, number amount[, number bits]])
1698 \begin_layout Standard
1699 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1703 \begin_layout Subsubsection
1704 lshift(number base[, number amount[, number bits]])
1707 \begin_layout Standard
1708 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1709 The new bits are filled with zeroes.
1712 \begin_layout Subsubsection
1713 lrshift(number base[, number amount[, number bits]])
1716 \begin_layout Standard
1717 Shift bits-bit (max 48, default 48) number logically right by amount (default
1719 The new bits are filled with zeroes.
1722 \begin_layout Subsubsection
1723 arshift(number base[, number amount[, number bits]])
1726 \begin_layout Standard
1727 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1729 The new bits are shifted in with copy of the high bit.
1732 \begin_layout Subsection
1736 \begin_layout Standard
1737 Most of these functions can only be called in on_paint and on_video callbacks.
1738 Exceptions are noted.
1741 \begin_layout Subsubsection
1745 \begin_layout Standard
1746 Returns 5-tuple (hresolution, vresolution, rshift, gshift, bshift).
1749 \begin_layout Subsubsection
1750 gui.<class>_gap(number gap)
1753 \begin_layout Standard
1754 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1758 \begin_layout Subsubsection
1759 gui.text(number x, number y, string text[, number fgc[, number fga[, number
1760 bgc[, number bga]]]])
1763 \begin_layout Standard
1764 Draw text on the GUI.
1765 Font size is 8 (or 16) by 16.
1769 \begin_layout Itemize
1770 Coordinate origin is at top-left of the game area.
1771 Left and top gaps have negative coordinates.
1774 \begin_layout Itemize
1775 Use gui.resolution() to discover how to layout colors.
1778 \begin_layout Itemize
1779 Alpha range is 0(transparent)-256(opaque).
1782 \begin_layout Itemize
1783 Only available in on_paint() and on_video() callbacks.
1786 \begin_layout Subsubsection
1790 \begin_layout Standard
1791 Request on_repaint() to happen as soon as possible.
1792 Can be used anywhere.
1795 \begin_layout Subsubsection
1796 gui.subframe_update(boolean on)
1799 \begin_layout Standard
1800 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
1801 or not happen (on=false).
1802 Can be used anywhere.
1805 \begin_layout Subsection
1809 \begin_layout Standard
1811 Only available in on_input callback.
1814 \begin_layout Subsection
1815 get(number controller, number index)
1818 \begin_layout Standard
1819 Read the specified index (0-11) from specified controller (0-7).
1823 \begin_layout Itemize
1824 Uses physical controller numbering.
1825 Gamepad in port 2 is controller 4, not 1!
1828 \begin_layout Subsection
1829 set(number controller, number index, number value)
1832 \begin_layout Standard
1833 Write the specified index (0-11) from specified controller (0-7), storing
1838 \begin_layout Itemize
1839 Uses physical controller numbering.
1840 Gamepad in port 2 is controller 4, not 1!
1843 \begin_layout Subsection
1844 reset([number cycles])
1847 \begin_layout Standard
1849 If cycles is greater than zero, do delayed reset.
1850 0 (or no value) causes immediate reset.
1853 \begin_layout Itemize
1854 Only available with subframe flag false.
1857 \begin_layout Subsection
1861 \begin_layout Standard
1862 Host memory handling (extra memory saved to savestates).
1863 Host memory starts empty.
1866 \begin_layout Subsubsection
1867 read(number address)
1870 \begin_layout Standard
1871 Reads hostmemory slot address.
1872 Slot numbers out of range return false instead of numeric.
1875 \begin_layout Subsubsection
1876 write(number address, number value)
1879 \begin_layout Standard
1880 Writes hostmemory slot with 0-255.
1881 Slot numbers out of range cause extension of host memory slot space.
1884 \begin_layout Subsection
1888 \begin_layout Standard
1892 \begin_layout Subsubsection
1893 movie.currentframe()
1896 \begin_layout Standard
1897 Return number of current frame.
1900 \begin_layout Subsubsection
1904 \begin_layout Standard
1905 Return number of frames in movie.
1908 \begin_layout Subsubsection
1912 \begin_layout Standard
1913 Return true if in readonly mode, false if in readwrite.
1916 \begin_layout Subsubsection
1917 movie.set_readwrite()
1920 \begin_layout Standard
1921 Set readwrite mode (does not cause on_readwrite callback).
1924 \begin_layout Subsubsection
1925 movie.frame_subframes(number frame)
1928 \begin_layout Standard
1929 Count number of subframes in specified frame (frame numbers are 1-based)
1933 \begin_layout Subsubsection
1934 movie.read_subframe(number frame, number subframe)
1937 \begin_layout Standard
1938 Read specifed subframe in specified frame and return data as array (100
1939 elements, numbered 0-99 currently).
1942 \begin_layout Subsection
1946 \begin_layout Standard
1947 Routines for settings manipulation
1950 \begin_layout Subsubsection
1954 \begin_layout Standard
1955 Get value of setting.
1956 If setting is blank, returns false.
1957 If setting value can't be obtained, returns (nil, error message).
1960 \begin_layout Subsubsection
1961 set(string name, string value)
1964 \begin_layout Standard
1965 Set value of setting.
1966 If setting can't be set, returns (nil, error message).
1969 \begin_layout Subsubsection
1973 \begin_layout Standard
1974 Returns if setting is set.
1975 If setting does not exist, returns (nil, error message).
1978 \begin_layout Subsubsection
1982 \begin_layout Standard
1983 Blanks a setting and returns true.
1984 If setting can't be blanked, returns (nil, error message).
1987 \begin_layout Subsection
1991 \begin_layout Standard
1992 Various callbacks to Lua that can occur.
1995 \begin_layout Subsubsection
1996 Callback: on_paint()
1999 \begin_layout Standard
2000 Called when screen is being painted.
2001 Any gui.* calls requiring graphic context draw on the screen.
2004 \begin_layout Subsubsection
2005 Callback: on_video()
2008 \begin_layout Standard
2009 Called when video dump frame is being painted.
2010 Any gui.* calls requiring graphic context draw on the video.
2013 \begin_layout Subsubsection
2014 Callback: on_startup()
2017 \begin_layout Standard
2018 Called when the emulator is starting (lsnes.rc and --run files has been run).
2021 \begin_layout Subsubsection
2022 Callback: on_pre_load(string name)
2025 \begin_layout Standard
2026 Called just before savestate/movie load occurs (note: loads are always delayed,
2027 so this occurs even when load was initiated by lua).
2030 \begin_layout Subsubsection
2031 Callback: on_err_load(string name)
2034 \begin_layout Standard
2035 Called if loadstate goes wrong.
2038 \begin_layout Subsubsection
2039 Callback: on_post_load(string name, boolean was_savestate)
2042 \begin_layout Standard
2043 Called on successful loadstate.
2044 was_savestate gives if this was a savestate or a movie.
2047 \begin_layout Subsubsection
2048 Callback: on_pre_save(string name, boolean is_savestate)
2051 \begin_layout Standard
2052 Called just before savestate save occurs (note: movie saves are synchronous
2053 and won't trigger these callbacks if called from Lua).
2056 \begin_layout Subsubsection
2057 Callback: on_err_save(string name)
2060 \begin_layout Standard
2061 Called if savestate goes wrong.
2064 \begin_layout Subsubsection
2065 Callback: on_post_save(string name, boolean is_savestate)
2068 \begin_layout Standard
2069 Called on successful savaestate.
2070 is_savestate gives if this was a savestate or a movie.
2073 \begin_layout Subsubsection
2077 \begin_layout Standard
2078 Called when emulator is shutting down.
2081 \begin_layout Subsubsection
2082 Callback: on_input(boolean subframe)
2085 \begin_layout Standard
2086 Called when emulator is just sending input to bsnes core.
2087 Warning: This is called even in readonly mode, but the results are ignored.
2090 \begin_layout Subsubsection
2091 Callback: on_reset()
2094 \begin_layout Standard
2095 Called when SNES is reset.
2098 \begin_layout Subsubsection
2099 Callback: on_readwrite()
2102 \begin_layout Standard
2103 Called when moving into readwrite mode as result of
2104 \begin_inset Quotes eld
2108 \begin_inset Quotes erd
2111 command (note: moving to rwmode by Lua won't trigger this, as per recursive
2115 \begin_layout Subsubsection
2116 Callback: on_snoop(number port, number controller, number index, number
2120 \begin_layout Standard
2121 Called each time bsnes asks for input.
2122 The value is the final value to be sent to bsnes core (readonly mode, autohold
2123 and autofire have been taken into account).
2124 Might be useful when translating movies to format suitable for console
2126 Note: There is no way to modify the value to be sent.
2129 \begin_layout Section
2130 Modifier and key names:
2133 \begin_layout Subsection
2137 \begin_layout Subsubsection
2141 \begin_layout Standard
2142 Following modifier names are known:
2145 \begin_layout Itemize
2146 ctrl, lctrl, rctrl: Control keys
2149 \begin_layout Itemize
2150 alt, lalt, ralt: ALT keys.
2153 \begin_layout Itemize
2154 shift, lshift, rshift: Shift keys.
2157 \begin_layout Itemize
2158 meta, lmeta, rmeta: Meta keys.
2161 \begin_layout Itemize
2162 num, caps: Numlock/Capslock (these are sticky!)
2165 \begin_layout Itemize
2169 \begin_layout Subsubsection
2173 \begin_layout Standard
2174 Following key names are known:
2177 \begin_layout Itemize
2178 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
2179 hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
2180 comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
2181 less, equals, greater, question, at, leftbracket, backslash, rightbracket,
2182 caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
2183 o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
2184 world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
2185 world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
2186 world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
2187 world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
2188 world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
2189 world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
2190 world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
2191 world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
2192 world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
2193 world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
2194 world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
2195 world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
2196 kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
2197 kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
2198 pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
2199 f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
2200 lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
2201 break, menu, power, euro, undo
2204 \begin_layout Itemize
2205 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
2206 hardware-dependent scan code of <n> (useful to bind those keys that don't
2207 have symbolic names).
2210 \begin_layout Standard
2211 In addition, following pseudo-keys are known (note: these do not work in
2212 conjunction with modifers):
2215 \begin_layout Itemize
2216 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
2219 \begin_layout Itemize
2220 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
2223 \begin_layout Itemize
2224 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
2227 \begin_layout Itemize
2228 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
2231 \begin_layout Itemize
2232 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
2235 \begin_layout Itemize
2236 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
2237 position (axis modes axis and axis_inverse).
2240 \begin_layout Itemize
2241 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
2242 position (axis modes axis and axis_inverse).
2245 \begin_layout Itemize
2246 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
2250 \begin_layout Subsubsection
2254 \begin_layout Itemize
2255 Escape: Enter/Exit Command mode, cancel modal dialogs.
2258 \begin_layout Itemize
2259 Return (also KPEnter): Execute command, ok modal dialog.
2262 \begin_layout Itemize
2263 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
2267 \begin_layout Itemize
2268 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
2272 \begin_layout Itemize
2273 Home (also KP7 if no num lock; command mode): Beginning of command.
2276 \begin_layout Itemize
2277 End (also KP1 if no num lock; command mode): End of command.
2280 \begin_layout Itemize
2281 Left (also KP4 if no num lock; command mode): Move cursor left.
2284 \begin_layout Itemize
2285 Right (also KP6 if no num lock; command mode): Move cursor right.
2288 \begin_layout Itemize
2290 if no num lock; command mode): Delete character to right of cursor.
2293 \begin_layout Itemize
2294 Insert (also KP0 if no num lock; command mode): Toggle between insert /
2298 \begin_layout Itemize
2299 Backspace (command mode): Delete character to left of cursor.
2302 \begin_layout Itemize
2303 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
2306 \begin_layout Subsubsection
2310 \begin_layout Standard
2311 If emulator does not reach internal polling loop in 15 seconds after leaving
2312 it or 15 seconds after starting, the emulator instantly bombs out.
2315 \begin_layout Section
2319 \begin_layout Standard
2320 Movie file is .zip archive in itself, normal ZIP archive tools work on it
2321 (note: If you recompress it, do not use compression methods other than
2322 store and deflate and especially do not use encryption of any kind).
2325 \begin_layout Subsection
2326 Detecting clean start/SRAM/Savestate
2329 \begin_layout Itemize
2331 \begin_inset Quotes eld
2335 \begin_inset Quotes erd
2338 it is savestate, otherwise:
2341 \begin_layout Itemize
2342 If file has members with names starting
2343 \begin_inset Quotes eld
2347 \begin_inset Quotes erd
2350 it is movie starting from SRAM, otherwise:
2353 \begin_layout Itemize
2354 It is movie starting from clear state.
2357 \begin_layout Subsection
2361 \begin_layout Standard
2362 Type of game ROM and region (as one line).
2366 \begin_layout Standard
2367 \begin_inset Tabular
2368 <lyxtabular version="3" rows="8" columns="3">
2369 <features tabularvalignment="middle">
2370 <column alignment="center" valignment="top" width="0">
2371 <column alignment="center" valignment="top" width="0">
2372 <column alignment="center" valignment="top" width="0">
2374 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2377 \begin_layout Plain Layout
2383 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2386 \begin_layout Plain Layout
2392 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2395 \begin_layout Plain Layout
2403 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2406 \begin_layout Plain Layout
2412 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2415 \begin_layout Plain Layout
2421 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2424 \begin_layout Plain Layout
2432 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2435 \begin_layout Plain Layout
2441 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2444 \begin_layout Plain Layout
2450 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2453 \begin_layout Plain Layout
2461 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2464 \begin_layout Plain Layout
2470 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2473 \begin_layout Plain Layout
2479 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2482 \begin_layout Plain Layout
2490 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2493 \begin_layout Plain Layout
2499 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2502 \begin_layout Plain Layout
2508 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2511 \begin_layout Plain Layout
2519 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2522 \begin_layout Plain Layout
2528 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2531 \begin_layout Plain Layout
2537 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2540 \begin_layout Plain Layout
2548 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2551 \begin_layout Plain Layout
2557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2560 \begin_layout Plain Layout
2566 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2569 \begin_layout Plain Layout
2577 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2580 \begin_layout Plain Layout
2586 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2589 \begin_layout Plain Layout
2595 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2598 \begin_layout Plain Layout
2612 \begin_layout Standard
2616 \begin_layout Standard
2617 \begin_inset Tabular
2618 <lyxtabular version="3" rows="3" columns="2">
2619 <features tabularvalignment="middle">
2620 <column alignment="center" valignment="top" width="0">
2621 <column alignment="center" valignment="top" width="0">
2623 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2626 \begin_layout Plain Layout
2632 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2635 \begin_layout Plain Layout
2643 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2646 \begin_layout Plain Layout
2652 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2655 \begin_layout Plain Layout
2663 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2666 \begin_layout Plain Layout
2672 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2675 \begin_layout Plain Layout
2689 \begin_layout Subsection
2693 \begin_layout Standard
2694 Contains type of port #1 (as one line).
2695 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
2696 If not present, defaults to 'gamepad'.
2699 \begin_layout Subsection
2703 \begin_layout Standard
2704 Contains type of port #2 (as one line).
2705 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
2706 'justifier' and 'justifiers'.
2707 If not present, defaults to 'none'.
2710 \begin_layout Subsection
2714 \begin_layout Standard
2715 Contains name of the game (as one line).
2718 \begin_layout Subsection
2722 \begin_layout Standard
2723 Contains authors, one per line.
2724 Part before '|' is the full name, part after is the nickname.
2727 \begin_layout Subsection
2731 \begin_layout Standard
2733 \begin_inset Quotes eld
2737 \begin_inset Quotes erd
2741 Used to reject other saves.
2744 \begin_layout Subsection
2745 Member: controlsversion
2748 \begin_layout Standard
2750 \begin_inset Quotes eld
2754 \begin_inset Quotes erd
2758 Used to identify what controls are there.
2761 \begin_layout Subsection
2763 \begin_inset Quotes eld
2767 \begin_inset Quotes erd
2773 \begin_layout Standard
2774 Contains bsnes core version number (as one line).
2777 \begin_layout Subsection
2781 \begin_layout Standard
2782 Contains project ID (as one line).
2783 Used to identify if two movies are part of the same project.
2786 \begin_layout Subsection
2787 Member: {rom,slota,slotb}{,xml}.sha256
2790 \begin_layout Standard
2791 Contains SHA-256 of said ROM or ROM mapping file (as one line).
2792 Absent if corresponding file is absent.
2795 \begin_layout Subsection
2796 Member: moviesram.<name>
2799 \begin_layout Standard
2800 Raw binary startup SRAM of kind <name>.
2801 Only present in savestates and movies starting from SRAM.
2804 \begin_layout Subsection
2808 \begin_layout Standard
2809 Raw binary movie state data.
2810 Only present in savestates.
2813 \begin_layout Standard
2817 \begin_layout Itemize
2818 32 bytes: SHA-256 of project ID.
2821 \begin_layout Itemize
2822 8 bytes: Big-endian current frame.
2825 \begin_layout Itemize
2826 100x4 bytes: Poll counters for each control (bit31 of each is
2827 \begin_inset Quotes eld
2831 \begin_inset Quotes erd
2837 \begin_layout Itemize
2838 8 bytes: Big-endian lag frame count.
2841 \begin_layout Itemize
2842 32 bytes: SHA-256 of past input
2845 \begin_layout Itemize
2846 32 bytes: SHA-256 of previous.
2849 \begin_layout Itemize
2850 (total of 512 bytes)
2853 \begin_layout Subsection
2857 \begin_layout Standard
2858 Raw binary dump of host memory.
2859 Only present in savestates.
2862 \begin_layout Subsection
2866 \begin_layout Standard
2867 The raw binary savestate itself.
2868 Savestate detection uses this file, only present in savestates.
2871 \begin_layout Subsection
2875 \begin_layout Standard
2876 Screenshot of current frame.
2877 Only present in savestates.
2878 First 2 bytes are big-endian width of image, rest are big-endian 15-bit
2879 image data (5 bits per channel*pixel, the MSB is unused).
2880 Height of image is inferred from the width and size of data.
2883 \begin_layout Subsection
2887 \begin_layout Standard
2888 Raw binary SRAM of kind <name> at time of savestate.
2889 Only present in savestates.
2892 \begin_layout Subsection
2896 \begin_layout Standard
2897 The actual input track, one line per subframe (blank lines are skipped).
2900 \begin_layout Itemize
2901 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
2902 part of same frame as previous, otherwise it starts a new frame.
2905 \begin_layout Itemize
2906 First subframe must start a new frame.
2909 \begin_layout Standard
2910 Length of movie in frames is number of lines in input file that start a
2914 \begin_layout Subsection
2918 \begin_layout Standard
2919 Contains textual base-10 rerecord count (as one line; emulator just writes
2920 this, it doesn't read it) + 1.
2923 \begin_layout Subsection
2927 \begin_layout Standard
2928 This member stores set of load IDs.
2929 There is one load ID per rerecord (plus one corresponding to start of project).
2932 \begin_layout Itemize
2933 This member constists of concatenation of records
2936 \begin_layout Itemize
2937 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
2941 \begin_layout Itemize
2942 IDs are interpretted as 256-bit big-endian integers with warparound.
2945 \begin_layout Itemize
2946 Initial predicted ID is all zeroes.
2949 \begin_layout Standard
2950 Format of each record is:
2953 \begin_layout Itemize
2954 1 byte: Opcode byte.
2955 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
2959 \begin_layout Itemize
2960 32-prefixlen bytes of ID.
2963 \begin_layout Itemize
2964 countlen bytes of big-endian count (count).
2967 \begin_layout Standard
2968 Records are processed as follows:
2971 \begin_layout Itemize
2972 To form the first ID encoded by record, take the first prefixlen bytes predicted
2973 ID and append the read ID value to it.
2974 The result is the first ID encoded.
2977 \begin_layout Itemize
2978 If countlen is 0, record encodes 1 ID.
2981 \begin_layout Itemize
2982 If countlen is 1, record encodes 2+count IDs.
2985 \begin_layout Itemize
2986 If countlen is 2, record encodes 258+count IDs.
2989 \begin_layout Itemize
2990 If countlen is 3, record encodes 65794+count IDs.
2993 \begin_layout Itemize
2994 The new predicted ID is the next ID after last one encoded by the record.
2997 \begin_layout Standard
2998 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3002 \begin_layout Section
3006 \begin_layout Subsection
3010 \begin_layout Standard
3011 make ui=ui-libsnes options=debugger profile=accuracy
3014 \begin_layout Itemize
3015 Yes, debugger is needed.
3018 \begin_layout Subsection
3019 Prerequisite libraries:
3022 \begin_layout Itemize
3026 \begin_layout Itemize
3030 \begin_layout Itemize
3031 SDLmain (Windows only; Note you may have to extract the object out of archive)
3034 \begin_layout Itemize
3038 \begin_layout Itemize
3042 \begin_layout Itemize
3043 boost conversion (header only)
3046 \begin_layout Subsection
3047 Compile options to make:
3050 \begin_layout Subsubsection
3054 \begin_layout Standard
3055 Set path to BSNES bsnes directory to <path>.
3058 \begin_layout Subsubsection
3062 \begin_layout Standard
3063 Don't use threads on Linux.
3066 \begin_layout Subsubsection
3070 \begin_layout Standard
3071 Try to use threads even on non-Linux systems.
3074 \begin_layout Subsubsection
3078 \begin_layout Standard
3079 Target C++ compiler to use.
3080 Defaults to g++-4.5.
3083 \begin_layout Standard
3084 Note: If crosscompiling, this has to be crosscompiler.
3087 \begin_layout Subsubsection
3091 \begin_layout Standard
3092 Host C++ compiler to use.
3093 Defaults to the same as CC.
3096 \begin_layout Standard
3097 Note: If crosscompiling, that has to be host compiler (the files produced
3098 will be run in the build process!)
3101 \begin_layout Subsubsection
3105 \begin_layout Standard
3106 Assume BSNES uses compatiblity core instead of accuracy core.
3109 \begin_layout Subsubsection
3113 \begin_layout Standard
3114 Don't compile in Lua support.
3117 \begin_layout Section
3118 Quick'n'dirty encode guide
3121 \begin_layout Enumerate
3122 Start the emulator and load the movie file.
3125 \begin_layout Enumerate
3126 Set large AVI option 'set-setting avi-large on'
3129 \begin_layout Enumerate
3130 If dumping PAL, set bottom border to 2 'set-setting avi-bottom-border 2'
3133 \begin_layout Enumerate
3134 Enable dumping 'dump-avi 12 tmpdump' (note: Normally 10 and above are
3135 \begin_inset Quotes eld
3138 use only if you know what you are doing.
3139 \begin_inset Quotes erd
3143 In this case, these can be safely used because of how x264 internally works.
3146 \begin_layout Enumerate
3147 Unpause and let it run until you want to end dumping.
3150 \begin_layout Enumerate
3151 Close the emulator (closing the window is the easiest way)
3154 \begin_layout Enumerate
3155 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
3156 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
3159 \begin_layout Enumerate
3160 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
3163 \begin_layout Enumerate
3164 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
3165 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
3168 \begin_layout Enumerate
3169 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
3170 Now final.mkv contains quick'n'dirty encode.
3173 \begin_layout Section
3177 \begin_layout Subsection
3178 Problems from BSNES core:
3181 \begin_layout Itemize
3182 The whole pending save stuff.
3185 \begin_layout Itemize
3186 Delay resets are slow.
3189 \begin_layout Itemize
3190 RTC is not emulated in sync-stable manner.
3193 \begin_layout Itemize
3194 Lack of layer hiding.
3197 \begin_layout Itemize
3201 \begin_layout Itemize
3202 Firmwares can't be loaded from ZIP archives.
3205 \begin_layout Itemize
3206 Manual polls can be corrupted if savestate occurs during those.
3209 \begin_layout Subsection
3213 \begin_layout Itemize
3214 Modifiers don't work with pseudo-keys (SDL).
3217 \begin_layout Itemize
3218 Audio for last dumped frame is not itself dumped.
3221 \begin_layout Itemize
3222 Audio in UI is pretty bad in quality.
3225 \begin_layout Itemize
3226 UI itself is 30fps max.
3229 \begin_layout Itemize
3230 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
3233 \begin_layout Itemize
3234 No menus, command based interface (SDL).
3237 \begin_layout Itemize
3238 Long commands don't scroll.
3241 \begin_layout Section
3245 \begin_layout Subsection
3249 \begin_layout Itemize
3253 \begin_layout Itemize
3254 Fix dumper video corruption with levels 10-18.
3257 \begin_layout Subsection
3261 \begin_layout Itemize
3265 \begin_layout Itemize
3266 Lots of code cleanups
3269 \begin_layout Itemize
3270 Lua interface to settings
3273 \begin_layout Itemize
3274 Allow specifying AVI borders without Lua
3277 \begin_layout Itemize
3278 Fix scaling if vscale > 1 and originx > 0 (left border exists)
3281 \begin_layout Itemize
3282 on_snoop lua callback
3285 \begin_layout Itemize
3286 Faster movie loading and saving.
3289 \begin_layout Subsection
3293 \begin_layout Itemize
3297 \begin_layout Subsection
3301 \begin_layout Itemize
3305 \begin_layout Itemize
3306 Save jukebox functionality.
3309 \begin_layout Subsection
3313 \begin_layout Itemize
3314 Try to fix some nasty failing movie load edge cases
3317 \begin_layout Itemize
3318 Allow specifying scripts to run on command line.
3321 \begin_layout Subsection
3325 \begin_layout Itemize
3326 Major source code reorganization.
3329 \begin_layout Itemize
3330 Backup savestates before overwriting.
3333 \begin_layout Itemize
3334 Don't crash if loading initial state fails.
3337 \begin_layout Subsection
3341 \begin_layout Itemize
3345 \begin_layout Itemize
3346 Fix author name parsing
3349 \begin_layout Itemize
3350 Fix rerecord counting
3353 \begin_layout Itemize
3354 (SDL) Print messages to console if SDL is uninitialized
3357 \begin_layout Itemize
3358 Add movieinfo program
3361 \begin_layout Itemize
3362 Fix loading movies starting from SRAM.
3365 \begin_layout Subsection
3369 \begin_layout Itemize
3370 Add support for unattended dumping
3373 \begin_layout Itemize
3374 Fix compiling for Win32
3377 \begin_layout Itemize
3378 Don't lock up if sound can't be initialized
3381 \begin_layout Itemize
3382 Strip trailing CR from commands
3385 \begin_layout Itemize
3386 Don't try to do dubious things in global ctors (fix crash on startup)
3389 \begin_layout Subsection
3393 \begin_layout Itemize
3394 Small documentation tweaking
3397 \begin_layout Itemize
3401 \begin_layout Itemize
3402 Fix major bug in modifier matching
3405 \begin_layout Subsection
3409 \begin_layout Itemize
3410 Lots of documentation fixes
3413 \begin_layout Itemize
3414 Use dedicated callbacks for event backcomm., not commands.
3417 \begin_layout Itemize
3418 Ensure that the watchdog is not hit when executing delayed reset.
3421 \begin_layout Itemize
3422 Remove errant tab from joystick message.