Fix button symbols in input display
[lsnes.git] / manual.lyx
blob81032846001dec8fdf6c843388d46c1c0ba9e251
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 Subsection
2126 Table gui:
2127 \end_layout
2129 \begin_layout Standard
2130 Most of these functions can only be called in on_paint and on_video callbacks.
2131  Exceptions are noted.
2132 \end_layout
2134 \begin_layout Standard
2135 Colors are 32-bit.
2136  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2137  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2138  opaque, 255 is almost transparent).
2139  -1 is the fully transparent color.
2140  Alpha values greater than 127 do work.
2141 \end_layout
2143 \begin_layout Standard
2144 Origin of coordinates is at top left corner of game display area.
2145  Left and top gaps correspond to negative coordinates.
2146 \end_layout
2148 \begin_layout Subsubsection
2149 gui.resolution()
2150 \end_layout
2152 \begin_layout Standard
2153 Returns 2-tuple (hresolution, vresolution).
2154 \end_layout
2156 \begin_layout Subsubsection
2157 gui.<class>_gap(number gap)
2158 \end_layout
2160 \begin_layout Standard
2161 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2162  is 8191).
2163 \end_layout
2165 \begin_layout Subsubsection
2166 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2167 \end_layout
2169 \begin_layout Standard
2170 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2171  16 high).
2172  Parameters:
2173 \end_layout
2175 \begin_layout Itemize
2176 x: X-coordinate to start the drawing from (and x-coordinate at begining
2177  of the lines).
2178 \end_layout
2180 \begin_layout Itemize
2181 y: Y-coordinate to start the drawing from.
2182 \end_layout
2184 \begin_layout Itemize
2185 text: The text to draw.
2186 \end_layout
2188 \begin_layout Itemize
2189 fgc: Text color (default is 0xFFFFFF (white))
2190 \end_layout
2192 \begin_layout Itemize
2193 bgc: Background color (default is -1 (transparent))
2194 \end_layout
2196 \begin_layout Subsubsection
2197 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2198 \end_layout
2200 \begin_layout Standard
2201 Like gui.text, but draw using double-width.
2202 \end_layout
2204 \begin_layout Subsubsection
2205 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2206 \end_layout
2208 \begin_layout Standard
2209 Like gui.text, but draw using double-height.
2210 \end_layout
2212 \begin_layout Subsubsection
2213 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2214 \end_layout
2216 \begin_layout Standard
2217 Like gui.text, but draw using double-width/double-height.
2218 \end_layout
2220 \begin_layout Subsubsection
2221 gui.rectangle(number x, number y, number width, number height[, number thickness[
2222 , number outline[, number fill]]])
2223 \end_layout
2225 \begin_layout Standard
2226 Draw rectangle on the GUI.
2227  Parameters:
2228 \end_layout
2230 \begin_layout Itemize
2231 x: X-coordinate of left edge.
2232 \end_layout
2234 \begin_layout Itemize
2235 y: Y-coordinate of upper edge.
2236 \end_layout
2238 \begin_layout Itemize
2239 width: Width of rectangle.
2240 \end_layout
2242 \begin_layout Itemize
2243 height: Height of rectangle.
2244 \end_layout
2246 \begin_layout Itemize
2247 thickness: Thickness of outline (default is 1).
2248 \end_layout
2250 \begin_layout Itemize
2251 outline: Color of outline (default is 0xFFFFFF (white))
2252 \end_layout
2254 \begin_layout Itemize
2255 fill: Color of fill (default is -1 (transparent))
2256 \end_layout
2258 \begin_layout Subsubsection
2259 gui.box(number x, number y, number width, number height[, number thickness[,
2260  number outline1[,number outline2[, number fill]]]])
2261 \end_layout
2263 \begin_layout Standard
2264 Draw rectangle with 3D effect on the GUI.
2265  Parameters:
2266 \end_layout
2268 \begin_layout Itemize
2269 x: X-coordinate of left edge.
2270 \end_layout
2272 \begin_layout Itemize
2273 y: Y-coordinate of upper edge.
2274 \end_layout
2276 \begin_layout Itemize
2277 width: Width of rectangle.
2278 \end_layout
2280 \begin_layout Itemize
2281 height: Height of rectangle.
2282 \end_layout
2284 \begin_layout Itemize
2285 thickness: Thickness of outline (default is 1).
2286 \end_layout
2288 \begin_layout Itemize
2289 outline1: First color of outline (default is 0xFFFFFF (white))
2290 \end_layout
2292 \begin_layout Itemize
2293 outline2: First color of outline (default is 0x808080 (dark gray))
2294 \end_layout
2296 \begin_layout Itemize
2297 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2298 \end_layout
2300 \begin_layout Subsubsection
2301 gui.pixel(number x, number y[, number color])
2302 \end_layout
2304 \begin_layout Standard
2305 Draw one pixel on the GUI.
2306  Parameters:
2307 \end_layout
2309 \begin_layout Itemize
2310 x: X-coordinate of the pixel
2311 \end_layout
2313 \begin_layout Itemize
2314 y: Y-coordinate of the pixel
2315 \end_layout
2317 \begin_layout Itemize
2318 color: Color of the pixel (default is 0xFFFFFF (white))
2319 \end_layout
2321 \begin_layout Subsubsection
2322 gui.crosshair(number x, number y[, number length[, number color]])
2323 \end_layout
2325 \begin_layout Standard
2326 Draw a crosshair.
2327  Parameters:
2328 \end_layout
2330 \begin_layout Itemize
2331 x: X-coordinate of the crosshair
2332 \end_layout
2334 \begin_layout Itemize
2335 y: Y-coordinate of the crosshair
2336 \end_layout
2338 \begin_layout Itemize
2339 length: Length of the crosshair lines (default 10).
2340 \end_layout
2342 \begin_layout Itemize
2343 color: Color of the crosshair (default is 0xFFFFFF (white))
2344 \end_layout
2346 \begin_layout Subsubsection
2347 gui.line(number x1, number y1, number x2, number y2[, number color])
2348 \end_layout
2350 \begin_layout Standard
2351 Draw a thin line.
2352  Parameters:
2353 \end_layout
2355 \begin_layout Itemize
2356 x1: X-coordinate of one end.
2357 \end_layout
2359 \begin_layout Itemize
2360 y1: Y-coordinate of one end.
2361 \end_layout
2363 \begin_layout Itemize
2364 x2: X-coordinate of the other end.
2365 \end_layout
2367 \begin_layout Itemize
2368 y2: Y-coordinate of the other end.
2369 \end_layout
2371 \begin_layout Itemize
2372 color: Color of the line (default is 0xFFFFFF (white)).
2373 \end_layout
2375 \begin_layout Subsubsection
2376 gui.circle(number x, number y, number r[, number thick[, number border[,
2377  number fil]]])
2378 \end_layout
2380 \begin_layout Standard
2381 Draw a circle.
2382  Parameters.
2383 \end_layout
2385 \begin_layout Itemize
2386 x: X-coordinate of the center
2387 \end_layout
2389 \begin_layout Itemize
2390 y: Y-coordinate of the center
2391 \end_layout
2393 \begin_layout Itemize
2394 r: The radius of the circle
2395 \end_layout
2397 \begin_layout Itemize
2398 thick: Border thickness
2399 \end_layout
2401 \begin_layout Itemize
2402 border: Border color (default is 0xFFFFFF (white))
2403 \end_layout
2405 \begin_layout Itemize
2406 fill: Fill color (default is -1 (transparent)).
2407 \end_layout
2409 \begin_layout Subsubsection
2410 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2411 \end_layout
2413 \begin_layout Standard
2414 Draw a bitmap on screen with specified palette.
2415  Parameters:
2416 \end_layout
2418 \begin_layout Itemize
2419 x: X-coordinate of left edge.
2420 \end_layout
2422 \begin_layout Itemize
2423 y: Y-coordinate of top edge.
2424 \end_layout
2426 \begin_layout Itemize
2427 bitmap: The bitmap to draw
2428 \end_layout
2430 \begin_layout Itemize
2431 palette: The palette to draw the bitmap using.
2432 \end_layout
2434 \begin_layout Subsubsection
2435 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2436 \end_layout
2438 \begin_layout Standard
2439 Draw a bitmap on screen.
2440  Parameters:
2441 \end_layout
2443 \begin_layout Itemize
2444 x: X-coordinate of left edge.
2445 \end_layout
2447 \begin_layout Itemize
2448 y: Y-coordinate of top edge.
2449 \end_layout
2451 \begin_layout Itemize
2452 bitmap: The bitmap to draw
2453 \end_layout
2455 \begin_layout Subsubsection
2456 gui.palette_new()
2457 \end_layout
2459 \begin_layout Standard
2460 Returns a new palette (initially all transparent).
2461  Can be used anywhere.
2462 \end_layout
2464 \begin_layout Subsubsection
2465 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2466 \end_layout
2468 \begin_layout Standard
2469 Returns a new bitmap/dbitmap.
2470  Can be used anywhere.
2471  Parameters:
2472 \end_layout
2474 \begin_layout Itemize
2475 w: The width of new bitmap
2476 \end_layout
2478 \begin_layout Itemize
2479 h: The height of new bitmap
2480 \end_layout
2482 \begin_layout Itemize
2483 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2484 \end_layout
2486 \begin_layout Itemize
2487 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2488 \end_layout
2490 \begin_layout Subsubsection
2491 gui.bitmap_load(string file)
2492 \end_layout
2494 \begin_layout Standard
2495 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2496  for bitmap).
2497  Can be used anywhere.
2498  Parameters:
2499 \end_layout
2501 \begin_layout Itemize
2502 file: The name of file to load.
2503 \end_layout
2505 \begin_layout Subsubsection
2506 gui.palette_set(palette palette, number index, number color)
2507 \end_layout
2509 \begin_layout Standard
2510 Sets color in palette.
2511  Can be used anywhere.
2512  Parameters:
2513 \end_layout
2515 \begin_layout Itemize
2516 palette: The palette to manipulate
2517 \end_layout
2519 \begin_layout Itemize
2520 index: Index of color (0-65535).
2521 \end_layout
2523 \begin_layout Itemize
2524 color: The color value.
2525 \end_layout
2527 \begin_layout Subsubsection
2528 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2529 \end_layout
2531 \begin_layout Standard
2532 Sets specified pixel in bitmap.
2533  Can be used anywhere.
2534  Parameters:
2535 \end_layout
2537 \begin_layout Itemize
2538 bitmap: The bitmap to manipulate
2539 \end_layout
2541 \begin_layout Itemize
2542 x: The x-coordinate of the pixel.
2543 \end_layout
2545 \begin_layout Itemize
2546 y: The y-coordinate of the pixel.
2547 \end_layout
2549 \begin_layout Itemize
2550 color: If bitmap is a bitmap, color index (0-65535).
2551  Otherwise color value.
2552 \end_layout
2554 \begin_layout Subsubsection
2555 gui.bitmap_size(bitmap/dbitmap bitmap)
2556 \end_layout
2558 \begin_layout Standard
2559 Get size of bitmap.
2560  Can be used anywhere.
2561  Parameters:
2562 \end_layout
2564 \begin_layout Itemize
2565 bitmap: The bitmap to query.
2566 \end_layout
2568 \begin_layout Standard
2569 The first return is the width, the second is the height.
2570 \end_layout
2572 \begin_layout Subsubsection
2573 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2574  src, number sx, number sy, number w, number h[, number ck])
2575 \end_layout
2577 \begin_layout Standard
2578 Blit a part of bitmap to another.
2579  Can be used anywhere.
2580  Parameters:
2581 \end_layout
2583 \begin_layout Itemize
2584 dest: Destination to blit to.
2585 \end_layout
2587 \begin_layout Itemize
2588 dx: left edge of target
2589 \end_layout
2591 \begin_layout Itemize
2592 dy: Top edge of target
2593 \end_layout
2595 \begin_layout Itemize
2596 src: The source to blit from.
2597  Must be of the same type as destination.
2598 \end_layout
2600 \begin_layout Itemize
2601 sx: left edge of source
2602 \end_layout
2604 \begin_layout Itemize
2605 sy: Top edge of source
2606 \end_layout
2608 \begin_layout Itemize
2609 w: Width of region
2610 \end_layout
2612 \begin_layout Itemize
2613 h: Height of region.
2614 \end_layout
2616 \begin_layout Itemize
2617 ck: Color key.
2618  Pixels of this color are not blitted.
2619 \end_layout
2621 \begin_deeper
2622 \begin_layout Itemize
2623 If bitmaps are bitmaps, this is color index of colorkey.
2624  Values outside range 0-65535 cause no key to be used as colorkey.
2625 \end_layout
2627 \begin_layout Itemize
2628 If bitmaps are dbitmaps, this color value of colorkey.
2629 \end_layout
2631 \begin_layout Itemize
2632 May be absent or nil for no colorkey blit.
2633 \end_layout
2635 \end_deeper
2636 \begin_layout Subsubsection
2637 gui.repaint()
2638 \end_layout
2640 \begin_layout Standard
2641 Request on_repaint() to happen as soon as possible.
2642  Can be used anywhere.
2643 \end_layout
2645 \begin_layout Subsubsection
2646 gui.subframe_update(boolean on)
2647 \end_layout
2649 \begin_layout Standard
2650 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2651  or not happen (on=false).
2652  Can be used anywhere.
2653 \end_layout
2655 \begin_layout Subsubsection
2656 gui.screenshot(string filename)
2657 \end_layout
2659 \begin_layout Standard
2660 Write PNG screenshot of the current frame (no drawings) to specified file.
2661  Can be used anywhere.
2662 \end_layout
2664 \begin_layout Subsubsection
2665 gui.color(number r, number g, number b[, number a])
2666 \end_layout
2668 \begin_layout Standard
2669 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2670  each component in scale 0-255.
2671  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2672  opaque).
2673  The default alpha is 256.
2674 \end_layout
2676 \begin_layout Subsubsection
2677 gui.status(string name, string value)
2678 \end_layout
2680 \begin_layout Standard
2681 Set status field 
2682 \begin_inset Quotes eld
2683 \end_inset
2685 L[<name>]
2686 \begin_inset Quotes erd
2687 \end_inset
2689  to <value> in status area.
2690  Can be used anywhere.
2691 \end_layout
2693 \begin_layout Subsubsection
2694 gui.rainbow(number step, number steps[, number color])
2695 \end_layout
2697 \begin_layout Standard
2698 Perform hue rotation of color <color> (default bright red), by <step> steps.
2699  The number of steps per full rotation is given by absolute value of <steps>.
2700 \end_layout
2702 \begin_layout Standard
2703 If <steps> is negative, the rotation will be counterclockwise.
2704 \end_layout
2706 \begin_layout Subsubsection
2707 gui.screenshot(string filename)
2708 \end_layout
2710 \begin_layout Standard
2711 Saves a screenshot into specified file.
2712 \end_layout
2714 \begin_layout Subsection
2715 table input
2716 \end_layout
2718 \begin_layout Standard
2719 Input handling.
2720  Only available in on_input callback.
2721 \end_layout
2723 \begin_layout Subsubsection
2724 input.get(number controller, number index)
2725 \end_layout
2727 \begin_layout Standard
2728 Read the specified index (0-11) from specified controller (0-7).
2729  Notes:
2730 \end_layout
2732 \begin_layout Itemize
2733 Uses physical controller numbering.
2734  Gamepad in port 2 is controller 4, not 1!
2735 \end_layout
2737 \begin_layout Subsubsection
2738 input.set(number controller, number index, number value)
2739 \end_layout
2741 \begin_layout Standard
2742 Write the specified index (0-11) from specified controller (0-7), storing
2743  value.
2744  Notes:
2745 \end_layout
2747 \begin_layout Itemize
2748 Uses physical controller numbering.
2749  Gamepad in port 2 is controller 4, not 1!
2750 \end_layout
2752 \begin_layout Subsubsection
2753 input.geta(number controller)
2754 \end_layout
2756 \begin_layout Standard
2757 Get input state for entiere controller.
2758  Returns 13 return values.
2759 \end_layout
2761 \begin_layout Itemize
2762 1st return value: Bitmask: bit i is set if i:th index is nonzero
2763 \end_layout
2765 \begin_layout Itemize
2766 2nd-13th return value: value of i:th index.
2767 \end_layout
2769 \begin_layout Subsubsection
2770 input.seta(number controller, number bitmask, number args...)
2771 \end_layout
2773 \begin_layout Standard
2774 Set state for entiere controller.
2775  args is up to 12 values for indices (overriding values in bitmask if specified).
2776 \end_layout
2778 \begin_layout Subsubsection
2779 input.controllertype(number controller)
2780 \end_layout
2782 \begin_layout Standard
2783 Get the type of controller as string.
2784  Valid values are:
2785 \end_layout
2787 \begin_layout Itemize
2788 gamepad
2789 \end_layout
2791 \begin_layout Itemize
2792 mouse
2793 \end_layout
2795 \begin_layout Itemize
2796 justifier
2797 \end_layout
2799 \begin_layout Itemize
2800 superscope
2801 \end_layout
2803 \begin_layout Subsubsection
2804 input.reset([number cycles])
2805 \end_layout
2807 \begin_layout Standard
2808 Execute reset.
2809  If cycles is greater than zero, do delayed reset.
2810  0 (or no value) causes immediate reset.
2811 \end_layout
2813 \begin_layout Itemize
2814 Only available with subframe flag false.
2815 \end_layout
2817 \begin_layout Subsubsection
2818 input.raw()
2819 \end_layout
2821 \begin_layout Standard
2822 Returns table of tables of all available keys and axes.
2823  The first table is indexed by key name (platform-dependent!), and the inner
2824  table has the following fields:
2825 \end_layout
2827 \begin_layout Itemize
2828 last_rawval: Last reported raw value for control.
2829 \end_layout
2831 \begin_layout Itemize
2832 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2833  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2834 \end_layout
2836 \begin_layout Itemize
2837 cal_left: Minimum calibration value.
2838  Only meaningful with axis and pressure types.
2839 \end_layout
2841 \begin_layout Itemize
2842 cal_center: Center calibration value.
2843  Only meaningful with axis and pressure types.
2844 \end_layout
2846 \begin_layout Itemize
2847 cal_right: Maximum calibration value.
2848  Only meaningful with axis and pressure types.
2849 \end_layout
2851 \begin_layout Itemize
2852 cal_tolerance: Dead zone tolerance.
2853  Only meaningful with axis and pressure types.
2854 \end_layout
2856 \begin_layout Subsubsection
2857 input.keyhook(string key, boolean state)
2858 \end_layout
2860 \begin_layout Standard
2861 Requests that keyhook events to be sent for key (state=true) or not sent
2862  (state=false).
2863 \end_layout
2865 \begin_layout Subsubsection
2866 input.joyget(number controller)
2867 \end_layout
2869 \begin_layout Standard
2870 Returns table for current controls for specified controller.
2871  The names of fields vary by controller type.
2872 \end_layout
2874 \begin_layout Itemize
2875 The buttons have the same name as those are referred to in other contexts
2876  in the emulator
2877 \end_layout
2879 \begin_layout Itemize
2880 The analog axes are 
2881 \begin_inset Quotes eld
2882 \end_inset
2884 xaxis
2885 \begin_inset Quotes erd
2886 \end_inset
2888  and 
2889 \begin_inset Quotes eld
2890 \end_inset
2892 yaxis
2893 \begin_inset Quotes erd
2894 \end_inset
2897 \end_layout
2899 \begin_layout Subsubsection
2900 input.joyset(number controller, table controls)
2901 \end_layout
2903 \begin_layout Standard
2904 Set the the state of specified controller to values specified in specified
2905  table.
2906 \end_layout
2908 \begin_layout Subsubsection
2909 input.lcid_to_pcid(number controller)
2910 \end_layout
2912 \begin_layout Standard
2913 Return the physical index, physical port and controller number in port for
2914  specified (1-based) logical controller.
2915 \end_layout
2917 \begin_layout Subsection
2918 Table subtitle
2919 \end_layout
2921 \begin_layout Standard
2922 Subtitle handling
2923 \end_layout
2925 \begin_layout Subsubsection
2926 subtitle.byindex(number i)
2927 \end_layout
2929 \begin_layout Standard
2930 Read the frame and length of ith subtitle.
2931  Returns nothing if not present.
2932 \end_layout
2934 \begin_layout Subsubsection
2935 subtitle.set(number f, number l, string txt)
2936 \end_layout
2938 \begin_layout Standard
2939 Set the text of subtitle.
2940 \end_layout
2942 \begin_layout Subsubsection
2943 subtitle.get(number f, number l)
2944 \end_layout
2946 \begin_layout Standard
2947 Get the text of subtitle.
2948 \end_layout
2950 \begin_layout Subsubsection
2951 subtitle.delete(number f, number l)
2952 \end_layout
2954 \begin_layout Standard
2955 Delete specified subtitle.
2956 \end_layout
2958 \begin_layout Subsection
2959 Table hostmemory
2960 \end_layout
2962 \begin_layout Standard
2963 Host memory handling (extra memory saved to savestates).
2964  Host memory starts empty.
2965 \end_layout
2967 \begin_layout Subsubsection
2968 hostmemory.read(number address)
2969 \end_layout
2971 \begin_layout Standard
2972 Reads hostmemory slot address.
2973  Slot numbers out of range return false instead of numeric.
2974 \end_layout
2976 \begin_layout Subsubsection
2977 hostmemory.write(number address, number value)
2978 \end_layout
2980 \begin_layout Standard
2981 Writes hostmemory slot with 0-255.
2982  Slot numbers out of range cause extension of host memory slot space.
2983 \end_layout
2985 \begin_layout Subsubsection
2986 hostmemory.readbyte(number address)
2987 \end_layout
2989 \begin_layout Standard
2990 Read unsigned byte (1 element) from given address.
2991  Slots out of range return false.
2992 \end_layout
2994 \begin_layout Subsubsection
2995 hostmemory.writebyte(number address, number value)
2996 \end_layout
2998 \begin_layout Standard
2999 Write unsigned byte (1 element) to given slot.
3000  Slot numbers out of range cause extension.
3001 \end_layout
3003 \begin_layout Subsubsection
3004 hostmemory.readsbyte(number address)
3005 \end_layout
3007 \begin_layout Standard
3008 Read signed byte (1 element) from given address.
3009  Slots out of range return false.
3010 \end_layout
3012 \begin_layout Subsubsection
3013 hostmemory.writesbyte(number address, number value)
3014 \end_layout
3016 \begin_layout Standard
3017 Write signed byte (1 element) to given slot.
3018  Slot numbers out of range cause extension.
3019 \end_layout
3021 \begin_layout Subsubsection
3022 hostmemory.readword(number address)
3023 \end_layout
3025 \begin_layout Standard
3026 Read unsigned word (2 elements) from given address.
3027  Slots out of range return false.
3028 \end_layout
3030 \begin_layout Subsubsection
3031 hostmemory.writeword(number address, number value)
3032 \end_layout
3034 \begin_layout Standard
3035 Write unsigned word (2 elements) to given slot.
3036  Slot numbers out of range cause extension.
3037 \end_layout
3039 \begin_layout Subsubsection
3040 hostmemory.readsword(number address)
3041 \end_layout
3043 \begin_layout Standard
3044 Read signed word (2 elements) from given address.
3045  Slots out of range return false.
3046 \end_layout
3048 \begin_layout Subsubsection
3049 hostmemory.writesword(number address, number value)
3050 \end_layout
3052 \begin_layout Standard
3053 Write signed word (2 elements) to given slot.
3054  Slot numbers out of range cause extension.
3055 \end_layout
3057 \begin_layout Subsubsection
3058 hostmemory.readdword(number address)
3059 \end_layout
3061 \begin_layout Standard
3062 Read unsigned doubleword (4 elements) from given address.
3063  Slots out of range return false.
3064 \end_layout
3066 \begin_layout Subsubsection
3067 hostmemory.writedword(number address, number value)
3068 \end_layout
3070 \begin_layout Standard
3071 Write unsigned doubleword (4 elements) to given slot.
3072  Slot numbers out of range cause extension.
3073 \end_layout
3075 \begin_layout Subsubsection
3076 hostmemory.readsdword(number address)
3077 \end_layout
3079 \begin_layout Standard
3080 Read signed doubleword (4 elements) from given address.
3081  Slots out of range return false.
3082 \end_layout
3084 \begin_layout Subsubsection
3085 hostmemory.writesdword(number address, number value)
3086 \end_layout
3088 \begin_layout Standard
3089 Write signed doubleword (4 elements) to given slot.
3090  Slot numbers out of range cause extension.
3091 \end_layout
3093 \begin_layout Subsubsection
3094 hostmemory.readqword(number address)
3095 \end_layout
3097 \begin_layout Standard
3098 Read unsigned quadword (8 elements) from given address.
3099  Slots out of range return false.
3100 \end_layout
3102 \begin_layout Subsubsection
3103 hostmemory.writeqword(number address, number value)
3104 \end_layout
3106 \begin_layout Standard
3107 Write unsigned quadword (4 elements) to given slot.
3108  Slot numbers out of range cause extension.
3109 \end_layout
3111 \begin_layout Subsubsection
3112 hostmemory.readsqword(number address)
3113 \end_layout
3115 \begin_layout Standard
3116 Read signed quadword (8 elements) from given address.
3117  Slots out of range return false.
3118 \end_layout
3120 \begin_layout Subsubsection
3121 hostmemory.writesqword(number address, number value)
3122 \end_layout
3124 \begin_layout Standard
3125 Write signed quadword (8 elements) to given slot.
3126  Slot numbers out of range cause extension.
3127 \end_layout
3129 \begin_layout Subsection
3130 Table movie
3131 \end_layout
3133 \begin_layout Standard
3134 Movie handling
3135 \end_layout
3137 \begin_layout Subsubsection
3138 movie.currentframe()
3139 \end_layout
3141 \begin_layout Standard
3142 Return number of current frame.
3143 \end_layout
3145 \begin_layout Subsubsection
3146 movie.framecount()
3147 \end_layout
3149 \begin_layout Standard
3150 Return number of frames in movie.
3151 \end_layout
3153 \begin_layout Subsubsection
3154 movie.readonly()
3155 \end_layout
3157 \begin_layout Standard
3158 Return true if in readonly mode, false if in readwrite.
3159 \end_layout
3161 \begin_layout Subsubsection
3162 movie.rerecords()
3163 \end_layout
3165 \begin_layout Standard
3166 Returns the current value of rerecord count.
3167 \end_layout
3169 \begin_layout Subsubsection
3170 movie.set_readwrite()
3171 \end_layout
3173 \begin_layout Standard
3174 Set readwrite mode (does not cause on_readwrite callback).
3175 \end_layout
3177 \begin_layout Subsubsection
3178 movie.frame_subframes(number frame)
3179 \end_layout
3181 \begin_layout Standard
3182 Count number of subframes in specified frame (frame numbers are 1-based)
3183  and return that.
3184 \end_layout
3186 \begin_layout Subsubsection
3187 movie.read_subframe(number frame, number subframe)
3188 \end_layout
3190 \begin_layout Standard
3191 Read specifed subframe in specified frame and return data as array (100
3192  elements, numbered 0-99 currently).
3193 \end_layout
3195 \begin_layout Subsubsection
3196 movie.read_rtc()
3197 \end_layout
3199 \begin_layout Standard
3200 Returns the current value of the RTC as a pair (second, subsecond).
3201 \end_layout
3203 \begin_layout Subsubsection
3204 movie.unsafe_rewind([UNSAFEREWIND state])
3205 \end_layout
3207 \begin_layout Standard
3208 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3209 \end_layout
3211 \begin_layout Itemize
3212 If called without argument, causes emulator to start process of setting
3213  unsafe rewind point.
3214  When this has finished, callback on_set_rewind occurs, passing the rewind
3215  state to lua script.
3216 \end_layout
3218 \begin_layout Itemize
3219 If called with argument, causes emulator rewind to passed rewind point as
3220  soon as possible.
3221  Readwrite mode is implicitly activated.
3222 \end_layout
3224 \begin_layout Standard
3225 The following warnings apply to unsafe rewinding:
3226 \end_layout
3228 \begin_layout Itemize
3229 There are no safety checks against misuse (that's what 
3230 \begin_inset Quotes eld
3231 \end_inset
3233 unsafe
3234 \begin_inset Quotes erd
3235 \end_inset
3237  comes from)!
3238 \end_layout
3240 \begin_layout Itemize
3241 Only call rewind from timeline rewind point was set from.
3242 \end_layout
3244 \begin_layout Itemize
3245 Only call rewind from after the rewind point was set.
3246 \end_layout
3248 \begin_layout Subsection
3249 Table settings
3250 \end_layout
3252 \begin_layout Standard
3253 Routines for settings manipulation
3254 \end_layout
3256 \begin_layout Subsubsection
3257 settings.get(string name)
3258 \end_layout
3260 \begin_layout Standard
3261 Get value of setting.
3262  If setting is blank, returns false.
3263  If setting value can't be obtained, returns (nil, error message).
3264 \end_layout
3266 \begin_layout Subsubsection
3267 settings.set(string name, string value)
3268 \end_layout
3270 \begin_layout Standard
3271 Set value of setting.
3272  If setting can't be set, returns (nil, error message).
3273 \end_layout
3275 \begin_layout Subsubsection
3276 settings.is_set(string name)
3277 \end_layout
3279 \begin_layout Standard
3280 Returns if setting is set.
3281  If setting does not exist, returns (nil, error message).
3282 \end_layout
3284 \begin_layout Subsubsection
3285 settings.blank(string name)
3286 \end_layout
3288 \begin_layout Standard
3289 Blanks a setting and returns true.
3290  If setting can't be blanked, returns (nil, error message).
3291 \end_layout
3293 \begin_layout Subsection
3294 Table memory
3295 \end_layout
3297 \begin_layout Standard
3298 Contains various functions for managing memory
3299 \end_layout
3301 \begin_layout Subsubsection
3302 memory.vma_count()
3303 \end_layout
3305 \begin_layout Standard
3306 Returns the number of VMAs
3307 \end_layout
3309 \begin_layout Subsubsection
3310 memory.read_vma(number index)
3311 \end_layout
3313 \begin_layout Standard
3314 Reads the specified VMA (indices start from zero).
3315  Trying to read invalid VMA gives nil.
3316  The read VMA is table with the following fields:
3317 \end_layout
3319 \begin_layout Itemize
3320 region_name (string): The readable name of the VMA
3321 \end_layout
3323 \begin_layout Itemize
3324 baseaddr (number): Base address of the VMA
3325 \end_layout
3327 \begin_layout Itemize
3328 lastaddr (number): Last address in the VMA.
3329 \end_layout
3331 \begin_layout Itemize
3332 size (number): The size of VMA in bytes.
3333 \end_layout
3335 \begin_layout Itemize
3336 readonly (boolean): True of the VMA corresponds to ROM.
3337 \end_layout
3339 \begin_layout Itemize
3340 iospace (boolean): True if the VMA is I/O space.
3341 \end_layout
3343 \begin_layout Itemize
3344 native_endian (boolean): True if the VMA has native endian as opposed to
3345  little endian.
3346 \end_layout
3348 \begin_layout Subsubsection
3349 memory.find_vma(number address)
3350 \end_layout
3352 \begin_layout Standard
3353 Finds the VMA containing specified address.
3354  Returns table in the same format as read_vma or nil if not found.
3355 \end_layout
3357 \begin_layout Subsubsection
3358 memory.readbyte(number address)
3359 \end_layout
3361 \begin_layout Standard
3362 Reads the specified address as unsigned byte and returns the result.
3363 \end_layout
3365 \begin_layout Subsubsection
3366 memory.readsbyte(number address)
3367 \end_layout
3369 \begin_layout Standard
3370 Reads the specified address as signed byte and returns the result.
3371 \end_layout
3373 \begin_layout Subsubsection
3374 memory.writebyte(number address, number value)
3375 \end_layout
3377 \begin_layout Standard
3378 Writes the specified value (negative values undergo 2's complement) to specified
3379  address (as a byte).
3380 \end_layout
3382 \begin_layout Subsubsection
3383 memory.readword(number address)
3384 \end_layout
3386 \begin_layout Standard
3387 Reads the specified address as unsigned word and returns the result.
3388 \end_layout
3390 \begin_layout Subsubsection
3391 memory.readsword(number address)
3392 \end_layout
3394 \begin_layout Standard
3395 Reads the specified address as signed word and returns the result.
3396 \end_layout
3398 \begin_layout Subsubsection
3399 memory.writeword(number address, number value)
3400 \end_layout
3402 \begin_layout Standard
3403 Writes the specified value (negative values undergo 2's complement) to specified
3404  address (as a word).
3405 \end_layout
3407 \begin_layout Subsubsection
3408 memory.readdword(number address)
3409 \end_layout
3411 \begin_layout Standard
3412 Reads the specified address as unsigned doubleword and returns the result.
3413 \end_layout
3415 \begin_layout Subsubsection
3416 memory.readsdword(number address)
3417 \end_layout
3419 \begin_layout Standard
3420 Reads the specified address as signed doubleword and returns the result.
3421 \end_layout
3423 \begin_layout Subsubsection
3424 memory.writedword(number address, number value)
3425 \end_layout
3427 \begin_layout Standard
3428 Writes the specified value (negative values undergo 2's complement) to specified
3429  address (as a doubleword).
3430 \end_layout
3432 \begin_layout Subsubsection
3433 memory.readqword(number address)
3434 \end_layout
3436 \begin_layout Standard
3437 Reads the specified address as unsigned quadword and returns the result.
3438 \end_layout
3440 \begin_layout Subsubsection
3441 memory.readsqword(number address)
3442 \end_layout
3444 \begin_layout Standard
3445 Reads the specified address as signed quadword and returns the result.
3446 \end_layout
3448 \begin_layout Subsubsection
3449 memory.writeqword(number address, number value)
3450 \end_layout
3452 \begin_layout Standard
3453 Writes the specified value (negative values undergo 2's complement) to specified
3454  address (as a quadword).
3455 \end_layout
3457 \begin_layout Subsubsection
3458 memory.hash_region(number base, number size)
3459 \end_layout
3461 \begin_layout Standard
3462 Hash specified number of bytes starting from specified address and return
3463  the SHA-256.
3464 \end_layout
3466 \begin_layout Subsubsection
3467 memory.hash_state()
3468 \end_layout
3470 \begin_layout Standard
3471 Hash the current system state.
3472  Mainly useful for debugging savestates.
3473 \end_layout
3475 \begin_layout Subsubsection
3476 memory.readregion(number base, number size)
3477 \end_layout
3479 \begin_layout Standard
3480 Read a region of memory.
3481 \end_layout
3483 \begin_layout Itemize
3484 Warning: If the region crosses VMA boundary, the results are undefined.
3485 \end_layout
3487 \begin_layout Subsubsection
3488 memory.map<type>([number base, number size])
3489 \end_layout
3491 \begin_layout Standard
3492 Returns a table mapping specified memory aperture for read/write.
3493  If parameters are omitted, entiere map space is the aperture.
3494 \end_layout
3496 \begin_layout Itemize
3497 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3498 \end_layout
3500 \begin_layout Subsubsection
3501 memory.writeregion(number base, number size, table data)
3502 \end_layout
3504 \begin_layout Standard
3505 Write a region of memory.
3506 \end_layout
3508 \begin_layout Itemize
3509 Warning: If the region crosses VMA boundary, the results are undefined.
3510 \end_layout
3512 \begin_layout Subsubsection
3513 memory.map_struct()
3514 \end_layout
3516 \begin_layout Standard
3517 Returns a new mapping structure (MMAP_STRUCT)
3518 \end_layout
3520 \begin_layout Subsubsection
3521 MMAP_STRUCT(string key, number address, string type)
3522 \end_layout
3524 \begin_layout Standard
3525 Bind key in mmap structure to specified address with specified type.
3526 \end_layout
3528 \begin_layout Itemize
3529 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3530 \end_layout
3532 \begin_layout Subsubsection
3533 memory.read_expr(string expr)
3534 \end_layout
3536 \begin_layout Standard
3537 Evaluate specified watch expression and return result
3538 \end_layout
3540 \begin_layout Subsection
3541 Table subtitle
3542 \end_layout
3544 \begin_layout Standard
3545 Contains functions for manipulating subtitles.
3546 \end_layout
3548 \begin_layout Subsubsection
3549 subtitle.byindex(number index)
3550 \end_layout
3552 \begin_layout Standard
3553 Get (basetime, length) pair of specified subtitle index or nothing if index
3554  isn't valid.
3555 \end_layout
3557 \begin_layout Subsubsection
3558 subtitle.get(number basetime, number length)
3559 \end_layout
3561 \begin_layout Standard
3562 Read the specified subtitle.
3563  Returns 
3564 \begin_inset Quotes eld
3565 \end_inset
3568 \begin_inset Quotes erd
3569 \end_inset
3571  if the subtitle does not exist.
3572 \end_layout
3574 \begin_layout Subsubsection
3575 subtitle.set(number basetime, number length, string content)
3576 \end_layout
3578 \begin_layout Standard
3579 Set the specified subtitle.
3580 \end_layout
3582 \begin_layout Subsubsection
3583 subtitle.deltete(number basetime, number length)
3584 \end_layout
3586 \begin_layout Standard
3587 Delete the specified subtitle.
3588 \end_layout
3590 \begin_layout Subsection
3591 Table _SYSTEM
3592 \end_layout
3594 \begin_layout Standard
3595 Contains copy of global variables from time of Lua initialization.
3596  Non-writeable.
3597 \end_layout
3599 \begin_layout Subsection
3600 Callbacks
3601 \end_layout
3603 \begin_layout Standard
3604 Various callbacks to Lua that can occur.
3605 \end_layout
3607 \begin_layout Subsubsection
3608 Callback: on_paint(bool not_synth)
3609 \end_layout
3611 \begin_layout Standard
3612 Called when screen is being painted.
3613  Any gui.* calls requiring graphic context draw on the screen.
3614 \end_layout
3616 \begin_layout Standard
3617 not_synth is true if this hook is being called in response to received frame,
3618  false otherwise.
3619 \end_layout
3621 \begin_layout Subsubsection
3622 Callback: on_video()
3623 \end_layout
3625 \begin_layout Standard
3626 Called when video dump frame is being painted.
3627  Any gui.* calls requiring graphic context draw on the video.
3628 \end_layout
3630 \begin_layout Subsubsection
3631 Callback: on_frame_emulated()
3632 \end_layout
3634 \begin_layout Standard
3635 Called when emulating frame has completed and on_paint()/on_video() calls
3636  are about to be issued.
3637 \end_layout
3639 \begin_layout Subsubsection
3640 Callback: on_frame()
3641 \end_layout
3643 \begin_layout Standard
3644 Called on each starting whole frame.
3645 \end_layout
3647 \begin_layout Subsubsection
3648 Callback: on_startup()
3649 \end_layout
3651 \begin_layout Standard
3652 Called when the emulator is starting (lsnes.rc and --run files has been run).
3653 \end_layout
3655 \begin_layout Subsubsection
3656 Callback: on_rewind()
3657 \end_layout
3659 \begin_layout Standard
3660 Called when rewind movie to beginning has completed.
3661 \end_layout
3663 \begin_layout Subsubsection
3664 Callback: on_pre_load(string name)
3665 \end_layout
3667 \begin_layout Standard
3668 Called just before savestate/movie load occurs (note: loads are always delayed,
3669  so this occurs even when load was initiated by lua).
3670 \end_layout
3672 \begin_layout Subsubsection
3673 Callback: on_err_load(string name)
3674 \end_layout
3676 \begin_layout Standard
3677 Called if loadstate goes wrong.
3678 \end_layout
3680 \begin_layout Subsubsection
3681 Callback: on_post_load(string name, boolean was_savestate)
3682 \end_layout
3684 \begin_layout Standard
3685 Called on successful loadstate.
3686  was_savestate gives if this was a savestate or a movie.
3687 \end_layout
3689 \begin_layout Subsubsection
3690 Callback: on_pre_save(string name, boolean is_savestate)
3691 \end_layout
3693 \begin_layout Standard
3694 Called just before savestate save occurs (note: movie saves are synchronous
3695  and won't trigger these callbacks if called from Lua).
3696 \end_layout
3698 \begin_layout Subsubsection
3699 Callback: on_err_save(string name)
3700 \end_layout
3702 \begin_layout Standard
3703 Called if savestate goes wrong.
3704 \end_layout
3706 \begin_layout Subsubsection
3707 Callback: on_post_save(string name, boolean is_savestate)
3708 \end_layout
3710 \begin_layout Standard
3711 Called on successful savaestate.
3712  is_savestate gives if this was a savestate or a movie.
3713 \end_layout
3715 \begin_layout Subsubsection
3716 Callback: on_quit()
3717 \end_layout
3719 \begin_layout Standard
3720 Called when emulator is shutting down.
3721 \end_layout
3723 \begin_layout Subsubsection
3724 Callback: on_input(boolean subframe)
3725 \end_layout
3727 \begin_layout Standard
3728 Called when emulator is just sending input to bsnes core.
3729  Warning: This is called even in readonly mode, but the results are ignored.
3730 \end_layout
3732 \begin_layout Subsubsection
3733 Callback: on_reset()
3734 \end_layout
3736 \begin_layout Standard
3737 Called when SNES is reset.
3738 \end_layout
3740 \begin_layout Subsubsection
3741 Callback: on_readwrite()
3742 \end_layout
3744 \begin_layout Standard
3745 Called when moving into readwrite mode as result of 
3746 \begin_inset Quotes eld
3747 \end_inset
3749 set-rwmode
3750 \begin_inset Quotes erd
3751 \end_inset
3753  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3754  entry protection).
3755 \end_layout
3757 \begin_layout Subsubsection
3758 Callback: on_snoop(number port, number controller, number index, number
3759  value)
3760 \end_layout
3762 \begin_layout Standard
3763 Called each time bsnes asks for input.
3764  The value is the final value to be sent to bsnes core (readonly mode, autohold
3765  and autofire have been taken into account).
3766  Might be useful when translating movies to format suitable for console
3767  verification.
3768  Note: There is no way to modify the value to be sent.
3769 \end_layout
3771 \begin_layout Subsubsection
3772 Callback: on_keyhook(string keyname, table state)
3773 \end_layout
3775 \begin_layout Standard
3776 Sent when key that has keyhook events requested changes state.
3777  Keyname is name of the key (group) and state is the state (same kind as
3778  table values in input.raw).
3779 \end_layout
3781 \begin_layout Subsubsection
3782 Callback: on_idle()
3783 \end_layout
3785 \begin_layout Standard
3786 Called when requested by set_idle_timeout(), the timeout has expired and
3787  emulator is waiting.
3788 \end_layout
3790 \begin_layout Subsubsection
3791 Callback: on_timer()
3792 \end_layout
3794 \begin_layout Standard
3795 Called when requested by set_idle_timeout() and the timeout has expired
3796  (regardless if emulator is waiting).
3797 \end_layout
3799 \begin_layout Subsubsection
3800 Callback: on_set_rewind(UNSAFEREWIND r)
3801 \end_layout
3803 \begin_layout Standard
3804 Called when unsafe rewind object has been constructed.
3805 \end_layout
3807 \begin_layout Subsubsection
3808 Callback: on_pre_rewind() 
3809 \end_layout
3811 \begin_layout Standard
3812 Called just before unsafe rewind is about to occur.
3813 \end_layout
3815 \begin_layout Subsubsection
3816 Callback: on_post_rewind() 
3817 \end_layout
3819 \begin_layout Standard
3820 Called just after unsafe rewind has occured.
3821 \end_layout
3823 \begin_layout Section
3824 Memory watch expression syntax
3825 \end_layout
3827 \begin_layout Standard
3828 Memory watch expressions are in RPN (Reverse Polish Notation).
3829  At the end of expression, the top entry on stack is taken as the final
3830  result.
3831 \end_layout
3833 \begin_layout Standard
3834 Notations:
3835 \end_layout
3837 \begin_layout Itemize
3838 Evaluation order is strictly left to right.
3839 \end_layout
3841 \begin_layout Itemize
3842 a is the entry on top of stack
3843 \end_layout
3845 \begin_layout Itemize
3846 b is the entry immediately below top of stack
3847 \end_layout
3849 \begin_layout Itemize
3850 ; separates values to be pushed (no intermediate pop).
3851 \end_layout
3853 \begin_layout Itemize
3854 After end of element, all used stack slots are popped and all results are
3855  pushed.
3856 \end_layout
3858 \begin_layout Itemize
3859 When pushing multiple values, the pushes occur in order shown.
3860 \end_layout
3862 \begin_layout Standard
3863 The following operators are available:
3864 \end_layout
3866 \begin_layout Itemize
3867 + : a + b
3868 \end_layout
3870 \begin_layout Itemize
3871 - : a - b
3872 \end_layout
3874 \begin_layout Itemize
3875 * : a * b
3876 \end_layout
3878 \begin_layout Itemize
3879 / : a / b
3880 \end_layout
3882 \begin_layout Itemize
3883 % : a % b
3884 \end_layout
3886 \begin_layout Itemize
3887 a : atan(a)
3888 \end_layout
3890 \begin_layout Itemize
3891 b : read_signed_byte(a)
3892 \end_layout
3894 \begin_layout Itemize
3895 c : cos(a)
3896 \end_layout
3898 \begin_layout Itemize
3899 d : read_signed_dword(a)
3900 \end_layout
3902 \begin_layout Itemize
3903 i : quotent(a / b)
3904 \end_layout
3906 \begin_layout Itemize
3907 p :
3908 \begin_inset Formula $\pi$
3909 \end_inset
3912 \end_layout
3914 \begin_layout Itemize
3915 q : read_signed_qword(a)
3916 \end_layout
3918 \begin_layout Itemize
3919 r : sqrt(a)
3920 \end_layout
3922 \begin_layout Itemize
3923 s : sin(a)
3924 \end_layout
3926 \begin_layout Itemize
3927 t : tan(a)
3928 \end_layout
3930 \begin_layout Itemize
3931 u : a; a
3932 \end_layout
3934 \begin_layout Itemize
3935 w : read_signed_word(a)
3936 \end_layout
3938 \begin_layout Itemize
3939 A : atan2(a, b)
3940 \end_layout
3942 \begin_layout Itemize
3943 B : read_unsigned_byte(a)
3944 \end_layout
3946 \begin_layout Itemize
3947 C<number>z : Push number <number> to stack.
3948 \end_layout
3950 \begin_layout Itemize
3951 D : read_unsigned_dword(a)
3952 \end_layout
3954 \begin_layout Itemize
3955 C0x<number>z : Push number <number> (hexadecimal) to stack.
3956 \end_layout
3958 \begin_layout Itemize
3959 Q : read_unsigned_qword(a)
3960 \end_layout
3962 \begin_layout Itemize
3963 R<digit> : round a to <digit> digits.
3964 \end_layout
3966 \begin_layout Itemize
3967 W : read_unsigned_word(a)
3968 \end_layout
3970 \begin_layout Subsection
3971 Example:
3972 \end_layout
3974 \begin_layout Standard
3975 C0x007e0878zWC0x007e002czW-
3976 \end_layout
3978 \begin_layout Enumerate
3979 Push value 0x7e0878 on top of stack (C0x007e0878z).
3980 \end_layout
3982 \begin_layout Enumerate
3983 Pop the value on top of stack (0x7e0878), read word value at that address
3984  and push the result,call it x1 (W).
3985 \end_layout
3987 \begin_layout Enumerate
3988 Push value 0x7e002c on top of stack (C0x007e002cz).
3989 \end_layout
3991 \begin_layout Enumerate
3992 Pop the value on top of stack (0x7e002c), read word value at that address
3993  and push the result,call it x2 (W).
3994 \end_layout
3996 \begin_layout Enumerate
3997 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3998  x2 - x1 (-).
3999 \end_layout
4001 \begin_layout Enumerate
4002 Since the expression ends, the final memory watch result is the top one
4003  on stack, which is x2 - x1.
4004 \end_layout
4006 \begin_layout Section
4007 Modifier and key names:
4008 \end_layout
4010 \begin_layout Subsection
4011 SDL Platform
4012 \end_layout
4014 \begin_layout Subsubsection
4015 Modifier names
4016 \end_layout
4018 \begin_layout Standard
4019 Following modifier names are known:
4020 \end_layout
4022 \begin_layout Itemize
4023 ctrl, lctrl, rctrl: Control keys
4024 \end_layout
4026 \begin_layout Itemize
4027 alt, lalt, ralt: ALT keys.
4028 \end_layout
4030 \begin_layout Itemize
4031 shift, lshift, rshift: Shift keys.
4032 \end_layout
4034 \begin_layout Itemize
4035 meta, lmeta, rmeta: Meta keys.
4036 \end_layout
4038 \begin_layout Itemize
4039 num, caps: Numlock/Capslock (these are sticky!)
4040 \end_layout
4042 \begin_layout Itemize
4043 mode: Mode select.
4044 \end_layout
4046 \begin_layout Subsubsection
4047 Key names
4048 \end_layout
4050 \begin_layout Standard
4051 Following key names are known:
4052 \end_layout
4054 \begin_layout Itemize
4055 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4056  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4057  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4058  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4059  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4060  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4061  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4062  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4063  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4064  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4065  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4066  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4067  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4068  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4069  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4070  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4071  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4072  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4073  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4074  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4075  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4076  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4077  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4078  break, menu, power, euro, undo
4079 \end_layout
4081 \begin_layout Itemize
4082 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4083  hardware-dependent scan code of <n> (useful to bind those keys that don't
4084  have symbolic names).
4085 \end_layout
4087 \begin_layout Subsubsection
4088 Joystick pseudo-keys:
4089 \end_layout
4091 \begin_layout Itemize
4092 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4093 \end_layout
4095 \begin_layout Itemize
4096 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4097 \end_layout
4099 \begin_layout Itemize
4100 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4101 \end_layout
4103 \begin_layout Itemize
4104 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4105 \end_layout
4107 \begin_layout Itemize
4108 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4109 \end_layout
4111 \begin_layout Itemize
4112 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4113  position (axis modes axis and axis_inverse).
4114 \end_layout
4116 \begin_layout Itemize
4117 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4118  position (axis modes axis and axis_inverse).
4119 \end_layout
4121 \begin_layout Itemize
4122 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4123  modes pressure_*).
4124 \end_layout
4126 \begin_layout Subsubsection
4127 Special buttons:
4128 \end_layout
4130 \begin_layout Itemize
4131 Escape: Enter/Exit Command mode, cancel modal dialogs.
4132 \end_layout
4134 \begin_layout Itemize
4135 Return (also KPEnter): Execute command, ok modal dialog.
4136 \end_layout
4138 \begin_layout Itemize
4139 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4140  in command history
4141 \end_layout
4143 \begin_layout Itemize
4144 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4145  in command history
4146 \end_layout
4148 \begin_layout Itemize
4149 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4150 \end_layout
4152 \begin_layout Itemize
4153 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4154 \end_layout
4156 \begin_layout Itemize
4157 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4158 \end_layout
4160 \begin_layout Itemize
4161 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4162 \end_layout
4164 \begin_layout Itemize
4165 Delete (also KP.
4166  if no num lock; command mode): Delete character to right of cursor.
4167 \end_layout
4169 \begin_layout Itemize
4170 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4171  overwrite modes.
4172 \end_layout
4174 \begin_layout Itemize
4175 Backspace (command mode): Delete character to left of cursor.
4176 \end_layout
4178 \begin_layout Itemize
4179 CTRL+LEFT (also ALT+B; command mode): Previous word.
4180 \end_layout
4182 \begin_layout Itemize
4183 CTRL+RIGHT (also ALT+F; command mode): Next word.
4184 \end_layout
4186 \begin_layout Itemize
4187 ALT+D (also CTRL+W; command mode): Delete word.
4188 \end_layout
4190 \begin_layout Itemize
4191 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4192 \end_layout
4194 \begin_layout Subsection
4195 wxWidgets platform
4196 \end_layout
4198 \begin_layout Subsubsection
4199 Modifier names:
4200 \end_layout
4202 \begin_layout Standard
4203 Following modifier names are known:
4204 \end_layout
4206 \begin_layout Itemize
4208 \end_layout
4210 \begin_layout Itemize
4211 ctrl
4212 \end_layout
4214 \begin_layout Itemize
4215 shift 
4216 \end_layout
4218 \begin_layout Itemize
4219 meta
4220 \end_layout
4222 \begin_layout Itemize
4223 cmd (Mac OS X only)
4224 \end_layout
4226 \begin_layout Subsubsection
4227 Key names:
4228 \end_layout
4230 \begin_layout Standard
4231 Following key names are known:
4232 \end_layout
4234 \begin_layout Itemize
4235 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4236  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4237  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4238  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4239  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4240  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4241  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4242  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4243  pause, capital, end, home, lefT, up, right, down, select, print, execute,
4244  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4245  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4246  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4247  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4248  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4249  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4250  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4251  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4252  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4253  windows_right, windows_menu, command, special1, special2, special3, special4,
4254  special5, special6, special7, special8, special9, special10, special11,
4255  special12, special13, special14, special15, special16, special17, special18,
4256  special19, special20
4257 \end_layout
4259 \begin_layout Section
4260 Movie file format
4261 \end_layout
4263 \begin_layout Standard
4264 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4265  (note: If you recompress it, do not use compression methods other than
4266  store and deflate and especially do not use encryption of any kind).
4267 \end_layout
4269 \begin_layout Subsection
4270 Detecting clean start/SRAM/Savestate
4271 \end_layout
4273 \begin_layout Itemize
4274 If file has member 
4275 \begin_inset Quotes eld
4276 \end_inset
4278 savestate
4279 \begin_inset Quotes erd
4280 \end_inset
4282  it is savestate, otherwise:
4283 \end_layout
4285 \begin_layout Itemize
4286 If file has members with names starting 
4287 \begin_inset Quotes eld
4288 \end_inset
4290 moviesram.
4291 \begin_inset Quotes erd
4292 \end_inset
4294  it is movie starting from SRAM, otherwise:
4295 \end_layout
4297 \begin_layout Itemize
4298 It is movie starting from clear state.
4299 \end_layout
4301 \begin_layout Subsection
4302 Member: gametype
4303 \end_layout
4305 \begin_layout Standard
4306 Type of game ROM and region (as one line).
4307  Valid values are:
4308 \end_layout
4310 \begin_layout Standard
4311 \begin_inset Tabular
4312 <lyxtabular version="3" rows="8" columns="3">
4313 <features tabularvalignment="middle">
4314 <column alignment="center" valignment="top" width="0">
4315 <column alignment="center" valignment="top" width="0">
4316 <column alignment="center" valignment="top" width="0">
4317 <row>
4318 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4319 \begin_inset Text
4321 \begin_layout Plain Layout
4322 Value
4323 \end_layout
4325 \end_inset
4326 </cell>
4327 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4328 \begin_inset Text
4330 \begin_layout Plain Layout
4331 System
4332 \end_layout
4334 \end_inset
4335 </cell>
4336 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4337 \begin_inset Text
4339 \begin_layout Plain Layout
4340 Region
4341 \end_layout
4343 \end_inset
4344 </cell>
4345 </row>
4346 <row>
4347 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4348 \begin_inset Text
4350 \begin_layout Plain Layout
4351 snes_pal
4352 \end_layout
4354 \end_inset
4355 </cell>
4356 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4357 \begin_inset Text
4359 \begin_layout Plain Layout
4360 Super NES
4361 \end_layout
4363 \end_inset
4364 </cell>
4365 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4366 \begin_inset Text
4368 \begin_layout Plain Layout
4370 \end_layout
4372 \end_inset
4373 </cell>
4374 </row>
4375 <row>
4376 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4377 \begin_inset Text
4379 \begin_layout Plain Layout
4380 sgb_pal
4381 \end_layout
4383 \end_inset
4384 </cell>
4385 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4386 \begin_inset Text
4388 \begin_layout Plain Layout
4389 Super Game Boy
4390 \end_layout
4392 \end_inset
4393 </cell>
4394 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4395 \begin_inset Text
4397 \begin_layout Plain Layout
4399 \end_layout
4401 \end_inset
4402 </cell>
4403 </row>
4404 <row>
4405 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4406 \begin_inset Text
4408 \begin_layout Plain Layout
4409 snes_ntsc
4410 \end_layout
4412 \end_inset
4413 </cell>
4414 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4415 \begin_inset Text
4417 \begin_layout Plain Layout
4418 Super NES
4419 \end_layout
4421 \end_inset
4422 </cell>
4423 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4424 \begin_inset Text
4426 \begin_layout Plain Layout
4427 NTSC
4428 \end_layout
4430 \end_inset
4431 </cell>
4432 </row>
4433 <row>
4434 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4435 \begin_inset Text
4437 \begin_layout Plain Layout
4438 sgb_ntsc
4439 \end_layout
4441 \end_inset
4442 </cell>
4443 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4444 \begin_inset Text
4446 \begin_layout Plain Layout
4447 Super Game Boy
4448 \end_layout
4450 \end_inset
4451 </cell>
4452 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4453 \begin_inset Text
4455 \begin_layout Plain Layout
4456 NTSC
4457 \end_layout
4459 \end_inset
4460 </cell>
4461 </row>
4462 <row>
4463 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4464 \begin_inset Text
4466 \begin_layout Plain Layout
4468 \end_layout
4470 \end_inset
4471 </cell>
4472 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4473 \begin_inset Text
4475 \begin_layout Plain Layout
4476 BS-X (non-slotted)
4477 \end_layout
4479 \end_inset
4480 </cell>
4481 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4482 \begin_inset Text
4484 \begin_layout Plain Layout
4485 NTSC
4486 \end_layout
4488 \end_inset
4489 </cell>
4490 </row>
4491 <row>
4492 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4493 \begin_inset Text
4495 \begin_layout Plain Layout
4496 bsxslotted
4497 \end_layout
4499 \end_inset
4500 </cell>
4501 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4502 \begin_inset Text
4504 \begin_layout Plain Layout
4505 BS-X (slotted)
4506 \end_layout
4508 \end_inset
4509 </cell>
4510 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4511 \begin_inset Text
4513 \begin_layout Plain Layout
4514 NTSC
4515 \end_layout
4517 \end_inset
4518 </cell>
4519 </row>
4520 <row>
4521 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4522 \begin_inset Text
4524 \begin_layout Plain Layout
4525 sufamiturbo
4526 \end_layout
4528 \end_inset
4529 </cell>
4530 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4531 \begin_inset Text
4533 \begin_layout Plain Layout
4534 Sufami Turbo
4535 \end_layout
4537 \end_inset
4538 </cell>
4539 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4540 \begin_inset Text
4542 \begin_layout Plain Layout
4543 NTSC
4544 \end_layout
4546 \end_inset
4547 </cell>
4548 </row>
4549 </lyxtabular>
4551 \end_inset
4554 \end_layout
4556 \begin_layout Standard
4557 Frame rates are:
4558 \end_layout
4560 \begin_layout Standard
4561 \begin_inset Tabular
4562 <lyxtabular version="3" rows="3" columns="2">
4563 <features tabularvalignment="middle">
4564 <column alignment="center" valignment="top" width="0">
4565 <column alignment="center" valignment="top" width="0">
4566 <row>
4567 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4568 \begin_inset Text
4570 \begin_layout Plain Layout
4571 Region
4572 \end_layout
4574 \end_inset
4575 </cell>
4576 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4577 \begin_inset Text
4579 \begin_layout Plain Layout
4580 Framerate (fps)
4581 \end_layout
4583 \end_inset
4584 </cell>
4585 </row>
4586 <row>
4587 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4588 \begin_inset Text
4590 \begin_layout Plain Layout
4592 \end_layout
4594 \end_inset
4595 </cell>
4596 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4597 \begin_inset Text
4599 \begin_layout Plain Layout
4600 322445/6448
4601 \end_layout
4603 \end_inset
4604 </cell>
4605 </row>
4606 <row>
4607 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4608 \begin_inset Text
4610 \begin_layout Plain Layout
4611 NTSC
4612 \end_layout
4614 \end_inset
4615 </cell>
4616 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4617 \begin_inset Text
4619 \begin_layout Plain Layout
4620 10738636/178683
4621 \end_layout
4623 \end_inset
4624 </cell>
4625 </row>
4626 </lyxtabular>
4628 \end_inset
4631 \end_layout
4633 \begin_layout Subsection
4634 Member: port1
4635 \end_layout
4637 \begin_layout Standard
4638 Contains type of port #1 (as one line).
4639  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4640  If not present, defaults to 'gamepad'.
4641 \end_layout
4643 \begin_layout Subsection
4644 Member: port2
4645 \end_layout
4647 \begin_layout Standard
4648 Contains type of port #2 (as one line).
4649  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4650  'justifier' and 'justifiers'.
4651  If not present, defaults to 'none'.
4652 \end_layout
4654 \begin_layout Subsection
4655 Member: gamename
4656 \end_layout
4658 \begin_layout Standard
4659 Contains name of the game (as one line).
4660 \end_layout
4662 \begin_layout Subsection
4663 Member: authors
4664 \end_layout
4666 \begin_layout Standard
4667 Contains authors, one per line.
4668  Part before '|' is the full name, part after is the nickname.
4669 \end_layout
4671 \begin_layout Subsection
4672 Member: systemid
4673 \end_layout
4675 \begin_layout Standard
4676 Always 
4677 \begin_inset Quotes eld
4678 \end_inset
4680 lsnes-rr1
4681 \begin_inset Quotes erd
4682 \end_inset
4684  (one line).
4685  Used to reject other saves.
4686 \end_layout
4688 \begin_layout Subsection
4689 Member: controlsversion
4690 \end_layout
4692 \begin_layout Standard
4693 Always 
4694 \begin_inset Quotes eld
4695 \end_inset
4698 \begin_inset Quotes erd
4699 \end_inset
4701  (one line).
4702  Used to identify what controls are there.
4703 \end_layout
4705 \begin_layout Subsection
4706 Member: 
4707 \begin_inset Quotes eld
4708 \end_inset
4710 coreversion
4711 \begin_inset Quotes erd
4712 \end_inset
4715 \end_layout
4717 \begin_layout Standard
4718 Contains bsnes core version number (as one line).
4719 \end_layout
4721 \begin_layout Subsection
4722 Member: projectid
4723 \end_layout
4725 \begin_layout Standard
4726 Contains project ID (as one line).
4727  Used to identify if two movies are part of the same project.
4728 \end_layout
4730 \begin_layout Subsection
4731 Member: {rom,slota,slotb}{,xml}.sha256
4732 \end_layout
4734 \begin_layout Standard
4735 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4736  Absent if corresponding file is absent.
4737 \end_layout
4739 \begin_layout Subsection
4740 Member: moviesram.<name>
4741 \end_layout
4743 \begin_layout Standard
4744 Raw binary startup SRAM of kind <name>.
4745  Only present in savestates and movies starting from SRAM.
4746 \end_layout
4748 \begin_layout Subsection
4749 Member: saveframe
4750 \end_layout
4752 \begin_layout Standard
4753 Contains frame number (as one line) of frame movie was saved on.
4754  Only present in savestates.
4755 \end_layout
4757 \begin_layout Subsection
4758 Member: lagcounter
4759 \end_layout
4761 \begin_layout Standard
4762 Current value of lag counter (as one line).
4763  Only present in savestates.
4764 \end_layout
4766 \begin_layout Subsection
4767 Member: pollcounters
4768 \end_layout
4770 \begin_layout Standard
4771 Contains poll counters (currently 100 of them), one per line.
4772  Each line is raw poll count if DRDY is set for it.
4773  Otherwise it is negative poll count minus one.
4774  Only present in savestates.
4775 \end_layout
4777 \begin_layout Subsection
4778 Member: hostmemory
4779 \end_layout
4781 \begin_layout Standard
4782 Raw binary dump of host memory.
4783  Only present in savestates.
4784 \end_layout
4786 \begin_layout Subsection
4787 Member: savestate
4788 \end_layout
4790 \begin_layout Standard
4791 The raw binary savestate itself.
4792  Savestate detection uses this file, only present in savestates.
4793 \end_layout
4795 \begin_layout Subsection
4796 Member: screenshot
4797 \end_layout
4799 \begin_layout Standard
4800 Screenshot of current frame.
4801  Only present in savestates.
4802  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4803  data.
4804  Height of image is inferred from the width and size of data.
4805 \end_layout
4807 \begin_layout Subsection
4808 Member: sram.<name>
4809 \end_layout
4811 \begin_layout Standard
4812 Raw binary SRAM of kind <name> at time of savestate.
4813  Only present in savestates.
4814 \end_layout
4816 \begin_layout Subsection
4817 Member: input
4818 \end_layout
4820 \begin_layout Standard
4821 The actual input track, one line per subframe (blank lines are skipped).
4822 \end_layout
4824 \begin_layout Itemize
4825 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4826  part of same frame as previous, otherwise it starts a new frame.
4827 \end_layout
4829 \begin_layout Itemize
4830 First subframe must start a new frame.
4831 \end_layout
4833 \begin_layout Standard
4834 Length of movie in frames is number of lines in input file that start a
4835  new frame.
4836 \end_layout
4838 \begin_layout Subsection
4839 Member: subtitles
4840 \end_layout
4842 \begin_layout Standard
4843 Subtitle track.
4844  Optional.
4845 \end_layout
4847 \begin_layout Itemize
4848 Each line is in form <firstframe> <numframes> <text>.
4849 \end_layout
4851 \begin_layout Itemize
4852 Linefeed is encoded as 
4853 \backslash
4854 n, backslash is encoded as 
4855 \backslash
4857 \backslash
4859 \end_layout
4861 \begin_layout Subsection
4862 Member: rerecords
4863 \end_layout
4865 \begin_layout Standard
4866 Contains textual base-10 rerecord count (as one line; emulator just writes
4867  this, it doesn't read it) + 1.
4868 \end_layout
4870 \begin_layout Subsection
4871 Member: rrdata
4872 \end_layout
4874 \begin_layout Standard
4875 This member stores set of load IDs.
4876  There is one load ID per rerecord (plus one corresponding to start of project).
4877 \end_layout
4879 \begin_layout Itemize
4880 This member constists of concatenation of records
4881 \end_layout
4883 \begin_layout Itemize
4884 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4885  IDs.
4886 \end_layout
4888 \begin_layout Itemize
4889 IDs are interpretted as 256-bit big-endian integers with warparound.
4890 \end_layout
4892 \begin_layout Itemize
4893 Initial predicted ID is all zeroes.
4894 \end_layout
4896 \begin_layout Standard
4897 Format of each record is:
4898 \end_layout
4900 \begin_layout Itemize
4901 1 byte: Opcode byte.
4902  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4903  Bit 7 is unused.
4904 \end_layout
4906 \begin_layout Itemize
4907 32-prefixlen bytes of ID.
4908 \end_layout
4910 \begin_layout Itemize
4911 countlen bytes of big-endian count (count).
4912 \end_layout
4914 \begin_layout Standard
4915 Records are processed as follows:
4916 \end_layout
4918 \begin_layout Itemize
4919 To form the first ID encoded by record, take the first prefixlen bytes predicted
4920  ID and append the read ID value to it.
4921  The result is the first ID encoded.
4922 \end_layout
4924 \begin_layout Itemize
4925 If countlen is 0, record encodes 1 ID.
4926 \end_layout
4928 \begin_layout Itemize
4929 If countlen is 1, record encodes 2+count IDs.
4930 \end_layout
4932 \begin_layout Itemize
4933 If countlen is 2, record encodes 258+count IDs.
4934 \end_layout
4936 \begin_layout Itemize
4937 If countlen is 3, record encodes 65794+count IDs.
4938 \end_layout
4940 \begin_layout Itemize
4941 The new predicted ID is the next ID after last one encoded by the record.
4942 \end_layout
4944 \begin_layout Standard
4945 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4946  by all records.
4947 \end_layout
4949 \begin_layout Subsection
4950 Member: starttime.second
4951 \end_layout
4953 \begin_layout Standard
4954 Movie starting time, second part.
4955  Epoch is Unix epoch.
4956  Default is 1,000,000,000.
4957 \end_layout
4959 \begin_layout Subsection
4960 Member: starttime.subsecond
4961 \end_layout
4963 \begin_layout Standard
4964 Movie starting time, subsecond part.
4965  Unit is CPU clocks.
4966  Default is 0.
4967 \end_layout
4969 \begin_layout Subsection
4970 Member: savetime.second
4971 \end_layout
4973 \begin_layout Standard
4974 Movie saving time, second part.
4975  Default is starttime.second.
4976  Only present in savestates.
4977 \end_layout
4979 \begin_layout Subsection
4980 Member: savetime.subsecond
4981 \end_layout
4983 \begin_layout Standard
4984 Movie saving time, subsecond part.
4985  Default is starttime.subsecond.
4986  Only present in savestates.
4987 \end_layout
4989 \begin_layout Section
4990 lsvs file format (commentary tracks)
4991 \end_layout
4993 \begin_layout Subsection
4994 Clusters
4995 \end_layout
4997 \begin_layout Itemize
4998 Each cluster is 8kB (8192 bytes) in size.
4999 \end_layout
5001 \begin_layout Itemize
5002 Cluster n starts at offset 8192*n in file.
5003 \end_layout
5005 \begin_layout Itemize
5006 The following clusters are system special:
5007 \end_layout
5009 \begin_deeper
5010 \begin_layout Itemize
5011 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5012 \end_layout
5014 \begin_layout Itemize
5015 Cluster 1 (superblock)
5016 \end_layout
5018 \end_deeper
5019 \begin_layout Subsection
5020 Cluster tables
5021 \end_layout
5023 \begin_layout Itemize
5024 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
5025  last 11 bits of n).
5026 \end_layout
5028 \begin_layout Itemize
5029 This cluster table consists of 2048 4-byte big-endian integers.
5030 \end_layout
5032 \begin_layout Itemize
5033 Each entry describes a cluster in 16MB supercluster, in order.
5034 \end_layout
5036 \begin_layout Itemize
5037 The valid values for entries are:
5038 \end_layout
5040 \begin_deeper
5041 \begin_layout Itemize
5042 0x00000000: Free cluster
5043 \end_layout
5045 \begin_layout Itemize
5046 0x00000001: Last cluster in chain.
5047 \end_layout
5049 \begin_layout Itemize
5050 0xFFFFFFFF: System cluster (cluster tables and superblock)
5051 \end_layout
5053 \begin_layout Itemize
5054 (anything else): Number of next cluster in chain.
5055  Must not be multiple of 2048.
5056 \end_layout
5058 \end_deeper
5059 \begin_layout Itemize
5060 Due to limitations of the format, there can be at most 2097052 superclusters,
5061  giving maximum file size of 16TB.
5062 \end_layout
5064 \begin_layout Subsection
5065 Stream table
5066 \end_layout
5068 \begin_layout Itemize
5069 The stream table chain always starts in cluster 2.
5070 \end_layout
5072 \begin_layout Itemize
5073 Otherwise, it follows normal chaining.
5074 \end_layout
5076 \begin_layout Itemize
5077 The stream table consists of 16-byte entries:
5078 \end_layout
5080 \begin_deeper
5081 \begin_layout Itemize
5082 The first 8 bytes of entry give big-endian beginning position of stream
5083  in units of 1/48000 s.
5084 \end_layout
5086 \begin_layout Itemize
5087 The next 4 bytes of entry give big-endian beginning cluster for control
5088  data.
5089  0 here marks the entry as not present.
5090 \end_layout
5092 \begin_layout Itemize
5093 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5094 \end_layout
5096 \end_deeper
5097 \begin_layout Itemize
5098 Stream table clusters are normal clusters, following normal chaining.
5099 \end_layout
5101 \begin_layout Itemize
5102 The stream begnning position is not guarenteed unique.
5103  There can be multiple streams with the same starting position in the file.
5104 \end_layout
5106 \begin_layout Subsection
5107 Stream control data
5108 \end_layout
5110 \begin_layout Itemize
5111 The stream control data consists of entries 4 bytes each:
5112 \end_layout
5114 \begin_deeper
5115 \begin_layout Itemize
5116 The first 2 bytes of entry gives big-endian length of packet
5117 \end_layout
5119 \begin_layout Itemize
5120 The next byte of entry gives audio length of packet in units of 1/400 s.
5121 \end_layout
5123 \begin_layout Itemize
5124 The last byte is control byte.
5125 \end_layout
5127 \begin_deeper
5128 \begin_layout Itemize
5129 0 means this entry is not present and the control data ends.
5130 \end_layout
5132 \begin_layout Itemize
5133 1 is valid control entry.
5134 \end_layout
5136 \end_deeper
5137 \end_deeper
5138 \begin_layout Itemize
5139 The stream control data can also end by running into end of the readable
5140  chain.
5141 \end_layout
5143 \begin_deeper
5144 \begin_layout Itemize
5145 This happens if there happens to be exact multiple of 2048 packets in stream
5146  and number of packets is nonzero.
5147 \end_layout
5149 \end_deeper
5150 \begin_layout Itemize
5151 These clusters follow normal chaining.
5152 \end_layout
5154 \begin_layout Subsection
5155 Stream codec data
5156 \end_layout
5158 \begin_layout Itemize
5159 Stream codec data consists of raw Opus data packets packed back to back
5160  with nothing in between.
5161 \end_layout
5163 \begin_layout Itemize
5164 Warning: Due to internal limitations, this data must reside in the first
5165  65536 superclusters (that is, the first 1TB of the file).
5166 \end_layout
5168 \begin_layout Subsection
5169 Superblock
5170 \end_layout
5172 \begin_layout Itemize
5173 The superblock is stored in cluster 1.
5175 \end_layout
5177 \begin_layout Itemize
5178 The first 11 bytes are 
5179 \begin_inset Quotes eld
5180 \end_inset
5182 sefs-magic
5183 \begin_inset Quotes erd
5184 \end_inset
5186 <NUL>.
5187 \end_layout
5189 \begin_layout Itemize
5190 The rest are unused.
5191 \end_layout
5193 \begin_layout Itemize
5194 This cluster 1 is marked as system special.
5195 \end_layout
5197 \begin_layout Section
5198 Known ROM extensions
5199 \end_layout
5201 \begin_layout Itemize
5202 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5203 \end_layout
5205 \begin_layout Itemize
5206 DMG cartridge ROMs: dmg, gb.
5207 \end_layout
5209 \begin_layout Itemize
5210 GBC cartridge ROMs: cgb, gbc.
5211 \end_layout
5213 \begin_layout Section
5214 Gamepack files
5215 \end_layout
5217 \begin_layout Itemize
5218 The first line must be: 
5219 \begin_inset Quotes eld
5220 \end_inset
5222 [GAMEPACK FILE]
5223 \begin_inset Quotes erd
5224 \end_inset
5227 \end_layout
5229 \begin_layout Itemize
5230 There is one needed line: 
5231 \begin_inset Quotes eld
5232 \end_inset
5234 type <systype>
5235 \begin_inset Quotes erd
5236 \end_inset
5239  This sets system type to <systype>.
5240  The following system types are valid:
5241 \end_layout
5243 \begin_deeper
5244 \begin_layout Itemize
5245 snes (SNES)
5246 \end_layout
5248 \begin_layout Itemize
5249 bsx (BS-X non-slotted)
5250 \end_layout
5252 \begin_layout Itemize
5253 bsxslotted (BS-X slotted)
5254 \end_layout
5256 \begin_layout Itemize
5257 sufamiturbo (Sufami Turbo)
5258 \end_layout
5260 \begin_layout Itemize
5261 sgb (Super Game Boy)
5262 \end_layout
5264 \begin_layout Itemize
5265 dmg (Game Boy)
5266 \end_layout
5268 \begin_layout Itemize
5269 gbc (Game Boy Color)
5270 \end_layout
5272 \begin_layout Itemize
5273 gbc_gba (Game Boy Color with GBA initial register values)
5274 \end_layout
5276 \end_deeper
5277 \begin_layout Itemize
5278 Optionally a region can be specified: 
5279 \begin_inset Quotes eld
5280 \end_inset
5282 region <region>
5283 \begin_inset Quotes erd
5284 \end_inset
5287  The following values are valid:
5288 \end_layout
5290 \begin_deeper
5291 \begin_layout Itemize
5292 autodetect (Autodetect region: snes and sgb only)
5293 \end_layout
5295 \begin_layout Itemize
5296 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5297 \end_layout
5299 \begin_layout Itemize
5300 pal (PAL: snes, sgb)
5301 \end_layout
5303 \begin_layout Itemize
5304 world (World: dmg, gbc, gbc_gba)
5305 \end_layout
5307 \end_deeper
5308 \begin_layout Itemize
5309 ROM images are loaded as: 
5310 \begin_inset Quotes eld
5311 \end_inset
5313 rom <type> <file>
5314 \begin_inset Quotes erd
5315 \end_inset
5318  The following types are valid:
5319 \end_layout
5321 \begin_deeper
5322 \begin_layout Itemize
5323 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5324  BIOS in bsx, bsxslotted, sufamiturbo)
5325 \end_layout
5327 \begin_layout Itemize
5328 bsx (Cartridge ROM in bsx, bsxslotted)
5329 \end_layout
5331 \begin_layout Itemize
5332 slot-a (Cartridge ROM in sufamiturbo)
5333 \end_layout
5335 \begin_layout Itemize
5336 slot-b (Cartridge ROM in sufamiturbo)
5337 \end_layout
5339 \end_deeper
5340 \begin_layout Itemize
5341 ROM markup can be loaded as: 
5342 \begin_inset Quotes eld
5343 \end_inset
5345 xml <type> <file>
5346 \begin_inset Quotes erd
5347 \end_inset
5350  The types valid are the same as for ROMs.
5351 \end_layout
5353 \begin_layout Itemize
5354 Patches can be loaded as 
5355 \begin_inset Quotes eld
5356 \end_inset
5358 patch[<offset>] <type> <file>
5359 \begin_inset Quotes erd
5360 \end_inset
5363  The types are the same as for ROMs.
5364 \end_layout
5366 \begin_deeper
5367 \begin_layout Itemize
5368 Offset is given in form [+-]<number>.
5369  Usually offset is either +0 or -512.
5370 \end_layout
5372 \begin_layout Itemize
5373 Default offset is +0.
5374 \end_layout
5376 \end_deeper
5377 \begin_layout Subsection
5378 Example:
5379 \end_layout
5381 \begin_layout LyX-Code
5382 [GAMEPACK FILE]
5383 \end_layout
5385 \begin_layout LyX-Code
5386 type snes
5387 \end_layout
5389 \begin_layout LyX-Code
5390 rom rom speedygonzales.sfc
5391 \end_layout
5393 \begin_layout LyX-Code
5394 patch-512 rom sonicthehedgehog.ips
5395 \end_layout
5397 \begin_layout Subsection
5398 Example 2:
5399 \end_layout
5401 \begin_layout LyX-Code
5402 [GAMEPACK FILE]
5403 \end_layout
5405 \begin_layout LyX-Code
5406 type sgb
5407 \end_layout
5409 \begin_layout LyX-Code
5410 rom rom supergameboy.sfc
5411 \end_layout
5413 \begin_layout LyX-Code
5414 rom dmg megamanV.dmg
5415 \end_layout
5417 \begin_layout Section
5418 Quick'n'dirty encode guide
5419 \end_layout
5421 \begin_layout Enumerate
5422 Start the emulator and load the ROM and movie file.
5423 \end_layout
5425 \begin_layout Enumerate
5426 Set large AVI option 'set-setting avi-large on'
5427 \end_layout
5429 \begin_layout Enumerate
5430 Enable dumping 'dump-avi tmpdump' 
5431 \end_layout
5433 \begin_layout Enumerate
5434 Unpause and let it run until you want to end dumping.
5435 \end_layout
5437 \begin_layout Enumerate
5438 Close the emulator (closing the window is the easiest way).
5439  Or use 'end-avi'.
5440 \end_layout
5442 \begin_layout Enumerate
5443 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5444  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5445 \end_layout
5447 \begin_layout Enumerate
5448 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5449 \end_layout
5451 \begin_layout Enumerate
5452 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5453  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5454 \end_layout
5456 \begin_layout Enumerate
5457 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5458  Now final.mkv contains quick'n'dirty encode.
5459 \end_layout
5461 \begin_layout Section
5462 Axis configurations for some gamepad types:
5463 \end_layout
5465 \begin_layout Subsection
5466 XBox360 controller:
5467 \end_layout
5469 \begin_layout Standard
5470 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5471 \end_layout
5473 \begin_layout LyX-Code
5474 set-axis joystick0axis2 pressure-+
5475 \end_layout
5477 \begin_layout LyX-Code
5478 set-axis joystick0axis5 pressure-+
5479 \end_layout
5481 \begin_layout Itemize
5482 This is needed for SDL only.
5483  EVDEV sets those types correctly.
5484 \end_layout
5486 \begin_layout Subsection
5487 PS3 
5488 \begin_inset Quotes eld
5489 \end_inset
5491 sixaxis
5492 \begin_inset Quotes erd
5493 \end_inset
5495  controller:
5496 \end_layout
5498 \begin_layout Standard
5499 Axes 8-19 should be disabled.
5500 \end_layout
5502 \begin_layout LyX-Code
5503 set-axis joystick0axis8 disabled
5504 \end_layout
5506 \begin_layout LyX-Code
5507 set-axis joystick0axis9 disabled
5508 \end_layout
5510 \begin_layout LyX-Code
5511 set-axis joystick0axis10 disabled
5512 \end_layout
5514 \begin_layout LyX-Code
5515 set-axis joystick0axis11 disabled
5516 \end_layout
5518 \begin_layout LyX-Code
5519 set-axis joystick0axis12 disabled
5520 \end_layout
5522 \begin_layout LyX-Code
5523 set-axis joystick0axis13 disabled
5524 \end_layout
5526 \begin_layout LyX-Code
5527 set-axis joystick0axis14 disabled
5528 \end_layout
5530 \begin_layout LyX-Code
5531 set-axis joystick0axis15 disabled
5532 \end_layout
5534 \begin_layout LyX-Code
5535 set-axis joystick0axis16 disabled
5536 \end_layout
5538 \begin_layout LyX-Code
5539 set-axis joystick0axis17 disabled
5540 \end_layout
5542 \begin_layout LyX-Code
5543 set-axis joystick0axis18 disabled
5544 \end_layout
5546 \begin_layout LyX-Code
5547 set-axis joystick0axis19 disabled
5548 \end_layout
5550 \begin_layout Section
5551 Errata:
5552 \end_layout
5554 \begin_layout Subsection
5555 Problems from BSNES core:
5556 \end_layout
5558 \begin_layout Itemize
5559 The whole pending save stuff.
5560 \end_layout
5562 \begin_layout Itemize
5563 Lack of layer hiding.
5564 \end_layout
5566 \begin_layout Itemize
5567 It is slow (especially accuracy).
5568 \end_layout
5570 \begin_layout Itemize
5571 Firmwares can't be loaded from ZIP archives.
5572 \end_layout
5574 \begin_layout Subsection
5575 Other problems:
5576 \end_layout
5578 \begin_layout Itemize
5579 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5580 \end_layout
5582 \begin_layout Itemize
5583 Audio for last dumped frame is not itself dumped.
5584 \end_layout
5586 \begin_layout Itemize
5587 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5588 \end_layout
5590 \begin_layout Itemize
5591 No menus, command based interface (SDL).
5592 \end_layout
5594 \begin_layout Itemize
5595 Long commands don't scroll.
5596 \end_layout
5598 \begin_layout Section
5599 Changelog:
5600 \end_layout
5602 \begin_layout Subsection
5603 rr0-beta1
5604 \end_layout
5606 \begin_layout Itemize
5607 Fix -Wall warnings
5608 \end_layout
5610 \begin_layout Itemize
5611 Fix dumper video corruption with levels 10-18.
5612 \end_layout
5614 \begin_layout Subsection
5615 rr0-beta2
5616 \end_layout
5618 \begin_layout Itemize
5619 Autofire
5620 \end_layout
5622 \begin_layout Itemize
5623 Lots of code cleanups
5624 \end_layout
5626 \begin_layout Itemize
5627 Lua interface to settings
5628 \end_layout
5630 \begin_layout Itemize
5631 Allow specifying AVI borders without Lua
5632 \end_layout
5634 \begin_layout Itemize
5635 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5636 \end_layout
5638 \begin_layout Itemize
5639 on_snoop lua callback
5640 \end_layout
5642 \begin_layout Itemize
5643 Faster movie loading and saving.
5644 \end_layout
5646 \begin_layout Subsection
5647 rr0-beta3
5648 \end_layout
5650 \begin_layout Itemize
5651 Joystick support
5652 \end_layout
5654 \begin_layout Subsection
5655 rr0-beta4
5656 \end_layout
5658 \begin_layout Itemize
5659 Fix multi-buttons
5660 \end_layout
5662 \begin_layout Itemize
5663 Save jukebox functionality.
5664 \end_layout
5666 \begin_layout Subsection
5667 rr0-beta5
5668 \end_layout
5670 \begin_layout Itemize
5671 Try to fix some nasty failing movie load edge cases
5672 \end_layout
5674 \begin_layout Itemize
5675 Allow specifying scripts to run on command line.
5676 \end_layout
5678 \begin_layout Subsection
5679 rr0-beta6
5680 \end_layout
5682 \begin_layout Itemize
5683 Major source code reorganization.
5684 \end_layout
5686 \begin_layout Itemize
5687 Backup savestates before overwriting.
5688 \end_layout
5690 \begin_layout Itemize
5691 Don't crash if loading initial state fails.
5692 \end_layout
5694 \begin_layout Subsection
5695 rr0-beta7
5696 \end_layout
5698 \begin_layout Itemize
5699 Fix firmware lookup
5700 \end_layout
5702 \begin_layout Itemize
5703 Fix author name parsing
5704 \end_layout
5706 \begin_layout Itemize
5707 Fix rerecord counting
5708 \end_layout
5710 \begin_layout Itemize
5711 (SDL) Print messages to console if SDL is uninitialized
5712 \end_layout
5714 \begin_layout Itemize
5715 Add movieinfo program
5716 \end_layout
5718 \begin_layout Itemize
5719 Fix loading movies starting from SRAM.
5720 \end_layout
5722 \begin_layout Subsection
5723 rr0-beta8
5724 \end_layout
5726 \begin_layout Itemize
5727 Add support for unattended dumping
5728 \end_layout
5730 \begin_layout Itemize
5731 Fix compiling for Win32
5732 \end_layout
5734 \begin_layout Itemize
5735 Don't lock up if sound can't be initialized
5736 \end_layout
5738 \begin_layout Itemize
5739 Strip trailing CR from commands
5740 \end_layout
5742 \begin_layout Itemize
5743 Don't try to do dubious things in global ctors (fix crash on startup)
5744 \end_layout
5746 \begin_layout Subsection
5747 rr0-beta9
5748 \end_layout
5750 \begin_layout Itemize
5751 Small documentation tweaking
5752 \end_layout
5754 \begin_layout Itemize
5755 Fix make clean
5756 \end_layout
5758 \begin_layout Itemize
5759 Fix major bug in modifier matching
5760 \end_layout
5762 \begin_layout Subsection
5763 rr0-beta10
5764 \end_layout
5766 \begin_layout Itemize
5767 Lots of documentation fixes
5768 \end_layout
5770 \begin_layout Itemize
5771 Use dedicated callbacks for event backcomm., not commands.
5772 \end_layout
5774 \begin_layout Itemize
5775 Ensure that the watchdog is not hit when executing delayed reset.
5776 \end_layout
5778 \begin_layout Itemize
5779 Remove errant tab from joystick message.
5780 \end_layout
5782 \begin_layout Subsection
5783 rr0-beta11
5784 \end_layout
5786 \begin_layout Itemize
5787 Make autofire operate in absolute time, not linear time
5788 \end_layout
5790 \begin_layout Itemize
5791 Reinitialize controls when resuming from loadstate
5792 \end_layout
5794 \begin_layout Itemize
5795 Some more code cleanups
5796 \end_layout
5798 \begin_layout Itemize
5799 If Lua allocator fails, call OOM_panic()
5800 \end_layout
5802 \begin_layout Itemize
5803 Byte/word/dword/qword sized host memory write/read functions.
5804 \end_layout
5806 \begin_layout Itemize
5807 Dump at correct framerate if dumping interlaced NTSC (height=448).
5808 \end_layout
5810 \begin_layout Subsection
5811 rr0-beta12
5812 \end_layout
5814 \begin_layout Itemize
5815 Actually include the complete source code
5816 \end_layout
5818 \begin_layout Itemize
5819 Keep track of RTC
5820 \end_layout
5822 \begin_layout Subsection
5823 rr0-beta13
5824 \end_layout
5826 \begin_layout Itemize
5827 Document {save,start}time.{,sub}second.
5828 \end_layout
5830 \begin_layout Itemize
5831 Intercept time() from bsnes core.
5832 \end_layout
5834 \begin_layout Subsection
5835 rr0-beta14
5836 \end_layout
5838 \begin_layout Itemize
5839 Allow disabling time() interception (allow build on Mac OS X)
5840 \end_layout
5842 \begin_layout Itemize
5843 Use SDLMain on Mac OS X (make SDL not crash)
5844 \end_layout
5846 \begin_layout Itemize
5847 Disable delayed resets (just plain too buggy for now).
5848 \end_layout
5850 \begin_layout Itemize
5851 Code cleanups
5852 \end_layout
5854 \begin_layout Itemize
5855 Use 16-bit for graphics/video instead of 32-bit.
5856 \end_layout
5858 \begin_layout Itemize
5859 gui.rectangle/gui.pixel
5860 \end_layout
5862 \begin_layout Itemize
5863 gui.crosshair
5864 \end_layout
5866 \begin_layout Itemize
5867 New CSCD writer implementation.
5868 \end_layout
5870 \begin_layout Subsection
5871 rr0-beta15
5872 \end_layout
5874 \begin_layout Itemize
5875 Fix interaction of * and +.
5876 \end_layout
5878 \begin_layout Itemize
5879 Manual improvements
5880 \end_layout
5882 \begin_layout Itemize
5883 Use gettimeofday()/usleep(), these seem portable enough.
5884 \end_layout
5886 \begin_layout Itemize
5887 Move joystick axis manipulation to keymapper code.
5888 \end_layout
5890 \begin_layout Itemize
5891 Changes to how read-only works.
5892 \end_layout
5894 \begin_layout Itemize
5895 Refactor controller input code.
5896 \end_layout
5898 \begin_layout Subsection
5899 rr0-beta16
5900 \end_layout
5902 \begin_layout Itemize
5903 Fix mouseclick scale compensation.
5904 \end_layout
5906 \begin_layout Itemize
5907 Draw area boundaries correctly in SDL code.
5908 \end_layout
5910 \begin_layout Itemize
5911 gui.screenshot.
5912 \end_layout
5914 \begin_layout Itemize
5915 Fix CSCD output (buffer overrun and race condition).
5916 \end_layout
5918 \begin_layout Subsection
5919 rr0-beta17
5920 \end_layout
5922 \begin_layout Itemize
5923 JMD dumping support.
5924 \end_layout
5926 \begin_layout Itemize
5927 Allow unattended dumping to JMD.
5928 \end_layout
5930 \begin_layout Itemize
5931 Move to BSNES v083.
5932 \end_layout
5934 \begin_layout Itemize
5935 Switch back to 32-bit colors.
5936 \end_layout
5938 \begin_layout Itemize
5939 Add Lua function gui.color.
5940 \end_layout
5942 \begin_layout Itemize
5943 Use some new C++11 features in GCC 4.6.
5944 \end_layout
5946 \begin_layout Itemize
5947 Be prepared for core frequency changes.
5948 \end_layout
5950 \begin_layout Itemize
5951 Pass colors in one chunk from Lua.
5952 \end_layout
5954 \begin_layout Subsection
5955 rr0-beta18
5956 \end_layout
5958 \begin_layout Itemize
5959 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5960  memory.read_vma() and memory.find_vma().
5961 \end_layout
5963 \begin_layout Itemize
5964 Numerious documentation fixups
5965 \end_layout
5967 \begin_layout Itemize
5968 RTC time format changed
5969 \end_layout
5971 \begin_layout Itemize
5972 Reformat flags display
5973 \end_layout
5975 \begin_layout Itemize
5976 Allow lua package name to be overridden
5977 \end_layout
5979 \begin_layout Itemize
5980 SDUMP (high-quality dumping).
5981 \end_layout
5983 \begin_layout Itemize
5984 Split platform support to plugins.
5985 \end_layout
5987 \begin_layout Itemize
5988 Make all sound plugins support basic sound commands
5989 \end_layout
5991 \begin_layout Itemize
5992 Support portaudio for sound.
5993 \end_layout
5995 \begin_layout Itemize
5996 Allow disable Lua/SDL searching.
5997 \end_layout
5999 \begin_layout Itemize
6000 Upconvert colors when copying lcscreen to screen.
6001 \end_layout
6003 \begin_layout Itemize
6004 Reorganize source tree.
6005 \end_layout
6007 \begin_layout Itemize
6008 Evdev joystick support.
6009 \end_layout
6011 \begin_layout Itemize
6012 Refactor more code into generic window code.
6013 \end_layout
6015 \begin_layout Subsection
6016 rr0-beta19
6017 \end_layout
6019 \begin_layout Itemize
6020 Refactor message handling.
6021 \end_layout
6023 \begin_layout Itemize
6024 Rework makefile
6025 \end_layout
6027 \begin_layout Itemize
6028 Documentation fixes
6029 \end_layout
6031 \begin_layout Itemize
6032 Finish pending saves before load/quit.
6033 \end_layout
6035 \begin_layout Itemize
6036 Wxwidgets graphics plugin.
6037 \end_layout
6039 \begin_layout Subsection
6040 rr0-beta20
6041 \end_layout
6043 \begin_layout Itemize
6044 Get rid of win32-crap.[ch]pp.
6045 \end_layout
6047 \begin_layout Itemize
6048 Move files around a lot.
6049 \end_layout
6051 \begin_layout Itemize
6052 Get rid of need for host C++ compiler.
6053 \end_layout
6055 \begin_layout Itemize
6056 Bsnes v084 core.
6057 \end_layout
6059 \begin_layout Itemize
6060 Refactor inter-component communication.
6061 \end_layout
6063 \begin_layout Itemize
6064 Fix zero luma.
6065 \end_layout
6067 \begin_layout Itemize
6068 Fix crash on multiline aliases.
6069 \end_layout
6071 \begin_layout Itemize
6072 Load/Save settings in wxwidgets gui.
6073 \end_layout
6075 \begin_layout Subsection
6076 rr0-beta21
6077 \end_layout
6079 \begin_layout Itemize
6080 Patch problems in bsnes core
6081 \end_layout
6083 \begin_layout Itemize
6084 SNES is little-endian, not big-endian!
6085 \end_layout
6087 \begin_layout Itemize
6088 Fix memory corruption in lcscreen::load()
6089 \end_layout
6091 \begin_layout Subsection
6092 rr0-beta22
6093 \end_layout
6095 \begin_layout Itemize
6096 Fix interpretting repeat counts in rrdata loading.
6097 \end_layout
6099 \begin_layout Itemize
6100 New lua callback: on_frame()
6101 \end_layout
6103 \begin_layout Itemize
6104 Remove calls to runtosave() that aren't supposed to be there
6105 \end_layout
6107 \begin_layout Itemize
6108 Lua function: movie.read_rtc()
6109 \end_layout
6111 \begin_layout Itemize
6112 Ignore src/fonts/font.cpp
6113 \end_layout
6115 \begin_layout Itemize
6116 Fix more bsnes core problems
6117 \end_layout
6119 \begin_layout Itemize
6120 Control bsnes random seeding
6121 \end_layout
6123 \begin_layout Itemize
6124 Pause-on-end
6125 \end_layout
6127 \begin_layout Itemize
6128 Some bsnes core debugging features (state dump and state hash)
6129 \end_layout
6131 \begin_layout Itemize
6132 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6133  it was 'lsnes rr0-beta21').
6134 \end_layout
6136 \begin_layout Subsection
6137 rr0-beta23
6138 \end_layout
6140 \begin_layout Itemize
6141 Fix memory corruption due to macro/field mixup
6142 \end_layout
6144 \begin_layout Itemize
6145 search-memory update
6146 \end_layout
6148 \begin_layout Itemize
6149 Allow direct-mapped framebuffer
6150 \end_layout
6152 \begin_layout Itemize
6153 SDL: Use SDL_ANYFORMAT if possible
6154 \end_layout
6156 \begin_layout Itemize
6157 SDMP2SOX: 2s delay modes.
6158 \end_layout
6160 \begin_layout Itemize
6161 Wxwidgets: Cleanups
6162 \end_layout
6164 \begin_layout Itemize
6165 Use sed -E, not sed -r.
6166  Fixes building on Mac OS X.
6167 \end_layout
6169 \begin_layout Itemize
6170 Wxwidgets: Save jukebox on exit
6171 \end_layout
6173 \begin_layout Itemize
6174 Fix RTC if using load-movie on savestate.
6175 \end_layout
6177 \begin_layout Itemize
6178 Fix crash related to full console mode.
6179 \end_layout
6181 \begin_layout Subsection
6182 rr0-beta24
6183 \end_layout
6185 \begin_layout Itemize
6186 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6187 \end_layout
6189 \begin_layout Itemize
6190 Wxwidgets: Allow compiling on Mac OS X.
6191 \end_layout
6193 \begin_layout Itemize
6194 Use movie compare instead of movie hashing (faster save/load).
6195 \end_layout
6197 \begin_layout Itemize
6198 Lua: _SYSTEM table.
6199 \end_layout
6201 \begin_layout Subsection
6202 rr0-beta25
6203 \end_layout
6205 \begin_layout Itemize
6206 sdmp2sox: Pad soundtrack if using -l or -L.
6207 \end_layout
6209 \begin_layout Itemize
6210 sdmp2sox: Fix NTSC overscan.
6211 \end_layout
6213 \begin_layout Itemize
6214 sdmp2sox: Add AR correction mode.
6215 \end_layout
6217 \begin_layout Itemize
6218 call lua_close() when exiting.
6219 \end_layout
6221 \begin_layout Itemize
6222 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6223 \end_layout
6225 \begin_layout Subsection
6226 rr0-beta26
6227 \end_layout
6229 \begin_layout Itemize
6230 Fix IPS patching code (use bsnes core IPS patcher).
6231 \end_layout
6233 \begin_layout Itemize
6234 Implement BPS patching (using bsnes core IPS patcher).
6235 \end_layout
6237 \begin_layout Itemize
6238 Add feature to load headered ROMs.
6239 \end_layout
6241 \begin_layout Subsection
6242 rr0-beta27
6243 \end_layout
6245 \begin_layout Itemize
6246 Show command names when showing keybindings
6247 \end_layout
6249 \begin_layout Subsection
6251 \end_layout
6253 \begin_layout Itemize
6254 Fix pause-on-end to be actually controllable
6255 \end_layout
6257 \begin_layout Itemize
6258 SDL: Poll all events in queue, not just first one (fixes slowness in command
6259  typing)
6260 \end_layout
6262 \begin_layout Itemize
6263 Wxwidgets: Fix ROM loading.
6264 \end_layout
6266 \begin_layout Subsection
6267 rr1-beta0
6268 \end_layout
6270 \begin_layout Itemize
6271 Lua: Add gui.textH, gui.textV, gui.textHV
6272 \end_layout
6274 \begin_layout Itemize
6275 Fix text colors on SDL on Mac OS X
6276 \end_layout
6278 \begin_layout Itemize
6279 Mode 'F' for finished in readonly mode.
6280 \end_layout
6282 \begin_layout Itemize
6283 Fix some WS errors.
6284 \end_layout
6286 \begin_layout Itemize
6287 Reliably pause after skip poll
6288 \end_layout
6290 \begin_layout Itemize
6291 Split UI and core into their own threads
6292 \end_layout
6294 \begin_layout Subsection
6295 rr1-beta1
6296 \end_layout
6298 \begin_layout Itemize
6299 Remove leftover dummy SRAM slot
6300 \end_layout
6302 \begin_layout Itemize
6303 Fix controller numbers.
6304 \end_layout
6306 \begin_layout Subsection
6307 rr1-beta2
6308 \end_layout
6310 \begin_layout Itemize
6311 Fix lsnes-dumpavi after interface change.
6312 \end_layout
6314 \begin_layout Itemize
6315 Also give BSNES patches for v085.
6316 \end_layout
6318 \begin_layout Itemize
6319 Pack movie data in memory.
6320 \end_layout
6322 \begin_layout Subsection
6323 rr1-beta3
6324 \end_layout
6326 \begin_layout Itemize
6327 Fix framecount/length given when loading movies.
6328 \end_layout
6330 \begin_layout Itemize
6331 Controller command memory leak fixes.
6332 \end_layout
6334 \begin_layout Itemize
6335 Don't leak palette if freeing screen object.
6336 \end_layout
6338 \begin_layout Subsection
6339 rr1-beta4
6340 \end_layout
6342 \begin_layout Itemize
6343 Detect revisions.
6344 \end_layout
6346 \begin_layout Itemize
6347 Wxwidgets: Allow controlling dumper from the menu.
6348 \end_layout
6350 \begin_layout Subsection
6351 rr1-beta5
6352 \end_layout
6354 \begin_layout Itemize
6355 Rewrite parts of manual
6356 \end_layout
6358 \begin_layout Itemize
6359 Lua: Make it work with Lua 5.2.
6360 \end_layout
6362 \begin_layout Subsection
6363 rr1-beta6
6364 \end_layout
6366 \begin_layout Itemize
6367 Win32: Fix compile errors.
6368 \end_layout
6370 \begin_layout Subsection
6371 rr1-beta7
6372 \end_layout
6374 \begin_layout Itemize
6375 Refactor controller input code.
6376 \end_layout
6378 \begin_layout Itemize
6379 Fix crash when using command line on SDL / Mac OS X.
6380 \end_layout
6382 \begin_layout Subsection
6383 rr1-beta8
6384 \end_layout
6386 \begin_layout Itemize
6387 Delete core/coroutine (obsolete)
6388 \end_layout
6390 \begin_layout Itemize
6391 Lag input display by one frame.
6392 \end_layout
6394 \begin_layout Itemize
6395 Rewind movie to beginning function.
6396 \end_layout
6398 \begin_layout Itemize
6399 Fix wrong frame number reported to Lua when repainting after loadstate
6400 \end_layout
6402 \begin_layout Itemize
6403 Support UI editing of jukebox
6404 \end_layout
6406 \begin_layout Itemize
6407 Wxwidgets: Save settings on exit.
6408 \end_layout
6410 \begin_layout Itemize
6411 Support ${project} for filenames
6412 \end_layout
6414 \begin_layout Itemize
6415 SDL: Fix command history
6416 \end_layout
6418 \begin_layout Subsection
6419 rr1-beta9
6420 \end_layout
6422 \begin_layout Itemize
6423 Fix some order-of-global-ctor bugs.
6424 \end_layout
6426 \begin_layout Subsection
6427 rr1-beta10
6428 \end_layout
6430 \begin_layout Itemize
6431 Fix crashes when quitting on Win32.
6432 \end_layout
6434 \begin_layout Subsection
6435 rr1-beta11
6436 \end_layout
6438 \begin_layout Itemize
6439 EVDEV: Queue keypresses from joystick, don't send directly
6440 \end_layout
6442 \begin_layout Itemize
6443 Wxwidgets: Load-Preserve that actually works.
6444 \end_layout
6446 \begin_layout Subsection
6447 rr1-beta12
6448 \end_layout
6450 \begin_layout Itemize
6451 Wxwidgets: GUI for memory search.
6452 \end_layout
6454 \begin_layout Itemize
6455 Warn about using synchronous queue in UI callback.
6456 \end_layout
6458 \begin_layout Subsection
6459 rr1-beta13
6460 \end_layout
6462 \begin_layout Itemize
6463 Remember last saved file for each ROM
6464 \end_layout
6466 \begin_layout Itemize
6467 Support MT dumping via boost.
6468 \end_layout
6470 \begin_layout Itemize
6471 Lua: input.raw
6472 \end_layout
6474 \begin_layout Itemize
6475 Lua: input.keyhook
6476 \end_layout
6478 \begin_layout Itemize
6479 Make mouse be ordinary input instead of special-casing
6480 \end_layout
6482 \begin_layout Itemize
6483 SDL: Don't screw up commands with NUL codepoints.
6484 \end_layout
6486 \begin_layout Subsection
6487 rr1-beta14
6488 \end_layout
6490 \begin_layout Itemize
6491 Merge status panel and main window
6492 \end_layout
6494 \begin_layout Itemize
6495 True movie slot support (the rest of it)
6496 \end_layout
6498 \begin_layout Itemize
6499 SDL: Fix compilation error
6500 \end_layout
6502 \begin_layout Itemize
6503 Elminate cross calls in dump menu code.
6504 \end_layout
6506 \begin_layout Subsection
6507 rr1-beta15
6508 \end_layout
6510 \begin_layout Itemize
6511 Cancel pending saves command
6512 \end_layout
6514 \begin_layout Itemize
6515 Wxwidgets: Code refactoring
6516 \end_layout
6518 \begin_layout Itemize
6519 Wxwidgets: Fix system -> reset
6520 \end_layout
6522 \begin_layout Itemize
6523 Wxwidgets: Read watch expressions in the right thread
6524 \end_layout
6526 \begin_layout Subsection
6527 rr1-beta16
6528 \end_layout
6530 \begin_layout Itemize
6531 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6532  support that).
6533 \end_layout
6535 \begin_layout Itemize
6536 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6537 \end_layout
6539 \begin_layout Itemize
6540 Don't append trailing '-' to prefix when saving movie.
6541 \end_layout
6543 \begin_layout Itemize
6544 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6545 \end_layout
6547 \begin_layout Subsection
6549 \end_layout
6551 \begin_layout Itemize
6552 Document memory watch syntax.
6553 \end_layout
6555 \begin_layout Subsection
6556 rr1-delta1
6557 \end_layout
6559 \begin_layout Itemize
6560 Fix unattended dumping (lsnes-dumpavi)
6561 \end_layout
6563 \begin_layout Itemize
6564 Support RAW dumping
6565 \end_layout
6567 \begin_layout Itemize
6568 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6569 \end_layout
6571 \begin_layout Itemize
6572 Add option to control sample rate preturbation in AVI dumper
6573 \end_layout
6575 \begin_layout Subsection
6576 rr1-delta2
6577 \end_layout
6579 \begin_layout Itemize
6580 Wxwidgets: Fix dumper submodes
6581 \end_layout
6583 \begin_layout Itemize
6584 Set core controller types before loadstate
6585 \end_layout
6587 \begin_layout Subsection
6588 rr1-delta2epsilon1
6589 \end_layout
6591 \begin_layout Itemize
6592 Fix compiling with bsnes v086.
6593 \end_layout
6595 \begin_layout Subsection
6596 rr1-delta3
6597 \end_layout
6599 \begin_layout Itemize
6600 Don't prompt before quitting
6601 \end_layout
6603 \begin_layout Itemize
6604 Start unpaused, preserve pause/unpause over load.
6605 \end_layout
6607 \begin_layout Itemize
6608 Try to autodetect if ROM is headered.
6609 \end_layout
6611 \begin_layout Itemize
6612 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6613 \end_layout
6615 \begin_layout Itemize
6616 Allow configuring some hotkeys.
6617 \end_layout
6619 \begin_layout Subsection
6620 rr1-delta4
6621 \end_layout
6623 \begin_layout Itemize
6624 Lots of code cleanups
6625 \end_layout
6627 \begin_layout Itemize
6628 Fix JMD compression (JMD dumping was broken)
6629 \end_layout
6631 \begin_layout Itemize
6632 Don't crash if Lua C function throws an exception.
6633 \end_layout
6635 \begin_layout Itemize
6636 Support bitmap drawing in Lua.
6637 \end_layout
6639 \begin_layout Itemize
6640 Fix bsnes v085/v086 patches.
6641 \end_layout
6643 \begin_layout Itemize
6644 Improve stability on win32.
6645 \end_layout
6647 \begin_layout Subsection
6648 rr1-delta4epsilon1
6649 \end_layout
6651 \begin_layout Itemize
6652 Don't corrupt movie if movie length is integer multiple of frames per page.
6653 \end_layout
6655 \begin_layout Subsection
6656 rr1-delta5
6657 \end_layout
6659 \begin_layout Itemize
6660 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6661 \end_layout
6663 \begin_layout Itemize
6664 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6665 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6667 \end_layout
6669 \begin_layout Itemize
6670 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6671 \end_layout
6673 \begin_layout Itemize
6674 Wxwidgets: Fix broken modifiers
6675 \end_layout
6677 \begin_layout Itemize
6678 on_paint has parameter now.
6679 \end_layout
6681 \begin_layout Itemize
6682 Optional initital fill for bitmaps
6683 \end_layout
6685 \begin_layout Itemize
6686 Fix palette changing.
6687 \end_layout
6689 \begin_layout Itemize
6690 Optimize rendering a bit.
6691 \end_layout
6693 \begin_layout Itemize
6694 Bsnes v087 support.
6695 \end_layout
6697 \begin_layout Subsection
6698 rr1-delta5epsilon1
6699 \end_layout
6701 \begin_layout Itemize
6702 Movieinfo: Fix display of port #2 type.
6703 \end_layout
6705 \begin_layout Itemize
6706 Call on_input() after loadstate.
6707 \end_layout
6709 \begin_layout Subsection
6710 rr1-delta5epsilon2
6711 \end_layout
6713 \begin_layout Itemize
6714 Fix writing port2 data to movie.
6715 \end_layout
6717 \begin_layout Itemize
6718 Fix SRAM handling with Bsnes v087.
6719 \end_layout
6721 \begin_layout Subsection
6722 rr1-delta6
6723 \end_layout
6725 \begin_layout Itemize
6726 Library loading support
6727 \end_layout
6729 \begin_layout Itemize
6730 Built-in TSCC encoder
6731 \end_layout
6733 \begin_layout Itemize
6734 Hi-color (256T colors) dumping.
6735 \end_layout
6737 \begin_layout Itemize
6738 Dump over TCP/IP(v6)
6739 \end_layout
6741 \begin_layout Itemize
6742 Hidable status panel
6743 \end_layout
6745 \begin_layout Itemize
6746 Turbo toggle/hold
6747 \end_layout
6749 \begin_layout Itemize
6750 Adjustable sound volume
6751 \end_layout
6753 \begin_layout Itemize
6754 Screen scaling
6755 \end_layout
6757 \begin_layout Itemize
6758 Allow DnD into filename boxes
6759 \end_layout
6761 \begin_layout Itemize
6762 Configurable paths
6763 \end_layout
6765 \begin_layout Itemize
6766 Portaudio: Fix speaker popping at start
6767 \end_layout
6769 \begin_layout Itemize
6770 Lots of UI changes
6771 \end_layout
6773 \begin_layout Itemize
6774 Speed adjustment menu
6775 \end_layout
6777 \begin_layout Itemize
6778 Win32 joystick support
6779 \end_layout
6781 \begin_layout Itemize
6782 Lua: gui.rainbow and gui.box
6783 \end_layout
6785 \begin_layout Itemize
6786 Split key lists into classes (the key list was large!)
6787 \end_layout
6789 \begin_layout Itemize
6790 More save slots support
6791 \end_layout
6793 \begin_layout Itemize
6794 Wxwidgets (wxJoystick) joystick support
6795 \end_layout
6797 \begin_layout Subsection
6798 rr1-delta7
6799 \end_layout
6801 \begin_layout Itemize
6802 Lots of internal joystick refactoring
6803 \end_layout
6805 \begin_layout Itemize
6806 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6807 \end_layout
6809 \begin_layout Itemize
6810 Wxwidgets: Settings mode (open settings without ROM)
6811 \end_layout
6813 \begin_layout Itemize
6814 Wxwidgets: Prompt key to use option
6815 \end_layout
6817 \begin_layout Itemize
6818 Wxwidgets: Fix crash if key goes away underneath
6819 \end_layout
6821 \begin_layout Itemize
6822 Wxwidgets: Fix mouse position in presence of scaling
6823 \end_layout
6825 \begin_layout Itemize
6826 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6827 \end_layout
6829 \begin_layout Itemize
6830 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6831  seem to work well on WinXP)
6832 \end_layout
6834 \begin_layout Itemize
6835 Start paused option.
6836 \end_layout
6838 \begin_layout Subsection
6839 rr1-delta7epsilon1
6840 \end_layout
6842 \begin_layout Itemize
6843 AVI: ZMBV support
6844 \end_layout
6846 \begin_layout Itemize
6847 lsnes-dumpavi: Start Lua before starting dumper
6848 \end_layout
6850 \begin_layout Itemize
6851 AVI: Fix secondary audio in mode 4.
6852 \end_layout
6854 \begin_layout Subsection
6855 rr1-delta7epsilon2
6856 \end_layout
6858 \begin_layout Itemize
6859 AVI: Refactor ZMBV a bit.
6860 \end_layout
6862 \begin_layout Itemize
6863 Fix error reading analog values from movie file
6864 \end_layout
6866 \begin_layout Subsection
6867 rr1-delta8
6868 \end_layout
6870 \begin_layout Itemize
6871 Delayed reset support
6872 \end_layout
6874 \begin_layout Itemize
6875 Lua: memory.hash_region
6876 \end_layout
6878 \begin_layout Subsection
6879 rr1-delta8epsilon1
6880 \end_layout
6882 \begin_layout Itemize
6883 Rework the build system
6884 \end_layout
6886 \begin_layout Itemize
6887 Typing input support
6888 \end_layout
6890 \begin_layout Itemize
6891 Fix building with bsnes v086 and v087.
6892 \end_layout
6894 \begin_layout Itemize
6895 SDL: Save settings on exit
6896 \end_layout
6898 \begin_layout Itemize
6899 SDL: Command to enter command line mode with given command.
6900 \end_layout
6902 \begin_layout Itemize
6903 SDL: More advanced command editing.
6904 \end_layout
6906 \begin_layout Subsection
6907 rr1-delta9
6908 \end_layout
6910 \begin_layout Itemize
6911 wxMSW: Fix the 
6912 \begin_inset Quotes eld
6913 \end_inset
6915 arrow keys and enter don't work
6916 \begin_inset Quotes erd
6917 \end_inset
6919  problem
6920 \end_layout
6922 \begin_layout Itemize
6923 MSU-1 support
6924 \end_layout
6926 \begin_layout Itemize
6927 Show mode changes due to rewinding.
6928 \end_layout
6930 \begin_layout Itemize
6931 Unsafe rewind support
6932 \end_layout
6934 \begin_layout Itemize
6935 Fix directory transversal.
6936 \end_layout
6938 \begin_layout Subsection
6939 rr1-delta10
6940 \end_layout
6942 \begin_layout Itemize
6943 AVI: Sound mode 5 (48kHz high-quality)
6944 \end_layout
6946 \begin_layout Itemize
6947 Lua: Reset Lua VM
6948 \end_layout
6950 \begin_layout Itemize
6951 Map the SNES bus into address space
6952 \end_layout
6954 \begin_layout Itemize
6955 Fix loading memory watch files with CRLF line endings
6956 \end_layout
6958 \begin_layout Subsection
6959 rr1-delta10epsilon1
6960 \end_layout
6962 \begin_layout Itemize
6963 Map bsnes internal state into memory space
6964 \end_layout
6966 \begin_layout Itemize
6967 Fix the 
6968 \begin_inset Quotes eld
6969 \end_inset
6971 click on panel wedges the emulator
6972 \begin_inset Quotes erd
6973 \end_inset
6975  for real.
6976 \end_layout
6978 \begin_layout Itemize
6979 DnD movies/saves on the main window.
6980 \end_layout
6982 \begin_layout Subsection
6983 rr1-delta11
6984 \end_layout
6986 \begin_layout Itemize
6987 Split core bindings into own module.
6988 \end_layout
6990 \begin_layout Itemize
6991 Remember invalid settings
6992 \end_layout
6994 \begin_layout Itemize
6995 Support for modified Gambatte core for GB/GBC emulation.
6996 \end_layout
6998 \begin_layout Itemize
6999 Reload/swap ROM function
7000 \end_layout
7002 \begin_layout Subsection
7003 rr1-delta11epsilon1
7004 \end_layout
7006 \begin_layout Itemize
7007 Fix step poll function
7008 \end_layout
7010 \begin_layout Subsection
7011 rr1-delta12
7012 \end_layout
7014 \begin_layout Itemize
7015 Non-insane savestate anchoring
7016 \end_layout
7018 \begin_layout Subsection
7019 rr1-delta13
7020 \end_layout
7022 \begin_layout Itemize
7023 More Memory search methods
7024 \end_layout
7026 \begin_layout Itemize
7027 Preserve movie if loading in RO mode.
7028 \end_layout
7030 \begin_layout Itemize
7031 Fix a obscure case in timeline check
7032 \end_layout
7034 \begin_layout Itemize
7035 Revamp the entiere ROM loading code
7036 \end_layout
7038 \begin_layout Itemize
7039 Support DnD on ROMs
7040 \end_layout
7042 \begin_layout Itemize
7043 Revamp menu layout
7044 \end_layout
7046 \begin_layout Itemize
7047 Standalone hotkey config dialog
7048 \end_layout
7050 \begin_layout Itemize
7051 Show bindings in more user-friendly format
7052 \end_layout
7054 \begin_layout Subsection
7055 rr1-delta13epsilon1
7056 \end_layout
7058 \begin_layout Itemize
7059 Pipedec support
7060 \end_layout
7062 \begin_layout Itemize
7063 Fix uninitialized variables in bsnes v085
7064 \end_layout
7066 \begin_layout Subsection
7067 rr1-delta14
7068 \end_layout
7070 \begin_layout Itemize
7071 Merge gambatte core into mainline (from its own branch)
7072 \end_layout
7074 \begin_layout Itemize
7075 Wxwidgets: Show expected dump file formats
7076 \end_layout
7078 \begin_layout Itemize
7079 Memory watch: Data typing
7080 \end_layout
7082 \begin_layout Itemize
7083 lsnes internal MMIO area.
7084 \end_layout
7086 \begin_layout Itemize
7087 Wxwidgets: New memory watch editor
7088 \end_layout
7090 \begin_layout Itemize
7091 Hexadecimal memory watches
7092 \end_layout
7094 \begin_layout Itemize
7095 Wxwidgets: Monospaced panel
7096 \end_layout
7098 \begin_layout Itemize
7099 Wxwidgets: Split memory watches in panel
7100 \end_layout
7102 \begin_layout Itemize
7103 Wxwidgets: Disable VMAs in memory search
7104 \end_layout
7106 \begin_layout Itemize
7107 lsnes-dumpavi: Fix speed bug
7108 \end_layout
7110 \begin_layout Itemize
7111 Movie subtitle support
7112 \end_layout
7114 \begin_layout Itemize
7115 Fix rerecord count reporting
7116 \end_layout
7118 \begin_layout Itemize
7119 Don't trash movie when loading in readonly mode.
7120 \end_layout
7122 \begin_layout Subsection
7123 rr1-delta14epsilon1
7124 \end_layout
7126 \begin_layout Itemize
7127 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7128 \end_layout
7130 \begin_layout Itemize
7131 Fix build on Mac OS X.
7132 \end_layout
7134 \begin_layout Itemize
7135 Lua: loopwrapper
7136 \end_layout
7138 \begin_layout Itemize
7139 Wxwidgets: Hidable messages window
7140 \end_layout
7142 \begin_layout Itemize
7143 Lua: input.joyset
7144 \end_layout
7146 \begin_layout Itemize
7147 Bsnes: Support inconsistent saves
7148 \end_layout
7150 \begin_layout Itemize
7151 Bsnes: Allow simulating saving every frame
7152 \end_layout
7154 \begin_layout Itemize
7155 Fix desync if savestate is loaded in readonly mode in certain conditions.
7156 \end_layout
7158 \begin_layout Itemize
7159 Wxwidgets: Fix save dialogs on Mac OS X.
7160 \end_layout
7162 \begin_layout Itemize
7163 Wxwidgets: Fix insane status width on Win32.
7164 \end_layout
7166 \begin_layout Itemize
7167 Wxwidgets: Fix autohold processing to be faster.
7168 \end_layout
7170 \begin_layout Itemize
7171 Wxwidgets: Allow loading ROMs and movies from commandline.
7172 \end_layout
7174 \begin_layout Subsection
7175 rr1-delta15
7176 \end_layout
7178 \begin_layout Itemize
7179 Be a bit smarter with --load
7180 \end_layout
7182 \begin_layout Itemize
7183 Rewrote higher-level parts of audio system
7184 \end_layout
7186 \begin_layout Itemize
7187 Tool to build commentary tracks
7188 \end_layout
7190 \begin_layout Itemize
7191 Lua: input.joyget
7192 \end_layout
7194 \begin_layout Itemize
7195 Gambatte: Add support for SVN358
7196 \end_layout
7198 \begin_layout Itemize
7199 Use builtin font when rendering status panel.
7200 \end_layout
7202 \begin_layout Itemize
7203 Option to detach memory watch to its own window.
7204 \end_layout
7206 \begin_layout Itemize
7207 Recent ROMs/Movies menu
7208 \end_layout
7210 \begin_layout Itemize
7211 Libao support
7212 \end_layout
7214 \begin_layout Itemize
7215 Useful lag counter for SNES games that autopoll
7216 \end_layout
7218 \begin_layout Itemize
7219 Fix buffer overflow in gambatte sound output
7220 \end_layout
7222 \begin_layout Subsection
7223 rr1-delta15epsilon1
7224 \end_layout
7226 \begin_layout Itemize
7227 Don't blow up on wxGTK if the window is hidden somehow
7228 \end_layout
7230 \begin_layout Itemize
7231 Support simultaneous drop of ROM and movie.
7232 \end_layout
7234 \begin_layout Itemize
7235 Gambatte: Don't save spurious SRAMs.
7236 \end_layout
7238 \begin_layout Itemize
7239 Make SGB ROMs actually usable.
7240 \end_layout
7242 \begin_layout Itemize
7243 Fix so that saved movies appear in recent movies.
7244 \end_layout
7246 \begin_layout Itemize
7247 Don't open multiple commentary editors at once.
7248 \end_layout
7250 \begin_layout Subsection
7251 rr1-delta15epsilon2
7252 \end_layout
7254 \begin_layout Itemize
7255 Lua: memory.readregion/memory.writeregion
7256 \end_layout
7258 \begin_layout Itemize
7259 Lua: memory.map{,s}{byte,word,dword,qword}
7260 \end_layout
7262 \begin_layout Itemize
7263 Lua: memory.map_structure
7264 \end_layout
7266 \begin_layout Itemize
7267 Lua: Fix bus_address for gambatte
7268 \end_layout
7270 \begin_layout Itemize
7271 Fix features dependent of bsnes debugger
7272 \end_layout
7274 \begin_layout Itemize
7275 Cleanup bsnes debugger logic
7276 \end_layout
7278 \begin_layout Itemize
7279 Fix resets in presence of save every frame
7280 \end_layout
7282 \end_body
7283 \end_document