Movie editor: Reorganize the popup menu a bit
[lsnes.git] / manual.lyx
blobc59b5a112cafde2af50be00a530e5653fe769bb6
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 Video dumping
726 \end_layout
728 \begin_layout Standard
729 Following commands control video dumping:
730 \end_layout
732 \begin_layout Subsubsection
733 start-dump <dumper> [<mode>] <prefix/filename>
734 \end_layout
736 \begin_layout Standard
737 Start dumping using dumper <dumper>.
738  If mode is present or not and if prefix or filename is present depends
739  on the dumper and dumper mode.
740 \end_layout
742 \begin_layout Standard
743 The following dumpers are available:
744 \end_layout
746 \begin_layout Itemize
747 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
748 \end_layout
750 \begin_deeper
751 \begin_layout Itemize
752 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
753  Takes prefix.
754 \end_layout
756 \begin_layout Itemize
757 Mode: cscd/pcm: CSCD video, PCM audio.
758  Takes prefix.
759 \end_layout
761 \end_deeper
762 \begin_layout Itemize
763 INTERNAL-JMD: Internal .jmd dumper.
764 \end_layout
766 \begin_deeper
767 \begin_layout Itemize
768 Does not take mode.
769 \end_layout
771 \begin_layout Itemize
772 Takes a filename.
773 \end_layout
775 \end_deeper
776 \begin_layout Itemize
777 INTERNAL-RAW: Internal RAW dumper.
778 \end_layout
780 \begin_deeper
781 \begin_layout Itemize
782 Does not take mode.
783 \end_layout
785 \begin_layout Itemize
786 Takes a prefix.
787 \end_layout
789 \begin_layout Itemize
790 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
791 \end_layout
793 \begin_layout Itemize
794 Video is always upscaled to double resolution (512x448 / 512 x 478).
795 \end_layout
797 \begin_layout Itemize
798 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
799  for NTSC.
800 \end_layout
802 \end_deeper
803 \begin_layout Itemize
804 INTERNAL-SDMP: Internal SDMP dumper.
805 \end_layout
807 \begin_deeper
808 \begin_layout Itemize
809 Mode 'ms': Multi-segment.
810  Takes prefix.
811 \end_layout
813 \begin_layout Itemize
814 Mode 'ss': Single-segment.
815  Takes filename.
816 \end_layout
818 \end_deeper
819 \begin_layout Subsubsection
820 end-dump <dumper>
821 \end_layout
823 \begin_layout Standard
824 End dumping using <dumper>
825 \end_layout
827 \begin_layout Subsubsection
828 show-dumpers [<dumper>]
829 \end_layout
831 \begin_layout Standard
832 Show the list of dumpers or list of modes for <dumper>
833 \end_layout
835 \begin_layout Subsection
836 Memory manipulation
837 \end_layout
839 \begin_layout Standard
840 <address> may be decimal or hexadecimal (prefixed with '0x').
841  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
842  with '-') decimal.
843 \end_layout
845 \begin_layout Standard
846 The available element <sizes> are:
847 \end_layout
849 \begin_layout Itemize
850 byte: 1 byte
851 \end_layout
853 \begin_layout Itemize
854 word: 2 bytes
855 \end_layout
857 \begin_layout Itemize
858 dword: 4 bytes
859 \end_layout
861 \begin_layout Itemize
862 qword: 8 bytes
863 \end_layout
865 \begin_layout Standard
866 When reading RAM and ROM, multi-byte reads/writes are big-endian.
867  When dealing with DSP memory, multi-byte reads/writes are native-endian
868  (do not use operand sizes exceeding DSP bitness, except dword is OK for
869  24-bit memory).
870 \end_layout
872 \begin_layout Subsubsection
873 read-<size> <address>
874 \end_layout
876 \begin_layout Standard
877 Read the value of byte in <address>.
878 \end_layout
880 \begin_layout Subsubsection
881 read-s<size> <address>
882 \end_layout
884 \begin_layout Standard
885 Read the value of signed byte in <address>.
886 \end_layout
888 \begin_layout Subsubsection
889 write-<size> <address> <value>
890 \end_layout
892 \begin_layout Standard
893 Write <value> to byte in address <address>.
894 \end_layout
896 \begin_layout Subsubsection
897 search-memory reset
898 \end_layout
900 \begin_layout Standard
901 Reset the memory search
902 \end_layout
904 \begin_layout Subsubsection
905 search-memory count
906 \end_layout
908 \begin_layout Standard
909 Print number of candidates remaining
910 \end_layout
912 \begin_layout Subsubsection
913 search-memory print
914 \end_layout
916 \begin_layout Standard
917 Print all candidates remaining
918 \end_layout
920 \begin_layout Subsubsection
921 search-memory <usflag><sizeflag><op>
922 \end_layout
924 \begin_layout Standard
925 Searches memory for addresses satisfying criteria.
926 \end_layout
928 \begin_layout Standard
929 <usflag> can be:
930 \end_layout
932 \begin_layout Itemize
933 u: unsigned
934 \end_layout
936 \begin_layout Itemize
937 s: signed
938 \end_layout
940 \begin_layout Standard
941 <sizeflag> can be:
942 \end_layout
944 \begin_layout Itemize
945 b: byte
946 \end_layout
948 \begin_layout Itemize
949 w: word
950 \end_layout
952 \begin_layout Itemize
953 d: dword
954 \end_layout
956 \begin_layout Itemize
957 q: qword
958 \end_layout
960 \begin_layout Standard
961 <op> can be:
962 \end_layout
964 \begin_layout Itemize
965 lt: < previous value.
966 \end_layout
968 \begin_layout Itemize
969 le: <= previous value.
970 \end_layout
972 \begin_layout Itemize
973 eq: = previous value.
974 \end_layout
976 \begin_layout Itemize
977 ne: != previous value.
978 \end_layout
980 \begin_layout Itemize
981 ge: >= previous value.
982 \end_layout
984 \begin_layout Itemize
985 gt: > previous value.
986 \end_layout
988 \begin_layout Subsubsection
989 search-memory <sizeflag> <value>
990 \end_layout
992 \begin_layout Standard
993 Searches for addresses that currently have value <value>.
994  <sizeflag> is as in previous command.
995 \end_layout
997 \begin_layout Subsection
998 Main commands
999 \end_layout
1001 \begin_layout Standard
1002 These commands are not available in lsnesrc, but are available after ROM
1003  has been loaded.
1004 \end_layout
1006 \begin_layout Subsubsection
1007 quit-emulator [/y]
1008 \end_layout
1010 \begin_layout Standard
1011 Quits the emulator (asking for confirmation).
1012  If /y is given, no confirmation is asked.
1013 \end_layout
1015 \begin_layout Subsubsection
1016 pause-emulator
1017 \end_layout
1019 \begin_layout Standard
1020 Toggle paused/unpaused
1021 \end_layout
1023 \begin_layout Subsubsection
1024 +advance-frame 
1025 \end_layout
1027 \begin_layout Standard
1028 Advance frame.
1029  If the button is still held after configurable timeout expires, game unpauses
1030  for the duration frame advance is held.
1031 \end_layout
1033 \begin_layout Subsubsection
1034 +advance-poll 
1035 \end_layout
1037 \begin_layout Standard
1038 Advance subframe.
1039  If the button is still held after configurable timeout expires, game unpauses
1040  for the duration frame advance is held.
1041 \end_layout
1043 \begin_layout Subsubsection
1044 advance-skiplag 
1045 \end_layout
1047 \begin_layout Standard
1048 Skip to first poll in frame after current.
1049 \end_layout
1051 \begin_layout Subsubsection
1052 reset 
1053 \end_layout
1055 \begin_layout Standard
1056 Reset the SNES after this frame.
1057 \end_layout
1059 \begin_layout Subsubsection
1060 load <filename> 
1061 \end_layout
1063 \begin_layout Standard
1064 Load savestate <filename> in current mode.
1065 \end_layout
1067 \begin_layout Subsubsection
1068 load-state <filename> 
1069 \end_layout
1071 \begin_layout Standard
1072 Load savestate <filename> in readwrite mode.
1073 \end_layout
1075 \begin_layout Subsubsection
1076 load-readonly <filename> 
1077 \end_layout
1079 \begin_layout Standard
1080 Load savestate <filename> in readonly mode.
1081 \end_layout
1083 \begin_layout Subsubsection
1084 load-preserve <filename> 
1085 \end_layout
1087 \begin_layout Standard
1088 Load savestate <filename> in readonly mode, preserving current events.
1089 \end_layout
1091 \begin_layout Subsubsection
1092 load-movie <filename> 
1093 \end_layout
1095 \begin_layout Standard
1096 Load savestate <filename>, ignoring save part in readonly mode.
1097 \end_layout
1099 \begin_layout Subsubsection
1100 save-state <filename> 
1101 \end_layout
1103 \begin_layout Standard
1104 Save system state to <filename> as soon as possible.
1105 \end_layout
1107 \begin_layout Subsubsection
1108 save-movie <filename> 
1109 \end_layout
1111 \begin_layout Standard
1112 Save movie to <filename>.
1113 \end_layout
1115 \begin_layout Subsubsection
1116 set-rwmode 
1117 \end_layout
1119 \begin_layout Standard
1120 Set read-write mode.
1121 \end_layout
1123 \begin_layout Subsubsection
1124 set-romode 
1125 \end_layout
1127 \begin_layout Standard
1128 Set read-only mode
1129 \end_layout
1131 \begin_layout Subsubsection
1132 toggle-rwmode 
1133 \end_layout
1135 \begin_layout Standard
1136 Toggle between read-only and read-write modes.
1137 \end_layout
1139 \begin_layout Subsubsection
1140 set-gamename <name> 
1141 \end_layout
1143 \begin_layout Standard
1144 Set name of the game to <name>
1145 \end_layout
1147 \begin_layout Subsubsection
1148 get-gamename 
1149 \end_layout
1151 \begin_layout Standard
1152 Print the name of the game.
1153 \end_layout
1155 \begin_layout Subsubsection
1156 add-author <author> 
1157 \end_layout
1159 \begin_layout Standard
1160 Adds new author <author>.
1161  If <author> does not contain '|' it is full name.
1162  If it contains '|', '|' splits the full name and nickname.
1163 \end_layout
1165 \begin_layout Subsubsection
1166 edit-author <num> <author> 
1167 \end_layout
1169 \begin_layout Standard
1170 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1171  format)
1172 \end_layout
1174 \begin_layout Subsubsection
1175 remove-author <num> 
1176 \end_layout
1178 \begin_layout Standard
1179 Remove author in slot <num>
1180 \end_layout
1182 \begin_layout Subsubsection
1183 print-authors 
1184 \end_layout
1186 \begin_layout Standard
1187 Print authors.
1188 \end_layout
1190 \begin_layout Subsubsection
1191 test-1, test-2, test-3
1192 \end_layout
1194 \begin_layout Standard
1195 Internal test commands.
1196  Don't use.
1197 \end_layout
1199 \begin_layout Subsubsection
1200 take-screenshot <filename> 
1201 \end_layout
1203 \begin_layout Standard
1204 Save screenshot to <filename>.
1205 \end_layout
1207 \begin_layout Subsubsection
1208 +controller<num><button>
1209 \end_layout
1211 \begin_layout Standard
1212 Press button <button> on controller <num> (1-8).
1213  The following button names are known:
1214 \end_layout
1216 \begin_layout Itemize
1217 left
1218 \end_layout
1220 \begin_layout Itemize
1221 right
1222 \end_layout
1224 \begin_layout Itemize
1226 \end_layout
1228 \begin_layout Itemize
1229 down
1230 \end_layout
1232 \begin_layout Itemize
1234 \end_layout
1236 \begin_layout Itemize
1238 \end_layout
1240 \begin_layout Itemize
1242 \end_layout
1244 \begin_layout Itemize
1246 \end_layout
1248 \begin_layout Itemize
1250 \end_layout
1252 \begin_layout Itemize
1254 \end_layout
1256 \begin_layout Itemize
1257 select
1258 \end_layout
1260 \begin_layout Itemize
1261 start
1262 \end_layout
1264 \begin_layout Itemize
1265 trigger
1266 \end_layout
1268 \begin_layout Itemize
1269 cursor
1270 \end_layout
1272 \begin_layout Itemize
1273 pause
1274 \end_layout
1276 \begin_layout Itemize
1277 turbo
1278 \end_layout
1280 \begin_layout Subsubsection
1281 controllerh<num><button>
1282 \end_layout
1284 \begin_layout Standard
1285 Hold/unhold button <button> on controller <num> (1-8).
1286  See +controller for button names.
1287 \end_layout
1289 \begin_layout Subsubsection
1290 controllerf<num><button>
1291 \end_layout
1293 \begin_layout Standard
1294 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1295  See +controller for button names.
1296 \end_layout
1298 \begin_layout Standard
1299 Cauntion: Does not work properly if outside frame advance.
1300 \end_layout
1302 \begin_layout Subsubsection
1303 autofire (<pattern>|-)...
1304 \end_layout
1306 \begin_layout Standard
1307 Set autofire pattern.
1308  Each parameter is comma-separated list of button names (in form of 1start,
1309  1A, 2B, etc..) to hold on that frame.
1310  After reaching the end of pattern, the pattern restarts from the beginning.
1311 \end_layout
1313 \begin_layout Subsubsection
1314 repaint
1315 \end_layout
1317 \begin_layout Standard
1318 Force a repaint.
1319 \end_layout
1321 \begin_layout Subsection
1322 Save jukebox 
1323 \end_layout
1325 \begin_layout Subsubsection
1326 cycle-jukebox-backward
1327 \end_layout
1329 \begin_layout Standard
1330 Cycle save jukebox backwards.
1331 \end_layout
1333 \begin_layout Subsubsection
1334 cycle-jukebox-forward
1335 \end_layout
1337 \begin_layout Standard
1338 Cycle save jukebox forwards
1339 \end_layout
1341 \begin_layout Subsubsection
1342 load-jukebox
1343 \end_layout
1345 \begin_layout Standard
1346 Do load from jukebox (current mode).
1347 \end_layout
1349 \begin_layout Subsubsection
1350 save-jukebox
1351 \end_layout
1353 \begin_layout Standard
1354 Do state save to jukebox.
1355 \end_layout
1357 \begin_layout Subsection
1358 Lua 
1359 \end_layout
1361 \begin_layout Standard
1362 Only available if lua support is compiled in.
1363 \end_layout
1365 \begin_layout Subsubsection
1366 evaluate-lua <luacode>
1367 \end_layout
1369 \begin_layout Standard
1370 Run Lua code <luacode> using built-in Lua interpretter.
1371 \end_layout
1373 \begin_layout Subsubsection
1374 run-lua <script>
1375 \end_layout
1377 \begin_layout Standard
1378 Run specified lua file using built-in Lua interpretter.
1379 \end_layout
1381 \begin_layout Subsubsection
1382 reset-lua
1383 \end_layout
1385 \begin_layout Standard
1386 Clear the Lua VM state and restore to factory defaults.
1387 \end_layout
1389 \begin_layout Subsection
1390 Memory watch
1391 \end_layout
1393 \begin_layout Subsubsection
1394 add-watch <name> <expression>
1395 \end_layout
1397 \begin_layout Standard
1398 Adds new watch (or modifies old one).
1399 \end_layout
1401 \begin_layout Subsubsection
1402 remove-watch <name>
1403 \end_layout
1405 \begin_layout Standard
1406 Remove a watch.
1407 \end_layout
1409 \begin_layout Subsection
1410 Sound 
1411 \end_layout
1413 \begin_layout Subsubsection
1414 enable-sound <on/off> 
1415 \end_layout
1417 \begin_layout Standard
1418 Enable/Disable sound.
1419 \end_layout
1421 \begin_layout Subsubsection
1422 set-sound-device <device> 
1423 \end_layout
1425 \begin_layout Standard
1426 Set sound device to <device>
1427 \end_layout
1429 \begin_layout Subsubsection
1430 show-sound-status 
1431 \end_layout
1433 \begin_layout Standard
1434 Show status of sound system.
1435 \end_layout
1437 \begin_layout Subsubsection
1438 show-sound-devices
1439 \end_layout
1441 \begin_layout Standard
1442 Show all available devices.
1443 \end_layout
1445 \begin_layout Subsubsection
1446 set-volume <multiplier>
1447 \end_layout
1449 \begin_layout Standard
1450 Set the volume multiplier to <multiplier>.
1451  1 is normal volume, and higher numbers are louder.
1452 \end_layout
1454 \begin_layout Subsubsection
1455 set-volume <multiplier>%
1456 \end_layout
1458 \begin_layout Standard
1459 Set the volume multiplier to <multiplier> percent.
1460  100 is normal volume, and higher numbers are louder.
1461 \end_layout
1463 \begin_layout Subsubsection
1464 set-volume <multiplier>dB
1465 \end_layout
1467 \begin_layout Standard
1468 Set the volume multiplier to <multiplier> dB.
1469  0 is normal volume, and higher numbers are louder.
1470  The value may be negative.
1471 \end_layout
1473 \begin_layout Subsection
1474 Misc.
1475 \end_layout
1477 \begin_layout Subsubsection
1478 reload-rom [<file>]
1479 \end_layout
1481 \begin_layout Standard
1482 Reloads the main ROM image from <file>.
1483 \end_layout
1485 \begin_layout Subsubsection
1486 edit-subtitle <firstframe> <length> [<text>]
1487 \end_layout
1489 \begin_layout Standard
1490 Edit or delete a subtitle.
1491 \end_layout
1493 \begin_layout Subsubsection
1494 list-subtitle
1495 \end_layout
1497 \begin_layout Standard
1498 List subtitles.
1499 \end_layout
1501 \begin_layout Subsection
1502 Commentary track
1503 \end_layout
1505 \begin_layout Subsubsection
1506 list-streams
1507 \end_layout
1509 \begin_layout Standard
1510 List streams
1511 \end_layout
1513 \begin_layout Subsubsection
1514 play-stream <id>
1515 \end_layout
1517 \begin_layout Standard
1518 Play stream <id>.
1519 \end_layout
1521 \begin_layout Subsubsection
1522 delete-stream <id>
1523 \end_layout
1525 \begin_layout Standard
1526 Delete stream <id>
1527 \end_layout
1529 \begin_layout Subsubsection
1530 change-timebase <id> <newbase>
1531 \end_layout
1533 \begin_layout Standard
1534 Change time base of <id> to <newbase>.
1535  The time base can be given as samples (integer) or second (postfix with
1536  s).
1537 \end_layout
1539 \begin_layout Subsubsection
1540 import-stream-opus <timebase> <file>
1541 \end_layout
1543 \begin_layout Standard
1544 Import opus stream from <file>, placing it at <timebase>.
1545  This operation is lossless.
1546 \end_layout
1548 \begin_layout Subsubsection
1549 import-stream-pcm <timebase> <file>
1550 \end_layout
1552 \begin_layout Standard
1553 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1554 \end_layout
1556 \begin_layout Subsubsection
1557 export-stream-opus <id> <file>
1558 \end_layout
1560 \begin_layout Standard
1561 Export stream <id> as opus stream to <file>.
1562  This operation is lossless.
1563 \end_layout
1565 \begin_layout Subsubsection
1566 export-stream-pcm <id> <file>
1567 \end_layout
1569 \begin_layout Standard
1570 Export stream <id> as PCM (.sox) stream to <file>.
1572 \end_layout
1574 \begin_layout Subsubsection
1575 export-superstream <file>
1576 \end_layout
1578 \begin_layout Standard
1579 Export the entiere superstream as PCM (.sox) stream to <file>.
1580 \end_layout
1582 \begin_layout Subsubsection
1583 load-collection <file>
1584 \end_layout
1586 \begin_layout Standard
1587 Load collection (if there is existing collection, unload it) from <file>
1588 \end_layout
1590 \begin_layout Subsubsection
1591 unload-collection
1592 \end_layout
1594 \begin_layout Standard
1595 Unload collection.
1596 \end_layout
1598 \begin_layout Subsubsection
1599 +tangent
1600 \end_layout
1602 \begin_layout Standard
1603 Tangent for recording voice for commentary track.
1604  While pressed, record a stream.
1605 \end_layout
1607 \begin_layout Subsection
1608 SDL Platform commands 
1609 \end_layout
1611 \begin_layout Standard
1612 The following are valid on SDL platform.
1613 \end_layout
1615 \begin_layout Subsubsection
1616 identify-key
1617 \end_layout
1619 \begin_layout Standard
1620 Asks to press a key and then identifies that (pseudo-)key.
1621 \end_layout
1623 \begin_layout Subsubsection
1624 toggle-console 
1625 \end_layout
1627 \begin_layout Standard
1628 Toggle between windowed/fullscreen console.
1629 \end_layout
1631 \begin_layout Subsubsection
1632 scroll-fullup 
1633 \end_layout
1635 \begin_layout Standard
1636 Scroll messages window as far back as it goes.
1637 \end_layout
1639 \begin_layout Subsubsection
1640 scroll-fulldown 
1641 \end_layout
1643 \begin_layout Standard
1644 Scroll messages window as far forward as it goes.
1645 \end_layout
1647 \begin_layout Subsubsection
1648 scroll-up 
1649 \end_layout
1651 \begin_layout Standard
1652 Scroll messages window back one screenful.
1653 \end_layout
1655 \begin_layout Subsubsection
1656 scroll-down 
1657 \end_layout
1659 \begin_layout Standard
1660 Scroll messages window forward one screenful.
1661 \end_layout
1663 \begin_layout Subsubsection
1664 prompt-command <command>
1665 \end_layout
1667 \begin_layout Standard
1668 Enter command prompt, with prompt prepopulated with specified command.
1669 \end_layout
1671 \begin_layout Section
1672 Settings
1673 \end_layout
1675 \begin_layout Subsection
1676 Core settings
1677 \end_layout
1679 \begin_layout Subsubsection
1680 firmwarepath
1681 \end_layout
1683 \begin_layout Standard
1684 Set where bsnes looks for firmware files.
1685  Default is 
1686 \begin_inset Quotes eld
1687 \end_inset
1690 \begin_inset Quotes erd
1691 \end_inset
1694 \end_layout
1696 \begin_layout Subsubsection
1697 target
1698 \end_layout
1700 \begin_layout Standard
1701 Set the target .
1702  Numeric, range is 0.001 to 
1703 \begin_inset Quotes eld
1704 \end_inset
1706 infinite
1707 \begin_inset Quotes erd
1708 \end_inset
1711  Default is native framerate.
1712 \end_layout
1714 \begin_layout Subsubsection
1715 savecompression
1716 \end_layout
1718 \begin_layout Standard
1719 Set save compression level (integer 0-9).
1720  Default is 7 (0 is no compression).
1721 \end_layout
1723 \begin_layout Subsubsection
1724 advance-timeout
1725 \end_layout
1727 \begin_layout Standard
1728 Set the frame advance timeout in milliseconds.
1729  Numeric integer, range is 0-999999999.
1730  Default is 500.
1731 \end_layout
1733 \begin_layout Subsubsection
1734 allow-inconsistent-saves (bsnes only)
1735 \end_layout
1737 \begin_layout Standard
1738 If true, save without synchronization.
1739  Makes games seriously unstable.
1740 \end_layout
1742 \begin_layout Subsubsection
1743 save-every-frame (bsnes only)
1744 \end_layout
1746 \begin_layout Standard
1747 If true, simulate saving on each frame.
1748  Trades off emulation accuracy for sync stability.
1749  Also needed if the movie assumes saving on each frame for rewind.
1750 \end_layout
1752 \begin_layout Subsection
1753 AVI dumper settings
1754 \end_layout
1756 \begin_layout Subsubsection
1757 avi-large
1758 \end_layout
1760 \begin_layout Standard
1761 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1762  outputs.
1763 \end_layout
1765 \begin_layout Subsubsection
1766 avi-left-border
1767 \end_layout
1769 \begin_layout Standard
1770 AVI dumper: Set the default left border thickness (unless lua overrides)
1771  for dumps.
1772  Range 0-8191.
1773  Default is 0.
1774 \end_layout
1776 \begin_layout Subsubsection
1777 avi-right-border
1778 \end_layout
1780 \begin_layout Standard
1781 AVI dumper: Set the default right border thickness (unless lua overrides)
1782  for dumps.
1783  Range 0-8191.
1784  Default is 0.
1785 \end_layout
1787 \begin_layout Subsubsection
1788 avi-top-border
1789 \end_layout
1791 \begin_layout Standard
1792 AVI dumper: Set the default top border thickness (unless lua overrides)
1793  for dumps.
1794  Range 0-8191.
1795  Default is 0.
1796 \end_layout
1798 \begin_layout Subsubsection
1799 avi-bottom-border
1800 \end_layout
1802 \begin_layout Standard
1803 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1804  for dumps.
1805  Range 0-8191.
1806  Default is 0.
1807 \end_layout
1809 \begin_layout Subsubsection
1810 avi-maxframes
1811 \end_layout
1813 \begin_layout Standard
1814 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1815  Range 0-999999999.
1816  Default is 0.
1817 \end_layout
1819 \begin_layout Subsubsection
1820 avi-compresison
1821 \end_layout
1823 \begin_layout Standard
1824 AVI dumper: Compression level (0-18).
1825 \end_layout
1827 \begin_layout Itemize
1828 Compression levels 10 and above are not compatible with stock CSCD codec.
1829 \end_layout
1831 \begin_layout Itemize
1832 Recomended level is 7.
1833 \end_layout
1835 \begin_layout Subsubsection
1836 avi-soundrate
1837 \end_layout
1839 \begin_layout Standard
1840 AVI dumper: Set method of determining the sound rate.
1841 \end_layout
1843 \begin_layout Itemize
1844 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1845  128, 176.4 and 192 kHz.
1846 \end_layout
1848 \begin_layout Itemize
1849 1: Round down to nearest integer.
1850 \end_layout
1852 \begin_layout Itemize
1853 2: Round up to nearest ingeter.
1854 \end_layout
1856 \begin_layout Subsection
1857 JMD options
1858 \end_layout
1860 \begin_layout Subsubsection
1861 jmd-copression
1862 \end_layout
1864 \begin_layout Standard
1865 JMD dumper: Compression level (0-9).
1866 \end_layout
1868 \begin_layout Subsection
1869 SDL platform settings
1870 \end_layout
1872 \begin_layout Subsubsection
1873 autorepeat-first-delay
1874 \end_layout
1876 \begin_layout Standard
1877 Sets the delay for first character in typematic autorepeat.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 autorepeat-subsequent-delay
1882 \end_layout
1884 \begin_layout Standard
1885 Sets the delay for subsequent characters in typematic autorepeat.
1886 \end_layout
1888 \begin_layout Section
1889 Lua functions
1890 \end_layout
1892 \begin_layout Subsection
1893 Core (in main table)
1894 \end_layout
1896 \begin_layout Subsubsection
1897 print
1898 \end_layout
1900 \begin_layout Standard
1901 Print line to message console.
1902 \end_layout
1904 \begin_layout Subsubsection
1905 exec(string command)
1906 \end_layout
1908 \begin_layout Standard
1909 Run command as it was entered on the command line
1910 \end_layout
1912 \begin_layout Subsubsection
1913 utime()
1914 \end_layout
1916 \begin_layout Standard
1917 Returns two values.
1918  First is time since some epoch in seconds, the second is microseconds mod
1919  10^6 since that epoch.
1920 \end_layout
1922 \begin_layout Subsubsection
1923 emulator_ready()
1924 \end_layout
1926 \begin_layout Standard
1927 Returns true if emulator has finished booting, false if not (on_startup()
1928  will be issued later).
1929 \end_layout
1931 \begin_layout Subsubsection
1932 set_idle_timeout(number timeout)
1933 \end_layout
1935 \begin_layout Standard
1936 Set number of microseconds to block idle for.
1937  After this timeout has expired, on_idle() will be called once.
1938 \end_layout
1940 \begin_layout Subsubsection
1941 set_timer_timeout(number timeout)
1942 \end_layout
1944 \begin_layout Standard
1945 Set number of microseconds to block timer for.
1946  After this timeout has expired, on_timer() will be called once.
1947 \end_layout
1949 \begin_layout Subsubsection
1950 bus_address(number snesaddr)
1951 \end_layout
1953 \begin_layout Standard
1954 Returns virtual address corresponding to specified address on SNES bus.
1955 \end_layout
1957 \begin_layout Subsubsection
1958 loopwrapper(function fun, ...)
1959 \end_layout
1961 \begin_layout Standard
1962 Calls function fun with function and specified arguments.
1963  The function passed suspends execution until the function returned is called.
1964  Handy for linear flow control among multiple invocations of a hook.
1965  Example code:
1966 \end_layout
1968 \begin_layout LyX-Code
1969 on_paint = loopwrapper(function(wait)
1970 \end_layout
1972 \begin_deeper
1973 \begin_layout LyX-Code
1974 while true do
1975 \end_layout
1977 \begin_deeper
1978 \begin_layout LyX-Code
1979 gui.text(0, 0, 
1980 \begin_inset Quotes eld
1981 \end_inset
1983 Test!
1984 \begin_inset Quotes erd
1985 \end_inset
1988 \end_layout
1990 \begin_layout LyX-Code
1991 wait();
1992 \end_layout
1994 \end_deeper
1995 \begin_layout LyX-Code
1997 \end_layout
1999 \end_deeper
2000 \begin_layout LyX-Code
2001 end);
2002 \end_layout
2004 \begin_layout Subsection
2005 Table bit:
2006 \end_layout
2008 \begin_layout Standard
2009 Bitwise logical functions and related.
2010 \end_layout
2012 \begin_layout Subsubsection
2013 bit.none(number...) / bit.bnot(number...)
2014 \end_layout
2016 \begin_layout Standard
2017 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2018  arguments).
2019 \end_layout
2021 \begin_layout Subsubsection
2022 bit.any(number...) / bit.bor(number...)
2023 \end_layout
2025 \begin_layout Standard
2026 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2027 \end_layout
2029 \begin_layout Subsubsection
2030 bit.all(number...) / bit.band(number...)
2031 \end_layout
2033 \begin_layout Standard
2034 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2036 \end_layout
2038 \begin_layout Subsubsection
2039 bit.parity(number...) / bit.bxor(number...)
2040 \end_layout
2042 \begin_layout Standard
2043 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2044  of the arguments).
2045 \end_layout
2047 \begin_layout Subsubsection
2048 bit.lrotate(number base[, number amount[, number bits]])
2049 \end_layout
2051 \begin_layout Standard
2052 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2053 \end_layout
2055 \begin_layout Subsubsection
2056 bit.rrotate(number base[, number amount[, number bits]])
2057 \end_layout
2059 \begin_layout Standard
2060 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2061  places.
2062 \end_layout
2064 \begin_layout Subsubsection
2065 bit.lshift(number base[, number amount[, number bits]])
2066 \end_layout
2068 \begin_layout Standard
2069 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2070  The new bits are filled with zeroes.
2071 \end_layout
2073 \begin_layout Subsubsection
2074 bit.lrshift(number base[, number amount[, number bits]])
2075 \end_layout
2077 \begin_layout Standard
2078 Shift bits-bit (max 48, default 48) number logically right by amount (default
2079  1) places.
2080  The new bits are filled with zeroes.
2081 \end_layout
2083 \begin_layout Subsubsection
2084 bit.arshift(number base[, number amount[, number bits]])
2085 \end_layout
2087 \begin_layout Standard
2088 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2089  (default 1) places.
2090  The new bits are shifted in with copy of the high bit.
2091 \end_layout
2093 \begin_layout Subsubsection
2094 bit.extract(number base[, number bit0[, number bit1,...]])
2095 \end_layout
2097 \begin_layout Standard
2098 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2099 \end_layout
2101 \begin_layout Standard
2102 Notes: 
2103 \end_layout
2105 \begin_layout Itemize
2106 Bit numbers up to 51 should work reliably (then things start falling apart
2107  due to double precision issues).
2108 \end_layout
2110 \begin_layout Itemize
2111 There are two special bit positions, true and false, standing for always
2112  set bit and always clear bit.
2113 \end_layout
2115 \begin_layout Subsubsection
2116 bit.value([number bit1[, number bit2,...]])
2117 \end_layout
2119 \begin_layout Standard
2120 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2121  places and so on.
2122  As special value, nil argument is no-op.
2123 \end_layout
2125 \begin_layout Subsubsection
2126 bit.test_any(number a, number b)
2127 \end_layout
2129 \begin_layout Standard
2130 Is there a common set bit in a and b?
2131 \end_layout
2133 \begin_layout Subsubsection
2134 bit.test_all(number a, number b)
2135 \end_layout
2137 \begin_layout Standard
2138 Are all set bits in b also set in a?
2139 \end_layout
2141 \begin_layout Subsubsection
2142 bit.popcount(number a)
2143 \end_layout
2145 \begin_layout Standard
2146 Population count of a.
2147 \end_layout
2149 \begin_layout Subsubsection
2150 bit.clshift(number a, number b, [number amount,[number bits]])
2151 \end_layout
2153 \begin_layout Standard
2154 Does chained left shift on a, b by amount positions, assuming numbers to
2155  be of specified number of bits.
2156 \end_layout
2158 \begin_layout Subsubsection
2159 bit.crshift(number a, number b, [number amount,[number bits]])
2160 \end_layout
2162 \begin_layout Standard
2163 Does chained right shift on a, b by amount positions, assuming numbers to
2164  be of specified number of bits.
2165 \end_layout
2167 \begin_layout Subsubsection
2168 bit.flagdecode(number a, number bits, [string on, [string off]])
2169 \end_layout
2171 \begin_layout Standard
2172 Return string of length bits where ith character is ith character of on
2173  if bit i is on, otherwise ith character of off.
2174  Out of range reads give last character, or '*'/'-' if empty.
2175 \end_layout
2177 \begin_layout Subsubsection
2178 bit.rflagdecode(number a, number bits, [string on, [string off]])
2179 \end_layout
2181 \begin_layout Standard
2182 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2183 nt bit first).
2184 \end_layout
2186 \begin_layout Subsection
2187 Table gui:
2188 \end_layout
2190 \begin_layout Standard
2191 Most of these functions can only be called in on_paint and on_video callbacks.
2192  Exceptions are noted.
2193 \end_layout
2195 \begin_layout Standard
2196 Colors are 32-bit.
2197  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2198  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2199  opaque, 255 is almost transparent).
2200  -1 is the fully transparent color.
2201  Alpha values greater than 127 do work.
2202 \end_layout
2204 \begin_layout Standard
2205 Origin of coordinates is at top left corner of game display area.
2206  Left and top gaps correspond to negative coordinates.
2207 \end_layout
2209 \begin_layout Subsubsection
2210 gui.resolution()
2211 \end_layout
2213 \begin_layout Standard
2214 Returns 2-tuple (hresolution, vresolution).
2215 \end_layout
2217 \begin_layout Subsubsection
2218 gui.<class>_gap(number gap)
2219 \end_layout
2221 \begin_layout Standard
2222 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2223  is 8191).
2224 \end_layout
2226 \begin_layout Subsubsection
2227 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2228 \end_layout
2230 \begin_layout Standard
2231 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2232  16 high).
2233  Parameters:
2234 \end_layout
2236 \begin_layout Itemize
2237 x: X-coordinate to start the drawing from (and x-coordinate at begining
2238  of the lines).
2239 \end_layout
2241 \begin_layout Itemize
2242 y: Y-coordinate to start the drawing from.
2243 \end_layout
2245 \begin_layout Itemize
2246 text: The text to draw.
2247 \end_layout
2249 \begin_layout Itemize
2250 fgc: Text color (default is 0xFFFFFF (white))
2251 \end_layout
2253 \begin_layout Itemize
2254 bgc: Background color (default is -1 (transparent))
2255 \end_layout
2257 \begin_layout Subsubsection
2258 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2259 \end_layout
2261 \begin_layout Standard
2262 Like gui.text, but draw using double-width.
2263 \end_layout
2265 \begin_layout Subsubsection
2266 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2267 \end_layout
2269 \begin_layout Standard
2270 Like gui.text, but draw using double-height.
2271 \end_layout
2273 \begin_layout Subsubsection
2274 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2275 \end_layout
2277 \begin_layout Standard
2278 Like gui.text, but draw using double-width/double-height.
2279 \end_layout
2281 \begin_layout Subsubsection
2282 gui.rectangle(number x, number y, number width, number height[, number thickness[
2283 , number outline[, number fill]]])
2284 \end_layout
2286 \begin_layout Standard
2287 Draw rectangle on the GUI.
2288  Parameters:
2289 \end_layout
2291 \begin_layout Itemize
2292 x: X-coordinate of left edge.
2293 \end_layout
2295 \begin_layout Itemize
2296 y: Y-coordinate of upper edge.
2297 \end_layout
2299 \begin_layout Itemize
2300 width: Width of rectangle.
2301 \end_layout
2303 \begin_layout Itemize
2304 height: Height of rectangle.
2305 \end_layout
2307 \begin_layout Itemize
2308 thickness: Thickness of outline (default is 1).
2309 \end_layout
2311 \begin_layout Itemize
2312 outline: Color of outline (default is 0xFFFFFF (white))
2313 \end_layout
2315 \begin_layout Itemize
2316 fill: Color of fill (default is -1 (transparent))
2317 \end_layout
2319 \begin_layout Subsubsection
2320 gui.box(number x, number y, number width, number height[, number thickness[,
2321  number outline1[,number outline2[, number fill]]]])
2322 \end_layout
2324 \begin_layout Standard
2325 Draw rectangle with 3D effect on the GUI.
2326  Parameters:
2327 \end_layout
2329 \begin_layout Itemize
2330 x: X-coordinate of left edge.
2331 \end_layout
2333 \begin_layout Itemize
2334 y: Y-coordinate of upper edge.
2335 \end_layout
2337 \begin_layout Itemize
2338 width: Width of rectangle.
2339 \end_layout
2341 \begin_layout Itemize
2342 height: Height of rectangle.
2343 \end_layout
2345 \begin_layout Itemize
2346 thickness: Thickness of outline (default is 1).
2347 \end_layout
2349 \begin_layout Itemize
2350 outline1: First color of outline (default is 0xFFFFFF (white))
2351 \end_layout
2353 \begin_layout Itemize
2354 outline2: First color of outline (default is 0x808080 (dark gray))
2355 \end_layout
2357 \begin_layout Itemize
2358 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2359 \end_layout
2361 \begin_layout Subsubsection
2362 gui.pixel(number x, number y[, number color])
2363 \end_layout
2365 \begin_layout Standard
2366 Draw one pixel on the GUI.
2367  Parameters:
2368 \end_layout
2370 \begin_layout Itemize
2371 x: X-coordinate of the pixel
2372 \end_layout
2374 \begin_layout Itemize
2375 y: Y-coordinate of the pixel
2376 \end_layout
2378 \begin_layout Itemize
2379 color: Color of the pixel (default is 0xFFFFFF (white))
2380 \end_layout
2382 \begin_layout Subsubsection
2383 gui.crosshair(number x, number y[, number length[, number color]])
2384 \end_layout
2386 \begin_layout Standard
2387 Draw a crosshair.
2388  Parameters:
2389 \end_layout
2391 \begin_layout Itemize
2392 x: X-coordinate of the crosshair
2393 \end_layout
2395 \begin_layout Itemize
2396 y: Y-coordinate of the crosshair
2397 \end_layout
2399 \begin_layout Itemize
2400 length: Length of the crosshair lines (default 10).
2401 \end_layout
2403 \begin_layout Itemize
2404 color: Color of the crosshair (default is 0xFFFFFF (white))
2405 \end_layout
2407 \begin_layout Subsubsection
2408 gui.line(number x1, number y1, number x2, number y2[, number color])
2409 \end_layout
2411 \begin_layout Standard
2412 Draw a thin line.
2413  Parameters:
2414 \end_layout
2416 \begin_layout Itemize
2417 x1: X-coordinate of one end.
2418 \end_layout
2420 \begin_layout Itemize
2421 y1: Y-coordinate of one end.
2422 \end_layout
2424 \begin_layout Itemize
2425 x2: X-coordinate of the other end.
2426 \end_layout
2428 \begin_layout Itemize
2429 y2: Y-coordinate of the other end.
2430 \end_layout
2432 \begin_layout Itemize
2433 color: Color of the line (default is 0xFFFFFF (white)).
2434 \end_layout
2436 \begin_layout Subsubsection
2437 gui.circle(number x, number y, number r[, number thick[, number border[,
2438  number fil]]])
2439 \end_layout
2441 \begin_layout Standard
2442 Draw a circle.
2443  Parameters.
2444 \end_layout
2446 \begin_layout Itemize
2447 x: X-coordinate of the center
2448 \end_layout
2450 \begin_layout Itemize
2451 y: Y-coordinate of the center
2452 \end_layout
2454 \begin_layout Itemize
2455 r: The radius of the circle
2456 \end_layout
2458 \begin_layout Itemize
2459 thick: Border thickness
2460 \end_layout
2462 \begin_layout Itemize
2463 border: Border color (default is 0xFFFFFF (white))
2464 \end_layout
2466 \begin_layout Itemize
2467 fill: Fill color (default is -1 (transparent)).
2468 \end_layout
2470 \begin_layout Subsubsection
2471 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2472 \end_layout
2474 \begin_layout Standard
2475 Draw a bitmap on screen with specified palette.
2476  Parameters:
2477 \end_layout
2479 \begin_layout Itemize
2480 x: X-coordinate of left edge.
2481 \end_layout
2483 \begin_layout Itemize
2484 y: Y-coordinate of top edge.
2485 \end_layout
2487 \begin_layout Itemize
2488 bitmap: The bitmap to draw
2489 \end_layout
2491 \begin_layout Itemize
2492 palette: The palette to draw the bitmap using.
2493 \end_layout
2495 \begin_layout Subsubsection
2496 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2497 \end_layout
2499 \begin_layout Standard
2500 Draw a bitmap on screen.
2501  Parameters:
2502 \end_layout
2504 \begin_layout Itemize
2505 x: X-coordinate of left edge.
2506 \end_layout
2508 \begin_layout Itemize
2509 y: Y-coordinate of top edge.
2510 \end_layout
2512 \begin_layout Itemize
2513 bitmap: The bitmap to draw
2514 \end_layout
2516 \begin_layout Subsubsection
2517 gui.palette_new()
2518 \end_layout
2520 \begin_layout Standard
2521 Returns a new palette (initially all transparent).
2522  Can be used anywhere.
2523 \end_layout
2525 \begin_layout Subsubsection
2526 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2527 \end_layout
2529 \begin_layout Standard
2530 Returns a new bitmap/dbitmap.
2531  Can be used anywhere.
2532  Parameters:
2533 \end_layout
2535 \begin_layout Itemize
2536 w: The width of new bitmap
2537 \end_layout
2539 \begin_layout Itemize
2540 h: The height of new bitmap
2541 \end_layout
2543 \begin_layout Itemize
2544 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2545 \end_layout
2547 \begin_layout Itemize
2548 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2549 \end_layout
2551 \begin_layout Subsubsection
2552 gui.bitmap_load(string file)
2553 \end_layout
2555 \begin_layout Standard
2556 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2557  for bitmap).
2558  Can be used anywhere.
2559  Parameters:
2560 \end_layout
2562 \begin_layout Itemize
2563 file: The name of file to load.
2564 \end_layout
2566 \begin_layout Subsubsection
2567 gui.palette_set(palette palette, number index, number color)
2568 \end_layout
2570 \begin_layout Standard
2571 Sets color in palette.
2572  Can be used anywhere.
2573  Parameters:
2574 \end_layout
2576 \begin_layout Itemize
2577 palette: The palette to manipulate
2578 \end_layout
2580 \begin_layout Itemize
2581 index: Index of color (0-65535).
2582 \end_layout
2584 \begin_layout Itemize
2585 color: The color value.
2586 \end_layout
2588 \begin_layout Subsubsection
2589 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2590 \end_layout
2592 \begin_layout Standard
2593 Sets specified pixel in bitmap.
2594  Can be used anywhere.
2595  Parameters:
2596 \end_layout
2598 \begin_layout Itemize
2599 bitmap: The bitmap to manipulate
2600 \end_layout
2602 \begin_layout Itemize
2603 x: The x-coordinate of the pixel.
2604 \end_layout
2606 \begin_layout Itemize
2607 y: The y-coordinate of the pixel.
2608 \end_layout
2610 \begin_layout Itemize
2611 color: If bitmap is a bitmap, color index (0-65535).
2612  Otherwise color value.
2613 \end_layout
2615 \begin_layout Subsubsection
2616 gui.bitmap_size(bitmap/dbitmap bitmap)
2617 \end_layout
2619 \begin_layout Standard
2620 Get size of bitmap.
2621  Can be used anywhere.
2622  Parameters:
2623 \end_layout
2625 \begin_layout Itemize
2626 bitmap: The bitmap to query.
2627 \end_layout
2629 \begin_layout Standard
2630 The first return is the width, the second is the height.
2631 \end_layout
2633 \begin_layout Subsubsection
2634 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2635  src, number sx, number sy, number w, number h[, number ck])
2636 \end_layout
2638 \begin_layout Standard
2639 Blit a part of bitmap to another.
2640  Can be used anywhere.
2641  Parameters:
2642 \end_layout
2644 \begin_layout Itemize
2645 dest: Destination to blit to.
2646 \end_layout
2648 \begin_layout Itemize
2649 dx: left edge of target
2650 \end_layout
2652 \begin_layout Itemize
2653 dy: Top edge of target
2654 \end_layout
2656 \begin_layout Itemize
2657 src: The source to blit from.
2658  Must be of the same type as destination.
2659 \end_layout
2661 \begin_layout Itemize
2662 sx: left edge of source
2663 \end_layout
2665 \begin_layout Itemize
2666 sy: Top edge of source
2667 \end_layout
2669 \begin_layout Itemize
2670 w: Width of region
2671 \end_layout
2673 \begin_layout Itemize
2674 h: Height of region.
2675 \end_layout
2677 \begin_layout Itemize
2678 ck: Color key.
2679  Pixels of this color are not blitted.
2680 \end_layout
2682 \begin_deeper
2683 \begin_layout Itemize
2684 If bitmaps are bitmaps, this is color index of colorkey.
2685  Values outside range 0-65535 cause no key to be used as colorkey.
2686 \end_layout
2688 \begin_layout Itemize
2689 If bitmaps are dbitmaps, this color value of colorkey.
2690 \end_layout
2692 \begin_layout Itemize
2693 May be absent or nil for no colorkey blit.
2694 \end_layout
2696 \end_deeper
2697 \begin_layout Subsubsection
2698 gui.repaint()
2699 \end_layout
2701 \begin_layout Standard
2702 Request on_repaint() to happen as soon as possible.
2703  Can be used anywhere.
2704 \end_layout
2706 \begin_layout Subsubsection
2707 gui.subframe_update(boolean on)
2708 \end_layout
2710 \begin_layout Standard
2711 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2712  or not happen (on=false).
2713  Can be used anywhere.
2714 \end_layout
2716 \begin_layout Subsubsection
2717 gui.screenshot(string filename)
2718 \end_layout
2720 \begin_layout Standard
2721 Write PNG screenshot of the current frame (no drawings) to specified file.
2722  Can be used anywhere.
2723 \end_layout
2725 \begin_layout Subsubsection
2726 gui.color(number r, number g, number b[, number a])
2727 \end_layout
2729 \begin_layout Standard
2730 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2731  each component in scale 0-255.
2732  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2733  opaque).
2734  The default alpha is 256.
2735 \end_layout
2737 \begin_layout Subsubsection
2738 gui.status(string name, string value)
2739 \end_layout
2741 \begin_layout Standard
2742 Set status field 
2743 \begin_inset Quotes eld
2744 \end_inset
2746 L[<name>]
2747 \begin_inset Quotes erd
2748 \end_inset
2750  to <value> in status area.
2751  Can be used anywhere.
2752 \end_layout
2754 \begin_layout Subsubsection
2755 gui.rainbow(number step, number steps[, number color])
2756 \end_layout
2758 \begin_layout Standard
2759 Perform hue rotation of color <color> (default bright red), by <step> steps.
2760  The number of steps per full rotation is given by absolute value of <steps>.
2761 \end_layout
2763 \begin_layout Standard
2764 If <steps> is negative, the rotation will be counterclockwise.
2765 \end_layout
2767 \begin_layout Subsubsection
2768 gui.screenshot(string filename)
2769 \end_layout
2771 \begin_layout Standard
2772 Saves a screenshot into specified file.
2773 \end_layout
2775 \begin_layout Subsubsection
2776 gui.loadfont(string filename)
2777 \end_layout
2779 \begin_layout Standard
2780 Loads font from specified file (CUSTOMFONT object).
2781 \end_layout
2783 \begin_layout Subsubsection
2784 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc]])
2785 \end_layout
2787 \begin_layout Standard
2788 Draw string with custom font to screen.
2789  The parameters are the same as in gui.text.
2790 \end_layout
2792 \begin_layout Subsection
2793 table input
2794 \end_layout
2796 \begin_layout Standard
2797 Input handling.
2798  Only available in on_input callback.
2799 \end_layout
2801 \begin_layout Subsubsection
2802 input.get(number controller, number index)
2803 \end_layout
2805 \begin_layout Standard
2806 Read the specified index (0-11) from specified controller (0-7).
2807  Notes:
2808 \end_layout
2810 \begin_layout Itemize
2811 Uses physical controller numbering.
2812  Gamepad in port 2 is controller 4, not 1!
2813 \end_layout
2815 \begin_layout Subsubsection
2816 input.set(number controller, number index, number value)
2817 \end_layout
2819 \begin_layout Standard
2820 Write the specified index (0-11) from specified controller (0-7), storing
2821  value.
2822  Notes:
2823 \end_layout
2825 \begin_layout Itemize
2826 Uses physical controller numbering.
2827  Gamepad in port 2 is controller 4, not 1!
2828 \end_layout
2830 \begin_layout Subsubsection
2831 input.geta(number controller)
2832 \end_layout
2834 \begin_layout Standard
2835 Get input state for entiere controller.
2836  Returns 13 return values.
2837 \end_layout
2839 \begin_layout Itemize
2840 1st return value: Bitmask: bit i is set if i:th index is nonzero
2841 \end_layout
2843 \begin_layout Itemize
2844 2nd-13th return value: value of i:th index.
2845 \end_layout
2847 \begin_layout Subsubsection
2848 input.seta(number controller, number bitmask, number args...)
2849 \end_layout
2851 \begin_layout Standard
2852 Set state for entiere controller.
2853  args is up to 12 values for indices (overriding values in bitmask if specified).
2854 \end_layout
2856 \begin_layout Subsubsection
2857 input.controllertype(number controller)
2858 \end_layout
2860 \begin_layout Standard
2861 Get the type of controller as string.
2862  Valid values are:
2863 \end_layout
2865 \begin_layout Itemize
2866 gamepad
2867 \end_layout
2869 \begin_layout Itemize
2870 mouse
2871 \end_layout
2873 \begin_layout Itemize
2874 justifier
2875 \end_layout
2877 \begin_layout Itemize
2878 superscope
2879 \end_layout
2881 \begin_layout Subsubsection
2882 input.reset([number cycles])
2883 \end_layout
2885 \begin_layout Standard
2886 Execute reset.
2887  If cycles is greater than zero, do delayed reset.
2888  0 (or no value) causes immediate reset.
2889 \end_layout
2891 \begin_layout Itemize
2892 Only available with subframe flag false.
2893 \end_layout
2895 \begin_layout Subsubsection
2896 input.raw()
2897 \end_layout
2899 \begin_layout Standard
2900 Returns table of tables of all available keys and axes.
2901  The first table is indexed by key name (platform-dependent!), and the inner
2902  table has the following fields:
2903 \end_layout
2905 \begin_layout Itemize
2906 last_rawval: Last reported raw value for control.
2907 \end_layout
2909 \begin_layout Itemize
2910 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2911  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2912 \end_layout
2914 \begin_layout Itemize
2915 cal_left: Minimum calibration value.
2916  Only meaningful with axis and pressure types.
2917 \end_layout
2919 \begin_layout Itemize
2920 cal_center: Center calibration value.
2921  Only meaningful with axis and pressure types.
2922 \end_layout
2924 \begin_layout Itemize
2925 cal_right: Maximum calibration value.
2926  Only meaningful with axis and pressure types.
2927 \end_layout
2929 \begin_layout Itemize
2930 cal_tolerance: Dead zone tolerance.
2931  Only meaningful with axis and pressure types.
2932 \end_layout
2934 \begin_layout Subsubsection
2935 input.keyhook(string key, boolean state)
2936 \end_layout
2938 \begin_layout Standard
2939 Requests that keyhook events to be sent for key (state=true) or not sent
2940  (state=false).
2941 \end_layout
2943 \begin_layout Subsubsection
2944 input.joyget(number controller)
2945 \end_layout
2947 \begin_layout Standard
2948 Returns table for current controls for specified controller.
2949  The names of fields vary by controller type.
2950 \end_layout
2952 \begin_layout Itemize
2953 The buttons have the same name as those are referred to in other contexts
2954  in the emulator
2955 \end_layout
2957 \begin_layout Itemize
2958 The analog axes are 
2959 \begin_inset Quotes eld
2960 \end_inset
2962 xaxis
2963 \begin_inset Quotes erd
2964 \end_inset
2966  and 
2967 \begin_inset Quotes eld
2968 \end_inset
2970 yaxis
2971 \begin_inset Quotes erd
2972 \end_inset
2975 \end_layout
2977 \begin_layout Subsubsection
2978 input.joyset(number controller, table controls)
2979 \end_layout
2981 \begin_layout Standard
2982 Set the the state of specified controller to values specified in specified
2983  table.
2984 \end_layout
2986 \begin_layout Subsubsection
2987 input.lcid_to_pcid(number controller)
2988 \end_layout
2990 \begin_layout Standard
2991 Return the physical index, physical port and controller number in port for
2992  specified (1-based) logical controller.
2993 \end_layout
2995 \begin_layout Subsection
2996 Table subtitle
2997 \end_layout
2999 \begin_layout Standard
3000 Subtitle handling
3001 \end_layout
3003 \begin_layout Subsubsection
3004 subtitle.byindex(number i)
3005 \end_layout
3007 \begin_layout Standard
3008 Read the frame and length of ith subtitle.
3009  Returns nothing if not present.
3010 \end_layout
3012 \begin_layout Subsubsection
3013 subtitle.set(number f, number l, string txt)
3014 \end_layout
3016 \begin_layout Standard
3017 Set the text of subtitle.
3018 \end_layout
3020 \begin_layout Subsubsection
3021 subtitle.get(number f, number l)
3022 \end_layout
3024 \begin_layout Standard
3025 Get the text of subtitle.
3026 \end_layout
3028 \begin_layout Subsubsection
3029 subtitle.delete(number f, number l)
3030 \end_layout
3032 \begin_layout Standard
3033 Delete specified subtitle.
3034 \end_layout
3036 \begin_layout Subsection
3037 Table hostmemory
3038 \end_layout
3040 \begin_layout Standard
3041 Host memory handling (extra memory saved to savestates).
3042  Host memory starts empty.
3043 \end_layout
3045 \begin_layout Subsubsection
3046 hostmemory.read(number address)
3047 \end_layout
3049 \begin_layout Standard
3050 Reads hostmemory slot address.
3051  Slot numbers out of range return false instead of numeric.
3052 \end_layout
3054 \begin_layout Subsubsection
3055 hostmemory.write(number address, number value)
3056 \end_layout
3058 \begin_layout Standard
3059 Writes hostmemory slot with 0-255.
3060  Slot numbers out of range cause extension of host memory slot space.
3061 \end_layout
3063 \begin_layout Subsubsection
3064 hostmemory.readbyte(number address)
3065 \end_layout
3067 \begin_layout Standard
3068 Read unsigned byte (1 element) from given address.
3069  Slots out of range return false.
3070 \end_layout
3072 \begin_layout Subsubsection
3073 hostmemory.writebyte(number address, number value)
3074 \end_layout
3076 \begin_layout Standard
3077 Write unsigned byte (1 element) to given slot.
3078  Slot numbers out of range cause extension.
3079 \end_layout
3081 \begin_layout Subsubsection
3082 hostmemory.readsbyte(number address)
3083 \end_layout
3085 \begin_layout Standard
3086 Read signed byte (1 element) from given address.
3087  Slots out of range return false.
3088 \end_layout
3090 \begin_layout Subsubsection
3091 hostmemory.writesbyte(number address, number value)
3092 \end_layout
3094 \begin_layout Standard
3095 Write signed byte (1 element) to given slot.
3096  Slot numbers out of range cause extension.
3097 \end_layout
3099 \begin_layout Subsubsection
3100 hostmemory.readword(number address)
3101 \end_layout
3103 \begin_layout Standard
3104 Read unsigned word (2 elements) from given address.
3105  Slots out of range return false.
3106 \end_layout
3108 \begin_layout Subsubsection
3109 hostmemory.writeword(number address, number value)
3110 \end_layout
3112 \begin_layout Standard
3113 Write unsigned word (2 elements) to given slot.
3114  Slot numbers out of range cause extension.
3115 \end_layout
3117 \begin_layout Subsubsection
3118 hostmemory.readsword(number address)
3119 \end_layout
3121 \begin_layout Standard
3122 Read signed word (2 elements) from given address.
3123  Slots out of range return false.
3124 \end_layout
3126 \begin_layout Subsubsection
3127 hostmemory.writesword(number address, number value)
3128 \end_layout
3130 \begin_layout Standard
3131 Write signed word (2 elements) to given slot.
3132  Slot numbers out of range cause extension.
3133 \end_layout
3135 \begin_layout Subsubsection
3136 hostmemory.readdword(number address)
3137 \end_layout
3139 \begin_layout Standard
3140 Read unsigned doubleword (4 elements) from given address.
3141  Slots out of range return false.
3142 \end_layout
3144 \begin_layout Subsubsection
3145 hostmemory.writedword(number address, number value)
3146 \end_layout
3148 \begin_layout Standard
3149 Write unsigned doubleword (4 elements) to given slot.
3150  Slot numbers out of range cause extension.
3151 \end_layout
3153 \begin_layout Subsubsection
3154 hostmemory.readsdword(number address)
3155 \end_layout
3157 \begin_layout Standard
3158 Read signed doubleword (4 elements) from given address.
3159  Slots out of range return false.
3160 \end_layout
3162 \begin_layout Subsubsection
3163 hostmemory.writesdword(number address, number value)
3164 \end_layout
3166 \begin_layout Standard
3167 Write signed doubleword (4 elements) to given slot.
3168  Slot numbers out of range cause extension.
3169 \end_layout
3171 \begin_layout Subsubsection
3172 hostmemory.readqword(number address)
3173 \end_layout
3175 \begin_layout Standard
3176 Read unsigned quadword (8 elements) from given address.
3177  Slots out of range return false.
3178 \end_layout
3180 \begin_layout Subsubsection
3181 hostmemory.writeqword(number address, number value)
3182 \end_layout
3184 \begin_layout Standard
3185 Write unsigned quadword (4 elements) to given slot.
3186  Slot numbers out of range cause extension.
3187 \end_layout
3189 \begin_layout Subsubsection
3190 hostmemory.readsqword(number address)
3191 \end_layout
3193 \begin_layout Standard
3194 Read signed quadword (8 elements) from given address.
3195  Slots out of range return false.
3196 \end_layout
3198 \begin_layout Subsubsection
3199 hostmemory.writesqword(number address, number value)
3200 \end_layout
3202 \begin_layout Standard
3203 Write signed quadword (8 elements) to given slot.
3204  Slot numbers out of range cause extension.
3205 \end_layout
3207 \begin_layout Subsection
3208 Table movie
3209 \end_layout
3211 \begin_layout Standard
3212 Movie handling
3213 \end_layout
3215 \begin_layout Subsubsection
3216 movie.currentframe()
3217 \end_layout
3219 \begin_layout Standard
3220 Return number of current frame.
3221 \end_layout
3223 \begin_layout Subsubsection
3224 movie.framecount()
3225 \end_layout
3227 \begin_layout Standard
3228 Return number of frames in movie.
3229 \end_layout
3231 \begin_layout Subsubsection
3232 movie.readonly()
3233 \end_layout
3235 \begin_layout Standard
3236 Return true if in readonly mode, false if in readwrite.
3237 \end_layout
3239 \begin_layout Subsubsection
3240 movie.rerecords()
3241 \end_layout
3243 \begin_layout Standard
3244 Returns the current value of rerecord count.
3245 \end_layout
3247 \begin_layout Subsubsection
3248 movie.set_readwrite()
3249 \end_layout
3251 \begin_layout Standard
3252 Set readwrite mode (does not cause on_readwrite callback).
3253 \end_layout
3255 \begin_layout Subsubsection
3256 movie.frame_subframes(number frame)
3257 \end_layout
3259 \begin_layout Standard
3260 Count number of subframes in specified frame (frame numbers are 1-based)
3261  and return that.
3262 \end_layout
3264 \begin_layout Subsubsection
3265 movie.read_subframe(number frame, number subframe)
3266 \end_layout
3268 \begin_layout Standard
3269 Read specifed subframe in specified frame and return data as array (100
3270  elements, numbered 0-99 currently).
3271 \end_layout
3273 \begin_layout Subsubsection
3274 movie.read_rtc()
3275 \end_layout
3277 \begin_layout Standard
3278 Returns the current value of the RTC as a pair (second, subsecond).
3279 \end_layout
3281 \begin_layout Subsubsection
3282 movie.unsafe_rewind([UNSAFEREWIND state])
3283 \end_layout
3285 \begin_layout Standard
3286 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3287 \end_layout
3289 \begin_layout Itemize
3290 If called without argument, causes emulator to start process of setting
3291  unsafe rewind point.
3292  When this has finished, callback on_set_rewind occurs, passing the rewind
3293  state to lua script.
3294 \end_layout
3296 \begin_layout Itemize
3297 If called with argument, causes emulator rewind to passed rewind point as
3298  soon as possible.
3299  Readwrite mode is implicitly activated.
3300 \end_layout
3302 \begin_layout Standard
3303 The following warnings apply to unsafe rewinding:
3304 \end_layout
3306 \begin_layout Itemize
3307 There are no safety checks against misuse (that's what 
3308 \begin_inset Quotes eld
3309 \end_inset
3311 unsafe
3312 \begin_inset Quotes erd
3313 \end_inset
3315  comes from)!
3316 \end_layout
3318 \begin_layout Itemize
3319 Only call rewind from timeline rewind point was set from.
3320 \end_layout
3322 \begin_layout Itemize
3323 Only call rewind from after the rewind point was set.
3324 \end_layout
3326 \begin_layout Subsection
3327 Table settings
3328 \end_layout
3330 \begin_layout Standard
3331 Routines for settings manipulation
3332 \end_layout
3334 \begin_layout Subsubsection
3335 settings.get(string name)
3336 \end_layout
3338 \begin_layout Standard
3339 Get value of setting.
3340  If setting is blank, returns false.
3341  If setting value can't be obtained, returns (nil, error message).
3342 \end_layout
3344 \begin_layout Subsubsection
3345 settings.set(string name, string value)
3346 \end_layout
3348 \begin_layout Standard
3349 Set value of setting.
3350  If setting can't be set, returns (nil, error message).
3351 \end_layout
3353 \begin_layout Subsubsection
3354 settings.is_set(string name)
3355 \end_layout
3357 \begin_layout Standard
3358 Returns if setting is set.
3359  If setting does not exist, returns (nil, error message).
3360 \end_layout
3362 \begin_layout Subsubsection
3363 settings.blank(string name)
3364 \end_layout
3366 \begin_layout Standard
3367 Blanks a setting and returns true.
3368  If setting can't be blanked, returns (nil, error message).
3369 \end_layout
3371 \begin_layout Subsection
3372 Table memory
3373 \end_layout
3375 \begin_layout Standard
3376 Contains various functions for managing memory
3377 \end_layout
3379 \begin_layout Subsubsection
3380 memory.vma_count()
3381 \end_layout
3383 \begin_layout Standard
3384 Returns the number of VMAs
3385 \end_layout
3387 \begin_layout Subsubsection
3388 memory.read_vma(number index)
3389 \end_layout
3391 \begin_layout Standard
3392 Reads the specified VMA (indices start from zero).
3393  Trying to read invalid VMA gives nil.
3394  The read VMA is table with the following fields:
3395 \end_layout
3397 \begin_layout Itemize
3398 region_name (string): The readable name of the VMA
3399 \end_layout
3401 \begin_layout Itemize
3402 baseaddr (number): Base address of the VMA
3403 \end_layout
3405 \begin_layout Itemize
3406 lastaddr (number): Last address in the VMA.
3407 \end_layout
3409 \begin_layout Itemize
3410 size (number): The size of VMA in bytes.
3411 \end_layout
3413 \begin_layout Itemize
3414 readonly (boolean): True of the VMA corresponds to ROM.
3415 \end_layout
3417 \begin_layout Itemize
3418 iospace (boolean): True if the VMA is I/O space.
3419 \end_layout
3421 \begin_layout Itemize
3422 native_endian (boolean): True if the VMA has native endian as opposed to
3423  little endian.
3424 \end_layout
3426 \begin_layout Subsubsection
3427 memory.find_vma(number address)
3428 \end_layout
3430 \begin_layout Standard
3431 Finds the VMA containing specified address.
3432  Returns table in the same format as read_vma or nil if not found.
3433 \end_layout
3435 \begin_layout Subsubsection
3436 memory.readbyte(number address)
3437 \end_layout
3439 \begin_layout Standard
3440 Reads the specified address as unsigned byte and returns the result.
3441 \end_layout
3443 \begin_layout Subsubsection
3444 memory.readsbyte(number address)
3445 \end_layout
3447 \begin_layout Standard
3448 Reads the specified address as signed byte and returns the result.
3449 \end_layout
3451 \begin_layout Subsubsection
3452 memory.writebyte(number address, number value)
3453 \end_layout
3455 \begin_layout Standard
3456 Writes the specified value (negative values undergo 2's complement) to specified
3457  address (as a byte).
3458 \end_layout
3460 \begin_layout Subsubsection
3461 memory.readword(number address)
3462 \end_layout
3464 \begin_layout Standard
3465 Reads the specified address as unsigned word and returns the result.
3466 \end_layout
3468 \begin_layout Subsubsection
3469 memory.readsword(number address)
3470 \end_layout
3472 \begin_layout Standard
3473 Reads the specified address as signed word and returns the result.
3474 \end_layout
3476 \begin_layout Subsubsection
3477 memory.writeword(number address, number value)
3478 \end_layout
3480 \begin_layout Standard
3481 Writes the specified value (negative values undergo 2's complement) to specified
3482  address (as a word).
3483 \end_layout
3485 \begin_layout Subsubsection
3486 memory.readdword(number address)
3487 \end_layout
3489 \begin_layout Standard
3490 Reads the specified address as unsigned doubleword and returns the result.
3491 \end_layout
3493 \begin_layout Subsubsection
3494 memory.readsdword(number address)
3495 \end_layout
3497 \begin_layout Standard
3498 Reads the specified address as signed doubleword and returns the result.
3499 \end_layout
3501 \begin_layout Subsubsection
3502 memory.writedword(number address, number value)
3503 \end_layout
3505 \begin_layout Standard
3506 Writes the specified value (negative values undergo 2's complement) to specified
3507  address (as a doubleword).
3508 \end_layout
3510 \begin_layout Subsubsection
3511 memory.readqword(number address)
3512 \end_layout
3514 \begin_layout Standard
3515 Reads the specified address as unsigned quadword and returns the result.
3516 \end_layout
3518 \begin_layout Subsubsection
3519 memory.readsqword(number address)
3520 \end_layout
3522 \begin_layout Standard
3523 Reads the specified address as signed quadword and returns the result.
3524 \end_layout
3526 \begin_layout Subsubsection
3527 memory.writeqword(number address, number value)
3528 \end_layout
3530 \begin_layout Standard
3531 Writes the specified value (negative values undergo 2's complement) to specified
3532  address (as a quadword).
3533 \end_layout
3535 \begin_layout Subsubsection
3536 memory.hash_region(number base, number size)
3537 \end_layout
3539 \begin_layout Standard
3540 Hash specified number of bytes starting from specified address and return
3541  the SHA-256.
3542 \end_layout
3544 \begin_layout Subsubsection
3545 memory.hash_state()
3546 \end_layout
3548 \begin_layout Standard
3549 Hash the current system state.
3550  Mainly useful for debugging savestates.
3551 \end_layout
3553 \begin_layout Subsubsection
3554 memory.readregion(number base, number size)
3555 \end_layout
3557 \begin_layout Standard
3558 Read a region of memory.
3559 \end_layout
3561 \begin_layout Itemize
3562 Warning: If the region crosses VMA boundary, the results are undefined.
3563 \end_layout
3565 \begin_layout Subsubsection
3566 memory.map<type>([number base, number size])
3567 \end_layout
3569 \begin_layout Standard
3570 Returns a table mapping specified memory aperture for read/write.
3571  If parameters are omitted, entiere map space is the aperture.
3572 \end_layout
3574 \begin_layout Itemize
3575 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3576 \end_layout
3578 \begin_layout Subsubsection
3579 memory.writeregion(number base, number size, table data)
3580 \end_layout
3582 \begin_layout Standard
3583 Write a region of memory.
3584 \end_layout
3586 \begin_layout Itemize
3587 Warning: If the region crosses VMA boundary, the results are undefined.
3588 \end_layout
3590 \begin_layout Subsubsection
3591 memory.map_structure()
3592 \end_layout
3594 \begin_layout Standard
3595 Returns a new mapping structure (MMAP_STRUCT)
3596 \end_layout
3598 \begin_layout Subsubsection
3599 MMAP_STRUCT(string key, number address, string type)
3600 \end_layout
3602 \begin_layout Standard
3603 Bind key in mmap structure to specified address with specified type.
3604 \end_layout
3606 \begin_layout Itemize
3607 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3608 \end_layout
3610 \begin_layout Subsubsection
3611 memory.read_expr(string expr)
3612 \end_layout
3614 \begin_layout Standard
3615 Evaluate specified watch expression and return result
3616 \end_layout
3618 \begin_layout Subsection
3619 Table subtitle
3620 \end_layout
3622 \begin_layout Standard
3623 Contains functions for manipulating subtitles.
3624 \end_layout
3626 \begin_layout Subsubsection
3627 subtitle.byindex(number index)
3628 \end_layout
3630 \begin_layout Standard
3631 Get (basetime, length) pair of specified subtitle index or nothing if index
3632  isn't valid.
3633 \end_layout
3635 \begin_layout Subsubsection
3636 subtitle.get(number basetime, number length)
3637 \end_layout
3639 \begin_layout Standard
3640 Read the specified subtitle.
3641  Returns 
3642 \begin_inset Quotes eld
3643 \end_inset
3646 \begin_inset Quotes erd
3647 \end_inset
3649  if the subtitle does not exist.
3650 \end_layout
3652 \begin_layout Subsubsection
3653 subtitle.set(number basetime, number length, string content)
3654 \end_layout
3656 \begin_layout Standard
3657 Set the specified subtitle.
3658 \end_layout
3660 \begin_layout Subsubsection
3661 subtitle.deltete(number basetime, number length)
3662 \end_layout
3664 \begin_layout Standard
3665 Delete the specified subtitle.
3666 \end_layout
3668 \begin_layout Subsection
3669 Table _SYSTEM
3670 \end_layout
3672 \begin_layout Standard
3673 Contains copy of global variables from time of Lua initialization.
3674  Non-writeable.
3675 \end_layout
3677 \begin_layout Subsection
3678 Callbacks
3679 \end_layout
3681 \begin_layout Standard
3682 Various callbacks to Lua that can occur.
3683 \end_layout
3685 \begin_layout Subsubsection
3686 Callback: on_paint(bool not_synth)
3687 \end_layout
3689 \begin_layout Standard
3690 Called when screen is being painted.
3691  Any gui.* calls requiring graphic context draw on the screen.
3692 \end_layout
3694 \begin_layout Standard
3695 not_synth is true if this hook is being called in response to received frame,
3696  false otherwise.
3697 \end_layout
3699 \begin_layout Subsubsection
3700 Callback: on_video()
3701 \end_layout
3703 \begin_layout Standard
3704 Called when video dump frame is being painted.
3705  Any gui.* calls requiring graphic context draw on the video.
3706 \end_layout
3708 \begin_layout Subsubsection
3709 Callback: on_frame_emulated()
3710 \end_layout
3712 \begin_layout Standard
3713 Called when emulating frame has completed and on_paint()/on_video() calls
3714  are about to be issued.
3715 \end_layout
3717 \begin_layout Subsubsection
3718 Callback: on_frame()
3719 \end_layout
3721 \begin_layout Standard
3722 Called on each starting whole frame.
3723 \end_layout
3725 \begin_layout Subsubsection
3726 Callback: on_startup()
3727 \end_layout
3729 \begin_layout Standard
3730 Called when the emulator is starting (lsnes.rc and --run files has been run).
3731 \end_layout
3733 \begin_layout Subsubsection
3734 Callback: on_rewind()
3735 \end_layout
3737 \begin_layout Standard
3738 Called when rewind movie to beginning has completed.
3739 \end_layout
3741 \begin_layout Subsubsection
3742 Callback: on_pre_load(string name)
3743 \end_layout
3745 \begin_layout Standard
3746 Called just before savestate/movie load occurs (note: loads are always delayed,
3747  so this occurs even when load was initiated by lua).
3748 \end_layout
3750 \begin_layout Subsubsection
3751 Callback: on_err_load(string name)
3752 \end_layout
3754 \begin_layout Standard
3755 Called if loadstate goes wrong.
3756 \end_layout
3758 \begin_layout Subsubsection
3759 Callback: on_post_load(string name, boolean was_savestate)
3760 \end_layout
3762 \begin_layout Standard
3763 Called on successful loadstate.
3764  was_savestate gives if this was a savestate or a movie.
3765 \end_layout
3767 \begin_layout Subsubsection
3768 Callback: on_pre_save(string name, boolean is_savestate)
3769 \end_layout
3771 \begin_layout Standard
3772 Called just before savestate save occurs (note: movie saves are synchronous
3773  and won't trigger these callbacks if called from Lua).
3774 \end_layout
3776 \begin_layout Subsubsection
3777 Callback: on_err_save(string name)
3778 \end_layout
3780 \begin_layout Standard
3781 Called if savestate goes wrong.
3782 \end_layout
3784 \begin_layout Subsubsection
3785 Callback: on_post_save(string name, boolean is_savestate)
3786 \end_layout
3788 \begin_layout Standard
3789 Called on successful savaestate.
3790  is_savestate gives if this was a savestate or a movie.
3791 \end_layout
3793 \begin_layout Subsubsection
3794 Callback: on_quit()
3795 \end_layout
3797 \begin_layout Standard
3798 Called when emulator is shutting down.
3799 \end_layout
3801 \begin_layout Subsubsection
3802 Callback: on_input(boolean subframe)
3803 \end_layout
3805 \begin_layout Standard
3806 Called when emulator is just sending input to bsnes core.
3807  Warning: This is called even in readonly mode, but the results are ignored.
3808 \end_layout
3810 \begin_layout Subsubsection
3811 Callback: on_reset()
3812 \end_layout
3814 \begin_layout Standard
3815 Called when SNES is reset.
3816 \end_layout
3818 \begin_layout Subsubsection
3819 Callback: on_readwrite()
3820 \end_layout
3822 \begin_layout Standard
3823 Called when moving into readwrite mode as result of 
3824 \begin_inset Quotes eld
3825 \end_inset
3827 set-rwmode
3828 \begin_inset Quotes erd
3829 \end_inset
3831  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3832  entry protection).
3833 \end_layout
3835 \begin_layout Subsubsection
3836 Callback: on_snoop(number port, number controller, number index, number
3837  value)
3838 \end_layout
3840 \begin_layout Standard
3841 Called each time bsnes asks for input.
3842  The value is the final value to be sent to bsnes core (readonly mode, autohold
3843  and autofire have been taken into account).
3844  Might be useful when translating movies to format suitable for console
3845  verification.
3846  Note: There is no way to modify the value to be sent.
3847 \end_layout
3849 \begin_layout Subsubsection
3850 Callback: on_keyhook(string keyname, table state)
3851 \end_layout
3853 \begin_layout Standard
3854 Sent when key that has keyhook events requested changes state.
3855  Keyname is name of the key (group) and state is the state (same kind as
3856  table values in input.raw).
3857 \end_layout
3859 \begin_layout Subsubsection
3860 Callback: on_idle()
3861 \end_layout
3863 \begin_layout Standard
3864 Called when requested by set_idle_timeout(), the timeout has expired and
3865  emulator is waiting.
3866 \end_layout
3868 \begin_layout Subsubsection
3869 Callback: on_timer()
3870 \end_layout
3872 \begin_layout Standard
3873 Called when requested by set_idle_timeout() and the timeout has expired
3874  (regardless if emulator is waiting).
3875 \end_layout
3877 \begin_layout Subsubsection
3878 Callback: on_set_rewind(UNSAFEREWIND r)
3879 \end_layout
3881 \begin_layout Standard
3882 Called when unsafe rewind object has been constructed.
3883 \end_layout
3885 \begin_layout Subsubsection
3886 Callback: on_pre_rewind() 
3887 \end_layout
3889 \begin_layout Standard
3890 Called just before unsafe rewind is about to occur.
3891 \end_layout
3893 \begin_layout Subsubsection
3894 Callback: on_post_rewind() 
3895 \end_layout
3897 \begin_layout Standard
3898 Called just after unsafe rewind has occured.
3899 \end_layout
3901 \begin_layout Section
3902 Memory watch expression syntax
3903 \end_layout
3905 \begin_layout Standard
3906 Memory watch expressions are in RPN (Reverse Polish Notation).
3907  At the end of expression, the top entry on stack is taken as the final
3908  result.
3909 \end_layout
3911 \begin_layout Standard
3912 Notations:
3913 \end_layout
3915 \begin_layout Itemize
3916 Evaluation order is strictly left to right.
3917 \end_layout
3919 \begin_layout Itemize
3920 a is the entry on top of stack
3921 \end_layout
3923 \begin_layout Itemize
3924 b is the entry immediately below top of stack
3925 \end_layout
3927 \begin_layout Itemize
3928 ; separates values to be pushed (no intermediate pop).
3929 \end_layout
3931 \begin_layout Itemize
3932 After end of element, all used stack slots are popped and all results are
3933  pushed.
3934 \end_layout
3936 \begin_layout Itemize
3937 When pushing multiple values, the pushes occur in order shown.
3938 \end_layout
3940 \begin_layout Standard
3941 The following operators are available:
3942 \end_layout
3944 \begin_layout Itemize
3945 + : a + b
3946 \end_layout
3948 \begin_layout Itemize
3949 - : a - b
3950 \end_layout
3952 \begin_layout Itemize
3953 * : a * b
3954 \end_layout
3956 \begin_layout Itemize
3957 / : a / b
3958 \end_layout
3960 \begin_layout Itemize
3961 % : a % b
3962 \end_layout
3964 \begin_layout Itemize
3965 a : atan(a)
3966 \end_layout
3968 \begin_layout Itemize
3969 b : read_signed_byte(a)
3970 \end_layout
3972 \begin_layout Itemize
3973 c : cos(a)
3974 \end_layout
3976 \begin_layout Itemize
3977 d : read_signed_dword(a)
3978 \end_layout
3980 \begin_layout Itemize
3981 i : quotent(a / b)
3982 \end_layout
3984 \begin_layout Itemize
3985 p :
3986 \begin_inset Formula $\pi$
3987 \end_inset
3990 \end_layout
3992 \begin_layout Itemize
3993 q : read_signed_qword(a)
3994 \end_layout
3996 \begin_layout Itemize
3997 r : sqrt(a)
3998 \end_layout
4000 \begin_layout Itemize
4001 s : sin(a)
4002 \end_layout
4004 \begin_layout Itemize
4005 t : tan(a)
4006 \end_layout
4008 \begin_layout Itemize
4009 u : a; a
4010 \end_layout
4012 \begin_layout Itemize
4013 w : read_signed_word(a)
4014 \end_layout
4016 \begin_layout Itemize
4017 A : atan2(a, b)
4018 \end_layout
4020 \begin_layout Itemize
4021 B : read_unsigned_byte(a)
4022 \end_layout
4024 \begin_layout Itemize
4025 C<number>z : Push number <number> to stack.
4026 \end_layout
4028 \begin_layout Itemize
4029 D : read_unsigned_dword(a)
4030 \end_layout
4032 \begin_layout Itemize
4033 C0x<number>z : Push number <number> (hexadecimal) to stack.
4034 \end_layout
4036 \begin_layout Itemize
4037 Q : read_unsigned_qword(a)
4038 \end_layout
4040 \begin_layout Itemize
4041 R<digit> : round a to <digit> digits.
4042 \end_layout
4044 \begin_layout Itemize
4045 W : read_unsigned_word(a)
4046 \end_layout
4048 \begin_layout Subsection
4049 Example:
4050 \end_layout
4052 \begin_layout Standard
4053 C0x007e0878zWC0x007e002czW-
4054 \end_layout
4056 \begin_layout Enumerate
4057 Push value 0x7e0878 on top of stack (C0x007e0878z).
4058 \end_layout
4060 \begin_layout Enumerate
4061 Pop the value on top of stack (0x7e0878), read word value at that address
4062  and push the result,call it x1 (W).
4063 \end_layout
4065 \begin_layout Enumerate
4066 Push value 0x7e002c on top of stack (C0x007e002cz).
4067 \end_layout
4069 \begin_layout Enumerate
4070 Pop the value on top of stack (0x7e002c), read word value at that address
4071  and push the result,call it x2 (W).
4072 \end_layout
4074 \begin_layout Enumerate
4075 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
4076  x2 - x1 (-).
4077 \end_layout
4079 \begin_layout Enumerate
4080 Since the expression ends, the final memory watch result is the top one
4081  on stack, which is x2 - x1.
4082 \end_layout
4084 \begin_layout Section
4085 Modifier and key names:
4086 \end_layout
4088 \begin_layout Subsection
4089 SDL Platform
4090 \end_layout
4092 \begin_layout Subsubsection
4093 Modifier names
4094 \end_layout
4096 \begin_layout Standard
4097 Following modifier names are known:
4098 \end_layout
4100 \begin_layout Itemize
4101 ctrl, lctrl, rctrl: Control keys
4102 \end_layout
4104 \begin_layout Itemize
4105 alt, lalt, ralt: ALT keys.
4106 \end_layout
4108 \begin_layout Itemize
4109 shift, lshift, rshift: Shift keys.
4110 \end_layout
4112 \begin_layout Itemize
4113 meta, lmeta, rmeta: Meta keys.
4114 \end_layout
4116 \begin_layout Itemize
4117 num, caps: Numlock/Capslock (these are sticky!)
4118 \end_layout
4120 \begin_layout Itemize
4121 mode: Mode select.
4122 \end_layout
4124 \begin_layout Subsubsection
4125 Key names
4126 \end_layout
4128 \begin_layout Standard
4129 Following key names are known:
4130 \end_layout
4132 \begin_layout Itemize
4133 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4134  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4135  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4136  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4137  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4138  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4139  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4140  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4141  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4142  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4143  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4144  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4145  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4146  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4147  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4148  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4149  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4150  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4151  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4152  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4153  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4154  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4155  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4156  break, menu, power, euro, undo
4157 \end_layout
4159 \begin_layout Itemize
4160 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4161  hardware-dependent scan code of <n> (useful to bind those keys that don't
4162  have symbolic names).
4163 \end_layout
4165 \begin_layout Subsubsection
4166 Joystick pseudo-keys:
4167 \end_layout
4169 \begin_layout Itemize
4170 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4171 \end_layout
4173 \begin_layout Itemize
4174 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4175 \end_layout
4177 \begin_layout Itemize
4178 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4179 \end_layout
4181 \begin_layout Itemize
4182 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4183 \end_layout
4185 \begin_layout Itemize
4186 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4187 \end_layout
4189 \begin_layout Itemize
4190 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4191  position (axis modes axis and axis_inverse).
4192 \end_layout
4194 \begin_layout Itemize
4195 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4196  position (axis modes axis and axis_inverse).
4197 \end_layout
4199 \begin_layout Itemize
4200 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4201  modes pressure_*).
4202 \end_layout
4204 \begin_layout Subsubsection
4205 Special buttons:
4206 \end_layout
4208 \begin_layout Itemize
4209 Escape: Enter/Exit Command mode, cancel modal dialogs.
4210 \end_layout
4212 \begin_layout Itemize
4213 Return (also KPEnter): Execute command, ok modal dialog.
4214 \end_layout
4216 \begin_layout Itemize
4217 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4218  in command history
4219 \end_layout
4221 \begin_layout Itemize
4222 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4223  in command history
4224 \end_layout
4226 \begin_layout Itemize
4227 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4228 \end_layout
4230 \begin_layout Itemize
4231 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4232 \end_layout
4234 \begin_layout Itemize
4235 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4236 \end_layout
4238 \begin_layout Itemize
4239 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4240 \end_layout
4242 \begin_layout Itemize
4243 Delete (also KP.
4244  if no num lock; command mode): Delete character to right of cursor.
4245 \end_layout
4247 \begin_layout Itemize
4248 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4249  overwrite modes.
4250 \end_layout
4252 \begin_layout Itemize
4253 Backspace (command mode): Delete character to left of cursor.
4254 \end_layout
4256 \begin_layout Itemize
4257 CTRL+LEFT (also ALT+B; command mode): Previous word.
4258 \end_layout
4260 \begin_layout Itemize
4261 CTRL+RIGHT (also ALT+F; command mode): Next word.
4262 \end_layout
4264 \begin_layout Itemize
4265 ALT+D (also CTRL+W; command mode): Delete word.
4266 \end_layout
4268 \begin_layout Itemize
4269 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4270 \end_layout
4272 \begin_layout Subsection
4273 wxWidgets platform
4274 \end_layout
4276 \begin_layout Subsubsection
4277 Modifier names:
4278 \end_layout
4280 \begin_layout Standard
4281 Following modifier names are known:
4282 \end_layout
4284 \begin_layout Itemize
4286 \end_layout
4288 \begin_layout Itemize
4289 ctrl
4290 \end_layout
4292 \begin_layout Itemize
4293 shift 
4294 \end_layout
4296 \begin_layout Itemize
4297 meta
4298 \end_layout
4300 \begin_layout Itemize
4301 cmd (Mac OS X only)
4302 \end_layout
4304 \begin_layout Subsubsection
4305 Key names:
4306 \end_layout
4308 \begin_layout Standard
4309 Following key names are known:
4310 \end_layout
4312 \begin_layout Itemize
4313 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4314  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4315  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4316  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4317  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4318  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4319  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4320  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4321  pause, capital, end, home, lefT, up, right, down, select, print, execute,
4322  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4323  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4324  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4325  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4326  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4327  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4328  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4329  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4330  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4331  windows_right, windows_menu, command, special1, special2, special3, special4,
4332  special5, special6, special7, special8, special9, special10, special11,
4333  special12, special13, special14, special15, special16, special17, special18,
4334  special19, special20
4335 \end_layout
4337 \begin_layout Section
4338 Movie file format
4339 \end_layout
4341 \begin_layout Standard
4342 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4343  (note: If you recompress it, do not use compression methods other than
4344  store and deflate and especially do not use encryption of any kind).
4345 \end_layout
4347 \begin_layout Subsection
4348 Detecting clean start/SRAM/Savestate
4349 \end_layout
4351 \begin_layout Itemize
4352 If file has member 
4353 \begin_inset Quotes eld
4354 \end_inset
4356 savestate
4357 \begin_inset Quotes erd
4358 \end_inset
4360  it is savestate, otherwise:
4361 \end_layout
4363 \begin_layout Itemize
4364 If file has members with names starting 
4365 \begin_inset Quotes eld
4366 \end_inset
4368 moviesram.
4369 \begin_inset Quotes erd
4370 \end_inset
4372  it is movie starting from SRAM, otherwise:
4373 \end_layout
4375 \begin_layout Itemize
4376 It is movie starting from clear state.
4377 \end_layout
4379 \begin_layout Subsection
4380 Member: gametype
4381 \end_layout
4383 \begin_layout Standard
4384 Type of game ROM and region (as one line).
4385  Valid values are:
4386 \end_layout
4388 \begin_layout Standard
4389 \begin_inset Tabular
4390 <lyxtabular version="3" rows="8" columns="3">
4391 <features tabularvalignment="middle">
4392 <column alignment="center" valignment="top" width="0">
4393 <column alignment="center" valignment="top" width="0">
4394 <column alignment="center" valignment="top" width="0">
4395 <row>
4396 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4397 \begin_inset Text
4399 \begin_layout Plain Layout
4400 Value
4401 \end_layout
4403 \end_inset
4404 </cell>
4405 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4406 \begin_inset Text
4408 \begin_layout Plain Layout
4409 System
4410 \end_layout
4412 \end_inset
4413 </cell>
4414 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4415 \begin_inset Text
4417 \begin_layout Plain Layout
4418 Region
4419 \end_layout
4421 \end_inset
4422 </cell>
4423 </row>
4424 <row>
4425 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4426 \begin_inset Text
4428 \begin_layout Plain Layout
4429 snes_pal
4430 \end_layout
4432 \end_inset
4433 </cell>
4434 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4435 \begin_inset Text
4437 \begin_layout Plain Layout
4438 Super NES
4439 \end_layout
4441 \end_inset
4442 </cell>
4443 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4444 \begin_inset Text
4446 \begin_layout Plain Layout
4448 \end_layout
4450 \end_inset
4451 </cell>
4452 </row>
4453 <row>
4454 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4455 \begin_inset Text
4457 \begin_layout Plain Layout
4458 sgb_pal
4459 \end_layout
4461 \end_inset
4462 </cell>
4463 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4464 \begin_inset Text
4466 \begin_layout Plain Layout
4467 Super Game Boy
4468 \end_layout
4470 \end_inset
4471 </cell>
4472 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4473 \begin_inset Text
4475 \begin_layout Plain Layout
4477 \end_layout
4479 \end_inset
4480 </cell>
4481 </row>
4482 <row>
4483 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4484 \begin_inset Text
4486 \begin_layout Plain Layout
4487 snes_ntsc
4488 \end_layout
4490 \end_inset
4491 </cell>
4492 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4493 \begin_inset Text
4495 \begin_layout Plain Layout
4496 Super NES
4497 \end_layout
4499 \end_inset
4500 </cell>
4501 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4502 \begin_inset Text
4504 \begin_layout Plain Layout
4505 NTSC
4506 \end_layout
4508 \end_inset
4509 </cell>
4510 </row>
4511 <row>
4512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4513 \begin_inset Text
4515 \begin_layout Plain Layout
4516 sgb_ntsc
4517 \end_layout
4519 \end_inset
4520 </cell>
4521 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4522 \begin_inset Text
4524 \begin_layout Plain Layout
4525 Super Game Boy
4526 \end_layout
4528 \end_inset
4529 </cell>
4530 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4531 \begin_inset Text
4533 \begin_layout Plain Layout
4534 NTSC
4535 \end_layout
4537 \end_inset
4538 </cell>
4539 </row>
4540 <row>
4541 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4542 \begin_inset Text
4544 \begin_layout Plain Layout
4546 \end_layout
4548 \end_inset
4549 </cell>
4550 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4551 \begin_inset Text
4553 \begin_layout Plain Layout
4554 BS-X (non-slotted)
4555 \end_layout
4557 \end_inset
4558 </cell>
4559 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4560 \begin_inset Text
4562 \begin_layout Plain Layout
4563 NTSC
4564 \end_layout
4566 \end_inset
4567 </cell>
4568 </row>
4569 <row>
4570 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4571 \begin_inset Text
4573 \begin_layout Plain Layout
4574 bsxslotted
4575 \end_layout
4577 \end_inset
4578 </cell>
4579 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4580 \begin_inset Text
4582 \begin_layout Plain Layout
4583 BS-X (slotted)
4584 \end_layout
4586 \end_inset
4587 </cell>
4588 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4589 \begin_inset Text
4591 \begin_layout Plain Layout
4592 NTSC
4593 \end_layout
4595 \end_inset
4596 </cell>
4597 </row>
4598 <row>
4599 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4600 \begin_inset Text
4602 \begin_layout Plain Layout
4603 sufamiturbo
4604 \end_layout
4606 \end_inset
4607 </cell>
4608 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4609 \begin_inset Text
4611 \begin_layout Plain Layout
4612 Sufami Turbo
4613 \end_layout
4615 \end_inset
4616 </cell>
4617 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4618 \begin_inset Text
4620 \begin_layout Plain Layout
4621 NTSC
4622 \end_layout
4624 \end_inset
4625 </cell>
4626 </row>
4627 </lyxtabular>
4629 \end_inset
4632 \end_layout
4634 \begin_layout Standard
4635 Frame rates are:
4636 \end_layout
4638 \begin_layout Standard
4639 \begin_inset Tabular
4640 <lyxtabular version="3" rows="3" columns="2">
4641 <features tabularvalignment="middle">
4642 <column alignment="center" valignment="top" width="0">
4643 <column alignment="center" valignment="top" width="0">
4644 <row>
4645 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4646 \begin_inset Text
4648 \begin_layout Plain Layout
4649 Region
4650 \end_layout
4652 \end_inset
4653 </cell>
4654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4655 \begin_inset Text
4657 \begin_layout Plain Layout
4658 Framerate (fps)
4659 \end_layout
4661 \end_inset
4662 </cell>
4663 </row>
4664 <row>
4665 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4666 \begin_inset Text
4668 \begin_layout Plain Layout
4670 \end_layout
4672 \end_inset
4673 </cell>
4674 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4675 \begin_inset Text
4677 \begin_layout Plain Layout
4678 322445/6448
4679 \end_layout
4681 \end_inset
4682 </cell>
4683 </row>
4684 <row>
4685 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4686 \begin_inset Text
4688 \begin_layout Plain Layout
4689 NTSC
4690 \end_layout
4692 \end_inset
4693 </cell>
4694 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4695 \begin_inset Text
4697 \begin_layout Plain Layout
4698 10738636/178683
4699 \end_layout
4701 \end_inset
4702 </cell>
4703 </row>
4704 </lyxtabular>
4706 \end_inset
4709 \end_layout
4711 \begin_layout Subsection
4712 Member: port1
4713 \end_layout
4715 \begin_layout Standard
4716 Contains type of port #1 (as one line).
4717  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4718  If not present, defaults to 'gamepad'.
4719 \end_layout
4721 \begin_layout Subsection
4722 Member: port2
4723 \end_layout
4725 \begin_layout Standard
4726 Contains type of port #2 (as one line).
4727  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4728  'justifier' and 'justifiers'.
4729  If not present, defaults to 'none'.
4730 \end_layout
4732 \begin_layout Subsection
4733 Member: gamename
4734 \end_layout
4736 \begin_layout Standard
4737 Contains name of the game (as one line).
4738 \end_layout
4740 \begin_layout Subsection
4741 Member: authors
4742 \end_layout
4744 \begin_layout Standard
4745 Contains authors, one per line.
4746  Part before '|' is the full name, part after is the nickname.
4747 \end_layout
4749 \begin_layout Subsection
4750 Member: systemid
4751 \end_layout
4753 \begin_layout Standard
4754 Always 
4755 \begin_inset Quotes eld
4756 \end_inset
4758 lsnes-rr1
4759 \begin_inset Quotes erd
4760 \end_inset
4762  (one line).
4763  Used to reject other saves.
4764 \end_layout
4766 \begin_layout Subsection
4767 Member: controlsversion
4768 \end_layout
4770 \begin_layout Standard
4771 Always 
4772 \begin_inset Quotes eld
4773 \end_inset
4776 \begin_inset Quotes erd
4777 \end_inset
4779  (one line).
4780  Used to identify what controls are there.
4781 \end_layout
4783 \begin_layout Subsection
4784 Member: 
4785 \begin_inset Quotes eld
4786 \end_inset
4788 coreversion
4789 \begin_inset Quotes erd
4790 \end_inset
4793 \end_layout
4795 \begin_layout Standard
4796 Contains bsnes core version number (as one line).
4797 \end_layout
4799 \begin_layout Subsection
4800 Member: projectid
4801 \end_layout
4803 \begin_layout Standard
4804 Contains project ID (as one line).
4805  Used to identify if two movies are part of the same project.
4806 \end_layout
4808 \begin_layout Subsection
4809 Member: {rom,slota,slotb}{,xml}.sha256
4810 \end_layout
4812 \begin_layout Standard
4813 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4814  Absent if corresponding file is absent.
4815 \end_layout
4817 \begin_layout Subsection
4818 Member: moviesram.<name>
4819 \end_layout
4821 \begin_layout Standard
4822 Raw binary startup SRAM of kind <name>.
4823  Only present in savestates and movies starting from SRAM.
4824 \end_layout
4826 \begin_layout Subsection
4827 Member: saveframe
4828 \end_layout
4830 \begin_layout Standard
4831 Contains frame number (as one line) of frame movie was saved on.
4832  Only present in savestates.
4833 \end_layout
4835 \begin_layout Subsection
4836 Member: lagcounter
4837 \end_layout
4839 \begin_layout Standard
4840 Current value of lag counter (as one line).
4841  Only present in savestates.
4842 \end_layout
4844 \begin_layout Subsection
4845 Member: pollcounters
4846 \end_layout
4848 \begin_layout Standard
4849 Contains poll counters (currently 100 of them), one per line.
4850  Each line is raw poll count if DRDY is set for it.
4851  Otherwise it is negative poll count minus one.
4852  Only present in savestates.
4853 \end_layout
4855 \begin_layout Subsection
4856 Member: hostmemory
4857 \end_layout
4859 \begin_layout Standard
4860 Raw binary dump of host memory.
4861  Only present in savestates.
4862 \end_layout
4864 \begin_layout Subsection
4865 Member: savestate
4866 \end_layout
4868 \begin_layout Standard
4869 The raw binary savestate itself.
4870  Savestate detection uses this file, only present in savestates.
4871 \end_layout
4873 \begin_layout Subsection
4874 Member: screenshot
4875 \end_layout
4877 \begin_layout Standard
4878 Screenshot of current frame.
4879  Only present in savestates.
4880  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4881  data.
4882  Height of image is inferred from the width and size of data.
4883 \end_layout
4885 \begin_layout Subsection
4886 Member: sram.<name>
4887 \end_layout
4889 \begin_layout Standard
4890 Raw binary SRAM of kind <name> at time of savestate.
4891  Only present in savestates.
4892 \end_layout
4894 \begin_layout Subsection
4895 Member: input
4896 \end_layout
4898 \begin_layout Standard
4899 The actual input track, one line per subframe (blank lines are skipped).
4900 \end_layout
4902 \begin_layout Itemize
4903 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4904  part of same frame as previous, otherwise it starts a new frame.
4905 \end_layout
4907 \begin_layout Itemize
4908 First subframe must start a new frame.
4909 \end_layout
4911 \begin_layout Standard
4912 Length of movie in frames is number of lines in input file that start a
4913  new frame.
4914 \end_layout
4916 \begin_layout Subsection
4917 Member: subtitles
4918 \end_layout
4920 \begin_layout Standard
4921 Subtitle track.
4922  Optional.
4923 \end_layout
4925 \begin_layout Itemize
4926 Each line is in form <firstframe> <numframes> <text>.
4927 \end_layout
4929 \begin_layout Itemize
4930 Linefeed is encoded as 
4931 \backslash
4932 n, backslash is encoded as 
4933 \backslash
4935 \backslash
4937 \end_layout
4939 \begin_layout Subsection
4940 Member: rerecords
4941 \end_layout
4943 \begin_layout Standard
4944 Contains textual base-10 rerecord count (as one line; emulator just writes
4945  this, it doesn't read it) + 1.
4946 \end_layout
4948 \begin_layout Subsection
4949 Member: rrdata
4950 \end_layout
4952 \begin_layout Standard
4953 This member stores set of load IDs.
4954  There is one load ID per rerecord (plus one corresponding to start of project).
4955 \end_layout
4957 \begin_layout Itemize
4958 This member constists of concatenation of records
4959 \end_layout
4961 \begin_layout Itemize
4962 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4963  IDs.
4964 \end_layout
4966 \begin_layout Itemize
4967 IDs are interpretted as 256-bit big-endian integers with warparound.
4968 \end_layout
4970 \begin_layout Itemize
4971 Initial predicted ID is all zeroes.
4972 \end_layout
4974 \begin_layout Standard
4975 Format of each record is:
4976 \end_layout
4978 \begin_layout Itemize
4979 1 byte: Opcode byte.
4980  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4981  Bit 7 is unused.
4982 \end_layout
4984 \begin_layout Itemize
4985 32-prefixlen bytes of ID.
4986 \end_layout
4988 \begin_layout Itemize
4989 countlen bytes of big-endian count (count).
4990 \end_layout
4992 \begin_layout Standard
4993 Records are processed as follows:
4994 \end_layout
4996 \begin_layout Itemize
4997 To form the first ID encoded by record, take the first prefixlen bytes predicted
4998  ID and append the read ID value to it.
4999  The result is the first ID encoded.
5000 \end_layout
5002 \begin_layout Itemize
5003 If countlen is 0, record encodes 1 ID.
5004 \end_layout
5006 \begin_layout Itemize
5007 If countlen is 1, record encodes 2+count IDs.
5008 \end_layout
5010 \begin_layout Itemize
5011 If countlen is 2, record encodes 258+count IDs.
5012 \end_layout
5014 \begin_layout Itemize
5015 If countlen is 3, record encodes 65794+count IDs.
5016 \end_layout
5018 \begin_layout Itemize
5019 The new predicted ID is the next ID after last one encoded by the record.
5020 \end_layout
5022 \begin_layout Standard
5023 The number of rerecords + 1 is equal to the sum of number of IDs encoded
5024  by all records.
5025 \end_layout
5027 \begin_layout Subsection
5028 Member: starttime.second
5029 \end_layout
5031 \begin_layout Standard
5032 Movie starting time, second part.
5033  Epoch is Unix epoch.
5034  Default is 1,000,000,000.
5035 \end_layout
5037 \begin_layout Subsection
5038 Member: starttime.subsecond
5039 \end_layout
5041 \begin_layout Standard
5042 Movie starting time, subsecond part.
5043  Unit is CPU clocks.
5044  Default is 0.
5045 \end_layout
5047 \begin_layout Subsection
5048 Member: savetime.second
5049 \end_layout
5051 \begin_layout Standard
5052 Movie saving time, second part.
5053  Default is starttime.second.
5054  Only present in savestates.
5055 \end_layout
5057 \begin_layout Subsection
5058 Member: savetime.subsecond
5059 \end_layout
5061 \begin_layout Standard
5062 Movie saving time, subsecond part.
5063  Default is starttime.subsecond.
5064  Only present in savestates.
5065 \end_layout
5067 \begin_layout Section
5068 lsvs file format (commentary tracks)
5069 \end_layout
5071 \begin_layout Subsection
5072 Clusters
5073 \end_layout
5075 \begin_layout Itemize
5076 Each cluster is 8kB (8192 bytes) in size.
5077 \end_layout
5079 \begin_layout Itemize
5080 Cluster n starts at offset 8192*n in file.
5081 \end_layout
5083 \begin_layout Itemize
5084 The following clusters are system special:
5085 \end_layout
5087 \begin_deeper
5088 \begin_layout Itemize
5089 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5090 \end_layout
5092 \begin_layout Itemize
5093 Cluster 1 (superblock)
5094 \end_layout
5096 \end_deeper
5097 \begin_layout Subsection
5098 Cluster tables
5099 \end_layout
5101 \begin_layout Itemize
5102 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
5103  last 11 bits of n).
5104 \end_layout
5106 \begin_layout Itemize
5107 This cluster table consists of 2048 4-byte big-endian integers.
5108 \end_layout
5110 \begin_layout Itemize
5111 Each entry describes a cluster in 16MB supercluster, in order.
5112 \end_layout
5114 \begin_layout Itemize
5115 The valid values for entries are:
5116 \end_layout
5118 \begin_deeper
5119 \begin_layout Itemize
5120 0x00000000: Free cluster
5121 \end_layout
5123 \begin_layout Itemize
5124 0x00000001: Last cluster in chain.
5125 \end_layout
5127 \begin_layout Itemize
5128 0xFFFFFFFF: System cluster (cluster tables and superblock)
5129 \end_layout
5131 \begin_layout Itemize
5132 (anything else): Number of next cluster in chain.
5133  Must not be multiple of 2048.
5134 \end_layout
5136 \end_deeper
5137 \begin_layout Itemize
5138 Due to limitations of the format, there can be at most 2097052 superclusters,
5139  giving maximum file size of 16TB.
5140 \end_layout
5142 \begin_layout Subsection
5143 Stream table
5144 \end_layout
5146 \begin_layout Itemize
5147 The stream table chain always starts in cluster 2.
5148 \end_layout
5150 \begin_layout Itemize
5151 Otherwise, it follows normal chaining.
5152 \end_layout
5154 \begin_layout Itemize
5155 The stream table consists of 16-byte entries:
5156 \end_layout
5158 \begin_deeper
5159 \begin_layout Itemize
5160 The first 8 bytes of entry give big-endian beginning position of stream
5161  in units of 1/48000 s.
5162 \end_layout
5164 \begin_layout Itemize
5165 The next 4 bytes of entry give big-endian beginning cluster for control
5166  data.
5167  0 here marks the entry as not present.
5168 \end_layout
5170 \begin_layout Itemize
5171 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5172 \end_layout
5174 \end_deeper
5175 \begin_layout Itemize
5176 Stream table clusters are normal clusters, following normal chaining.
5177 \end_layout
5179 \begin_layout Itemize
5180 The stream begnning position is not guarenteed unique.
5181  There can be multiple streams with the same starting position in the file.
5182 \end_layout
5184 \begin_layout Subsection
5185 Stream control data
5186 \end_layout
5188 \begin_layout Itemize
5189 The stream control data consists of entries 4 bytes each:
5190 \end_layout
5192 \begin_deeper
5193 \begin_layout Itemize
5194 The first 2 bytes of entry gives big-endian length of packet
5195 \end_layout
5197 \begin_layout Itemize
5198 The next byte of entry gives audio length of packet in units of 1/400 s.
5199 \end_layout
5201 \begin_layout Itemize
5202 The last byte is control byte.
5203 \end_layout
5205 \begin_deeper
5206 \begin_layout Itemize
5207 0 means this entry is not present and the control data ends.
5208 \end_layout
5210 \begin_layout Itemize
5211 1 is valid control entry.
5212 \end_layout
5214 \end_deeper
5215 \end_deeper
5216 \begin_layout Itemize
5217 The stream control data can also end by running into end of the readable
5218  chain.
5219 \end_layout
5221 \begin_deeper
5222 \begin_layout Itemize
5223 This happens if there happens to be exact multiple of 2048 packets in stream
5224  and number of packets is nonzero.
5225 \end_layout
5227 \end_deeper
5228 \begin_layout Itemize
5229 These clusters follow normal chaining.
5230 \end_layout
5232 \begin_layout Subsection
5233 Stream codec data
5234 \end_layout
5236 \begin_layout Itemize
5237 Stream codec data consists of raw Opus data packets packed back to back
5238  with nothing in between.
5239 \end_layout
5241 \begin_layout Itemize
5242 Warning: Due to internal limitations, this data must reside in the first
5243  65536 superclusters (that is, the first 1TB of the file).
5244 \end_layout
5246 \begin_layout Subsection
5247 Superblock
5248 \end_layout
5250 \begin_layout Itemize
5251 The superblock is stored in cluster 1.
5253 \end_layout
5255 \begin_layout Itemize
5256 The first 11 bytes are 
5257 \begin_inset Quotes eld
5258 \end_inset
5260 sefs-magic
5261 \begin_inset Quotes erd
5262 \end_inset
5264 <NUL>.
5265 \end_layout
5267 \begin_layout Itemize
5268 The rest are unused.
5269 \end_layout
5271 \begin_layout Itemize
5272 This cluster 1 is marked as system special.
5273 \end_layout
5275 \begin_layout Section
5276 Known ROM extensions
5277 \end_layout
5279 \begin_layout Itemize
5280 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5281 \end_layout
5283 \begin_layout Itemize
5284 DMG cartridge ROMs: dmg, gb.
5285 \end_layout
5287 \begin_layout Itemize
5288 GBC cartridge ROMs: cgb, gbc.
5289 \end_layout
5291 \begin_layout Section
5292 Gamepack files
5293 \end_layout
5295 \begin_layout Itemize
5296 The first line must be: 
5297 \begin_inset Quotes eld
5298 \end_inset
5300 [GAMEPACK FILE]
5301 \begin_inset Quotes erd
5302 \end_inset
5305 \end_layout
5307 \begin_layout Itemize
5308 There is one needed line: 
5309 \begin_inset Quotes eld
5310 \end_inset
5312 type <systype>
5313 \begin_inset Quotes erd
5314 \end_inset
5317  This sets system type to <systype>.
5318  The following system types are valid:
5319 \end_layout
5321 \begin_deeper
5322 \begin_layout Itemize
5323 snes (SNES)
5324 \end_layout
5326 \begin_layout Itemize
5327 bsx (BS-X non-slotted)
5328 \end_layout
5330 \begin_layout Itemize
5331 bsxslotted (BS-X slotted)
5332 \end_layout
5334 \begin_layout Itemize
5335 sufamiturbo (Sufami Turbo)
5336 \end_layout
5338 \begin_layout Itemize
5339 sgb (Super Game Boy)
5340 \end_layout
5342 \begin_layout Itemize
5343 dmg (Game Boy)
5344 \end_layout
5346 \begin_layout Itemize
5347 gbc (Game Boy Color)
5348 \end_layout
5350 \begin_layout Itemize
5351 gbc_gba (Game Boy Color with GBA initial register values)
5352 \end_layout
5354 \end_deeper
5355 \begin_layout Itemize
5356 Optionally a region can be specified: 
5357 \begin_inset Quotes eld
5358 \end_inset
5360 region <region>
5361 \begin_inset Quotes erd
5362 \end_inset
5365  The following values are valid:
5366 \end_layout
5368 \begin_deeper
5369 \begin_layout Itemize
5370 autodetect (Autodetect region: snes and sgb only)
5371 \end_layout
5373 \begin_layout Itemize
5374 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5375 \end_layout
5377 \begin_layout Itemize
5378 pal (PAL: snes, sgb)
5379 \end_layout
5381 \begin_layout Itemize
5382 world (World: dmg, gbc, gbc_gba)
5383 \end_layout
5385 \end_deeper
5386 \begin_layout Itemize
5387 ROM images are loaded as: 
5388 \begin_inset Quotes eld
5389 \end_inset
5391 rom <type> <file>
5392 \begin_inset Quotes erd
5393 \end_inset
5396  The following types are valid:
5397 \end_layout
5399 \begin_deeper
5400 \begin_layout Itemize
5401 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5402  BIOS in bsx, bsxslotted, sufamiturbo)
5403 \end_layout
5405 \begin_layout Itemize
5406 bsx (Cartridge ROM in bsx, bsxslotted)
5407 \end_layout
5409 \begin_layout Itemize
5410 slot-a (Cartridge ROM in sufamiturbo)
5411 \end_layout
5413 \begin_layout Itemize
5414 slot-b (Cartridge ROM in sufamiturbo)
5415 \end_layout
5417 \end_deeper
5418 \begin_layout Itemize
5419 ROM markup can be loaded as: 
5420 \begin_inset Quotes eld
5421 \end_inset
5423 xml <type> <file>
5424 \begin_inset Quotes erd
5425 \end_inset
5428  The types valid are the same as for ROMs.
5429 \end_layout
5431 \begin_layout Itemize
5432 Patches can be loaded as 
5433 \begin_inset Quotes eld
5434 \end_inset
5436 patch[<offset>] <type> <file>
5437 \begin_inset Quotes erd
5438 \end_inset
5441  The types are the same as for ROMs.
5442 \end_layout
5444 \begin_deeper
5445 \begin_layout Itemize
5446 Offset is given in form [+-]<number>.
5447  Usually offset is either +0 or -512.
5448 \end_layout
5450 \begin_layout Itemize
5451 Default offset is +0.
5452 \end_layout
5454 \end_deeper
5455 \begin_layout Subsection
5456 Example:
5457 \end_layout
5459 \begin_layout LyX-Code
5460 [GAMEPACK FILE]
5461 \end_layout
5463 \begin_layout LyX-Code
5464 type snes
5465 \end_layout
5467 \begin_layout LyX-Code
5468 rom rom speedygonzales.sfc
5469 \end_layout
5471 \begin_layout LyX-Code
5472 patch-512 rom sonicthehedgehog.ips
5473 \end_layout
5475 \begin_layout Subsection
5476 Example 2:
5477 \end_layout
5479 \begin_layout LyX-Code
5480 [GAMEPACK FILE]
5481 \end_layout
5483 \begin_layout LyX-Code
5484 type sgb
5485 \end_layout
5487 \begin_layout LyX-Code
5488 rom rom supergameboy.sfc
5489 \end_layout
5491 \begin_layout LyX-Code
5492 rom dmg megamanV.dmg
5493 \end_layout
5495 \begin_layout Section
5496 Quick'n'dirty encode guide
5497 \end_layout
5499 \begin_layout Enumerate
5500 Start the emulator and load the ROM and movie file.
5501 \end_layout
5503 \begin_layout Enumerate
5504 Set large AVI option 'set-setting avi-large on'
5505 \end_layout
5507 \begin_layout Enumerate
5508 Enable dumping 'dump-avi tmpdump' 
5509 \end_layout
5511 \begin_layout Enumerate
5512 Unpause and let it run until you want to end dumping.
5513 \end_layout
5515 \begin_layout Enumerate
5516 Close the emulator (closing the window is the easiest way).
5517  Or use 'end-avi'.
5518 \end_layout
5520 \begin_layout Enumerate
5521 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5522  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5523 \end_layout
5525 \begin_layout Enumerate
5526 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5527 \end_layout
5529 \begin_layout Enumerate
5530 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5531  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5532 \end_layout
5534 \begin_layout Enumerate
5535 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5536  Now final.mkv contains quick'n'dirty encode.
5537 \end_layout
5539 \begin_layout Section
5540 Axis configurations for some gamepad types:
5541 \end_layout
5543 \begin_layout Subsection
5544 XBox360 controller:
5545 \end_layout
5547 \begin_layout Standard
5548 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5549 \end_layout
5551 \begin_layout LyX-Code
5552 set-axis joystick0axis2 pressure-+
5553 \end_layout
5555 \begin_layout LyX-Code
5556 set-axis joystick0axis5 pressure-+
5557 \end_layout
5559 \begin_layout Itemize
5560 This is needed for SDL only.
5561  EVDEV sets those types correctly.
5562 \end_layout
5564 \begin_layout Subsection
5565 PS3 
5566 \begin_inset Quotes eld
5567 \end_inset
5569 sixaxis
5570 \begin_inset Quotes erd
5571 \end_inset
5573  controller:
5574 \end_layout
5576 \begin_layout Standard
5577 Axes 8-19 should be disabled.
5578 \end_layout
5580 \begin_layout LyX-Code
5581 set-axis joystick0axis8 disabled
5582 \end_layout
5584 \begin_layout LyX-Code
5585 set-axis joystick0axis9 disabled
5586 \end_layout
5588 \begin_layout LyX-Code
5589 set-axis joystick0axis10 disabled
5590 \end_layout
5592 \begin_layout LyX-Code
5593 set-axis joystick0axis11 disabled
5594 \end_layout
5596 \begin_layout LyX-Code
5597 set-axis joystick0axis12 disabled
5598 \end_layout
5600 \begin_layout LyX-Code
5601 set-axis joystick0axis13 disabled
5602 \end_layout
5604 \begin_layout LyX-Code
5605 set-axis joystick0axis14 disabled
5606 \end_layout
5608 \begin_layout LyX-Code
5609 set-axis joystick0axis15 disabled
5610 \end_layout
5612 \begin_layout LyX-Code
5613 set-axis joystick0axis16 disabled
5614 \end_layout
5616 \begin_layout LyX-Code
5617 set-axis joystick0axis17 disabled
5618 \end_layout
5620 \begin_layout LyX-Code
5621 set-axis joystick0axis18 disabled
5622 \end_layout
5624 \begin_layout LyX-Code
5625 set-axis joystick0axis19 disabled
5626 \end_layout
5628 \begin_layout Section
5629 Errata:
5630 \end_layout
5632 \begin_layout Subsection
5633 Problems from BSNES core:
5634 \end_layout
5636 \begin_layout Itemize
5637 The whole pending save stuff.
5638 \end_layout
5640 \begin_layout Itemize
5641 Lack of layer hiding.
5642 \end_layout
5644 \begin_layout Itemize
5645 It is slow (especially accuracy).
5646 \end_layout
5648 \begin_layout Itemize
5649 Firmwares can't be loaded from ZIP archives.
5650 \end_layout
5652 \begin_layout Subsection
5653 Other problems:
5654 \end_layout
5656 \begin_layout Itemize
5657 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5658 \end_layout
5660 \begin_layout Itemize
5661 Audio for last dumped frame is not itself dumped.
5662 \end_layout
5664 \begin_layout Itemize
5665 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5666 \end_layout
5668 \begin_layout Itemize
5669 No menus, command based interface (SDL).
5670 \end_layout
5672 \begin_layout Itemize
5673 Long commands don't scroll.
5674 \end_layout
5676 \begin_layout Section
5677 Changelog:
5678 \end_layout
5680 \begin_layout Subsection
5681 rr0-beta1
5682 \end_layout
5684 \begin_layout Itemize
5685 Fix -Wall warnings
5686 \end_layout
5688 \begin_layout Itemize
5689 Fix dumper video corruption with levels 10-18.
5690 \end_layout
5692 \begin_layout Subsection
5693 rr0-beta2
5694 \end_layout
5696 \begin_layout Itemize
5697 Autofire
5698 \end_layout
5700 \begin_layout Itemize
5701 Lots of code cleanups
5702 \end_layout
5704 \begin_layout Itemize
5705 Lua interface to settings
5706 \end_layout
5708 \begin_layout Itemize
5709 Allow specifying AVI borders without Lua
5710 \end_layout
5712 \begin_layout Itemize
5713 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5714 \end_layout
5716 \begin_layout Itemize
5717 on_snoop lua callback
5718 \end_layout
5720 \begin_layout Itemize
5721 Faster movie loading and saving.
5722 \end_layout
5724 \begin_layout Subsection
5725 rr0-beta3
5726 \end_layout
5728 \begin_layout Itemize
5729 Joystick support
5730 \end_layout
5732 \begin_layout Subsection
5733 rr0-beta4
5734 \end_layout
5736 \begin_layout Itemize
5737 Fix multi-buttons
5738 \end_layout
5740 \begin_layout Itemize
5741 Save jukebox functionality.
5742 \end_layout
5744 \begin_layout Subsection
5745 rr0-beta5
5746 \end_layout
5748 \begin_layout Itemize
5749 Try to fix some nasty failing movie load edge cases
5750 \end_layout
5752 \begin_layout Itemize
5753 Allow specifying scripts to run on command line.
5754 \end_layout
5756 \begin_layout Subsection
5757 rr0-beta6
5758 \end_layout
5760 \begin_layout Itemize
5761 Major source code reorganization.
5762 \end_layout
5764 \begin_layout Itemize
5765 Backup savestates before overwriting.
5766 \end_layout
5768 \begin_layout Itemize
5769 Don't crash if loading initial state fails.
5770 \end_layout
5772 \begin_layout Subsection
5773 rr0-beta7
5774 \end_layout
5776 \begin_layout Itemize
5777 Fix firmware lookup
5778 \end_layout
5780 \begin_layout Itemize
5781 Fix author name parsing
5782 \end_layout
5784 \begin_layout Itemize
5785 Fix rerecord counting
5786 \end_layout
5788 \begin_layout Itemize
5789 (SDL) Print messages to console if SDL is uninitialized
5790 \end_layout
5792 \begin_layout Itemize
5793 Add movieinfo program
5794 \end_layout
5796 \begin_layout Itemize
5797 Fix loading movies starting from SRAM.
5798 \end_layout
5800 \begin_layout Subsection
5801 rr0-beta8
5802 \end_layout
5804 \begin_layout Itemize
5805 Add support for unattended dumping
5806 \end_layout
5808 \begin_layout Itemize
5809 Fix compiling for Win32
5810 \end_layout
5812 \begin_layout Itemize
5813 Don't lock up if sound can't be initialized
5814 \end_layout
5816 \begin_layout Itemize
5817 Strip trailing CR from commands
5818 \end_layout
5820 \begin_layout Itemize
5821 Don't try to do dubious things in global ctors (fix crash on startup)
5822 \end_layout
5824 \begin_layout Subsection
5825 rr0-beta9
5826 \end_layout
5828 \begin_layout Itemize
5829 Small documentation tweaking
5830 \end_layout
5832 \begin_layout Itemize
5833 Fix make clean
5834 \end_layout
5836 \begin_layout Itemize
5837 Fix major bug in modifier matching
5838 \end_layout
5840 \begin_layout Subsection
5841 rr0-beta10
5842 \end_layout
5844 \begin_layout Itemize
5845 Lots of documentation fixes
5846 \end_layout
5848 \begin_layout Itemize
5849 Use dedicated callbacks for event backcomm., not commands.
5850 \end_layout
5852 \begin_layout Itemize
5853 Ensure that the watchdog is not hit when executing delayed reset.
5854 \end_layout
5856 \begin_layout Itemize
5857 Remove errant tab from joystick message.
5858 \end_layout
5860 \begin_layout Subsection
5861 rr0-beta11
5862 \end_layout
5864 \begin_layout Itemize
5865 Make autofire operate in absolute time, not linear time
5866 \end_layout
5868 \begin_layout Itemize
5869 Reinitialize controls when resuming from loadstate
5870 \end_layout
5872 \begin_layout Itemize
5873 Some more code cleanups
5874 \end_layout
5876 \begin_layout Itemize
5877 If Lua allocator fails, call OOM_panic()
5878 \end_layout
5880 \begin_layout Itemize
5881 Byte/word/dword/qword sized host memory write/read functions.
5882 \end_layout
5884 \begin_layout Itemize
5885 Dump at correct framerate if dumping interlaced NTSC (height=448).
5886 \end_layout
5888 \begin_layout Subsection
5889 rr0-beta12
5890 \end_layout
5892 \begin_layout Itemize
5893 Actually include the complete source code
5894 \end_layout
5896 \begin_layout Itemize
5897 Keep track of RTC
5898 \end_layout
5900 \begin_layout Subsection
5901 rr0-beta13
5902 \end_layout
5904 \begin_layout Itemize
5905 Document {save,start}time.{,sub}second.
5906 \end_layout
5908 \begin_layout Itemize
5909 Intercept time() from bsnes core.
5910 \end_layout
5912 \begin_layout Subsection
5913 rr0-beta14
5914 \end_layout
5916 \begin_layout Itemize
5917 Allow disabling time() interception (allow build on Mac OS X)
5918 \end_layout
5920 \begin_layout Itemize
5921 Use SDLMain on Mac OS X (make SDL not crash)
5922 \end_layout
5924 \begin_layout Itemize
5925 Disable delayed resets (just plain too buggy for now).
5926 \end_layout
5928 \begin_layout Itemize
5929 Code cleanups
5930 \end_layout
5932 \begin_layout Itemize
5933 Use 16-bit for graphics/video instead of 32-bit.
5934 \end_layout
5936 \begin_layout Itemize
5937 gui.rectangle/gui.pixel
5938 \end_layout
5940 \begin_layout Itemize
5941 gui.crosshair
5942 \end_layout
5944 \begin_layout Itemize
5945 New CSCD writer implementation.
5946 \end_layout
5948 \begin_layout Subsection
5949 rr0-beta15
5950 \end_layout
5952 \begin_layout Itemize
5953 Fix interaction of * and +.
5954 \end_layout
5956 \begin_layout Itemize
5957 Manual improvements
5958 \end_layout
5960 \begin_layout Itemize
5961 Use gettimeofday()/usleep(), these seem portable enough.
5962 \end_layout
5964 \begin_layout Itemize
5965 Move joystick axis manipulation to keymapper code.
5966 \end_layout
5968 \begin_layout Itemize
5969 Changes to how read-only works.
5970 \end_layout
5972 \begin_layout Itemize
5973 Refactor controller input code.
5974 \end_layout
5976 \begin_layout Subsection
5977 rr0-beta16
5978 \end_layout
5980 \begin_layout Itemize
5981 Fix mouseclick scale compensation.
5982 \end_layout
5984 \begin_layout Itemize
5985 Draw area boundaries correctly in SDL code.
5986 \end_layout
5988 \begin_layout Itemize
5989 gui.screenshot.
5990 \end_layout
5992 \begin_layout Itemize
5993 Fix CSCD output (buffer overrun and race condition).
5994 \end_layout
5996 \begin_layout Subsection
5997 rr0-beta17
5998 \end_layout
6000 \begin_layout Itemize
6001 JMD dumping support.
6002 \end_layout
6004 \begin_layout Itemize
6005 Allow unattended dumping to JMD.
6006 \end_layout
6008 \begin_layout Itemize
6009 Move to BSNES v083.
6010 \end_layout
6012 \begin_layout Itemize
6013 Switch back to 32-bit colors.
6014 \end_layout
6016 \begin_layout Itemize
6017 Add Lua function gui.color.
6018 \end_layout
6020 \begin_layout Itemize
6021 Use some new C++11 features in GCC 4.6.
6022 \end_layout
6024 \begin_layout Itemize
6025 Be prepared for core frequency changes.
6026 \end_layout
6028 \begin_layout Itemize
6029 Pass colors in one chunk from Lua.
6030 \end_layout
6032 \begin_layout Subsection
6033 rr0-beta18
6034 \end_layout
6036 \begin_layout Itemize
6037 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
6038  memory.read_vma() and memory.find_vma().
6039 \end_layout
6041 \begin_layout Itemize
6042 Numerious documentation fixups
6043 \end_layout
6045 \begin_layout Itemize
6046 RTC time format changed
6047 \end_layout
6049 \begin_layout Itemize
6050 Reformat flags display
6051 \end_layout
6053 \begin_layout Itemize
6054 Allow lua package name to be overridden
6055 \end_layout
6057 \begin_layout Itemize
6058 SDUMP (high-quality dumping).
6059 \end_layout
6061 \begin_layout Itemize
6062 Split platform support to plugins.
6063 \end_layout
6065 \begin_layout Itemize
6066 Make all sound plugins support basic sound commands
6067 \end_layout
6069 \begin_layout Itemize
6070 Support portaudio for sound.
6071 \end_layout
6073 \begin_layout Itemize
6074 Allow disable Lua/SDL searching.
6075 \end_layout
6077 \begin_layout Itemize
6078 Upconvert colors when copying lcscreen to screen.
6079 \end_layout
6081 \begin_layout Itemize
6082 Reorganize source tree.
6083 \end_layout
6085 \begin_layout Itemize
6086 Evdev joystick support.
6087 \end_layout
6089 \begin_layout Itemize
6090 Refactor more code into generic window code.
6091 \end_layout
6093 \begin_layout Subsection
6094 rr0-beta19
6095 \end_layout
6097 \begin_layout Itemize
6098 Refactor message handling.
6099 \end_layout
6101 \begin_layout Itemize
6102 Rework makefile
6103 \end_layout
6105 \begin_layout Itemize
6106 Documentation fixes
6107 \end_layout
6109 \begin_layout Itemize
6110 Finish pending saves before load/quit.
6111 \end_layout
6113 \begin_layout Itemize
6114 Wxwidgets graphics plugin.
6115 \end_layout
6117 \begin_layout Subsection
6118 rr0-beta20
6119 \end_layout
6121 \begin_layout Itemize
6122 Get rid of win32-crap.[ch]pp.
6123 \end_layout
6125 \begin_layout Itemize
6126 Move files around a lot.
6127 \end_layout
6129 \begin_layout Itemize
6130 Get rid of need for host C++ compiler.
6131 \end_layout
6133 \begin_layout Itemize
6134 Bsnes v084 core.
6135 \end_layout
6137 \begin_layout Itemize
6138 Refactor inter-component communication.
6139 \end_layout
6141 \begin_layout Itemize
6142 Fix zero luma.
6143 \end_layout
6145 \begin_layout Itemize
6146 Fix crash on multiline aliases.
6147 \end_layout
6149 \begin_layout Itemize
6150 Load/Save settings in wxwidgets gui.
6151 \end_layout
6153 \begin_layout Subsection
6154 rr0-beta21
6155 \end_layout
6157 \begin_layout Itemize
6158 Patch problems in bsnes core
6159 \end_layout
6161 \begin_layout Itemize
6162 SNES is little-endian, not big-endian!
6163 \end_layout
6165 \begin_layout Itemize
6166 Fix memory corruption in lcscreen::load()
6167 \end_layout
6169 \begin_layout Subsection
6170 rr0-beta22
6171 \end_layout
6173 \begin_layout Itemize
6174 Fix interpretting repeat counts in rrdata loading.
6175 \end_layout
6177 \begin_layout Itemize
6178 New lua callback: on_frame()
6179 \end_layout
6181 \begin_layout Itemize
6182 Remove calls to runtosave() that aren't supposed to be there
6183 \end_layout
6185 \begin_layout Itemize
6186 Lua function: movie.read_rtc()
6187 \end_layout
6189 \begin_layout Itemize
6190 Ignore src/fonts/font.cpp
6191 \end_layout
6193 \begin_layout Itemize
6194 Fix more bsnes core problems
6195 \end_layout
6197 \begin_layout Itemize
6198 Control bsnes random seeding
6199 \end_layout
6201 \begin_layout Itemize
6202 Pause-on-end
6203 \end_layout
6205 \begin_layout Itemize
6206 Some bsnes core debugging features (state dump and state hash)
6207 \end_layout
6209 \begin_layout Itemize
6210 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6211  it was 'lsnes rr0-beta21').
6212 \end_layout
6214 \begin_layout Subsection
6215 rr0-beta23
6216 \end_layout
6218 \begin_layout Itemize
6219 Fix memory corruption due to macro/field mixup
6220 \end_layout
6222 \begin_layout Itemize
6223 search-memory update
6224 \end_layout
6226 \begin_layout Itemize
6227 Allow direct-mapped framebuffer
6228 \end_layout
6230 \begin_layout Itemize
6231 SDL: Use SDL_ANYFORMAT if possible
6232 \end_layout
6234 \begin_layout Itemize
6235 SDMP2SOX: 2s delay modes.
6236 \end_layout
6238 \begin_layout Itemize
6239 Wxwidgets: Cleanups
6240 \end_layout
6242 \begin_layout Itemize
6243 Use sed -E, not sed -r.
6244  Fixes building on Mac OS X.
6245 \end_layout
6247 \begin_layout Itemize
6248 Wxwidgets: Save jukebox on exit
6249 \end_layout
6251 \begin_layout Itemize
6252 Fix RTC if using load-movie on savestate.
6253 \end_layout
6255 \begin_layout Itemize
6256 Fix crash related to full console mode.
6257 \end_layout
6259 \begin_layout Subsection
6260 rr0-beta24
6261 \end_layout
6263 \begin_layout Itemize
6264 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6265 \end_layout
6267 \begin_layout Itemize
6268 Wxwidgets: Allow compiling on Mac OS X.
6269 \end_layout
6271 \begin_layout Itemize
6272 Use movie compare instead of movie hashing (faster save/load).
6273 \end_layout
6275 \begin_layout Itemize
6276 Lua: _SYSTEM table.
6277 \end_layout
6279 \begin_layout Subsection
6280 rr0-beta25
6281 \end_layout
6283 \begin_layout Itemize
6284 sdmp2sox: Pad soundtrack if using -l or -L.
6285 \end_layout
6287 \begin_layout Itemize
6288 sdmp2sox: Fix NTSC overscan.
6289 \end_layout
6291 \begin_layout Itemize
6292 sdmp2sox: Add AR correction mode.
6293 \end_layout
6295 \begin_layout Itemize
6296 call lua_close() when exiting.
6297 \end_layout
6299 \begin_layout Itemize
6300 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6301 \end_layout
6303 \begin_layout Subsection
6304 rr0-beta26
6305 \end_layout
6307 \begin_layout Itemize
6308 Fix IPS patching code (use bsnes core IPS patcher).
6309 \end_layout
6311 \begin_layout Itemize
6312 Implement BPS patching (using bsnes core IPS patcher).
6313 \end_layout
6315 \begin_layout Itemize
6316 Add feature to load headered ROMs.
6317 \end_layout
6319 \begin_layout Subsection
6320 rr0-beta27
6321 \end_layout
6323 \begin_layout Itemize
6324 Show command names when showing keybindings
6325 \end_layout
6327 \begin_layout Subsection
6329 \end_layout
6331 \begin_layout Itemize
6332 Fix pause-on-end to be actually controllable
6333 \end_layout
6335 \begin_layout Itemize
6336 SDL: Poll all events in queue, not just first one (fixes slowness in command
6337  typing)
6338 \end_layout
6340 \begin_layout Itemize
6341 Wxwidgets: Fix ROM loading.
6342 \end_layout
6344 \begin_layout Subsection
6345 rr1-beta0
6346 \end_layout
6348 \begin_layout Itemize
6349 Lua: Add gui.textH, gui.textV, gui.textHV
6350 \end_layout
6352 \begin_layout Itemize
6353 Fix text colors on SDL on Mac OS X
6354 \end_layout
6356 \begin_layout Itemize
6357 Mode 'F' for finished in readonly mode.
6358 \end_layout
6360 \begin_layout Itemize
6361 Fix some WS errors.
6362 \end_layout
6364 \begin_layout Itemize
6365 Reliably pause after skip poll
6366 \end_layout
6368 \begin_layout Itemize
6369 Split UI and core into their own threads
6370 \end_layout
6372 \begin_layout Subsection
6373 rr1-beta1
6374 \end_layout
6376 \begin_layout Itemize
6377 Remove leftover dummy SRAM slot
6378 \end_layout
6380 \begin_layout Itemize
6381 Fix controller numbers.
6382 \end_layout
6384 \begin_layout Subsection
6385 rr1-beta2
6386 \end_layout
6388 \begin_layout Itemize
6389 Fix lsnes-dumpavi after interface change.
6390 \end_layout
6392 \begin_layout Itemize
6393 Also give BSNES patches for v085.
6394 \end_layout
6396 \begin_layout Itemize
6397 Pack movie data in memory.
6398 \end_layout
6400 \begin_layout Subsection
6401 rr1-beta3
6402 \end_layout
6404 \begin_layout Itemize
6405 Fix framecount/length given when loading movies.
6406 \end_layout
6408 \begin_layout Itemize
6409 Controller command memory leak fixes.
6410 \end_layout
6412 \begin_layout Itemize
6413 Don't leak palette if freeing screen object.
6414 \end_layout
6416 \begin_layout Subsection
6417 rr1-beta4
6418 \end_layout
6420 \begin_layout Itemize
6421 Detect revisions.
6422 \end_layout
6424 \begin_layout Itemize
6425 Wxwidgets: Allow controlling dumper from the menu.
6426 \end_layout
6428 \begin_layout Subsection
6429 rr1-beta5
6430 \end_layout
6432 \begin_layout Itemize
6433 Rewrite parts of manual
6434 \end_layout
6436 \begin_layout Itemize
6437 Lua: Make it work with Lua 5.2.
6438 \end_layout
6440 \begin_layout Subsection
6441 rr1-beta6
6442 \end_layout
6444 \begin_layout Itemize
6445 Win32: Fix compile errors.
6446 \end_layout
6448 \begin_layout Subsection
6449 rr1-beta7
6450 \end_layout
6452 \begin_layout Itemize
6453 Refactor controller input code.
6454 \end_layout
6456 \begin_layout Itemize
6457 Fix crash when using command line on SDL / Mac OS X.
6458 \end_layout
6460 \begin_layout Subsection
6461 rr1-beta8
6462 \end_layout
6464 \begin_layout Itemize
6465 Delete core/coroutine (obsolete)
6466 \end_layout
6468 \begin_layout Itemize
6469 Lag input display by one frame.
6470 \end_layout
6472 \begin_layout Itemize
6473 Rewind movie to beginning function.
6474 \end_layout
6476 \begin_layout Itemize
6477 Fix wrong frame number reported to Lua when repainting after loadstate
6478 \end_layout
6480 \begin_layout Itemize
6481 Support UI editing of jukebox
6482 \end_layout
6484 \begin_layout Itemize
6485 Wxwidgets: Save settings on exit.
6486 \end_layout
6488 \begin_layout Itemize
6489 Support ${project} for filenames
6490 \end_layout
6492 \begin_layout Itemize
6493 SDL: Fix command history
6494 \end_layout
6496 \begin_layout Subsection
6497 rr1-beta9
6498 \end_layout
6500 \begin_layout Itemize
6501 Fix some order-of-global-ctor bugs.
6502 \end_layout
6504 \begin_layout Subsection
6505 rr1-beta10
6506 \end_layout
6508 \begin_layout Itemize
6509 Fix crashes when quitting on Win32.
6510 \end_layout
6512 \begin_layout Subsection
6513 rr1-beta11
6514 \end_layout
6516 \begin_layout Itemize
6517 EVDEV: Queue keypresses from joystick, don't send directly
6518 \end_layout
6520 \begin_layout Itemize
6521 Wxwidgets: Load-Preserve that actually works.
6522 \end_layout
6524 \begin_layout Subsection
6525 rr1-beta12
6526 \end_layout
6528 \begin_layout Itemize
6529 Wxwidgets: GUI for memory search.
6530 \end_layout
6532 \begin_layout Itemize
6533 Warn about using synchronous queue in UI callback.
6534 \end_layout
6536 \begin_layout Subsection
6537 rr1-beta13
6538 \end_layout
6540 \begin_layout Itemize
6541 Remember last saved file for each ROM
6542 \end_layout
6544 \begin_layout Itemize
6545 Support MT dumping via boost.
6546 \end_layout
6548 \begin_layout Itemize
6549 Lua: input.raw
6550 \end_layout
6552 \begin_layout Itemize
6553 Lua: input.keyhook
6554 \end_layout
6556 \begin_layout Itemize
6557 Make mouse be ordinary input instead of special-casing
6558 \end_layout
6560 \begin_layout Itemize
6561 SDL: Don't screw up commands with NUL codepoints.
6562 \end_layout
6564 \begin_layout Subsection
6565 rr1-beta14
6566 \end_layout
6568 \begin_layout Itemize
6569 Merge status panel and main window
6570 \end_layout
6572 \begin_layout Itemize
6573 True movie slot support (the rest of it)
6574 \end_layout
6576 \begin_layout Itemize
6577 SDL: Fix compilation error
6578 \end_layout
6580 \begin_layout Itemize
6581 Elminate cross calls in dump menu code.
6582 \end_layout
6584 \begin_layout Subsection
6585 rr1-beta15
6586 \end_layout
6588 \begin_layout Itemize
6589 Cancel pending saves command
6590 \end_layout
6592 \begin_layout Itemize
6593 Wxwidgets: Code refactoring
6594 \end_layout
6596 \begin_layout Itemize
6597 Wxwidgets: Fix system -> reset
6598 \end_layout
6600 \begin_layout Itemize
6601 Wxwidgets: Read watch expressions in the right thread
6602 \end_layout
6604 \begin_layout Subsection
6605 rr1-beta16
6606 \end_layout
6608 \begin_layout Itemize
6609 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6610  support that).
6611 \end_layout
6613 \begin_layout Itemize
6614 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6615 \end_layout
6617 \begin_layout Itemize
6618 Don't append trailing '-' to prefix when saving movie.
6619 \end_layout
6621 \begin_layout Itemize
6622 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6623 \end_layout
6625 \begin_layout Subsection
6627 \end_layout
6629 \begin_layout Itemize
6630 Document memory watch syntax.
6631 \end_layout
6633 \begin_layout Subsection
6634 rr1-delta1
6635 \end_layout
6637 \begin_layout Itemize
6638 Fix unattended dumping (lsnes-dumpavi)
6639 \end_layout
6641 \begin_layout Itemize
6642 Support RAW dumping
6643 \end_layout
6645 \begin_layout Itemize
6646 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6647 \end_layout
6649 \begin_layout Itemize
6650 Add option to control sample rate preturbation in AVI dumper
6651 \end_layout
6653 \begin_layout Subsection
6654 rr1-delta2
6655 \end_layout
6657 \begin_layout Itemize
6658 Wxwidgets: Fix dumper submodes
6659 \end_layout
6661 \begin_layout Itemize
6662 Set core controller types before loadstate
6663 \end_layout
6665 \begin_layout Subsection
6666 rr1-delta2epsilon1
6667 \end_layout
6669 \begin_layout Itemize
6670 Fix compiling with bsnes v086.
6671 \end_layout
6673 \begin_layout Subsection
6674 rr1-delta3
6675 \end_layout
6677 \begin_layout Itemize
6678 Don't prompt before quitting
6679 \end_layout
6681 \begin_layout Itemize
6682 Start unpaused, preserve pause/unpause over load.
6683 \end_layout
6685 \begin_layout Itemize
6686 Try to autodetect if ROM is headered.
6687 \end_layout
6689 \begin_layout Itemize
6690 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6691 \end_layout
6693 \begin_layout Itemize
6694 Allow configuring some hotkeys.
6695 \end_layout
6697 \begin_layout Subsection
6698 rr1-delta4
6699 \end_layout
6701 \begin_layout Itemize
6702 Lots of code cleanups
6703 \end_layout
6705 \begin_layout Itemize
6706 Fix JMD compression (JMD dumping was broken)
6707 \end_layout
6709 \begin_layout Itemize
6710 Don't crash if Lua C function throws an exception.
6711 \end_layout
6713 \begin_layout Itemize
6714 Support bitmap drawing in Lua.
6715 \end_layout
6717 \begin_layout Itemize
6718 Fix bsnes v085/v086 patches.
6719 \end_layout
6721 \begin_layout Itemize
6722 Improve stability on win32.
6723 \end_layout
6725 \begin_layout Subsection
6726 rr1-delta4epsilon1
6727 \end_layout
6729 \begin_layout Itemize
6730 Don't corrupt movie if movie length is integer multiple of frames per page.
6731 \end_layout
6733 \begin_layout Subsection
6734 rr1-delta5
6735 \end_layout
6737 \begin_layout Itemize
6738 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6739 \end_layout
6741 \begin_layout Itemize
6742 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6743 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6745 \end_layout
6747 \begin_layout Itemize
6748 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6749 \end_layout
6751 \begin_layout Itemize
6752 Wxwidgets: Fix broken modifiers
6753 \end_layout
6755 \begin_layout Itemize
6756 on_paint has parameter now.
6757 \end_layout
6759 \begin_layout Itemize
6760 Optional initital fill for bitmaps
6761 \end_layout
6763 \begin_layout Itemize
6764 Fix palette changing.
6765 \end_layout
6767 \begin_layout Itemize
6768 Optimize rendering a bit.
6769 \end_layout
6771 \begin_layout Itemize
6772 Bsnes v087 support.
6773 \end_layout
6775 \begin_layout Subsection
6776 rr1-delta5epsilon1
6777 \end_layout
6779 \begin_layout Itemize
6780 Movieinfo: Fix display of port #2 type.
6781 \end_layout
6783 \begin_layout Itemize
6784 Call on_input() after loadstate.
6785 \end_layout
6787 \begin_layout Subsection
6788 rr1-delta5epsilon2
6789 \end_layout
6791 \begin_layout Itemize
6792 Fix writing port2 data to movie.
6793 \end_layout
6795 \begin_layout Itemize
6796 Fix SRAM handling with Bsnes v087.
6797 \end_layout
6799 \begin_layout Subsection
6800 rr1-delta6
6801 \end_layout
6803 \begin_layout Itemize
6804 Library loading support
6805 \end_layout
6807 \begin_layout Itemize
6808 Built-in TSCC encoder
6809 \end_layout
6811 \begin_layout Itemize
6812 Hi-color (256T colors) dumping.
6813 \end_layout
6815 \begin_layout Itemize
6816 Dump over TCP/IP(v6)
6817 \end_layout
6819 \begin_layout Itemize
6820 Hidable status panel
6821 \end_layout
6823 \begin_layout Itemize
6824 Turbo toggle/hold
6825 \end_layout
6827 \begin_layout Itemize
6828 Adjustable sound volume
6829 \end_layout
6831 \begin_layout Itemize
6832 Screen scaling
6833 \end_layout
6835 \begin_layout Itemize
6836 Allow DnD into filename boxes
6837 \end_layout
6839 \begin_layout Itemize
6840 Configurable paths
6841 \end_layout
6843 \begin_layout Itemize
6844 Portaudio: Fix speaker popping at start
6845 \end_layout
6847 \begin_layout Itemize
6848 Lots of UI changes
6849 \end_layout
6851 \begin_layout Itemize
6852 Speed adjustment menu
6853 \end_layout
6855 \begin_layout Itemize
6856 Win32 joystick support
6857 \end_layout
6859 \begin_layout Itemize
6860 Lua: gui.rainbow and gui.box
6861 \end_layout
6863 \begin_layout Itemize
6864 Split key lists into classes (the key list was large!)
6865 \end_layout
6867 \begin_layout Itemize
6868 More save slots support
6869 \end_layout
6871 \begin_layout Itemize
6872 Wxwidgets (wxJoystick) joystick support
6873 \end_layout
6875 \begin_layout Subsection
6876 rr1-delta7
6877 \end_layout
6879 \begin_layout Itemize
6880 Lots of internal joystick refactoring
6881 \end_layout
6883 \begin_layout Itemize
6884 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6885 \end_layout
6887 \begin_layout Itemize
6888 Wxwidgets: Settings mode (open settings without ROM)
6889 \end_layout
6891 \begin_layout Itemize
6892 Wxwidgets: Prompt key to use option
6893 \end_layout
6895 \begin_layout Itemize
6896 Wxwidgets: Fix crash if key goes away underneath
6897 \end_layout
6899 \begin_layout Itemize
6900 Wxwidgets: Fix mouse position in presence of scaling
6901 \end_layout
6903 \begin_layout Itemize
6904 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6905 \end_layout
6907 \begin_layout Itemize
6908 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6909  seem to work well on WinXP)
6910 \end_layout
6912 \begin_layout Itemize
6913 Start paused option.
6914 \end_layout
6916 \begin_layout Subsection
6917 rr1-delta7epsilon1
6918 \end_layout
6920 \begin_layout Itemize
6921 AVI: ZMBV support
6922 \end_layout
6924 \begin_layout Itemize
6925 lsnes-dumpavi: Start Lua before starting dumper
6926 \end_layout
6928 \begin_layout Itemize
6929 AVI: Fix secondary audio in mode 4.
6930 \end_layout
6932 \begin_layout Subsection
6933 rr1-delta7epsilon2
6934 \end_layout
6936 \begin_layout Itemize
6937 AVI: Refactor ZMBV a bit.
6938 \end_layout
6940 \begin_layout Itemize
6941 Fix error reading analog values from movie file
6942 \end_layout
6944 \begin_layout Subsection
6945 rr1-delta8
6946 \end_layout
6948 \begin_layout Itemize
6949 Delayed reset support
6950 \end_layout
6952 \begin_layout Itemize
6953 Lua: memory.hash_region
6954 \end_layout
6956 \begin_layout Subsection
6957 rr1-delta8epsilon1
6958 \end_layout
6960 \begin_layout Itemize
6961 Rework the build system
6962 \end_layout
6964 \begin_layout Itemize
6965 Typing input support
6966 \end_layout
6968 \begin_layout Itemize
6969 Fix building with bsnes v086 and v087.
6970 \end_layout
6972 \begin_layout Itemize
6973 SDL: Save settings on exit
6974 \end_layout
6976 \begin_layout Itemize
6977 SDL: Command to enter command line mode with given command.
6978 \end_layout
6980 \begin_layout Itemize
6981 SDL: More advanced command editing.
6982 \end_layout
6984 \begin_layout Subsection
6985 rr1-delta9
6986 \end_layout
6988 \begin_layout Itemize
6989 wxMSW: Fix the 
6990 \begin_inset Quotes eld
6991 \end_inset
6993 arrow keys and enter don't work
6994 \begin_inset Quotes erd
6995 \end_inset
6997  problem
6998 \end_layout
7000 \begin_layout Itemize
7001 MSU-1 support
7002 \end_layout
7004 \begin_layout Itemize
7005 Show mode changes due to rewinding.
7006 \end_layout
7008 \begin_layout Itemize
7009 Unsafe rewind support
7010 \end_layout
7012 \begin_layout Itemize
7013 Fix directory transversal.
7014 \end_layout
7016 \begin_layout Subsection
7017 rr1-delta10
7018 \end_layout
7020 \begin_layout Itemize
7021 AVI: Sound mode 5 (48kHz high-quality)
7022 \end_layout
7024 \begin_layout Itemize
7025 Lua: Reset Lua VM
7026 \end_layout
7028 \begin_layout Itemize
7029 Map the SNES bus into address space
7030 \end_layout
7032 \begin_layout Itemize
7033 Fix loading memory watch files with CRLF line endings
7034 \end_layout
7036 \begin_layout Subsection
7037 rr1-delta10epsilon1
7038 \end_layout
7040 \begin_layout Itemize
7041 Map bsnes internal state into memory space
7042 \end_layout
7044 \begin_layout Itemize
7045 Fix the 
7046 \begin_inset Quotes eld
7047 \end_inset
7049 click on panel wedges the emulator
7050 \begin_inset Quotes erd
7051 \end_inset
7053  for real.
7054 \end_layout
7056 \begin_layout Itemize
7057 DnD movies/saves on the main window.
7058 \end_layout
7060 \begin_layout Subsection
7061 rr1-delta11
7062 \end_layout
7064 \begin_layout Itemize
7065 Split core bindings into own module.
7066 \end_layout
7068 \begin_layout Itemize
7069 Remember invalid settings
7070 \end_layout
7072 \begin_layout Itemize
7073 Support for modified Gambatte core for GB/GBC emulation.
7074 \end_layout
7076 \begin_layout Itemize
7077 Reload/swap ROM function
7078 \end_layout
7080 \begin_layout Subsection
7081 rr1-delta11epsilon1
7082 \end_layout
7084 \begin_layout Itemize
7085 Fix step poll function
7086 \end_layout
7088 \begin_layout Subsection
7089 rr1-delta12
7090 \end_layout
7092 \begin_layout Itemize
7093 Non-insane savestate anchoring
7094 \end_layout
7096 \begin_layout Subsection
7097 rr1-delta13
7098 \end_layout
7100 \begin_layout Itemize
7101 More Memory search methods
7102 \end_layout
7104 \begin_layout Itemize
7105 Preserve movie if loading in RO mode.
7106 \end_layout
7108 \begin_layout Itemize
7109 Fix a obscure case in timeline check
7110 \end_layout
7112 \begin_layout Itemize
7113 Revamp the entiere ROM loading code
7114 \end_layout
7116 \begin_layout Itemize
7117 Support DnD on ROMs
7118 \end_layout
7120 \begin_layout Itemize
7121 Revamp menu layout
7122 \end_layout
7124 \begin_layout Itemize
7125 Standalone hotkey config dialog
7126 \end_layout
7128 \begin_layout Itemize
7129 Show bindings in more user-friendly format
7130 \end_layout
7132 \begin_layout Subsection
7133 rr1-delta13epsilon1
7134 \end_layout
7136 \begin_layout Itemize
7137 Pipedec support
7138 \end_layout
7140 \begin_layout Itemize
7141 Fix uninitialized variables in bsnes v085
7142 \end_layout
7144 \begin_layout Subsection
7145 rr1-delta14
7146 \end_layout
7148 \begin_layout Itemize
7149 Merge gambatte core into mainline (from its own branch)
7150 \end_layout
7152 \begin_layout Itemize
7153 Wxwidgets: Show expected dump file formats
7154 \end_layout
7156 \begin_layout Itemize
7157 Memory watch: Data typing
7158 \end_layout
7160 \begin_layout Itemize
7161 lsnes internal MMIO area.
7162 \end_layout
7164 \begin_layout Itemize
7165 Wxwidgets: New memory watch editor
7166 \end_layout
7168 \begin_layout Itemize
7169 Hexadecimal memory watches
7170 \end_layout
7172 \begin_layout Itemize
7173 Wxwidgets: Monospaced panel
7174 \end_layout
7176 \begin_layout Itemize
7177 Wxwidgets: Split memory watches in panel
7178 \end_layout
7180 \begin_layout Itemize
7181 Wxwidgets: Disable VMAs in memory search
7182 \end_layout
7184 \begin_layout Itemize
7185 lsnes-dumpavi: Fix speed bug
7186 \end_layout
7188 \begin_layout Itemize
7189 Movie subtitle support
7190 \end_layout
7192 \begin_layout Itemize
7193 Fix rerecord count reporting
7194 \end_layout
7196 \begin_layout Itemize
7197 Don't trash movie when loading in readonly mode.
7198 \end_layout
7200 \begin_layout Subsection
7201 rr1-delta14epsilon1
7202 \end_layout
7204 \begin_layout Itemize
7205 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7206 \end_layout
7208 \begin_layout Itemize
7209 Fix build on Mac OS X.
7210 \end_layout
7212 \begin_layout Itemize
7213 Lua: loopwrapper
7214 \end_layout
7216 \begin_layout Itemize
7217 Wxwidgets: Hidable messages window
7218 \end_layout
7220 \begin_layout Itemize
7221 Lua: input.joyset
7222 \end_layout
7224 \begin_layout Itemize
7225 Bsnes: Support inconsistent saves
7226 \end_layout
7228 \begin_layout Itemize
7229 Bsnes: Allow simulating saving every frame
7230 \end_layout
7232 \begin_layout Itemize
7233 Fix desync if savestate is loaded in readonly mode in certain conditions.
7234 \end_layout
7236 \begin_layout Itemize
7237 Wxwidgets: Fix save dialogs on Mac OS X.
7238 \end_layout
7240 \begin_layout Itemize
7241 Wxwidgets: Fix insane status width on Win32.
7242 \end_layout
7244 \begin_layout Itemize
7245 Wxwidgets: Fix autohold processing to be faster.
7246 \end_layout
7248 \begin_layout Itemize
7249 Wxwidgets: Allow loading ROMs and movies from commandline.
7250 \end_layout
7252 \begin_layout Subsection
7253 rr1-delta15
7254 \end_layout
7256 \begin_layout Itemize
7257 Be a bit smarter with --load
7258 \end_layout
7260 \begin_layout Itemize
7261 Rewrote higher-level parts of audio system
7262 \end_layout
7264 \begin_layout Itemize
7265 Tool to build commentary tracks
7266 \end_layout
7268 \begin_layout Itemize
7269 Lua: input.joyget
7270 \end_layout
7272 \begin_layout Itemize
7273 Gambatte: Add support for SVN358
7274 \end_layout
7276 \begin_layout Itemize
7277 Use builtin font when rendering status panel.
7278 \end_layout
7280 \begin_layout Itemize
7281 Option to detach memory watch to its own window.
7282 \end_layout
7284 \begin_layout Itemize
7285 Recent ROMs/Movies menu
7286 \end_layout
7288 \begin_layout Itemize
7289 Libao support
7290 \end_layout
7292 \begin_layout Itemize
7293 Useful lag counter for SNES games that autopoll
7294 \end_layout
7296 \begin_layout Itemize
7297 Fix buffer overflow in gambatte sound output
7298 \end_layout
7300 \begin_layout Subsection
7301 rr1-delta15epsilon1
7302 \end_layout
7304 \begin_layout Itemize
7305 Don't blow up on wxGTK if the window is hidden somehow
7306 \end_layout
7308 \begin_layout Itemize
7309 Support simultaneous drop of ROM and movie.
7310 \end_layout
7312 \begin_layout Itemize
7313 Gambatte: Don't save spurious SRAMs.
7314 \end_layout
7316 \begin_layout Itemize
7317 Make SGB ROMs actually usable.
7318 \end_layout
7320 \begin_layout Itemize
7321 Fix so that saved movies appear in recent movies.
7322 \end_layout
7324 \begin_layout Itemize
7325 Don't open multiple commentary editors at once.
7326 \end_layout
7328 \begin_layout Subsection
7329 rr1-delta15epsilon2
7330 \end_layout
7332 \begin_layout Itemize
7333 Lua: memory.readregion/memory.writeregion
7334 \end_layout
7336 \begin_layout Itemize
7337 Lua: memory.map{,s}{byte,word,dword,qword}
7338 \end_layout
7340 \begin_layout Itemize
7341 Lua: memory.map_structure
7342 \end_layout
7344 \begin_layout Itemize
7345 Lua: Fix bus_address for gambatte
7346 \end_layout
7348 \begin_layout Itemize
7349 Fix features dependent of bsnes debugger
7350 \end_layout
7352 \begin_layout Itemize
7353 Cleanup bsnes debugger logic
7354 \end_layout
7356 \begin_layout Itemize
7357 Fix resets in presence of save every frame
7358 \end_layout
7360 \begin_layout Subsection
7361 rr1-delta15epsilon3
7362 \end_layout
7364 \begin_layout Itemize
7365 Lua: input.lcid_to_pcid
7366 \end_layout
7368 \begin_layout Itemize
7369 Fix off-by-one bug with slot hashes
7370 \end_layout
7372 \begin_layout Itemize
7373 Fix crashes on certain memory watch expressions
7374 \end_layout
7376 \begin_layout Itemize
7377 Lua: memory.read_expr
7378 \end_layout
7380 \begin_layout Itemize
7381 Lua: Fix memory.read_expr on nil argument
7382 \end_layout
7384 \begin_layout Itemize
7385 Fix the code to compile on G++ 4.7
7386 \end_layout
7388 \begin_layout Itemize
7389 Change button_id to be a function pointer field, not a virtual method
7390 \end_layout
7392 \begin_layout Itemize
7393 Add bsnes patches to fix libsnes to compile on GCC 4.7
7394 \end_layout
7396 \begin_layout Itemize
7397 Gambatte: Always use legacy lag counting
7398 \end_layout
7400 \begin_layout Itemize
7401 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
7402 \end_layout
7404 \begin_layout Itemize
7405 Fix analog controllers
7406 \end_layout
7408 \begin_layout Itemize
7409 Fix autohold menus
7410 \end_layout
7412 \begin_layout Itemize
7413 Fix button symbols in input display
7414 \end_layout
7416 \begin_layout Itemize
7417 Compensate for nuts bsnes superscope/justifier handling
7418 \end_layout
7420 \begin_layout Itemize
7421 Lua: Fix bit.extract boolean handling
7422 \end_layout
7424 \begin_layout Subsection
7425 rr1-delta16
7426 \end_layout
7428 \begin_layout Itemize
7429 Stop at movie end: Don't off-by-one
7430 \end_layout
7432 \begin_layout Itemize
7433 Fix crash closing lsnes with voice playback active.
7434 \end_layout
7436 \begin_layout Itemize
7437 Import/Export OggOpus for commentary tracks
7438 \end_layout
7440 \begin_layout Itemize
7441 16-button controllers.
7442 \end_layout
7444 \begin_layout Itemize
7445 Don't show nonexistent controllers in input display
7446 \end_layout
7448 \begin_layout Itemize
7449 Set voice record/playback volume from UI
7450 \end_layout
7452 \begin_layout Itemize
7453 Patches for gambatte SVN364.
7454 \end_layout
7456 \begin_layout Itemize
7457 Load markup (if exists) even without gamepack file.
7458 \end_layout
7460 \begin_layout Itemize
7461 Screen rotation & flipping
7462 \end_layout
7464 \begin_layout Itemize
7465 Lua: Some new bit functions
7466 \end_layout
7468 \begin_layout Itemize
7469 Auto-refresh voice streams on change.
7470 \end_layout
7472 \begin_layout Itemize
7473 Auto-refresh subtitles on change & new subtitle editor.
7474 \end_layout
7476 \begin_layout Itemize
7477 Fix music volume adjustment.
7478 \end_layout
7480 \begin_layout Subsection
7481 rr1-delta16epsilon1
7482 \end_layout
7484 \begin_layout Itemize
7485 Wxwidgets: Fix memory watch rendering.
7486 \end_layout
7488 \begin_layout Itemize
7489 Wxwidgets: Allow setting voice stream gain.
7490 \end_layout
7492 \begin_layout Itemize
7493 Wxwidgets: VU meters and volume adjustment.
7494 \end_layout
7496 \begin_layout Itemize
7497 Lua: Custom fonts support.
7498 \end_layout
7500 \begin_layout Itemize
7501 Lua: Fix methods stopping working when resetting Lua.
7502 \end_layout
7504 \begin_layout Itemize
7505 Fix loading standard-format movies in preserve (readonly) mode.
7506 \end_layout
7508 \end_body
7509 \end_document