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
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 Itemize
418 <address> can be one of:
422 \begin_layout Itemize
426 \begin_layout Itemize
427 Hexadecimal number (prefixed with 0x)
430 \begin_layout Itemize
431 <memarea>+<hexoffset> (no 0x prefix for offset).
435 \begin_layout Standard
436 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
440 \begin_layout Standard
441 The available element <sizes> are:
444 \begin_layout Itemize
448 \begin_layout Itemize
452 \begin_layout Itemize
456 \begin_layout Itemize
460 \begin_layout Itemize
464 \begin_layout Itemize
465 float: 4 bytes (floating-point)
468 \begin_layout Itemize
469 double: 8 bytes (floating-point)
472 \begin_layout Standard
473 When reading RAM and ROM, multi-byte reads/writes are big-endian.
474 When dealing with DSP memory, multi-byte reads/writes are native-endian
475 (do not use operand sizes exceeding DSP bitness, except dword is OK for
479 \begin_layout Subsubsection
480 read-<size> <address>
483 \begin_layout Standard
484 Read the value of byte in <address>.
487 \begin_layout Subsubsection
488 read-s<size> <address>
491 \begin_layout Standard
492 Read the value of signed byte in <address>.
495 \begin_layout Subsubsection
496 write-<size> <address> <value>
499 \begin_layout Standard
500 Write <value> to byte in address <address>.
503 \begin_layout Subsection
507 \begin_layout Standard
508 These commands are not available in lsnesrc, but are available after ROM
512 \begin_layout Subsubsection
516 \begin_layout Standard
520 \begin_layout Subsubsection
524 \begin_layout Standard
525 Toggle paused/unpaused
528 \begin_layout Subsubsection
532 \begin_layout Standard
534 If the button is still held after configurable timeout expires, game unpauses
535 for the duration frame advance is held.
538 \begin_layout Subsubsection
542 \begin_layout Standard
544 If the button is still held after configurable timeout expires, game unpauses
545 for the duration frame advance is held.
548 \begin_layout Subsubsection
552 \begin_layout Standard
553 Skip to first poll in frame after current.
556 \begin_layout Subsubsection
560 \begin_layout Standard
561 Reset the SNES after this frame.
564 \begin_layout Subsubsection
568 \begin_layout Standard
569 Load savestate <filename> in current mode.
572 \begin_layout Subsubsection
573 load-state <filename>
576 \begin_layout Standard
577 Load savestate <filename> in readwrite mode.
580 \begin_layout Subsubsection
581 load-readonly <filename>
584 \begin_layout Standard
585 Load savestate <filename> in readonly mode.
588 \begin_layout Subsubsection
589 load-preserve <filename>
592 \begin_layout Standard
593 Load savestate <filename> in readonly mode, preserving current events.
596 \begin_layout Subsubsection
597 load-movie <filename>
600 \begin_layout Standard
601 Load savestate <filename>, ignoring save part in readonly mode.
604 \begin_layout Subsubsection
605 save-state <filename>
608 \begin_layout Standard
609 Save system state to <filename> as soon as possible.
612 \begin_layout Subsubsection
613 save-movie <filename>
616 \begin_layout Standard
617 Save movie to <filename>.
620 \begin_layout Subsubsection
624 \begin_layout Standard
628 \begin_layout Subsubsection
632 \begin_layout Standard
636 \begin_layout Subsubsection
640 \begin_layout Standard
641 Toggle between playback and recording modes.
644 \begin_layout Subsubsection
645 test-1, test-2, test-3
648 \begin_layout Standard
649 Internal test commands.
653 \begin_layout Subsubsection
654 take-screenshot <filename>
657 \begin_layout Standard
658 Save screenshot to <filename>.
661 \begin_layout Subsubsection
662 +controller <class>-<#>-<button>
665 \begin_layout Standard
666 Press button <button> on controller <num> of class <class>.
669 \begin_layout Itemize
670 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
671 ext0, ext1, ext2, ext3
674 \begin_layout Itemize
678 \begin_layout Itemize
679 Class 'superscope': trigger, cursor, turbo, pause
682 \begin_layout Itemize
683 Class 'justifier': trigger, start
686 \begin_layout Itemize
687 Class 'gb': A, B, select, start, up, down, left, right
690 \begin_layout Subsubsection
691 hold-controller <class>-<#>-<button>
694 \begin_layout Standard
695 Hold/unhold button <button> on controller <num> of class <class>.
698 \begin_layout Subsubsection
699 type-controller <class>-<#>-<button>
702 \begin_layout Standard
703 Hold/unhold button <button> on controller <num> of class <class> for the
705 See +controller for button names.
708 \begin_layout Standard
709 Cauntion: Does not work properly if outside frame advance.
712 \begin_layout Subsubsection
713 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
716 \begin_layout Standard
718 If duty is not specified, defaults to 1.
719 If <cyclelen> is not specified, defaults to 2.
722 \begin_layout Subsubsection
723 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
726 \begin_layout Standard
730 \begin_layout Subsubsection
731 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
734 \begin_layout Standard
736 If autofire is turned on, specified cycle is used.
739 \begin_layout Subsubsection
740 designate-position <class>-<#>-analog<n>
743 \begin_layout Standard
744 Designate position for analog pair.
745 <n> is only there if there are multiple axis pairs.
748 \begin_layout Subsubsection
752 \begin_layout Standard
756 \begin_layout Subsubsection
760 \begin_layout Standard
761 Toggle pause on end flag.
764 \begin_layout Subsubsection
768 \begin_layout Standard
769 Set pause on end flag.
772 \begin_layout Subsubsection
776 \begin_layout Standard
777 Clear pause on end flag.
780 \begin_layout Subsubsection
781 action <action> [<parameters>]
784 \begin_layout Standard
785 Run specified core action.
788 \begin_layout Subsection
792 \begin_layout Subsubsection
793 cycle-jukebox-backward
796 \begin_layout Standard
797 Cycle save jukebox backwards.
800 \begin_layout Subsubsection
801 cycle-jukebox-forward
804 \begin_layout Standard
805 Cycle save jukebox forwards
808 \begin_layout Subsubsection
809 set-jukebox-slot <slot>
812 \begin_layout Standard
813 Set current jukebox slot
816 \begin_layout Subsubsection
820 \begin_layout Standard
821 Do load from jukebox (current mode).
824 \begin_layout Subsubsection
828 \begin_layout Standard
829 Do state save to jukebox.
832 \begin_layout Subsection
836 \begin_layout Subsubsection
840 \begin_layout Standard
844 \begin_layout Subsubsection
845 create-branch <pid> <name>
848 \begin_layout Standard
849 Create a new branch, with <pid> as parent and <name> as name.
852 \begin_layout Subsubsection
853 rename-branch <id> <name>
856 \begin_layout Standard
857 Rename branch <id> to <name>.
860 \begin_layout Subsubsection
861 reparent-branch <id> <pid>
864 \begin_layout Standard
865 Set parent of branch <id> to <pid>.
868 \begin_layout Subsubsection
872 \begin_layout Standard
873 Set current branch to <id>.
876 \begin_layout Subsubsection
880 \begin_layout Standard
884 \begin_layout Standard
888 \begin_layout Subsection
892 \begin_layout Subsubsection
893 evaluate-lua <luacode>
896 \begin_layout Standard
897 Run Lua code <luacode> using built-in Lua interpretter.
900 \begin_layout Subsubsection
904 \begin_layout Standard
905 Synonym for evaluate-lua.
908 \begin_layout Subsubsection
912 \begin_layout Standard
913 Run specified lua file using built-in Lua interpretter.
916 \begin_layout Subsubsection
920 \begin_layout Standard
921 Clear the Lua VM state and restore to factory defaults.
924 \begin_layout Subsection
928 \begin_layout Subsubsection
929 enable-sound <on/off>
932 \begin_layout Standard
933 Enable/Disable sound.
936 \begin_layout Subsection
940 \begin_layout Subsubsection
944 \begin_layout Standard
945 Reloads the main ROM image from <file>.
948 \begin_layout Subsubsection
952 \begin_layout Standard
953 Tangent for recording voice for commentary track.
954 While pressed, record a stream.
957 \begin_layout Subsubsection
958 advance-subframe-timeout
961 \begin_layout Standard
962 Subframe advance timeout in milliseconds.
966 \begin_layout Section
970 \begin_layout Subsection
974 \begin_layout Subsection
978 \begin_layout Subsubsection
982 \begin_layout Standard
983 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
987 \begin_layout Subsubsection
991 \begin_layout Standard
992 AVI dumper: Set the default left border thickness (unless lua overrides)
998 \begin_layout Subsubsection
1002 \begin_layout Standard
1003 AVI dumper: Set the default right border thickness (unless lua overrides)
1009 \begin_layout Subsubsection
1013 \begin_layout Standard
1014 AVI dumper: Set the default top border thickness (unless lua overrides)
1020 \begin_layout Subsubsection
1024 \begin_layout Standard
1025 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1031 \begin_layout Subsubsection
1035 \begin_layout Standard
1036 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1041 \begin_layout Subsubsection
1045 \begin_layout Standard
1046 AVI dumper: Compression level (0-18).
1049 \begin_layout Itemize
1050 Compression levels 10 and above are not compatible with stock CSCD codec.
1053 \begin_layout Itemize
1054 Recomended level is 7.
1057 \begin_layout Subsubsection
1061 \begin_layout Standard
1062 AVI dumper: Set method of determining the sound rate.
1065 \begin_layout Itemize
1066 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1067 128, 176.4 and 192 kHz.
1070 \begin_layout Itemize
1071 1: Round down to nearest integer.
1074 \begin_layout Itemize
1075 2: Round up to nearest ingeter.
1078 \begin_layout Itemize
1079 3: Multiply by denominator.
1082 \begin_layout Itemize
1083 4: High quality 44.1kHz (SRC needed).
1086 \begin_layout Itemize
1087 5: High quality 48kHz (SRC needed).
1090 \begin_layout Subsection
1094 \begin_layout Subsubsection
1098 \begin_layout Standard
1099 JMD dumper: Compression level (0-9).
1102 \begin_layout Section
1106 \begin_layout Itemize
1107 The editor edits in-memory movie.
1110 \begin_layout Itemize
1111 Because past can't be edited and readwrite mode doesn't allow future, editing
1119 \begin_layout Itemize
1120 Keyboard triggers the normal hotkeys and bindings.
1123 \begin_layout Subsection
1127 \begin_layout Itemize
1128 Clicking on cell in future (indicated by lack of redish background) toggles
1129 it (if it is a button) or prompts for a value (if it is an axis)
1132 \begin_layout Itemize
1133 Dragging vertically toggles sequence of buttons or changes a sequence of
1137 \begin_layout Subsection
1138 Right button actions
1141 \begin_layout Standard
1142 The right mouse button pops up a context-sensitive menu:
1145 \begin_layout Itemize
1146 Toggle <something>: Toggle this button
1149 \begin_layout Itemize
1150 Change <something>: Change this axis value
1153 \begin_layout Itemize
1154 Insert frame after: Insert a frame after this frame
1157 \begin_layout Itemize
1158 Append frame: Append a frame to movie
1161 \begin_layout Itemize
1162 Append frames: Append specified number of frames to movie
1165 \begin_layout Itemize
1166 Delete frame: Delete this frame
1169 \begin_layout Itemize
1170 Delete subframe: Delete this subframe
1173 \begin_layout Itemize
1174 Truncate movie: Delete this subframe and everything after it.
1177 \begin_layout Itemize
1178 Scroll to frame: Prompt for a frame and scroll the display to that frame.
1181 \begin_layout Itemize
1182 Scroll to current frame: Scroll the display to current position
1185 \begin_layout Itemize
1186 Run to frame: Prompts for frame and runs the emulation to that frame.
1189 \begin_layout Itemize
1190 Change number of lines visible: Change the height of the movie display (1
1194 \begin_layout Itemize
1195 Lock scroll to playback: While playing back or rewinding movies, the display
1196 will follow if enabled.
1199 \begin_layout Section
1200 Memory watch expression syntax
1203 \begin_layout Standard
1204 Memory watch expressions has the following syntax elements:
1207 \begin_layout LyX-Code
1208 ${foo} The value of memory watch foo.
1211 \begin_layout LyX-Code
1212 0x1234 Hexadecimal number 1234
1215 \begin_layout LyX-Code
1216 12345 Decimal number 12345
1219 \begin_layout LyX-Code
1220 3.141 Decimal number 3.141
1223 \begin_layout LyX-Code
1227 \begin_layout LyX-Code
1228 ~a Bitwise NOT (integers only)
1231 \begin_layout LyX-Code
1235 \begin_layout LyX-Code
1236 a/b Division/quotent
1239 \begin_layout LyX-Code
1240 a%b Remainder (integers only)
1243 \begin_layout LyX-Code
1244 a+b Sum or string concatenation
1247 \begin_layout LyX-Code
1251 \begin_layout LyX-Code
1252 a<<b Shift left (integers only)
1255 \begin_layout LyX-Code
1256 a>>b Shift right (integers only).
1257 Arithmetic for signed.
1260 \begin_layout LyX-Code
1264 \begin_layout LyX-Code
1265 a<=b Less or equal to
1268 \begin_layout LyX-Code
1272 \begin_layout LyX-Code
1276 \begin_layout LyX-Code
1277 a>=b Greater or equal to
1280 \begin_layout LyX-Code
1284 \begin_layout LyX-Code
1285 a&b Bitwise AND (integers only)
1288 \begin_layout LyX-Code
1289 a^b Bitwise XOR (integers only)
1292 \begin_layout LyX-Code
1293 a|b Bitwise OR (integers only)
1296 \begin_layout LyX-Code
1300 \begin_layout LyX-Code
1304 \begin_layout LyX-Code
1305 π Numeric constant pi.
1308 \begin_layout LyX-Code
1312 \begin_layout LyX-Code
1313 if(x,y) If x is true, y, else false.
1316 \begin_layout LyX-Code
1317 if(x,y,z) If x is true, y, else z.
1320 \begin_layout LyX-Code
1324 \begin_layout LyX-Code
1326 that is not false, or false if none.
1329 \begin_layout LyX-Code
1333 \begin_layout LyX-Code
1337 \begin_layout LyX-Code
1341 \begin_layout LyX-Code
1345 \begin_layout LyX-Code
1349 \begin_layout LyX-Code
1353 \begin_layout LyX-Code
1354 min(x...) The smallest value among x...
1358 \begin_layout LyX-Code
1359 max(x...) The largest value among x...
1363 \begin_layout LyX-Code
1364 sum(x...) Sum/concatenation of x...
1368 \begin_layout LyX-Code
1369 prod(x...) Product of x...
1373 \begin_layout LyX-Code
1374 sqrt(x) Square root of x.
1377 \begin_layout LyX-Code
1378 log(x) Natural log of x.
1381 \begin_layout LyX-Code
1382 log(x,y) Log of y to base x.
1385 \begin_layout LyX-Code
1389 \begin_layout LyX-Code
1393 \begin_layout LyX-Code
1397 \begin_layout LyX-Code
1401 \begin_layout LyX-Code
1405 \begin_layout LyX-Code
1406 asin(x) Arcsine of x
1409 \begin_layout LyX-Code
1410 acos(x) Arccosine of x
1413 \begin_layout LyX-Code
1414 atan(x) Arctangent of x
1417 \begin_layout LyX-Code
1418 atan(x,y) Angle between vector (x,y) and x-axis.
1421 \begin_layout LyX-Code
1422 sinh(x) Hyperbolic sine of x
1425 \begin_layout LyX-Code
1426 cosh(x) Hyperbolic cosine of x
1429 \begin_layout LyX-Code
1430 tanh(x) Hyperbolic tangent of x
1433 \begin_layout LyX-Code
1434 arsinh(x) Hyperbolic arsine of x
1437 \begin_layout LyX-Code
1438 arcosh(x) Hyperbolic arcosine of x
1441 \begin_layout LyX-Code
1442 artanh(x) Hyperbolic artangent of x
1445 \begin_layout LyX-Code
1446 torad(x) Convert x degrees to radians.
1449 \begin_layout LyX-Code
1450 todeg(x) Convert x radians to degrees.
1453 \begin_layout LyX-Code
1454 re(x) Real part of complex number x.
1457 \begin_layout LyX-Code
1458 im(x) Imaginary part of complex number x.
1461 \begin_layout LyX-Code
1462 conj(x) Complex conjugate of x.
1465 \begin_layout LyX-Code
1466 abs(x) Absolute value of x.
1469 \begin_layout LyX-Code
1470 arg(x) Argument of x.
1473 \begin_layout LyX-Code
1474 pyth(x...) sqrt(sum(x^2)).
1476 pythagorean distance.
1479 \begin_layout LyX-Code
1480 e Base of natural logarithm
1483 \begin_layout LyX-Code
1487 \begin_layout LyX-Code
1491 \begin_layout LyX-Code
1492 false Constant false
1495 \begin_layout LyX-Code
1499 \begin_layout Section
1500 Modifier and key names:
1503 \begin_layout Subsection
1507 \begin_layout Subsubsection
1511 \begin_layout Standard
1512 Following modifier names are known:
1515 \begin_layout Itemize
1519 \begin_layout Itemize
1523 \begin_layout Itemize
1527 \begin_layout Itemize
1531 \begin_layout Itemize
1535 \begin_layout Subsubsection
1539 \begin_layout Standard
1540 Following key names are known:
1543 \begin_layout Itemize
1544 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
1545 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
1546 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
1547 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1548 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
1549 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1550 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
1551 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
1552 pause, capital, end, home, lefT, up, right, down, select, print, execute,
1553 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
1554 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
1555 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
1556 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
1557 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
1558 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
1559 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
1560 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
1561 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
1562 windows_right, windows_menu, command, special1, special2, special3, special4,
1563 special5, special6, special7, special8, special9, special10, special11,
1564 special12, special13, special14, special15, special16, special17, special18,
1565 special19, special20
1568 \begin_layout Section
1572 \begin_layout Standard
1573 Movie file is .zip archive in itself, normal ZIP archive tools work on it
1574 (note: If you recompress it, do not use compression methods other than
1575 store and deflate and especially do not use encryption of any kind).
1578 \begin_layout Subsection
1579 Detecting clean start/SRAM/Savestate
1582 \begin_layout Itemize
1584 \begin_inset Quotes eld
1588 \begin_inset Quotes erd
1591 it is savestate, otherwise:
1594 \begin_layout Itemize
1595 If file has members with names starting
1596 \begin_inset Quotes eld
1600 \begin_inset Quotes erd
1603 it is movie starting from SRAM, otherwise:
1606 \begin_layout Itemize
1607 It is movie starting from clear state.
1610 \begin_layout Subsection
1614 \begin_layout Standard
1615 Type of game ROM and region (as one line).
1619 \begin_layout Standard
1620 \begin_inset Tabular
1621 <lyxtabular version="3" rows="8" columns="3">
1622 <features tabularvalignment="middle">
1623 <column alignment="center" valignment="top" width="0">
1624 <column alignment="center" valignment="top" width="0">
1625 <column alignment="center" valignment="top" width="0">
1627 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1630 \begin_layout Plain Layout
1636 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1639 \begin_layout Plain Layout
1645 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1648 \begin_layout Plain Layout
1656 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1659 \begin_layout Plain Layout
1665 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1668 \begin_layout Plain Layout
1674 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1677 \begin_layout Plain Layout
1685 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1688 \begin_layout Plain Layout
1694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1697 \begin_layout Plain Layout
1703 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1706 \begin_layout Plain Layout
1714 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1717 \begin_layout Plain Layout
1723 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1726 \begin_layout Plain Layout
1732 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1735 \begin_layout Plain Layout
1743 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1746 \begin_layout Plain Layout
1752 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1755 \begin_layout Plain Layout
1761 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1764 \begin_layout Plain Layout
1772 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1775 \begin_layout Plain Layout
1781 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1784 \begin_layout Plain Layout
1790 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1793 \begin_layout Plain Layout
1801 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1804 \begin_layout Plain Layout
1810 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1813 \begin_layout Plain Layout
1819 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1822 \begin_layout Plain Layout
1830 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1833 \begin_layout Plain Layout
1839 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1842 \begin_layout Plain Layout
1848 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1851 \begin_layout Plain Layout
1865 \begin_layout Standard
1869 \begin_layout Standard
1870 \begin_inset Tabular
1871 <lyxtabular version="3" rows="3" columns="2">
1872 <features tabularvalignment="middle">
1873 <column alignment="center" valignment="top" width="0">
1874 <column alignment="center" valignment="top" width="0">
1876 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1879 \begin_layout Plain Layout
1885 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1888 \begin_layout Plain Layout
1896 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1899 \begin_layout Plain Layout
1905 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1908 \begin_layout Plain Layout
1916 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1919 \begin_layout Plain Layout
1925 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1928 \begin_layout Plain Layout
1942 \begin_layout Subsection
1946 \begin_layout Standard
1947 Contains type of port #1 (as one line).
1948 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
1949 If not present, defaults to 'gamepad'.
1952 \begin_layout Subsection
1956 \begin_layout Standard
1957 Contains type of port #2 (as one line).
1958 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
1959 'justifier' and 'justifiers'.
1960 If not present, defaults to 'none'.
1963 \begin_layout Subsection
1967 \begin_layout Standard
1968 Contains name of the game (as one line).
1971 \begin_layout Subsection
1975 \begin_layout Standard
1976 Contains authors, one per line.
1977 Part before '|' is the full name, part after is the nickname.
1980 \begin_layout Subsection
1984 \begin_layout Standard
1986 \begin_inset Quotes eld
1990 \begin_inset Quotes erd
1994 Used to reject other saves.
1997 \begin_layout Subsection
1998 Member: controlsversion
2001 \begin_layout Standard
2003 \begin_inset Quotes eld
2007 \begin_inset Quotes erd
2011 Used to identify what controls are there.
2014 \begin_layout Subsection
2016 \begin_inset Quotes eld
2020 \begin_inset Quotes erd
2026 \begin_layout Standard
2027 Contains bsnes core version number (as one line).
2030 \begin_layout Subsection
2034 \begin_layout Standard
2035 Contains project ID (as one line).
2036 Used to identify if two movies are part of the same project.
2039 \begin_layout Subsection
2040 Member: {rom,slota,slotb}{,xml}.sha256
2043 \begin_layout Standard
2044 Contains SHA-256 of said ROM or ROM mapping file (as one line).
2045 Absent if corresponding file is absent.
2048 \begin_layout Subsection
2049 Member: moviesram.<name>
2052 \begin_layout Standard
2053 Raw binary startup SRAM of kind <name>.
2054 Only present in savestates and movies starting from SRAM.
2057 \begin_layout Subsection
2061 \begin_layout Standard
2062 Contains frame number (as one line) of frame movie was saved on.
2063 Only present in savestates.
2066 \begin_layout Subsection
2070 \begin_layout Standard
2071 Current value of lag counter (as one line).
2072 Only present in savestates.
2075 \begin_layout Subsection
2076 Member: pollcounters
2079 \begin_layout Standard
2080 Contains poll counters (currently 100 of them), one per line.
2081 Each line is raw poll count if DRDY is set for it.
2082 Otherwise it is negative poll count minus one.
2083 Only present in savestates.
2086 \begin_layout Subsection
2090 \begin_layout Standard
2091 Raw binary dump of host memory.
2092 Only present in savestates.
2095 \begin_layout Subsection
2099 \begin_layout Standard
2100 The raw binary savestate itself.
2101 Savestate detection uses this file, only present in savestates.
2104 \begin_layout Subsection
2108 \begin_layout Standard
2109 Screenshot of current frame.
2110 Only present in savestates.
2111 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
2113 Height of image is inferred from the width and size of data.
2116 \begin_layout Subsection
2120 \begin_layout Standard
2121 Raw binary SRAM of kind <name> at time of savestate.
2122 Only present in savestates.
2125 \begin_layout Subsection
2129 \begin_layout Standard
2130 The actual input track, one line per subframe (blank lines are skipped).
2133 \begin_layout Itemize
2134 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
2135 part of same frame as previous, otherwise it starts a new frame.
2138 \begin_layout Itemize
2139 First subframe must start a new frame.
2142 \begin_layout Standard
2143 Length of movie in frames is number of lines in input file that start a
2147 \begin_layout Subsection
2151 \begin_layout Standard
2156 \begin_layout Itemize
2157 Each line is in form <firstframe> <numframes> <text>.
2160 \begin_layout Itemize
2161 Linefeed is encoded as
2163 n, backslash is encoded as
2170 \begin_layout Subsection
2174 \begin_layout Standard
2175 Contains textual base-10 rerecord count (as one line; emulator just writes
2176 this, it doesn't read it) + 1.
2179 \begin_layout Subsection
2183 \begin_layout Standard
2184 This member stores set of load IDs.
2185 There is one load ID per rerecord (plus one corresponding to start of project).
2188 \begin_layout Itemize
2189 This member constists of concatenation of records
2192 \begin_layout Itemize
2193 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
2197 \begin_layout Itemize
2198 IDs are interpretted as 256-bit big-endian integers with warparound.
2201 \begin_layout Itemize
2202 Initial predicted ID is all zeroes.
2205 \begin_layout Standard
2206 Format of each record is:
2209 \begin_layout Itemize
2210 1 byte: Opcode byte.
2211 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
2215 \begin_layout Itemize
2216 32-prefixlen bytes of ID.
2219 \begin_layout Itemize
2220 countlen bytes of big-endian count (count).
2223 \begin_layout Standard
2224 Records are processed as follows:
2227 \begin_layout Itemize
2228 To form the first ID encoded by record, take the first prefixlen bytes predicted
2229 ID and append the read ID value to it.
2230 The result is the first ID encoded.
2233 \begin_layout Itemize
2234 If countlen is 0, record encodes 1 ID.
2237 \begin_layout Itemize
2238 If countlen is 1, record encodes 2+count IDs.
2241 \begin_layout Itemize
2242 If countlen is 2, record encodes 258+count IDs.
2245 \begin_layout Itemize
2246 If countlen is 3, record encodes 65794+count IDs.
2249 \begin_layout Itemize
2250 The new predicted ID is the next ID after last one encoded by the record.
2253 \begin_layout Standard
2254 The number of rerecords + 1 is equal to the sum of number of IDs encoded
2258 \begin_layout Subsection
2259 Member: starttime.second
2262 \begin_layout Standard
2263 Movie starting time, second part.
2264 Epoch is Unix epoch.
2265 Default is 1,000,000,000.
2268 \begin_layout Subsection
2269 Member: starttime.subsecond
2272 \begin_layout Standard
2273 Movie starting time, subsecond part.
2278 \begin_layout Subsection
2279 Member: savetime.second
2282 \begin_layout Standard
2283 Movie saving time, second part.
2284 Default is starttime.second.
2285 Only present in savestates.
2288 \begin_layout Subsection
2289 Member: savetime.subsecond
2292 \begin_layout Standard
2293 Movie saving time, subsecond part.
2294 Default is starttime.subsecond.
2295 Only present in savestates.
2298 \begin_layout Section
2299 lsvs file format (commentary tracks)
2302 \begin_layout Subsection
2306 \begin_layout Itemize
2307 Each cluster is 8kB (8192 bytes) in size.
2310 \begin_layout Itemize
2311 Cluster n starts at offset 8192*n in file.
2314 \begin_layout Itemize
2315 The following clusters are system special:
2319 \begin_layout Itemize
2320 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
2323 \begin_layout Itemize
2324 Cluster 1 (superblock)
2328 \begin_layout Subsection
2332 \begin_layout Itemize
2333 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
2337 \begin_layout Itemize
2338 This cluster table consists of 2048 4-byte big-endian integers.
2341 \begin_layout Itemize
2342 Each entry describes a cluster in 16MB supercluster, in order.
2345 \begin_layout Itemize
2346 The valid values for entries are:
2350 \begin_layout Itemize
2351 0x00000000: Free cluster
2354 \begin_layout Itemize
2355 0x00000001: Last cluster in chain.
2358 \begin_layout Itemize
2359 0xFFFFFFFF: System cluster (cluster tables and superblock)
2362 \begin_layout Itemize
2363 (anything else): Number of next cluster in chain.
2364 Must not be multiple of 2048.
2368 \begin_layout Itemize
2369 Due to limitations of the format, there can be at most 2097052 superclusters,
2370 giving maximum file size of 16TB.
2373 \begin_layout Subsection
2377 \begin_layout Itemize
2378 The stream table chain always starts in cluster 2.
2381 \begin_layout Itemize
2382 Otherwise, it follows normal chaining.
2385 \begin_layout Itemize
2386 The stream table consists of 16-byte entries:
2390 \begin_layout Itemize
2391 The first 8 bytes of entry give big-endian beginning position of stream
2392 in units of 1/48000 s.
2395 \begin_layout Itemize
2396 The next 4 bytes of entry give big-endian beginning cluster for control
2398 0 here marks the entry as not present.
2401 \begin_layout Itemize
2402 The last 4 bytes of entry give big-endian beginning cluster for codec data.
2406 \begin_layout Itemize
2407 Stream table clusters are normal clusters, following normal chaining.
2410 \begin_layout Itemize
2411 The stream begnning position is not guarenteed unique.
2412 There can be multiple streams with the same starting position in the file.
2415 \begin_layout Subsection
2419 \begin_layout Itemize
2420 The stream control data consists of entries 4 bytes each:
2424 \begin_layout Itemize
2425 The first 2 bytes of entry gives big-endian length of packet
2428 \begin_layout Itemize
2429 The next byte of entry gives audio length of packet in units of 1/400 s.
2432 \begin_layout Itemize
2433 The last byte is control byte.
2437 \begin_layout Itemize
2438 0 means this entry is not present and the control data ends.
2441 \begin_layout Itemize
2442 1 is valid control entry.
2447 \begin_layout Itemize
2448 The stream control data can also end by running into end of the readable
2453 \begin_layout Itemize
2454 This happens if there happens to be exact multiple of 2048 packets in stream
2455 and number of packets is nonzero.
2459 \begin_layout Itemize
2460 These clusters follow normal chaining.
2463 \begin_layout Subsection
2467 \begin_layout Itemize
2468 Stream codec data consists of raw Opus data packets packed back to back
2469 with nothing in between.
2472 \begin_layout Itemize
2473 Warning: Due to internal limitations, this data must reside in the first
2474 65536 superclusters (that is, the first 1TB of the file).
2477 \begin_layout Subsection
2481 \begin_layout Itemize
2482 The superblock is stored in cluster 1.
2486 \begin_layout Itemize
2487 The first 11 bytes are
2488 \begin_inset Quotes eld
2492 \begin_inset Quotes erd
2498 \begin_layout Itemize
2499 The rest are unused.
2502 \begin_layout Itemize
2503 This cluster 1 is marked as system special.
2506 \begin_layout Section
2507 Known ROM extensions
2510 \begin_layout Itemize
2511 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
2514 \begin_layout Itemize
2515 DMG cartridge ROMs: dmg, gb.
2518 \begin_layout Itemize
2519 GBC cartridge ROMs: cgb, gbc.
2522 \begin_layout Section
2526 \begin_layout Itemize
2527 The first line must be:
2528 \begin_inset Quotes eld
2532 \begin_inset Quotes erd
2538 \begin_layout Itemize
2539 There is one needed line:
2540 \begin_inset Quotes eld
2544 \begin_inset Quotes erd
2548 This sets system type to <systype>.
2549 The following system types are valid:
2553 \begin_layout Itemize
2557 \begin_layout Itemize
2558 bsx (BS-X non-slotted)
2561 \begin_layout Itemize
2562 bsxslotted (BS-X slotted)
2565 \begin_layout Itemize
2566 sufamiturbo (Sufami Turbo)
2569 \begin_layout Itemize
2570 sgb (Super Game Boy)
2573 \begin_layout Itemize
2577 \begin_layout Itemize
2578 gbc (Game Boy Color)
2581 \begin_layout Itemize
2582 gbc_gba (Game Boy Color with GBA initial register values)
2586 \begin_layout Itemize
2587 Optionally a region can be specified:
2588 \begin_inset Quotes eld
2592 \begin_inset Quotes erd
2596 The following values are valid:
2600 \begin_layout Itemize
2601 autodetect (Autodetect region: snes and sgb only)
2604 \begin_layout Itemize
2605 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
2608 \begin_layout Itemize
2609 pal (PAL: snes, sgb)
2612 \begin_layout Itemize
2613 world (World: dmg, gbc, gbc_gba)
2617 \begin_layout Itemize
2618 ROM images are loaded as:
2619 \begin_inset Quotes eld
2623 \begin_inset Quotes erd
2627 The following types are valid:
2631 \begin_layout Itemize
2632 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
2633 BIOS in bsx, bsxslotted, sufamiturbo)
2636 \begin_layout Itemize
2637 bsx (Cartridge ROM in bsx, bsxslotted)
2640 \begin_layout Itemize
2641 slot-a (Cartridge ROM in sufamiturbo)
2644 \begin_layout Itemize
2645 slot-b (Cartridge ROM in sufamiturbo)
2649 \begin_layout Itemize
2650 ROM markup can be loaded as:
2651 \begin_inset Quotes eld
2655 \begin_inset Quotes erd
2659 The types valid are the same as for ROMs.
2662 \begin_layout Itemize
2663 Patches can be loaded as
2664 \begin_inset Quotes eld
2667 patch[<offset>] <type> <file>
2668 \begin_inset Quotes erd
2672 The types are the same as for ROMs.
2676 \begin_layout Itemize
2677 Offset is given in form [+-]<number>.
2678 Usually offset is either +0 or -512.
2681 \begin_layout Itemize
2682 Default offset is +0.
2686 \begin_layout Subsection
2690 \begin_layout LyX-Code
2694 \begin_layout LyX-Code
2698 \begin_layout LyX-Code
2699 rom rom speedygonzales.sfc
2702 \begin_layout LyX-Code
2703 patch-512 rom sonicthehedgehog.ips
2706 \begin_layout Subsection
2710 \begin_layout LyX-Code
2714 \begin_layout LyX-Code
2718 \begin_layout LyX-Code
2719 rom rom supergameboy.sfc
2722 \begin_layout LyX-Code
2723 rom dmg megamanV.dmg
2726 \begin_layout Section
2727 Quick'n'dirty encode guide
2730 \begin_layout Enumerate
2731 Start the emulator and load the ROM and movie file.
2734 \begin_layout Enumerate
2735 Set large AVI option 'set-setting avi-large on'
2738 \begin_layout Enumerate
2739 Enable dumping 'dump-avi tmpdump'
2742 \begin_layout Enumerate
2743 Unpause and let it run until you want to end dumping.
2746 \begin_layout Enumerate
2747 Close the emulator (closing the window is the easiest way).
2751 \begin_layout Enumerate
2752 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
2753 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
2756 \begin_layout Enumerate
2757 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
2760 \begin_layout Enumerate
2761 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
2762 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
2765 \begin_layout Enumerate
2766 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
2767 Now final.mkv contains quick'n'dirty encode.
2770 \begin_layout Section
2771 Axis configurations for some gamepad types:
2774 \begin_layout Subsection
2778 \begin_layout Standard
2779 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
2782 \begin_layout LyX-Code
2783 set-axis joystick0axis2 pressure-+
2786 \begin_layout LyX-Code
2787 set-axis joystick0axis5 pressure-+
2790 \begin_layout Itemize
2791 This is needed for SDL only.
2792 EVDEV sets those types correctly.
2795 \begin_layout Subsection
2797 \begin_inset Quotes eld
2801 \begin_inset Quotes erd
2807 \begin_layout Standard
2808 Axes 8-19 should be disabled.
2811 \begin_layout LyX-Code
2812 set-axis joystick0axis8 disabled
2815 \begin_layout LyX-Code
2816 set-axis joystick0axis9 disabled
2819 \begin_layout LyX-Code
2820 set-axis joystick0axis10 disabled
2823 \begin_layout LyX-Code
2824 set-axis joystick0axis11 disabled
2827 \begin_layout LyX-Code
2828 set-axis joystick0axis12 disabled
2831 \begin_layout LyX-Code
2832 set-axis joystick0axis13 disabled
2835 \begin_layout LyX-Code
2836 set-axis joystick0axis14 disabled
2839 \begin_layout LyX-Code
2840 set-axis joystick0axis15 disabled
2843 \begin_layout LyX-Code
2844 set-axis joystick0axis16 disabled
2847 \begin_layout LyX-Code
2848 set-axis joystick0axis17 disabled
2851 \begin_layout LyX-Code
2852 set-axis joystick0axis18 disabled
2855 \begin_layout LyX-Code
2856 set-axis joystick0axis19 disabled
2859 \begin_layout Section
2863 \begin_layout Subsection
2864 Problems from BSNES core:
2867 \begin_layout Itemize
2868 The whole pending save stuff.
2871 \begin_layout Itemize
2872 It is slow (especially accuracy).
2875 \begin_layout Itemize
2876 Firmwares can't be loaded from ZIP archives.
2879 \begin_layout Subsection
2883 \begin_layout Itemize
2884 Modifiers don't work with pseudo-keys.
2887 \begin_layout Itemize
2888 Audio for last dumped frame is not itself dumped.
2891 \begin_layout Itemize
2892 Audio in UI is pretty bad in quality if game doesn't run at full speed.