wxwidgets: Hide dumper called "NULL"
[lsnes.git] / manual.lyx
blobdecad070f39854768ab4c4e10162a88a5c144010
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_math auto
16 \font_default_family default
17 \use_non_tex_fonts false
18 \font_sc false
19 \font_osf false
20 \font_sf_scale 100
21 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_package amsmath 1
32 \use_package amssymb 1
33 \use_package cancel 1
34 \use_package esint 1
35 \use_package mathdots 1
36 \use_package mathtools 1
37 \use_package mhchem 1
38 \use_package stackrel 1
39 \use_package stmaryrd 1
40 \use_package undertilde 1
41 \cite_engine basic
42 \cite_engine_type default
43 \biblio_style plain
44 \use_bibtopic false
45 \use_indices false
46 \paperorientation portrait
47 \suppress_date false
48 \justification true
49 \use_refstyle 1
50 \index Hakusana
51 \shortcut idx
52 \color #008000
53 \end_index
54 \secnumdepth 3
55 \tocdepth 3
56 \paragraph_separation indent
57 \paragraph_indentation default
58 \quotes_language english
59 \papercolumns 1
60 \papersides 1
61 \paperpagestyle default
62 \tracking_changes false
63 \output_changes false
64 \html_math_output 0
65 \html_css_as_file 0
66 \html_be_strict false
67 \end_header
69 \begin_body
71 \begin_layout Section
72 Introduction
73 \end_layout
75 \begin_layout Standard
76 lsnes is SNES rerecording emulator based on bsnes core.
77 \end_layout
79 \begin_layout Section
80 Dependencies
81 \end_layout
83 \begin_layout Enumerate
84 bsnes libsnes (for bsnes SNES core)
85 \end_layout
87 \begin_deeper
88 \begin_layout Enumerate
89 v084-v087 (v084 or v085 for delayreset support)
90 \end_layout
92 \begin_layout Enumerate
93 accuracy or compatiblity core with debugger enabled.
94 \end_layout
96 \begin_layout Enumerate
97 Patched version (using included 7 patches)
98 \end_layout
100 \end_deeper
101 \begin_layout Enumerate
102 gambatte (for gambatte core)
103 \end_layout
105 \begin_deeper
106 \begin_layout Enumerate
107 SVN r320, r358 or r364
108 \end_layout
110 \begin_layout Enumerate
111 Patched with included patches
112 \end_layout
114 \end_deeper
115 \begin_layout Enumerate
116 Zlib
117 \end_layout
119 \begin_layout Enumerate
120 boost_iostreams
121 \end_layout
123 \begin_layout Enumerate
124 boost_filesystem
125 \end_layout
127 \begin_layout Enumerate
128 boost_thread (if native std::thread is not available)
129 \end_layout
131 \begin_layout Enumerate
132 libsdl (SDL only)
133 \end_layout
135 \begin_layout Enumerate
136 sdlmain (SDL only, part of SDL)
137 \end_layout
139 \begin_layout Enumerate
140 boost_conversion (this is header-only library)
141 \end_layout
143 \begin_layout Enumerate
144 libswscale (wxwidgets graphics only)
145 \end_layout
147 \begin_layout Enumerate
148 Portaudio (portaudio sound only)
149 \end_layout
151 \begin_layout Enumerate
152 libao (libao sound only)
153 \end_layout
155 \begin_layout Enumerate
156 Lua version 5.1.X or 5.2.X
157 \end_layout
159 \begin_layout Enumerate
160 G++ 4.6 or 4.7
161 \end_layout
163 \begin_layout Enumerate
164 libopus (optional, for commentary track tool)
165 \end_layout
167 \begin_layout Section
168 Building
169 \end_layout
171 \begin_layout Itemize
172 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
173  bsnes core).
174 \end_layout
176 \begin_layout Itemize
177 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
178 \end_layout
180 \begin_layout Itemize
181 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
182 >', bsnes core)
183 \end_layout
185 \begin_layout Itemize
186 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
187 ersion>', gambatte core)
188 \end_layout
190 \begin_layout Itemize
191 Edit options.build (or copy of that file)
192 \end_layout
194 \begin_layout Itemize
195 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
197 \end_layout
199 \begin_layout Section
200 Command line options
201 \end_layout
203 \begin_layout Subsection
204 Wxwidgets options
205 \end_layout
207 \begin_layout Subsubsection
208 --rom=<file>
209 \end_layout
211 \begin_layout Standard
212 Load <file> as ROM.
213 \end_layout
215 \begin_layout Subsubsection
216 <file>
217 \end_layout
219 \begin_layout Standard
220 Load <file> as ROM.
221 \end_layout
223 \begin_layout Subsubsection
224 --load=<file>
225 \end_layout
227 \begin_layout Standard
228 Load <file> as movie or savestate file on startup.
229 \end_layout
231 \begin_layout Subsubsection
232 --settings
233 \end_layout
235 \begin_layout Standard
236 Instead of starting the emulator, only display the settings.
237 \end_layout
239 \begin_layout Subsubsection
240 --pluginmanager
241 \end_layout
243 \begin_layout Standard
244 Instead of starting the emulator, display the plugin manager (useful to
245  disable some plugin that causes emulator to crash on startup)
246 \end_layout
248 \begin_layout Subsubsection
249 --lua=<file>
250 \end_layout
252 \begin_layout Standard
253 Run this Lua file on startup
254 \end_layout
256 \begin_layout Subsection
257 dump options (lsnes-dumpavi only)
258 \end_layout
260 \begin_layout Subsubsection
261 --rom=<file>
262 \end_layout
264 \begin_layout Standard
265 Load <file> as ROM.
266  Required.
267 \end_layout
269 \begin_layout Subsubsection
270 <filename>
271 \end_layout
273 \begin_layout Standard
274 Load <filename> as movie or savestate file on startup.
275  Required.
276 \end_layout
278 \begin_layout Subsubsection
279 --dumper=<dumper>
280 \end_layout
282 \begin_layout Standard
283 Set the dumper to use (required).
284  Use 'list' for listing of known dumpers.
285 \end_layout
287 \begin_layout Subsubsection
288 --firmware-path=<path>
289 \end_layout
291 \begin_layout Standard
292 Set path to look for firmware.
293 \end_layout
295 \begin_layout Subsubsection
296 --mode=<mode>
297 \end_layout
299 \begin_layout Standard
300 Set the mode to use (required for dumpers with multiple modes, forbidden
301  otherwise).
302  Use 'list' for known modes.
303 \end_layout
305 \begin_layout Subsubsection
306 --prefix=<prefix>
307 \end_layout
309 \begin_layout Standard
310 Set dump prefix.
311  Default is 
312 \begin_inset Quotes eld
313 \end_inset
315 avidump
316 \begin_inset Quotes erd
317 \end_inset
320 \end_layout
322 \begin_layout Subsubsection
323 --option=<name>=<value>
324 \end_layout
326 \begin_layout Standard
327 Set option <name> to value <value>.
328 \end_layout
330 \begin_layout Subsubsection
331 --length=<length>
332 \end_layout
334 \begin_layout Standard
335 Set number of frames to dump.
336  Mandatory, unless --overdump-length is specified.
337 \end_layout
339 \begin_layout Subsubsection
340 --overdump-length=<length>
341 \end_layout
343 \begin_layout Standard
344 Set number of frames to dump after movie end.
345  Mutually exclusive with --length.
346 \end_layout
348 \begin_layout Subsubsection
349 --lua=<script>
350 \end_layout
352 \begin_layout Standard
353 Run specified lua script (lsnes-dumpavi does not have initialization files).
354 \end_layout
356 \begin_layout Subsubsection
357 --load-library=<library>
358 \end_layout
360 \begin_layout Standard
361 Load the specified shared object / dynamic library / dynamic link library.
362 \end_layout
364 \begin_layout Subsection
365 lsnes settings directory
366 \end_layout
368 \begin_layout Standard
369 The lsnes settings directory is (in order of decreasing perference):
370 \end_layout
372 \begin_layout Itemize
373 Windows: %APPDATA%
374 \backslash
375 lsnes (if %APPDATA% exists)
376 \end_layout
378 \begin_layout Itemize
379 Unix: $XDG_CONFIG_HOME/lsnes (if $XDG_CONFIG_HOME exists)
380 \end_layout
382 \begin_layout Itemize
383 Unix: $HOME/.config/lsnes (if $HOME exists)
384 \end_layout
386 \begin_layout Itemize
387 All: .
388  (fallback default).
389 \end_layout
391 \begin_layout Standard
392 If leading directories do not exist, attempt to create them is made.
393 \end_layout
395 \begin_layout Section
396 Internal commands
397 \end_layout
399 \begin_layout Itemize
400 Commands beginning with '*' invoke the corresponding command without alias
401  expansion.
402 \end_layout
404 \begin_layout Itemize
405 If command starts with '+' (after possible '*'), the command is executed
406  as-is when button is pressed, and when button is released, it is executed
407  with '+' replaced by '-'.
408 \end_layout
410 \begin_layout Itemize
411 Commands without '+' execute only on negative edge (release).
412 \end_layout
414 \begin_layout Subsection
415 run-script <script>
416 \end_layout
418 \begin_layout Standard
419 Run <script> as if commands were entered on the command line.
420 \end_layout
422 \begin_layout Subsection
423 Memory manipulation
424 \end_layout
426 \begin_layout Itemize
427 <address> can be one of:
428 \end_layout
430 \begin_deeper
431 \begin_layout Itemize
432 Decimal number
433 \end_layout
435 \begin_layout Itemize
436 Hexadecimal number (prefixed with 0x)
437 \end_layout
439 \begin_layout Itemize
440 <memarea>+<hexoffset> (no 0x prefix for offset).
441 \end_layout
443 \end_deeper
444 \begin_layout Standard
445 <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
446  with '-') decimal.
447 \end_layout
449 \begin_layout Standard
450 The available element <sizes> are:
451 \end_layout
453 \begin_layout Itemize
454 byte: 1 byte
455 \end_layout
457 \begin_layout Itemize
458 word: 2 bytes
459 \end_layout
461 \begin_layout Itemize
462 hword: 3 bytes
463 \end_layout
465 \begin_layout Itemize
466 dword: 4 bytes
467 \end_layout
469 \begin_layout Itemize
470 qword: 8 bytes
471 \end_layout
473 \begin_layout Itemize
474 float: 4 bytes (floating-point)
475 \end_layout
477 \begin_layout Itemize
478 double: 8 bytes (floating-point)
479 \end_layout
481 \begin_layout Standard
482 When reading RAM and ROM, multi-byte reads/writes are big-endian.
483  When dealing with DSP memory, multi-byte reads/writes are native-endian
484  (do not use operand sizes exceeding DSP bitness, except dword is OK for
485  24-bit memory).
486 \end_layout
488 \begin_layout Subsubsection
489 read-<size> <address>
490 \end_layout
492 \begin_layout Standard
493 Read the value of byte in <address>.
494 \end_layout
496 \begin_layout Subsubsection
497 read-s<size> <address>
498 \end_layout
500 \begin_layout Standard
501 Read the value of signed byte in <address>.
502 \end_layout
504 \begin_layout Subsubsection
505 write-<size> <address> <value>
506 \end_layout
508 \begin_layout Standard
509 Write <value> to byte in address <address>.
510 \end_layout
512 \begin_layout Subsection
513 Main commands
514 \end_layout
516 \begin_layout Standard
517 These commands are not available in lsnesrc, but are available after ROM
518  has been loaded.
519 \end_layout
521 \begin_layout Subsubsection
522 quit-emulator
523 \end_layout
525 \begin_layout Standard
526 Quits the emulator.
527 \end_layout
529 \begin_layout Subsubsection
530 pause-emulator
531 \end_layout
533 \begin_layout Standard
534 Toggle paused/unpaused
535 \end_layout
537 \begin_layout Subsubsection
538 +advance-frame 
539 \end_layout
541 \begin_layout Standard
542 Advance frame.
543  If the button is still held after configurable timeout expires, game unpauses
544  for the duration frame advance is held.
545 \end_layout
547 \begin_layout Subsubsection
548 +advance-poll 
549 \end_layout
551 \begin_layout Standard
552 Advance subframe.
553  If the button is still held after configurable timeout expires, game unpauses
554  for the duration frame advance is held.
555 \end_layout
557 \begin_layout Subsubsection
558 advance-skiplag 
559 \end_layout
561 \begin_layout Standard
562 Skip to first poll in frame after current.
563 \end_layout
565 \begin_layout Subsubsection
566 reset 
567 \end_layout
569 \begin_layout Standard
570 Reset the SNES after this frame.
571 \end_layout
573 \begin_layout Subsubsection
574 load <filename> 
575 \end_layout
577 \begin_layout Standard
578 Load savestate <filename> in current mode.
579 \end_layout
581 \begin_layout Subsubsection
582 load-state <filename> 
583 \end_layout
585 \begin_layout Standard
586 Load savestate <filename> in readwrite mode.
587 \end_layout
589 \begin_layout Subsubsection
590 load-readonly <filename> 
591 \end_layout
593 \begin_layout Standard
594 Load savestate <filename> in readonly mode.
595 \end_layout
597 \begin_layout Subsubsection
598 load-preserve <filename> 
599 \end_layout
601 \begin_layout Standard
602 Load savestate <filename> in readonly mode, preserving current events.
603 \end_layout
605 \begin_layout Subsubsection
606 load-movie <filename> 
607 \end_layout
609 \begin_layout Standard
610 Load savestate <filename>, ignoring save part in readonly mode.
611 \end_layout
613 \begin_layout Subsubsection
614 save-state <filename> 
615 \end_layout
617 \begin_layout Standard
618 Save system state to <filename> as soon as possible.
619 \end_layout
621 \begin_layout Subsubsection
622 save-movie <filename> 
623 \end_layout
625 \begin_layout Standard
626 Save movie to <filename>.
627 \end_layout
629 \begin_layout Subsubsection
630 set-rwmode 
631 \end_layout
633 \begin_layout Standard
634 Set recording mode.
635 \end_layout
637 \begin_layout Subsubsection
638 set-romode 
639 \end_layout
641 \begin_layout Standard
642 Set playback mode
643 \end_layout
645 \begin_layout Subsubsection
646 toggle-rwmode 
647 \end_layout
649 \begin_layout Standard
650 Toggle between playback and recording modes.
651 \end_layout
653 \begin_layout Subsubsection
654 test-1, test-2, test-3
655 \end_layout
657 \begin_layout Standard
658 Internal test commands.
659  Don't use.
660 \end_layout
662 \begin_layout Subsubsection
663 take-screenshot <filename> 
664 \end_layout
666 \begin_layout Standard
667 Save screenshot to <filename>.
668 \end_layout
670 \begin_layout Subsubsection
671 +controller <class>-<#>-<button>
672 \end_layout
674 \begin_layout Standard
675 Press button <button> on controller <num> of class <class>.
676 \end_layout
678 \begin_layout Itemize
679 Class 'gamepad': A, B, X, Y, L, R, select, start, up, down, left, right,
680  ext0, ext1, ext2, ext3
681 \end_layout
683 \begin_layout Itemize
684 Class 'mouse': L, R
685 \end_layout
687 \begin_layout Itemize
688 Class 'superscope': trigger, cursor, turbo, pause
689 \end_layout
691 \begin_layout Itemize
692 Class 'justifier': trigger, start
693 \end_layout
695 \begin_layout Itemize
696 Class 'gb': A, B, select, start, up, down, left, right
697 \end_layout
699 \begin_layout Subsubsection
700 hold-controller <class>-<#>-<button>
701 \end_layout
703 \begin_layout Standard
704 Hold/unhold button <button> on controller <num> of class <class>.
705 \end_layout
707 \begin_layout Subsubsection
708 type-controller <class>-<#>-<button>
709 \end_layout
711 \begin_layout Standard
712 Hold/unhold button <button> on controller <num> of class <class> for the
713  next frame.
714  See +controller for button names.
715 \end_layout
717 \begin_layout Standard
718 Cauntion: Does not work properly if outside frame advance.
719 \end_layout
721 \begin_layout Subsubsection
722 +autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
723 \end_layout
725 \begin_layout Standard
726 Start autofire.
727  If duty is not specified, defaults to 1.
728  If <cyclelen> is not specified, defaults to 2.
729 \end_layout
731 \begin_layout Subsubsection
732 -autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
733 \end_layout
735 \begin_layout Standard
736 End autofire.
737 \end_layout
739 \begin_layout Subsubsection
740 autofire-controller <class>-<#>-<button> [[<duty>] <cyclelen>]
741 \end_layout
743 \begin_layout Standard
744 Toggle autofire.
745  If autofire is turned on, specified cycle is used.
746 \end_layout
748 \begin_layout Subsubsection
749 designate-position <class>-<#>-analog<n>
750 \end_layout
752 \begin_layout Standard
753 Designate position for analog pair.
754  <n> is only there if there are multiple axis pairs.
755 \end_layout
757 \begin_layout Subsubsection
758 repaint
759 \end_layout
761 \begin_layout Standard
762 Force a repaint.
763 \end_layout
765 \begin_layout Subsubsection
766 toggle-pause-on-end
767 \end_layout
769 \begin_layout Standard
770 Toggle pause on end flag.
771 \end_layout
773 \begin_layout Subsubsection
774 set-pause-on-end
775 \end_layout
777 \begin_layout Standard
778 Set pause on end flag.
779 \end_layout
781 \begin_layout Subsubsection
782 clear-pause-on-end
783 \end_layout
785 \begin_layout Standard
786 Clear pause on end flag.
787 \end_layout
789 \begin_layout Subsubsection
790 action <action> [<parameters>]
791 \end_layout
793 \begin_layout Standard
794 Run specified core action.
795 \end_layout
797 \begin_layout Subsection
798 Save jukebox 
799 \end_layout
801 \begin_layout Subsubsection
802 cycle-jukebox-backward
803 \end_layout
805 \begin_layout Standard
806 Cycle save jukebox backwards.
807 \end_layout
809 \begin_layout Subsubsection
810 cycle-jukebox-forward
811 \end_layout
813 \begin_layout Standard
814 Cycle save jukebox forwards
815 \end_layout
817 \begin_layout Subsubsection
818 set-jukebox-slot <slot>
819 \end_layout
821 \begin_layout Standard
822 Set current jukebox slot
823 \end_layout
825 \begin_layout Subsubsection
826 load-jukebox
827 \end_layout
829 \begin_layout Standard
830 Do load from jukebox (current mode).
831 \end_layout
833 \begin_layout Subsubsection
834 save-jukebox
835 \end_layout
837 \begin_layout Standard
838 Do state save to jukebox.
839 \end_layout
841 \begin_layout Subsection
842 Slot branches
843 \end_layout
845 \begin_layout Subsubsection
846 list-branches
847 \end_layout
849 \begin_layout Standard
850 List all branches
851 \end_layout
853 \begin_layout Subsubsection
854 create-branch <pid> <name>
855 \end_layout
857 \begin_layout Standard
858 Create a new branch, with <pid> as parent and <name> as name.
859 \end_layout
861 \begin_layout Subsubsection
862 rename-branch <id> <name>
863 \end_layout
865 \begin_layout Standard
866 Rename branch <id> to <name>.
867 \end_layout
869 \begin_layout Subsubsection
870 reparent-branch <id> <pid>
871 \end_layout
873 \begin_layout Standard
874 Set parent of branch <id> to <pid>.
875 \end_layout
877 \begin_layout Subsubsection
878 set-branch <id>
879 \end_layout
881 \begin_layout Standard
882 Set current branch to <id>.
883 \end_layout
885 \begin_layout Subsubsection
886 delete-branch <id>
887 \end_layout
889 \begin_layout Standard
890 Delete branch <id>.
891 \end_layout
893 \begin_layout Standard
895 \end_layout
897 \begin_layout Subsection
898 Lua 
899 \end_layout
901 \begin_layout Subsubsection
902 evaluate-lua <luacode>
903 \end_layout
905 \begin_layout Standard
906 Run Lua code <luacode> using built-in Lua interpretter.
907 \end_layout
909 \begin_layout Subsubsection
910 L <luacode>
911 \end_layout
913 \begin_layout Standard
914 Synonym for evaluate-lua.
915 \end_layout
917 \begin_layout Subsubsection
918 run-lua <script>
919 \end_layout
921 \begin_layout Standard
922 Run specified lua file using built-in Lua interpretter.
923 \end_layout
925 \begin_layout Subsubsection
926 reset-lua
927 \end_layout
929 \begin_layout Standard
930 Clear the Lua VM state and restore to factory defaults.
931 \end_layout
933 \begin_layout Subsection
934 Sound 
935 \end_layout
937 \begin_layout Subsubsection
938 enable-sound <on/off> 
939 \end_layout
941 \begin_layout Standard
942 Enable/Disable sound.
943 \end_layout
945 \begin_layout Subsection
946 Misc.
947 \end_layout
949 \begin_layout Subsubsection
950 reload-rom [<file>]
951 \end_layout
953 \begin_layout Standard
954 Reloads the main ROM image from <file>.
955 \end_layout
957 \begin_layout Subsubsection
958 +tangent
959 \end_layout
961 \begin_layout Standard
962 Tangent for recording voice for commentary track.
963  While pressed, record a stream.
964 \end_layout
966 \begin_layout Subsubsection
967 advance-subframe-timeout
968 \end_layout
970 \begin_layout Standard
971 Subframe advance timeout in milliseconds.
972  Default is 100.
973 \end_layout
975 \begin_layout Subsubsection
976 set-speed <speed>
977 \end_layout
979 \begin_layout Standard
980 Set the speed multiplier.
981  <speed> may be positive number (1 is normal speed) or 
982 \begin_inset Quotes eld
983 \end_inset
985 turbo
986 \begin_inset Quotes erd
987 \end_inset
989  for turbo.
990 \end_layout
992 \begin_layout Section
993 Settings
994 \end_layout
996 \begin_layout Subsection
997 Core settings
998 \end_layout
1000 \begin_layout Subsection
1001 AVI dumper settings
1002 \end_layout
1004 \begin_layout Subsubsection
1005 avi-large
1006 \end_layout
1008 \begin_layout Standard
1009 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1010  outputs.
1011 \end_layout
1013 \begin_layout Subsubsection
1014 avi-left-border
1015 \end_layout
1017 \begin_layout Standard
1018 AVI dumper: Set the default left border thickness (unless lua overrides)
1019  for dumps.
1020  Range 0-8191.
1021  Default is 0.
1022 \end_layout
1024 \begin_layout Subsubsection
1025 avi-right-border
1026 \end_layout
1028 \begin_layout Standard
1029 AVI dumper: Set the default right border thickness (unless lua overrides)
1030  for dumps.
1031  Range 0-8191.
1032  Default is 0.
1033 \end_layout
1035 \begin_layout Subsubsection
1036 avi-top-border
1037 \end_layout
1039 \begin_layout Standard
1040 AVI dumper: Set the default top border thickness (unless lua overrides)
1041  for dumps.
1042  Range 0-8191.
1043  Default is 0.
1044 \end_layout
1046 \begin_layout Subsubsection
1047 avi-bottom-border
1048 \end_layout
1050 \begin_layout Standard
1051 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1052  for dumps.
1053  Range 0-8191.
1054  Default is 0.
1055 \end_layout
1057 \begin_layout Subsubsection
1058 avi-maxframes
1059 \end_layout
1061 \begin_layout Standard
1062 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1063  Range 0-999999999.
1064  Default is 0.
1065 \end_layout
1067 \begin_layout Subsubsection
1068 avi-compresison
1069 \end_layout
1071 \begin_layout Standard
1072 AVI dumper: Compression level (0-18).
1073 \end_layout
1075 \begin_layout Itemize
1076 Compression levels 10 and above are not compatible with stock CSCD codec.
1077 \end_layout
1079 \begin_layout Itemize
1080 Recomended level is 7.
1081 \end_layout
1083 \begin_layout Subsubsection
1084 avi-soundrate
1085 \end_layout
1087 \begin_layout Standard
1088 AVI dumper: Set method of determining the sound rate.
1089 \end_layout
1091 \begin_layout Itemize
1092 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1093  128, 176.4 and 192 kHz.
1094 \end_layout
1096 \begin_layout Itemize
1097 1: Round down to nearest integer.
1098 \end_layout
1100 \begin_layout Itemize
1101 2: Round up to nearest ingeter.
1102 \end_layout
1104 \begin_layout Itemize
1105 3: Multiply by denominator.
1106 \end_layout
1108 \begin_layout Itemize
1109 4: High quality 44.1kHz (SRC needed).
1110 \end_layout
1112 \begin_layout Itemize
1113 5: High quality 48kHz (SRC needed).
1114 \end_layout
1116 \begin_layout Subsection
1117 JMD options
1118 \end_layout
1120 \begin_layout Subsubsection
1121 jmd-compression
1122 \end_layout
1124 \begin_layout Standard
1125 JMD dumper: Compression level (0-9).
1126 \end_layout
1128 \begin_layout Section
1129 Movie editor
1130 \end_layout
1132 \begin_layout Itemize
1133 The editor edits in-memory movie.
1134 \end_layout
1136 \begin_layout Itemize
1137 Because past can't be edited and readwrite mode doesn't allow future, editing
1138  only works in 
1139 \emph on
1140 read only
1141 \emph default
1142  mode.
1143 \end_layout
1145 \begin_layout Itemize
1146 Keyboard triggers the normal hotkeys and bindings.
1147 \end_layout
1149 \begin_layout Subsection
1150 Left button actions
1151 \end_layout
1153 \begin_layout Itemize
1154 Clicking on cell in future (indicated by lack of redish background) toggles
1155  it (if it is a button) or prompts for a value (if it is an axis)
1156 \end_layout
1158 \begin_layout Itemize
1159 Dragging vertically toggles sequence of buttons or changes a sequence of
1160  axis values.
1161 \end_layout
1163 \begin_layout Subsection
1164 Right button actions
1165 \end_layout
1167 \begin_layout Standard
1168 The right mouse button pops up a context-sensitive menu:
1169 \end_layout
1171 \begin_layout Itemize
1172 Toggle <something>: Toggle this button
1173 \end_layout
1175 \begin_layout Itemize
1176 Change <something>: Change this axis value
1177 \end_layout
1179 \begin_layout Itemize
1180 Insert frame after: Insert a frame after this frame
1181 \end_layout
1183 \begin_layout Itemize
1184 Append frame: Append a frame to movie
1185 \end_layout
1187 \begin_layout Itemize
1188 Append frames: Append specified number of frames to movie
1189 \end_layout
1191 \begin_layout Itemize
1192 Delete frame: Delete this frame
1193 \end_layout
1195 \begin_layout Itemize
1196 Delete subframe: Delete this subframe
1197 \end_layout
1199 \begin_layout Itemize
1200 Truncate movie: Delete this subframe and everything after it.
1201 \end_layout
1203 \begin_layout Itemize
1204 Scroll to frame: Prompt for a frame and scroll the display to that frame.
1205 \end_layout
1207 \begin_layout Itemize
1208 Scroll to current frame: Scroll the display to current position
1209 \end_layout
1211 \begin_layout Itemize
1212 Run to frame: Prompts for frame and runs the emulation to that frame.
1213 \end_layout
1215 \begin_layout Itemize
1216 Change number of lines visible: Change the height of the movie display (1
1217  to 255).
1218 \end_layout
1220 \begin_layout Itemize
1221 Lock scroll to playback: While playing back or rewinding movies, the display
1222  will follow if enabled.
1223 \end_layout
1225 \begin_layout Section
1226 Memory watch expression syntax
1227 \end_layout
1229 \begin_layout Standard
1230 Memory watch expressions has the following syntax elements:
1231 \end_layout
1233 \begin_layout LyX-Code
1234 ${foo}     The value of memory watch foo.
1235 \end_layout
1237 \begin_layout LyX-Code
1238 0x1234     Hexadecimal number 1234
1239 \end_layout
1241 \begin_layout LyX-Code
1242 12345      Decimal number 12345
1243 \end_layout
1245 \begin_layout LyX-Code
1246 3.141      Decimal number 3.141
1247 \end_layout
1249 \begin_layout LyX-Code
1250 -a         Unary negation
1251 \end_layout
1253 \begin_layout LyX-Code
1254 ~a         Bitwise NOT (integers only)
1255 \end_layout
1257 \begin_layout LyX-Code
1258 a*b        Multiplication
1259 \end_layout
1261 \begin_layout LyX-Code
1262 a/b        Division/quotent
1263 \end_layout
1265 \begin_layout LyX-Code
1266 a%b        Remainder (integers only)
1267 \end_layout
1269 \begin_layout LyX-Code
1270 a+b        Sum or string concatenation
1271 \end_layout
1273 \begin_layout LyX-Code
1274 a-b        Difference
1275 \end_layout
1277 \begin_layout LyX-Code
1278 a<<b       Shift left (integers only)
1279 \end_layout
1281 \begin_layout LyX-Code
1282 a>>b       Shift right (integers only).
1283  Arithmetic for signed.
1284 \end_layout
1286 \begin_layout LyX-Code
1287 a<b        Less than
1288 \end_layout
1290 \begin_layout LyX-Code
1291 a<=b       Less or equal to
1292 \end_layout
1294 \begin_layout LyX-Code
1295 a==b       Equal to
1296 \end_layout
1298 \begin_layout LyX-Code
1299 a!=b       Not equal to
1300 \end_layout
1302 \begin_layout LyX-Code
1303 a>=b       Greater or equal to
1304 \end_layout
1306 \begin_layout LyX-Code
1307 a>b        Greater than
1308 \end_layout
1310 \begin_layout LyX-Code
1311 a&b        Bitwise AND (integers only)
1312 \end_layout
1314 \begin_layout LyX-Code
1315 a^b        Bitwise XOR (integers only)
1316 \end_layout
1318 \begin_layout LyX-Code
1319 a|b        Bitwise OR (integers only)
1320 \end_layout
1322 \begin_layout LyX-Code
1323 a&&b       Logical AND
1324 \end_layout
1326 \begin_layout LyX-Code
1327 a||b       Logical OR
1328 \end_layout
1330 \begin_layout LyX-Code
1331 Ï€          Numeric constant pi.
1332 \end_layout
1334 \begin_layout LyX-Code
1335 i          Imaginary unit
1336 \end_layout
1338 \begin_layout LyX-Code
1339 if(x,y)    If x is true, y, else false.
1340 \end_layout
1342 \begin_layout LyX-Code
1343 if(x,y,z)  If x is true, y, else z.
1344 \end_layout
1346 \begin_layout LyX-Code
1347 select(x...)
1348 \end_layout
1350 \begin_layout LyX-Code
1351            First value in x...
1352  that is not false, or false if none.
1353 \end_layout
1355 \begin_layout LyX-Code
1356 unsigned(x)
1357 \end_layout
1359 \begin_layout LyX-Code
1360            Cast x to unsigned.
1361 \end_layout
1363 \begin_layout LyX-Code
1364 signed(x)
1365 \end_layout
1367 \begin_layout LyX-Code
1368            Cast x to signed.
1369 \end_layout
1371 \begin_layout LyX-Code
1372 float(x)
1373 \end_layout
1375 \begin_layout LyX-Code
1376            Cast x to float.
1377 \end_layout
1379 \begin_layout LyX-Code
1380 min(x...)  The smallest value among x...
1381  or false if empty.
1382 \end_layout
1384 \begin_layout LyX-Code
1385 max(x...)  The largest value among x...
1386  or false if empty.
1387 \end_layout
1389 \begin_layout LyX-Code
1390 sum(x...)  Sum/concatenation of x...
1391  or false if empty.
1392 \end_layout
1394 \begin_layout LyX-Code
1395 prod(x...) Product of x...
1396  or false if empty.
1397 \end_layout
1399 \begin_layout LyX-Code
1400 sqrt(x)    Square root of x.
1401 \end_layout
1403 \begin_layout LyX-Code
1404 log(x)     Natural log of x.
1405 \end_layout
1407 \begin_layout LyX-Code
1408 log(x,y)   Log of y to base x.
1409 \end_layout
1411 \begin_layout LyX-Code
1412 exp(x)     e^x.
1413 \end_layout
1415 \begin_layout LyX-Code
1416 exp(x,y)   x^y
1417 \end_layout
1419 \begin_layout LyX-Code
1420 sin(x)     Sine of x
1421 \end_layout
1423 \begin_layout LyX-Code
1424 cos(x)     Cosine of x
1425 \end_layout
1427 \begin_layout LyX-Code
1428 tan(x)     Tangent of x
1429 \end_layout
1431 \begin_layout LyX-Code
1432 asin(x)    Arcsine of x
1433 \end_layout
1435 \begin_layout LyX-Code
1436 acos(x)    Arccosine of x
1437 \end_layout
1439 \begin_layout LyX-Code
1440 atan(x)    Arctangent of x
1441 \end_layout
1443 \begin_layout LyX-Code
1444 atan(x,y)  Angle between vector (x,y) and x-axis.
1445 \end_layout
1447 \begin_layout LyX-Code
1448 sinh(x)    Hyperbolic sine of x
1449 \end_layout
1451 \begin_layout LyX-Code
1452 cosh(x)    Hyperbolic cosine of x
1453 \end_layout
1455 \begin_layout LyX-Code
1456 tanh(x)    Hyperbolic tangent of x
1457 \end_layout
1459 \begin_layout LyX-Code
1460 arsinh(x)  Hyperbolic arsine of x
1461 \end_layout
1463 \begin_layout LyX-Code
1464 arcosh(x)  Hyperbolic arcosine of x
1465 \end_layout
1467 \begin_layout LyX-Code
1468 artanh(x)  Hyperbolic artangent of x
1469 \end_layout
1471 \begin_layout LyX-Code
1472 torad(x)   Convert x degrees to radians.
1473 \end_layout
1475 \begin_layout LyX-Code
1476 todeg(x)   Convert x radians to degrees.
1477 \end_layout
1479 \begin_layout LyX-Code
1480 re(x)      Real part of complex number x.
1481 \end_layout
1483 \begin_layout LyX-Code
1484 im(x)      Imaginary part of complex number x.
1485 \end_layout
1487 \begin_layout LyX-Code
1488 conj(x)    Complex conjugate of x.
1489 \end_layout
1491 \begin_layout LyX-Code
1492 abs(x)     Absolute value of x.
1493 \end_layout
1495 \begin_layout LyX-Code
1496 arg(x)     Argument of x.
1497 \end_layout
1499 \begin_layout LyX-Code
1500 pyth(x...) sqrt(sum(x^2)).
1501  I.e.
1502  pythagorean distance.
1503 \end_layout
1505 \begin_layout LyX-Code
1506 e          Base of natural logarithm
1507 \end_layout
1509 \begin_layout LyX-Code
1510 pi         Pi
1511 \end_layout
1513 \begin_layout LyX-Code
1514 true       Constant true
1515 \end_layout
1517 \begin_layout LyX-Code
1518 false      Constant false
1519 \end_layout
1521 \begin_layout LyX-Code
1523 \end_layout
1525 \begin_layout Section
1526 Modifier and key names:
1527 \end_layout
1529 \begin_layout Subsection
1530 wxWidgets platform
1531 \end_layout
1533 \begin_layout Subsubsection
1534 Modifier names:
1535 \end_layout
1537 \begin_layout Standard
1538 Following modifier names are known:
1539 \end_layout
1541 \begin_layout Itemize
1543 \end_layout
1545 \begin_layout Itemize
1546 ctrl
1547 \end_layout
1549 \begin_layout Itemize
1550 shift 
1551 \end_layout
1553 \begin_layout Itemize
1554 meta
1555 \end_layout
1557 \begin_layout Itemize
1558 cmd (Mac OS X only)
1559 \end_layout
1561 \begin_layout Subsubsection
1562 Key names:
1563 \end_layout
1565 \begin_layout Standard
1566 Following key names are known:
1567 \end_layout
1569 \begin_layout Itemize
1570 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
1571  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
1572  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
1573  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1574  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
1575  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
1576  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
1577  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
1578  pause, capital, end, home, lefT, up, right, down, select, print, execute,
1579  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
1580  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
1581  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
1582  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
1583  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
1584  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
1585  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
1586  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
1587  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
1588  windows_right, windows_menu, command, special1, special2, special3, special4,
1589  special5, special6, special7, special8, special9, special10, special11,
1590  special12, special13, special14, special15, special16, special17, special18,
1591  special19, special20
1592 \end_layout
1594 \begin_layout Section
1595 Movie file format
1596 \end_layout
1598 \begin_layout Standard
1599 Movie file is .zip archive in itself, normal ZIP archive tools work on it
1600  (note: If you recompress it, do not use compression methods other than
1601  store and deflate and especially do not use encryption of any kind).
1602 \end_layout
1604 \begin_layout Subsection
1605 Detecting clean start/SRAM/Savestate
1606 \end_layout
1608 \begin_layout Itemize
1609 If file has member 
1610 \begin_inset Quotes eld
1611 \end_inset
1613 savestate
1614 \begin_inset Quotes erd
1615 \end_inset
1617  it is savestate, otherwise:
1618 \end_layout
1620 \begin_layout Itemize
1621 If file has members with names starting 
1622 \begin_inset Quotes eld
1623 \end_inset
1625 moviesram.
1626 \begin_inset Quotes erd
1627 \end_inset
1629  it is movie starting from SRAM, otherwise:
1630 \end_layout
1632 \begin_layout Itemize
1633 It is movie starting from clear state.
1634 \end_layout
1636 \begin_layout Subsection
1637 Member: gametype
1638 \end_layout
1640 \begin_layout Standard
1641 Type of game ROM and region (as one line).
1642  Valid values are:
1643 \end_layout
1645 \begin_layout Standard
1646 \begin_inset Tabular
1647 <lyxtabular version="3" rows="8" columns="3">
1648 <features rotate="0" tabularvalignment="middle">
1649 <column alignment="center" valignment="top">
1650 <column alignment="center" valignment="top">
1651 <column alignment="center" valignment="top">
1652 <row>
1653 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1654 \begin_inset Text
1656 \begin_layout Plain Layout
1657 Value
1658 \end_layout
1660 \end_inset
1661 </cell>
1662 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1663 \begin_inset Text
1665 \begin_layout Plain Layout
1666 System
1667 \end_layout
1669 \end_inset
1670 </cell>
1671 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1672 \begin_inset Text
1674 \begin_layout Plain Layout
1675 Region
1676 \end_layout
1678 \end_inset
1679 </cell>
1680 </row>
1681 <row>
1682 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1683 \begin_inset Text
1685 \begin_layout Plain Layout
1686 snes_pal
1687 \end_layout
1689 \end_inset
1690 </cell>
1691 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1692 \begin_inset Text
1694 \begin_layout Plain Layout
1695 Super NES
1696 \end_layout
1698 \end_inset
1699 </cell>
1700 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1701 \begin_inset Text
1703 \begin_layout Plain Layout
1705 \end_layout
1707 \end_inset
1708 </cell>
1709 </row>
1710 <row>
1711 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1712 \begin_inset Text
1714 \begin_layout Plain Layout
1715 sgb_pal
1716 \end_layout
1718 \end_inset
1719 </cell>
1720 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1721 \begin_inset Text
1723 \begin_layout Plain Layout
1724 Super Game Boy
1725 \end_layout
1727 \end_inset
1728 </cell>
1729 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1730 \begin_inset Text
1732 \begin_layout Plain Layout
1734 \end_layout
1736 \end_inset
1737 </cell>
1738 </row>
1739 <row>
1740 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1741 \begin_inset Text
1743 \begin_layout Plain Layout
1744 snes_ntsc
1745 \end_layout
1747 \end_inset
1748 </cell>
1749 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1750 \begin_inset Text
1752 \begin_layout Plain Layout
1753 Super NES
1754 \end_layout
1756 \end_inset
1757 </cell>
1758 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1759 \begin_inset Text
1761 \begin_layout Plain Layout
1762 NTSC
1763 \end_layout
1765 \end_inset
1766 </cell>
1767 </row>
1768 <row>
1769 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1770 \begin_inset Text
1772 \begin_layout Plain Layout
1773 sgb_ntsc
1774 \end_layout
1776 \end_inset
1777 </cell>
1778 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1779 \begin_inset Text
1781 \begin_layout Plain Layout
1782 Super Game Boy
1783 \end_layout
1785 \end_inset
1786 </cell>
1787 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1788 \begin_inset Text
1790 \begin_layout Plain Layout
1791 NTSC
1792 \end_layout
1794 \end_inset
1795 </cell>
1796 </row>
1797 <row>
1798 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1799 \begin_inset Text
1801 \begin_layout Plain Layout
1803 \end_layout
1805 \end_inset
1806 </cell>
1807 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1808 \begin_inset Text
1810 \begin_layout Plain Layout
1811 BS-X (non-slotted)
1812 \end_layout
1814 \end_inset
1815 </cell>
1816 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1817 \begin_inset Text
1819 \begin_layout Plain Layout
1820 NTSC
1821 \end_layout
1823 \end_inset
1824 </cell>
1825 </row>
1826 <row>
1827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1828 \begin_inset Text
1830 \begin_layout Plain Layout
1831 bsxslotted
1832 \end_layout
1834 \end_inset
1835 </cell>
1836 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1837 \begin_inset Text
1839 \begin_layout Plain Layout
1840 BS-X (slotted)
1841 \end_layout
1843 \end_inset
1844 </cell>
1845 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1846 \begin_inset Text
1848 \begin_layout Plain Layout
1849 NTSC
1850 \end_layout
1852 \end_inset
1853 </cell>
1854 </row>
1855 <row>
1856 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1857 \begin_inset Text
1859 \begin_layout Plain Layout
1860 sufamiturbo
1861 \end_layout
1863 \end_inset
1864 </cell>
1865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1866 \begin_inset Text
1868 \begin_layout Plain Layout
1869 Sufami Turbo
1870 \end_layout
1872 \end_inset
1873 </cell>
1874 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1875 \begin_inset Text
1877 \begin_layout Plain Layout
1878 NTSC
1879 \end_layout
1881 \end_inset
1882 </cell>
1883 </row>
1884 </lyxtabular>
1886 \end_inset
1889 \end_layout
1891 \begin_layout Standard
1892 Frame rates are:
1893 \end_layout
1895 \begin_layout Standard
1896 \begin_inset Tabular
1897 <lyxtabular version="3" rows="3" columns="2">
1898 <features rotate="0" tabularvalignment="middle">
1899 <column alignment="center" valignment="top">
1900 <column alignment="center" valignment="top">
1901 <row>
1902 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1903 \begin_inset Text
1905 \begin_layout Plain Layout
1906 Region
1907 \end_layout
1909 \end_inset
1910 </cell>
1911 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1912 \begin_inset Text
1914 \begin_layout Plain Layout
1915 Framerate (fps)
1916 \end_layout
1918 \end_inset
1919 </cell>
1920 </row>
1921 <row>
1922 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1923 \begin_inset Text
1925 \begin_layout Plain Layout
1927 \end_layout
1929 \end_inset
1930 </cell>
1931 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1932 \begin_inset Text
1934 \begin_layout Plain Layout
1935 322445/6448
1936 \end_layout
1938 \end_inset
1939 </cell>
1940 </row>
1941 <row>
1942 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1943 \begin_inset Text
1945 \begin_layout Plain Layout
1946 NTSC
1947 \end_layout
1949 \end_inset
1950 </cell>
1951 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1952 \begin_inset Text
1954 \begin_layout Plain Layout
1955 10738636/178683
1956 \end_layout
1958 \end_inset
1959 </cell>
1960 </row>
1961 </lyxtabular>
1963 \end_inset
1966 \end_layout
1968 \begin_layout Subsection
1969 Member: port1
1970 \end_layout
1972 \begin_layout Standard
1973 Contains type of port #1 (as one line).
1974  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
1975  If not present, defaults to 'gamepad'.
1976 \end_layout
1978 \begin_layout Subsection
1979 Member: port2
1980 \end_layout
1982 \begin_layout Standard
1983 Contains type of port #2 (as one line).
1984  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
1985  'justifier' and 'justifiers'.
1986  If not present, defaults to 'none'.
1987 \end_layout
1989 \begin_layout Subsection
1990 Member: gamename
1991 \end_layout
1993 \begin_layout Standard
1994 Contains name of the game (as one line).
1995 \end_layout
1997 \begin_layout Subsection
1998 Member: authors
1999 \end_layout
2001 \begin_layout Standard
2002 Contains authors, one per line.
2003  Part before '|' is the full name, part after is the nickname.
2004 \end_layout
2006 \begin_layout Subsection
2007 Member: systemid
2008 \end_layout
2010 \begin_layout Standard
2011 Always 
2012 \begin_inset Quotes eld
2013 \end_inset
2015 lsnes-rr1
2016 \begin_inset Quotes erd
2017 \end_inset
2019  (one line).
2020  Used to reject other saves.
2021 \end_layout
2023 \begin_layout Subsection
2024 Member: controlsversion
2025 \end_layout
2027 \begin_layout Standard
2028 Always 
2029 \begin_inset Quotes eld
2030 \end_inset
2033 \begin_inset Quotes erd
2034 \end_inset
2036  (one line).
2037  Used to identify what controls are there.
2038 \end_layout
2040 \begin_layout Subsection
2041 Member: 
2042 \begin_inset Quotes eld
2043 \end_inset
2045 coreversion
2046 \begin_inset Quotes erd
2047 \end_inset
2050 \end_layout
2052 \begin_layout Standard
2053 Contains bsnes core version number (as one line).
2054 \end_layout
2056 \begin_layout Subsection
2057 Member: projectid
2058 \end_layout
2060 \begin_layout Standard
2061 Contains project ID (as one line).
2062  Used to identify if two movies are part of the same project.
2063 \end_layout
2065 \begin_layout Subsection
2066 Member: {rom,slota,slotb}{,xml}.sha256
2067 \end_layout
2069 \begin_layout Standard
2070 Contains SHA-256 of said ROM or ROM mapping file (as one line).
2071  Absent if corresponding file is absent.
2072 \end_layout
2074 \begin_layout Subsection
2075 Member: moviesram.<name>
2076 \end_layout
2078 \begin_layout Standard
2079 Raw binary startup SRAM of kind <name>.
2080  Only present in savestates and movies starting from SRAM.
2081 \end_layout
2083 \begin_layout Subsection
2084 Member: saveframe
2085 \end_layout
2087 \begin_layout Standard
2088 Contains frame number (as one line) of frame movie was saved on.
2089  Only present in savestates.
2090 \end_layout
2092 \begin_layout Subsection
2093 Member: lagcounter
2094 \end_layout
2096 \begin_layout Standard
2097 Current value of lag counter (as one line).
2098  Only present in savestates.
2099 \end_layout
2101 \begin_layout Subsection
2102 Member: pollcounters
2103 \end_layout
2105 \begin_layout Standard
2106 Contains poll counters (currently 100 of them), one per line.
2107  Each line is raw poll count if DRDY is set for it.
2108  Otherwise it is negative poll count minus one.
2109  Only present in savestates.
2110 \end_layout
2112 \begin_layout Subsection
2113 Member: hostmemory
2114 \end_layout
2116 \begin_layout Standard
2117 Raw binary dump of host memory.
2118  Only present in savestates.
2119 \end_layout
2121 \begin_layout Subsection
2122 Member: savestate
2123 \end_layout
2125 \begin_layout Standard
2126 The raw binary savestate itself.
2127  Savestate detection uses this file, only present in savestates.
2128 \end_layout
2130 \begin_layout Subsection
2131 Member: screenshot
2132 \end_layout
2134 \begin_layout Standard
2135 Screenshot of current frame.
2136  Only present in savestates.
2137  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
2138  data.
2139  Height of image is inferred from the width and size of data.
2140 \end_layout
2142 \begin_layout Subsection
2143 Member: sram.<name>
2144 \end_layout
2146 \begin_layout Standard
2147 Raw binary SRAM of kind <name> at time of savestate.
2148  Only present in savestates.
2149 \end_layout
2151 \begin_layout Subsection
2152 Member: input
2153 \end_layout
2155 \begin_layout Standard
2156 The actual input track, one line per subframe (blank lines are skipped).
2157 \end_layout
2159 \begin_layout Itemize
2160 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
2161  part of same frame as previous, otherwise it starts a new frame.
2162 \end_layout
2164 \begin_layout Itemize
2165 First subframe must start a new frame.
2166 \end_layout
2168 \begin_layout Standard
2169 Length of movie in frames is number of lines in input file that start a
2170  new frame.
2171 \end_layout
2173 \begin_layout Subsection
2174 Member: subtitles
2175 \end_layout
2177 \begin_layout Standard
2178 Subtitle track.
2179  Optional.
2180 \end_layout
2182 \begin_layout Itemize
2183 Each line is in form <firstframe> <numframes> <text>.
2184 \end_layout
2186 \begin_layout Itemize
2187 Linefeed is encoded as 
2188 \backslash
2189 n, backslash is encoded as 
2190 \backslash
2192 \backslash
2194 \end_layout
2196 \begin_layout Subsection
2197 Member: rerecords
2198 \end_layout
2200 \begin_layout Standard
2201 Contains textual base-10 rerecord count (as one line; emulator just writes
2202  this, it doesn't read it) + 1.
2203 \end_layout
2205 \begin_layout Subsection
2206 Member: rrdata
2207 \end_layout
2209 \begin_layout Standard
2210 This member stores set of load IDs.
2211  There is one load ID per rerecord (plus one corresponding to start of project).
2212 \end_layout
2214 \begin_layout Itemize
2215 This member constists of concatenation of records
2216 \end_layout
2218 \begin_layout Itemize
2219 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
2220  IDs.
2221 \end_layout
2223 \begin_layout Itemize
2224 IDs are interpretted as 256-bit big-endian integers with warparound.
2225 \end_layout
2227 \begin_layout Itemize
2228 Initial predicted ID is all zeroes.
2229 \end_layout
2231 \begin_layout Standard
2232 Format of each record is:
2233 \end_layout
2235 \begin_layout Itemize
2236 1 byte: Opcode byte.
2237  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
2238  Bit 7 is unused.
2239 \end_layout
2241 \begin_layout Itemize
2242 32-prefixlen bytes of ID.
2243 \end_layout
2245 \begin_layout Itemize
2246 countlen bytes of big-endian count (count).
2247 \end_layout
2249 \begin_layout Standard
2250 Records are processed as follows:
2251 \end_layout
2253 \begin_layout Itemize
2254 To form the first ID encoded by record, take the first prefixlen bytes predicted
2255  ID and append the read ID value to it.
2256  The result is the first ID encoded.
2257 \end_layout
2259 \begin_layout Itemize
2260 If countlen is 0, record encodes 1 ID.
2261 \end_layout
2263 \begin_layout Itemize
2264 If countlen is 1, record encodes 2+count IDs.
2265 \end_layout
2267 \begin_layout Itemize
2268 If countlen is 2, record encodes 258+count IDs.
2269 \end_layout
2271 \begin_layout Itemize
2272 If countlen is 3, record encodes 65794+count IDs.
2273 \end_layout
2275 \begin_layout Itemize
2276 The new predicted ID is the next ID after last one encoded by the record.
2277 \end_layout
2279 \begin_layout Standard
2280 The number of rerecords + 1 is equal to the sum of number of IDs encoded
2281  by all records.
2282 \end_layout
2284 \begin_layout Subsection
2285 Member: starttime.second
2286 \end_layout
2288 \begin_layout Standard
2289 Movie starting time, second part.
2290  Epoch is Unix epoch.
2291  Default is 1,000,000,000.
2292 \end_layout
2294 \begin_layout Subsection
2295 Member: starttime.subsecond
2296 \end_layout
2298 \begin_layout Standard
2299 Movie starting time, subsecond part.
2300  Unit is CPU clocks.
2301  Default is 0.
2302 \end_layout
2304 \begin_layout Subsection
2305 Member: savetime.second
2306 \end_layout
2308 \begin_layout Standard
2309 Movie saving time, second part.
2310  Default is starttime.second.
2311  Only present in savestates.
2312 \end_layout
2314 \begin_layout Subsection
2315 Member: savetime.subsecond
2316 \end_layout
2318 \begin_layout Standard
2319 Movie saving time, subsecond part.
2320  Default is starttime.subsecond.
2321  Only present in savestates.
2322 \end_layout
2324 \begin_layout Section
2325 lsvs file format (commentary tracks)
2326 \end_layout
2328 \begin_layout Subsection
2329 Clusters
2330 \end_layout
2332 \begin_layout Itemize
2333 Each cluster is 8kB (8192 bytes) in size.
2334 \end_layout
2336 \begin_layout Itemize
2337 Cluster n starts at offset 8192*n in file.
2338 \end_layout
2340 \begin_layout Itemize
2341 The following clusters are system special:
2342 \end_layout
2344 \begin_deeper
2345 \begin_layout Itemize
2346 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
2347 \end_layout
2349 \begin_layout Itemize
2350 Cluster 1 (superblock)
2351 \end_layout
2353 \end_deeper
2354 \begin_layout Subsection
2355 Cluster tables
2356 \end_layout
2358 \begin_layout Itemize
2359 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
2360  last 11 bits of n).
2361 \end_layout
2363 \begin_layout Itemize
2364 This cluster table consists of 2048 4-byte big-endian integers.
2365 \end_layout
2367 \begin_layout Itemize
2368 Each entry describes a cluster in 16MB supercluster, in order.
2369 \end_layout
2371 \begin_layout Itemize
2372 The valid values for entries are:
2373 \end_layout
2375 \begin_deeper
2376 \begin_layout Itemize
2377 0x00000000: Free cluster
2378 \end_layout
2380 \begin_layout Itemize
2381 0x00000001: Last cluster in chain.
2382 \end_layout
2384 \begin_layout Itemize
2385 0xFFFFFFFF: System cluster (cluster tables and superblock)
2386 \end_layout
2388 \begin_layout Itemize
2389 (anything else): Number of next cluster in chain.
2390  Must not be multiple of 2048.
2391 \end_layout
2393 \end_deeper
2394 \begin_layout Itemize
2395 Due to limitations of the format, there can be at most 2097052 superclusters,
2396  giving maximum file size of 16TB.
2397 \end_layout
2399 \begin_layout Subsection
2400 Stream table
2401 \end_layout
2403 \begin_layout Itemize
2404 The stream table chain always starts in cluster 2.
2405 \end_layout
2407 \begin_layout Itemize
2408 Otherwise, it follows normal chaining.
2409 \end_layout
2411 \begin_layout Itemize
2412 The stream table consists of 16-byte entries:
2413 \end_layout
2415 \begin_deeper
2416 \begin_layout Itemize
2417 The first 8 bytes of entry give big-endian beginning position of stream
2418  in units of 1/48000 s.
2419 \end_layout
2421 \begin_layout Itemize
2422 The next 4 bytes of entry give big-endian beginning cluster for control
2423  data.
2424  0 here marks the entry as not present.
2425 \end_layout
2427 \begin_layout Itemize
2428 The last 4 bytes of entry give big-endian beginning cluster for codec data.
2429 \end_layout
2431 \end_deeper
2432 \begin_layout Itemize
2433 Stream table clusters are normal clusters, following normal chaining.
2434 \end_layout
2436 \begin_layout Itemize
2437 The stream begnning position is not guarenteed unique.
2438  There can be multiple streams with the same starting position in the file.
2439 \end_layout
2441 \begin_layout Subsection
2442 Stream control data
2443 \end_layout
2445 \begin_layout Itemize
2446 The stream control data consists of entries 4 bytes each:
2447 \end_layout
2449 \begin_deeper
2450 \begin_layout Itemize
2451 The first 2 bytes of entry gives big-endian length of packet
2452 \end_layout
2454 \begin_layout Itemize
2455 The next byte of entry gives audio length of packet in units of 1/400 s.
2456 \end_layout
2458 \begin_layout Itemize
2459 The last byte is control byte.
2460 \end_layout
2462 \begin_deeper
2463 \begin_layout Itemize
2464 0 means this entry is not present and the control data ends.
2465 \end_layout
2467 \begin_layout Itemize
2468 1 is valid control entry.
2469 \end_layout
2471 \end_deeper
2472 \end_deeper
2473 \begin_layout Itemize
2474 The stream control data can also end by running into end of the readable
2475  chain.
2476 \end_layout
2478 \begin_deeper
2479 \begin_layout Itemize
2480 This happens if there happens to be exact multiple of 2048 packets in stream
2481  and number of packets is nonzero.
2482 \end_layout
2484 \end_deeper
2485 \begin_layout Itemize
2486 These clusters follow normal chaining.
2487 \end_layout
2489 \begin_layout Subsection
2490 Stream codec data
2491 \end_layout
2493 \begin_layout Itemize
2494 Stream codec data consists of raw Opus data packets packed back to back
2495  with nothing in between.
2496 \end_layout
2498 \begin_layout Itemize
2499 Warning: Due to internal limitations, this data must reside in the first
2500  65536 superclusters (that is, the first 1TB of the file).
2501 \end_layout
2503 \begin_layout Subsection
2504 Superblock
2505 \end_layout
2507 \begin_layout Itemize
2508 The superblock is stored in cluster 1.
2510 \end_layout
2512 \begin_layout Itemize
2513 The first 11 bytes are 
2514 \begin_inset Quotes eld
2515 \end_inset
2517 sefs-magic
2518 \begin_inset Quotes erd
2519 \end_inset
2521 <NUL>.
2522 \end_layout
2524 \begin_layout Itemize
2525 The rest are unused.
2526 \end_layout
2528 \begin_layout Itemize
2529 This cluster 1 is marked as system special.
2530 \end_layout
2532 \begin_layout Section
2533 Known ROM extensions
2534 \end_layout
2536 \begin_layout Itemize
2537 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
2538 \end_layout
2540 \begin_layout Itemize
2541 DMG cartridge ROMs: dmg, gb.
2542 \end_layout
2544 \begin_layout Itemize
2545 GBC cartridge ROMs: cgb, gbc.
2546 \end_layout
2548 \begin_layout Section
2549 Gamepack files
2550 \end_layout
2552 \begin_layout Itemize
2553 The first line must be: 
2554 \begin_inset Quotes eld
2555 \end_inset
2557 [GAMEPACK FILE]
2558 \begin_inset Quotes erd
2559 \end_inset
2562 \end_layout
2564 \begin_layout Itemize
2565 There is one needed line: 
2566 \begin_inset Quotes eld
2567 \end_inset
2569 type <systype>
2570 \begin_inset Quotes erd
2571 \end_inset
2574  This sets system type to <systype>.
2575  The following system types are valid:
2576 \end_layout
2578 \begin_deeper
2579 \begin_layout Itemize
2580 snes (SNES)
2581 \end_layout
2583 \begin_layout Itemize
2584 bsx (BS-X non-slotted)
2585 \end_layout
2587 \begin_layout Itemize
2588 bsxslotted (BS-X slotted)
2589 \end_layout
2591 \begin_layout Itemize
2592 sufamiturbo (Sufami Turbo)
2593 \end_layout
2595 \begin_layout Itemize
2596 sgb (Super Game Boy)
2597 \end_layout
2599 \begin_layout Itemize
2600 dmg (Game Boy)
2601 \end_layout
2603 \begin_layout Itemize
2604 gbc (Game Boy Color)
2605 \end_layout
2607 \begin_layout Itemize
2608 gbc_gba (Game Boy Color with GBA initial register values)
2609 \end_layout
2611 \end_deeper
2612 \begin_layout Itemize
2613 Optionally a region can be specified: 
2614 \begin_inset Quotes eld
2615 \end_inset
2617 region <region>
2618 \begin_inset Quotes erd
2619 \end_inset
2622  The following values are valid:
2623 \end_layout
2625 \begin_deeper
2626 \begin_layout Itemize
2627 autodetect (Autodetect region: snes and sgb only)
2628 \end_layout
2630 \begin_layout Itemize
2631 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
2632 \end_layout
2634 \begin_layout Itemize
2635 pal (PAL: snes, sgb)
2636 \end_layout
2638 \begin_layout Itemize
2639 world (World: dmg, gbc, gbc_gba)
2640 \end_layout
2642 \end_deeper
2643 \begin_layout Itemize
2644 ROM images are loaded as: 
2645 \begin_inset Quotes eld
2646 \end_inset
2648 rom <type> <file>
2649 \begin_inset Quotes erd
2650 \end_inset
2653  The following types are valid:
2654 \end_layout
2656 \begin_deeper
2657 \begin_layout Itemize
2658 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
2659  BIOS in bsx, bsxslotted, sufamiturbo)
2660 \end_layout
2662 \begin_layout Itemize
2663 bsx (Cartridge ROM in bsx, bsxslotted)
2664 \end_layout
2666 \begin_layout Itemize
2667 slot-a (Cartridge ROM in sufamiturbo)
2668 \end_layout
2670 \begin_layout Itemize
2671 slot-b (Cartridge ROM in sufamiturbo)
2672 \end_layout
2674 \end_deeper
2675 \begin_layout Itemize
2676 ROM markup can be loaded as: 
2677 \begin_inset Quotes eld
2678 \end_inset
2680 xml <type> <file>
2681 \begin_inset Quotes erd
2682 \end_inset
2685  The types valid are the same as for ROMs.
2686 \end_layout
2688 \begin_layout Itemize
2689 Patches can be loaded as 
2690 \begin_inset Quotes eld
2691 \end_inset
2693 patch[<offset>] <type> <file>
2694 \begin_inset Quotes erd
2695 \end_inset
2698  The types are the same as for ROMs.
2699 \end_layout
2701 \begin_deeper
2702 \begin_layout Itemize
2703 Offset is given in form [+-]<number>.
2704  Usually offset is either +0 or -512.
2705 \end_layout
2707 \begin_layout Itemize
2708 Default offset is +0.
2709 \end_layout
2711 \end_deeper
2712 \begin_layout Subsection
2713 Example:
2714 \end_layout
2716 \begin_layout LyX-Code
2717 [GAMEPACK FILE]
2718 \end_layout
2720 \begin_layout LyX-Code
2721 type snes
2722 \end_layout
2724 \begin_layout LyX-Code
2725 rom rom speedygonzales.sfc
2726 \end_layout
2728 \begin_layout LyX-Code
2729 patch-512 rom sonicthehedgehog.ips
2730 \end_layout
2732 \begin_layout Subsection
2733 Example 2:
2734 \end_layout
2736 \begin_layout LyX-Code
2737 [GAMEPACK FILE]
2738 \end_layout
2740 \begin_layout LyX-Code
2741 type sgb
2742 \end_layout
2744 \begin_layout LyX-Code
2745 rom rom supergameboy.sfc
2746 \end_layout
2748 \begin_layout LyX-Code
2749 rom dmg megamanV.dmg
2750 \end_layout
2752 \begin_layout Section
2753 Quick'n'dirty encode guide
2754 \end_layout
2756 \begin_layout Enumerate
2757 Start the emulator and load the ROM and movie file.
2758 \end_layout
2760 \begin_layout Enumerate
2761 Set large AVI option 'set-setting avi-large on'
2762 \end_layout
2764 \begin_layout Enumerate
2765 Enable dumping 'dump-avi tmpdump' 
2766 \end_layout
2768 \begin_layout Enumerate
2769 Unpause and let it run until you want to end dumping.
2770 \end_layout
2772 \begin_layout Enumerate
2773 Close the emulator (closing the window is the easiest way).
2774  Or use 'end-avi'.
2775 \end_layout
2777 \begin_layout Enumerate
2778 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
2779  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
2780 \end_layout
2782 \begin_layout Enumerate
2783 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
2784 \end_layout
2786 \begin_layout Enumerate
2787 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
2788  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
2789 \end_layout
2791 \begin_layout Enumerate
2792 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
2793  Now final.mkv contains quick'n'dirty encode.
2794 \end_layout
2796 \begin_layout Section
2797 Axis configurations for some gamepad types:
2798 \end_layout
2800 \begin_layout Subsection
2801 XBox360 controller:
2802 \end_layout
2804 \begin_layout Standard
2805 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
2806 \end_layout
2808 \begin_layout LyX-Code
2809 set-axis joystick0axis2 pressure-+
2810 \end_layout
2812 \begin_layout LyX-Code
2813 set-axis joystick0axis5 pressure-+
2814 \end_layout
2816 \begin_layout Itemize
2817 This is needed for SDL only.
2818  EVDEV sets those types correctly.
2819 \end_layout
2821 \begin_layout Subsection
2822 PS3 
2823 \begin_inset Quotes eld
2824 \end_inset
2826 sixaxis
2827 \begin_inset Quotes erd
2828 \end_inset
2830  controller:
2831 \end_layout
2833 \begin_layout Standard
2834 Axes 8-19 should be disabled.
2835 \end_layout
2837 \begin_layout LyX-Code
2838 set-axis joystick0axis8 disabled
2839 \end_layout
2841 \begin_layout LyX-Code
2842 set-axis joystick0axis9 disabled
2843 \end_layout
2845 \begin_layout LyX-Code
2846 set-axis joystick0axis10 disabled
2847 \end_layout
2849 \begin_layout LyX-Code
2850 set-axis joystick0axis11 disabled
2851 \end_layout
2853 \begin_layout LyX-Code
2854 set-axis joystick0axis12 disabled
2855 \end_layout
2857 \begin_layout LyX-Code
2858 set-axis joystick0axis13 disabled
2859 \end_layout
2861 \begin_layout LyX-Code
2862 set-axis joystick0axis14 disabled
2863 \end_layout
2865 \begin_layout LyX-Code
2866 set-axis joystick0axis15 disabled
2867 \end_layout
2869 \begin_layout LyX-Code
2870 set-axis joystick0axis16 disabled
2871 \end_layout
2873 \begin_layout LyX-Code
2874 set-axis joystick0axis17 disabled
2875 \end_layout
2877 \begin_layout LyX-Code
2878 set-axis joystick0axis18 disabled
2879 \end_layout
2881 \begin_layout LyX-Code
2882 set-axis joystick0axis19 disabled
2883 \end_layout
2885 \begin_layout Section
2886 Errata:
2887 \end_layout
2889 \begin_layout Subsection
2890 Problems from BSNES core:
2891 \end_layout
2893 \begin_layout Itemize
2894 The whole pending save stuff.
2895 \end_layout
2897 \begin_layout Itemize
2898 It is slow (especially accuracy).
2899 \end_layout
2901 \begin_layout Itemize
2902 Firmwares can't be loaded from ZIP archives.
2903 \end_layout
2905 \begin_layout Subsection
2906 Other problems:
2907 \end_layout
2909 \begin_layout Itemize
2910 Modifiers don't work with pseudo-keys.
2911 \end_layout
2913 \begin_layout Itemize
2914 Audio for last dumped frame is not itself dumped.
2915 \end_layout
2917 \begin_layout Itemize
2918 Audio in UI is pretty bad in quality if game doesn't run at full speed.
2919 \end_layout
2921 \end_body
2922 \end_document