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 Run this Lua file on startup
238 \begin_layout Subsection
239 dump options (lsnes-dumpavi only)
242 \begin_layout Subsubsection
246 \begin_layout Standard
251 \begin_layout Subsubsection
255 \begin_layout Standard
256 Load <filename> as movie or savestate file on startup.
260 \begin_layout Subsubsection
264 \begin_layout Standard
265 Set the dumper to use (required).
266 Use 'list' for listing of known dumpers.
269 \begin_layout Subsubsection
270 --firmware-path=<path>
273 \begin_layout Standard
274 Set path to look for firmware.
277 \begin_layout Subsubsection
281 \begin_layout Standard
282 Set the mode to use (required for dumpers with multiple modes, forbidden
284 Use 'list' for known modes.
287 \begin_layout Subsubsection
291 \begin_layout Standard
294 \begin_inset Quotes eld
298 \begin_inset Quotes erd
304 \begin_layout Subsubsection
305 --option=<name>=<value>
308 \begin_layout Standard
309 Set option <name> to value <value>.
312 \begin_layout Subsubsection
316 \begin_layout Standard
317 Set number of frames to dump.
318 Mandatory, unless --overdump-length is specified.
321 \begin_layout Subsubsection
322 --overdump-length=<length>
325 \begin_layout Standard
326 Set number of frames to dump after movie end.
327 Mutually exclusive with --length.
330 \begin_layout Subsubsection
334 \begin_layout Standard
335 Run specified lua script (lsnes-dumpavi does not have initialization files).
338 \begin_layout Subsubsection
339 --load-library=<library>
342 \begin_layout Standard
343 Load the specified shared object / dynamic library / dynamic link library.
346 \begin_layout Subsection
347 lsnes settings directory
350 \begin_layout Standard
351 The lsnes settings directory is (in order of decreasing perference):
354 \begin_layout Itemize
357 lsnes (if %APPDATA% exists)
360 \begin_layout Itemize
361 Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
364 \begin_layout Itemize
365 Unix: $HOME/.config/lsnes (if $HOME exists)
368 \begin_layout Itemize
373 \begin_layout Standard
374 If leading directories do not exist, attempt to create them is made.
377 \begin_layout Section
381 \begin_layout Itemize
382 Commands beginning with '*' invoke the corresponding command without alias
386 \begin_layout Itemize
387 If command starts with '+' (after possible '*'), the command is executed
388 as-is when button is pressed, and when button is released, it is executed
389 with '+' replaced by '-'.
392 \begin_layout Itemize
393 Commands without '+' execute only on negative edge (release).
396 \begin_layout Subsection
400 \begin_layout Standard
401 Run <script> as if commands were entered on the command line.
404 \begin_layout Subsection
408 \begin_layout Standard
409 <address> may be decimal or hexadecimal (prefixed with '0x').
410 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
414 \begin_layout Standard
415 The available element <sizes> are:
418 \begin_layout Itemize
422 \begin_layout Itemize
426 \begin_layout Itemize
430 \begin_layout Itemize
434 \begin_layout Itemize
438 \begin_layout Itemize
439 float: 4 bytes (floating-point)
442 \begin_layout Itemize
443 double: 8 bytes (floating-point)
446 \begin_layout Standard
447 When reading RAM and ROM, multi-byte reads/writes are big-endian.
448 When dealing with DSP memory, multi-byte reads/writes are native-endian
449 (do not use operand sizes exceeding DSP bitness, except dword is OK for
453 \begin_layout Subsubsection
454 read-<size> <address>
457 \begin_layout Standard
458 Read the value of byte in <address>.
461 \begin_layout Subsubsection
462 read-s<size> <address>
465 \begin_layout Standard
466 Read the value of signed byte in <address>.
469 \begin_layout Subsubsection
470 write-<size> <address> <value>
473 \begin_layout Standard
474 Write <value> to byte in address <address>.
477 \begin_layout Subsection
481 \begin_layout Standard
482 These commands are not available in lsnesrc, but are available after ROM
486 \begin_layout Subsubsection
490 \begin_layout Standard
494 \begin_layout Subsubsection
498 \begin_layout Standard
499 Toggle paused/unpaused
502 \begin_layout Subsubsection
506 \begin_layout Standard
508 If the button is still held after configurable timeout expires, game unpauses
509 for the duration frame advance is held.
512 \begin_layout Subsubsection
516 \begin_layout Standard
518 If the button is still held after configurable timeout expires, game unpauses
519 for the duration frame advance is held.
522 \begin_layout Subsubsection
526 \begin_layout Standard
527 Skip to first poll in frame after current.
530 \begin_layout Subsubsection
534 \begin_layout Standard
535 Reset the SNES after this frame.
538 \begin_layout Subsubsection
542 \begin_layout Standard
543 Load savestate <filename> in current mode.
546 \begin_layout Subsubsection
547 load-state <filename>
550 \begin_layout Standard
551 Load savestate <filename> in readwrite mode.
554 \begin_layout Subsubsection
555 load-readonly <filename>
558 \begin_layout Standard
559 Load savestate <filename> in readonly mode.
562 \begin_layout Subsubsection
563 load-preserve <filename>
566 \begin_layout Standard
567 Load savestate <filename> in readonly mode, preserving current events.
570 \begin_layout Subsubsection
571 load-movie <filename>
574 \begin_layout Standard
575 Load savestate <filename>, ignoring save part in readonly mode.
578 \begin_layout Subsubsection
579 save-state <filename>
582 \begin_layout Standard
583 Save system state to <filename> as soon as possible.
586 \begin_layout Subsubsection
587 save-movie <filename>
590 \begin_layout Standard
591 Save movie to <filename>.
594 \begin_layout Subsubsection
598 \begin_layout Standard
602 \begin_layout Subsubsection
606 \begin_layout Standard
610 \begin_layout Subsubsection
614 \begin_layout Standard
615 Toggle between read-only and read-write modes.
618 \begin_layout Subsubsection
619 test-1, test-2, test-3
622 \begin_layout Standard
623 Internal test commands.
627 \begin_layout Subsubsection
628 take-screenshot <filename>
631 \begin_layout Standard
632 Save screenshot to <filename>.
635 \begin_layout Subsubsection
636 +controller <class>-<#>-<button>
639 \begin_layout Standard
640 Press button <button> on controller <num> of class <class>.
643 \begin_layout Itemize
644 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
645 ext0, ext1, ext2, ext3
648 \begin_layout Itemize
652 \begin_layout Itemize
653 Class 'superscope': trigger, cursor, turbo, pause
656 \begin_layout Itemize
657 Class 'justifier': trigger, start
660 \begin_layout Itemize
661 Class 'gb': A, B, select, start, up, down, left, right
664 \begin_layout Subsubsection
665 hold-controller <class>-<#>-<button>
668 \begin_layout Standard
669 Hold/unhold button <button> on controller <num> of class <class>.
672 \begin_layout Subsubsection
673 type-controller <class>-<#>-<button>
676 \begin_layout Standard
677 Hold/unhold button <button> on controller <num> of class <class> for the
679 See +controller for button names.
682 \begin_layout Standard
683 Cauntion: Does not work properly if outside frame advance.
686 \begin_layout Subsubsection
687 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
690 \begin_layout Standard
692 If duty is not specified, defaults to 1.
693 If <cyclelen> is not specified, defaults to 2.
696 \begin_layout Subsubsection
697 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
700 \begin_layout Standard
704 \begin_layout Subsubsection
705 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
708 \begin_layout Standard
710 If autofire is turned on, specified cycle is used.
713 \begin_layout Subsubsection
714 designate-position <class>-<#>-analog<n>
717 \begin_layout Standard
718 Designate position for analog pair.
719 <n> is only there if there are multiple axis pairs.
722 \begin_layout Subsubsection
726 \begin_layout Standard
730 \begin_layout Subsubsection
734 \begin_layout Standard
735 Toggle pause on end flag.
738 \begin_layout Subsubsection
742 \begin_layout Standard
743 Set pause on end flag.
746 \begin_layout Subsubsection
750 \begin_layout Standard
751 Clear pause on end flag.
754 \begin_layout Subsubsection
755 action <action> [<parameters>]
758 \begin_layout Standard
759 Run specified core action.
762 \begin_layout Subsection
766 \begin_layout Subsubsection
767 cycle-jukebox-backward
770 \begin_layout Standard
771 Cycle save jukebox backwards.
774 \begin_layout Subsubsection
775 cycle-jukebox-forward
778 \begin_layout Standard
779 Cycle save jukebox forwards
782 \begin_layout Subsubsection
783 set-jukebox-slot <slot>
786 \begin_layout Standard
787 Set current jukebox slot
790 \begin_layout Subsubsection
794 \begin_layout Standard
795 Do load from jukebox (current mode).
798 \begin_layout Subsubsection
802 \begin_layout Standard
803 Do state save to jukebox.
806 \begin_layout Subsection
810 \begin_layout Subsubsection
811 evaluate-lua <luacode>
814 \begin_layout Standard
815 Run Lua code <luacode> using built-in Lua interpretter.
818 \begin_layout Subsubsection
822 \begin_layout Standard
823 Synonym for evaluate-lua.
826 \begin_layout Subsubsection
830 \begin_layout Standard
831 Run specified lua file using built-in Lua interpretter.
834 \begin_layout Subsubsection
838 \begin_layout Standard
839 Clear the Lua VM state and restore to factory defaults.
842 \begin_layout Subsection
846 \begin_layout Subsubsection
847 add-watch <name> <expression>
850 \begin_layout Standard
851 Adds new watch (or modifies old one).
854 \begin_layout Subsubsection
858 \begin_layout Standard
862 \begin_layout Subsection
866 \begin_layout Subsubsection
867 enable-sound <on/off>
870 \begin_layout Standard
871 Enable/Disable sound.
874 \begin_layout Subsection
878 \begin_layout Subsubsection
882 \begin_layout Standard
883 Reloads the main ROM image from <file>.
886 \begin_layout Subsubsection
890 \begin_layout Standard
891 Tangent for recording voice for commentary track.
892 While pressed, record a stream.
895 \begin_layout Subsubsection
896 advance-subframe-timeout
899 \begin_layout Standard
900 Subframe advance timeout in milliseconds.
904 \begin_layout Section
908 \begin_layout Subsection
912 \begin_layout Subsection
916 \begin_layout Subsubsection
920 \begin_layout Standard
921 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
925 \begin_layout Subsubsection
929 \begin_layout Standard
930 AVI dumper: Set the default left border thickness (unless lua overrides)
936 \begin_layout Subsubsection
940 \begin_layout Standard
941 AVI dumper: Set the default right border thickness (unless lua overrides)
947 \begin_layout Subsubsection
951 \begin_layout Standard
952 AVI dumper: Set the default top border thickness (unless lua overrides)
958 \begin_layout Subsubsection
962 \begin_layout Standard
963 AVI dumper: Set the default bottom border thickness (unless lua overrides)
969 \begin_layout Subsubsection
973 \begin_layout Standard
974 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
979 \begin_layout Subsubsection
983 \begin_layout Standard
984 AVI dumper: Compression level (0-18).
987 \begin_layout Itemize
988 Compression levels 10 and above are not compatible with stock CSCD codec.
991 \begin_layout Itemize
992 Recomended level is 7.
995 \begin_layout Subsubsection
999 \begin_layout Standard
1000 AVI dumper: Set method of determining the sound rate.
1003 \begin_layout Itemize
1004 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1005 128, 176.4 and 192 kHz.
1008 \begin_layout Itemize
1009 1: Round down to nearest integer.
1012 \begin_layout Itemize
1013 2: Round up to nearest ingeter.
1016 \begin_layout Itemize
1017 3: Multiply by denominator.
1020 \begin_layout Itemize
1021 4: High quality 44.1kHz (SRC needed).
1024 \begin_layout Itemize
1025 5: High quality 48kHz (SRC needed).
1028 \begin_layout Subsection
1032 \begin_layout Subsubsection
1036 \begin_layout Standard
1037 JMD dumper: Compression level (0-9).
1040 \begin_layout Section
1044 \begin_layout Itemize
1045 The editor edits in-memory movie.
1048 \begin_layout Itemize
1049 Because past can't be edited and readwrite mode doesn't allow future, editing
1057 \begin_layout Itemize
1058 Keyboard triggers the normal hotkeys and bindings.
1061 \begin_layout Subsection
1065 \begin_layout Itemize
1066 Clicking on cell in future (indicated by lack of redish background) toggles
1067 it (if it is a button) or prompts for a value (if it is an axis)
1070 \begin_layout Itemize
1071 Dragging vertically toggles sequence of buttons or changes a sequence of
1075 \begin_layout Subsection
1076 Right button actions
1079 \begin_layout Standard
1080 The right mouse button pops up a context-sensitive menu:
1083 \begin_layout Itemize
1084 Toggle <something>: Toggle this button
1087 \begin_layout Itemize
1088 Change <something>: Change this axis value
1091 \begin_layout Itemize
1092 Insert frame after: Insert a frame after this frame
1095 \begin_layout Itemize
1096 Append frame: Append a frame to movie
1099 \begin_layout Itemize
1100 Append frames: Append specified number of frames to movie
1103 \begin_layout Itemize
1104 Delete frame: Delete this frame
1107 \begin_layout Itemize
1108 Delete subframe: Delete this subframe
1111 \begin_layout Itemize
1112 Truncate movie: Delete this subframe and everything after it.
1115 \begin_layout Itemize
1116 Scroll to frame: Prompt for a frame and scroll the display to that frame.
1119 \begin_layout Itemize
1120 Scroll to current frame: Scroll the display to current position
1123 \begin_layout Itemize
1124 Run to frame: Prompts for frame and runs the emulation to that frame.
1127 \begin_layout Itemize
1128 Change number of lines visible: Change the height of the movie display (1
1132 \begin_layout Itemize
1133 Lock scroll to playback: While playing back or rewinding movies, the display
1134 will follow if enabled.
1137 \begin_layout Section
1138 Memory watch expression syntax
1141 \begin_layout Standard
1142 Memory watch expressions are in RPN (Reverse Polish Notation).
1143 At the end of expression, the top entry on stack is taken as the final
1147 \begin_layout Standard
1151 \begin_layout Itemize
1152 Evaluation order is strictly left to right.
1155 \begin_layout Itemize
1156 a is the entry on top of stack
1159 \begin_layout Itemize
1160 b is the entry immediately below top of stack
1163 \begin_layout Itemize
1164 ; separates values to be pushed (no intermediate pop).
1167 \begin_layout Itemize
1168 After end of element, all used stack slots are popped and all results are
1172 \begin_layout Itemize
1173 When pushing multiple values, the pushes occur in order shown.
1176 \begin_layout Standard
1177 The following operators are available:
1180 \begin_layout Itemize
1184 \begin_layout Itemize
1188 \begin_layout Itemize
1192 \begin_layout Itemize
1196 \begin_layout Itemize
1200 \begin_layout Itemize
1204 \begin_layout Itemize
1205 b : read_signed_byte(a)
1208 \begin_layout Itemize
1212 \begin_layout Itemize
1213 d : read_signed_dword(a)
1216 \begin_layout Itemize
1220 \begin_layout Itemize
1224 \begin_layout Itemize
1225 o: read_signed_hword(a)
1228 \begin_layout Itemize
1230 \begin_inset Formula $\pi$
1236 \begin_layout Itemize
1237 q : read_signed_qword(a)
1240 \begin_layout Itemize
1244 \begin_layout Itemize
1248 \begin_layout Itemize
1252 \begin_layout Itemize
1256 \begin_layout Itemize
1257 w : read_signed_word(a)
1260 \begin_layout Itemize
1264 \begin_layout Itemize
1265 B : read_unsigned_byte(a)
1268 \begin_layout Itemize
1269 C<number>z : Push number <number> to stack.
1272 \begin_layout Itemize
1273 D : read_unsigned_dword(a)
1276 \begin_layout Itemize
1277 C0x<number>z : Push number <number> (hexadecimal) to stack.
1280 \begin_layout Itemize
1284 \begin_layout Itemize
1285 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
1289 \begin_layout Itemize
1290 O: read_unsigned_hword(a)
1293 \begin_layout Itemize
1294 Q : read_unsigned_qword(a)
1297 \begin_layout Itemize
1298 R<digit> : round a to <digit> digits.
1301 \begin_layout Itemize
1302 W : read_unsigned_word(a)
1305 \begin_layout Subsection
1309 \begin_layout Standard
1310 C0x007e0878zWC0x007e002czW-
1313 \begin_layout Enumerate
1314 Push value 0x7e0878 on top of stack (C0x007e0878z).
1317 \begin_layout Enumerate
1318 Pop the value on top of stack (0x7e0878), read word value at that address
1319 and push the result,call it x1 (W).
1322 \begin_layout Enumerate
1323 Push value 0x7e002c on top of stack (C0x007e002cz).
1326 \begin_layout Enumerate
1327 Pop the value on top of stack (0x7e002c), read word value at that address
1328 and push the result,call it x2 (W).
1331 \begin_layout Enumerate
1332 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
1336 \begin_layout Enumerate
1337 Since the expression ends, the final memory watch result is the top one
1338 on stack, which is x2 - x1.
1341 \begin_layout Section
1342 Modifier and key names:
1345 \begin_layout Subsection
1349 \begin_layout Subsubsection
1353 \begin_layout Standard
1354 Following modifier names are known:
1357 \begin_layout Itemize
1361 \begin_layout Itemize
1365 \begin_layout Itemize
1369 \begin_layout Itemize
1373 \begin_layout Itemize
1377 \begin_layout Subsubsection
1381 \begin_layout Standard
1382 Following key names are known:
1385 \begin_layout Itemize
1386 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
1387 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
1388 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
1389 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1390 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
1391 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1392 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
1393 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
1394 pause, capital, end, home, lefT, up, right, down, select, print, execute,
1395 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
1396 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
1397 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
1398 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
1399 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
1400 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
1401 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
1402 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
1403 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
1404 windows_right, windows_menu, command, special1, special2, special3, special4,
1405 special5, special6, special7, special8, special9, special10, special11,
1406 special12, special13, special14, special15, special16, special17, special18,
1407 special19, special20
1410 \begin_layout Section
1414 \begin_layout Standard
1415 Movie file is .zip archive in itself, normal ZIP archive tools work on it
1416 (note: If you recompress it, do not use compression methods other than
1417 store and deflate and especially do not use encryption of any kind).
1420 \begin_layout Subsection
1421 Detecting clean start/SRAM/Savestate
1424 \begin_layout Itemize
1426 \begin_inset Quotes eld
1430 \begin_inset Quotes erd
1433 it is savestate, otherwise:
1436 \begin_layout Itemize
1437 If file has members with names starting
1438 \begin_inset Quotes eld
1442 \begin_inset Quotes erd
1445 it is movie starting from SRAM, otherwise:
1448 \begin_layout Itemize
1449 It is movie starting from clear state.
1452 \begin_layout Subsection
1456 \begin_layout Standard
1457 Type of game ROM and region (as one line).
1461 \begin_layout Standard
1462 \begin_inset Tabular
1463 <lyxtabular version="3" rows="8" columns="3">
1464 <features tabularvalignment="middle">
1465 <column alignment="center" valignment="top" width="0">
1466 <column alignment="center" valignment="top" width="0">
1467 <column alignment="center" valignment="top" width="0">
1469 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1472 \begin_layout Plain Layout
1478 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1481 \begin_layout Plain Layout
1487 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1490 \begin_layout Plain Layout
1498 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1501 \begin_layout Plain Layout
1507 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1510 \begin_layout Plain Layout
1516 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1519 \begin_layout Plain Layout
1527 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1530 \begin_layout Plain Layout
1536 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1539 \begin_layout Plain Layout
1545 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1548 \begin_layout Plain Layout
1556 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1559 \begin_layout Plain Layout
1565 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1568 \begin_layout Plain Layout
1574 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1577 \begin_layout Plain Layout
1585 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1588 \begin_layout Plain Layout
1594 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1597 \begin_layout Plain Layout
1603 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1606 \begin_layout Plain Layout
1614 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1617 \begin_layout Plain Layout
1623 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1626 \begin_layout Plain Layout
1632 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1635 \begin_layout Plain Layout
1643 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1646 \begin_layout Plain Layout
1652 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1655 \begin_layout Plain Layout
1661 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1664 \begin_layout Plain Layout
1672 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1675 \begin_layout Plain Layout
1681 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1684 \begin_layout Plain Layout
1690 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1693 \begin_layout Plain Layout
1707 \begin_layout Standard
1711 \begin_layout Standard
1712 \begin_inset Tabular
1713 <lyxtabular version="3" rows="3" columns="2">
1714 <features tabularvalignment="middle">
1715 <column alignment="center" valignment="top" width="0">
1716 <column alignment="center" valignment="top" width="0">
1718 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1721 \begin_layout Plain Layout
1727 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1730 \begin_layout Plain Layout
1738 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1741 \begin_layout Plain Layout
1747 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1750 \begin_layout Plain Layout
1758 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1761 \begin_layout Plain Layout
1767 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1770 \begin_layout Plain Layout
1784 \begin_layout Subsection
1788 \begin_layout Standard
1789 Contains type of port #1 (as one line).
1790 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
1791 If not present, defaults to 'gamepad'.
1794 \begin_layout Subsection
1798 \begin_layout Standard
1799 Contains type of port #2 (as one line).
1800 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
1801 'justifier' and 'justifiers'.
1802 If not present, defaults to 'none'.
1805 \begin_layout Subsection
1809 \begin_layout Standard
1810 Contains name of the game (as one line).
1813 \begin_layout Subsection
1817 \begin_layout Standard
1818 Contains authors, one per line.
1819 Part before '|' is the full name, part after is the nickname.
1822 \begin_layout Subsection
1826 \begin_layout Standard
1828 \begin_inset Quotes eld
1832 \begin_inset Quotes erd
1836 Used to reject other saves.
1839 \begin_layout Subsection
1840 Member: controlsversion
1843 \begin_layout Standard
1845 \begin_inset Quotes eld
1849 \begin_inset Quotes erd
1853 Used to identify what controls are there.
1856 \begin_layout Subsection
1858 \begin_inset Quotes eld
1862 \begin_inset Quotes erd
1868 \begin_layout Standard
1869 Contains bsnes core version number (as one line).
1872 \begin_layout Subsection
1876 \begin_layout Standard
1877 Contains project ID (as one line).
1878 Used to identify if two movies are part of the same project.
1881 \begin_layout Subsection
1882 Member: {rom,slota,slotb}{,xml}.sha256
1885 \begin_layout Standard
1886 Contains SHA-256 of said ROM or ROM mapping file (as one line).
1887 Absent if corresponding file is absent.
1890 \begin_layout Subsection
1891 Member: moviesram.<name>
1894 \begin_layout Standard
1895 Raw binary startup SRAM of kind <name>.
1896 Only present in savestates and movies starting from SRAM.
1899 \begin_layout Subsection
1903 \begin_layout Standard
1904 Contains frame number (as one line) of frame movie was saved on.
1905 Only present in savestates.
1908 \begin_layout Subsection
1912 \begin_layout Standard
1913 Current value of lag counter (as one line).
1914 Only present in savestates.
1917 \begin_layout Subsection
1918 Member: pollcounters
1921 \begin_layout Standard
1922 Contains poll counters (currently 100 of them), one per line.
1923 Each line is raw poll count if DRDY is set for it.
1924 Otherwise it is negative poll count minus one.
1925 Only present in savestates.
1928 \begin_layout Subsection
1932 \begin_layout Standard
1933 Raw binary dump of host memory.
1934 Only present in savestates.
1937 \begin_layout Subsection
1941 \begin_layout Standard
1942 The raw binary savestate itself.
1943 Savestate detection uses this file, only present in savestates.
1946 \begin_layout Subsection
1950 \begin_layout Standard
1951 Screenshot of current frame.
1952 Only present in savestates.
1953 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
1955 Height of image is inferred from the width and size of data.
1958 \begin_layout Subsection
1962 \begin_layout Standard
1963 Raw binary SRAM of kind <name> at time of savestate.
1964 Only present in savestates.
1967 \begin_layout Subsection
1971 \begin_layout Standard
1972 The actual input track, one line per subframe (blank lines are skipped).
1975 \begin_layout Itemize
1976 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
1977 part of same frame as previous, otherwise it starts a new frame.
1980 \begin_layout Itemize
1981 First subframe must start a new frame.
1984 \begin_layout Standard
1985 Length of movie in frames is number of lines in input file that start a
1989 \begin_layout Subsection
1993 \begin_layout Standard
1998 \begin_layout Itemize
1999 Each line is in form <firstframe> <numframes> <text>.
2002 \begin_layout Itemize
2003 Linefeed is encoded as
2005 n, backslash is encoded as
2012 \begin_layout Subsection
2016 \begin_layout Standard
2017 Contains textual base-10 rerecord count (as one line; emulator just writes
2018 this, it doesn't read it) + 1.
2021 \begin_layout Subsection
2025 \begin_layout Standard
2026 This member stores set of load IDs.
2027 There is one load ID per rerecord (plus one corresponding to start of project).
2030 \begin_layout Itemize
2031 This member constists of concatenation of records
2034 \begin_layout Itemize
2035 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
2039 \begin_layout Itemize
2040 IDs are interpretted as 256-bit big-endian integers with warparound.
2043 \begin_layout Itemize
2044 Initial predicted ID is all zeroes.
2047 \begin_layout Standard
2048 Format of each record is:
2051 \begin_layout Itemize
2052 1 byte: Opcode byte.
2053 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
2057 \begin_layout Itemize
2058 32-prefixlen bytes of ID.
2061 \begin_layout Itemize
2062 countlen bytes of big-endian count (count).
2065 \begin_layout Standard
2066 Records are processed as follows:
2069 \begin_layout Itemize
2070 To form the first ID encoded by record, take the first prefixlen bytes predicted
2071 ID and append the read ID value to it.
2072 The result is the first ID encoded.
2075 \begin_layout Itemize
2076 If countlen is 0, record encodes 1 ID.
2079 \begin_layout Itemize
2080 If countlen is 1, record encodes 2+count IDs.
2083 \begin_layout Itemize
2084 If countlen is 2, record encodes 258+count IDs.
2087 \begin_layout Itemize
2088 If countlen is 3, record encodes 65794+count IDs.
2091 \begin_layout Itemize
2092 The new predicted ID is the next ID after last one encoded by the record.
2095 \begin_layout Standard
2096 The number of rerecords + 1 is equal to the sum of number of IDs encoded
2100 \begin_layout Subsection
2101 Member: starttime.second
2104 \begin_layout Standard
2105 Movie starting time, second part.
2106 Epoch is Unix epoch.
2107 Default is 1,000,000,000.
2110 \begin_layout Subsection
2111 Member: starttime.subsecond
2114 \begin_layout Standard
2115 Movie starting time, subsecond part.
2120 \begin_layout Subsection
2121 Member: savetime.second
2124 \begin_layout Standard
2125 Movie saving time, second part.
2126 Default is starttime.second.
2127 Only present in savestates.
2130 \begin_layout Subsection
2131 Member: savetime.subsecond
2134 \begin_layout Standard
2135 Movie saving time, subsecond part.
2136 Default is starttime.subsecond.
2137 Only present in savestates.
2140 \begin_layout Section
2141 lsvs file format (commentary tracks)
2144 \begin_layout Subsection
2148 \begin_layout Itemize
2149 Each cluster is 8kB (8192 bytes) in size.
2152 \begin_layout Itemize
2153 Cluster n starts at offset 8192*n in file.
2156 \begin_layout Itemize
2157 The following clusters are system special:
2161 \begin_layout Itemize
2162 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
2165 \begin_layout Itemize
2166 Cluster 1 (superblock)
2170 \begin_layout Subsection
2174 \begin_layout Itemize
2175 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
2179 \begin_layout Itemize
2180 This cluster table consists of 2048 4-byte big-endian integers.
2183 \begin_layout Itemize
2184 Each entry describes a cluster in 16MB supercluster, in order.
2187 \begin_layout Itemize
2188 The valid values for entries are:
2192 \begin_layout Itemize
2193 0x00000000: Free cluster
2196 \begin_layout Itemize
2197 0x00000001: Last cluster in chain.
2200 \begin_layout Itemize
2201 0xFFFFFFFF: System cluster (cluster tables and superblock)
2204 \begin_layout Itemize
2205 (anything else): Number of next cluster in chain.
2206 Must not be multiple of 2048.
2210 \begin_layout Itemize
2211 Due to limitations of the format, there can be at most 2097052 superclusters,
2212 giving maximum file size of 16TB.
2215 \begin_layout Subsection
2219 \begin_layout Itemize
2220 The stream table chain always starts in cluster 2.
2223 \begin_layout Itemize
2224 Otherwise, it follows normal chaining.
2227 \begin_layout Itemize
2228 The stream table consists of 16-byte entries:
2232 \begin_layout Itemize
2233 The first 8 bytes of entry give big-endian beginning position of stream
2234 in units of 1/48000 s.
2237 \begin_layout Itemize
2238 The next 4 bytes of entry give big-endian beginning cluster for control
2240 0 here marks the entry as not present.
2243 \begin_layout Itemize
2244 The last 4 bytes of entry give big-endian beginning cluster for codec data.
2248 \begin_layout Itemize
2249 Stream table clusters are normal clusters, following normal chaining.
2252 \begin_layout Itemize
2253 The stream begnning position is not guarenteed unique.
2254 There can be multiple streams with the same starting position in the file.
2257 \begin_layout Subsection
2261 \begin_layout Itemize
2262 The stream control data consists of entries 4 bytes each:
2266 \begin_layout Itemize
2267 The first 2 bytes of entry gives big-endian length of packet
2270 \begin_layout Itemize
2271 The next byte of entry gives audio length of packet in units of 1/400 s.
2274 \begin_layout Itemize
2275 The last byte is control byte.
2279 \begin_layout Itemize
2280 0 means this entry is not present and the control data ends.
2283 \begin_layout Itemize
2284 1 is valid control entry.
2289 \begin_layout Itemize
2290 The stream control data can also end by running into end of the readable
2295 \begin_layout Itemize
2296 This happens if there happens to be exact multiple of 2048 packets in stream
2297 and number of packets is nonzero.
2301 \begin_layout Itemize
2302 These clusters follow normal chaining.
2305 \begin_layout Subsection
2309 \begin_layout Itemize
2310 Stream codec data consists of raw Opus data packets packed back to back
2311 with nothing in between.
2314 \begin_layout Itemize
2315 Warning: Due to internal limitations, this data must reside in the first
2316 65536 superclusters (that is, the first 1TB of the file).
2319 \begin_layout Subsection
2323 \begin_layout Itemize
2324 The superblock is stored in cluster 1.
2328 \begin_layout Itemize
2329 The first 11 bytes are
2330 \begin_inset Quotes eld
2334 \begin_inset Quotes erd
2340 \begin_layout Itemize
2341 The rest are unused.
2344 \begin_layout Itemize
2345 This cluster 1 is marked as system special.
2348 \begin_layout Section
2349 Known ROM extensions
2352 \begin_layout Itemize
2353 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
2356 \begin_layout Itemize
2357 DMG cartridge ROMs: dmg, gb.
2360 \begin_layout Itemize
2361 GBC cartridge ROMs: cgb, gbc.
2364 \begin_layout Section
2368 \begin_layout Itemize
2369 The first line must be:
2370 \begin_inset Quotes eld
2374 \begin_inset Quotes erd
2380 \begin_layout Itemize
2381 There is one needed line:
2382 \begin_inset Quotes eld
2386 \begin_inset Quotes erd
2390 This sets system type to <systype>.
2391 The following system types are valid:
2395 \begin_layout Itemize
2399 \begin_layout Itemize
2400 bsx (BS-X non-slotted)
2403 \begin_layout Itemize
2404 bsxslotted (BS-X slotted)
2407 \begin_layout Itemize
2408 sufamiturbo (Sufami Turbo)
2411 \begin_layout Itemize
2412 sgb (Super Game Boy)
2415 \begin_layout Itemize
2419 \begin_layout Itemize
2420 gbc (Game Boy Color)
2423 \begin_layout Itemize
2424 gbc_gba (Game Boy Color with GBA initial register values)
2428 \begin_layout Itemize
2429 Optionally a region can be specified:
2430 \begin_inset Quotes eld
2434 \begin_inset Quotes erd
2438 The following values are valid:
2442 \begin_layout Itemize
2443 autodetect (Autodetect region: snes and sgb only)
2446 \begin_layout Itemize
2447 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
2450 \begin_layout Itemize
2451 pal (PAL: snes, sgb)
2454 \begin_layout Itemize
2455 world (World: dmg, gbc, gbc_gba)
2459 \begin_layout Itemize
2460 ROM images are loaded as:
2461 \begin_inset Quotes eld
2465 \begin_inset Quotes erd
2469 The following types are valid:
2473 \begin_layout Itemize
2474 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
2475 BIOS in bsx, bsxslotted, sufamiturbo)
2478 \begin_layout Itemize
2479 bsx (Cartridge ROM in bsx, bsxslotted)
2482 \begin_layout Itemize
2483 slot-a (Cartridge ROM in sufamiturbo)
2486 \begin_layout Itemize
2487 slot-b (Cartridge ROM in sufamiturbo)
2491 \begin_layout Itemize
2492 ROM markup can be loaded as:
2493 \begin_inset Quotes eld
2497 \begin_inset Quotes erd
2501 The types valid are the same as for ROMs.
2504 \begin_layout Itemize
2505 Patches can be loaded as
2506 \begin_inset Quotes eld
2509 patch[<offset>] <type> <file>
2510 \begin_inset Quotes erd
2514 The types are the same as for ROMs.
2518 \begin_layout Itemize
2519 Offset is given in form [+-]<number>.
2520 Usually offset is either +0 or -512.
2523 \begin_layout Itemize
2524 Default offset is +0.
2528 \begin_layout Subsection
2532 \begin_layout LyX-Code
2536 \begin_layout LyX-Code
2540 \begin_layout LyX-Code
2541 rom rom speedygonzales.sfc
2544 \begin_layout LyX-Code
2545 patch-512 rom sonicthehedgehog.ips
2548 \begin_layout Subsection
2552 \begin_layout LyX-Code
2556 \begin_layout LyX-Code
2560 \begin_layout LyX-Code
2561 rom rom supergameboy.sfc
2564 \begin_layout LyX-Code
2565 rom dmg megamanV.dmg
2568 \begin_layout Section
2569 Quick'n'dirty encode guide
2572 \begin_layout Enumerate
2573 Start the emulator and load the ROM and movie file.
2576 \begin_layout Enumerate
2577 Set large AVI option 'set-setting avi-large on'
2580 \begin_layout Enumerate
2581 Enable dumping 'dump-avi tmpdump'
2584 \begin_layout Enumerate
2585 Unpause and let it run until you want to end dumping.
2588 \begin_layout Enumerate
2589 Close the emulator (closing the window is the easiest way).
2593 \begin_layout Enumerate
2594 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
2595 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
2598 \begin_layout Enumerate
2599 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
2602 \begin_layout Enumerate
2603 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
2604 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
2607 \begin_layout Enumerate
2608 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
2609 Now final.mkv contains quick'n'dirty encode.
2612 \begin_layout Section
2613 Axis configurations for some gamepad types:
2616 \begin_layout Subsection
2620 \begin_layout Standard
2621 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
2624 \begin_layout LyX-Code
2625 set-axis joystick0axis2 pressure-+
2628 \begin_layout LyX-Code
2629 set-axis joystick0axis5 pressure-+
2632 \begin_layout Itemize
2633 This is needed for SDL only.
2634 EVDEV sets those types correctly.
2637 \begin_layout Subsection
2639 \begin_inset Quotes eld
2643 \begin_inset Quotes erd
2649 \begin_layout Standard
2650 Axes 8-19 should be disabled.
2653 \begin_layout LyX-Code
2654 set-axis joystick0axis8 disabled
2657 \begin_layout LyX-Code
2658 set-axis joystick0axis9 disabled
2661 \begin_layout LyX-Code
2662 set-axis joystick0axis10 disabled
2665 \begin_layout LyX-Code
2666 set-axis joystick0axis11 disabled
2669 \begin_layout LyX-Code
2670 set-axis joystick0axis12 disabled
2673 \begin_layout LyX-Code
2674 set-axis joystick0axis13 disabled
2677 \begin_layout LyX-Code
2678 set-axis joystick0axis14 disabled
2681 \begin_layout LyX-Code
2682 set-axis joystick0axis15 disabled
2685 \begin_layout LyX-Code
2686 set-axis joystick0axis16 disabled
2689 \begin_layout LyX-Code
2690 set-axis joystick0axis17 disabled
2693 \begin_layout LyX-Code
2694 set-axis joystick0axis18 disabled
2697 \begin_layout LyX-Code
2698 set-axis joystick0axis19 disabled
2701 \begin_layout Section
2705 \begin_layout Subsection
2706 Problems from BSNES core:
2709 \begin_layout Itemize
2710 The whole pending save stuff.
2713 \begin_layout Itemize
2714 It is slow (especially accuracy).
2717 \begin_layout Itemize
2718 Firmwares can't be loaded from ZIP archives.
2721 \begin_layout Subsection
2725 \begin_layout Itemize
2726 Modifiers don't work with pseudo-keys.
2729 \begin_layout Itemize
2730 Audio for last dumped frame is not itself dumped.
2733 \begin_layout Itemize
2734 Audio in UI is pretty bad in quality if game doesn't run at full speed.