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.
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
97 \begin_layout Enumerate
98 SVN r320, r358 or r364
101 \begin_layout Enumerate
102 Patched with included patches
106 \begin_layout Enumerate
110 \begin_layout Enumerate
114 \begin_layout Enumerate
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
122 \begin_layout Enumerate
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
142 \begin_layout Enumerate
143 libao (libao sound only)
146 \begin_layout Enumerate
147 Lua version 5.1.X or 5.2.X
150 \begin_layout Enumerate
154 \begin_layout Enumerate
155 libopus (optional, for commentary track tool)
158 \begin_layout Section
162 \begin_layout Itemize
163 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
167 \begin_layout Itemize
168 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
171 \begin_layout Itemize
172 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
176 \begin_layout Itemize
177 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
178 ersion>', gambatte core)
181 \begin_layout Itemize
182 Edit options.build (or copy of that file)
185 \begin_layout Itemize
186 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
190 \begin_layout Section
194 \begin_layout Subsection
198 \begin_layout Subsubsection
202 \begin_layout Standard
206 \begin_layout Subsubsection
210 \begin_layout Standard
214 \begin_layout Subsubsection
218 \begin_layout Standard
219 Load <file> as movie or savestate file on startup.
222 \begin_layout Subsubsection
226 \begin_layout Standard
227 Instead of starting the emulator, only display the settings.
230 \begin_layout Subsubsection
234 \begin_layout Standard
235 Instead of starting the emulator, display the plugin manager (useful to
236 disable some plugin that causes emulator to crash on startup)
239 \begin_layout Subsubsection
243 \begin_layout Standard
244 Run this Lua file on startup
247 \begin_layout Subsection
248 dump options (lsnes-dumpavi only)
251 \begin_layout Subsubsection
255 \begin_layout Standard
260 \begin_layout Subsubsection
264 \begin_layout Standard
265 Load <filename> as movie or savestate file on startup.
269 \begin_layout Subsubsection
273 \begin_layout Standard
274 Set the dumper to use (required).
275 Use 'list' for listing of known dumpers.
278 \begin_layout Subsubsection
279 --firmware-path=<path>
282 \begin_layout Standard
283 Set path to look for firmware.
286 \begin_layout Subsubsection
290 \begin_layout Standard
291 Set the mode to use (required for dumpers with multiple modes, forbidden
293 Use 'list' for known modes.
296 \begin_layout Subsubsection
300 \begin_layout Standard
303 \begin_inset Quotes eld
307 \begin_inset Quotes erd
313 \begin_layout Subsubsection
314 --option=<name>=<value>
317 \begin_layout Standard
318 Set option <name> to value <value>.
321 \begin_layout Subsubsection
325 \begin_layout Standard
326 Set number of frames to dump.
327 Mandatory, unless --overdump-length is specified.
330 \begin_layout Subsubsection
331 --overdump-length=<length>
334 \begin_layout Standard
335 Set number of frames to dump after movie end.
336 Mutually exclusive with --length.
339 \begin_layout Subsubsection
343 \begin_layout Standard
344 Run specified lua script (lsnes-dumpavi does not have initialization files).
347 \begin_layout Subsubsection
348 --load-library=<library>
351 \begin_layout Standard
352 Load the specified shared object / dynamic library / dynamic link library.
355 \begin_layout Subsection
356 lsnes settings directory
359 \begin_layout Standard
360 The lsnes settings directory is (in order of decreasing perference):
363 \begin_layout Itemize
366 lsnes (if %APPDATA% exists)
369 \begin_layout Itemize
370 Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
373 \begin_layout Itemize
374 Unix: $HOME/.config/lsnes (if $HOME exists)
377 \begin_layout Itemize
382 \begin_layout Standard
383 If leading directories do not exist, attempt to create them is made.
386 \begin_layout Section
390 \begin_layout Itemize
391 Commands beginning with '*' invoke the corresponding command without alias
395 \begin_layout Itemize
396 If command starts with '+' (after possible '*'), the command is executed
397 as-is when button is pressed, and when button is released, it is executed
398 with '+' replaced by '-'.
401 \begin_layout Itemize
402 Commands without '+' execute only on negative edge (release).
405 \begin_layout Subsection
409 \begin_layout Standard
410 Run <script> as if commands were entered on the command line.
413 \begin_layout Subsection
417 \begin_layout Standard
418 <address> may be decimal or hexadecimal (prefixed with '0x').
419 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
423 \begin_layout Standard
424 The available element <sizes> are:
427 \begin_layout Itemize
431 \begin_layout Itemize
435 \begin_layout Itemize
439 \begin_layout Itemize
443 \begin_layout Itemize
447 \begin_layout Itemize
448 float: 4 bytes (floating-point)
451 \begin_layout Itemize
452 double: 8 bytes (floating-point)
455 \begin_layout Standard
456 When reading RAM and ROM, multi-byte reads/writes are big-endian.
457 When dealing with DSP memory, multi-byte reads/writes are native-endian
458 (do not use operand sizes exceeding DSP bitness, except dword is OK for
462 \begin_layout Subsubsection
463 read-<size> <address>
466 \begin_layout Standard
467 Read the value of byte in <address>.
470 \begin_layout Subsubsection
471 read-s<size> <address>
474 \begin_layout Standard
475 Read the value of signed byte in <address>.
478 \begin_layout Subsubsection
479 write-<size> <address> <value>
482 \begin_layout Standard
483 Write <value> to byte in address <address>.
486 \begin_layout Subsection
490 \begin_layout Standard
491 These commands are not available in lsnesrc, but are available after ROM
495 \begin_layout Subsubsection
499 \begin_layout Standard
503 \begin_layout Subsubsection
507 \begin_layout Standard
508 Toggle paused/unpaused
511 \begin_layout Subsubsection
515 \begin_layout Standard
517 If the button is still held after configurable timeout expires, game unpauses
518 for the duration frame advance is held.
521 \begin_layout Subsubsection
525 \begin_layout Standard
527 If the button is still held after configurable timeout expires, game unpauses
528 for the duration frame advance is held.
531 \begin_layout Subsubsection
535 \begin_layout Standard
536 Skip to first poll in frame after current.
539 \begin_layout Subsubsection
543 \begin_layout Standard
544 Reset the SNES after this frame.
547 \begin_layout Subsubsection
551 \begin_layout Standard
552 Load savestate <filename> in current mode.
555 \begin_layout Subsubsection
556 load-state <filename>
559 \begin_layout Standard
560 Load savestate <filename> in readwrite mode.
563 \begin_layout Subsubsection
564 load-readonly <filename>
567 \begin_layout Standard
568 Load savestate <filename> in readonly mode.
571 \begin_layout Subsubsection
572 load-preserve <filename>
575 \begin_layout Standard
576 Load savestate <filename> in readonly mode, preserving current events.
579 \begin_layout Subsubsection
580 load-movie <filename>
583 \begin_layout Standard
584 Load savestate <filename>, ignoring save part in readonly mode.
587 \begin_layout Subsubsection
588 save-state <filename>
591 \begin_layout Standard
592 Save system state to <filename> as soon as possible.
595 \begin_layout Subsubsection
596 save-movie <filename>
599 \begin_layout Standard
600 Save movie to <filename>.
603 \begin_layout Subsubsection
607 \begin_layout Standard
611 \begin_layout Subsubsection
615 \begin_layout Standard
619 \begin_layout Subsubsection
623 \begin_layout Standard
624 Toggle between read-only and read-write modes.
627 \begin_layout Subsubsection
628 test-1, test-2, test-3
631 \begin_layout Standard
632 Internal test commands.
636 \begin_layout Subsubsection
637 take-screenshot <filename>
640 \begin_layout Standard
641 Save screenshot to <filename>.
644 \begin_layout Subsubsection
645 +controller <class>-<#>-<button>
648 \begin_layout Standard
649 Press button <button> on controller <num> of class <class>.
652 \begin_layout Itemize
653 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
654 ext0, ext1, ext2, ext3
657 \begin_layout Itemize
661 \begin_layout Itemize
662 Class 'superscope': trigger, cursor, turbo, pause
665 \begin_layout Itemize
666 Class 'justifier': trigger, start
669 \begin_layout Itemize
670 Class 'gb': A, B, select, start, up, down, left, right
673 \begin_layout Subsubsection
674 hold-controller <class>-<#>-<button>
677 \begin_layout Standard
678 Hold/unhold button <button> on controller <num> of class <class>.
681 \begin_layout Subsubsection
682 type-controller <class>-<#>-<button>
685 \begin_layout Standard
686 Hold/unhold button <button> on controller <num> of class <class> for the
688 See +controller for button names.
691 \begin_layout Standard
692 Cauntion: Does not work properly if outside frame advance.
695 \begin_layout Subsubsection
696 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
699 \begin_layout Standard
701 If duty is not specified, defaults to 1.
702 If <cyclelen> is not specified, defaults to 2.
705 \begin_layout Subsubsection
706 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
709 \begin_layout Standard
713 \begin_layout Subsubsection
714 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
717 \begin_layout Standard
719 If autofire is turned on, specified cycle is used.
722 \begin_layout Subsubsection
723 designate-position <class>-<#>-analog<n>
726 \begin_layout Standard
727 Designate position for analog pair.
728 <n> is only there if there are multiple axis pairs.
731 \begin_layout Subsubsection
735 \begin_layout Standard
739 \begin_layout Subsubsection
743 \begin_layout Standard
744 Toggle pause on end flag.
747 \begin_layout Subsubsection
751 \begin_layout Standard
752 Set pause on end flag.
755 \begin_layout Subsubsection
759 \begin_layout Standard
760 Clear pause on end flag.
763 \begin_layout Subsubsection
764 action <action> [<parameters>]
767 \begin_layout Standard
768 Run specified core action.
771 \begin_layout Subsection
775 \begin_layout Subsubsection
776 cycle-jukebox-backward
779 \begin_layout Standard
780 Cycle save jukebox backwards.
783 \begin_layout Subsubsection
784 cycle-jukebox-forward
787 \begin_layout Standard
788 Cycle save jukebox forwards
791 \begin_layout Subsubsection
792 set-jukebox-slot <slot>
795 \begin_layout Standard
796 Set current jukebox slot
799 \begin_layout Subsubsection
803 \begin_layout Standard
804 Do load from jukebox (current mode).
807 \begin_layout Subsubsection
811 \begin_layout Standard
812 Do state save to jukebox.
815 \begin_layout Subsection
819 \begin_layout Subsubsection
823 \begin_layout Standard
827 \begin_layout Subsubsection
828 create-branch <pid> <name>
831 \begin_layout Standard
832 Create a new branch, with <pid> as parent and <name> as name.
835 \begin_layout Subsubsection
836 rename-branch <id> <name>
839 \begin_layout Standard
840 Rename branch <id> to <name>.
843 \begin_layout Subsubsection
844 reparent-branch <id> <pid>
847 \begin_layout Standard
848 Set parent of branch <id> to <pid>.
851 \begin_layout Subsubsection
855 \begin_layout Standard
856 Set current branch to <id>.
859 \begin_layout Subsubsection
863 \begin_layout Standard
867 \begin_layout Standard
871 \begin_layout Subsection
875 \begin_layout Subsubsection
876 evaluate-lua <luacode>
879 \begin_layout Standard
880 Run Lua code <luacode> using built-in Lua interpretter.
883 \begin_layout Subsubsection
887 \begin_layout Standard
888 Synonym for evaluate-lua.
891 \begin_layout Subsubsection
895 \begin_layout Standard
896 Run specified lua file using built-in Lua interpretter.
899 \begin_layout Subsubsection
903 \begin_layout Standard
904 Clear the Lua VM state and restore to factory defaults.
907 \begin_layout Subsection
911 \begin_layout Subsubsection
912 enable-sound <on/off>
915 \begin_layout Standard
916 Enable/Disable sound.
919 \begin_layout Subsection
923 \begin_layout Subsubsection
927 \begin_layout Standard
928 Reloads the main ROM image from <file>.
931 \begin_layout Subsubsection
935 \begin_layout Standard
936 Tangent for recording voice for commentary track.
937 While pressed, record a stream.
940 \begin_layout Subsubsection
941 advance-subframe-timeout
944 \begin_layout Standard
945 Subframe advance timeout in milliseconds.
949 \begin_layout Section
953 \begin_layout Subsection
957 \begin_layout Subsection
961 \begin_layout Subsubsection
965 \begin_layout Standard
966 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
970 \begin_layout Subsubsection
974 \begin_layout Standard
975 AVI dumper: Set the default left border thickness (unless lua overrides)
981 \begin_layout Subsubsection
985 \begin_layout Standard
986 AVI dumper: Set the default right border thickness (unless lua overrides)
992 \begin_layout Subsubsection
996 \begin_layout Standard
997 AVI dumper: Set the default top border thickness (unless lua overrides)
1003 \begin_layout Subsubsection
1007 \begin_layout Standard
1008 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1014 \begin_layout Subsubsection
1018 \begin_layout Standard
1019 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1024 \begin_layout Subsubsection
1028 \begin_layout Standard
1029 AVI dumper: Compression level (0-18).
1032 \begin_layout Itemize
1033 Compression levels 10 and above are not compatible with stock CSCD codec.
1036 \begin_layout Itemize
1037 Recomended level is 7.
1040 \begin_layout Subsubsection
1044 \begin_layout Standard
1045 AVI dumper: Set method of determining the sound rate.
1048 \begin_layout Itemize
1049 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1050 128, 176.4 and 192 kHz.
1053 \begin_layout Itemize
1054 1: Round down to nearest integer.
1057 \begin_layout Itemize
1058 2: Round up to nearest ingeter.
1061 \begin_layout Itemize
1062 3: Multiply by denominator.
1065 \begin_layout Itemize
1066 4: High quality 44.1kHz (SRC needed).
1069 \begin_layout Itemize
1070 5: High quality 48kHz (SRC needed).
1073 \begin_layout Subsection
1077 \begin_layout Subsubsection
1081 \begin_layout Standard
1082 JMD dumper: Compression level (0-9).
1085 \begin_layout Section
1089 \begin_layout Itemize
1090 The editor edits in-memory movie.
1093 \begin_layout Itemize
1094 Because past can't be edited and readwrite mode doesn't allow future, editing
1102 \begin_layout Itemize
1103 Keyboard triggers the normal hotkeys and bindings.
1106 \begin_layout Subsection
1110 \begin_layout Itemize
1111 Clicking on cell in future (indicated by lack of redish background) toggles
1112 it (if it is a button) or prompts for a value (if it is an axis)
1115 \begin_layout Itemize
1116 Dragging vertically toggles sequence of buttons or changes a sequence of
1120 \begin_layout Subsection
1121 Right button actions
1124 \begin_layout Standard
1125 The right mouse button pops up a context-sensitive menu:
1128 \begin_layout Itemize
1129 Toggle <something>: Toggle this button
1132 \begin_layout Itemize
1133 Change <something>: Change this axis value
1136 \begin_layout Itemize
1137 Insert frame after: Insert a frame after this frame
1140 \begin_layout Itemize
1141 Append frame: Append a frame to movie
1144 \begin_layout Itemize
1145 Append frames: Append specified number of frames to movie
1148 \begin_layout Itemize
1149 Delete frame: Delete this frame
1152 \begin_layout Itemize
1153 Delete subframe: Delete this subframe
1156 \begin_layout Itemize
1157 Truncate movie: Delete this subframe and everything after it.
1160 \begin_layout Itemize
1161 Scroll to frame: Prompt for a frame and scroll the display to that frame.
1164 \begin_layout Itemize
1165 Scroll to current frame: Scroll the display to current position
1168 \begin_layout Itemize
1169 Run to frame: Prompts for frame and runs the emulation to that frame.
1172 \begin_layout Itemize
1173 Change number of lines visible: Change the height of the movie display (1
1177 \begin_layout Itemize
1178 Lock scroll to playback: While playing back or rewinding movies, the display
1179 will follow if enabled.
1182 \begin_layout Section
1183 Memory watch expression syntax
1186 \begin_layout Standard
1187 Memory watch expressions has the following syntax elements:
1190 \begin_layout LyX-Code
1191 ${foo} The value of memory watch foo.
1194 \begin_layout LyX-Code
1195 0x1234 Hexadecimal number 1234
1198 \begin_layout LyX-Code
1199 12345 Decimal number 12345
1202 \begin_layout LyX-Code
1203 3.141 Decimal number 3.141
1206 \begin_layout LyX-Code
1210 \begin_layout LyX-Code
1211 ~a Bitwise NOT (integers only)
1214 \begin_layout LyX-Code
1218 \begin_layout LyX-Code
1219 a/b Division/quotent
1222 \begin_layout LyX-Code
1223 a%b Remainder (integers only)
1226 \begin_layout LyX-Code
1227 a+b Sum or string concatenation
1230 \begin_layout LyX-Code
1234 \begin_layout LyX-Code
1235 a<<b Shift left (integers only)
1238 \begin_layout LyX-Code
1239 a>>b Shift right (integers only).
1240 Arithmetic for signed.
1243 \begin_layout LyX-Code
1247 \begin_layout LyX-Code
1248 a<=b Less or equal to
1251 \begin_layout LyX-Code
1255 \begin_layout LyX-Code
1259 \begin_layout LyX-Code
1260 a>=b Greater or equal to
1263 \begin_layout LyX-Code
1267 \begin_layout LyX-Code
1268 a&b Bitwise AND (integers only)
1271 \begin_layout LyX-Code
1272 a^b Bitwise XOR (integers only)
1275 \begin_layout LyX-Code
1276 a|b Bitwise OR (integers only)
1279 \begin_layout LyX-Code
1283 \begin_layout LyX-Code
1287 \begin_layout LyX-Code
1288 π Numeric constant pi.
1291 \begin_layout LyX-Code
1295 \begin_layout LyX-Code
1296 if(x,y) If x is true, y, else false.
1299 \begin_layout LyX-Code
1300 if(x,y,z) If x is true, y, else z.
1303 \begin_layout LyX-Code
1307 \begin_layout LyX-Code
1309 that is not false, or false if none.
1312 \begin_layout LyX-Code
1316 \begin_layout LyX-Code
1320 \begin_layout LyX-Code
1324 \begin_layout LyX-Code
1328 \begin_layout LyX-Code
1332 \begin_layout LyX-Code
1336 \begin_layout LyX-Code
1337 min(x...) The smallest value among x...
1341 \begin_layout LyX-Code
1342 max(x...) The largest value among x...
1346 \begin_layout LyX-Code
1347 sum(x...) Sum/concatenation of x...
1351 \begin_layout LyX-Code
1352 prod(x...) Product of x...
1356 \begin_layout LyX-Code
1357 sqrt(x) Square root of x.
1360 \begin_layout LyX-Code
1361 log(x) Natural log of x.
1364 \begin_layout LyX-Code
1365 log(x,y) Log of y to base x.
1368 \begin_layout LyX-Code
1372 \begin_layout LyX-Code
1376 \begin_layout LyX-Code
1380 \begin_layout LyX-Code
1384 \begin_layout LyX-Code
1388 \begin_layout LyX-Code
1389 asin(x) Arcsine of x
1392 \begin_layout LyX-Code
1393 acos(x) Arccosine of x
1396 \begin_layout LyX-Code
1397 atan(x) Arctangent of x
1400 \begin_layout LyX-Code
1401 atan(x,y) Angle between vector (x,y) and x-axis.
1404 \begin_layout LyX-Code
1405 sinh(x) Hyperbolic sine of x
1408 \begin_layout LyX-Code
1409 cosh(x) Hyperbolic cosine of x
1412 \begin_layout LyX-Code
1413 tanh(x) Hyperbolic tangent of x
1416 \begin_layout LyX-Code
1417 arsinh(x) Hyperbolic arsine of x
1420 \begin_layout LyX-Code
1421 arcosh(x) Hyperbolic arcosine of x
1424 \begin_layout LyX-Code
1425 artanh(x) Hyperbolic artangent of x
1428 \begin_layout LyX-Code
1429 torad(x) Convert x degrees to radians.
1432 \begin_layout LyX-Code
1433 todeg(x) Convert x radians to degrees.
1436 \begin_layout LyX-Code
1437 re(x) Real part of complex number x.
1440 \begin_layout LyX-Code
1441 im(x) Imaginary part of complex number x.
1444 \begin_layout LyX-Code
1445 conj(x) Complex conjugate of x.
1448 \begin_layout LyX-Code
1449 abs(x) Absolute value of x.
1452 \begin_layout LyX-Code
1453 arg(x) Argument of x.
1456 \begin_layout LyX-Code
1457 pyth(x...) sqrt(sum(x^2)).
1459 pythagorean distance.
1462 \begin_layout LyX-Code
1463 e Base of natural logarithm
1466 \begin_layout LyX-Code
1470 \begin_layout LyX-Code
1474 \begin_layout LyX-Code
1475 false Constant false
1478 \begin_layout LyX-Code
1482 \begin_layout Section
1483 Modifier and key names:
1486 \begin_layout Subsection
1490 \begin_layout Subsubsection
1494 \begin_layout Standard
1495 Following modifier names are known:
1498 \begin_layout Itemize
1502 \begin_layout Itemize
1506 \begin_layout Itemize
1510 \begin_layout Itemize
1514 \begin_layout Itemize
1518 \begin_layout Subsubsection
1522 \begin_layout Standard
1523 Following key names are known:
1526 \begin_layout Itemize
1527 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
1528 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
1529 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
1530 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1531 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
1532 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1533 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
1534 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
1535 pause, capital, end, home, lefT, up, right, down, select, print, execute,
1536 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
1537 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
1538 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
1539 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
1540 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
1541 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
1542 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
1543 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
1544 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
1545 windows_right, windows_menu, command, special1, special2, special3, special4,
1546 special5, special6, special7, special8, special9, special10, special11,
1547 special12, special13, special14, special15, special16, special17, special18,
1548 special19, special20
1551 \begin_layout Section
1555 \begin_layout Standard
1556 Movie file is .zip archive in itself, normal ZIP archive tools work on it
1557 (note: If you recompress it, do not use compression methods other than
1558 store and deflate and especially do not use encryption of any kind).
1561 \begin_layout Subsection
1562 Detecting clean start/SRAM/Savestate
1565 \begin_layout Itemize
1567 \begin_inset Quotes eld
1571 \begin_inset Quotes erd
1574 it is savestate, otherwise:
1577 \begin_layout Itemize
1578 If file has members with names starting
1579 \begin_inset Quotes eld
1583 \begin_inset Quotes erd
1586 it is movie starting from SRAM, otherwise:
1589 \begin_layout Itemize
1590 It is movie starting from clear state.
1593 \begin_layout Subsection
1597 \begin_layout Standard
1598 Type of game ROM and region (as one line).
1602 \begin_layout Standard
1603 \begin_inset Tabular
1604 <lyxtabular version="3" rows="8" columns="3">
1605 <features tabularvalignment="middle">
1606 <column alignment="center" valignment="top" width="0">
1607 <column alignment="center" valignment="top" width="0">
1608 <column alignment="center" valignment="top" width="0">
1610 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1613 \begin_layout Plain Layout
1619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1622 \begin_layout Plain Layout
1628 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1631 \begin_layout Plain Layout
1639 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1642 \begin_layout Plain Layout
1648 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1651 \begin_layout Plain Layout
1657 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1660 \begin_layout Plain Layout
1668 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1671 \begin_layout Plain Layout
1677 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1680 \begin_layout Plain Layout
1686 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1689 \begin_layout Plain Layout
1697 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1700 \begin_layout Plain Layout
1706 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1709 \begin_layout Plain Layout
1715 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1718 \begin_layout Plain Layout
1726 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1729 \begin_layout Plain Layout
1735 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1738 \begin_layout Plain Layout
1744 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1747 \begin_layout Plain Layout
1755 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1758 \begin_layout Plain Layout
1764 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1767 \begin_layout Plain Layout
1773 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1776 \begin_layout Plain Layout
1784 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1787 \begin_layout Plain Layout
1793 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1796 \begin_layout Plain Layout
1802 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1805 \begin_layout Plain Layout
1813 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1816 \begin_layout Plain Layout
1822 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1825 \begin_layout Plain Layout
1831 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1834 \begin_layout Plain Layout
1848 \begin_layout Standard
1852 \begin_layout Standard
1853 \begin_inset Tabular
1854 <lyxtabular version="3" rows="3" columns="2">
1855 <features tabularvalignment="middle">
1856 <column alignment="center" valignment="top" width="0">
1857 <column alignment="center" valignment="top" width="0">
1859 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1862 \begin_layout Plain Layout
1868 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1871 \begin_layout Plain Layout
1879 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1882 \begin_layout Plain Layout
1888 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1891 \begin_layout Plain Layout
1899 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1902 \begin_layout Plain Layout
1908 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1911 \begin_layout Plain Layout
1925 \begin_layout Subsection
1929 \begin_layout Standard
1930 Contains type of port #1 (as one line).
1931 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
1932 If not present, defaults to 'gamepad'.
1935 \begin_layout Subsection
1939 \begin_layout Standard
1940 Contains type of port #2 (as one line).
1941 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
1942 'justifier' and 'justifiers'.
1943 If not present, defaults to 'none'.
1946 \begin_layout Subsection
1950 \begin_layout Standard
1951 Contains name of the game (as one line).
1954 \begin_layout Subsection
1958 \begin_layout Standard
1959 Contains authors, one per line.
1960 Part before '|' is the full name, part after is the nickname.
1963 \begin_layout Subsection
1967 \begin_layout Standard
1969 \begin_inset Quotes eld
1973 \begin_inset Quotes erd
1977 Used to reject other saves.
1980 \begin_layout Subsection
1981 Member: controlsversion
1984 \begin_layout Standard
1986 \begin_inset Quotes eld
1990 \begin_inset Quotes erd
1994 Used to identify what controls are there.
1997 \begin_layout Subsection
1999 \begin_inset Quotes eld
2003 \begin_inset Quotes erd
2009 \begin_layout Standard
2010 Contains bsnes core version number (as one line).
2013 \begin_layout Subsection
2017 \begin_layout Standard
2018 Contains project ID (as one line).
2019 Used to identify if two movies are part of the same project.
2022 \begin_layout Subsection
2023 Member: {rom,slota,slotb}{,xml}.sha256
2026 \begin_layout Standard
2027 Contains SHA-256 of said ROM or ROM mapping file (as one line).
2028 Absent if corresponding file is absent.
2031 \begin_layout Subsection
2032 Member: moviesram.<name>
2035 \begin_layout Standard
2036 Raw binary startup SRAM of kind <name>.
2037 Only present in savestates and movies starting from SRAM.
2040 \begin_layout Subsection
2044 \begin_layout Standard
2045 Contains frame number (as one line) of frame movie was saved on.
2046 Only present in savestates.
2049 \begin_layout Subsection
2053 \begin_layout Standard
2054 Current value of lag counter (as one line).
2055 Only present in savestates.
2058 \begin_layout Subsection
2059 Member: pollcounters
2062 \begin_layout Standard
2063 Contains poll counters (currently 100 of them), one per line.
2064 Each line is raw poll count if DRDY is set for it.
2065 Otherwise it is negative poll count minus one.
2066 Only present in savestates.
2069 \begin_layout Subsection
2073 \begin_layout Standard
2074 Raw binary dump of host memory.
2075 Only present in savestates.
2078 \begin_layout Subsection
2082 \begin_layout Standard
2083 The raw binary savestate itself.
2084 Savestate detection uses this file, only present in savestates.
2087 \begin_layout Subsection
2091 \begin_layout Standard
2092 Screenshot of current frame.
2093 Only present in savestates.
2094 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
2096 Height of image is inferred from the width and size of data.
2099 \begin_layout Subsection
2103 \begin_layout Standard
2104 Raw binary SRAM of kind <name> at time of savestate.
2105 Only present in savestates.
2108 \begin_layout Subsection
2112 \begin_layout Standard
2113 The actual input track, one line per subframe (blank lines are skipped).
2116 \begin_layout Itemize
2117 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
2118 part of same frame as previous, otherwise it starts a new frame.
2121 \begin_layout Itemize
2122 First subframe must start a new frame.
2125 \begin_layout Standard
2126 Length of movie in frames is number of lines in input file that start a
2130 \begin_layout Subsection
2134 \begin_layout Standard
2139 \begin_layout Itemize
2140 Each line is in form <firstframe> <numframes> <text>.
2143 \begin_layout Itemize
2144 Linefeed is encoded as
2146 n, backslash is encoded as
2153 \begin_layout Subsection
2157 \begin_layout Standard
2158 Contains textual base-10 rerecord count (as one line; emulator just writes
2159 this, it doesn't read it) + 1.
2162 \begin_layout Subsection
2166 \begin_layout Standard
2167 This member stores set of load IDs.
2168 There is one load ID per rerecord (plus one corresponding to start of project).
2171 \begin_layout Itemize
2172 This member constists of concatenation of records
2175 \begin_layout Itemize
2176 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
2180 \begin_layout Itemize
2181 IDs are interpretted as 256-bit big-endian integers with warparound.
2184 \begin_layout Itemize
2185 Initial predicted ID is all zeroes.
2188 \begin_layout Standard
2189 Format of each record is:
2192 \begin_layout Itemize
2193 1 byte: Opcode byte.
2194 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
2198 \begin_layout Itemize
2199 32-prefixlen bytes of ID.
2202 \begin_layout Itemize
2203 countlen bytes of big-endian count (count).
2206 \begin_layout Standard
2207 Records are processed as follows:
2210 \begin_layout Itemize
2211 To form the first ID encoded by record, take the first prefixlen bytes predicted
2212 ID and append the read ID value to it.
2213 The result is the first ID encoded.
2216 \begin_layout Itemize
2217 If countlen is 0, record encodes 1 ID.
2220 \begin_layout Itemize
2221 If countlen is 1, record encodes 2+count IDs.
2224 \begin_layout Itemize
2225 If countlen is 2, record encodes 258+count IDs.
2228 \begin_layout Itemize
2229 If countlen is 3, record encodes 65794+count IDs.
2232 \begin_layout Itemize
2233 The new predicted ID is the next ID after last one encoded by the record.
2236 \begin_layout Standard
2237 The number of rerecords + 1 is equal to the sum of number of IDs encoded
2241 \begin_layout Subsection
2242 Member: starttime.second
2245 \begin_layout Standard
2246 Movie starting time, second part.
2247 Epoch is Unix epoch.
2248 Default is 1,000,000,000.
2251 \begin_layout Subsection
2252 Member: starttime.subsecond
2255 \begin_layout Standard
2256 Movie starting time, subsecond part.
2261 \begin_layout Subsection
2262 Member: savetime.second
2265 \begin_layout Standard
2266 Movie saving time, second part.
2267 Default is starttime.second.
2268 Only present in savestates.
2271 \begin_layout Subsection
2272 Member: savetime.subsecond
2275 \begin_layout Standard
2276 Movie saving time, subsecond part.
2277 Default is starttime.subsecond.
2278 Only present in savestates.
2281 \begin_layout Section
2282 lsvs file format (commentary tracks)
2285 \begin_layout Subsection
2289 \begin_layout Itemize
2290 Each cluster is 8kB (8192 bytes) in size.
2293 \begin_layout Itemize
2294 Cluster n starts at offset 8192*n in file.
2297 \begin_layout Itemize
2298 The following clusters are system special:
2302 \begin_layout Itemize
2303 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
2306 \begin_layout Itemize
2307 Cluster 1 (superblock)
2311 \begin_layout Subsection
2315 \begin_layout Itemize
2316 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
2320 \begin_layout Itemize
2321 This cluster table consists of 2048 4-byte big-endian integers.
2324 \begin_layout Itemize
2325 Each entry describes a cluster in 16MB supercluster, in order.
2328 \begin_layout Itemize
2329 The valid values for entries are:
2333 \begin_layout Itemize
2334 0x00000000: Free cluster
2337 \begin_layout Itemize
2338 0x00000001: Last cluster in chain.
2341 \begin_layout Itemize
2342 0xFFFFFFFF: System cluster (cluster tables and superblock)
2345 \begin_layout Itemize
2346 (anything else): Number of next cluster in chain.
2347 Must not be multiple of 2048.
2351 \begin_layout Itemize
2352 Due to limitations of the format, there can be at most 2097052 superclusters,
2353 giving maximum file size of 16TB.
2356 \begin_layout Subsection
2360 \begin_layout Itemize
2361 The stream table chain always starts in cluster 2.
2364 \begin_layout Itemize
2365 Otherwise, it follows normal chaining.
2368 \begin_layout Itemize
2369 The stream table consists of 16-byte entries:
2373 \begin_layout Itemize
2374 The first 8 bytes of entry give big-endian beginning position of stream
2375 in units of 1/48000 s.
2378 \begin_layout Itemize
2379 The next 4 bytes of entry give big-endian beginning cluster for control
2381 0 here marks the entry as not present.
2384 \begin_layout Itemize
2385 The last 4 bytes of entry give big-endian beginning cluster for codec data.
2389 \begin_layout Itemize
2390 Stream table clusters are normal clusters, following normal chaining.
2393 \begin_layout Itemize
2394 The stream begnning position is not guarenteed unique.
2395 There can be multiple streams with the same starting position in the file.
2398 \begin_layout Subsection
2402 \begin_layout Itemize
2403 The stream control data consists of entries 4 bytes each:
2407 \begin_layout Itemize
2408 The first 2 bytes of entry gives big-endian length of packet
2411 \begin_layout Itemize
2412 The next byte of entry gives audio length of packet in units of 1/400 s.
2415 \begin_layout Itemize
2416 The last byte is control byte.
2420 \begin_layout Itemize
2421 0 means this entry is not present and the control data ends.
2424 \begin_layout Itemize
2425 1 is valid control entry.
2430 \begin_layout Itemize
2431 The stream control data can also end by running into end of the readable
2436 \begin_layout Itemize
2437 This happens if there happens to be exact multiple of 2048 packets in stream
2438 and number of packets is nonzero.
2442 \begin_layout Itemize
2443 These clusters follow normal chaining.
2446 \begin_layout Subsection
2450 \begin_layout Itemize
2451 Stream codec data consists of raw Opus data packets packed back to back
2452 with nothing in between.
2455 \begin_layout Itemize
2456 Warning: Due to internal limitations, this data must reside in the first
2457 65536 superclusters (that is, the first 1TB of the file).
2460 \begin_layout Subsection
2464 \begin_layout Itemize
2465 The superblock is stored in cluster 1.
2469 \begin_layout Itemize
2470 The first 11 bytes are
2471 \begin_inset Quotes eld
2475 \begin_inset Quotes erd
2481 \begin_layout Itemize
2482 The rest are unused.
2485 \begin_layout Itemize
2486 This cluster 1 is marked as system special.
2489 \begin_layout Section
2490 Known ROM extensions
2493 \begin_layout Itemize
2494 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
2497 \begin_layout Itemize
2498 DMG cartridge ROMs: dmg, gb.
2501 \begin_layout Itemize
2502 GBC cartridge ROMs: cgb, gbc.
2505 \begin_layout Section
2509 \begin_layout Itemize
2510 The first line must be:
2511 \begin_inset Quotes eld
2515 \begin_inset Quotes erd
2521 \begin_layout Itemize
2522 There is one needed line:
2523 \begin_inset Quotes eld
2527 \begin_inset Quotes erd
2531 This sets system type to <systype>.
2532 The following system types are valid:
2536 \begin_layout Itemize
2540 \begin_layout Itemize
2541 bsx (BS-X non-slotted)
2544 \begin_layout Itemize
2545 bsxslotted (BS-X slotted)
2548 \begin_layout Itemize
2549 sufamiturbo (Sufami Turbo)
2552 \begin_layout Itemize
2553 sgb (Super Game Boy)
2556 \begin_layout Itemize
2560 \begin_layout Itemize
2561 gbc (Game Boy Color)
2564 \begin_layout Itemize
2565 gbc_gba (Game Boy Color with GBA initial register values)
2569 \begin_layout Itemize
2570 Optionally a region can be specified:
2571 \begin_inset Quotes eld
2575 \begin_inset Quotes erd
2579 The following values are valid:
2583 \begin_layout Itemize
2584 autodetect (Autodetect region: snes and sgb only)
2587 \begin_layout Itemize
2588 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
2591 \begin_layout Itemize
2592 pal (PAL: snes, sgb)
2595 \begin_layout Itemize
2596 world (World: dmg, gbc, gbc_gba)
2600 \begin_layout Itemize
2601 ROM images are loaded as:
2602 \begin_inset Quotes eld
2606 \begin_inset Quotes erd
2610 The following types are valid:
2614 \begin_layout Itemize
2615 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
2616 BIOS in bsx, bsxslotted, sufamiturbo)
2619 \begin_layout Itemize
2620 bsx (Cartridge ROM in bsx, bsxslotted)
2623 \begin_layout Itemize
2624 slot-a (Cartridge ROM in sufamiturbo)
2627 \begin_layout Itemize
2628 slot-b (Cartridge ROM in sufamiturbo)
2632 \begin_layout Itemize
2633 ROM markup can be loaded as:
2634 \begin_inset Quotes eld
2638 \begin_inset Quotes erd
2642 The types valid are the same as for ROMs.
2645 \begin_layout Itemize
2646 Patches can be loaded as
2647 \begin_inset Quotes eld
2650 patch[<offset>] <type> <file>
2651 \begin_inset Quotes erd
2655 The types are the same as for ROMs.
2659 \begin_layout Itemize
2660 Offset is given in form [+-]<number>.
2661 Usually offset is either +0 or -512.
2664 \begin_layout Itemize
2665 Default offset is +0.
2669 \begin_layout Subsection
2673 \begin_layout LyX-Code
2677 \begin_layout LyX-Code
2681 \begin_layout LyX-Code
2682 rom rom speedygonzales.sfc
2685 \begin_layout LyX-Code
2686 patch-512 rom sonicthehedgehog.ips
2689 \begin_layout Subsection
2693 \begin_layout LyX-Code
2697 \begin_layout LyX-Code
2701 \begin_layout LyX-Code
2702 rom rom supergameboy.sfc
2705 \begin_layout LyX-Code
2706 rom dmg megamanV.dmg
2709 \begin_layout Section
2710 Quick'n'dirty encode guide
2713 \begin_layout Enumerate
2714 Start the emulator and load the ROM and movie file.
2717 \begin_layout Enumerate
2718 Set large AVI option 'set-setting avi-large on'
2721 \begin_layout Enumerate
2722 Enable dumping 'dump-avi tmpdump'
2725 \begin_layout Enumerate
2726 Unpause and let it run until you want to end dumping.
2729 \begin_layout Enumerate
2730 Close the emulator (closing the window is the easiest way).
2734 \begin_layout Enumerate
2735 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
2736 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
2739 \begin_layout Enumerate
2740 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
2743 \begin_layout Enumerate
2744 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
2745 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
2748 \begin_layout Enumerate
2749 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
2750 Now final.mkv contains quick'n'dirty encode.
2753 \begin_layout Section
2754 Axis configurations for some gamepad types:
2757 \begin_layout Subsection
2761 \begin_layout Standard
2762 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
2765 \begin_layout LyX-Code
2766 set-axis joystick0axis2 pressure-+
2769 \begin_layout LyX-Code
2770 set-axis joystick0axis5 pressure-+
2773 \begin_layout Itemize
2774 This is needed for SDL only.
2775 EVDEV sets those types correctly.
2778 \begin_layout Subsection
2780 \begin_inset Quotes eld
2784 \begin_inset Quotes erd
2790 \begin_layout Standard
2791 Axes 8-19 should be disabled.
2794 \begin_layout LyX-Code
2795 set-axis joystick0axis8 disabled
2798 \begin_layout LyX-Code
2799 set-axis joystick0axis9 disabled
2802 \begin_layout LyX-Code
2803 set-axis joystick0axis10 disabled
2806 \begin_layout LyX-Code
2807 set-axis joystick0axis11 disabled
2810 \begin_layout LyX-Code
2811 set-axis joystick0axis12 disabled
2814 \begin_layout LyX-Code
2815 set-axis joystick0axis13 disabled
2818 \begin_layout LyX-Code
2819 set-axis joystick0axis14 disabled
2822 \begin_layout LyX-Code
2823 set-axis joystick0axis15 disabled
2826 \begin_layout LyX-Code
2827 set-axis joystick0axis16 disabled
2830 \begin_layout LyX-Code
2831 set-axis joystick0axis17 disabled
2834 \begin_layout LyX-Code
2835 set-axis joystick0axis18 disabled
2838 \begin_layout LyX-Code
2839 set-axis joystick0axis19 disabled
2842 \begin_layout Section
2846 \begin_layout Subsection
2847 Problems from BSNES core:
2850 \begin_layout Itemize
2851 The whole pending save stuff.
2854 \begin_layout Itemize
2855 It is slow (especially accuracy).
2858 \begin_layout Itemize
2859 Firmwares can't be loaded from ZIP archives.
2862 \begin_layout Subsection
2866 \begin_layout Itemize
2867 Modifiers don't work with pseudo-keys.
2870 \begin_layout Itemize
2871 Audio for last dumped frame is not itself dumped.
2874 \begin_layout Itemize
2875 Audio in UI is pretty bad in quality if game doesn't run at full speed.