Remove obsolete SDL stuff
[lsnes.git] / manual.lyx
blobde120dcd4544b6461dd32078dad243f5f0e56539
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
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_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \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_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua (if Lua support is needed).
148 \end_layout
150 \begin_deeper
151 \begin_layout Itemize
152 Version 5.1.X or 5.2X.
153 \end_layout
155 \end_deeper
156 \begin_layout Enumerate
157 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
158 \end_layout
160 \begin_layout Section
161 Building
162 \end_layout
164 \begin_layout Itemize
165 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
166  bsnes core).
167 \end_layout
169 \begin_layout Itemize
170 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
171 \end_layout
173 \begin_layout Itemize
174 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
175 >', bsnes core)
176 \end_layout
178 \begin_layout Itemize
179 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
180 ersion>', gambatte core)
181 \end_layout
183 \begin_layout Itemize
184 Edit options.build (or copy of that file)
185 \end_layout
187 \begin_layout Itemize
188 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
190 \end_layout
192 \begin_layout Section
193 Command line options
194 \end_layout
196 \begin_layout Subsection
197 ROM options
198 \end_layout
200 \begin_layout Subsubsection
201 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
202 \end_layout
204 \begin_layout Standard
205 Load <file> as ROM.
206 \end_layout
208 \begin_layout Subsection
209 Session options
210 \end_layout
212 \begin_layout Subsubsection
213 --pause
214 \end_layout
216 \begin_layout Standard
217 Start paused
218 \end_layout
220 \begin_layout Subsubsection
221 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
222 \end_layout
224 \begin_layout Standard
225 Load <filename> as movie or savestate file.
226  All other session options are ignored.
227 \end_layout
229 \begin_layout Subsubsection
230 --port1=<device> (lsnes/SDL, bsnes core only)
231 \end_layout
233 \begin_layout Standard
234 Set type of port1.
235  Valid values are:
236 \end_layout
238 \begin_layout Itemize
239 none: No device connected
240 \end_layout
242 \begin_layout Itemize
243 gamepad: One gamepad (the default)
244 \end_layout
246 \begin_layout Itemize
247 multitap: Four gamepads (warning: makes most games refuse to start)
248 \end_layout
250 \begin_layout Itemize
251 mouse: Mouse.
252 \end_layout
254 \begin_layout Subsubsection
255 --port2=<type> (lsnes/SDL, bsnes core only)
256 \end_layout
258 \begin_layout Standard
259 Set type of port2.
260  Valid values are:
261 \end_layout
263 \begin_layout Itemize
264 none: No device connected (the default)
265 \end_layout
267 \begin_layout Itemize
268 gamepad: One gamepad
269 \end_layout
271 \begin_layout Itemize
272 multitap: Four gamepads.
273 \end_layout
275 \begin_layout Itemize
276 mouse: Mouse
277 \end_layout
279 \begin_layout Itemize
280 superscope: Super Scope
281 \end_layout
283 \begin_layout Itemize
284 justifier: One justifier
285 \end_layout
287 \begin_layout Itemize
288 justifiers: Two justifiers
289 \end_layout
291 \begin_layout Subsubsection
292 --gamename=<name> (lsnes/SDL)
293 \end_layout
295 \begin_layout Standard
296 Set the name of game to <name>.
297  Default is blank.
298 \end_layout
300 \begin_layout Subsubsection
301 --author=<name> (lsnes/SDL)
302 \end_layout
304 \begin_layout Standard
305 Add author with full name of <name> (no nickname).
306 \end_layout
308 \begin_layout Subsubsection
309 --author=|<name> (lsnes/SDL)
310 \end_layout
312 \begin_layout Standard
313 Add author with nickname of <name> (no full name).
314 \end_layout
316 \begin_layout Subsubsection
317 --author=<fullname>|<nickname> (lsnes/SDL)
318 \end_layout
320 \begin_layout Standard
321 Add author with full name of <fullname> and nickname of <nickname>.
322 \end_layout
324 \begin_layout Subsubsection
325 --rtc-second=<value> (lsnes/SDL)
326 \end_layout
328 \begin_layout Standard
329 Set RTC second (0 is 1st January 1970 00:00:00Z).
330  Default is 1,000,000,000.
331 \end_layout
333 \begin_layout Subsubsection
334 --rtc-subsecond=<value> (lsnes/SDL)
335 \end_layout
337 \begin_layout Standard
338 Set RTC subsecond.
339  Range is 0-.
340  Unit is CPU cycle.
341  Default is 0.
342 \end_layout
344 \begin_layout Subsubsection
345 --anchor-savestate=<file> (lsnes/SDL)
346 \end_layout
348 \begin_layout Standard
349 Set the anchor savestate file.
350 \end_layout
352 \begin_layout Subsubsection
353 --load=<file> (lsnes/wxwidgets)
354 \end_layout
356 \begin_layout Standard
357 After loading the ROM, load <file> as savestate/movie.
358 \end_layout
360 \begin_layout Subsection
361 Misc.
362  options:
363 \end_layout
365 \begin_layout Subsubsection
366 --run=<file> (lsnes/SDL)
367 \end_layout
369 \begin_layout Standard
370 After running main RC file, run this file.
371  If multiple are specified, these execute in order specified.
372 \end_layout
374 \begin_layout Subsection
375 dump options (lsnes-dumpavi only)
376 \end_layout
378 \begin_layout Subsubsection
379 --dumper=<dumper>
380 \end_layout
382 \begin_layout Standard
383 Set the dumper to use (required).
384  Use 'list' for listing of known dumpers.
385 \end_layout
387 \begin_layout Subsubsection
388 --mode=<mode>
389 \end_layout
391 \begin_layout Standard
392 Set the mode to use (required for dumpers with multiple modes, forbidden
393  otherwise).
394  Use 'list' for known modes.
395 \end_layout
397 \begin_layout Subsubsection
398 --prefix=<prefix>
399 \end_layout
401 \begin_layout Standard
402 Set dump prefix.
403  Default is 
404 \begin_inset Quotes eld
405 \end_inset
407 avidump
408 \begin_inset Quotes erd
409 \end_inset
412 \end_layout
414 \begin_layout Subsubsection
415 --option=<name>=<value>
416 \end_layout
418 \begin_layout Standard
419 Set option <name> to value <value>.
420 \end_layout
422 \begin_layout Subsubsection
423 --length=<length>
424 \end_layout
426 \begin_layout Standard
427 Set number of frames to dump.
428  Mandatory.
429 \end_layout
431 \begin_layout Subsubsection
432 --lua=<script>
433 \end_layout
435 \begin_layout Standard
436 Run specified lua script (lsnes-dumpavi does not have initialization files).
437 \end_layout
439 \begin_layout Subsubsection
440 --load-library=<library>
441 \end_layout
443 \begin_layout Standard
444 Load the specified shared object / dynamic library / dynamic link library.
445 \end_layout
447 \begin_layout Section
448 Startup file lsnes.rc
449 \end_layout
451 \begin_layout Standard
452 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
453  This file is located in:
454 \end_layout
456 \begin_layout Itemize
457 Windows: %APPDATA%
458 \backslash
459 lsnes
460 \backslash
461 lsnes.rc (if %APPDATA% exists)
462 \end_layout
464 \begin_layout Itemize
465 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
466 \end_layout
468 \begin_layout Itemize
469 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
470 \end_layout
472 \begin_layout Itemize
473 All: ./lsnes.rc (fallback default).
474 \end_layout
476 \begin_layout Standard
477 If leading directories do not exist, attempt to create them is made.
478 \end_layout
480 \begin_layout Section
481 Internal commands
482 \end_layout
484 \begin_layout Itemize
485 Commands beginning with '*' invoke the corresponding command without alias
486  expansion.
487 \end_layout
489 \begin_layout Itemize
490 If command starts with '+' (after possible '*'), the command is executed
491  as-is when button is pressed, and when button is released, it is executed
492  with '+' replaced by '-'.
493 \end_layout
495 \begin_layout Itemize
496 Commands without '+' execute only on negative edge (release).
497 \end_layout
499 \begin_layout Subsection
500 Settings:
501 \end_layout
503 \begin_layout Standard
504 Settings control various aspects of emulator behaviour.
505 \end_layout
507 \begin_layout Subsubsection
508 set-setting <setting> <value>
509 \end_layout
511 \begin_layout Standard
512 Sets setting <setting> to value <value> (may be empty).
513 \end_layout
515 \begin_layout Subsubsection
516 unset-setting <setting>
517 \end_layout
519 \begin_layout Standard
520 Try to unset setting <setting> (not all settings can be unset).
521 \end_layout
523 \begin_layout Subsubsection
524 get-setting <setting>
525 \end_layout
527 \begin_layout Standard
528 Read value of setting <setting>
529 \end_layout
531 \begin_layout Subsubsection
532 show-settings
533 \end_layout
535 \begin_layout Standard
536 Print names and values of all settings.
537 \end_layout
539 \begin_layout Subsection
540 Keybindings
541 \end_layout
543 \begin_layout Standard
544 Keybindings bind commands or aliases to keys (or pseudo-keys).
546 \end_layout
548 \begin_layout Standard
549 Notes:
550 \end_layout
552 \begin_layout Itemize
553 Do not bind edge active (+/-) commands to keys with modifiers, that won't
554  work right!
555 \end_layout
557 \begin_layout Itemize
558 Names of keys and modifiers are platform-dependent.
559 \end_layout
561 \begin_layout Itemize
562 Be careful before binding pseudo-keys (such as joystick axes, buttons or
563  hats) with modifiers.
564  That may or may not work right.
565 \end_layout
567 \begin_layout Subsubsection
568 bind-key [<mod>/<modmask>] <key> <command>
569 \end_layout
571 \begin_layout Standard
572 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
573 ed list) are set as <mod> (comma-seperated list).
574 \end_layout
576 \begin_layout Standard
577 The names of keys and modifiers are platform-dependent.
578 \end_layout
580 \begin_layout Subsubsection
581 unbind-key [<mod>/<modmask>] <key>
582 \end_layout
584 \begin_layout Standard
585 Unbind command from <key> (with specified <mod> and <modmask>).
586 \end_layout
588 \begin_layout Subsubsection
589 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
590  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
591  [plus=<val>] [tolerance=<val>]
592 \end_layout
594 \begin_layout Standard
595 Set axis parameters for axis <axis>.
596 \end_layout
598 \begin_layout Itemize
599 disabled: Disable axis
600 \end_layout
602 \begin_layout Itemize
603 axis: Normal axis
604 \end_layout
606 \begin_layout Itemize
607 axis-inverse: Inverse axis
608 \end_layout
610 \begin_layout Itemize
611 pressure0-: Pressure sensitive.
612  Released at 0, pressed at -.
613 \end_layout
615 \begin_layout Itemize
616 pressure0+: Pressure sensitive.
617  Released at 0, pressed at +.
618 \end_layout
620 \begin_layout Itemize
621 pressure-0: Pressure sensitive.
622  Released at -, pressed at 0.
623 \end_layout
625 \begin_layout Itemize
626 pressure-+: Pressure sensitive.
627  Released at -, pressed at +.
628 \end_layout
630 \begin_layout Itemize
631 pressure+0: Pressure sensitive.
632  Released at +, pressed at 0.
633 \end_layout
635 \begin_layout Itemize
636 pressure+-: Pressure sensitive.
637  Released at +, pressed at -.
638 \end_layout
640 \begin_layout Itemize
641 minus=<val>: Calibration at extreme minus position (-32768-32767)
642 \end_layout
644 \begin_layout Itemize
645 zero=<val>: Calibration at neutral position (-32768-32767)
646 \end_layout
648 \begin_layout Itemize
649 plus=<val>: Calibration at extreme plus position (-32768-32767)
650 \end_layout
652 \begin_layout Itemize
653 tolerance=<value>: Center band tolerance (0<x<1).
654  The smaller the value, the more sensitive the control is.
655 \end_layout
657 \begin_layout Subsubsection
658 show-bindings
659 \end_layout
661 \begin_layout Standard
662 Print all key bindings in effect.
663 \end_layout
665 \begin_layout Subsection
666 Aliases
667 \end_layout
669 \begin_layout Standard
670 Aliases bind command to sequence of commands.
671  After alias has been defined, it replaces the command it shadows.
672 \end_layout
674 \begin_layout Standard
675 Notes:
676 \end_layout
678 \begin_layout Itemize
679 You can't alias command to itself.
680 \end_layout
682 \begin_layout Itemize
683 Aliases starting with +/- are edge active just like ordinary commands starting
684  with +/-.
685 \end_layout
687 \begin_layout Itemize
688 One command can be aliased to multiple commands.
689 \end_layout
691 \begin_layout Subsubsection
692 alias-command <command> <expansion>
693 \end_layout
695 \begin_layout Standard
696 Append <expansion> to alias <command>.
697  If alias does not already exist, it is created.
698 \end_layout
700 \begin_layout Subsubsection
701 unalias-command <command>
702 \end_layout
704 \begin_layout Standard
705 Clear alias expansion for <command>.
706 \end_layout
708 \begin_layout Subsubsection
709 show-aliases
710 \end_layout
712 \begin_layout Standard
713 Print all aliases and their expansions in effect.
714 \end_layout
716 \begin_layout Subsection
717 run-script <script>
718 \end_layout
720 \begin_layout Standard
721 Run <script> as if commands were entered on the command line.
722 \end_layout
724 \begin_layout Subsection
725 Memory manipulation
726 \end_layout
728 \begin_layout Standard
729 <address> may be decimal or hexadecimal (prefixed with '0x').
730  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
731  with '-') decimal.
732 \end_layout
734 \begin_layout Standard
735 The available element <sizes> are:
736 \end_layout
738 \begin_layout Itemize
739 byte: 1 byte
740 \end_layout
742 \begin_layout Itemize
743 word: 2 bytes
744 \end_layout
746 \begin_layout Itemize
747 dword: 4 bytes
748 \end_layout
750 \begin_layout Itemize
751 qword: 8 bytes
752 \end_layout
754 \begin_layout Standard
755 When reading RAM and ROM, multi-byte reads/writes are big-endian.
756  When dealing with DSP memory, multi-byte reads/writes are native-endian
757  (do not use operand sizes exceeding DSP bitness, except dword is OK for
758  24-bit memory).
759 \end_layout
761 \begin_layout Subsubsection
762 read-<size> <address>
763 \end_layout
765 \begin_layout Standard
766 Read the value of byte in <address>.
767 \end_layout
769 \begin_layout Subsubsection
770 read-s<size> <address>
771 \end_layout
773 \begin_layout Standard
774 Read the value of signed byte in <address>.
775 \end_layout
777 \begin_layout Subsubsection
778 write-<size> <address> <value>
779 \end_layout
781 \begin_layout Standard
782 Write <value> to byte in address <address>.
783 \end_layout
785 \begin_layout Subsubsection
786 search-memory reset
787 \end_layout
789 \begin_layout Standard
790 Reset the memory search
791 \end_layout
793 \begin_layout Subsubsection
794 search-memory count
795 \end_layout
797 \begin_layout Standard
798 Print number of candidates remaining
799 \end_layout
801 \begin_layout Subsubsection
802 search-memory print
803 \end_layout
805 \begin_layout Standard
806 Print all candidates remaining
807 \end_layout
809 \begin_layout Subsubsection
810 search-memory <usflag><sizeflag><op>
811 \end_layout
813 \begin_layout Standard
814 Searches memory for addresses satisfying criteria.
815 \end_layout
817 \begin_layout Standard
818 <usflag> can be:
819 \end_layout
821 \begin_layout Itemize
822 u: unsigned
823 \end_layout
825 \begin_layout Itemize
826 s: signed
827 \end_layout
829 \begin_layout Standard
830 <sizeflag> can be:
831 \end_layout
833 \begin_layout Itemize
834 b: byte
835 \end_layout
837 \begin_layout Itemize
838 w: word
839 \end_layout
841 \begin_layout Itemize
842 d: dword
843 \end_layout
845 \begin_layout Itemize
846 q: qword
847 \end_layout
849 \begin_layout Standard
850 <op> can be:
851 \end_layout
853 \begin_layout Itemize
854 lt: < previous value.
855 \end_layout
857 \begin_layout Itemize
858 le: <= previous value.
859 \end_layout
861 \begin_layout Itemize
862 eq: = previous value.
863 \end_layout
865 \begin_layout Itemize
866 ne: != previous value.
867 \end_layout
869 \begin_layout Itemize
870 ge: >= previous value.
871 \end_layout
873 \begin_layout Itemize
874 gt: > previous value.
875 \end_layout
877 \begin_layout Subsubsection
878 search-memory <sizeflag> <value>
879 \end_layout
881 \begin_layout Standard
882 Searches for addresses that currently have value <value>.
883  <sizeflag> is as in previous command.
884 \end_layout
886 \begin_layout Subsection
887 Main commands
888 \end_layout
890 \begin_layout Standard
891 These commands are not available in lsnesrc, but are available after ROM
892  has been loaded.
893 \end_layout
895 \begin_layout Subsubsection
896 quit-emulator [/y]
897 \end_layout
899 \begin_layout Standard
900 Quits the emulator (asking for confirmation).
901  If /y is given, no confirmation is asked.
902 \end_layout
904 \begin_layout Subsubsection
905 pause-emulator
906 \end_layout
908 \begin_layout Standard
909 Toggle paused/unpaused
910 \end_layout
912 \begin_layout Subsubsection
913 +advance-frame 
914 \end_layout
916 \begin_layout Standard
917 Advance frame.
918  If the button is still held after configurable timeout expires, game unpauses
919  for the duration frame advance is held.
920 \end_layout
922 \begin_layout Subsubsection
923 +advance-poll 
924 \end_layout
926 \begin_layout Standard
927 Advance subframe.
928  If the button is still held after configurable timeout expires, game unpauses
929  for the duration frame advance is held.
930 \end_layout
932 \begin_layout Subsubsection
933 advance-skiplag 
934 \end_layout
936 \begin_layout Standard
937 Skip to first poll in frame after current.
938 \end_layout
940 \begin_layout Subsubsection
941 reset 
942 \end_layout
944 \begin_layout Standard
945 Reset the SNES after this frame.
946 \end_layout
948 \begin_layout Subsubsection
949 load <filename> 
950 \end_layout
952 \begin_layout Standard
953 Load savestate <filename> in current mode.
954 \end_layout
956 \begin_layout Subsubsection
957 load-state <filename> 
958 \end_layout
960 \begin_layout Standard
961 Load savestate <filename> in readwrite mode.
962 \end_layout
964 \begin_layout Subsubsection
965 load-readonly <filename> 
966 \end_layout
968 \begin_layout Standard
969 Load savestate <filename> in readonly mode.
970 \end_layout
972 \begin_layout Subsubsection
973 load-preserve <filename> 
974 \end_layout
976 \begin_layout Standard
977 Load savestate <filename> in readonly mode, preserving current events.
978 \end_layout
980 \begin_layout Subsubsection
981 load-movie <filename> 
982 \end_layout
984 \begin_layout Standard
985 Load savestate <filename>, ignoring save part in readonly mode.
986 \end_layout
988 \begin_layout Subsubsection
989 save-state <filename> 
990 \end_layout
992 \begin_layout Standard
993 Save system state to <filename> as soon as possible.
994 \end_layout
996 \begin_layout Subsubsection
997 save-movie <filename> 
998 \end_layout
1000 \begin_layout Standard
1001 Save movie to <filename>.
1002 \end_layout
1004 \begin_layout Subsubsection
1005 set-rwmode 
1006 \end_layout
1008 \begin_layout Standard
1009 Set read-write mode.
1010 \end_layout
1012 \begin_layout Subsubsection
1013 set-romode 
1014 \end_layout
1016 \begin_layout Standard
1017 Set read-only mode
1018 \end_layout
1020 \begin_layout Subsubsection
1021 toggle-rwmode 
1022 \end_layout
1024 \begin_layout Standard
1025 Toggle between read-only and read-write modes.
1026 \end_layout
1028 \begin_layout Subsubsection
1029 set-gamename <name> 
1030 \end_layout
1032 \begin_layout Standard
1033 Set name of the game to <name>
1034 \end_layout
1036 \begin_layout Subsubsection
1037 get-gamename 
1038 \end_layout
1040 \begin_layout Standard
1041 Print the name of the game.
1042 \end_layout
1044 \begin_layout Subsubsection
1045 add-author <author> 
1046 \end_layout
1048 \begin_layout Standard
1049 Adds new author <author>.
1050  If <author> does not contain '|' it is full name.
1051  If it contains '|', '|' splits the full name and nickname.
1052 \end_layout
1054 \begin_layout Subsubsection
1055 edit-author <num> <author> 
1056 \end_layout
1058 \begin_layout Standard
1059 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1060  format)
1061 \end_layout
1063 \begin_layout Subsubsection
1064 remove-author <num> 
1065 \end_layout
1067 \begin_layout Standard
1068 Remove author in slot <num>
1069 \end_layout
1071 \begin_layout Subsubsection
1072 print-authors 
1073 \end_layout
1075 \begin_layout Standard
1076 Print authors.
1077 \end_layout
1079 \begin_layout Subsubsection
1080 test-1, test-2, test-3
1081 \end_layout
1083 \begin_layout Standard
1084 Internal test commands.
1085  Don't use.
1086 \end_layout
1088 \begin_layout Subsubsection
1089 take-screenshot <filename> 
1090 \end_layout
1092 \begin_layout Standard
1093 Save screenshot to <filename>.
1094 \end_layout
1096 \begin_layout Subsubsection
1097 +controller<num><button>
1098 \end_layout
1100 \begin_layout Standard
1101 Press button <button> on controller <num> (1-8).
1102  The following button names are known:
1103 \end_layout
1105 \begin_layout Itemize
1106 left
1107 \end_layout
1109 \begin_layout Itemize
1110 right
1111 \end_layout
1113 \begin_layout Itemize
1115 \end_layout
1117 \begin_layout Itemize
1118 down
1119 \end_layout
1121 \begin_layout Itemize
1123 \end_layout
1125 \begin_layout Itemize
1127 \end_layout
1129 \begin_layout Itemize
1131 \end_layout
1133 \begin_layout Itemize
1135 \end_layout
1137 \begin_layout Itemize
1139 \end_layout
1141 \begin_layout Itemize
1143 \end_layout
1145 \begin_layout Itemize
1146 select
1147 \end_layout
1149 \begin_layout Itemize
1150 start
1151 \end_layout
1153 \begin_layout Itemize
1154 trigger
1155 \end_layout
1157 \begin_layout Itemize
1158 cursor
1159 \end_layout
1161 \begin_layout Itemize
1162 pause
1163 \end_layout
1165 \begin_layout Itemize
1166 turbo
1167 \end_layout
1169 \begin_layout Subsubsection
1170 controllerh<num><button>
1171 \end_layout
1173 \begin_layout Standard
1174 Hold/unhold button <button> on controller <num> (1-8).
1175  See +controller for button names.
1176 \end_layout
1178 \begin_layout Subsubsection
1179 controllerf<num><button>
1180 \end_layout
1182 \begin_layout Standard
1183 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1184  See +controller for button names.
1185 \end_layout
1187 \begin_layout Standard
1188 Cauntion: Does not work properly if outside frame advance.
1189 \end_layout
1191 \begin_layout Subsubsection
1192 autofire (<pattern>|-)...
1193 \end_layout
1195 \begin_layout Standard
1196 Set autofire pattern.
1197  Each parameter is comma-separated list of button names (in form of 1start,
1198  1A, 2B, etc..) to hold on that frame.
1199  After reaching the end of pattern, the pattern restarts from the beginning.
1200 \end_layout
1202 \begin_layout Subsubsection
1203 repaint
1204 \end_layout
1206 \begin_layout Standard
1207 Force a repaint.
1208 \end_layout
1210 \begin_layout Subsection
1211 Save jukebox 
1212 \end_layout
1214 \begin_layout Subsubsection
1215 cycle-jukebox-backward
1216 \end_layout
1218 \begin_layout Standard
1219 Cycle save jukebox backwards.
1220 \end_layout
1222 \begin_layout Subsubsection
1223 cycle-jukebox-forward
1224 \end_layout
1226 \begin_layout Standard
1227 Cycle save jukebox forwards
1228 \end_layout
1230 \begin_layout Subsubsection
1231 load-jukebox
1232 \end_layout
1234 \begin_layout Standard
1235 Do load from jukebox (current mode).
1236 \end_layout
1238 \begin_layout Subsubsection
1239 save-jukebox
1240 \end_layout
1242 \begin_layout Standard
1243 Do state save to jukebox.
1244 \end_layout
1246 \begin_layout Subsection
1247 Lua 
1248 \end_layout
1250 \begin_layout Standard
1251 Only available if lua support is compiled in.
1252 \end_layout
1254 \begin_layout Subsubsection
1255 evaluate-lua <luacode>
1256 \end_layout
1258 \begin_layout Standard
1259 Run Lua code <luacode> using built-in Lua interpretter.
1260 \end_layout
1262 \begin_layout Subsubsection
1263 run-lua <script>
1264 \end_layout
1266 \begin_layout Standard
1267 Run specified lua file using built-in Lua interpretter.
1268 \end_layout
1270 \begin_layout Subsubsection
1271 reset-lua
1272 \end_layout
1274 \begin_layout Standard
1275 Clear the Lua VM state and restore to factory defaults.
1276 \end_layout
1278 \begin_layout Subsection
1279 Memory watch
1280 \end_layout
1282 \begin_layout Subsubsection
1283 add-watch <name> <expression>
1284 \end_layout
1286 \begin_layout Standard
1287 Adds new watch (or modifies old one).
1288 \end_layout
1290 \begin_layout Subsubsection
1291 remove-watch <name>
1292 \end_layout
1294 \begin_layout Standard
1295 Remove a watch.
1296 \end_layout
1298 \begin_layout Subsection
1299 Sound 
1300 \end_layout
1302 \begin_layout Subsubsection
1303 enable-sound <on/off> 
1304 \end_layout
1306 \begin_layout Standard
1307 Enable/Disable sound.
1308 \end_layout
1310 \begin_layout Subsubsection
1311 set-volume <multiplier>
1312 \end_layout
1314 \begin_layout Standard
1315 Set the volume multiplier to <multiplier>.
1316  1 is normal volume, and higher numbers are louder.
1317 \end_layout
1319 \begin_layout Subsubsection
1320 set-volume <multiplier>%
1321 \end_layout
1323 \begin_layout Standard
1324 Set the volume multiplier to <multiplier> percent.
1325  100 is normal volume, and higher numbers are louder.
1326 \end_layout
1328 \begin_layout Subsubsection
1329 set-volume <multiplier>dB
1330 \end_layout
1332 \begin_layout Standard
1333 Set the volume multiplier to <multiplier> dB.
1334  0 is normal volume, and higher numbers are louder.
1335  The value may be negative.
1336 \end_layout
1338 \begin_layout Subsection
1339 Misc.
1340 \end_layout
1342 \begin_layout Subsubsection
1343 reload-rom [<file>]
1344 \end_layout
1346 \begin_layout Standard
1347 Reloads the main ROM image from <file>.
1348 \end_layout
1350 \begin_layout Subsubsection
1351 +tangent
1352 \end_layout
1354 \begin_layout Standard
1355 Tangent for recording voice for commentary track.
1356  While pressed, record a stream.
1357 \end_layout
1359 \begin_layout Section
1360 Settings
1361 \end_layout
1363 \begin_layout Subsection
1364 Core settings
1365 \end_layout
1367 \begin_layout Subsubsection
1368 firmwarepath
1369 \end_layout
1371 \begin_layout Standard
1372 Set where bsnes looks for firmware files.
1373  Default is 
1374 \begin_inset Quotes eld
1375 \end_inset
1378 \begin_inset Quotes erd
1379 \end_inset
1382 \end_layout
1384 \begin_layout Subsubsection
1385 target
1386 \end_layout
1388 \begin_layout Standard
1389 Set the target .
1390  Numeric, range is 0.001 to 
1391 \begin_inset Quotes eld
1392 \end_inset
1394 infinite
1395 \begin_inset Quotes erd
1396 \end_inset
1399  Default is native framerate.
1400 \end_layout
1402 \begin_layout Subsubsection
1403 savecompression
1404 \end_layout
1406 \begin_layout Standard
1407 Set save compression level (integer 0-9).
1408  Default is 7 (0 is no compression).
1409 \end_layout
1411 \begin_layout Subsubsection
1412 advance-timeout
1413 \end_layout
1415 \begin_layout Standard
1416 Set the frame advance timeout in milliseconds.
1417  Numeric integer, range is 0-999999999.
1418  Default is 500.
1419 \end_layout
1421 \begin_layout Subsubsection
1422 allow-inconsistent-saves (bsnes only)
1423 \end_layout
1425 \begin_layout Standard
1426 If true, save without synchronization.
1427  Makes games seriously unstable.
1428 \end_layout
1430 \begin_layout Subsubsection
1431 save-every-frame (bsnes only)
1432 \end_layout
1434 \begin_layout Standard
1435 If true, simulate saving on each frame.
1436  Trades off emulation accuracy for sync stability.
1437  Also needed if the movie assumes saving on each frame for rewind.
1438 \end_layout
1440 \begin_layout Subsection
1441 AVI dumper settings
1442 \end_layout
1444 \begin_layout Subsubsection
1445 avi-large
1446 \end_layout
1448 \begin_layout Standard
1449 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1450  outputs.
1451 \end_layout
1453 \begin_layout Subsubsection
1454 avi-left-border
1455 \end_layout
1457 \begin_layout Standard
1458 AVI dumper: Set the default left border thickness (unless lua overrides)
1459  for dumps.
1460  Range 0-8191.
1461  Default is 0.
1462 \end_layout
1464 \begin_layout Subsubsection
1465 avi-right-border
1466 \end_layout
1468 \begin_layout Standard
1469 AVI dumper: Set the default right border thickness (unless lua overrides)
1470  for dumps.
1471  Range 0-8191.
1472  Default is 0.
1473 \end_layout
1475 \begin_layout Subsubsection
1476 avi-top-border
1477 \end_layout
1479 \begin_layout Standard
1480 AVI dumper: Set the default top border thickness (unless lua overrides)
1481  for dumps.
1482  Range 0-8191.
1483  Default is 0.
1484 \end_layout
1486 \begin_layout Subsubsection
1487 avi-bottom-border
1488 \end_layout
1490 \begin_layout Standard
1491 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1492  for dumps.
1493  Range 0-8191.
1494  Default is 0.
1495 \end_layout
1497 \begin_layout Subsubsection
1498 avi-maxframes
1499 \end_layout
1501 \begin_layout Standard
1502 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1503  Range 0-999999999.
1504  Default is 0.
1505 \end_layout
1507 \begin_layout Subsubsection
1508 avi-compresison
1509 \end_layout
1511 \begin_layout Standard
1512 AVI dumper: Compression level (0-18).
1513 \end_layout
1515 \begin_layout Itemize
1516 Compression levels 10 and above are not compatible with stock CSCD codec.
1517 \end_layout
1519 \begin_layout Itemize
1520 Recomended level is 7.
1521 \end_layout
1523 \begin_layout Subsubsection
1524 avi-soundrate
1525 \end_layout
1527 \begin_layout Standard
1528 AVI dumper: Set method of determining the sound rate.
1529 \end_layout
1531 \begin_layout Itemize
1532 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1533  128, 176.4 and 192 kHz.
1534 \end_layout
1536 \begin_layout Itemize
1537 1: Round down to nearest integer.
1538 \end_layout
1540 \begin_layout Itemize
1541 2: Round up to nearest ingeter.
1542 \end_layout
1544 \begin_layout Subsection
1545 JMD options
1546 \end_layout
1548 \begin_layout Subsubsection
1549 jmd-copression
1550 \end_layout
1552 \begin_layout Standard
1553 JMD dumper: Compression level (0-9).
1554 \end_layout
1556 \begin_layout Subsection
1557 SDL platform settings
1558 \end_layout
1560 \begin_layout Subsubsection
1561 autorepeat-first-delay
1562 \end_layout
1564 \begin_layout Standard
1565 Sets the delay for first character in typematic autorepeat.
1566 \end_layout
1568 \begin_layout Subsubsection
1569 autorepeat-subsequent-delay
1570 \end_layout
1572 \begin_layout Standard
1573 Sets the delay for subsequent characters in typematic autorepeat.
1574 \end_layout
1576 \begin_layout Section
1577 Lua functions
1578 \end_layout
1580 \begin_layout Subsection
1581 Core (in main table)
1582 \end_layout
1584 \begin_layout Subsubsection
1585 print
1586 \end_layout
1588 \begin_layout Standard
1589 Print line to message console.
1590 \end_layout
1592 \begin_layout Subsubsection
1593 exec(string command)
1594 \end_layout
1596 \begin_layout Standard
1597 Run command as it was entered on the command line
1598 \end_layout
1600 \begin_layout Subsubsection
1601 utime()
1602 \end_layout
1604 \begin_layout Standard
1605 Returns two values.
1606  First is time since some epoch in seconds, the second is microseconds mod
1607  10^6 since that epoch.
1608 \end_layout
1610 \begin_layout Subsubsection
1611 emulator_ready()
1612 \end_layout
1614 \begin_layout Standard
1615 Returns true if emulator has finished booting, false if not (on_startup()
1616  will be issued later).
1617 \end_layout
1619 \begin_layout Subsubsection
1620 set_idle_timeout(number timeout)
1621 \end_layout
1623 \begin_layout Standard
1624 Set number of microseconds to block idle for.
1625  After this timeout has expired, on_idle() will be called once.
1626 \end_layout
1628 \begin_layout Subsubsection
1629 set_timer_timeout(number timeout)
1630 \end_layout
1632 \begin_layout Standard
1633 Set number of microseconds to block timer for.
1634  After this timeout has expired, on_timer() will be called once.
1635 \end_layout
1637 \begin_layout Subsubsection
1638 bus_address(number snesaddr)
1639 \end_layout
1641 \begin_layout Standard
1642 Returns virtual address corresponding to specified address on SNES bus.
1643 \end_layout
1645 \begin_layout Subsubsection
1646 loopwrapper(function fun, ...)
1647 \end_layout
1649 \begin_layout Standard
1650 Calls function fun with function and specified arguments.
1651  The function passed suspends execution until the function returned is called.
1652  Handy for linear flow control among multiple invocations of a hook.
1653  Example code:
1654 \end_layout
1656 \begin_layout LyX-Code
1657 on_paint = loopwrapper(function(wait)
1658 \end_layout
1660 \begin_deeper
1661 \begin_layout LyX-Code
1662 while true do
1663 \end_layout
1665 \begin_deeper
1666 \begin_layout LyX-Code
1667 gui.text(0, 0, 
1668 \begin_inset Quotes eld
1669 \end_inset
1671 Test!
1672 \begin_inset Quotes erd
1673 \end_inset
1676 \end_layout
1678 \begin_layout LyX-Code
1679 wait();
1680 \end_layout
1682 \end_deeper
1683 \begin_layout LyX-Code
1685 \end_layout
1687 \end_deeper
1688 \begin_layout LyX-Code
1689 end);
1690 \end_layout
1692 \begin_layout Subsection
1693 Table bit:
1694 \end_layout
1696 \begin_layout Standard
1697 Bitwise logical functions and related.
1698 \end_layout
1700 \begin_layout Subsubsection
1701 bit.none(number...) / bit.bnot(number...)
1702 \end_layout
1704 \begin_layout Standard
1705 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1706  arguments).
1707 \end_layout
1709 \begin_layout Subsubsection
1710 bit.any(number...) / bit.bor(number...)
1711 \end_layout
1713 \begin_layout Standard
1714 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1715 \end_layout
1717 \begin_layout Subsubsection
1718 bit.all(number...) / bit.band(number...)
1719 \end_layout
1721 \begin_layout Standard
1722 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1724 \end_layout
1726 \begin_layout Subsubsection
1727 bit.parity(number...) / bit.bxor(number...)
1728 \end_layout
1730 \begin_layout Standard
1731 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1732  of the arguments).
1733 \end_layout
1735 \begin_layout Subsubsection
1736 bit.lrotate(number base[, number amount[, number bits]])
1737 \end_layout
1739 \begin_layout Standard
1740 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1741 \end_layout
1743 \begin_layout Subsubsection
1744 bit.rrotate(number base[, number amount[, number bits]])
1745 \end_layout
1747 \begin_layout Standard
1748 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1749  places.
1750 \end_layout
1752 \begin_layout Subsubsection
1753 bit.lshift(number base[, number amount[, number bits]])
1754 \end_layout
1756 \begin_layout Standard
1757 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1758  The new bits are filled with zeroes.
1759 \end_layout
1761 \begin_layout Subsubsection
1762 bit.lrshift(number base[, number amount[, number bits]])
1763 \end_layout
1765 \begin_layout Standard
1766 Shift bits-bit (max 48, default 48) number logically right by amount (default
1767  1) places.
1768  The new bits are filled with zeroes.
1769 \end_layout
1771 \begin_layout Subsubsection
1772 bit.arshift(number base[, number amount[, number bits]])
1773 \end_layout
1775 \begin_layout Standard
1776 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1777  (default 1) places.
1778  The new bits are shifted in with copy of the high bit.
1779 \end_layout
1781 \begin_layout Subsubsection
1782 bit.extract(number base[, number bit0[, number bit1,...]])
1783 \end_layout
1785 \begin_layout Standard
1786 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1787 \end_layout
1789 \begin_layout Standard
1790 Notes: 
1791 \end_layout
1793 \begin_layout Itemize
1794 Bit numbers up to 51 should work reliably (then things start falling apart
1795  due to double precision issues).
1796 \end_layout
1798 \begin_layout Itemize
1799 There are two special bit positions, true and false, standing for always
1800  set bit and always clear bit.
1801 \end_layout
1803 \begin_layout Subsubsection
1804 bit.value([number bit1[, number bit2,...]])
1805 \end_layout
1807 \begin_layout Standard
1808 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1809  places and so on.
1810  As special value, nil argument is no-op.
1811 \end_layout
1813 \begin_layout Subsection
1814 Table gui:
1815 \end_layout
1817 \begin_layout Standard
1818 Most of these functions can only be called in on_paint and on_video callbacks.
1819  Exceptions are noted.
1820 \end_layout
1822 \begin_layout Standard
1823 Colors are 32-bit.
1824  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1825  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1826  opaque, 255 is almost transparent).
1827  -1 is the fully transparent color.
1828  Alpha values greater than 127 do work.
1829 \end_layout
1831 \begin_layout Standard
1832 Origin of coordinates is at top left corner of game display area.
1833  Left and top gaps correspond to negative coordinates.
1834 \end_layout
1836 \begin_layout Subsubsection
1837 gui.resolution()
1838 \end_layout
1840 \begin_layout Standard
1841 Returns 2-tuple (hresolution, vresolution).
1842 \end_layout
1844 \begin_layout Subsubsection
1845 gui.<class>_gap(number gap)
1846 \end_layout
1848 \begin_layout Standard
1849 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1850  is 8191).
1851 \end_layout
1853 \begin_layout Subsubsection
1854 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1855 \end_layout
1857 \begin_layout Standard
1858 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1859  16 high).
1860  Parameters:
1861 \end_layout
1863 \begin_layout Itemize
1864 x: X-coordinate to start the drawing from (and x-coordinate at begining
1865  of the lines).
1866 \end_layout
1868 \begin_layout Itemize
1869 y: Y-coordinate to start the drawing from.
1870 \end_layout
1872 \begin_layout Itemize
1873 text: The text to draw.
1874 \end_layout
1876 \begin_layout Itemize
1877 fgc: Text color (default is 0xFFFFFF (white))
1878 \end_layout
1880 \begin_layout Itemize
1881 bgc: Background color (default is -1 (transparent))
1882 \end_layout
1884 \begin_layout Subsubsection
1885 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
1886 \end_layout
1888 \begin_layout Standard
1889 Like gui.text, but draw using double-width.
1890 \end_layout
1892 \begin_layout Subsubsection
1893 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
1894 \end_layout
1896 \begin_layout Standard
1897 Like gui.text, but draw using double-height.
1898 \end_layout
1900 \begin_layout Subsubsection
1901 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
1902 \end_layout
1904 \begin_layout Standard
1905 Like gui.text, but draw using double-width/double-height.
1906 \end_layout
1908 \begin_layout Subsubsection
1909 gui.rectangle(number x, number y, number width, number height[, number thickness[
1910 , number outline[, number fill]]])
1911 \end_layout
1913 \begin_layout Standard
1914 Draw rectangle on the GUI.
1915  Parameters:
1916 \end_layout
1918 \begin_layout Itemize
1919 x: X-coordinate of left edge.
1920 \end_layout
1922 \begin_layout Itemize
1923 y: Y-coordinate of upper edge.
1924 \end_layout
1926 \begin_layout Itemize
1927 width: Width of rectangle.
1928 \end_layout
1930 \begin_layout Itemize
1931 height: Height of rectangle.
1932 \end_layout
1934 \begin_layout Itemize
1935 thickness: Thickness of outline (default is 1).
1936 \end_layout
1938 \begin_layout Itemize
1939 outline: Color of outline (default is 0xFFFFFF (white))
1940 \end_layout
1942 \begin_layout Itemize
1943 fill: Color of fill (default is -1 (transparent))
1944 \end_layout
1946 \begin_layout Subsubsection
1947 gui.box(number x, number y, number width, number height[, number thickness[,
1948  number outline1[,number outline2[, number fill]]]])
1949 \end_layout
1951 \begin_layout Standard
1952 Draw rectangle with 3D effect on the GUI.
1953  Parameters:
1954 \end_layout
1956 \begin_layout Itemize
1957 x: X-coordinate of left edge.
1958 \end_layout
1960 \begin_layout Itemize
1961 y: Y-coordinate of upper edge.
1962 \end_layout
1964 \begin_layout Itemize
1965 width: Width of rectangle.
1966 \end_layout
1968 \begin_layout Itemize
1969 height: Height of rectangle.
1970 \end_layout
1972 \begin_layout Itemize
1973 thickness: Thickness of outline (default is 1).
1974 \end_layout
1976 \begin_layout Itemize
1977 outline1: First color of outline (default is 0xFFFFFF (white))
1978 \end_layout
1980 \begin_layout Itemize
1981 outline2: First color of outline (default is 0x808080 (dark gray))
1982 \end_layout
1984 \begin_layout Itemize
1985 fill: Color of fill (default is 0xC0C0C0 (light grayy))
1986 \end_layout
1988 \begin_layout Subsubsection
1989 gui.pixel(number x, number y[, number color])
1990 \end_layout
1992 \begin_layout Standard
1993 Draw one pixel on the GUI.
1994  Parameters:
1995 \end_layout
1997 \begin_layout Itemize
1998 x: X-coordinate of the pixel
1999 \end_layout
2001 \begin_layout Itemize
2002 y: Y-coordinate of the pixel
2003 \end_layout
2005 \begin_layout Itemize
2006 color: Color of the pixel (default is 0xFFFFFF (white))
2007 \end_layout
2009 \begin_layout Subsubsection
2010 gui.crosshair(number x, number y[, number length[, number color]])
2011 \end_layout
2013 \begin_layout Standard
2014 Draw a crosshair.
2015  Parameters:
2016 \end_layout
2018 \begin_layout Itemize
2019 x: X-coordinate of the crosshair
2020 \end_layout
2022 \begin_layout Itemize
2023 y: Y-coordinate of the crosshair
2024 \end_layout
2026 \begin_layout Itemize
2027 length: Length of the crosshair lines (default 10).
2028 \end_layout
2030 \begin_layout Itemize
2031 color: Color of the crosshair (default is 0xFFFFFF (white))
2032 \end_layout
2034 \begin_layout Subsubsection
2035 gui.line(number x1, number y1, number x2, number y2[, number color])
2036 \end_layout
2038 \begin_layout Standard
2039 Draw a thin line.
2040  Parameters:
2041 \end_layout
2043 \begin_layout Itemize
2044 x1: X-coordinate of one end.
2045 \end_layout
2047 \begin_layout Itemize
2048 y1: Y-coordinate of one end.
2049 \end_layout
2051 \begin_layout Itemize
2052 x2: X-coordinate of the other end.
2053 \end_layout
2055 \begin_layout Itemize
2056 y2: Y-coordinate of the other end.
2057 \end_layout
2059 \begin_layout Itemize
2060 color: Color of the line (default is 0xFFFFFF (white)).
2061 \end_layout
2063 \begin_layout Subsubsection
2064 gui.circle(number x, number y, number r[, number thick[, number border[,
2065  number fil]]])
2066 \end_layout
2068 \begin_layout Standard
2069 Draw a circle.
2070  Parameters.
2071 \end_layout
2073 \begin_layout Itemize
2074 x: X-coordinate of the center
2075 \end_layout
2077 \begin_layout Itemize
2078 y: Y-coordinate of the center
2079 \end_layout
2081 \begin_layout Itemize
2082 r: The radius of the circle
2083 \end_layout
2085 \begin_layout Itemize
2086 thick: Border thickness
2087 \end_layout
2089 \begin_layout Itemize
2090 border: Border color (default is 0xFFFFFF (white))
2091 \end_layout
2093 \begin_layout Itemize
2094 fill: Fill color (default is -1 (transparent)).
2095 \end_layout
2097 \begin_layout Subsubsection
2098 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2099 \end_layout
2101 \begin_layout Standard
2102 Draw a bitmap on screen with specified palette.
2103  Parameters:
2104 \end_layout
2106 \begin_layout Itemize
2107 x: X-coordinate of left edge.
2108 \end_layout
2110 \begin_layout Itemize
2111 y: Y-coordinate of top edge.
2112 \end_layout
2114 \begin_layout Itemize
2115 bitmap: The bitmap to draw
2116 \end_layout
2118 \begin_layout Itemize
2119 palette: The palette to draw the bitmap using.
2120 \end_layout
2122 \begin_layout Subsubsection
2123 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2124 \end_layout
2126 \begin_layout Standard
2127 Draw a bitmap on screen.
2128  Parameters:
2129 \end_layout
2131 \begin_layout Itemize
2132 x: X-coordinate of left edge.
2133 \end_layout
2135 \begin_layout Itemize
2136 y: Y-coordinate of top edge.
2137 \end_layout
2139 \begin_layout Itemize
2140 bitmap: The bitmap to draw
2141 \end_layout
2143 \begin_layout Subsubsection
2144 gui.palette_new()
2145 \end_layout
2147 \begin_layout Standard
2148 Returns a new palette (initially all transparent).
2149  Can be used anywhere.
2150 \end_layout
2152 \begin_layout Subsubsection
2153 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2154 \end_layout
2156 \begin_layout Standard
2157 Returns a new bitmap/dbitmap.
2158  Can be used anywhere.
2159  Parameters:
2160 \end_layout
2162 \begin_layout Itemize
2163 w: The width of new bitmap
2164 \end_layout
2166 \begin_layout Itemize
2167 h: The height of new bitmap
2168 \end_layout
2170 \begin_layout Itemize
2171 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2172 \end_layout
2174 \begin_layout Itemize
2175 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2176 \end_layout
2178 \begin_layout Subsubsection
2179 gui.bitmap_load(string file)
2180 \end_layout
2182 \begin_layout Standard
2183 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2184  for bitmap).
2185  Can be used anywhere.
2186  Parameters:
2187 \end_layout
2189 \begin_layout Itemize
2190 file: The name of file to load.
2191 \end_layout
2193 \begin_layout Subsubsection
2194 gui.palette_set(palette palette, number index, number color)
2195 \end_layout
2197 \begin_layout Standard
2198 Sets color in palette.
2199  Can be used anywhere.
2200  Parameters:
2201 \end_layout
2203 \begin_layout Itemize
2204 palette: The palette to manipulate
2205 \end_layout
2207 \begin_layout Itemize
2208 index: Index of color (0-65535).
2209 \end_layout
2211 \begin_layout Itemize
2212 color: The color value.
2213 \end_layout
2215 \begin_layout Subsubsection
2216 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2217 \end_layout
2219 \begin_layout Standard
2220 Sets specified pixel in bitmap.
2221  Can be used anywhere.
2222  Parameters:
2223 \end_layout
2225 \begin_layout Itemize
2226 bitmap: The bitmap to manipulate
2227 \end_layout
2229 \begin_layout Itemize
2230 x: The x-coordinate of the pixel.
2231 \end_layout
2233 \begin_layout Itemize
2234 y: The y-coordinate of the pixel.
2235 \end_layout
2237 \begin_layout Itemize
2238 color: If bitmap is a bitmap, color index (0-65535).
2239  Otherwise color value.
2240 \end_layout
2242 \begin_layout Subsubsection
2243 gui.bitmap_size(bitmap/dbitmap bitmap)
2244 \end_layout
2246 \begin_layout Standard
2247 Get size of bitmap.
2248  Can be used anywhere.
2249  Parameters:
2250 \end_layout
2252 \begin_layout Itemize
2253 bitmap: The bitmap to query.
2254 \end_layout
2256 \begin_layout Standard
2257 The first return is the width, the second is the height.
2258 \end_layout
2260 \begin_layout Subsubsection
2261 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2262  src, number sx, number sy, number w, number h[, number ck])
2263 \end_layout
2265 \begin_layout Standard
2266 Blit a part of bitmap to another.
2267  Can be used anywhere.
2268  Parameters:
2269 \end_layout
2271 \begin_layout Itemize
2272 dest: Destination to blit to.
2273 \end_layout
2275 \begin_layout Itemize
2276 dx: left edge of target
2277 \end_layout
2279 \begin_layout Itemize
2280 dy: Top edge of target
2281 \end_layout
2283 \begin_layout Itemize
2284 src: The source to blit from.
2285  Must be of the same type as destination.
2286 \end_layout
2288 \begin_layout Itemize
2289 sx: left edge of source
2290 \end_layout
2292 \begin_layout Itemize
2293 sy: Top edge of source
2294 \end_layout
2296 \begin_layout Itemize
2297 w: Width of region
2298 \end_layout
2300 \begin_layout Itemize
2301 h: Height of region.
2302 \end_layout
2304 \begin_layout Itemize
2305 ck: Color key.
2306  Pixels of this color are not blitted.
2307 \end_layout
2309 \begin_deeper
2310 \begin_layout Itemize
2311 If bitmaps are bitmaps, this is color index of colorkey.
2312  Values outside range 0-65535 cause no key to be used as colorkey.
2313 \end_layout
2315 \begin_layout Itemize
2316 If bitmaps are dbitmaps, this color value of colorkey.
2317 \end_layout
2319 \begin_layout Itemize
2320 May be absent or nil for no colorkey blit.
2321 \end_layout
2323 \end_deeper
2324 \begin_layout Subsubsection
2325 gui.repaint()
2326 \end_layout
2328 \begin_layout Standard
2329 Request on_repaint() to happen as soon as possible.
2330  Can be used anywhere.
2331 \end_layout
2333 \begin_layout Subsubsection
2334 gui.subframe_update(boolean on)
2335 \end_layout
2337 \begin_layout Standard
2338 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2339  or not happen (on=false).
2340  Can be used anywhere.
2341 \end_layout
2343 \begin_layout Subsubsection
2344 gui.screenshot(string filename)
2345 \end_layout
2347 \begin_layout Standard
2348 Write PNG screenshot of the current frame (no drawings) to specified file.
2349  Can be used anywhere.
2350 \end_layout
2352 \begin_layout Subsubsection
2353 gui.color(number r, number g, number b[, number a])
2354 \end_layout
2356 \begin_layout Standard
2357 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2358  each component in scale 0-255.
2359  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2360  opaque).
2361  The default alpha is 256.
2362 \end_layout
2364 \begin_layout Subsubsection
2365 gui.status(string name, string value)
2366 \end_layout
2368 \begin_layout Standard
2369 Set status field 
2370 \begin_inset Quotes eld
2371 \end_inset
2373 L[<name>]
2374 \begin_inset Quotes erd
2375 \end_inset
2377  to <value> in status area.
2378  Can be used anywhere.
2379 \end_layout
2381 \begin_layout Subsubsection
2382 gui.rainbow(number step, number steps[, number color])
2383 \end_layout
2385 \begin_layout Standard
2386 Perform hue rotation of color <color> (default bright red), by <step> steps.
2387  The number of steps per full rotation is given by absolute value of <steps>.
2388 \end_layout
2390 \begin_layout Standard
2391 If <steps> is negative, the rotation will be counterclockwise.
2392 \end_layout
2394 \begin_layout Subsubsection
2395 gui.screenshot(string filename)
2396 \end_layout
2398 \begin_layout Standard
2399 Saves a screenshot into specified file.
2400 \end_layout
2402 \begin_layout Subsection
2403 table input
2404 \end_layout
2406 \begin_layout Standard
2407 Input handling.
2408  Only available in on_input callback.
2409 \end_layout
2411 \begin_layout Subsubsection
2412 input.get(number controller, number index)
2413 \end_layout
2415 \begin_layout Standard
2416 Read the specified index (0-11) from specified controller (0-7).
2417  Notes:
2418 \end_layout
2420 \begin_layout Itemize
2421 Uses physical controller numbering.
2422  Gamepad in port 2 is controller 4, not 1!
2423 \end_layout
2425 \begin_layout Subsubsection
2426 input.set(number controller, number index, number value)
2427 \end_layout
2429 \begin_layout Standard
2430 Write the specified index (0-11) from specified controller (0-7), storing
2431  value.
2432  Notes:
2433 \end_layout
2435 \begin_layout Itemize
2436 Uses physical controller numbering.
2437  Gamepad in port 2 is controller 4, not 1!
2438 \end_layout
2440 \begin_layout Subsubsection
2441 input.geta(number controller)
2442 \end_layout
2444 \begin_layout Standard
2445 Get input state for entiere controller.
2446  Returns 13 return values.
2447 \end_layout
2449 \begin_layout Itemize
2450 1st return value: Bitmask: bit i is set if i:th index is nonzero
2451 \end_layout
2453 \begin_layout Itemize
2454 2nd-13th return value: value of i:th index.
2455 \end_layout
2457 \begin_layout Subsubsection
2458 input.seta(number controller, number bitmask, number args...)
2459 \end_layout
2461 \begin_layout Standard
2462 Set state for entiere controller.
2463  args is up to 12 values for indices (overriding values in bitmask if specified).
2464 \end_layout
2466 \begin_layout Subsubsection
2467 input.controllertype(number controller)
2468 \end_layout
2470 \begin_layout Standard
2471 Get the type of controller as string.
2472  Valid values are:
2473 \end_layout
2475 \begin_layout Itemize
2476 gamepad
2477 \end_layout
2479 \begin_layout Itemize
2480 mouse
2481 \end_layout
2483 \begin_layout Itemize
2484 justifier
2485 \end_layout
2487 \begin_layout Itemize
2488 superscope
2489 \end_layout
2491 \begin_layout Subsubsection
2492 input.reset([number cycles])
2493 \end_layout
2495 \begin_layout Standard
2496 Execute reset.
2497  If cycles is greater than zero, do delayed reset.
2498  0 (or no value) causes immediate reset.
2499 \end_layout
2501 \begin_layout Itemize
2502 Only available with subframe flag false.
2503 \end_layout
2505 \begin_layout Subsubsection
2506 input.raw()
2507 \end_layout
2509 \begin_layout Standard
2510 Returns table of tables of all available keys and axes.
2511  The first table is indexed by key name (platform-dependent!), and the inner
2512  table has the following fields:
2513 \end_layout
2515 \begin_layout Itemize
2516 value: Last reported value for control
2517 \end_layout
2519 \begin_deeper
2520 \begin_layout Itemize
2521 For keys: 1 for pressed, 0 for released.
2522 \end_layout
2524 \begin_layout Itemize
2525 For axes: -32767...32767.
2526 \end_layout
2528 \begin_layout Itemize
2529 For presure-sensitive buttons: 0...32767.
2530 \end_layout
2532 \begin_layout Itemize
2533 For hats: Bitmask: 1=>Up, 2=>Right, 4=>Down, 8=>Left.
2534 \end_layout
2536 \begin_layout Itemize
2537 For mouse: Coordinates relative to game area.
2538 \end_layout
2540 \end_deeper
2541 \begin_layout Itemize
2542 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2543  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2544 \end_layout
2546 \begin_layout Subsubsection
2547 input.keyhook(string key, boolean state)
2548 \end_layout
2550 \begin_layout Standard
2551 Requests that keyhook events to be sent for key (state=true) or not sent
2552  (state=false).
2553 \end_layout
2555 \begin_layout Subsubsection
2556 input.joyget(number controller)
2557 \end_layout
2559 \begin_layout Standard
2560 Returns table for current controls for specified controller.
2561  The names of fields vary by controller type.
2562 \end_layout
2564 \begin_layout Itemize
2565 The buttons have the same name as those are referred to in other contexts
2566  in the emulator
2567 \end_layout
2569 \begin_layout Itemize
2570 The analog axes are 
2571 \begin_inset Quotes eld
2572 \end_inset
2574 xaxis
2575 \begin_inset Quotes erd
2576 \end_inset
2578  and 
2579 \begin_inset Quotes eld
2580 \end_inset
2582 yaxis
2583 \begin_inset Quotes erd
2584 \end_inset
2587 \end_layout
2589 \begin_layout Subsubsection
2590 input.joyset(number controller, table controls)
2591 \end_layout
2593 \begin_layout Standard
2594 Set the the state of specified controller to values specified in specified
2595  table.
2596 \end_layout
2598 \begin_layout Subsubsection
2599 input.lcid_to_pcid(number controller)
2600 \end_layout
2602 \begin_layout Standard
2603 Return the physical index, physical port and controller number in port for
2604  specified (1-based) logical controller.
2605 \end_layout
2607 \begin_layout Subsection
2608 Table subtitle
2609 \end_layout
2611 \begin_layout Standard
2612 Subtitle handling
2613 \end_layout
2615 \begin_layout Subsubsection
2616 subtitle.byindex(number i)
2617 \end_layout
2619 \begin_layout Standard
2620 Read the frame and length of ith subtitle.
2621  Returns nothing if not present.
2622 \end_layout
2624 \begin_layout Subsubsection
2625 subtitle.set(number f, number l, string txt)
2626 \end_layout
2628 \begin_layout Standard
2629 Set the text of subtitle.
2630 \end_layout
2632 \begin_layout Subsubsection
2633 subtitle.get(number f, number l)
2634 \end_layout
2636 \begin_layout Standard
2637 Get the text of subtitle.
2638 \end_layout
2640 \begin_layout Subsubsection
2641 subtitle.delete(number f, number l)
2642 \end_layout
2644 \begin_layout Standard
2645 Delete specified subtitle.
2646 \end_layout
2648 \begin_layout Subsection
2649 Table hostmemory
2650 \end_layout
2652 \begin_layout Standard
2653 Host memory handling (extra memory saved to savestates).
2654  Host memory starts empty.
2655 \end_layout
2657 \begin_layout Subsubsection
2658 hostmemory.read(number address)
2659 \end_layout
2661 \begin_layout Standard
2662 Reads hostmemory slot address.
2663  Slot numbers out of range return false instead of numeric.
2664 \end_layout
2666 \begin_layout Subsubsection
2667 hostmemory.write(number address, number value)
2668 \end_layout
2670 \begin_layout Standard
2671 Writes hostmemory slot with 0-255.
2672  Slot numbers out of range cause extension of host memory slot space.
2673 \end_layout
2675 \begin_layout Subsubsection
2676 hostmemory.readbyte(number address)
2677 \end_layout
2679 \begin_layout Standard
2680 Read unsigned byte (1 element) from given address.
2681  Slots out of range return false.
2682 \end_layout
2684 \begin_layout Subsubsection
2685 hostmemory.writebyte(number address, number value)
2686 \end_layout
2688 \begin_layout Standard
2689 Write unsigned byte (1 element) to given slot.
2690  Slot numbers out of range cause extension.
2691 \end_layout
2693 \begin_layout Subsubsection
2694 hostmemory.readsbyte(number address)
2695 \end_layout
2697 \begin_layout Standard
2698 Read signed byte (1 element) from given address.
2699  Slots out of range return false.
2700 \end_layout
2702 \begin_layout Subsubsection
2703 hostmemory.writesbyte(number address, number value)
2704 \end_layout
2706 \begin_layout Standard
2707 Write signed byte (1 element) to given slot.
2708  Slot numbers out of range cause extension.
2709 \end_layout
2711 \begin_layout Subsubsection
2712 hostmemory.readword(number address)
2713 \end_layout
2715 \begin_layout Standard
2716 Read unsigned word (2 elements) from given address.
2717  Slots out of range return false.
2718 \end_layout
2720 \begin_layout Subsubsection
2721 hostmemory.writeword(number address, number value)
2722 \end_layout
2724 \begin_layout Standard
2725 Write unsigned word (2 elements) to given slot.
2726  Slot numbers out of range cause extension.
2727 \end_layout
2729 \begin_layout Subsubsection
2730 hostmemory.readsword(number address)
2731 \end_layout
2733 \begin_layout Standard
2734 Read signed word (2 elements) from given address.
2735  Slots out of range return false.
2736 \end_layout
2738 \begin_layout Subsubsection
2739 hostmemory.writesword(number address, number value)
2740 \end_layout
2742 \begin_layout Standard
2743 Write signed word (2 elements) to given slot.
2744  Slot numbers out of range cause extension.
2745 \end_layout
2747 \begin_layout Subsubsection
2748 hostmemory.readdword(number address)
2749 \end_layout
2751 \begin_layout Standard
2752 Read unsigned doubleword (4 elements) from given address.
2753  Slots out of range return false.
2754 \end_layout
2756 \begin_layout Subsubsection
2757 hostmemory.writedword(number address, number value)
2758 \end_layout
2760 \begin_layout Standard
2761 Write unsigned doubleword (4 elements) to given slot.
2762  Slot numbers out of range cause extension.
2763 \end_layout
2765 \begin_layout Subsubsection
2766 hostmemory.readsdword(number address)
2767 \end_layout
2769 \begin_layout Standard
2770 Read signed doubleword (4 elements) from given address.
2771  Slots out of range return false.
2772 \end_layout
2774 \begin_layout Subsubsection
2775 hostmemory.writesdword(number address, number value)
2776 \end_layout
2778 \begin_layout Standard
2779 Write signed doubleword (4 elements) to given slot.
2780  Slot numbers out of range cause extension.
2781 \end_layout
2783 \begin_layout Subsubsection
2784 hostmemory.readqword(number address)
2785 \end_layout
2787 \begin_layout Standard
2788 Read unsigned quadword (8 elements) from given address.
2789  Slots out of range return false.
2790 \end_layout
2792 \begin_layout Subsubsection
2793 hostmemory.writeqword(number address, number value)
2794 \end_layout
2796 \begin_layout Standard
2797 Write unsigned quadword (4 elements) to given slot.
2798  Slot numbers out of range cause extension.
2799 \end_layout
2801 \begin_layout Subsubsection
2802 hostmemory.readsqword(number address)
2803 \end_layout
2805 \begin_layout Standard
2806 Read signed quadword (8 elements) from given address.
2807  Slots out of range return false.
2808 \end_layout
2810 \begin_layout Subsubsection
2811 hostmemory.writesqword(number address, number value)
2812 \end_layout
2814 \begin_layout Standard
2815 Write signed quadword (8 elements) to given slot.
2816  Slot numbers out of range cause extension.
2817 \end_layout
2819 \begin_layout Subsection
2820 Table movie
2821 \end_layout
2823 \begin_layout Standard
2824 Movie handling
2825 \end_layout
2827 \begin_layout Subsubsection
2828 movie.currentframe()
2829 \end_layout
2831 \begin_layout Standard
2832 Return number of current frame.
2833 \end_layout
2835 \begin_layout Subsubsection
2836 movie.framecount()
2837 \end_layout
2839 \begin_layout Standard
2840 Return number of frames in movie.
2841 \end_layout
2843 \begin_layout Subsubsection
2844 movie.readonly()
2845 \end_layout
2847 \begin_layout Standard
2848 Return true if in readonly mode, false if in readwrite.
2849 \end_layout
2851 \begin_layout Subsubsection
2852 movie.rerecords()
2853 \end_layout
2855 \begin_layout Standard
2856 Returns the current value of rerecord count.
2857 \end_layout
2859 \begin_layout Subsubsection
2860 movie.set_readwrite()
2861 \end_layout
2863 \begin_layout Standard
2864 Set readwrite mode (does not cause on_readwrite callback).
2865 \end_layout
2867 \begin_layout Subsubsection
2868 movie.frame_subframes(number frame)
2869 \end_layout
2871 \begin_layout Standard
2872 Count number of subframes in specified frame (frame numbers are 1-based)
2873  and return that.
2874 \end_layout
2876 \begin_layout Subsubsection
2877 movie.read_subframe(number frame, number subframe)
2878 \end_layout
2880 \begin_layout Standard
2881 Read specifed subframe in specified frame and return data as array (100
2882  elements, numbered 0-99 currently).
2883 \end_layout
2885 \begin_layout Subsubsection
2886 movie.read_rtc()
2887 \end_layout
2889 \begin_layout Standard
2890 Returns the current value of the RTC as a pair (second, subsecond).
2891 \end_layout
2893 \begin_layout Subsubsection
2894 movie.unsafe_rewind([UNSAFEREWIND state])
2895 \end_layout
2897 \begin_layout Standard
2898 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2899 \end_layout
2901 \begin_layout Itemize
2902 If called without argument, causes emulator to start process of setting
2903  unsafe rewind point.
2904  When this has finished, callback on_set_rewind occurs, passing the rewind
2905  state to lua script.
2906 \end_layout
2908 \begin_layout Itemize
2909 If called with argument, causes emulator rewind to passed rewind point as
2910  soon as possible.
2911  Readwrite mode is implicitly activated.
2912 \end_layout
2914 \begin_layout Standard
2915 The following warnings apply to unsafe rewinding:
2916 \end_layout
2918 \begin_layout Itemize
2919 There are no safety checks against misuse (that's what 
2920 \begin_inset Quotes eld
2921 \end_inset
2923 unsafe
2924 \begin_inset Quotes erd
2925 \end_inset
2927  comes from)!
2928 \end_layout
2930 \begin_layout Itemize
2931 Only call rewind from timeline rewind point was set from.
2932 \end_layout
2934 \begin_layout Itemize
2935 Only call rewind from after the rewind point was set.
2936 \end_layout
2938 \begin_layout Subsection
2939 Table settings
2940 \end_layout
2942 \begin_layout Standard
2943 Routines for settings manipulation
2944 \end_layout
2946 \begin_layout Subsubsection
2947 settings.get(string name)
2948 \end_layout
2950 \begin_layout Standard
2951 Get value of setting.
2952  If setting is blank, returns false.
2953  If setting value can't be obtained, returns (nil, error message).
2954 \end_layout
2956 \begin_layout Subsubsection
2957 settings.set(string name, string value)
2958 \end_layout
2960 \begin_layout Standard
2961 Set value of setting.
2962  If setting can't be set, returns (nil, error message).
2963 \end_layout
2965 \begin_layout Subsubsection
2966 settings.is_set(string name)
2967 \end_layout
2969 \begin_layout Standard
2970 Returns if setting is set.
2971  If setting does not exist, returns (nil, error message).
2972 \end_layout
2974 \begin_layout Subsubsection
2975 settings.blank(string name)
2976 \end_layout
2978 \begin_layout Standard
2979 Blanks a setting and returns true.
2980  If setting can't be blanked, returns (nil, error message).
2981 \end_layout
2983 \begin_layout Subsection
2984 Table memory
2985 \end_layout
2987 \begin_layout Standard
2988 Contains various functions for managing memory
2989 \end_layout
2991 \begin_layout Subsubsection
2992 memory.vma_count()
2993 \end_layout
2995 \begin_layout Standard
2996 Returns the number of VMAs
2997 \end_layout
2999 \begin_layout Subsubsection
3000 memory.read_vma(number index)
3001 \end_layout
3003 \begin_layout Standard
3004 Reads the specified VMA (indices start from zero).
3005  Trying to read invalid VMA gives nil.
3006  The read VMA is table with the following fields:
3007 \end_layout
3009 \begin_layout Itemize
3010 region_name (string): The readable name of the VMA
3011 \end_layout
3013 \begin_layout Itemize
3014 baseaddr (number): Base address of the VMA
3015 \end_layout
3017 \begin_layout Itemize
3018 lastaddr (number): Last address in the VMA.
3019 \end_layout
3021 \begin_layout Itemize
3022 size (number): The size of VMA in bytes.
3023 \end_layout
3025 \begin_layout Itemize
3026 readonly (boolean): True of the VMA corresponds to ROM.
3027 \end_layout
3029 \begin_layout Itemize
3030 iospace (boolean): True if the VMA is I/O space.
3031 \end_layout
3033 \begin_layout Itemize
3034 native_endian (boolean): True if the VMA has native endian as opposed to
3035  little endian.
3036 \end_layout
3038 \begin_layout Subsubsection
3039 memory.find_vma(number address)
3040 \end_layout
3042 \begin_layout Standard
3043 Finds the VMA containing specified address.
3044  Returns table in the same format as read_vma or nil if not found.
3045 \end_layout
3047 \begin_layout Subsubsection
3048 memory.readbyte(number address)
3049 \end_layout
3051 \begin_layout Standard
3052 Reads the specified address as unsigned byte and returns the result.
3053 \end_layout
3055 \begin_layout Subsubsection
3056 memory.readsbyte(number address)
3057 \end_layout
3059 \begin_layout Standard
3060 Reads the specified address as signed byte and returns the result.
3061 \end_layout
3063 \begin_layout Subsubsection
3064 memory.writebyte(number address, number value)
3065 \end_layout
3067 \begin_layout Standard
3068 Writes the specified value (negative values undergo 2's complement) to specified
3069  address (as a byte).
3070 \end_layout
3072 \begin_layout Subsubsection
3073 memory.readword(number address)
3074 \end_layout
3076 \begin_layout Standard
3077 Reads the specified address as unsigned word and returns the result.
3078 \end_layout
3080 \begin_layout Subsubsection
3081 memory.readsword(number address)
3082 \end_layout
3084 \begin_layout Standard
3085 Reads the specified address as signed word and returns the result.
3086 \end_layout
3088 \begin_layout Subsubsection
3089 memory.writeword(number address, number value)
3090 \end_layout
3092 \begin_layout Standard
3093 Writes the specified value (negative values undergo 2's complement) to specified
3094  address (as a word).
3095 \end_layout
3097 \begin_layout Subsubsection
3098 memory.readdword(number address)
3099 \end_layout
3101 \begin_layout Standard
3102 Reads the specified address as unsigned doubleword and returns the result.
3103 \end_layout
3105 \begin_layout Subsubsection
3106 memory.readsdword(number address)
3107 \end_layout
3109 \begin_layout Standard
3110 Reads the specified address as signed doubleword and returns the result.
3111 \end_layout
3113 \begin_layout Subsubsection
3114 memory.writedword(number address, number value)
3115 \end_layout
3117 \begin_layout Standard
3118 Writes the specified value (negative values undergo 2's complement) to specified
3119  address (as a doubleword).
3120 \end_layout
3122 \begin_layout Subsubsection
3123 memory.readqword(number address)
3124 \end_layout
3126 \begin_layout Standard
3127 Reads the specified address as unsigned quadword and returns the result.
3128 \end_layout
3130 \begin_layout Subsubsection
3131 memory.readsqword(number address)
3132 \end_layout
3134 \begin_layout Standard
3135 Reads the specified address as signed quadword and returns the result.
3136 \end_layout
3138 \begin_layout Subsubsection
3139 memory.writeqword(number address, number value)
3140 \end_layout
3142 \begin_layout Standard
3143 Writes the specified value (negative values undergo 2's complement) to specified
3144  address (as a quadword).
3145 \end_layout
3147 \begin_layout Subsubsection
3148 memory.hash_region(number base, number size)
3149 \end_layout
3151 \begin_layout Standard
3152 Hash specified number of bytes starting from specified address and return
3153  the SHA-256.
3154 \end_layout
3156 \begin_layout Subsubsection
3157 memory.hash_state()
3158 \end_layout
3160 \begin_layout Standard
3161 Hash the current system state.
3162  Mainly useful for debugging savestates.
3163 \end_layout
3165 \begin_layout Subsubsection
3166 memory.readregion(number base, number size)
3167 \end_layout
3169 \begin_layout Standard
3170 Read a region of memory.
3171 \end_layout
3173 \begin_layout Itemize
3174 Warning: If the region crosses VMA boundary, the results are undefined.
3175 \end_layout
3177 \begin_layout Subsubsection
3178 memory.map<type>([number base, number size])
3179 \end_layout
3181 \begin_layout Standard
3182 Returns a table mapping specified memory aperture for read/write.
3183  If parameters are omitted, entiere map space is the aperture.
3184 \end_layout
3186 \begin_layout Itemize
3187 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3188 \end_layout
3190 \begin_layout Subsubsection
3191 memory.writeregion(number base, number size, table data)
3192 \end_layout
3194 \begin_layout Standard
3195 Write a region of memory.
3196 \end_layout
3198 \begin_layout Itemize
3199 Warning: If the region crosses VMA boundary, the results are undefined.
3200 \end_layout
3202 \begin_layout Subsubsection
3203 memory.map_struct()
3204 \end_layout
3206 \begin_layout Standard
3207 Returns a new mapping structure (MMAP_STRUCT)
3208 \end_layout
3210 \begin_layout Subsubsection
3211 MMAP_STRUCT(string key, number address, string type)
3212 \end_layout
3214 \begin_layout Standard
3215 Bind key in mmap structure to specified address with specified type.
3216 \end_layout
3218 \begin_layout Itemize
3219 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3220 \end_layout
3222 \begin_layout Subsubsection
3223 memory.read_expr(string expr)
3224 \end_layout
3226 \begin_layout Standard
3227 Evaluate specified watch expression and return result
3228 \end_layout
3230 \begin_layout Subsection
3231 Table subtitle
3232 \end_layout
3234 \begin_layout Standard
3235 Contains functions for manipulating subtitles.
3236 \end_layout
3238 \begin_layout Subsubsection
3239 subtitle.byindex(number index)
3240 \end_layout
3242 \begin_layout Standard
3243 Get (basetime, length) pair of specified subtitle index or nothing if index
3244  isn't valid.
3245 \end_layout
3247 \begin_layout Subsubsection
3248 subtitle.get(number basetime, number length)
3249 \end_layout
3251 \begin_layout Standard
3252 Read the specified subtitle.
3253  Returns 
3254 \begin_inset Quotes eld
3255 \end_inset
3258 \begin_inset Quotes erd
3259 \end_inset
3261  if the subtitle does not exist.
3262 \end_layout
3264 \begin_layout Subsubsection
3265 subtitle.set(number basetime, number length, string content)
3266 \end_layout
3268 \begin_layout Standard
3269 Set the specified subtitle.
3270 \end_layout
3272 \begin_layout Subsubsection
3273 subtitle.deltete(number basetime, number length)
3274 \end_layout
3276 \begin_layout Standard
3277 Delete the specified subtitle.
3278 \end_layout
3280 \begin_layout Subsection
3281 Table _SYSTEM
3282 \end_layout
3284 \begin_layout Standard
3285 Contains copy of global variables from time of Lua initialization.
3286  Non-writeable.
3287 \end_layout
3289 \begin_layout Subsection
3290 Callbacks
3291 \end_layout
3293 \begin_layout Standard
3294 Various callbacks to Lua that can occur.
3295 \end_layout
3297 \begin_layout Subsubsection
3298 Callback: on_paint(bool not_synth)
3299 \end_layout
3301 \begin_layout Standard
3302 Called when screen is being painted.
3303  Any gui.* calls requiring graphic context draw on the screen.
3304 \end_layout
3306 \begin_layout Standard
3307 not_synth is true if this hook is being called in response to received frame,
3308  false otherwise.
3309 \end_layout
3311 \begin_layout Subsubsection
3312 Callback: on_video()
3313 \end_layout
3315 \begin_layout Standard
3316 Called when video dump frame is being painted.
3317  Any gui.* calls requiring graphic context draw on the video.
3318 \end_layout
3320 \begin_layout Subsubsection
3321 Callback: on_frame_emulated()
3322 \end_layout
3324 \begin_layout Standard
3325 Called when emulating frame has completed and on_paint()/on_video() calls
3326  are about to be issued.
3327 \end_layout
3329 \begin_layout Subsubsection
3330 Callback: on_frame()
3331 \end_layout
3333 \begin_layout Standard
3334 Called on each starting whole frame.
3335 \end_layout
3337 \begin_layout Subsubsection
3338 Callback: on_startup()
3339 \end_layout
3341 \begin_layout Standard
3342 Called when the emulator is starting (lsnes.rc and --run files has been run).
3343 \end_layout
3345 \begin_layout Subsubsection
3346 Callback: on_rewind()
3347 \end_layout
3349 \begin_layout Standard
3350 Called when rewind movie to beginning has completed.
3351 \end_layout
3353 \begin_layout Subsubsection
3354 Callback: on_pre_load(string name)
3355 \end_layout
3357 \begin_layout Standard
3358 Called just before savestate/movie load occurs (note: loads are always delayed,
3359  so this occurs even when load was initiated by lua).
3360 \end_layout
3362 \begin_layout Subsubsection
3363 Callback: on_err_load(string name)
3364 \end_layout
3366 \begin_layout Standard
3367 Called if loadstate goes wrong.
3368 \end_layout
3370 \begin_layout Subsubsection
3371 Callback: on_post_load(string name, boolean was_savestate)
3372 \end_layout
3374 \begin_layout Standard
3375 Called on successful loadstate.
3376  was_savestate gives if this was a savestate or a movie.
3377 \end_layout
3379 \begin_layout Subsubsection
3380 Callback: on_pre_save(string name, boolean is_savestate)
3381 \end_layout
3383 \begin_layout Standard
3384 Called just before savestate save occurs (note: movie saves are synchronous
3385  and won't trigger these callbacks if called from Lua).
3386 \end_layout
3388 \begin_layout Subsubsection
3389 Callback: on_err_save(string name)
3390 \end_layout
3392 \begin_layout Standard
3393 Called if savestate goes wrong.
3394 \end_layout
3396 \begin_layout Subsubsection
3397 Callback: on_post_save(string name, boolean is_savestate)
3398 \end_layout
3400 \begin_layout Standard
3401 Called on successful savaestate.
3402  is_savestate gives if this was a savestate or a movie.
3403 \end_layout
3405 \begin_layout Subsubsection
3406 Callback: on_quit()
3407 \end_layout
3409 \begin_layout Standard
3410 Called when emulator is shutting down.
3411 \end_layout
3413 \begin_layout Subsubsection
3414 Callback: on_input(boolean subframe)
3415 \end_layout
3417 \begin_layout Standard
3418 Called when emulator is just sending input to bsnes core.
3419  Warning: This is called even in readonly mode, but the results are ignored.
3420 \end_layout
3422 \begin_layout Subsubsection
3423 Callback: on_reset()
3424 \end_layout
3426 \begin_layout Standard
3427 Called when SNES is reset.
3428 \end_layout
3430 \begin_layout Subsubsection
3431 Callback: on_readwrite()
3432 \end_layout
3434 \begin_layout Standard
3435 Called when moving into readwrite mode as result of 
3436 \begin_inset Quotes eld
3437 \end_inset
3439 set-rwmode
3440 \begin_inset Quotes erd
3441 \end_inset
3443  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3444  entry protection).
3445 \end_layout
3447 \begin_layout Subsubsection
3448 Callback: on_snoop(number port, number controller, number index, number
3449  value)
3450 \end_layout
3452 \begin_layout Standard
3453 Called each time bsnes asks for input.
3454  The value is the final value to be sent to bsnes core (readonly mode, autohold
3455  and autofire have been taken into account).
3456  Might be useful when translating movies to format suitable for console
3457  verification.
3458  Note: There is no way to modify the value to be sent.
3459 \end_layout
3461 \begin_layout Subsubsection
3462 Callback: on_keyhook(string keyname, table state)
3463 \end_layout
3465 \begin_layout Standard
3466 Sent when key that has keyhook events requested changes state.
3467  Keyname is name of the key (group) and state is the state (same kind as
3468  table values in input.raw).
3469 \end_layout
3471 \begin_layout Subsubsection
3472 Callback: on_idle()
3473 \end_layout
3475 \begin_layout Standard
3476 Called when requested by set_idle_timeout(), the timeout has expired and
3477  emulator is waiting.
3478 \end_layout
3480 \begin_layout Subsubsection
3481 Callback: on_timer()
3482 \end_layout
3484 \begin_layout Standard
3485 Called when requested by set_idle_timeout() and the timeout has expired
3486  (regardless if emulator is waiting).
3487 \end_layout
3489 \begin_layout Subsubsection
3490 Callback: on_set_rewind(UNSAFEREWIND r)
3491 \end_layout
3493 \begin_layout Standard
3494 Called when unsafe rewind object has been constructed.
3495 \end_layout
3497 \begin_layout Subsubsection
3498 Callback: on_pre_rewind() 
3499 \end_layout
3501 \begin_layout Standard
3502 Called just before unsafe rewind is about to occur.
3503 \end_layout
3505 \begin_layout Subsubsection
3506 Callback: on_post_rewind() 
3507 \end_layout
3509 \begin_layout Standard
3510 Called just after unsafe rewind has occured.
3511 \end_layout
3513 \begin_layout Section
3514 Memory watch expression syntax
3515 \end_layout
3517 \begin_layout Standard
3518 Memory watch expressions are in RPN (Reverse Polish Notation).
3519  At the end of expression, the top entry on stack is taken as the final
3520  result.
3521 \end_layout
3523 \begin_layout Standard
3524 Notations:
3525 \end_layout
3527 \begin_layout Itemize
3528 Evaluation order is strictly left to right.
3529 \end_layout
3531 \begin_layout Itemize
3532 a is the entry on top of stack
3533 \end_layout
3535 \begin_layout Itemize
3536 b is the entry immediately below top of stack
3537 \end_layout
3539 \begin_layout Itemize
3540 ; separates values to be pushed (no intermediate pop).
3541 \end_layout
3543 \begin_layout Itemize
3544 After end of element, all used stack slots are popped and all results are
3545  pushed.
3546 \end_layout
3548 \begin_layout Itemize
3549 When pushing multiple values, the pushes occur in order shown.
3550 \end_layout
3552 \begin_layout Standard
3553 The following operators are available:
3554 \end_layout
3556 \begin_layout Itemize
3557 + : a + b
3558 \end_layout
3560 \begin_layout Itemize
3561 - : a - b
3562 \end_layout
3564 \begin_layout Itemize
3565 * : a * b
3566 \end_layout
3568 \begin_layout Itemize
3569 / : a / b
3570 \end_layout
3572 \begin_layout Itemize
3573 % : a % b
3574 \end_layout
3576 \begin_layout Itemize
3577 a : atan(a)
3578 \end_layout
3580 \begin_layout Itemize
3581 b : read_signed_byte(a)
3582 \end_layout
3584 \begin_layout Itemize
3585 c : cos(a)
3586 \end_layout
3588 \begin_layout Itemize
3589 d : read_signed_dword(a)
3590 \end_layout
3592 \begin_layout Itemize
3593 i : quotent(a / b)
3594 \end_layout
3596 \begin_layout Itemize
3597 p :
3598 \begin_inset Formula $\pi$
3599 \end_inset
3602 \end_layout
3604 \begin_layout Itemize
3605 q : read_signed_qword(a)
3606 \end_layout
3608 \begin_layout Itemize
3609 r : sqrt(a)
3610 \end_layout
3612 \begin_layout Itemize
3613 s : sin(a)
3614 \end_layout
3616 \begin_layout Itemize
3617 t : tan(a)
3618 \end_layout
3620 \begin_layout Itemize
3621 u : a; a
3622 \end_layout
3624 \begin_layout Itemize
3625 w : read_signed_word(a)
3626 \end_layout
3628 \begin_layout Itemize
3629 A : atan2(a, b)
3630 \end_layout
3632 \begin_layout Itemize
3633 B : read_unsigned_byte(a)
3634 \end_layout
3636 \begin_layout Itemize
3637 C<number>z : Push number <number> to stack.
3638 \end_layout
3640 \begin_layout Itemize
3641 D : read_unsigned_dword(a)
3642 \end_layout
3644 \begin_layout Itemize
3645 C0x<number>z : Push number <number> (hexadecimal) to stack.
3646 \end_layout
3648 \begin_layout Itemize
3649 Q : read_unsigned_qword(a)
3650 \end_layout
3652 \begin_layout Itemize
3653 R<digit> : round a to <digit> digits.
3654 \end_layout
3656 \begin_layout Itemize
3657 W : read_unsigned_word(a)
3658 \end_layout
3660 \begin_layout Subsection
3661 Example:
3662 \end_layout
3664 \begin_layout Standard
3665 C0x007e0878zWC0x007e002czW-
3666 \end_layout
3668 \begin_layout Enumerate
3669 Push value 0x7e0878 on top of stack (C0x007e0878z).
3670 \end_layout
3672 \begin_layout Enumerate
3673 Pop the value on top of stack (0x7e0878), read word value at that address
3674  and push the result,call it x1 (W).
3675 \end_layout
3677 \begin_layout Enumerate
3678 Push value 0x7e002c on top of stack (C0x007e002cz).
3679 \end_layout
3681 \begin_layout Enumerate
3682 Pop the value on top of stack (0x7e002c), read word value at that address
3683  and push the result,call it x2 (W).
3684 \end_layout
3686 \begin_layout Enumerate
3687 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3688  x2 - x1 (-).
3689 \end_layout
3691 \begin_layout Enumerate
3692 Since the expression ends, the final memory watch result is the top one
3693  on stack, which is x2 - x1.
3694 \end_layout
3696 \begin_layout Section
3697 Modifier and key names:
3698 \end_layout
3700 \begin_layout Subsection
3701 SDL Platform
3702 \end_layout
3704 \begin_layout Subsubsection
3705 Modifier names
3706 \end_layout
3708 \begin_layout Standard
3709 Following modifier names are known:
3710 \end_layout
3712 \begin_layout Itemize
3713 ctrl, lctrl, rctrl: Control keys
3714 \end_layout
3716 \begin_layout Itemize
3717 alt, lalt, ralt: ALT keys.
3718 \end_layout
3720 \begin_layout Itemize
3721 shift, lshift, rshift: Shift keys.
3722 \end_layout
3724 \begin_layout Itemize
3725 meta, lmeta, rmeta: Meta keys.
3726 \end_layout
3728 \begin_layout Itemize
3729 num, caps: Numlock/Capslock (these are sticky!)
3730 \end_layout
3732 \begin_layout Itemize
3733 mode: Mode select.
3734 \end_layout
3736 \begin_layout Subsubsection
3737 Key names
3738 \end_layout
3740 \begin_layout Standard
3741 Following key names are known:
3742 \end_layout
3744 \begin_layout Itemize
3745 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3746  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3747  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3748  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3749  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3750  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3751  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3752  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3753  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3754  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3755  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3756  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3757  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3758  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3759  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3760  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3761  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3762  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3763  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3764  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3765  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3766  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3767  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3768  break, menu, power, euro, undo
3769 \end_layout
3771 \begin_layout Itemize
3772 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3773  hardware-dependent scan code of <n> (useful to bind those keys that don't
3774  have symbolic names).
3775 \end_layout
3777 \begin_layout Subsubsection
3778 Joystick pseudo-keys:
3779 \end_layout
3781 \begin_layout Itemize
3782 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3783 \end_layout
3785 \begin_layout Itemize
3786 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3787 \end_layout
3789 \begin_layout Itemize
3790 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3791 \end_layout
3793 \begin_layout Itemize
3794 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3795 \end_layout
3797 \begin_layout Itemize
3798 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3799 \end_layout
3801 \begin_layout Itemize
3802 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3803  position (axis modes axis and axis_inverse).
3804 \end_layout
3806 \begin_layout Itemize
3807 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3808  position (axis modes axis and axis_inverse).
3809 \end_layout
3811 \begin_layout Itemize
3812 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3813  modes pressure_*).
3814 \end_layout
3816 \begin_layout Subsubsection
3817 Special buttons:
3818 \end_layout
3820 \begin_layout Itemize
3821 Escape: Enter/Exit Command mode, cancel modal dialogs.
3822 \end_layout
3824 \begin_layout Itemize
3825 Return (also KPEnter): Execute command, ok modal dialog.
3826 \end_layout
3828 \begin_layout Itemize
3829 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3830  in command history
3831 \end_layout
3833 \begin_layout Itemize
3834 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3835  in command history
3836 \end_layout
3838 \begin_layout Itemize
3839 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3840 \end_layout
3842 \begin_layout Itemize
3843 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3844 \end_layout
3846 \begin_layout Itemize
3847 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3848 \end_layout
3850 \begin_layout Itemize
3851 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3852 \end_layout
3854 \begin_layout Itemize
3855 Delete (also KP.
3856  if no num lock; command mode): Delete character to right of cursor.
3857 \end_layout
3859 \begin_layout Itemize
3860 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3861  overwrite modes.
3862 \end_layout
3864 \begin_layout Itemize
3865 Backspace (command mode): Delete character to left of cursor.
3866 \end_layout
3868 \begin_layout Itemize
3869 CTRL+LEFT (also ALT+B; command mode): Previous word.
3870 \end_layout
3872 \begin_layout Itemize
3873 CTRL+RIGHT (also ALT+F; command mode): Next word.
3874 \end_layout
3876 \begin_layout Itemize
3877 ALT+D (also CTRL+W; command mode): Delete word.
3878 \end_layout
3880 \begin_layout Itemize
3881 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3882 \end_layout
3884 \begin_layout Subsection
3885 wxWidgets platform
3886 \end_layout
3888 \begin_layout Subsubsection
3889 Modifier names:
3890 \end_layout
3892 \begin_layout Standard
3893 Following modifier names are known:
3894 \end_layout
3896 \begin_layout Itemize
3898 \end_layout
3900 \begin_layout Itemize
3901 ctrl
3902 \end_layout
3904 \begin_layout Itemize
3905 shift 
3906 \end_layout
3908 \begin_layout Itemize
3909 meta
3910 \end_layout
3912 \begin_layout Itemize
3913 cmd (Mac OS X only)
3914 \end_layout
3916 \begin_layout Subsubsection
3917 Key names:
3918 \end_layout
3920 \begin_layout Standard
3921 Following key names are known:
3922 \end_layout
3924 \begin_layout Itemize
3925 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3926  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3927  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3928  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3929  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3930  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3931  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3932  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3933  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3934  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3935  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3936  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3937  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3938  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3939  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3940  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3941  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3942  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3943  windows_right, windows_menu, command, special1, special2, special3, special4,
3944  special5, special6, special7, special8, special9, special10, special11,
3945  special12, special13, special14, special15, special16, special17, special18,
3946  special19, special20
3947 \end_layout
3949 \begin_layout Section
3950 Movie file format
3951 \end_layout
3953 \begin_layout Standard
3954 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3955  (note: If you recompress it, do not use compression methods other than
3956  store and deflate and especially do not use encryption of any kind).
3957 \end_layout
3959 \begin_layout Subsection
3960 Detecting clean start/SRAM/Savestate
3961 \end_layout
3963 \begin_layout Itemize
3964 If file has member 
3965 \begin_inset Quotes eld
3966 \end_inset
3968 savestate
3969 \begin_inset Quotes erd
3970 \end_inset
3972  it is savestate, otherwise:
3973 \end_layout
3975 \begin_layout Itemize
3976 If file has members with names starting 
3977 \begin_inset Quotes eld
3978 \end_inset
3980 moviesram.
3981 \begin_inset Quotes erd
3982 \end_inset
3984  it is movie starting from SRAM, otherwise:
3985 \end_layout
3987 \begin_layout Itemize
3988 It is movie starting from clear state.
3989 \end_layout
3991 \begin_layout Subsection
3992 Member: gametype
3993 \end_layout
3995 \begin_layout Standard
3996 Type of game ROM and region (as one line).
3997  Valid values are:
3998 \end_layout
4000 \begin_layout Standard
4001 \begin_inset Tabular
4002 <lyxtabular version="3" rows="8" columns="3">
4003 <features tabularvalignment="middle">
4004 <column alignment="center" valignment="top" width="0">
4005 <column alignment="center" valignment="top" width="0">
4006 <column alignment="center" valignment="top" width="0">
4007 <row>
4008 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4009 \begin_inset Text
4011 \begin_layout Plain Layout
4012 Value
4013 \end_layout
4015 \end_inset
4016 </cell>
4017 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4018 \begin_inset Text
4020 \begin_layout Plain Layout
4021 System
4022 \end_layout
4024 \end_inset
4025 </cell>
4026 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4027 \begin_inset Text
4029 \begin_layout Plain Layout
4030 Region
4031 \end_layout
4033 \end_inset
4034 </cell>
4035 </row>
4036 <row>
4037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4038 \begin_inset Text
4040 \begin_layout Plain Layout
4041 snes_pal
4042 \end_layout
4044 \end_inset
4045 </cell>
4046 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4047 \begin_inset Text
4049 \begin_layout Plain Layout
4050 Super NES
4051 \end_layout
4053 \end_inset
4054 </cell>
4055 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4056 \begin_inset Text
4058 \begin_layout Plain Layout
4060 \end_layout
4062 \end_inset
4063 </cell>
4064 </row>
4065 <row>
4066 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4067 \begin_inset Text
4069 \begin_layout Plain Layout
4070 sgb_pal
4071 \end_layout
4073 \end_inset
4074 </cell>
4075 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4076 \begin_inset Text
4078 \begin_layout Plain Layout
4079 Super Game Boy
4080 \end_layout
4082 \end_inset
4083 </cell>
4084 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4085 \begin_inset Text
4087 \begin_layout Plain Layout
4089 \end_layout
4091 \end_inset
4092 </cell>
4093 </row>
4094 <row>
4095 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4096 \begin_inset Text
4098 \begin_layout Plain Layout
4099 snes_ntsc
4100 \end_layout
4102 \end_inset
4103 </cell>
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4105 \begin_inset Text
4107 \begin_layout Plain Layout
4108 Super NES
4109 \end_layout
4111 \end_inset
4112 </cell>
4113 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4114 \begin_inset Text
4116 \begin_layout Plain Layout
4117 NTSC
4118 \end_layout
4120 \end_inset
4121 </cell>
4122 </row>
4123 <row>
4124 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4125 \begin_inset Text
4127 \begin_layout Plain Layout
4128 sgb_ntsc
4129 \end_layout
4131 \end_inset
4132 </cell>
4133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4134 \begin_inset Text
4136 \begin_layout Plain Layout
4137 Super Game Boy
4138 \end_layout
4140 \end_inset
4141 </cell>
4142 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4143 \begin_inset Text
4145 \begin_layout Plain Layout
4146 NTSC
4147 \end_layout
4149 \end_inset
4150 </cell>
4151 </row>
4152 <row>
4153 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4154 \begin_inset Text
4156 \begin_layout Plain Layout
4158 \end_layout
4160 \end_inset
4161 </cell>
4162 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4163 \begin_inset Text
4165 \begin_layout Plain Layout
4166 BS-X (non-slotted)
4167 \end_layout
4169 \end_inset
4170 </cell>
4171 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4172 \begin_inset Text
4174 \begin_layout Plain Layout
4175 NTSC
4176 \end_layout
4178 \end_inset
4179 </cell>
4180 </row>
4181 <row>
4182 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4183 \begin_inset Text
4185 \begin_layout Plain Layout
4186 bsxslotted
4187 \end_layout
4189 \end_inset
4190 </cell>
4191 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4192 \begin_inset Text
4194 \begin_layout Plain Layout
4195 BS-X (slotted)
4196 \end_layout
4198 \end_inset
4199 </cell>
4200 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4201 \begin_inset Text
4203 \begin_layout Plain Layout
4204 NTSC
4205 \end_layout
4207 \end_inset
4208 </cell>
4209 </row>
4210 <row>
4211 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4212 \begin_inset Text
4214 \begin_layout Plain Layout
4215 sufamiturbo
4216 \end_layout
4218 \end_inset
4219 </cell>
4220 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4221 \begin_inset Text
4223 \begin_layout Plain Layout
4224 Sufami Turbo
4225 \end_layout
4227 \end_inset
4228 </cell>
4229 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4230 \begin_inset Text
4232 \begin_layout Plain Layout
4233 NTSC
4234 \end_layout
4236 \end_inset
4237 </cell>
4238 </row>
4239 </lyxtabular>
4241 \end_inset
4244 \end_layout
4246 \begin_layout Standard
4247 Frame rates are:
4248 \end_layout
4250 \begin_layout Standard
4251 \begin_inset Tabular
4252 <lyxtabular version="3" rows="3" columns="2">
4253 <features tabularvalignment="middle">
4254 <column alignment="center" valignment="top" width="0">
4255 <column alignment="center" valignment="top" width="0">
4256 <row>
4257 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4258 \begin_inset Text
4260 \begin_layout Plain Layout
4261 Region
4262 \end_layout
4264 \end_inset
4265 </cell>
4266 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4267 \begin_inset Text
4269 \begin_layout Plain Layout
4270 Framerate (fps)
4271 \end_layout
4273 \end_inset
4274 </cell>
4275 </row>
4276 <row>
4277 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4278 \begin_inset Text
4280 \begin_layout Plain Layout
4282 \end_layout
4284 \end_inset
4285 </cell>
4286 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4287 \begin_inset Text
4289 \begin_layout Plain Layout
4290 322445/6448
4291 \end_layout
4293 \end_inset
4294 </cell>
4295 </row>
4296 <row>
4297 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4298 \begin_inset Text
4300 \begin_layout Plain Layout
4301 NTSC
4302 \end_layout
4304 \end_inset
4305 </cell>
4306 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4307 \begin_inset Text
4309 \begin_layout Plain Layout
4310 10738636/178683
4311 \end_layout
4313 \end_inset
4314 </cell>
4315 </row>
4316 </lyxtabular>
4318 \end_inset
4321 \end_layout
4323 \begin_layout Subsection
4324 Member: port1
4325 \end_layout
4327 \begin_layout Standard
4328 Contains type of port #1 (as one line).
4329  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4330  If not present, defaults to 'gamepad'.
4331 \end_layout
4333 \begin_layout Subsection
4334 Member: port2
4335 \end_layout
4337 \begin_layout Standard
4338 Contains type of port #2 (as one line).
4339  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4340  'justifier' and 'justifiers'.
4341  If not present, defaults to 'none'.
4342 \end_layout
4344 \begin_layout Subsection
4345 Member: gamename
4346 \end_layout
4348 \begin_layout Standard
4349 Contains name of the game (as one line).
4350 \end_layout
4352 \begin_layout Subsection
4353 Member: authors
4354 \end_layout
4356 \begin_layout Standard
4357 Contains authors, one per line.
4358  Part before '|' is the full name, part after is the nickname.
4359 \end_layout
4361 \begin_layout Subsection
4362 Member: systemid
4363 \end_layout
4365 \begin_layout Standard
4366 Always 
4367 \begin_inset Quotes eld
4368 \end_inset
4370 lsnes-rr1
4371 \begin_inset Quotes erd
4372 \end_inset
4374  (one line).
4375  Used to reject other saves.
4376 \end_layout
4378 \begin_layout Subsection
4379 Member: controlsversion
4380 \end_layout
4382 \begin_layout Standard
4383 Always 
4384 \begin_inset Quotes eld
4385 \end_inset
4388 \begin_inset Quotes erd
4389 \end_inset
4391  (one line).
4392  Used to identify what controls are there.
4393 \end_layout
4395 \begin_layout Subsection
4396 Member: 
4397 \begin_inset Quotes eld
4398 \end_inset
4400 coreversion
4401 \begin_inset Quotes erd
4402 \end_inset
4405 \end_layout
4407 \begin_layout Standard
4408 Contains bsnes core version number (as one line).
4409 \end_layout
4411 \begin_layout Subsection
4412 Member: projectid
4413 \end_layout
4415 \begin_layout Standard
4416 Contains project ID (as one line).
4417  Used to identify if two movies are part of the same project.
4418 \end_layout
4420 \begin_layout Subsection
4421 Member: {rom,slota,slotb}{,xml}.sha256
4422 \end_layout
4424 \begin_layout Standard
4425 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4426  Absent if corresponding file is absent.
4427 \end_layout
4429 \begin_layout Subsection
4430 Member: moviesram.<name>
4431 \end_layout
4433 \begin_layout Standard
4434 Raw binary startup SRAM of kind <name>.
4435  Only present in savestates and movies starting from SRAM.
4436 \end_layout
4438 \begin_layout Subsection
4439 Member: saveframe
4440 \end_layout
4442 \begin_layout Standard
4443 Contains frame number (as one line) of frame movie was saved on.
4444  Only present in savestates.
4445 \end_layout
4447 \begin_layout Subsection
4448 Member: lagcounter
4449 \end_layout
4451 \begin_layout Standard
4452 Current value of lag counter (as one line).
4453  Only present in savestates.
4454 \end_layout
4456 \begin_layout Subsection
4457 Member: pollcounters
4458 \end_layout
4460 \begin_layout Standard
4461 Contains poll counters (currently 100 of them), one per line.
4462  Each line is raw poll count if DRDY is set for it.
4463  Otherwise it is negative poll count minus one.
4464  Only present in savestates.
4465 \end_layout
4467 \begin_layout Subsection
4468 Member: hostmemory
4469 \end_layout
4471 \begin_layout Standard
4472 Raw binary dump of host memory.
4473  Only present in savestates.
4474 \end_layout
4476 \begin_layout Subsection
4477 Member: savestate
4478 \end_layout
4480 \begin_layout Standard
4481 The raw binary savestate itself.
4482  Savestate detection uses this file, only present in savestates.
4483 \end_layout
4485 \begin_layout Subsection
4486 Member: screenshot
4487 \end_layout
4489 \begin_layout Standard
4490 Screenshot of current frame.
4491  Only present in savestates.
4492  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4493  data.
4494  Height of image is inferred from the width and size of data.
4495 \end_layout
4497 \begin_layout Subsection
4498 Member: sram.<name>
4499 \end_layout
4501 \begin_layout Standard
4502 Raw binary SRAM of kind <name> at time of savestate.
4503  Only present in savestates.
4504 \end_layout
4506 \begin_layout Subsection
4507 Member: input
4508 \end_layout
4510 \begin_layout Standard
4511 The actual input track, one line per subframe (blank lines are skipped).
4512 \end_layout
4514 \begin_layout Itemize
4515 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4516  part of same frame as previous, otherwise it starts a new frame.
4517 \end_layout
4519 \begin_layout Itemize
4520 First subframe must start a new frame.
4521 \end_layout
4523 \begin_layout Standard
4524 Length of movie in frames is number of lines in input file that start a
4525  new frame.
4526 \end_layout
4528 \begin_layout Subsection
4529 Member: subtitles
4530 \end_layout
4532 \begin_layout Standard
4533 Subtitle track.
4534  Optional.
4535 \end_layout
4537 \begin_layout Itemize
4538 Each line is in form <firstframe> <numframes> <text>.
4539 \end_layout
4541 \begin_layout Itemize
4542 Linefeed is encoded as 
4543 \backslash
4544 n, backslash is encoded as 
4545 \backslash
4547 \backslash
4549 \end_layout
4551 \begin_layout Subsection
4552 Member: rerecords
4553 \end_layout
4555 \begin_layout Standard
4556 Contains textual base-10 rerecord count (as one line; emulator just writes
4557  this, it doesn't read it) + 1.
4558 \end_layout
4560 \begin_layout Subsection
4561 Member: rrdata
4562 \end_layout
4564 \begin_layout Standard
4565 This member stores set of load IDs.
4566  There is one load ID per rerecord (plus one corresponding to start of project).
4567 \end_layout
4569 \begin_layout Itemize
4570 This member constists of concatenation of records
4571 \end_layout
4573 \begin_layout Itemize
4574 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4575  IDs.
4576 \end_layout
4578 \begin_layout Itemize
4579 IDs are interpretted as 256-bit big-endian integers with warparound.
4580 \end_layout
4582 \begin_layout Itemize
4583 Initial predicted ID is all zeroes.
4584 \end_layout
4586 \begin_layout Standard
4587 Format of each record is:
4588 \end_layout
4590 \begin_layout Itemize
4591 1 byte: Opcode byte.
4592  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4593  Bit 7 is unused.
4594 \end_layout
4596 \begin_layout Itemize
4597 32-prefixlen bytes of ID.
4598 \end_layout
4600 \begin_layout Itemize
4601 countlen bytes of big-endian count (count).
4602 \end_layout
4604 \begin_layout Standard
4605 Records are processed as follows:
4606 \end_layout
4608 \begin_layout Itemize
4609 To form the first ID encoded by record, take the first prefixlen bytes predicted
4610  ID and append the read ID value to it.
4611  The result is the first ID encoded.
4612 \end_layout
4614 \begin_layout Itemize
4615 If countlen is 0, record encodes 1 ID.
4616 \end_layout
4618 \begin_layout Itemize
4619 If countlen is 1, record encodes 2+count IDs.
4620 \end_layout
4622 \begin_layout Itemize
4623 If countlen is 2, record encodes 258+count IDs.
4624 \end_layout
4626 \begin_layout Itemize
4627 If countlen is 3, record encodes 65794+count IDs.
4628 \end_layout
4630 \begin_layout Itemize
4631 The new predicted ID is the next ID after last one encoded by the record.
4632 \end_layout
4634 \begin_layout Standard
4635 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4636  by all records.
4637 \end_layout
4639 \begin_layout Subsection
4640 Member: starttime.second
4641 \end_layout
4643 \begin_layout Standard
4644 Movie starting time, second part.
4645  Epoch is Unix epoch.
4646  Default is 1,000,000,000.
4647 \end_layout
4649 \begin_layout Subsection
4650 Member: starttime.subsecond
4651 \end_layout
4653 \begin_layout Standard
4654 Movie starting time, subsecond part.
4655  Unit is CPU clocks.
4656  Default is 0.
4657 \end_layout
4659 \begin_layout Subsection
4660 Member: savetime.second
4661 \end_layout
4663 \begin_layout Standard
4664 Movie saving time, second part.
4665  Default is starttime.second.
4666  Only present in savestates.
4667 \end_layout
4669 \begin_layout Subsection
4670 Member: savetime.subsecond
4671 \end_layout
4673 \begin_layout Standard
4674 Movie saving time, subsecond part.
4675  Default is starttime.subsecond.
4676  Only present in savestates.
4677 \end_layout
4679 \begin_layout Section
4680 lsvs file format (commentary tracks)
4681 \end_layout
4683 \begin_layout Subsection
4684 Clusters
4685 \end_layout
4687 \begin_layout Itemize
4688 Each cluster is 8kB (8192 bytes) in size.
4689 \end_layout
4691 \begin_layout Itemize
4692 Cluster n starts at offset 8192*n in file.
4693 \end_layout
4695 \begin_layout Itemize
4696 The following clusters are system special:
4697 \end_layout
4699 \begin_deeper
4700 \begin_layout Itemize
4701 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4702 \end_layout
4704 \begin_layout Itemize
4705 Cluster 1 (superblock)
4706 \end_layout
4708 \end_deeper
4709 \begin_layout Subsection
4710 Cluster tables
4711 \end_layout
4713 \begin_layout Itemize
4714 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4715  last 11 bits of n).
4716 \end_layout
4718 \begin_layout Itemize
4719 This cluster table consists of 2048 4-byte big-endian integers.
4720 \end_layout
4722 \begin_layout Itemize
4723 Each entry describes a cluster in 16MB supercluster, in order.
4724 \end_layout
4726 \begin_layout Itemize
4727 The valid values for entries are:
4728 \end_layout
4730 \begin_deeper
4731 \begin_layout Itemize
4732 0x00000000: Free cluster
4733 \end_layout
4735 \begin_layout Itemize
4736 0x00000001: Last cluster in chain.
4737 \end_layout
4739 \begin_layout Itemize
4740 0xFFFFFFFF: System cluster (cluster tables and superblock)
4741 \end_layout
4743 \begin_layout Itemize
4744 (anything else): Number of next cluster in chain.
4745  Must not be multiple of 2048.
4746 \end_layout
4748 \end_deeper
4749 \begin_layout Itemize
4750 Due to limitations of the format, there can be at most 2097052 superclusters,
4751  giving maximum file size of 16TB.
4752 \end_layout
4754 \begin_layout Subsection
4755 Stream table
4756 \end_layout
4758 \begin_layout Itemize
4759 The stream table chain always starts in cluster 2.
4760 \end_layout
4762 \begin_layout Itemize
4763 Otherwise, it follows normal chaining.
4764 \end_layout
4766 \begin_layout Itemize
4767 The stream table consists of 16-byte entries:
4768 \end_layout
4770 \begin_deeper
4771 \begin_layout Itemize
4772 The first 8 bytes of entry give big-endian beginning position of stream
4773  in units of 1/48000 s.
4774 \end_layout
4776 \begin_layout Itemize
4777 The next 4 bytes of entry give big-endian beginning cluster for control
4778  data.
4779  0 here marks the entry as not present.
4780 \end_layout
4782 \begin_layout Itemize
4783 The last 4 bytes of entry give big-endian beginning cluster for codec data.
4784 \end_layout
4786 \end_deeper
4787 \begin_layout Itemize
4788 Stream table clusters are normal clusters, following normal chaining.
4789 \end_layout
4791 \begin_layout Itemize
4792 The stream begnning position is not guarenteed unique.
4793  There can be multiple streams with the same starting position in the file.
4794 \end_layout
4796 \begin_layout Subsection
4797 Stream control data
4798 \end_layout
4800 \begin_layout Itemize
4801 The stream control data consists of entries 4 bytes each:
4802 \end_layout
4804 \begin_deeper
4805 \begin_layout Itemize
4806 The first 2 bytes of entry gives big-endian length of packet
4807 \end_layout
4809 \begin_layout Itemize
4810 The next byte of entry gives audio length of packet in units of 1/400 s.
4811 \end_layout
4813 \begin_layout Itemize
4814 The last byte is control byte.
4815 \end_layout
4817 \begin_deeper
4818 \begin_layout Itemize
4819 0 means this entry is not present and the control data ends.
4820 \end_layout
4822 \begin_layout Itemize
4823 1 is valid control entry.
4824 \end_layout
4826 \end_deeper
4827 \end_deeper
4828 \begin_layout Itemize
4829 The stream control data can also end by running into end of the readable
4830  chain.
4831 \end_layout
4833 \begin_deeper
4834 \begin_layout Itemize
4835 This happens if there happens to be exact multiple of 2048 packets in stream
4836  and number of packets is nonzero.
4837 \end_layout
4839 \end_deeper
4840 \begin_layout Itemize
4841 These clusters follow normal chaining.
4842 \end_layout
4844 \begin_layout Subsection
4845 Stream codec data
4846 \end_layout
4848 \begin_layout Itemize
4849 Stream codec data consists of raw Opus data packets packed back to back
4850  with nothing in between.
4851 \end_layout
4853 \begin_layout Itemize
4854 Warning: Due to internal limitations, this data must reside in the first
4855  65536 superclusters (that is, the first 1TB of the file).
4856 \end_layout
4858 \begin_layout Subsection
4859 Superblock
4860 \end_layout
4862 \begin_layout Itemize
4863 The superblock is stored in cluster 1.
4865 \end_layout
4867 \begin_layout Itemize
4868 The first 11 bytes are 
4869 \begin_inset Quotes eld
4870 \end_inset
4872 sefs-magic
4873 \begin_inset Quotes erd
4874 \end_inset
4876 <NUL>.
4877 \end_layout
4879 \begin_layout Itemize
4880 The rest are unused.
4881 \end_layout
4883 \begin_layout Itemize
4884 This cluster 1 is marked as system special.
4885 \end_layout
4887 \begin_layout Section
4888 Known ROM extensions
4889 \end_layout
4891 \begin_layout Itemize
4892 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4893 \end_layout
4895 \begin_layout Itemize
4896 DMG cartridge ROMs: dmg, gb.
4897 \end_layout
4899 \begin_layout Itemize
4900 GBC cartridge ROMs: cgb, gbc.
4901 \end_layout
4903 \begin_layout Section
4904 Gamepack files
4905 \end_layout
4907 \begin_layout Itemize
4908 The first line must be: 
4909 \begin_inset Quotes eld
4910 \end_inset
4912 [GAMEPACK FILE]
4913 \begin_inset Quotes erd
4914 \end_inset
4917 \end_layout
4919 \begin_layout Itemize
4920 There is one needed line: 
4921 \begin_inset Quotes eld
4922 \end_inset
4924 type <systype>
4925 \begin_inset Quotes erd
4926 \end_inset
4929  This sets system type to <systype>.
4930  The following system types are valid:
4931 \end_layout
4933 \begin_deeper
4934 \begin_layout Itemize
4935 snes (SNES)
4936 \end_layout
4938 \begin_layout Itemize
4939 bsx (BS-X non-slotted)
4940 \end_layout
4942 \begin_layout Itemize
4943 bsxslotted (BS-X slotted)
4944 \end_layout
4946 \begin_layout Itemize
4947 sufamiturbo (Sufami Turbo)
4948 \end_layout
4950 \begin_layout Itemize
4951 sgb (Super Game Boy)
4952 \end_layout
4954 \begin_layout Itemize
4955 dmg (Game Boy)
4956 \end_layout
4958 \begin_layout Itemize
4959 gbc (Game Boy Color)
4960 \end_layout
4962 \begin_layout Itemize
4963 gbc_gba (Game Boy Color with GBA initial register values)
4964 \end_layout
4966 \end_deeper
4967 \begin_layout Itemize
4968 Optionally a region can be specified: 
4969 \begin_inset Quotes eld
4970 \end_inset
4972 region <region>
4973 \begin_inset Quotes erd
4974 \end_inset
4977  The following values are valid:
4978 \end_layout
4980 \begin_deeper
4981 \begin_layout Itemize
4982 autodetect (Autodetect region: snes and sgb only)
4983 \end_layout
4985 \begin_layout Itemize
4986 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4987 \end_layout
4989 \begin_layout Itemize
4990 pal (PAL: snes, sgb)
4991 \end_layout
4993 \begin_layout Itemize
4994 world (World: dmg, gbc, gbc_gba)
4995 \end_layout
4997 \end_deeper
4998 \begin_layout Itemize
4999 ROM images are loaded as: 
5000 \begin_inset Quotes eld
5001 \end_inset
5003 rom <type> <file>
5004 \begin_inset Quotes erd
5005 \end_inset
5008  The following types are valid:
5009 \end_layout
5011 \begin_deeper
5012 \begin_layout Itemize
5013 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5014  BIOS in bsx, bsxslotted, sufamiturbo)
5015 \end_layout
5017 \begin_layout Itemize
5018 bsx (Cartridge ROM in bsx, bsxslotted)
5019 \end_layout
5021 \begin_layout Itemize
5022 slot-a (Cartridge ROM in sufamiturbo)
5023 \end_layout
5025 \begin_layout Itemize
5026 slot-b (Cartridge ROM in sufamiturbo)
5027 \end_layout
5029 \end_deeper
5030 \begin_layout Itemize
5031 ROM markup can be loaded as: 
5032 \begin_inset Quotes eld
5033 \end_inset
5035 xml <type> <file>
5036 \begin_inset Quotes erd
5037 \end_inset
5040  The types valid are the same as for ROMs.
5041 \end_layout
5043 \begin_layout Itemize
5044 Patches can be loaded as 
5045 \begin_inset Quotes eld
5046 \end_inset
5048 patch[<offset>] <type> <file>
5049 \begin_inset Quotes erd
5050 \end_inset
5053  The types are the same as for ROMs.
5054 \end_layout
5056 \begin_deeper
5057 \begin_layout Itemize
5058 Offset is given in form [+-]<number>.
5059  Usually offset is either +0 or -512.
5060 \end_layout
5062 \begin_layout Itemize
5063 Default offset is +0.
5064 \end_layout
5066 \end_deeper
5067 \begin_layout Subsection
5068 Example:
5069 \end_layout
5071 \begin_layout LyX-Code
5072 [GAMEPACK FILE]
5073 \end_layout
5075 \begin_layout LyX-Code
5076 type snes
5077 \end_layout
5079 \begin_layout LyX-Code
5080 rom rom speedygonzales.sfc
5081 \end_layout
5083 \begin_layout LyX-Code
5084 patch-512 rom sonicthehedgehog.ips
5085 \end_layout
5087 \begin_layout Subsection
5088 Example 2:
5089 \end_layout
5091 \begin_layout LyX-Code
5092 [GAMEPACK FILE]
5093 \end_layout
5095 \begin_layout LyX-Code
5096 type sgb
5097 \end_layout
5099 \begin_layout LyX-Code
5100 rom rom supergameboy.sfc
5101 \end_layout
5103 \begin_layout LyX-Code
5104 rom dmg megamanV.dmg
5105 \end_layout
5107 \begin_layout Section
5108 Quick'n'dirty encode guide
5109 \end_layout
5111 \begin_layout Enumerate
5112 Start the emulator and load the ROM and movie file.
5113 \end_layout
5115 \begin_layout Enumerate
5116 Set large AVI option 'set-setting avi-large on'
5117 \end_layout
5119 \begin_layout Enumerate
5120 Enable dumping 'dump-avi tmpdump' 
5121 \end_layout
5123 \begin_layout Enumerate
5124 Unpause and let it run until you want to end dumping.
5125 \end_layout
5127 \begin_layout Enumerate
5128 Close the emulator (closing the window is the easiest way).
5129  Or use 'end-avi'.
5130 \end_layout
5132 \begin_layout Enumerate
5133 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5134  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5135 \end_layout
5137 \begin_layout Enumerate
5138 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5139 \end_layout
5141 \begin_layout Enumerate
5142 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5143  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5144 \end_layout
5146 \begin_layout Enumerate
5147 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5148  Now final.mkv contains quick'n'dirty encode.
5149 \end_layout
5151 \begin_layout Section
5152 Axis configurations for some gamepad types:
5153 \end_layout
5155 \begin_layout Subsection
5156 XBox360 controller:
5157 \end_layout
5159 \begin_layout Standard
5160 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5161 \end_layout
5163 \begin_layout LyX-Code
5164 set-axis joystick0axis2 pressure-+
5165 \end_layout
5167 \begin_layout LyX-Code
5168 set-axis joystick0axis5 pressure-+
5169 \end_layout
5171 \begin_layout Itemize
5172 This is needed for SDL only.
5173  EVDEV sets those types correctly.
5174 \end_layout
5176 \begin_layout Subsection
5177 PS3 
5178 \begin_inset Quotes eld
5179 \end_inset
5181 sixaxis
5182 \begin_inset Quotes erd
5183 \end_inset
5185  controller:
5186 \end_layout
5188 \begin_layout Standard
5189 Axes 8-19 should be disabled.
5190 \end_layout
5192 \begin_layout LyX-Code
5193 set-axis joystick0axis8 disabled
5194 \end_layout
5196 \begin_layout LyX-Code
5197 set-axis joystick0axis9 disabled
5198 \end_layout
5200 \begin_layout LyX-Code
5201 set-axis joystick0axis10 disabled
5202 \end_layout
5204 \begin_layout LyX-Code
5205 set-axis joystick0axis11 disabled
5206 \end_layout
5208 \begin_layout LyX-Code
5209 set-axis joystick0axis12 disabled
5210 \end_layout
5212 \begin_layout LyX-Code
5213 set-axis joystick0axis13 disabled
5214 \end_layout
5216 \begin_layout LyX-Code
5217 set-axis joystick0axis14 disabled
5218 \end_layout
5220 \begin_layout LyX-Code
5221 set-axis joystick0axis15 disabled
5222 \end_layout
5224 \begin_layout LyX-Code
5225 set-axis joystick0axis16 disabled
5226 \end_layout
5228 \begin_layout LyX-Code
5229 set-axis joystick0axis17 disabled
5230 \end_layout
5232 \begin_layout LyX-Code
5233 set-axis joystick0axis18 disabled
5234 \end_layout
5236 \begin_layout LyX-Code
5237 set-axis joystick0axis19 disabled
5238 \end_layout
5240 \begin_layout Section
5241 Errata:
5242 \end_layout
5244 \begin_layout Subsection
5245 Problems from BSNES core:
5246 \end_layout
5248 \begin_layout Itemize
5249 The whole pending save stuff.
5250 \end_layout
5252 \begin_layout Itemize
5253 Lack of layer hiding.
5254 \end_layout
5256 \begin_layout Itemize
5257 It is slow (especially accuracy).
5258 \end_layout
5260 \begin_layout Itemize
5261 Firmwares can't be loaded from ZIP archives.
5262 \end_layout
5264 \begin_layout Subsection
5265 Other problems:
5266 \end_layout
5268 \begin_layout Itemize
5269 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5270 \end_layout
5272 \begin_layout Itemize
5273 Audio for last dumped frame is not itself dumped.
5274 \end_layout
5276 \begin_layout Itemize
5277 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5278 \end_layout
5280 \begin_layout Itemize
5281 No menus, command based interface (SDL).
5282 \end_layout
5284 \begin_layout Itemize
5285 Long commands don't scroll.
5286 \end_layout
5288 \begin_layout Section
5289 Changelog:
5290 \end_layout
5292 \begin_layout Subsection
5293 rr0-beta1
5294 \end_layout
5296 \begin_layout Itemize
5297 Fix -Wall warnings
5298 \end_layout
5300 \begin_layout Itemize
5301 Fix dumper video corruption with levels 10-18.
5302 \end_layout
5304 \begin_layout Subsection
5305 rr0-beta2
5306 \end_layout
5308 \begin_layout Itemize
5309 Autofire
5310 \end_layout
5312 \begin_layout Itemize
5313 Lots of code cleanups
5314 \end_layout
5316 \begin_layout Itemize
5317 Lua interface to settings
5318 \end_layout
5320 \begin_layout Itemize
5321 Allow specifying AVI borders without Lua
5322 \end_layout
5324 \begin_layout Itemize
5325 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5326 \end_layout
5328 \begin_layout Itemize
5329 on_snoop lua callback
5330 \end_layout
5332 \begin_layout Itemize
5333 Faster movie loading and saving.
5334 \end_layout
5336 \begin_layout Subsection
5337 rr0-beta3
5338 \end_layout
5340 \begin_layout Itemize
5341 Joystick support
5342 \end_layout
5344 \begin_layout Subsection
5345 rr0-beta4
5346 \end_layout
5348 \begin_layout Itemize
5349 Fix multi-buttons
5350 \end_layout
5352 \begin_layout Itemize
5353 Save jukebox functionality.
5354 \end_layout
5356 \begin_layout Subsection
5357 rr0-beta5
5358 \end_layout
5360 \begin_layout Itemize
5361 Try to fix some nasty failing movie load edge cases
5362 \end_layout
5364 \begin_layout Itemize
5365 Allow specifying scripts to run on command line.
5366 \end_layout
5368 \begin_layout Subsection
5369 rr0-beta6
5370 \end_layout
5372 \begin_layout Itemize
5373 Major source code reorganization.
5374 \end_layout
5376 \begin_layout Itemize
5377 Backup savestates before overwriting.
5378 \end_layout
5380 \begin_layout Itemize
5381 Don't crash if loading initial state fails.
5382 \end_layout
5384 \begin_layout Subsection
5385 rr0-beta7
5386 \end_layout
5388 \begin_layout Itemize
5389 Fix firmware lookup
5390 \end_layout
5392 \begin_layout Itemize
5393 Fix author name parsing
5394 \end_layout
5396 \begin_layout Itemize
5397 Fix rerecord counting
5398 \end_layout
5400 \begin_layout Itemize
5401 (SDL) Print messages to console if SDL is uninitialized
5402 \end_layout
5404 \begin_layout Itemize
5405 Add movieinfo program
5406 \end_layout
5408 \begin_layout Itemize
5409 Fix loading movies starting from SRAM.
5410 \end_layout
5412 \begin_layout Subsection
5413 rr0-beta8
5414 \end_layout
5416 \begin_layout Itemize
5417 Add support for unattended dumping
5418 \end_layout
5420 \begin_layout Itemize
5421 Fix compiling for Win32
5422 \end_layout
5424 \begin_layout Itemize
5425 Don't lock up if sound can't be initialized
5426 \end_layout
5428 \begin_layout Itemize
5429 Strip trailing CR from commands
5430 \end_layout
5432 \begin_layout Itemize
5433 Don't try to do dubious things in global ctors (fix crash on startup)
5434 \end_layout
5436 \begin_layout Subsection
5437 rr0-beta9
5438 \end_layout
5440 \begin_layout Itemize
5441 Small documentation tweaking
5442 \end_layout
5444 \begin_layout Itemize
5445 Fix make clean
5446 \end_layout
5448 \begin_layout Itemize
5449 Fix major bug in modifier matching
5450 \end_layout
5452 \begin_layout Subsection
5453 rr0-beta10
5454 \end_layout
5456 \begin_layout Itemize
5457 Lots of documentation fixes
5458 \end_layout
5460 \begin_layout Itemize
5461 Use dedicated callbacks for event backcomm., not commands.
5462 \end_layout
5464 \begin_layout Itemize
5465 Ensure that the watchdog is not hit when executing delayed reset.
5466 \end_layout
5468 \begin_layout Itemize
5469 Remove errant tab from joystick message.
5470 \end_layout
5472 \begin_layout Subsection
5473 rr0-beta11
5474 \end_layout
5476 \begin_layout Itemize
5477 Make autofire operate in absolute time, not linear time
5478 \end_layout
5480 \begin_layout Itemize
5481 Reinitialize controls when resuming from loadstate
5482 \end_layout
5484 \begin_layout Itemize
5485 Some more code cleanups
5486 \end_layout
5488 \begin_layout Itemize
5489 If Lua allocator fails, call OOM_panic()
5490 \end_layout
5492 \begin_layout Itemize
5493 Byte/word/dword/qword sized host memory write/read functions.
5494 \end_layout
5496 \begin_layout Itemize
5497 Dump at correct framerate if dumping interlaced NTSC (height=448).
5498 \end_layout
5500 \begin_layout Subsection
5501 rr0-beta12
5502 \end_layout
5504 \begin_layout Itemize
5505 Actually include the complete source code
5506 \end_layout
5508 \begin_layout Itemize
5509 Keep track of RTC
5510 \end_layout
5512 \begin_layout Subsection
5513 rr0-beta13
5514 \end_layout
5516 \begin_layout Itemize
5517 Document {save,start}time.{,sub}second.
5518 \end_layout
5520 \begin_layout Itemize
5521 Intercept time() from bsnes core.
5522 \end_layout
5524 \begin_layout Subsection
5525 rr0-beta14
5526 \end_layout
5528 \begin_layout Itemize
5529 Allow disabling time() interception (allow build on Mac OS X)
5530 \end_layout
5532 \begin_layout Itemize
5533 Use SDLMain on Mac OS X (make SDL not crash)
5534 \end_layout
5536 \begin_layout Itemize
5537 Disable delayed resets (just plain too buggy for now).
5538 \end_layout
5540 \begin_layout Itemize
5541 Code cleanups
5542 \end_layout
5544 \begin_layout Itemize
5545 Use 16-bit for graphics/video instead of 32-bit.
5546 \end_layout
5548 \begin_layout Itemize
5549 gui.rectangle/gui.pixel
5550 \end_layout
5552 \begin_layout Itemize
5553 gui.crosshair
5554 \end_layout
5556 \begin_layout Itemize
5557 New CSCD writer implementation.
5558 \end_layout
5560 \begin_layout Subsection
5561 rr0-beta15
5562 \end_layout
5564 \begin_layout Itemize
5565 Fix interaction of * and +.
5566 \end_layout
5568 \begin_layout Itemize
5569 Manual improvements
5570 \end_layout
5572 \begin_layout Itemize
5573 Use gettimeofday()/usleep(), these seem portable enough.
5574 \end_layout
5576 \begin_layout Itemize
5577 Move joystick axis manipulation to keymapper code.
5578 \end_layout
5580 \begin_layout Itemize
5581 Changes to how read-only works.
5582 \end_layout
5584 \begin_layout Itemize
5585 Refactor controller input code.
5586 \end_layout
5588 \begin_layout Subsection
5589 rr0-beta16
5590 \end_layout
5592 \begin_layout Itemize
5593 Fix mouseclick scale compensation.
5594 \end_layout
5596 \begin_layout Itemize
5597 Draw area boundaries correctly in SDL code.
5598 \end_layout
5600 \begin_layout Itemize
5601 gui.screenshot.
5602 \end_layout
5604 \begin_layout Itemize
5605 Fix CSCD output (buffer overrun and race condition).
5606 \end_layout
5608 \begin_layout Subsection
5609 rr0-beta17
5610 \end_layout
5612 \begin_layout Itemize
5613 JMD dumping support.
5614 \end_layout
5616 \begin_layout Itemize
5617 Allow unattended dumping to JMD.
5618 \end_layout
5620 \begin_layout Itemize
5621 Move to BSNES v083.
5622 \end_layout
5624 \begin_layout Itemize
5625 Switch back to 32-bit colors.
5626 \end_layout
5628 \begin_layout Itemize
5629 Add Lua function gui.color.
5630 \end_layout
5632 \begin_layout Itemize
5633 Use some new C++11 features in GCC 4.6.
5634 \end_layout
5636 \begin_layout Itemize
5637 Be prepared for core frequency changes.
5638 \end_layout
5640 \begin_layout Itemize
5641 Pass colors in one chunk from Lua.
5642 \end_layout
5644 \begin_layout Subsection
5645 rr0-beta18
5646 \end_layout
5648 \begin_layout Itemize
5649 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5650  memory.read_vma() and memory.find_vma().
5651 \end_layout
5653 \begin_layout Itemize
5654 Numerious documentation fixups
5655 \end_layout
5657 \begin_layout Itemize
5658 RTC time format changed
5659 \end_layout
5661 \begin_layout Itemize
5662 Reformat flags display
5663 \end_layout
5665 \begin_layout Itemize
5666 Allow lua package name to be overridden
5667 \end_layout
5669 \begin_layout Itemize
5670 SDUMP (high-quality dumping).
5671 \end_layout
5673 \begin_layout Itemize
5674 Split platform support to plugins.
5675 \end_layout
5677 \begin_layout Itemize
5678 Make all sound plugins support basic sound commands
5679 \end_layout
5681 \begin_layout Itemize
5682 Support portaudio for sound.
5683 \end_layout
5685 \begin_layout Itemize
5686 Allow disable Lua/SDL searching.
5687 \end_layout
5689 \begin_layout Itemize
5690 Upconvert colors when copying lcscreen to screen.
5691 \end_layout
5693 \begin_layout Itemize
5694 Reorganize source tree.
5695 \end_layout
5697 \begin_layout Itemize
5698 Evdev joystick support.
5699 \end_layout
5701 \begin_layout Itemize
5702 Refactor more code into generic window code.
5703 \end_layout
5705 \begin_layout Subsection
5706 rr0-beta19
5707 \end_layout
5709 \begin_layout Itemize
5710 Refactor message handling.
5711 \end_layout
5713 \begin_layout Itemize
5714 Rework makefile
5715 \end_layout
5717 \begin_layout Itemize
5718 Documentation fixes
5719 \end_layout
5721 \begin_layout Itemize
5722 Finish pending saves before load/quit.
5723 \end_layout
5725 \begin_layout Itemize
5726 Wxwidgets graphics plugin.
5727 \end_layout
5729 \begin_layout Subsection
5730 rr0-beta20
5731 \end_layout
5733 \begin_layout Itemize
5734 Get rid of win32-crap.[ch]pp.
5735 \end_layout
5737 \begin_layout Itemize
5738 Move files around a lot.
5739 \end_layout
5741 \begin_layout Itemize
5742 Get rid of need for host C++ compiler.
5743 \end_layout
5745 \begin_layout Itemize
5746 Bsnes v084 core.
5747 \end_layout
5749 \begin_layout Itemize
5750 Refactor inter-component communication.
5751 \end_layout
5753 \begin_layout Itemize
5754 Fix zero luma.
5755 \end_layout
5757 \begin_layout Itemize
5758 Fix crash on multiline aliases.
5759 \end_layout
5761 \begin_layout Itemize
5762 Load/Save settings in wxwidgets gui.
5763 \end_layout
5765 \begin_layout Subsection
5766 rr0-beta21
5767 \end_layout
5769 \begin_layout Itemize
5770 Patch problems in bsnes core
5771 \end_layout
5773 \begin_layout Itemize
5774 SNES is little-endian, not big-endian!
5775 \end_layout
5777 \begin_layout Itemize
5778 Fix memory corruption in lcscreen::load()
5779 \end_layout
5781 \begin_layout Subsection
5782 rr0-beta22
5783 \end_layout
5785 \begin_layout Itemize
5786 Fix interpretting repeat counts in rrdata loading.
5787 \end_layout
5789 \begin_layout Itemize
5790 New lua callback: on_frame()
5791 \end_layout
5793 \begin_layout Itemize
5794 Remove calls to runtosave() that aren't supposed to be there
5795 \end_layout
5797 \begin_layout Itemize
5798 Lua function: movie.read_rtc()
5799 \end_layout
5801 \begin_layout Itemize
5802 Ignore src/fonts/font.cpp
5803 \end_layout
5805 \begin_layout Itemize
5806 Fix more bsnes core problems
5807 \end_layout
5809 \begin_layout Itemize
5810 Control bsnes random seeding
5811 \end_layout
5813 \begin_layout Itemize
5814 Pause-on-end
5815 \end_layout
5817 \begin_layout Itemize
5818 Some bsnes core debugging features (state dump and state hash)
5819 \end_layout
5821 \begin_layout Itemize
5822 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5823  it was 'lsnes rr0-beta21').
5824 \end_layout
5826 \begin_layout Subsection
5827 rr0-beta23
5828 \end_layout
5830 \begin_layout Itemize
5831 Fix memory corruption due to macro/field mixup
5832 \end_layout
5834 \begin_layout Itemize
5835 search-memory update
5836 \end_layout
5838 \begin_layout Itemize
5839 Allow direct-mapped framebuffer
5840 \end_layout
5842 \begin_layout Itemize
5843 SDL: Use SDL_ANYFORMAT if possible
5844 \end_layout
5846 \begin_layout Itemize
5847 SDMP2SOX: 2s delay modes.
5848 \end_layout
5850 \begin_layout Itemize
5851 Wxwidgets: Cleanups
5852 \end_layout
5854 \begin_layout Itemize
5855 Use sed -E, not sed -r.
5856  Fixes building on Mac OS X.
5857 \end_layout
5859 \begin_layout Itemize
5860 Wxwidgets: Save jukebox on exit
5861 \end_layout
5863 \begin_layout Itemize
5864 Fix RTC if using load-movie on savestate.
5865 \end_layout
5867 \begin_layout Itemize
5868 Fix crash related to full console mode.
5869 \end_layout
5871 \begin_layout Subsection
5872 rr0-beta24
5873 \end_layout
5875 \begin_layout Itemize
5876 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5877 \end_layout
5879 \begin_layout Itemize
5880 Wxwidgets: Allow compiling on Mac OS X.
5881 \end_layout
5883 \begin_layout Itemize
5884 Use movie compare instead of movie hashing (faster save/load).
5885 \end_layout
5887 \begin_layout Itemize
5888 Lua: _SYSTEM table.
5889 \end_layout
5891 \begin_layout Subsection
5892 rr0-beta25
5893 \end_layout
5895 \begin_layout Itemize
5896 sdmp2sox: Pad soundtrack if using -l or -L.
5897 \end_layout
5899 \begin_layout Itemize
5900 sdmp2sox: Fix NTSC overscan.
5901 \end_layout
5903 \begin_layout Itemize
5904 sdmp2sox: Add AR correction mode.
5905 \end_layout
5907 \begin_layout Itemize
5908 call lua_close() when exiting.
5909 \end_layout
5911 \begin_layout Itemize
5912 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5913 \end_layout
5915 \begin_layout Subsection
5916 rr0-beta26
5917 \end_layout
5919 \begin_layout Itemize
5920 Fix IPS patching code (use bsnes core IPS patcher).
5921 \end_layout
5923 \begin_layout Itemize
5924 Implement BPS patching (using bsnes core IPS patcher).
5925 \end_layout
5927 \begin_layout Itemize
5928 Add feature to load headered ROMs.
5929 \end_layout
5931 \begin_layout Subsection
5932 rr0-beta27
5933 \end_layout
5935 \begin_layout Itemize
5936 Show command names when showing keybindings
5937 \end_layout
5939 \begin_layout Subsection
5941 \end_layout
5943 \begin_layout Itemize
5944 Fix pause-on-end to be actually controllable
5945 \end_layout
5947 \begin_layout Itemize
5948 SDL: Poll all events in queue, not just first one (fixes slowness in command
5949  typing)
5950 \end_layout
5952 \begin_layout Itemize
5953 Wxwidgets: Fix ROM loading.
5954 \end_layout
5956 \begin_layout Subsection
5957 rr1-beta0
5958 \end_layout
5960 \begin_layout Itemize
5961 Lua: Add gui.textH, gui.textV, gui.textHV
5962 \end_layout
5964 \begin_layout Itemize
5965 Fix text colors on SDL on Mac OS X
5966 \end_layout
5968 \begin_layout Itemize
5969 Mode 'F' for finished in readonly mode.
5970 \end_layout
5972 \begin_layout Itemize
5973 Fix some WS errors.
5974 \end_layout
5976 \begin_layout Itemize
5977 Reliably pause after skip poll
5978 \end_layout
5980 \begin_layout Itemize
5981 Split UI and core into their own threads
5982 \end_layout
5984 \begin_layout Subsection
5985 rr1-beta1
5986 \end_layout
5988 \begin_layout Itemize
5989 Remove leftover dummy SRAM slot
5990 \end_layout
5992 \begin_layout Itemize
5993 Fix controller numbers.
5994 \end_layout
5996 \begin_layout Subsection
5997 rr1-beta2
5998 \end_layout
6000 \begin_layout Itemize
6001 Fix lsnes-dumpavi after interface change.
6002 \end_layout
6004 \begin_layout Itemize
6005 Also give BSNES patches for v085.
6006 \end_layout
6008 \begin_layout Itemize
6009 Pack movie data in memory.
6010 \end_layout
6012 \begin_layout Subsection
6013 rr1-beta3
6014 \end_layout
6016 \begin_layout Itemize
6017 Fix framecount/length given when loading movies.
6018 \end_layout
6020 \begin_layout Itemize
6021 Controller command memory leak fixes.
6022 \end_layout
6024 \begin_layout Itemize
6025 Don't leak palette if freeing screen object.
6026 \end_layout
6028 \begin_layout Subsection
6029 rr1-beta4
6030 \end_layout
6032 \begin_layout Itemize
6033 Detect revisions.
6034 \end_layout
6036 \begin_layout Itemize
6037 Wxwidgets: Allow controlling dumper from the menu.
6038 \end_layout
6040 \begin_layout Subsection
6041 rr1-beta5
6042 \end_layout
6044 \begin_layout Itemize
6045 Rewrite parts of manual
6046 \end_layout
6048 \begin_layout Itemize
6049 Lua: Make it work with Lua 5.2.
6050 \end_layout
6052 \begin_layout Subsection
6053 rr1-beta6
6054 \end_layout
6056 \begin_layout Itemize
6057 Win32: Fix compile errors.
6058 \end_layout
6060 \begin_layout Subsection
6061 rr1-beta7
6062 \end_layout
6064 \begin_layout Itemize
6065 Refactor controller input code.
6066 \end_layout
6068 \begin_layout Itemize
6069 Fix crash when using command line on SDL / Mac OS X.
6070 \end_layout
6072 \begin_layout Subsection
6073 rr1-beta8
6074 \end_layout
6076 \begin_layout Itemize
6077 Delete core/coroutine (obsolete)
6078 \end_layout
6080 \begin_layout Itemize
6081 Lag input display by one frame.
6082 \end_layout
6084 \begin_layout Itemize
6085 Rewind movie to beginning function.
6086 \end_layout
6088 \begin_layout Itemize
6089 Fix wrong frame number reported to Lua when repainting after loadstate
6090 \end_layout
6092 \begin_layout Itemize
6093 Support UI editing of jukebox
6094 \end_layout
6096 \begin_layout Itemize
6097 Wxwidgets: Save settings on exit.
6098 \end_layout
6100 \begin_layout Itemize
6101 Support ${project} for filenames
6102 \end_layout
6104 \begin_layout Itemize
6105 SDL: Fix command history
6106 \end_layout
6108 \begin_layout Subsection
6109 rr1-beta9
6110 \end_layout
6112 \begin_layout Itemize
6113 Fix some order-of-global-ctor bugs.
6114 \end_layout
6116 \begin_layout Subsection
6117 rr1-beta10
6118 \end_layout
6120 \begin_layout Itemize
6121 Fix crashes when quitting on Win32.
6122 \end_layout
6124 \begin_layout Subsection
6125 rr1-beta11
6126 \end_layout
6128 \begin_layout Itemize
6129 EVDEV: Queue keypresses from joystick, don't send directly
6130 \end_layout
6132 \begin_layout Itemize
6133 Wxwidgets: Load-Preserve that actually works.
6134 \end_layout
6136 \begin_layout Subsection
6137 rr1-beta12
6138 \end_layout
6140 \begin_layout Itemize
6141 Wxwidgets: GUI for memory search.
6142 \end_layout
6144 \begin_layout Itemize
6145 Warn about using synchronous queue in UI callback.
6146 \end_layout
6148 \begin_layout Subsection
6149 rr1-beta13
6150 \end_layout
6152 \begin_layout Itemize
6153 Remember last saved file for each ROM
6154 \end_layout
6156 \begin_layout Itemize
6157 Support MT dumping via boost.
6158 \end_layout
6160 \begin_layout Itemize
6161 Lua: input.raw
6162 \end_layout
6164 \begin_layout Itemize
6165 Lua: input.keyhook
6166 \end_layout
6168 \begin_layout Itemize
6169 Make mouse be ordinary input instead of special-casing
6170 \end_layout
6172 \begin_layout Itemize
6173 SDL: Don't screw up commands with NUL codepoints.
6174 \end_layout
6176 \begin_layout Subsection
6177 rr1-beta14
6178 \end_layout
6180 \begin_layout Itemize
6181 Merge status panel and main window
6182 \end_layout
6184 \begin_layout Itemize
6185 True movie slot support (the rest of it)
6186 \end_layout
6188 \begin_layout Itemize
6189 SDL: Fix compilation error
6190 \end_layout
6192 \begin_layout Itemize
6193 Elminate cross calls in dump menu code.
6194 \end_layout
6196 \begin_layout Subsection
6197 rr1-beta15
6198 \end_layout
6200 \begin_layout Itemize
6201 Cancel pending saves command
6202 \end_layout
6204 \begin_layout Itemize
6205 Wxwidgets: Code refactoring
6206 \end_layout
6208 \begin_layout Itemize
6209 Wxwidgets: Fix system -> reset
6210 \end_layout
6212 \begin_layout Itemize
6213 Wxwidgets: Read watch expressions in the right thread
6214 \end_layout
6216 \begin_layout Subsection
6217 rr1-beta16
6218 \end_layout
6220 \begin_layout Itemize
6221 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6222  support that).
6223 \end_layout
6225 \begin_layout Itemize
6226 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6227 \end_layout
6229 \begin_layout Itemize
6230 Don't append trailing '-' to prefix when saving movie.
6231 \end_layout
6233 \begin_layout Itemize
6234 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6235 \end_layout
6237 \begin_layout Subsection
6239 \end_layout
6241 \begin_layout Itemize
6242 Document memory watch syntax.
6243 \end_layout
6245 \begin_layout Subsection
6246 rr1-delta1
6247 \end_layout
6249 \begin_layout Itemize
6250 Fix unattended dumping (lsnes-dumpavi)
6251 \end_layout
6253 \begin_layout Itemize
6254 Support RAW dumping
6255 \end_layout
6257 \begin_layout Itemize
6258 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6259 \end_layout
6261 \begin_layout Itemize
6262 Add option to control sample rate preturbation in AVI dumper
6263 \end_layout
6265 \begin_layout Subsection
6266 rr1-delta2
6267 \end_layout
6269 \begin_layout Itemize
6270 Wxwidgets: Fix dumper submodes
6271 \end_layout
6273 \begin_layout Itemize
6274 Set core controller types before loadstate
6275 \end_layout
6277 \begin_layout Subsection
6278 rr1-delta2epsilon1
6279 \end_layout
6281 \begin_layout Itemize
6282 Fix compiling with bsnes v086.
6283 \end_layout
6285 \begin_layout Subsection
6286 rr1-delta3
6287 \end_layout
6289 \begin_layout Itemize
6290 Don't prompt before quitting
6291 \end_layout
6293 \begin_layout Itemize
6294 Start unpaused, preserve pause/unpause over load.
6295 \end_layout
6297 \begin_layout Itemize
6298 Try to autodetect if ROM is headered.
6299 \end_layout
6301 \begin_layout Itemize
6302 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6303 \end_layout
6305 \begin_layout Itemize
6306 Allow configuring some hotkeys.
6307 \end_layout
6309 \begin_layout Subsection
6310 rr1-delta4
6311 \end_layout
6313 \begin_layout Itemize
6314 Lots of code cleanups
6315 \end_layout
6317 \begin_layout Itemize
6318 Fix JMD compression (JMD dumping was broken)
6319 \end_layout
6321 \begin_layout Itemize
6322 Don't crash if Lua C function throws an exception.
6323 \end_layout
6325 \begin_layout Itemize
6326 Support bitmap drawing in Lua.
6327 \end_layout
6329 \begin_layout Itemize
6330 Fix bsnes v085/v086 patches.
6331 \end_layout
6333 \begin_layout Itemize
6334 Improve stability on win32.
6335 \end_layout
6337 \begin_layout Subsection
6338 rr1-delta4epsilon1
6339 \end_layout
6341 \begin_layout Itemize
6342 Don't corrupt movie if movie length is integer multiple of frames per page.
6343 \end_layout
6345 \begin_layout Subsection
6346 rr1-delta5
6347 \end_layout
6349 \begin_layout Itemize
6350 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6351 \end_layout
6353 \begin_layout Itemize
6354 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6355 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6357 \end_layout
6359 \begin_layout Itemize
6360 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6361 \end_layout
6363 \begin_layout Itemize
6364 Wxwidgets: Fix broken modifiers
6365 \end_layout
6367 \begin_layout Itemize
6368 on_paint has parameter now.
6369 \end_layout
6371 \begin_layout Itemize
6372 Optional initital fill for bitmaps
6373 \end_layout
6375 \begin_layout Itemize
6376 Fix palette changing.
6377 \end_layout
6379 \begin_layout Itemize
6380 Optimize rendering a bit.
6381 \end_layout
6383 \begin_layout Itemize
6384 Bsnes v087 support.
6385 \end_layout
6387 \begin_layout Subsection
6388 rr1-delta5epsilon1
6389 \end_layout
6391 \begin_layout Itemize
6392 Movieinfo: Fix display of port #2 type.
6393 \end_layout
6395 \begin_layout Itemize
6396 Call on_input() after loadstate.
6397 \end_layout
6399 \begin_layout Subsection
6400 rr1-delta5epsilon2
6401 \end_layout
6403 \begin_layout Itemize
6404 Fix writing port2 data to movie.
6405 \end_layout
6407 \begin_layout Itemize
6408 Fix SRAM handling with Bsnes v087.
6409 \end_layout
6411 \begin_layout Subsection
6412 rr1-delta6
6413 \end_layout
6415 \begin_layout Itemize
6416 Library loading support
6417 \end_layout
6419 \begin_layout Itemize
6420 Built-in TSCC encoder
6421 \end_layout
6423 \begin_layout Itemize
6424 Hi-color (256T colors) dumping.
6425 \end_layout
6427 \begin_layout Itemize
6428 Dump over TCP/IP(v6)
6429 \end_layout
6431 \begin_layout Itemize
6432 Hidable status panel
6433 \end_layout
6435 \begin_layout Itemize
6436 Turbo toggle/hold
6437 \end_layout
6439 \begin_layout Itemize
6440 Adjustable sound volume
6441 \end_layout
6443 \begin_layout Itemize
6444 Screen scaling
6445 \end_layout
6447 \begin_layout Itemize
6448 Allow DnD into filename boxes
6449 \end_layout
6451 \begin_layout Itemize
6452 Configurable paths
6453 \end_layout
6455 \begin_layout Itemize
6456 Portaudio: Fix speaker popping at start
6457 \end_layout
6459 \begin_layout Itemize
6460 Lots of UI changes
6461 \end_layout
6463 \begin_layout Itemize
6464 Speed adjustment menu
6465 \end_layout
6467 \begin_layout Itemize
6468 Win32 joystick support
6469 \end_layout
6471 \begin_layout Itemize
6472 Lua: gui.rainbow and gui.box
6473 \end_layout
6475 \begin_layout Itemize
6476 Split key lists into classes (the key list was large!)
6477 \end_layout
6479 \begin_layout Itemize
6480 More save slots support
6481 \end_layout
6483 \begin_layout Itemize
6484 Wxwidgets (wxJoystick) joystick support
6485 \end_layout
6487 \begin_layout Subsection
6488 rr1-delta7
6489 \end_layout
6491 \begin_layout Itemize
6492 Lots of internal joystick refactoring
6493 \end_layout
6495 \begin_layout Itemize
6496 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6497 \end_layout
6499 \begin_layout Itemize
6500 Wxwidgets: Settings mode (open settings without ROM)
6501 \end_layout
6503 \begin_layout Itemize
6504 Wxwidgets: Prompt key to use option
6505 \end_layout
6507 \begin_layout Itemize
6508 Wxwidgets: Fix crash if key goes away underneath
6509 \end_layout
6511 \begin_layout Itemize
6512 Wxwidgets: Fix mouse position in presence of scaling
6513 \end_layout
6515 \begin_layout Itemize
6516 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6517 \end_layout
6519 \begin_layout Itemize
6520 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6521  seem to work well on WinXP)
6522 \end_layout
6524 \begin_layout Itemize
6525 Start paused option.
6526 \end_layout
6528 \begin_layout Subsection
6529 rr1-delta7epsilon1
6530 \end_layout
6532 \begin_layout Itemize
6533 AVI: ZMBV support
6534 \end_layout
6536 \begin_layout Itemize
6537 lsnes-dumpavi: Start Lua before starting dumper
6538 \end_layout
6540 \begin_layout Itemize
6541 AVI: Fix secondary audio in mode 4.
6542 \end_layout
6544 \begin_layout Subsection
6545 rr1-delta7epsilon2
6546 \end_layout
6548 \begin_layout Itemize
6549 AVI: Refactor ZMBV a bit.
6550 \end_layout
6552 \begin_layout Itemize
6553 Fix error reading analog values from movie file
6554 \end_layout
6556 \begin_layout Subsection
6557 rr1-delta8
6558 \end_layout
6560 \begin_layout Itemize
6561 Delayed reset support
6562 \end_layout
6564 \begin_layout Itemize
6565 Lua: memory.hash_region
6566 \end_layout
6568 \begin_layout Subsection
6569 rr1-delta8epsilon1
6570 \end_layout
6572 \begin_layout Itemize
6573 Rework the build system
6574 \end_layout
6576 \begin_layout Itemize
6577 Typing input support
6578 \end_layout
6580 \begin_layout Itemize
6581 Fix building with bsnes v086 and v087.
6582 \end_layout
6584 \begin_layout Itemize
6585 SDL: Save settings on exit
6586 \end_layout
6588 \begin_layout Itemize
6589 SDL: Command to enter command line mode with given command.
6590 \end_layout
6592 \begin_layout Itemize
6593 SDL: More advanced command editing.
6594 \end_layout
6596 \begin_layout Subsection
6597 rr1-delta9
6598 \end_layout
6600 \begin_layout Itemize
6601 wxMSW: Fix the 
6602 \begin_inset Quotes eld
6603 \end_inset
6605 arrow keys and enter don't work
6606 \begin_inset Quotes erd
6607 \end_inset
6609  problem
6610 \end_layout
6612 \begin_layout Itemize
6613 MSU-1 support
6614 \end_layout
6616 \begin_layout Itemize
6617 Show mode changes due to rewinding.
6618 \end_layout
6620 \begin_layout Itemize
6621 Unsafe rewind support
6622 \end_layout
6624 \begin_layout Itemize
6625 Fix directory transversal.
6626 \end_layout
6628 \begin_layout Subsection
6629 rr1-delta10
6630 \end_layout
6632 \begin_layout Itemize
6633 AVI: Sound mode 5 (48kHz high-quality)
6634 \end_layout
6636 \begin_layout Itemize
6637 Lua: Reset Lua VM
6638 \end_layout
6640 \begin_layout Itemize
6641 Map the SNES bus into address space
6642 \end_layout
6644 \begin_layout Itemize
6645 Fix loading memory watch files with CRLF line endings
6646 \end_layout
6648 \begin_layout Subsection
6649 rr1-delta10epsilon1
6650 \end_layout
6652 \begin_layout Itemize
6653 Map bsnes internal state into memory space
6654 \end_layout
6656 \begin_layout Itemize
6657 Fix the 
6658 \begin_inset Quotes eld
6659 \end_inset
6661 click on panel wedges the emulator
6662 \begin_inset Quotes erd
6663 \end_inset
6665  for real.
6666 \end_layout
6668 \begin_layout Itemize
6669 DnD movies/saves on the main window.
6670 \end_layout
6672 \begin_layout Subsection
6673 rr1-delta11
6674 \end_layout
6676 \begin_layout Itemize
6677 Split core bindings into own module.
6678 \end_layout
6680 \begin_layout Itemize
6681 Remember invalid settings
6682 \end_layout
6684 \begin_layout Itemize
6685 Support for modified Gambatte core for GB/GBC emulation.
6686 \end_layout
6688 \begin_layout Itemize
6689 Reload/swap ROM function
6690 \end_layout
6692 \begin_layout Subsection
6693 rr1-delta11epsilon1
6694 \end_layout
6696 \begin_layout Itemize
6697 Fix step poll function
6698 \end_layout
6700 \begin_layout Subsection
6701 rr1-delta12
6702 \end_layout
6704 \begin_layout Itemize
6705 Non-insane savestate anchoring
6706 \end_layout
6708 \begin_layout Subsection
6709 rr1-delta13
6710 \end_layout
6712 \begin_layout Itemize
6713 More Memory search methods
6714 \end_layout
6716 \begin_layout Itemize
6717 Preserve movie if loading in RO mode.
6718 \end_layout
6720 \begin_layout Itemize
6721 Fix a obscure case in timeline check
6722 \end_layout
6724 \begin_layout Itemize
6725 Revamp the entiere ROM loading code
6726 \end_layout
6728 \begin_layout Itemize
6729 Support DnD on ROMs
6730 \end_layout
6732 \begin_layout Itemize
6733 Revamp menu layout
6734 \end_layout
6736 \begin_layout Itemize
6737 Standalone hotkey config dialog
6738 \end_layout
6740 \begin_layout Itemize
6741 Show bindings in more user-friendly format
6742 \end_layout
6744 \begin_layout Subsection
6745 rr1-delta13epsilon1
6746 \end_layout
6748 \begin_layout Itemize
6749 Pipedec support
6750 \end_layout
6752 \begin_layout Itemize
6753 Fix uninitialized variables in bsnes v085
6754 \end_layout
6756 \begin_layout Subsection
6757 rr1-delta14
6758 \end_layout
6760 \begin_layout Itemize
6761 Merge gambatte core into mainline (from its own branch)
6762 \end_layout
6764 \begin_layout Itemize
6765 Wxwidgets: Show expected dump file formats
6766 \end_layout
6768 \begin_layout Itemize
6769 Memory watch: Data typing
6770 \end_layout
6772 \begin_layout Itemize
6773 lsnes internal MMIO area.
6774 \end_layout
6776 \begin_layout Itemize
6777 Wxwidgets: New memory watch editor
6778 \end_layout
6780 \begin_layout Itemize
6781 Hexadecimal memory watches
6782 \end_layout
6784 \begin_layout Itemize
6785 Wxwidgets: Monospaced panel
6786 \end_layout
6788 \begin_layout Itemize
6789 Wxwidgets: Split memory watches in panel
6790 \end_layout
6792 \begin_layout Itemize
6793 Wxwidgets: Disable VMAs in memory search
6794 \end_layout
6796 \begin_layout Itemize
6797 lsnes-dumpavi: Fix speed bug
6798 \end_layout
6800 \begin_layout Itemize
6801 Movie subtitle support
6802 \end_layout
6804 \begin_layout Itemize
6805 Fix rerecord count reporting
6806 \end_layout
6808 \begin_layout Itemize
6809 Don't trash movie when loading in readonly mode.
6810 \end_layout
6812 \begin_layout Subsection
6813 rr1-delta14epsilon1
6814 \end_layout
6816 \begin_layout Itemize
6817 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
6818 \end_layout
6820 \begin_layout Itemize
6821 Fix build on Mac OS X.
6822 \end_layout
6824 \begin_layout Itemize
6825 Lua: loopwrapper
6826 \end_layout
6828 \begin_layout Itemize
6829 Wxwidgets: Hidable messages window
6830 \end_layout
6832 \begin_layout Itemize
6833 Lua: input.joyset
6834 \end_layout
6836 \begin_layout Itemize
6837 Bsnes: Support inconsistent saves
6838 \end_layout
6840 \begin_layout Itemize
6841 Bsnes: Allow simulating saving every frame
6842 \end_layout
6844 \begin_layout Itemize
6845 Fix desync if savestate is loaded in readonly mode in certain conditions.
6846 \end_layout
6848 \begin_layout Itemize
6849 Wxwidgets: Fix save dialogs on Mac OS X.
6850 \end_layout
6852 \begin_layout Itemize
6853 Wxwidgets: Fix insane status width on Win32.
6854 \end_layout
6856 \begin_layout Itemize
6857 Wxwidgets: Fix autohold processing to be faster.
6858 \end_layout
6860 \begin_layout Itemize
6861 Wxwidgets: Allow loading ROMs and movies from commandline.
6862 \end_layout
6864 \begin_layout Subsection
6865 rr1-delta15
6866 \end_layout
6868 \begin_layout Itemize
6869 Be a bit smarter with --load
6870 \end_layout
6872 \begin_layout Itemize
6873 Rewrote higher-level parts of audio system
6874 \end_layout
6876 \begin_layout Itemize
6877 Tool to build commentary tracks
6878 \end_layout
6880 \begin_layout Itemize
6881 Lua: input.joyget
6882 \end_layout
6884 \begin_layout Itemize
6885 Gambatte: Add support for SVN358
6886 \end_layout
6888 \begin_layout Itemize
6889 Use builtin font when rendering status panel.
6890 \end_layout
6892 \begin_layout Itemize
6893 Option to detach memory watch to its own window.
6894 \end_layout
6896 \begin_layout Itemize
6897 Recent ROMs/Movies menu
6898 \end_layout
6900 \begin_layout Itemize
6901 Libao support
6902 \end_layout
6904 \begin_layout Itemize
6905 Useful lag counter for SNES games that autopoll
6906 \end_layout
6908 \begin_layout Itemize
6909 Fix buffer overflow in gambatte sound output
6910 \end_layout
6912 \begin_layout Subsection
6913 rr1-delta15epsilon1
6914 \end_layout
6916 \begin_layout Itemize
6917 Don't blow up on wxGTK if the window is hidden somehow
6918 \end_layout
6920 \begin_layout Itemize
6921 Support simultaneous drop of ROM and movie.
6922 \end_layout
6924 \begin_layout Itemize
6925 Gambatte: Don't save spurious SRAMs.
6926 \end_layout
6928 \begin_layout Itemize
6929 Make SGB ROMs actually usable.
6930 \end_layout
6932 \begin_layout Itemize
6933 Fix so that saved movies appear in recent movies.
6934 \end_layout
6936 \begin_layout Itemize
6937 Don't open multiple commentary editors at once.
6938 \end_layout
6940 \begin_layout Subsection
6941 rr1-delta15epsilon2
6942 \end_layout
6944 \begin_layout Itemize
6945 Lua: memory.readregion/memory.writeregion
6946 \end_layout
6948 \begin_layout Itemize
6949 Lua: memory.map{,s}{byte,word,dword,qword}
6950 \end_layout
6952 \begin_layout Itemize
6953 Lua: memory.map_structure
6954 \end_layout
6956 \begin_layout Itemize
6957 Lua: Fix bus_address for gambatte
6958 \end_layout
6960 \begin_layout Itemize
6961 Fix features dependent of bsnes debugger
6962 \end_layout
6964 \begin_layout Itemize
6965 Cleanup bsnes debugger logic
6966 \end_layout
6968 \begin_layout Itemize
6969 Fix resets in presence of save every frame
6970 \end_layout
6972 \begin_layout Subsection
6973 rr1-delta15epsilon3
6974 \end_layout
6976 \begin_layout Itemize
6977 Lua: input.lcid_to_pcid
6978 \end_layout
6980 \begin_layout Itemize
6981 Fix off-by-one bug with slot hashes
6982 \end_layout
6984 \begin_layout Itemize
6985 Fix crashes on certain memory watch expressions
6986 \end_layout
6988 \begin_layout Itemize
6989 Lua: memory.read_expr
6990 \end_layout
6992 \begin_layout Itemize
6993 Lua: Fix memory.read_expr on nil argument
6994 \end_layout
6996 \begin_layout Itemize
6997 Fix the code to compile on G++ 4.7
6998 \end_layout
7000 \begin_layout Itemize
7001 Change button_id to be a function pointer field, not a virtual method
7002 \end_layout
7004 \begin_layout Itemize
7005 Add bsnes patches to fix libsnes to compile on GCC 4.7
7006 \end_layout
7008 \begin_layout Itemize
7009 Gambatte: Always use legacy lag counting
7010 \end_layout
7012 \begin_layout Itemize
7013 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
7014 \end_layout
7016 \begin_layout Itemize
7017 Fix analog controllers
7018 \end_layout
7020 \begin_layout Itemize
7021 Fix autohold menus
7022 \end_layout
7024 \begin_layout Itemize
7025 Fix button symbols in input display
7026 \end_layout
7028 \begin_layout Itemize
7029 Compensate for nuts bsnes superscope/justifier handling
7030 \end_layout
7032 \begin_layout Itemize
7033 Lua: Fix bit.extract boolean handling
7034 \end_layout
7036 \end_body
7037 \end_document