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
786 \begin_layout Standard
787 Do load from jukebox (current mode).
790 \begin_layout Subsubsection
794 \begin_layout Standard
795 Do state save to jukebox.
798 \begin_layout Subsection
802 \begin_layout Subsubsection
803 evaluate-lua <luacode>
806 \begin_layout Standard
807 Run Lua code <luacode> using built-in Lua interpretter.
810 \begin_layout Subsubsection
814 \begin_layout Standard
815 Synonym for evaluate-lua.
818 \begin_layout Subsubsection
822 \begin_layout Standard
823 Run specified lua file using built-in Lua interpretter.
826 \begin_layout Subsubsection
830 \begin_layout Standard
831 Clear the Lua VM state and restore to factory defaults.
834 \begin_layout Subsection
838 \begin_layout Subsubsection
839 add-watch <name> <expression>
842 \begin_layout Standard
843 Adds new watch (or modifies old one).
846 \begin_layout Subsubsection
850 \begin_layout Standard
854 \begin_layout Subsection
858 \begin_layout Subsubsection
859 enable-sound <on/off>
862 \begin_layout Standard
863 Enable/Disable sound.
866 \begin_layout Subsection
870 \begin_layout Subsubsection
874 \begin_layout Standard
875 Reloads the main ROM image from <file>.
878 \begin_layout Subsubsection
882 \begin_layout Standard
883 Tangent for recording voice for commentary track.
884 While pressed, record a stream.
887 \begin_layout Subsubsection
888 advance-subframe-timeout
891 \begin_layout Standard
892 Subframe advance timeout in milliseconds.
896 \begin_layout Section
900 \begin_layout Subsection
904 \begin_layout Subsection
908 \begin_layout Subsubsection
912 \begin_layout Standard
913 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
917 \begin_layout Subsubsection
921 \begin_layout Standard
922 AVI dumper: Set the default left border thickness (unless lua overrides)
928 \begin_layout Subsubsection
932 \begin_layout Standard
933 AVI dumper: Set the default right border thickness (unless lua overrides)
939 \begin_layout Subsubsection
943 \begin_layout Standard
944 AVI dumper: Set the default top border thickness (unless lua overrides)
950 \begin_layout Subsubsection
954 \begin_layout Standard
955 AVI dumper: Set the default bottom border thickness (unless lua overrides)
961 \begin_layout Subsubsection
965 \begin_layout Standard
966 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
971 \begin_layout Subsubsection
975 \begin_layout Standard
976 AVI dumper: Compression level (0-18).
979 \begin_layout Itemize
980 Compression levels 10 and above are not compatible with stock CSCD codec.
983 \begin_layout Itemize
984 Recomended level is 7.
987 \begin_layout Subsubsection
991 \begin_layout Standard
992 AVI dumper: Set method of determining the sound rate.
995 \begin_layout Itemize
996 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
997 128, 176.4 and 192 kHz.
1000 \begin_layout Itemize
1001 1: Round down to nearest integer.
1004 \begin_layout Itemize
1005 2: Round up to nearest ingeter.
1008 \begin_layout Itemize
1009 3: Multiply by denominator.
1012 \begin_layout Itemize
1013 4: High quality 44.1kHz (SRC needed).
1016 \begin_layout Itemize
1017 5: High quality 48kHz (SRC needed).
1020 \begin_layout Subsection
1024 \begin_layout Subsubsection
1028 \begin_layout Standard
1029 JMD dumper: Compression level (0-9).
1032 \begin_layout Section
1036 \begin_layout Itemize
1037 The editor edits in-memory movie.
1040 \begin_layout Itemize
1041 Because past can't be edited and readwrite mode doesn't allow future, editing
1049 \begin_layout Itemize
1050 Keyboard triggers the normal hotkeys and bindings.
1053 \begin_layout Subsection
1057 \begin_layout Itemize
1058 Clicking on cell in future (indicated by lack of redish background) toggles
1059 it (if it is a button) or prompts for a value (if it is an axis)
1062 \begin_layout Itemize
1063 Dragging vertically toggles sequence of buttons or changes a sequence of
1067 \begin_layout Subsection
1068 Right button actions
1071 \begin_layout Standard
1072 The right mouse button pops up a context-sensitive menu:
1075 \begin_layout Itemize
1076 Toggle <something>: Toggle this button
1079 \begin_layout Itemize
1080 Change <something>: Change this axis value
1083 \begin_layout Itemize
1084 Insert frame after: Insert a frame after this frame
1087 \begin_layout Itemize
1088 Append frame: Append a frame to movie
1091 \begin_layout Itemize
1092 Append frames: Append specified number of frames to movie
1095 \begin_layout Itemize
1096 Delete frame: Delete this frame
1099 \begin_layout Itemize
1100 Delete subframe: Delete this subframe
1103 \begin_layout Itemize
1104 Truncate movie: Delete this subframe and everything after it.
1107 \begin_layout Itemize
1108 Scroll to frame: Prompt for a frame and scroll the display to that frame.
1111 \begin_layout Itemize
1112 Scroll to current frame: Scroll the display to current position
1115 \begin_layout Itemize
1116 Run to frame: Prompts for frame and runs the emulation to that frame.
1119 \begin_layout Itemize
1120 Change number of lines visible: Change the height of the movie display (1
1124 \begin_layout Itemize
1125 Lock scroll to playback: While playing back or rewinding movies, the display
1126 will follow if enabled.
1129 \begin_layout Section
1130 Memory watch expression syntax
1133 \begin_layout Standard
1134 Memory watch expressions are in RPN (Reverse Polish Notation).
1135 At the end of expression, the top entry on stack is taken as the final
1139 \begin_layout Standard
1143 \begin_layout Itemize
1144 Evaluation order is strictly left to right.
1147 \begin_layout Itemize
1148 a is the entry on top of stack
1151 \begin_layout Itemize
1152 b is the entry immediately below top of stack
1155 \begin_layout Itemize
1156 ; separates values to be pushed (no intermediate pop).
1159 \begin_layout Itemize
1160 After end of element, all used stack slots are popped and all results are
1164 \begin_layout Itemize
1165 When pushing multiple values, the pushes occur in order shown.
1168 \begin_layout Standard
1169 The following operators are available:
1172 \begin_layout Itemize
1176 \begin_layout Itemize
1180 \begin_layout Itemize
1184 \begin_layout Itemize
1188 \begin_layout Itemize
1192 \begin_layout Itemize
1196 \begin_layout Itemize
1197 b : read_signed_byte(a)
1200 \begin_layout Itemize
1204 \begin_layout Itemize
1205 d : read_signed_dword(a)
1208 \begin_layout Itemize
1212 \begin_layout Itemize
1216 \begin_layout Itemize
1217 o: read_signed_hword(a)
1220 \begin_layout Itemize
1222 \begin_inset Formula $\pi$
1228 \begin_layout Itemize
1229 q : read_signed_qword(a)
1232 \begin_layout Itemize
1236 \begin_layout Itemize
1240 \begin_layout Itemize
1244 \begin_layout Itemize
1248 \begin_layout Itemize
1249 w : read_signed_word(a)
1252 \begin_layout Itemize
1256 \begin_layout Itemize
1257 B : read_unsigned_byte(a)
1260 \begin_layout Itemize
1261 C<number>z : Push number <number> to stack.
1264 \begin_layout Itemize
1265 D : read_unsigned_dword(a)
1268 \begin_layout Itemize
1269 C0x<number>z : Push number <number> (hexadecimal) to stack.
1272 \begin_layout Itemize
1276 \begin_layout Itemize
1277 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
1281 \begin_layout Itemize
1282 O: read_unsigned_hword(a)
1285 \begin_layout Itemize
1286 Q : read_unsigned_qword(a)
1289 \begin_layout Itemize
1290 R<digit> : round a to <digit> digits.
1293 \begin_layout Itemize
1294 W : read_unsigned_word(a)
1297 \begin_layout Subsection
1301 \begin_layout Standard
1302 C0x007e0878zWC0x007e002czW-
1305 \begin_layout Enumerate
1306 Push value 0x7e0878 on top of stack (C0x007e0878z).
1309 \begin_layout Enumerate
1310 Pop the value on top of stack (0x7e0878), read word value at that address
1311 and push the result,call it x1 (W).
1314 \begin_layout Enumerate
1315 Push value 0x7e002c on top of stack (C0x007e002cz).
1318 \begin_layout Enumerate
1319 Pop the value on top of stack (0x7e002c), read word value at that address
1320 and push the result,call it x2 (W).
1323 \begin_layout Enumerate
1324 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
1328 \begin_layout Enumerate
1329 Since the expression ends, the final memory watch result is the top one
1330 on stack, which is x2 - x1.
1333 \begin_layout Section
1334 Modifier and key names:
1337 \begin_layout Subsection
1341 \begin_layout Subsubsection
1345 \begin_layout Standard
1346 Following modifier names are known:
1349 \begin_layout Itemize
1353 \begin_layout Itemize
1357 \begin_layout Itemize
1361 \begin_layout Itemize
1365 \begin_layout Itemize
1369 \begin_layout Subsubsection
1373 \begin_layout Standard
1374 Following key names are known:
1377 \begin_layout Itemize
1378 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
1379 ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
1380 period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
1381 greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1382 q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
1383 underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1384 q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
1385 start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
1386 pause, capital, end, home, lefT, up, right, down, select, print, execute,
1387 snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
1388 numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
1389 decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
1390 f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
1391 pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
1392 numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
1393 numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
1394 numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
1395 numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
1396 windows_right, windows_menu, command, special1, special2, special3, special4,
1397 special5, special6, special7, special8, special9, special10, special11,
1398 special12, special13, special14, special15, special16, special17, special18,
1399 special19, special20
1402 \begin_layout Section
1406 \begin_layout Standard
1407 Movie file is .zip archive in itself, normal ZIP archive tools work on it
1408 (note: If you recompress it, do not use compression methods other than
1409 store and deflate and especially do not use encryption of any kind).
1412 \begin_layout Subsection
1413 Detecting clean start/SRAM/Savestate
1416 \begin_layout Itemize
1418 \begin_inset Quotes eld
1422 \begin_inset Quotes erd
1425 it is savestate, otherwise:
1428 \begin_layout Itemize
1429 If file has members with names starting
1430 \begin_inset Quotes eld
1434 \begin_inset Quotes erd
1437 it is movie starting from SRAM, otherwise:
1440 \begin_layout Itemize
1441 It is movie starting from clear state.
1444 \begin_layout Subsection
1448 \begin_layout Standard
1449 Type of game ROM and region (as one line).
1453 \begin_layout Standard
1454 \begin_inset Tabular
1455 <lyxtabular version="3" rows="8" columns="3">
1456 <features tabularvalignment="middle">
1457 <column alignment="center" valignment="top" width="0">
1458 <column alignment="center" valignment="top" width="0">
1459 <column alignment="center" valignment="top" width="0">
1461 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1464 \begin_layout Plain Layout
1470 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1473 \begin_layout Plain Layout
1479 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1482 \begin_layout Plain Layout
1490 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1493 \begin_layout Plain Layout
1499 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1502 \begin_layout Plain Layout
1508 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1511 \begin_layout Plain Layout
1519 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1522 \begin_layout Plain Layout
1528 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1531 \begin_layout Plain Layout
1537 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1540 \begin_layout Plain Layout
1548 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1551 \begin_layout Plain Layout
1557 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1560 \begin_layout Plain Layout
1566 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1569 \begin_layout Plain Layout
1577 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1580 \begin_layout Plain Layout
1586 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1589 \begin_layout Plain Layout
1595 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1598 \begin_layout Plain Layout
1606 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1609 \begin_layout Plain Layout
1615 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1618 \begin_layout Plain Layout
1624 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1627 \begin_layout Plain Layout
1635 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1638 \begin_layout Plain Layout
1644 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1647 \begin_layout Plain Layout
1653 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1656 \begin_layout Plain Layout
1664 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1667 \begin_layout Plain Layout
1673 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1676 \begin_layout Plain Layout
1682 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1685 \begin_layout Plain Layout
1699 \begin_layout Standard
1703 \begin_layout Standard
1704 \begin_inset Tabular
1705 <lyxtabular version="3" rows="3" columns="2">
1706 <features tabularvalignment="middle">
1707 <column alignment="center" valignment="top" width="0">
1708 <column alignment="center" valignment="top" width="0">
1710 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1713 \begin_layout Plain Layout
1719 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1722 \begin_layout Plain Layout
1730 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1733 \begin_layout Plain Layout
1739 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1742 \begin_layout Plain Layout
1750 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1753 \begin_layout Plain Layout
1759 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1762 \begin_layout Plain Layout
1776 \begin_layout Subsection
1780 \begin_layout Standard
1781 Contains type of port #1 (as one line).
1782 Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
1783 If not present, defaults to 'gamepad'.
1786 \begin_layout Subsection
1790 \begin_layout Standard
1791 Contains type of port #2 (as one line).
1792 Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
1793 'justifier' and 'justifiers'.
1794 If not present, defaults to 'none'.
1797 \begin_layout Subsection
1801 \begin_layout Standard
1802 Contains name of the game (as one line).
1805 \begin_layout Subsection
1809 \begin_layout Standard
1810 Contains authors, one per line.
1811 Part before '|' is the full name, part after is the nickname.
1814 \begin_layout Subsection
1818 \begin_layout Standard
1820 \begin_inset Quotes eld
1824 \begin_inset Quotes erd
1828 Used to reject other saves.
1831 \begin_layout Subsection
1832 Member: controlsversion
1835 \begin_layout Standard
1837 \begin_inset Quotes eld
1841 \begin_inset Quotes erd
1845 Used to identify what controls are there.
1848 \begin_layout Subsection
1850 \begin_inset Quotes eld
1854 \begin_inset Quotes erd
1860 \begin_layout Standard
1861 Contains bsnes core version number (as one line).
1864 \begin_layout Subsection
1868 \begin_layout Standard
1869 Contains project ID (as one line).
1870 Used to identify if two movies are part of the same project.
1873 \begin_layout Subsection
1874 Member: {rom,slota,slotb}{,xml}.sha256
1877 \begin_layout Standard
1878 Contains SHA-256 of said ROM or ROM mapping file (as one line).
1879 Absent if corresponding file is absent.
1882 \begin_layout Subsection
1883 Member: moviesram.<name>
1886 \begin_layout Standard
1887 Raw binary startup SRAM of kind <name>.
1888 Only present in savestates and movies starting from SRAM.
1891 \begin_layout Subsection
1895 \begin_layout Standard
1896 Contains frame number (as one line) of frame movie was saved on.
1897 Only present in savestates.
1900 \begin_layout Subsection
1904 \begin_layout Standard
1905 Current value of lag counter (as one line).
1906 Only present in savestates.
1909 \begin_layout Subsection
1910 Member: pollcounters
1913 \begin_layout Standard
1914 Contains poll counters (currently 100 of them), one per line.
1915 Each line is raw poll count if DRDY is set for it.
1916 Otherwise it is negative poll count minus one.
1917 Only present in savestates.
1920 \begin_layout Subsection
1924 \begin_layout Standard
1925 Raw binary dump of host memory.
1926 Only present in savestates.
1929 \begin_layout Subsection
1933 \begin_layout Standard
1934 The raw binary savestate itself.
1935 Savestate detection uses this file, only present in savestates.
1938 \begin_layout Subsection
1942 \begin_layout Standard
1943 Screenshot of current frame.
1944 Only present in savestates.
1945 First 2 bytes are big-endian width of image, rest are 24-bit RGB image
1947 Height of image is inferred from the width and size of data.
1950 \begin_layout Subsection
1954 \begin_layout Standard
1955 Raw binary SRAM of kind <name> at time of savestate.
1956 Only present in savestates.
1959 \begin_layout Subsection
1963 \begin_layout Standard
1964 The actual input track, one line per subframe (blank lines are skipped).
1967 \begin_layout Itemize
1968 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
1969 part of same frame as previous, otherwise it starts a new frame.
1972 \begin_layout Itemize
1973 First subframe must start a new frame.
1976 \begin_layout Standard
1977 Length of movie in frames is number of lines in input file that start a
1981 \begin_layout Subsection
1985 \begin_layout Standard
1990 \begin_layout Itemize
1991 Each line is in form <firstframe> <numframes> <text>.
1994 \begin_layout Itemize
1995 Linefeed is encoded as
1997 n, backslash is encoded as
2004 \begin_layout Subsection
2008 \begin_layout Standard
2009 Contains textual base-10 rerecord count (as one line; emulator just writes
2010 this, it doesn't read it) + 1.
2013 \begin_layout Subsection
2017 \begin_layout Standard
2018 This member stores set of load IDs.
2019 There is one load ID per rerecord (plus one corresponding to start of project).
2022 \begin_layout Itemize
2023 This member constists of concatenation of records
2026 \begin_layout Itemize
2027 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
2031 \begin_layout Itemize
2032 IDs are interpretted as 256-bit big-endian integers with warparound.
2035 \begin_layout Itemize
2036 Initial predicted ID is all zeroes.
2039 \begin_layout Standard
2040 Format of each record is:
2043 \begin_layout Itemize
2044 1 byte: Opcode byte.
2045 Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
2049 \begin_layout Itemize
2050 32-prefixlen bytes of ID.
2053 \begin_layout Itemize
2054 countlen bytes of big-endian count (count).
2057 \begin_layout Standard
2058 Records are processed as follows:
2061 \begin_layout Itemize
2062 To form the first ID encoded by record, take the first prefixlen bytes predicted
2063 ID and append the read ID value to it.
2064 The result is the first ID encoded.
2067 \begin_layout Itemize
2068 If countlen is 0, record encodes 1 ID.
2071 \begin_layout Itemize
2072 If countlen is 1, record encodes 2+count IDs.
2075 \begin_layout Itemize
2076 If countlen is 2, record encodes 258+count IDs.
2079 \begin_layout Itemize
2080 If countlen is 3, record encodes 65794+count IDs.
2083 \begin_layout Itemize
2084 The new predicted ID is the next ID after last one encoded by the record.
2087 \begin_layout Standard
2088 The number of rerecords + 1 is equal to the sum of number of IDs encoded
2092 \begin_layout Subsection
2093 Member: starttime.second
2096 \begin_layout Standard
2097 Movie starting time, second part.
2098 Epoch is Unix epoch.
2099 Default is 1,000,000,000.
2102 \begin_layout Subsection
2103 Member: starttime.subsecond
2106 \begin_layout Standard
2107 Movie starting time, subsecond part.
2112 \begin_layout Subsection
2113 Member: savetime.second
2116 \begin_layout Standard
2117 Movie saving time, second part.
2118 Default is starttime.second.
2119 Only present in savestates.
2122 \begin_layout Subsection
2123 Member: savetime.subsecond
2126 \begin_layout Standard
2127 Movie saving time, subsecond part.
2128 Default is starttime.subsecond.
2129 Only present in savestates.
2132 \begin_layout Section
2133 lsvs file format (commentary tracks)
2136 \begin_layout Subsection
2140 \begin_layout Itemize
2141 Each cluster is 8kB (8192 bytes) in size.
2144 \begin_layout Itemize
2145 Cluster n starts at offset 8192*n in file.
2148 \begin_layout Itemize
2149 The following clusters are system special:
2153 \begin_layout Itemize
2154 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
2157 \begin_layout Itemize
2158 Cluster 1 (superblock)
2162 \begin_layout Subsection
2166 \begin_layout Itemize
2167 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
2171 \begin_layout Itemize
2172 This cluster table consists of 2048 4-byte big-endian integers.
2175 \begin_layout Itemize
2176 Each entry describes a cluster in 16MB supercluster, in order.
2179 \begin_layout Itemize
2180 The valid values for entries are:
2184 \begin_layout Itemize
2185 0x00000000: Free cluster
2188 \begin_layout Itemize
2189 0x00000001: Last cluster in chain.
2192 \begin_layout Itemize
2193 0xFFFFFFFF: System cluster (cluster tables and superblock)
2196 \begin_layout Itemize
2197 (anything else): Number of next cluster in chain.
2198 Must not be multiple of 2048.
2202 \begin_layout Itemize
2203 Due to limitations of the format, there can be at most 2097052 superclusters,
2204 giving maximum file size of 16TB.
2207 \begin_layout Subsection
2211 \begin_layout Itemize
2212 The stream table chain always starts in cluster 2.
2215 \begin_layout Itemize
2216 Otherwise, it follows normal chaining.
2219 \begin_layout Itemize
2220 The stream table consists of 16-byte entries:
2224 \begin_layout Itemize
2225 The first 8 bytes of entry give big-endian beginning position of stream
2226 in units of 1/48000 s.
2229 \begin_layout Itemize
2230 The next 4 bytes of entry give big-endian beginning cluster for control
2232 0 here marks the entry as not present.
2235 \begin_layout Itemize
2236 The last 4 bytes of entry give big-endian beginning cluster for codec data.
2240 \begin_layout Itemize
2241 Stream table clusters are normal clusters, following normal chaining.
2244 \begin_layout Itemize
2245 The stream begnning position is not guarenteed unique.
2246 There can be multiple streams with the same starting position in the file.
2249 \begin_layout Subsection
2253 \begin_layout Itemize
2254 The stream control data consists of entries 4 bytes each:
2258 \begin_layout Itemize
2259 The first 2 bytes of entry gives big-endian length of packet
2262 \begin_layout Itemize
2263 The next byte of entry gives audio length of packet in units of 1/400 s.
2266 \begin_layout Itemize
2267 The last byte is control byte.
2271 \begin_layout Itemize
2272 0 means this entry is not present and the control data ends.
2275 \begin_layout Itemize
2276 1 is valid control entry.
2281 \begin_layout Itemize
2282 The stream control data can also end by running into end of the readable
2287 \begin_layout Itemize
2288 This happens if there happens to be exact multiple of 2048 packets in stream
2289 and number of packets is nonzero.
2293 \begin_layout Itemize
2294 These clusters follow normal chaining.
2297 \begin_layout Subsection
2301 \begin_layout Itemize
2302 Stream codec data consists of raw Opus data packets packed back to back
2303 with nothing in between.
2306 \begin_layout Itemize
2307 Warning: Due to internal limitations, this data must reside in the first
2308 65536 superclusters (that is, the first 1TB of the file).
2311 \begin_layout Subsection
2315 \begin_layout Itemize
2316 The superblock is stored in cluster 1.
2320 \begin_layout Itemize
2321 The first 11 bytes are
2322 \begin_inset Quotes eld
2326 \begin_inset Quotes erd
2332 \begin_layout Itemize
2333 The rest are unused.
2336 \begin_layout Itemize
2337 This cluster 1 is marked as system special.
2340 \begin_layout Section
2341 Known ROM extensions
2344 \begin_layout Itemize
2345 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
2348 \begin_layout Itemize
2349 DMG cartridge ROMs: dmg, gb.
2352 \begin_layout Itemize
2353 GBC cartridge ROMs: cgb, gbc.
2356 \begin_layout Section
2360 \begin_layout Itemize
2361 The first line must be:
2362 \begin_inset Quotes eld
2366 \begin_inset Quotes erd
2372 \begin_layout Itemize
2373 There is one needed line:
2374 \begin_inset Quotes eld
2378 \begin_inset Quotes erd
2382 This sets system type to <systype>.
2383 The following system types are valid:
2387 \begin_layout Itemize
2391 \begin_layout Itemize
2392 bsx (BS-X non-slotted)
2395 \begin_layout Itemize
2396 bsxslotted (BS-X slotted)
2399 \begin_layout Itemize
2400 sufamiturbo (Sufami Turbo)
2403 \begin_layout Itemize
2404 sgb (Super Game Boy)
2407 \begin_layout Itemize
2411 \begin_layout Itemize
2412 gbc (Game Boy Color)
2415 \begin_layout Itemize
2416 gbc_gba (Game Boy Color with GBA initial register values)
2420 \begin_layout Itemize
2421 Optionally a region can be specified:
2422 \begin_inset Quotes eld
2426 \begin_inset Quotes erd
2430 The following values are valid:
2434 \begin_layout Itemize
2435 autodetect (Autodetect region: snes and sgb only)
2438 \begin_layout Itemize
2439 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
2442 \begin_layout Itemize
2443 pal (PAL: snes, sgb)
2446 \begin_layout Itemize
2447 world (World: dmg, gbc, gbc_gba)
2451 \begin_layout Itemize
2452 ROM images are loaded as:
2453 \begin_inset Quotes eld
2457 \begin_inset Quotes erd
2461 The following types are valid:
2465 \begin_layout Itemize
2466 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
2467 BIOS in bsx, bsxslotted, sufamiturbo)
2470 \begin_layout Itemize
2471 bsx (Cartridge ROM in bsx, bsxslotted)
2474 \begin_layout Itemize
2475 slot-a (Cartridge ROM in sufamiturbo)
2478 \begin_layout Itemize
2479 slot-b (Cartridge ROM in sufamiturbo)
2483 \begin_layout Itemize
2484 ROM markup can be loaded as:
2485 \begin_inset Quotes eld
2489 \begin_inset Quotes erd
2493 The types valid are the same as for ROMs.
2496 \begin_layout Itemize
2497 Patches can be loaded as
2498 \begin_inset Quotes eld
2501 patch[<offset>] <type> <file>
2502 \begin_inset Quotes erd
2506 The types are the same as for ROMs.
2510 \begin_layout Itemize
2511 Offset is given in form [+-]<number>.
2512 Usually offset is either +0 or -512.
2515 \begin_layout Itemize
2516 Default offset is +0.
2520 \begin_layout Subsection
2524 \begin_layout LyX-Code
2528 \begin_layout LyX-Code
2532 \begin_layout LyX-Code
2533 rom rom speedygonzales.sfc
2536 \begin_layout LyX-Code
2537 patch-512 rom sonicthehedgehog.ips
2540 \begin_layout Subsection
2544 \begin_layout LyX-Code
2548 \begin_layout LyX-Code
2552 \begin_layout LyX-Code
2553 rom rom supergameboy.sfc
2556 \begin_layout LyX-Code
2557 rom dmg megamanV.dmg
2560 \begin_layout Section
2561 Quick'n'dirty encode guide
2564 \begin_layout Enumerate
2565 Start the emulator and load the ROM and movie file.
2568 \begin_layout Enumerate
2569 Set large AVI option 'set-setting avi-large on'
2572 \begin_layout Enumerate
2573 Enable dumping 'dump-avi tmpdump'
2576 \begin_layout Enumerate
2577 Unpause and let it run until you want to end dumping.
2580 \begin_layout Enumerate
2581 Close the emulator (closing the window is the easiest way).
2585 \begin_layout Enumerate
2586 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
2587 -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
2590 \begin_layout Enumerate
2591 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
2594 \begin_layout Enumerate
2595 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
2596 + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
2599 \begin_layout Enumerate
2600 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
2601 Now final.mkv contains quick'n'dirty encode.
2604 \begin_layout Section
2605 Axis configurations for some gamepad types:
2608 \begin_layout Subsection
2612 \begin_layout Standard
2613 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
2616 \begin_layout LyX-Code
2617 set-axis joystick0axis2 pressure-+
2620 \begin_layout LyX-Code
2621 set-axis joystick0axis5 pressure-+
2624 \begin_layout Itemize
2625 This is needed for SDL only.
2626 EVDEV sets those types correctly.
2629 \begin_layout Subsection
2631 \begin_inset Quotes eld
2635 \begin_inset Quotes erd
2641 \begin_layout Standard
2642 Axes 8-19 should be disabled.
2645 \begin_layout LyX-Code
2646 set-axis joystick0axis8 disabled
2649 \begin_layout LyX-Code
2650 set-axis joystick0axis9 disabled
2653 \begin_layout LyX-Code
2654 set-axis joystick0axis10 disabled
2657 \begin_layout LyX-Code
2658 set-axis joystick0axis11 disabled
2661 \begin_layout LyX-Code
2662 set-axis joystick0axis12 disabled
2665 \begin_layout LyX-Code
2666 set-axis joystick0axis13 disabled
2669 \begin_layout LyX-Code
2670 set-axis joystick0axis14 disabled
2673 \begin_layout LyX-Code
2674 set-axis joystick0axis15 disabled
2677 \begin_layout LyX-Code
2678 set-axis joystick0axis16 disabled
2681 \begin_layout LyX-Code
2682 set-axis joystick0axis17 disabled
2685 \begin_layout LyX-Code
2686 set-axis joystick0axis18 disabled
2689 \begin_layout LyX-Code
2690 set-axis joystick0axis19 disabled
2693 \begin_layout Section
2697 \begin_layout Subsection
2698 Problems from BSNES core:
2701 \begin_layout Itemize
2702 The whole pending save stuff.
2705 \begin_layout Itemize
2706 It is slow (especially accuracy).
2709 \begin_layout Itemize
2710 Firmwares can't be loaded from ZIP archives.
2713 \begin_layout Subsection
2717 \begin_layout Itemize
2718 Modifiers don't work with pseudo-keys.
2721 \begin_layout Itemize
2722 Audio for last dumped frame is not itself dumped.
2725 \begin_layout Itemize
2726 Audio in UI is pretty bad in quality if game doesn't run at full speed.