Live subtitle editing
[lsnes.git] / manual.lyx
blob48a7ebb931e82dd77e6a2faab4c5632e09e8f594
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua (if Lua support is needed).
148 \end_layout
150 \begin_deeper
151 \begin_layout Itemize
152 Version 5.1.X or 5.2X.
153 \end_layout
155 \end_deeper
156 \begin_layout Enumerate
157 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
158 \end_layout
160 \begin_layout Section
161 Building
162 \end_layout
164 \begin_layout Itemize
165 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
166  bsnes core).
167 \end_layout
169 \begin_layout Itemize
170 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
171 \end_layout
173 \begin_layout Itemize
174 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
175 >', bsnes core)
176 \end_layout
178 \begin_layout Itemize
179 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
180 ersion>', gambatte core)
181 \end_layout
183 \begin_layout Itemize
184 Edit options.build (or copy of that file)
185 \end_layout
187 \begin_layout Itemize
188 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
190 \end_layout
192 \begin_layout Section
193 Command line options
194 \end_layout
196 \begin_layout Subsection
197 ROM options
198 \end_layout
200 \begin_layout Subsubsection
201 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
202 \end_layout
204 \begin_layout Standard
205 Load <file> as ROM.
206 \end_layout
208 \begin_layout Subsection
209 Session options
210 \end_layout
212 \begin_layout Subsubsection
213 --pause
214 \end_layout
216 \begin_layout Standard
217 Start paused
218 \end_layout
220 \begin_layout Subsubsection
221 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
222 \end_layout
224 \begin_layout Standard
225 Load <filename> as movie or savestate file.
226  All other session options are ignored.
227 \end_layout
229 \begin_layout Subsubsection
230 --port1=<device> (lsnes/SDL, bsnes core only)
231 \end_layout
233 \begin_layout Standard
234 Set type of port1.
235  Valid values are:
236 \end_layout
238 \begin_layout Itemize
239 none: No device connected
240 \end_layout
242 \begin_layout Itemize
243 gamepad: One gamepad (the default)
244 \end_layout
246 \begin_layout Itemize
247 multitap: Four gamepads (warning: makes most games refuse to start)
248 \end_layout
250 \begin_layout Itemize
251 mouse: Mouse.
252 \end_layout
254 \begin_layout Subsubsection
255 --port2=<type> (lsnes/SDL, bsnes core only)
256 \end_layout
258 \begin_layout Standard
259 Set type of port2.
260  Valid values are:
261 \end_layout
263 \begin_layout Itemize
264 none: No device connected (the default)
265 \end_layout
267 \begin_layout Itemize
268 gamepad: One gamepad
269 \end_layout
271 \begin_layout Itemize
272 multitap: Four gamepads.
273 \end_layout
275 \begin_layout Itemize
276 mouse: Mouse
277 \end_layout
279 \begin_layout Itemize
280 superscope: Super Scope
281 \end_layout
283 \begin_layout Itemize
284 justifier: One justifier
285 \end_layout
287 \begin_layout Itemize
288 justifiers: Two justifiers
289 \end_layout
291 \begin_layout Subsubsection
292 --gamename=<name> (lsnes/SDL)
293 \end_layout
295 \begin_layout Standard
296 Set the name of game to <name>.
297  Default is blank.
298 \end_layout
300 \begin_layout Subsubsection
301 --author=<name> (lsnes/SDL)
302 \end_layout
304 \begin_layout Standard
305 Add author with full name of <name> (no nickname).
306 \end_layout
308 \begin_layout Subsubsection
309 --author=|<name> (lsnes/SDL)
310 \end_layout
312 \begin_layout Standard
313 Add author with nickname of <name> (no full name).
314 \end_layout
316 \begin_layout Subsubsection
317 --author=<fullname>|<nickname> (lsnes/SDL)
318 \end_layout
320 \begin_layout Standard
321 Add author with full name of <fullname> and nickname of <nickname>.
322 \end_layout
324 \begin_layout Subsubsection
325 --rtc-second=<value> (lsnes/SDL)
326 \end_layout
328 \begin_layout Standard
329 Set RTC second (0 is 1st January 1970 00:00:00Z).
330  Default is 1,000,000,000.
331 \end_layout
333 \begin_layout Subsubsection
334 --rtc-subsecond=<value> (lsnes/SDL)
335 \end_layout
337 \begin_layout Standard
338 Set RTC subsecond.
339  Range is 0-.
340  Unit is CPU cycle.
341  Default is 0.
342 \end_layout
344 \begin_layout Subsubsection
345 --anchor-savestate=<file> (lsnes/SDL)
346 \end_layout
348 \begin_layout Standard
349 Set the anchor savestate file.
350 \end_layout
352 \begin_layout Subsubsection
353 --load=<file> (lsnes/wxwidgets)
354 \end_layout
356 \begin_layout Standard
357 After loading the ROM, load <file> as savestate/movie.
358 \end_layout
360 \begin_layout Subsection
361 Misc.
362  options:
363 \end_layout
365 \begin_layout Subsubsection
366 --run=<file> (lsnes/SDL)
367 \end_layout
369 \begin_layout Standard
370 After running main RC file, run this file.
371  If multiple are specified, these execute in order specified.
372 \end_layout
374 \begin_layout Subsection
375 dump options (lsnes-dumpavi only)
376 \end_layout
378 \begin_layout Subsubsection
379 --dumper=<dumper>
380 \end_layout
382 \begin_layout Standard
383 Set the dumper to use (required).
384  Use 'list' for listing of known dumpers.
385 \end_layout
387 \begin_layout Subsubsection
388 --mode=<mode>
389 \end_layout
391 \begin_layout Standard
392 Set the mode to use (required for dumpers with multiple modes, forbidden
393  otherwise).
394  Use 'list' for known modes.
395 \end_layout
397 \begin_layout Subsubsection
398 --prefix=<prefix>
399 \end_layout
401 \begin_layout Standard
402 Set dump prefix.
403  Default is 
404 \begin_inset Quotes eld
405 \end_inset
407 avidump
408 \begin_inset Quotes erd
409 \end_inset
412 \end_layout
414 \begin_layout Subsubsection
415 --option=<name>=<value>
416 \end_layout
418 \begin_layout Standard
419 Set option <name> to value <value>.
420 \end_layout
422 \begin_layout Subsubsection
423 --length=<length>
424 \end_layout
426 \begin_layout Standard
427 Set number of frames to dump.
428  Mandatory.
429 \end_layout
431 \begin_layout Subsubsection
432 --lua=<script>
433 \end_layout
435 \begin_layout Standard
436 Run specified lua script (lsnes-dumpavi does not have initialization files).
437 \end_layout
439 \begin_layout Subsubsection
440 --load-library=<library>
441 \end_layout
443 \begin_layout Standard
444 Load the specified shared object / dynamic library / dynamic link library.
445 \end_layout
447 \begin_layout Section
448 Startup file lsnes.rc
449 \end_layout
451 \begin_layout Standard
452 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
453  This file is located in:
454 \end_layout
456 \begin_layout Itemize
457 Windows: %APPDATA%
458 \backslash
459 lsnes
460 \backslash
461 lsnes.rc (if %APPDATA% exists)
462 \end_layout
464 \begin_layout Itemize
465 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
466 \end_layout
468 \begin_layout Itemize
469 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
470 \end_layout
472 \begin_layout Itemize
473 All: ./lsnes.rc (fallback default).
474 \end_layout
476 \begin_layout Standard
477 If leading directories do not exist, attempt to create them is made.
478 \end_layout
480 \begin_layout Section
481 Internal commands
482 \end_layout
484 \begin_layout Itemize
485 Commands beginning with '*' invoke the corresponding command without alias
486  expansion.
487 \end_layout
489 \begin_layout Itemize
490 If command starts with '+' (after possible '*'), the command is executed
491  as-is when button is pressed, and when button is released, it is executed
492  with '+' replaced by '-'.
493 \end_layout
495 \begin_layout Itemize
496 Commands without '+' execute only on negative edge (release).
497 \end_layout
499 \begin_layout Subsection
500 Settings:
501 \end_layout
503 \begin_layout Standard
504 Settings control various aspects of emulator behaviour.
505 \end_layout
507 \begin_layout Subsubsection
508 set-setting <setting> <value>
509 \end_layout
511 \begin_layout Standard
512 Sets setting <setting> to value <value> (may be empty).
513 \end_layout
515 \begin_layout Subsubsection
516 unset-setting <setting>
517 \end_layout
519 \begin_layout Standard
520 Try to unset setting <setting> (not all settings can be unset).
521 \end_layout
523 \begin_layout Subsubsection
524 get-setting <setting>
525 \end_layout
527 \begin_layout Standard
528 Read value of setting <setting>
529 \end_layout
531 \begin_layout Subsubsection
532 show-settings
533 \end_layout
535 \begin_layout Standard
536 Print names and values of all settings.
537 \end_layout
539 \begin_layout Subsection
540 Keybindings
541 \end_layout
543 \begin_layout Standard
544 Keybindings bind commands or aliases to keys (or pseudo-keys).
546 \end_layout
548 \begin_layout Standard
549 Notes:
550 \end_layout
552 \begin_layout Itemize
553 Do not bind edge active (+/-) commands to keys with modifiers, that won't
554  work right!
555 \end_layout
557 \begin_layout Itemize
558 Names of keys and modifiers are platform-dependent.
559 \end_layout
561 \begin_layout Itemize
562 Be careful before binding pseudo-keys (such as joystick axes, buttons or
563  hats) with modifiers.
564  That may or may not work right.
565 \end_layout
567 \begin_layout Subsubsection
568 bind-key [<mod>/<modmask>] <key> <command>
569 \end_layout
571 \begin_layout Standard
572 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
573 ed list) are set as <mod> (comma-seperated list).
574 \end_layout
576 \begin_layout Standard
577 The names of keys and modifiers are platform-dependent.
578 \end_layout
580 \begin_layout Subsubsection
581 unbind-key [<mod>/<modmask>] <key>
582 \end_layout
584 \begin_layout Standard
585 Unbind command from <key> (with specified <mod> and <modmask>).
586 \end_layout
588 \begin_layout Subsubsection
589 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
590  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
591  [plus=<val>] [tolerance=<val>]
592 \end_layout
594 \begin_layout Standard
595 Set axis parameters for axis <axis>.
596 \end_layout
598 \begin_layout Itemize
599 disabled: Disable axis
600 \end_layout
602 \begin_layout Itemize
603 axis: Normal axis
604 \end_layout
606 \begin_layout Itemize
607 axis-inverse: Inverse axis
608 \end_layout
610 \begin_layout Itemize
611 pressure0-: Pressure sensitive.
612  Released at 0, pressed at -.
613 \end_layout
615 \begin_layout Itemize
616 pressure0+: Pressure sensitive.
617  Released at 0, pressed at +.
618 \end_layout
620 \begin_layout Itemize
621 pressure-0: Pressure sensitive.
622  Released at -, pressed at 0.
623 \end_layout
625 \begin_layout Itemize
626 pressure-+: Pressure sensitive.
627  Released at -, pressed at +.
628 \end_layout
630 \begin_layout Itemize
631 pressure+0: Pressure sensitive.
632  Released at +, pressed at 0.
633 \end_layout
635 \begin_layout Itemize
636 pressure+-: Pressure sensitive.
637  Released at +, pressed at -.
638 \end_layout
640 \begin_layout Itemize
641 minus=<val>: Calibration at extreme minus position (-32768-32767)
642 \end_layout
644 \begin_layout Itemize
645 zero=<val>: Calibration at neutral position (-32768-32767)
646 \end_layout
648 \begin_layout Itemize
649 plus=<val>: Calibration at extreme plus position (-32768-32767)
650 \end_layout
652 \begin_layout Itemize
653 tolerance=<value>: Center band tolerance (0<x<1).
654  The smaller the value, the more sensitive the control is.
655 \end_layout
657 \begin_layout Subsubsection
658 show-bindings
659 \end_layout
661 \begin_layout Standard
662 Print all key bindings in effect.
663 \end_layout
665 \begin_layout Subsection
666 Aliases
667 \end_layout
669 \begin_layout Standard
670 Aliases bind command to sequence of commands.
671  After alias has been defined, it replaces the command it shadows.
672 \end_layout
674 \begin_layout Standard
675 Notes:
676 \end_layout
678 \begin_layout Itemize
679 You can't alias command to itself.
680 \end_layout
682 \begin_layout Itemize
683 Aliases starting with +/- are edge active just like ordinary commands starting
684  with +/-.
685 \end_layout
687 \begin_layout Itemize
688 One command can be aliased to multiple commands.
689 \end_layout
691 \begin_layout Subsubsection
692 alias-command <command> <expansion>
693 \end_layout
695 \begin_layout Standard
696 Append <expansion> to alias <command>.
697  If alias does not already exist, it is created.
698 \end_layout
700 \begin_layout Subsubsection
701 unalias-command <command>
702 \end_layout
704 \begin_layout Standard
705 Clear alias expansion for <command>.
706 \end_layout
708 \begin_layout Subsubsection
709 show-aliases
710 \end_layout
712 \begin_layout Standard
713 Print all aliases and their expansions in effect.
714 \end_layout
716 \begin_layout Subsection
717 run-script <script>
718 \end_layout
720 \begin_layout Standard
721 Run <script> as if commands were entered on the command line.
722 \end_layout
724 \begin_layout Subsection
725 Video dumping
726 \end_layout
728 \begin_layout Standard
729 Following commands control video dumping:
730 \end_layout
732 \begin_layout Subsubsection
733 start-dump <dumper> [<mode>] <prefix/filename>
734 \end_layout
736 \begin_layout Standard
737 Start dumping using dumper <dumper>.
738  If mode is present or not and if prefix or filename is present depends
739  on the dumper and dumper mode.
740 \end_layout
742 \begin_layout Standard
743 The following dumpers are available:
744 \end_layout
746 \begin_layout Itemize
747 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
748 \end_layout
750 \begin_deeper
751 \begin_layout Itemize
752 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
753  Takes prefix.
754 \end_layout
756 \begin_layout Itemize
757 Mode: cscd/pcm: CSCD video, PCM audio.
758  Takes prefix.
759 \end_layout
761 \end_deeper
762 \begin_layout Itemize
763 INTERNAL-JMD: Internal .jmd dumper.
764 \end_layout
766 \begin_deeper
767 \begin_layout Itemize
768 Does not take mode.
769 \end_layout
771 \begin_layout Itemize
772 Takes a filename.
773 \end_layout
775 \end_deeper
776 \begin_layout Itemize
777 INTERNAL-RAW: Internal RAW dumper.
778 \end_layout
780 \begin_deeper
781 \begin_layout Itemize
782 Does not take mode.
783 \end_layout
785 \begin_layout Itemize
786 Takes a prefix.
787 \end_layout
789 \begin_layout Itemize
790 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
791 \end_layout
793 \begin_layout Itemize
794 Video is always upscaled to double resolution (512x448 / 512 x 478).
795 \end_layout
797 \begin_layout Itemize
798 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
799  for NTSC.
800 \end_layout
802 \end_deeper
803 \begin_layout Itemize
804 INTERNAL-SDMP: Internal SDMP dumper.
805 \end_layout
807 \begin_deeper
808 \begin_layout Itemize
809 Mode 'ms': Multi-segment.
810  Takes prefix.
811 \end_layout
813 \begin_layout Itemize
814 Mode 'ss': Single-segment.
815  Takes filename.
816 \end_layout
818 \end_deeper
819 \begin_layout Subsubsection
820 end-dump <dumper>
821 \end_layout
823 \begin_layout Standard
824 End dumping using <dumper>
825 \end_layout
827 \begin_layout Subsubsection
828 show-dumpers [<dumper>]
829 \end_layout
831 \begin_layout Standard
832 Show the list of dumpers or list of modes for <dumper>
833 \end_layout
835 \begin_layout Subsection
836 Memory manipulation
837 \end_layout
839 \begin_layout Standard
840 <address> may be decimal or hexadecimal (prefixed with '0x').
841  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
842  with '-') decimal.
843 \end_layout
845 \begin_layout Standard
846 The available element <sizes> are:
847 \end_layout
849 \begin_layout Itemize
850 byte: 1 byte
851 \end_layout
853 \begin_layout Itemize
854 word: 2 bytes
855 \end_layout
857 \begin_layout Itemize
858 dword: 4 bytes
859 \end_layout
861 \begin_layout Itemize
862 qword: 8 bytes
863 \end_layout
865 \begin_layout Standard
866 When reading RAM and ROM, multi-byte reads/writes are big-endian.
867  When dealing with DSP memory, multi-byte reads/writes are native-endian
868  (do not use operand sizes exceeding DSP bitness, except dword is OK for
869  24-bit memory).
870 \end_layout
872 \begin_layout Subsubsection
873 read-<size> <address>
874 \end_layout
876 \begin_layout Standard
877 Read the value of byte in <address>.
878 \end_layout
880 \begin_layout Subsubsection
881 read-s<size> <address>
882 \end_layout
884 \begin_layout Standard
885 Read the value of signed byte in <address>.
886 \end_layout
888 \begin_layout Subsubsection
889 write-<size> <address> <value>
890 \end_layout
892 \begin_layout Standard
893 Write <value> to byte in address <address>.
894 \end_layout
896 \begin_layout Subsubsection
897 search-memory reset
898 \end_layout
900 \begin_layout Standard
901 Reset the memory search
902 \end_layout
904 \begin_layout Subsubsection
905 search-memory count
906 \end_layout
908 \begin_layout Standard
909 Print number of candidates remaining
910 \end_layout
912 \begin_layout Subsubsection
913 search-memory print
914 \end_layout
916 \begin_layout Standard
917 Print all candidates remaining
918 \end_layout
920 \begin_layout Subsubsection
921 search-memory <usflag><sizeflag><op>
922 \end_layout
924 \begin_layout Standard
925 Searches memory for addresses satisfying criteria.
926 \end_layout
928 \begin_layout Standard
929 <usflag> can be:
930 \end_layout
932 \begin_layout Itemize
933 u: unsigned
934 \end_layout
936 \begin_layout Itemize
937 s: signed
938 \end_layout
940 \begin_layout Standard
941 <sizeflag> can be:
942 \end_layout
944 \begin_layout Itemize
945 b: byte
946 \end_layout
948 \begin_layout Itemize
949 w: word
950 \end_layout
952 \begin_layout Itemize
953 d: dword
954 \end_layout
956 \begin_layout Itemize
957 q: qword
958 \end_layout
960 \begin_layout Standard
961 <op> can be:
962 \end_layout
964 \begin_layout Itemize
965 lt: < previous value.
966 \end_layout
968 \begin_layout Itemize
969 le: <= previous value.
970 \end_layout
972 \begin_layout Itemize
973 eq: = previous value.
974 \end_layout
976 \begin_layout Itemize
977 ne: != previous value.
978 \end_layout
980 \begin_layout Itemize
981 ge: >= previous value.
982 \end_layout
984 \begin_layout Itemize
985 gt: > previous value.
986 \end_layout
988 \begin_layout Subsubsection
989 search-memory <sizeflag> <value>
990 \end_layout
992 \begin_layout Standard
993 Searches for addresses that currently have value <value>.
994  <sizeflag> is as in previous command.
995 \end_layout
997 \begin_layout Subsection
998 Main commands
999 \end_layout
1001 \begin_layout Standard
1002 These commands are not available in lsnesrc, but are available after ROM
1003  has been loaded.
1004 \end_layout
1006 \begin_layout Subsubsection
1007 quit-emulator [/y]
1008 \end_layout
1010 \begin_layout Standard
1011 Quits the emulator (asking for confirmation).
1012  If /y is given, no confirmation is asked.
1013 \end_layout
1015 \begin_layout Subsubsection
1016 pause-emulator
1017 \end_layout
1019 \begin_layout Standard
1020 Toggle paused/unpaused
1021 \end_layout
1023 \begin_layout Subsubsection
1024 +advance-frame 
1025 \end_layout
1027 \begin_layout Standard
1028 Advance frame.
1029  If the button is still held after configurable timeout expires, game unpauses
1030  for the duration frame advance is held.
1031 \end_layout
1033 \begin_layout Subsubsection
1034 +advance-poll 
1035 \end_layout
1037 \begin_layout Standard
1038 Advance subframe.
1039  If the button is still held after configurable timeout expires, game unpauses
1040  for the duration frame advance is held.
1041 \end_layout
1043 \begin_layout Subsubsection
1044 advance-skiplag 
1045 \end_layout
1047 \begin_layout Standard
1048 Skip to first poll in frame after current.
1049 \end_layout
1051 \begin_layout Subsubsection
1052 reset 
1053 \end_layout
1055 \begin_layout Standard
1056 Reset the SNES after this frame.
1057 \end_layout
1059 \begin_layout Subsubsection
1060 load <filename> 
1061 \end_layout
1063 \begin_layout Standard
1064 Load savestate <filename> in current mode.
1065 \end_layout
1067 \begin_layout Subsubsection
1068 load-state <filename> 
1069 \end_layout
1071 \begin_layout Standard
1072 Load savestate <filename> in readwrite mode.
1073 \end_layout
1075 \begin_layout Subsubsection
1076 load-readonly <filename> 
1077 \end_layout
1079 \begin_layout Standard
1080 Load savestate <filename> in readonly mode.
1081 \end_layout
1083 \begin_layout Subsubsection
1084 load-preserve <filename> 
1085 \end_layout
1087 \begin_layout Standard
1088 Load savestate <filename> in readonly mode, preserving current events.
1089 \end_layout
1091 \begin_layout Subsubsection
1092 load-movie <filename> 
1093 \end_layout
1095 \begin_layout Standard
1096 Load savestate <filename>, ignoring save part in readonly mode.
1097 \end_layout
1099 \begin_layout Subsubsection
1100 save-state <filename> 
1101 \end_layout
1103 \begin_layout Standard
1104 Save system state to <filename> as soon as possible.
1105 \end_layout
1107 \begin_layout Subsubsection
1108 save-movie <filename> 
1109 \end_layout
1111 \begin_layout Standard
1112 Save movie to <filename>.
1113 \end_layout
1115 \begin_layout Subsubsection
1116 set-rwmode 
1117 \end_layout
1119 \begin_layout Standard
1120 Set read-write mode.
1121 \end_layout
1123 \begin_layout Subsubsection
1124 set-romode 
1125 \end_layout
1127 \begin_layout Standard
1128 Set read-only mode
1129 \end_layout
1131 \begin_layout Subsubsection
1132 toggle-rwmode 
1133 \end_layout
1135 \begin_layout Standard
1136 Toggle between read-only and read-write modes.
1137 \end_layout
1139 \begin_layout Subsubsection
1140 set-gamename <name> 
1141 \end_layout
1143 \begin_layout Standard
1144 Set name of the game to <name>
1145 \end_layout
1147 \begin_layout Subsubsection
1148 get-gamename 
1149 \end_layout
1151 \begin_layout Standard
1152 Print the name of the game.
1153 \end_layout
1155 \begin_layout Subsubsection
1156 add-author <author> 
1157 \end_layout
1159 \begin_layout Standard
1160 Adds new author <author>.
1161  If <author> does not contain '|' it is full name.
1162  If it contains '|', '|' splits the full name and nickname.
1163 \end_layout
1165 \begin_layout Subsubsection
1166 edit-author <num> <author> 
1167 \end_layout
1169 \begin_layout Standard
1170 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1171  format)
1172 \end_layout
1174 \begin_layout Subsubsection
1175 remove-author <num> 
1176 \end_layout
1178 \begin_layout Standard
1179 Remove author in slot <num>
1180 \end_layout
1182 \begin_layout Subsubsection
1183 print-authors 
1184 \end_layout
1186 \begin_layout Standard
1187 Print authors.
1188 \end_layout
1190 \begin_layout Subsubsection
1191 test-1, test-2, test-3
1192 \end_layout
1194 \begin_layout Standard
1195 Internal test commands.
1196  Don't use.
1197 \end_layout
1199 \begin_layout Subsubsection
1200 take-screenshot <filename> 
1201 \end_layout
1203 \begin_layout Standard
1204 Save screenshot to <filename>.
1205 \end_layout
1207 \begin_layout Subsubsection
1208 +controller<num><button>
1209 \end_layout
1211 \begin_layout Standard
1212 Press button <button> on controller <num> (1-8).
1213  The following button names are known:
1214 \end_layout
1216 \begin_layout Itemize
1217 left
1218 \end_layout
1220 \begin_layout Itemize
1221 right
1222 \end_layout
1224 \begin_layout Itemize
1226 \end_layout
1228 \begin_layout Itemize
1229 down
1230 \end_layout
1232 \begin_layout Itemize
1234 \end_layout
1236 \begin_layout Itemize
1238 \end_layout
1240 \begin_layout Itemize
1242 \end_layout
1244 \begin_layout Itemize
1246 \end_layout
1248 \begin_layout Itemize
1250 \end_layout
1252 \begin_layout Itemize
1254 \end_layout
1256 \begin_layout Itemize
1257 select
1258 \end_layout
1260 \begin_layout Itemize
1261 start
1262 \end_layout
1264 \begin_layout Itemize
1265 trigger
1266 \end_layout
1268 \begin_layout Itemize
1269 cursor
1270 \end_layout
1272 \begin_layout Itemize
1273 pause
1274 \end_layout
1276 \begin_layout Itemize
1277 turbo
1278 \end_layout
1280 \begin_layout Subsubsection
1281 controllerh<num><button>
1282 \end_layout
1284 \begin_layout Standard
1285 Hold/unhold button <button> on controller <num> (1-8).
1286  See +controller for button names.
1287 \end_layout
1289 \begin_layout Subsubsection
1290 controllerf<num><button>
1291 \end_layout
1293 \begin_layout Standard
1294 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1295  See +controller for button names.
1296 \end_layout
1298 \begin_layout Standard
1299 Cauntion: Does not work properly if outside frame advance.
1300 \end_layout
1302 \begin_layout Subsubsection
1303 autofire (<pattern>|-)...
1304 \end_layout
1306 \begin_layout Standard
1307 Set autofire pattern.
1308  Each parameter is comma-separated list of button names (in form of 1start,
1309  1A, 2B, etc..) to hold on that frame.
1310  After reaching the end of pattern, the pattern restarts from the beginning.
1311 \end_layout
1313 \begin_layout Subsubsection
1314 repaint
1315 \end_layout
1317 \begin_layout Standard
1318 Force a repaint.
1319 \end_layout
1321 \begin_layout Subsection
1322 Save jukebox 
1323 \end_layout
1325 \begin_layout Subsubsection
1326 cycle-jukebox-backward
1327 \end_layout
1329 \begin_layout Standard
1330 Cycle save jukebox backwards.
1331 \end_layout
1333 \begin_layout Subsubsection
1334 cycle-jukebox-forward
1335 \end_layout
1337 \begin_layout Standard
1338 Cycle save jukebox forwards
1339 \end_layout
1341 \begin_layout Subsubsection
1342 load-jukebox
1343 \end_layout
1345 \begin_layout Standard
1346 Do load from jukebox (current mode).
1347 \end_layout
1349 \begin_layout Subsubsection
1350 save-jukebox
1351 \end_layout
1353 \begin_layout Standard
1354 Do state save to jukebox.
1355 \end_layout
1357 \begin_layout Subsection
1358 Lua 
1359 \end_layout
1361 \begin_layout Standard
1362 Only available if lua support is compiled in.
1363 \end_layout
1365 \begin_layout Subsubsection
1366 evaluate-lua <luacode>
1367 \end_layout
1369 \begin_layout Standard
1370 Run Lua code <luacode> using built-in Lua interpretter.
1371 \end_layout
1373 \begin_layout Subsubsection
1374 run-lua <script>
1375 \end_layout
1377 \begin_layout Standard
1378 Run specified lua file using built-in Lua interpretter.
1379 \end_layout
1381 \begin_layout Subsubsection
1382 reset-lua
1383 \end_layout
1385 \begin_layout Standard
1386 Clear the Lua VM state and restore to factory defaults.
1387 \end_layout
1389 \begin_layout Subsection
1390 Memory watch
1391 \end_layout
1393 \begin_layout Subsubsection
1394 add-watch <name> <expression>
1395 \end_layout
1397 \begin_layout Standard
1398 Adds new watch (or modifies old one).
1399 \end_layout
1401 \begin_layout Subsubsection
1402 remove-watch <name>
1403 \end_layout
1405 \begin_layout Standard
1406 Remove a watch.
1407 \end_layout
1409 \begin_layout Subsection
1410 Sound 
1411 \end_layout
1413 \begin_layout Subsubsection
1414 enable-sound <on/off> 
1415 \end_layout
1417 \begin_layout Standard
1418 Enable/Disable sound.
1419 \end_layout
1421 \begin_layout Subsubsection
1422 set-sound-device <device> 
1423 \end_layout
1425 \begin_layout Standard
1426 Set sound device to <device>
1427 \end_layout
1429 \begin_layout Subsubsection
1430 show-sound-status 
1431 \end_layout
1433 \begin_layout Standard
1434 Show status of sound system.
1435 \end_layout
1437 \begin_layout Subsubsection
1438 show-sound-devices
1439 \end_layout
1441 \begin_layout Standard
1442 Show all available devices.
1443 \end_layout
1445 \begin_layout Subsubsection
1446 set-volume <multiplier>
1447 \end_layout
1449 \begin_layout Standard
1450 Set the volume multiplier to <multiplier>.
1451  1 is normal volume, and higher numbers are louder.
1452 \end_layout
1454 \begin_layout Subsubsection
1455 set-volume <multiplier>%
1456 \end_layout
1458 \begin_layout Standard
1459 Set the volume multiplier to <multiplier> percent.
1460  100 is normal volume, and higher numbers are louder.
1461 \end_layout
1463 \begin_layout Subsubsection
1464 set-volume <multiplier>dB
1465 \end_layout
1467 \begin_layout Standard
1468 Set the volume multiplier to <multiplier> dB.
1469  0 is normal volume, and higher numbers are louder.
1470  The value may be negative.
1471 \end_layout
1473 \begin_layout Subsection
1474 Misc.
1475 \end_layout
1477 \begin_layout Subsubsection
1478 reload-rom [<file>]
1479 \end_layout
1481 \begin_layout Standard
1482 Reloads the main ROM image from <file>.
1483 \end_layout
1485 \begin_layout Subsubsection
1486 edit-subtitle <firstframe> <length> [<text>]
1487 \end_layout
1489 \begin_layout Standard
1490 Edit or delete a subtitle.
1491 \end_layout
1493 \begin_layout Subsubsection
1494 list-subtitle
1495 \end_layout
1497 \begin_layout Standard
1498 List subtitles.
1499 \end_layout
1501 \begin_layout Subsection
1502 Commentary track
1503 \end_layout
1505 \begin_layout Subsubsection
1506 list-streams
1507 \end_layout
1509 \begin_layout Standard
1510 List streams
1511 \end_layout
1513 \begin_layout Subsubsection
1514 play-stream <id>
1515 \end_layout
1517 \begin_layout Standard
1518 Play stream <id>.
1519 \end_layout
1521 \begin_layout Subsubsection
1522 delete-stream <id>
1523 \end_layout
1525 \begin_layout Standard
1526 Delete stream <id>
1527 \end_layout
1529 \begin_layout Subsubsection
1530 change-timebase <id> <newbase>
1531 \end_layout
1533 \begin_layout Standard
1534 Change time base of <id> to <newbase>.
1535  The time base can be given as samples (integer) or second (postfix with
1536  s).
1537 \end_layout
1539 \begin_layout Subsubsection
1540 import-stream-opus <timebase> <file>
1541 \end_layout
1543 \begin_layout Standard
1544 Import opus stream from <file>, placing it at <timebase>.
1545  This operation is lossless.
1546 \end_layout
1548 \begin_layout Subsubsection
1549 import-stream-pcm <timebase> <file>
1550 \end_layout
1552 \begin_layout Standard
1553 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1554 \end_layout
1556 \begin_layout Subsubsection
1557 export-stream-opus <id> <file>
1558 \end_layout
1560 \begin_layout Standard
1561 Export stream <id> as opus stream to <file>.
1562  This operation is lossless.
1563 \end_layout
1565 \begin_layout Subsubsection
1566 export-stream-pcm <id> <file>
1567 \end_layout
1569 \begin_layout Standard
1570 Export stream <id> as PCM (.sox) stream to <file>.
1572 \end_layout
1574 \begin_layout Subsubsection
1575 export-superstream <file>
1576 \end_layout
1578 \begin_layout Standard
1579 Export the entiere superstream as PCM (.sox) stream to <file>.
1580 \end_layout
1582 \begin_layout Subsubsection
1583 load-collection <file>
1584 \end_layout
1586 \begin_layout Standard
1587 Load collection (if there is existing collection, unload it) from <file>
1588 \end_layout
1590 \begin_layout Subsubsection
1591 unload-collection
1592 \end_layout
1594 \begin_layout Standard
1595 Unload collection.
1596 \end_layout
1598 \begin_layout Subsubsection
1599 +tangent
1600 \end_layout
1602 \begin_layout Standard
1603 Tangent for recording voice for commentary track.
1604  While pressed, record a stream.
1605 \end_layout
1607 \begin_layout Subsection
1608 SDL Platform commands 
1609 \end_layout
1611 \begin_layout Standard
1612 The following are valid on SDL platform.
1613 \end_layout
1615 \begin_layout Subsubsection
1616 identify-key
1617 \end_layout
1619 \begin_layout Standard
1620 Asks to press a key and then identifies that (pseudo-)key.
1621 \end_layout
1623 \begin_layout Subsubsection
1624 toggle-console 
1625 \end_layout
1627 \begin_layout Standard
1628 Toggle between windowed/fullscreen console.
1629 \end_layout
1631 \begin_layout Subsubsection
1632 scroll-fullup 
1633 \end_layout
1635 \begin_layout Standard
1636 Scroll messages window as far back as it goes.
1637 \end_layout
1639 \begin_layout Subsubsection
1640 scroll-fulldown 
1641 \end_layout
1643 \begin_layout Standard
1644 Scroll messages window as far forward as it goes.
1645 \end_layout
1647 \begin_layout Subsubsection
1648 scroll-up 
1649 \end_layout
1651 \begin_layout Standard
1652 Scroll messages window back one screenful.
1653 \end_layout
1655 \begin_layout Subsubsection
1656 scroll-down 
1657 \end_layout
1659 \begin_layout Standard
1660 Scroll messages window forward one screenful.
1661 \end_layout
1663 \begin_layout Subsubsection
1664 prompt-command <command>
1665 \end_layout
1667 \begin_layout Standard
1668 Enter command prompt, with prompt prepopulated with specified command.
1669 \end_layout
1671 \begin_layout Section
1672 Settings
1673 \end_layout
1675 \begin_layout Subsection
1676 Core settings
1677 \end_layout
1679 \begin_layout Subsubsection
1680 firmwarepath
1681 \end_layout
1683 \begin_layout Standard
1684 Set where bsnes looks for firmware files.
1685  Default is 
1686 \begin_inset Quotes eld
1687 \end_inset
1690 \begin_inset Quotes erd
1691 \end_inset
1694 \end_layout
1696 \begin_layout Subsubsection
1697 target
1698 \end_layout
1700 \begin_layout Standard
1701 Set the target .
1702  Numeric, range is 0.001 to 
1703 \begin_inset Quotes eld
1704 \end_inset
1706 infinite
1707 \begin_inset Quotes erd
1708 \end_inset
1711  Default is native framerate.
1712 \end_layout
1714 \begin_layout Subsubsection
1715 savecompression
1716 \end_layout
1718 \begin_layout Standard
1719 Set save compression level (integer 0-9).
1720  Default is 7 (0 is no compression).
1721 \end_layout
1723 \begin_layout Subsubsection
1724 advance-timeout
1725 \end_layout
1727 \begin_layout Standard
1728 Set the frame advance timeout in milliseconds.
1729  Numeric integer, range is 0-999999999.
1730  Default is 500.
1731 \end_layout
1733 \begin_layout Subsubsection
1734 allow-inconsistent-saves (bsnes only)
1735 \end_layout
1737 \begin_layout Standard
1738 If true, save without synchronization.
1739  Makes games seriously unstable.
1740 \end_layout
1742 \begin_layout Subsubsection
1743 save-every-frame (bsnes only)
1744 \end_layout
1746 \begin_layout Standard
1747 If true, simulate saving on each frame.
1748  Trades off emulation accuracy for sync stability.
1749  Also needed if the movie assumes saving on each frame for rewind.
1750 \end_layout
1752 \begin_layout Subsection
1753 AVI dumper settings
1754 \end_layout
1756 \begin_layout Subsubsection
1757 avi-large
1758 \end_layout
1760 \begin_layout Standard
1761 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1762  outputs.
1763 \end_layout
1765 \begin_layout Subsubsection
1766 avi-left-border
1767 \end_layout
1769 \begin_layout Standard
1770 AVI dumper: Set the default left border thickness (unless lua overrides)
1771  for dumps.
1772  Range 0-8191.
1773  Default is 0.
1774 \end_layout
1776 \begin_layout Subsubsection
1777 avi-right-border
1778 \end_layout
1780 \begin_layout Standard
1781 AVI dumper: Set the default right border thickness (unless lua overrides)
1782  for dumps.
1783  Range 0-8191.
1784  Default is 0.
1785 \end_layout
1787 \begin_layout Subsubsection
1788 avi-top-border
1789 \end_layout
1791 \begin_layout Standard
1792 AVI dumper: Set the default top border thickness (unless lua overrides)
1793  for dumps.
1794  Range 0-8191.
1795  Default is 0.
1796 \end_layout
1798 \begin_layout Subsubsection
1799 avi-bottom-border
1800 \end_layout
1802 \begin_layout Standard
1803 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1804  for dumps.
1805  Range 0-8191.
1806  Default is 0.
1807 \end_layout
1809 \begin_layout Subsubsection
1810 avi-maxframes
1811 \end_layout
1813 \begin_layout Standard
1814 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1815  Range 0-999999999.
1816  Default is 0.
1817 \end_layout
1819 \begin_layout Subsubsection
1820 avi-compresison
1821 \end_layout
1823 \begin_layout Standard
1824 AVI dumper: Compression level (0-18).
1825 \end_layout
1827 \begin_layout Itemize
1828 Compression levels 10 and above are not compatible with stock CSCD codec.
1829 \end_layout
1831 \begin_layout Itemize
1832 Recomended level is 7.
1833 \end_layout
1835 \begin_layout Subsubsection
1836 avi-soundrate
1837 \end_layout
1839 \begin_layout Standard
1840 AVI dumper: Set method of determining the sound rate.
1841 \end_layout
1843 \begin_layout Itemize
1844 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1845  128, 176.4 and 192 kHz.
1846 \end_layout
1848 \begin_layout Itemize
1849 1: Round down to nearest integer.
1850 \end_layout
1852 \begin_layout Itemize
1853 2: Round up to nearest ingeter.
1854 \end_layout
1856 \begin_layout Subsection
1857 JMD options
1858 \end_layout
1860 \begin_layout Subsubsection
1861 jmd-copression
1862 \end_layout
1864 \begin_layout Standard
1865 JMD dumper: Compression level (0-9).
1866 \end_layout
1868 \begin_layout Subsection
1869 SDL platform settings
1870 \end_layout
1872 \begin_layout Subsubsection
1873 autorepeat-first-delay
1874 \end_layout
1876 \begin_layout Standard
1877 Sets the delay for first character in typematic autorepeat.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 autorepeat-subsequent-delay
1882 \end_layout
1884 \begin_layout Standard
1885 Sets the delay for subsequent characters in typematic autorepeat.
1886 \end_layout
1888 \begin_layout Section
1889 Lua functions
1890 \end_layout
1892 \begin_layout Subsection
1893 Core (in main table)
1894 \end_layout
1896 \begin_layout Subsubsection
1897 print
1898 \end_layout
1900 \begin_layout Standard
1901 Print line to message console.
1902 \end_layout
1904 \begin_layout Subsubsection
1905 exec(string command)
1906 \end_layout
1908 \begin_layout Standard
1909 Run command as it was entered on the command line
1910 \end_layout
1912 \begin_layout Subsubsection
1913 utime()
1914 \end_layout
1916 \begin_layout Standard
1917 Returns two values.
1918  First is time since some epoch in seconds, the second is microseconds mod
1919  10^6 since that epoch.
1920 \end_layout
1922 \begin_layout Subsubsection
1923 emulator_ready()
1924 \end_layout
1926 \begin_layout Standard
1927 Returns true if emulator has finished booting, false if not (on_startup()
1928  will be issued later).
1929 \end_layout
1931 \begin_layout Subsubsection
1932 set_idle_timeout(number timeout)
1933 \end_layout
1935 \begin_layout Standard
1936 Set number of microseconds to block idle for.
1937  After this timeout has expired, on_idle() will be called once.
1938 \end_layout
1940 \begin_layout Subsubsection
1941 set_timer_timeout(number timeout)
1942 \end_layout
1944 \begin_layout Standard
1945 Set number of microseconds to block timer for.
1946  After this timeout has expired, on_timer() will be called once.
1947 \end_layout
1949 \begin_layout Subsubsection
1950 bus_address(number snesaddr)
1951 \end_layout
1953 \begin_layout Standard
1954 Returns virtual address corresponding to specified address on SNES bus.
1955 \end_layout
1957 \begin_layout Subsubsection
1958 loopwrapper(function fun, ...)
1959 \end_layout
1961 \begin_layout Standard
1962 Calls function fun with function and specified arguments.
1963  The function passed suspends execution until the function returned is called.
1964  Handy for linear flow control among multiple invocations of a hook.
1965  Example code:
1966 \end_layout
1968 \begin_layout LyX-Code
1969 on_paint = loopwrapper(function(wait)
1970 \end_layout
1972 \begin_deeper
1973 \begin_layout LyX-Code
1974 while true do
1975 \end_layout
1977 \begin_deeper
1978 \begin_layout LyX-Code
1979 gui.text(0, 0, 
1980 \begin_inset Quotes eld
1981 \end_inset
1983 Test!
1984 \begin_inset Quotes erd
1985 \end_inset
1988 \end_layout
1990 \begin_layout LyX-Code
1991 wait();
1992 \end_layout
1994 \end_deeper
1995 \begin_layout LyX-Code
1997 \end_layout
1999 \end_deeper
2000 \begin_layout LyX-Code
2001 end);
2002 \end_layout
2004 \begin_layout Subsection
2005 Table bit:
2006 \end_layout
2008 \begin_layout Standard
2009 Bitwise logical functions and related.
2010 \end_layout
2012 \begin_layout Subsubsection
2013 bit.none(number...) / bit.bnot(number...)
2014 \end_layout
2016 \begin_layout Standard
2017 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2018  arguments).
2019 \end_layout
2021 \begin_layout Subsubsection
2022 bit.any(number...) / bit.bor(number...)
2023 \end_layout
2025 \begin_layout Standard
2026 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2027 \end_layout
2029 \begin_layout Subsubsection
2030 bit.all(number...) / bit.band(number...)
2031 \end_layout
2033 \begin_layout Standard
2034 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2036 \end_layout
2038 \begin_layout Subsubsection
2039 bit.parity(number...) / bit.bxor(number...)
2040 \end_layout
2042 \begin_layout Standard
2043 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2044  of the arguments).
2045 \end_layout
2047 \begin_layout Subsubsection
2048 bit.lrotate(number base[, number amount[, number bits]])
2049 \end_layout
2051 \begin_layout Standard
2052 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2053 \end_layout
2055 \begin_layout Subsubsection
2056 bit.rrotate(number base[, number amount[, number bits]])
2057 \end_layout
2059 \begin_layout Standard
2060 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2061  places.
2062 \end_layout
2064 \begin_layout Subsubsection
2065 bit.lshift(number base[, number amount[, number bits]])
2066 \end_layout
2068 \begin_layout Standard
2069 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2070  The new bits are filled with zeroes.
2071 \end_layout
2073 \begin_layout Subsubsection
2074 bit.lrshift(number base[, number amount[, number bits]])
2075 \end_layout
2077 \begin_layout Standard
2078 Shift bits-bit (max 48, default 48) number logically right by amount (default
2079  1) places.
2080  The new bits are filled with zeroes.
2081 \end_layout
2083 \begin_layout Subsubsection
2084 bit.arshift(number base[, number amount[, number bits]])
2085 \end_layout
2087 \begin_layout Standard
2088 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2089  (default 1) places.
2090  The new bits are shifted in with copy of the high bit.
2091 \end_layout
2093 \begin_layout Subsubsection
2094 bit.extract(number base[, number bit0[, number bit1,...]])
2095 \end_layout
2097 \begin_layout Standard
2098 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2099 \end_layout
2101 \begin_layout Standard
2102 Notes: 
2103 \end_layout
2105 \begin_layout Itemize
2106 Bit numbers up to 51 should work reliably (then things start falling apart
2107  due to double precision issues).
2108 \end_layout
2110 \begin_layout Itemize
2111 There are two special bit positions, true and false, standing for always
2112  set bit and always clear bit.
2113 \end_layout
2115 \begin_layout Subsubsection
2116 bit.value([number bit1[, number bit2,...]])
2117 \end_layout
2119 \begin_layout Standard
2120 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2121  places and so on.
2122  As special value, nil argument is no-op.
2123 \end_layout
2125 \begin_layout Subsubsection
2126 bit.test_any(number a, number b)
2127 \end_layout
2129 \begin_layout Standard
2130 Is there a common set bit in a and b?
2131 \end_layout
2133 \begin_layout Subsubsection
2134 bit.test_all(number a, number b)
2135 \end_layout
2137 \begin_layout Standard
2138 Are all set bits in b also set in a?
2139 \end_layout
2141 \begin_layout Subsubsection
2142 bit.popcount(number a)
2143 \end_layout
2145 \begin_layout Standard
2146 Population count of a.
2147 \end_layout
2149 \begin_layout Subsubsection
2150 bit.clshift(number a, number b, [number amount,[number bits]])
2151 \end_layout
2153 \begin_layout Standard
2154 Does chained left shift on a, b by amount positions, assuming numbers to
2155  be of specified number of bits.
2156 \end_layout
2158 \begin_layout Subsubsection
2159 bit.crshift(number a, number b, [number amount,[number bits]])
2160 \end_layout
2162 \begin_layout Standard
2163 Does chained right shift on a, b by amount positions, assuming numbers to
2164  be of specified number of bits.
2165 \end_layout
2167 \begin_layout Subsubsection
2168 bit.flagdecode(number a, number bits, [string on, [string off]])
2169 \end_layout
2171 \begin_layout Standard
2172 Return string of length bits where ith character is ith character of on
2173  if bit i is on, otherwise ith character of off.
2174  Out of range reads give last character, or '*'/'-' if empty.
2175 \end_layout
2177 \begin_layout Subsubsection
2178 bit.rflagdecode(number a, number bits, [string on, [string off]])
2179 \end_layout
2181 \begin_layout Standard
2182 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2183 nt bit first).
2184 \end_layout
2186 \begin_layout Subsection
2187 Table gui:
2188 \end_layout
2190 \begin_layout Standard
2191 Most of these functions can only be called in on_paint and on_video callbacks.
2192  Exceptions are noted.
2193 \end_layout
2195 \begin_layout Standard
2196 Colors are 32-bit.
2197  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2198  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2199  opaque, 255 is almost transparent).
2200  -1 is the fully transparent color.
2201  Alpha values greater than 127 do work.
2202 \end_layout
2204 \begin_layout Standard
2205 Origin of coordinates is at top left corner of game display area.
2206  Left and top gaps correspond to negative coordinates.
2207 \end_layout
2209 \begin_layout Subsubsection
2210 gui.resolution()
2211 \end_layout
2213 \begin_layout Standard
2214 Returns 2-tuple (hresolution, vresolution).
2215 \end_layout
2217 \begin_layout Subsubsection
2218 gui.<class>_gap(number gap)
2219 \end_layout
2221 \begin_layout Standard
2222 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2223  is 8191).
2224 \end_layout
2226 \begin_layout Subsubsection
2227 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2228 \end_layout
2230 \begin_layout Standard
2231 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2232  16 high).
2233  Parameters:
2234 \end_layout
2236 \begin_layout Itemize
2237 x: X-coordinate to start the drawing from (and x-coordinate at begining
2238  of the lines).
2239 \end_layout
2241 \begin_layout Itemize
2242 y: Y-coordinate to start the drawing from.
2243 \end_layout
2245 \begin_layout Itemize
2246 text: The text to draw.
2247 \end_layout
2249 \begin_layout Itemize
2250 fgc: Text color (default is 0xFFFFFF (white))
2251 \end_layout
2253 \begin_layout Itemize
2254 bgc: Background color (default is -1 (transparent))
2255 \end_layout
2257 \begin_layout Subsubsection
2258 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2259 \end_layout
2261 \begin_layout Standard
2262 Like gui.text, but draw using double-width.
2263 \end_layout
2265 \begin_layout Subsubsection
2266 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2267 \end_layout
2269 \begin_layout Standard
2270 Like gui.text, but draw using double-height.
2271 \end_layout
2273 \begin_layout Subsubsection
2274 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2275 \end_layout
2277 \begin_layout Standard
2278 Like gui.text, but draw using double-width/double-height.
2279 \end_layout
2281 \begin_layout Subsubsection
2282 gui.rectangle(number x, number y, number width, number height[, number thickness[
2283 , number outline[, number fill]]])
2284 \end_layout
2286 \begin_layout Standard
2287 Draw rectangle on the GUI.
2288  Parameters:
2289 \end_layout
2291 \begin_layout Itemize
2292 x: X-coordinate of left edge.
2293 \end_layout
2295 \begin_layout Itemize
2296 y: Y-coordinate of upper edge.
2297 \end_layout
2299 \begin_layout Itemize
2300 width: Width of rectangle.
2301 \end_layout
2303 \begin_layout Itemize
2304 height: Height of rectangle.
2305 \end_layout
2307 \begin_layout Itemize
2308 thickness: Thickness of outline (default is 1).
2309 \end_layout
2311 \begin_layout Itemize
2312 outline: Color of outline (default is 0xFFFFFF (white))
2313 \end_layout
2315 \begin_layout Itemize
2316 fill: Color of fill (default is -1 (transparent))
2317 \end_layout
2319 \begin_layout Subsubsection
2320 gui.box(number x, number y, number width, number height[, number thickness[,
2321  number outline1[,number outline2[, number fill]]]])
2322 \end_layout
2324 \begin_layout Standard
2325 Draw rectangle with 3D effect on the GUI.
2326  Parameters:
2327 \end_layout
2329 \begin_layout Itemize
2330 x: X-coordinate of left edge.
2331 \end_layout
2333 \begin_layout Itemize
2334 y: Y-coordinate of upper edge.
2335 \end_layout
2337 \begin_layout Itemize
2338 width: Width of rectangle.
2339 \end_layout
2341 \begin_layout Itemize
2342 height: Height of rectangle.
2343 \end_layout
2345 \begin_layout Itemize
2346 thickness: Thickness of outline (default is 1).
2347 \end_layout
2349 \begin_layout Itemize
2350 outline1: First color of outline (default is 0xFFFFFF (white))
2351 \end_layout
2353 \begin_layout Itemize
2354 outline2: First color of outline (default is 0x808080 (dark gray))
2355 \end_layout
2357 \begin_layout Itemize
2358 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2359 \end_layout
2361 \begin_layout Subsubsection
2362 gui.pixel(number x, number y[, number color])
2363 \end_layout
2365 \begin_layout Standard
2366 Draw one pixel on the GUI.
2367  Parameters:
2368 \end_layout
2370 \begin_layout Itemize
2371 x: X-coordinate of the pixel
2372 \end_layout
2374 \begin_layout Itemize
2375 y: Y-coordinate of the pixel
2376 \end_layout
2378 \begin_layout Itemize
2379 color: Color of the pixel (default is 0xFFFFFF (white))
2380 \end_layout
2382 \begin_layout Subsubsection
2383 gui.crosshair(number x, number y[, number length[, number color]])
2384 \end_layout
2386 \begin_layout Standard
2387 Draw a crosshair.
2388  Parameters:
2389 \end_layout
2391 \begin_layout Itemize
2392 x: X-coordinate of the crosshair
2393 \end_layout
2395 \begin_layout Itemize
2396 y: Y-coordinate of the crosshair
2397 \end_layout
2399 \begin_layout Itemize
2400 length: Length of the crosshair lines (default 10).
2401 \end_layout
2403 \begin_layout Itemize
2404 color: Color of the crosshair (default is 0xFFFFFF (white))
2405 \end_layout
2407 \begin_layout Subsubsection
2408 gui.line(number x1, number y1, number x2, number y2[, number color])
2409 \end_layout
2411 \begin_layout Standard
2412 Draw a thin line.
2413  Parameters:
2414 \end_layout
2416 \begin_layout Itemize
2417 x1: X-coordinate of one end.
2418 \end_layout
2420 \begin_layout Itemize
2421 y1: Y-coordinate of one end.
2422 \end_layout
2424 \begin_layout Itemize
2425 x2: X-coordinate of the other end.
2426 \end_layout
2428 \begin_layout Itemize
2429 y2: Y-coordinate of the other end.
2430 \end_layout
2432 \begin_layout Itemize
2433 color: Color of the line (default is 0xFFFFFF (white)).
2434 \end_layout
2436 \begin_layout Subsubsection
2437 gui.circle(number x, number y, number r[, number thick[, number border[,
2438  number fil]]])
2439 \end_layout
2441 \begin_layout Standard
2442 Draw a circle.
2443  Parameters.
2444 \end_layout
2446 \begin_layout Itemize
2447 x: X-coordinate of the center
2448 \end_layout
2450 \begin_layout Itemize
2451 y: Y-coordinate of the center
2452 \end_layout
2454 \begin_layout Itemize
2455 r: The radius of the circle
2456 \end_layout
2458 \begin_layout Itemize
2459 thick: Border thickness
2460 \end_layout
2462 \begin_layout Itemize
2463 border: Border color (default is 0xFFFFFF (white))
2464 \end_layout
2466 \begin_layout Itemize
2467 fill: Fill color (default is -1 (transparent)).
2468 \end_layout
2470 \begin_layout Subsubsection
2471 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2472 \end_layout
2474 \begin_layout Standard
2475 Draw a bitmap on screen with specified palette.
2476  Parameters:
2477 \end_layout
2479 \begin_layout Itemize
2480 x: X-coordinate of left edge.
2481 \end_layout
2483 \begin_layout Itemize
2484 y: Y-coordinate of top edge.
2485 \end_layout
2487 \begin_layout Itemize
2488 bitmap: The bitmap to draw
2489 \end_layout
2491 \begin_layout Itemize
2492 palette: The palette to draw the bitmap using.
2493 \end_layout
2495 \begin_layout Subsubsection
2496 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2497 \end_layout
2499 \begin_layout Standard
2500 Draw a bitmap on screen.
2501  Parameters:
2502 \end_layout
2504 \begin_layout Itemize
2505 x: X-coordinate of left edge.
2506 \end_layout
2508 \begin_layout Itemize
2509 y: Y-coordinate of top edge.
2510 \end_layout
2512 \begin_layout Itemize
2513 bitmap: The bitmap to draw
2514 \end_layout
2516 \begin_layout Subsubsection
2517 gui.palette_new()
2518 \end_layout
2520 \begin_layout Standard
2521 Returns a new palette (initially all transparent).
2522  Can be used anywhere.
2523 \end_layout
2525 \begin_layout Subsubsection
2526 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2527 \end_layout
2529 \begin_layout Standard
2530 Returns a new bitmap/dbitmap.
2531  Can be used anywhere.
2532  Parameters:
2533 \end_layout
2535 \begin_layout Itemize
2536 w: The width of new bitmap
2537 \end_layout
2539 \begin_layout Itemize
2540 h: The height of new bitmap
2541 \end_layout
2543 \begin_layout Itemize
2544 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2545 \end_layout
2547 \begin_layout Itemize
2548 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2549 \end_layout
2551 \begin_layout Subsubsection
2552 gui.bitmap_load(string file)
2553 \end_layout
2555 \begin_layout Standard
2556 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2557  for bitmap).
2558  Can be used anywhere.
2559  Parameters:
2560 \end_layout
2562 \begin_layout Itemize
2563 file: The name of file to load.
2564 \end_layout
2566 \begin_layout Subsubsection
2567 gui.palette_set(palette palette, number index, number color)
2568 \end_layout
2570 \begin_layout Standard
2571 Sets color in palette.
2572  Can be used anywhere.
2573  Parameters:
2574 \end_layout
2576 \begin_layout Itemize
2577 palette: The palette to manipulate
2578 \end_layout
2580 \begin_layout Itemize
2581 index: Index of color (0-65535).
2582 \end_layout
2584 \begin_layout Itemize
2585 color: The color value.
2586 \end_layout
2588 \begin_layout Subsubsection
2589 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2590 \end_layout
2592 \begin_layout Standard
2593 Sets specified pixel in bitmap.
2594  Can be used anywhere.
2595  Parameters:
2596 \end_layout
2598 \begin_layout Itemize
2599 bitmap: The bitmap to manipulate
2600 \end_layout
2602 \begin_layout Itemize
2603 x: The x-coordinate of the pixel.
2604 \end_layout
2606 \begin_layout Itemize
2607 y: The y-coordinate of the pixel.
2608 \end_layout
2610 \begin_layout Itemize
2611 color: If bitmap is a bitmap, color index (0-65535).
2612  Otherwise color value.
2613 \end_layout
2615 \begin_layout Subsubsection
2616 gui.bitmap_size(bitmap/dbitmap bitmap)
2617 \end_layout
2619 \begin_layout Standard
2620 Get size of bitmap.
2621  Can be used anywhere.
2622  Parameters:
2623 \end_layout
2625 \begin_layout Itemize
2626 bitmap: The bitmap to query.
2627 \end_layout
2629 \begin_layout Standard
2630 The first return is the width, the second is the height.
2631 \end_layout
2633 \begin_layout Subsubsection
2634 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2635  src, number sx, number sy, number w, number h[, number ck])
2636 \end_layout
2638 \begin_layout Standard
2639 Blit a part of bitmap to another.
2640  Can be used anywhere.
2641  Parameters:
2642 \end_layout
2644 \begin_layout Itemize
2645 dest: Destination to blit to.
2646 \end_layout
2648 \begin_layout Itemize
2649 dx: left edge of target
2650 \end_layout
2652 \begin_layout Itemize
2653 dy: Top edge of target
2654 \end_layout
2656 \begin_layout Itemize
2657 src: The source to blit from.
2658  Must be of the same type as destination.
2659 \end_layout
2661 \begin_layout Itemize
2662 sx: left edge of source
2663 \end_layout
2665 \begin_layout Itemize
2666 sy: Top edge of source
2667 \end_layout
2669 \begin_layout Itemize
2670 w: Width of region
2671 \end_layout
2673 \begin_layout Itemize
2674 h: Height of region.
2675 \end_layout
2677 \begin_layout Itemize
2678 ck: Color key.
2679  Pixels of this color are not blitted.
2680 \end_layout
2682 \begin_deeper
2683 \begin_layout Itemize
2684 If bitmaps are bitmaps, this is color index of colorkey.
2685  Values outside range 0-65535 cause no key to be used as colorkey.
2686 \end_layout
2688 \begin_layout Itemize
2689 If bitmaps are dbitmaps, this color value of colorkey.
2690 \end_layout
2692 \begin_layout Itemize
2693 May be absent or nil for no colorkey blit.
2694 \end_layout
2696 \end_deeper
2697 \begin_layout Subsubsection
2698 gui.repaint()
2699 \end_layout
2701 \begin_layout Standard
2702 Request on_repaint() to happen as soon as possible.
2703  Can be used anywhere.
2704 \end_layout
2706 \begin_layout Subsubsection
2707 gui.subframe_update(boolean on)
2708 \end_layout
2710 \begin_layout Standard
2711 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2712  or not happen (on=false).
2713  Can be used anywhere.
2714 \end_layout
2716 \begin_layout Subsubsection
2717 gui.screenshot(string filename)
2718 \end_layout
2720 \begin_layout Standard
2721 Write PNG screenshot of the current frame (no drawings) to specified file.
2722  Can be used anywhere.
2723 \end_layout
2725 \begin_layout Subsubsection
2726 gui.color(number r, number g, number b[, number a])
2727 \end_layout
2729 \begin_layout Standard
2730 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2731  each component in scale 0-255.
2732  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2733  opaque).
2734  The default alpha is 256.
2735 \end_layout
2737 \begin_layout Subsubsection
2738 gui.status(string name, string value)
2739 \end_layout
2741 \begin_layout Standard
2742 Set status field 
2743 \begin_inset Quotes eld
2744 \end_inset
2746 L[<name>]
2747 \begin_inset Quotes erd
2748 \end_inset
2750  to <value> in status area.
2751  Can be used anywhere.
2752 \end_layout
2754 \begin_layout Subsubsection
2755 gui.rainbow(number step, number steps[, number color])
2756 \end_layout
2758 \begin_layout Standard
2759 Perform hue rotation of color <color> (default bright red), by <step> steps.
2760  The number of steps per full rotation is given by absolute value of <steps>.
2761 \end_layout
2763 \begin_layout Standard
2764 If <steps> is negative, the rotation will be counterclockwise.
2765 \end_layout
2767 \begin_layout Subsubsection
2768 gui.screenshot(string filename)
2769 \end_layout
2771 \begin_layout Standard
2772 Saves a screenshot into specified file.
2773 \end_layout
2775 \begin_layout Subsection
2776 table input
2777 \end_layout
2779 \begin_layout Standard
2780 Input handling.
2781  Only available in on_input callback.
2782 \end_layout
2784 \begin_layout Subsubsection
2785 input.get(number controller, number index)
2786 \end_layout
2788 \begin_layout Standard
2789 Read the specified index (0-11) from specified controller (0-7).
2790  Notes:
2791 \end_layout
2793 \begin_layout Itemize
2794 Uses physical controller numbering.
2795  Gamepad in port 2 is controller 4, not 1!
2796 \end_layout
2798 \begin_layout Subsubsection
2799 input.set(number controller, number index, number value)
2800 \end_layout
2802 \begin_layout Standard
2803 Write the specified index (0-11) from specified controller (0-7), storing
2804  value.
2805  Notes:
2806 \end_layout
2808 \begin_layout Itemize
2809 Uses physical controller numbering.
2810  Gamepad in port 2 is controller 4, not 1!
2811 \end_layout
2813 \begin_layout Subsubsection
2814 input.geta(number controller)
2815 \end_layout
2817 \begin_layout Standard
2818 Get input state for entiere controller.
2819  Returns 13 return values.
2820 \end_layout
2822 \begin_layout Itemize
2823 1st return value: Bitmask: bit i is set if i:th index is nonzero
2824 \end_layout
2826 \begin_layout Itemize
2827 2nd-13th return value: value of i:th index.
2828 \end_layout
2830 \begin_layout Subsubsection
2831 input.seta(number controller, number bitmask, number args...)
2832 \end_layout
2834 \begin_layout Standard
2835 Set state for entiere controller.
2836  args is up to 12 values for indices (overriding values in bitmask if specified).
2837 \end_layout
2839 \begin_layout Subsubsection
2840 input.controllertype(number controller)
2841 \end_layout
2843 \begin_layout Standard
2844 Get the type of controller as string.
2845  Valid values are:
2846 \end_layout
2848 \begin_layout Itemize
2849 gamepad
2850 \end_layout
2852 \begin_layout Itemize
2853 mouse
2854 \end_layout
2856 \begin_layout Itemize
2857 justifier
2858 \end_layout
2860 \begin_layout Itemize
2861 superscope
2862 \end_layout
2864 \begin_layout Subsubsection
2865 input.reset([number cycles])
2866 \end_layout
2868 \begin_layout Standard
2869 Execute reset.
2870  If cycles is greater than zero, do delayed reset.
2871  0 (or no value) causes immediate reset.
2872 \end_layout
2874 \begin_layout Itemize
2875 Only available with subframe flag false.
2876 \end_layout
2878 \begin_layout Subsubsection
2879 input.raw()
2880 \end_layout
2882 \begin_layout Standard
2883 Returns table of tables of all available keys and axes.
2884  The first table is indexed by key name (platform-dependent!), and the inner
2885  table has the following fields:
2886 \end_layout
2888 \begin_layout Itemize
2889 last_rawval: Last reported raw value for control.
2890 \end_layout
2892 \begin_layout Itemize
2893 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2894  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2895 \end_layout
2897 \begin_layout Itemize
2898 cal_left: Minimum calibration value.
2899  Only meaningful with axis and pressure types.
2900 \end_layout
2902 \begin_layout Itemize
2903 cal_center: Center calibration value.
2904  Only meaningful with axis and pressure types.
2905 \end_layout
2907 \begin_layout Itemize
2908 cal_right: Maximum calibration value.
2909  Only meaningful with axis and pressure types.
2910 \end_layout
2912 \begin_layout Itemize
2913 cal_tolerance: Dead zone tolerance.
2914  Only meaningful with axis and pressure types.
2915 \end_layout
2917 \begin_layout Subsubsection
2918 input.keyhook(string key, boolean state)
2919 \end_layout
2921 \begin_layout Standard
2922 Requests that keyhook events to be sent for key (state=true) or not sent
2923  (state=false).
2924 \end_layout
2926 \begin_layout Subsubsection
2927 input.joyget(number controller)
2928 \end_layout
2930 \begin_layout Standard
2931 Returns table for current controls for specified controller.
2932  The names of fields vary by controller type.
2933 \end_layout
2935 \begin_layout Itemize
2936 The buttons have the same name as those are referred to in other contexts
2937  in the emulator
2938 \end_layout
2940 \begin_layout Itemize
2941 The analog axes are 
2942 \begin_inset Quotes eld
2943 \end_inset
2945 xaxis
2946 \begin_inset Quotes erd
2947 \end_inset
2949  and 
2950 \begin_inset Quotes eld
2951 \end_inset
2953 yaxis
2954 \begin_inset Quotes erd
2955 \end_inset
2958 \end_layout
2960 \begin_layout Subsubsection
2961 input.joyset(number controller, table controls)
2962 \end_layout
2964 \begin_layout Standard
2965 Set the the state of specified controller to values specified in specified
2966  table.
2967 \end_layout
2969 \begin_layout Subsubsection
2970 input.lcid_to_pcid(number controller)
2971 \end_layout
2973 \begin_layout Standard
2974 Return the physical index, physical port and controller number in port for
2975  specified (1-based) logical controller.
2976 \end_layout
2978 \begin_layout Subsection
2979 Table subtitle
2980 \end_layout
2982 \begin_layout Standard
2983 Subtitle handling
2984 \end_layout
2986 \begin_layout Subsubsection
2987 subtitle.byindex(number i)
2988 \end_layout
2990 \begin_layout Standard
2991 Read the frame and length of ith subtitle.
2992  Returns nothing if not present.
2993 \end_layout
2995 \begin_layout Subsubsection
2996 subtitle.set(number f, number l, string txt)
2997 \end_layout
2999 \begin_layout Standard
3000 Set the text of subtitle.
3001 \end_layout
3003 \begin_layout Subsubsection
3004 subtitle.get(number f, number l)
3005 \end_layout
3007 \begin_layout Standard
3008 Get the text of subtitle.
3009 \end_layout
3011 \begin_layout Subsubsection
3012 subtitle.delete(number f, number l)
3013 \end_layout
3015 \begin_layout Standard
3016 Delete specified subtitle.
3017 \end_layout
3019 \begin_layout Subsection
3020 Table hostmemory
3021 \end_layout
3023 \begin_layout Standard
3024 Host memory handling (extra memory saved to savestates).
3025  Host memory starts empty.
3026 \end_layout
3028 \begin_layout Subsubsection
3029 hostmemory.read(number address)
3030 \end_layout
3032 \begin_layout Standard
3033 Reads hostmemory slot address.
3034  Slot numbers out of range return false instead of numeric.
3035 \end_layout
3037 \begin_layout Subsubsection
3038 hostmemory.write(number address, number value)
3039 \end_layout
3041 \begin_layout Standard
3042 Writes hostmemory slot with 0-255.
3043  Slot numbers out of range cause extension of host memory slot space.
3044 \end_layout
3046 \begin_layout Subsubsection
3047 hostmemory.readbyte(number address)
3048 \end_layout
3050 \begin_layout Standard
3051 Read unsigned byte (1 element) from given address.
3052  Slots out of range return false.
3053 \end_layout
3055 \begin_layout Subsubsection
3056 hostmemory.writebyte(number address, number value)
3057 \end_layout
3059 \begin_layout Standard
3060 Write unsigned byte (1 element) to given slot.
3061  Slot numbers out of range cause extension.
3062 \end_layout
3064 \begin_layout Subsubsection
3065 hostmemory.readsbyte(number address)
3066 \end_layout
3068 \begin_layout Standard
3069 Read signed byte (1 element) from given address.
3070  Slots out of range return false.
3071 \end_layout
3073 \begin_layout Subsubsection
3074 hostmemory.writesbyte(number address, number value)
3075 \end_layout
3077 \begin_layout Standard
3078 Write signed byte (1 element) to given slot.
3079  Slot numbers out of range cause extension.
3080 \end_layout
3082 \begin_layout Subsubsection
3083 hostmemory.readword(number address)
3084 \end_layout
3086 \begin_layout Standard
3087 Read unsigned word (2 elements) from given address.
3088  Slots out of range return false.
3089 \end_layout
3091 \begin_layout Subsubsection
3092 hostmemory.writeword(number address, number value)
3093 \end_layout
3095 \begin_layout Standard
3096 Write unsigned word (2 elements) to given slot.
3097  Slot numbers out of range cause extension.
3098 \end_layout
3100 \begin_layout Subsubsection
3101 hostmemory.readsword(number address)
3102 \end_layout
3104 \begin_layout Standard
3105 Read signed word (2 elements) from given address.
3106  Slots out of range return false.
3107 \end_layout
3109 \begin_layout Subsubsection
3110 hostmemory.writesword(number address, number value)
3111 \end_layout
3113 \begin_layout Standard
3114 Write signed word (2 elements) to given slot.
3115  Slot numbers out of range cause extension.
3116 \end_layout
3118 \begin_layout Subsubsection
3119 hostmemory.readdword(number address)
3120 \end_layout
3122 \begin_layout Standard
3123 Read unsigned doubleword (4 elements) from given address.
3124  Slots out of range return false.
3125 \end_layout
3127 \begin_layout Subsubsection
3128 hostmemory.writedword(number address, number value)
3129 \end_layout
3131 \begin_layout Standard
3132 Write unsigned doubleword (4 elements) to given slot.
3133  Slot numbers out of range cause extension.
3134 \end_layout
3136 \begin_layout Subsubsection
3137 hostmemory.readsdword(number address)
3138 \end_layout
3140 \begin_layout Standard
3141 Read signed doubleword (4 elements) from given address.
3142  Slots out of range return false.
3143 \end_layout
3145 \begin_layout Subsubsection
3146 hostmemory.writesdword(number address, number value)
3147 \end_layout
3149 \begin_layout Standard
3150 Write signed doubleword (4 elements) to given slot.
3151  Slot numbers out of range cause extension.
3152 \end_layout
3154 \begin_layout Subsubsection
3155 hostmemory.readqword(number address)
3156 \end_layout
3158 \begin_layout Standard
3159 Read unsigned quadword (8 elements) from given address.
3160  Slots out of range return false.
3161 \end_layout
3163 \begin_layout Subsubsection
3164 hostmemory.writeqword(number address, number value)
3165 \end_layout
3167 \begin_layout Standard
3168 Write unsigned quadword (4 elements) to given slot.
3169  Slot numbers out of range cause extension.
3170 \end_layout
3172 \begin_layout Subsubsection
3173 hostmemory.readsqword(number address)
3174 \end_layout
3176 \begin_layout Standard
3177 Read signed quadword (8 elements) from given address.
3178  Slots out of range return false.
3179 \end_layout
3181 \begin_layout Subsubsection
3182 hostmemory.writesqword(number address, number value)
3183 \end_layout
3185 \begin_layout Standard
3186 Write signed quadword (8 elements) to given slot.
3187  Slot numbers out of range cause extension.
3188 \end_layout
3190 \begin_layout Subsection
3191 Table movie
3192 \end_layout
3194 \begin_layout Standard
3195 Movie handling
3196 \end_layout
3198 \begin_layout Subsubsection
3199 movie.currentframe()
3200 \end_layout
3202 \begin_layout Standard
3203 Return number of current frame.
3204 \end_layout
3206 \begin_layout Subsubsection
3207 movie.framecount()
3208 \end_layout
3210 \begin_layout Standard
3211 Return number of frames in movie.
3212 \end_layout
3214 \begin_layout Subsubsection
3215 movie.readonly()
3216 \end_layout
3218 \begin_layout Standard
3219 Return true if in readonly mode, false if in readwrite.
3220 \end_layout
3222 \begin_layout Subsubsection
3223 movie.rerecords()
3224 \end_layout
3226 \begin_layout Standard
3227 Returns the current value of rerecord count.
3228 \end_layout
3230 \begin_layout Subsubsection
3231 movie.set_readwrite()
3232 \end_layout
3234 \begin_layout Standard
3235 Set readwrite mode (does not cause on_readwrite callback).
3236 \end_layout
3238 \begin_layout Subsubsection
3239 movie.frame_subframes(number frame)
3240 \end_layout
3242 \begin_layout Standard
3243 Count number of subframes in specified frame (frame numbers are 1-based)
3244  and return that.
3245 \end_layout
3247 \begin_layout Subsubsection
3248 movie.read_subframe(number frame, number subframe)
3249 \end_layout
3251 \begin_layout Standard
3252 Read specifed subframe in specified frame and return data as array (100
3253  elements, numbered 0-99 currently).
3254 \end_layout
3256 \begin_layout Subsubsection
3257 movie.read_rtc()
3258 \end_layout
3260 \begin_layout Standard
3261 Returns the current value of the RTC as a pair (second, subsecond).
3262 \end_layout
3264 \begin_layout Subsubsection
3265 movie.unsafe_rewind([UNSAFEREWIND state])
3266 \end_layout
3268 \begin_layout Standard
3269 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3270 \end_layout
3272 \begin_layout Itemize
3273 If called without argument, causes emulator to start process of setting
3274  unsafe rewind point.
3275  When this has finished, callback on_set_rewind occurs, passing the rewind
3276  state to lua script.
3277 \end_layout
3279 \begin_layout Itemize
3280 If called with argument, causes emulator rewind to passed rewind point as
3281  soon as possible.
3282  Readwrite mode is implicitly activated.
3283 \end_layout
3285 \begin_layout Standard
3286 The following warnings apply to unsafe rewinding:
3287 \end_layout
3289 \begin_layout Itemize
3290 There are no safety checks against misuse (that's what 
3291 \begin_inset Quotes eld
3292 \end_inset
3294 unsafe
3295 \begin_inset Quotes erd
3296 \end_inset
3298  comes from)!
3299 \end_layout
3301 \begin_layout Itemize
3302 Only call rewind from timeline rewind point was set from.
3303 \end_layout
3305 \begin_layout Itemize
3306 Only call rewind from after the rewind point was set.
3307 \end_layout
3309 \begin_layout Subsection
3310 Table settings
3311 \end_layout
3313 \begin_layout Standard
3314 Routines for settings manipulation
3315 \end_layout
3317 \begin_layout Subsubsection
3318 settings.get(string name)
3319 \end_layout
3321 \begin_layout Standard
3322 Get value of setting.
3323  If setting is blank, returns false.
3324  If setting value can't be obtained, returns (nil, error message).
3325 \end_layout
3327 \begin_layout Subsubsection
3328 settings.set(string name, string value)
3329 \end_layout
3331 \begin_layout Standard
3332 Set value of setting.
3333  If setting can't be set, returns (nil, error message).
3334 \end_layout
3336 \begin_layout Subsubsection
3337 settings.is_set(string name)
3338 \end_layout
3340 \begin_layout Standard
3341 Returns if setting is set.
3342  If setting does not exist, returns (nil, error message).
3343 \end_layout
3345 \begin_layout Subsubsection
3346 settings.blank(string name)
3347 \end_layout
3349 \begin_layout Standard
3350 Blanks a setting and returns true.
3351  If setting can't be blanked, returns (nil, error message).
3352 \end_layout
3354 \begin_layout Subsection
3355 Table memory
3356 \end_layout
3358 \begin_layout Standard
3359 Contains various functions for managing memory
3360 \end_layout
3362 \begin_layout Subsubsection
3363 memory.vma_count()
3364 \end_layout
3366 \begin_layout Standard
3367 Returns the number of VMAs
3368 \end_layout
3370 \begin_layout Subsubsection
3371 memory.read_vma(number index)
3372 \end_layout
3374 \begin_layout Standard
3375 Reads the specified VMA (indices start from zero).
3376  Trying to read invalid VMA gives nil.
3377  The read VMA is table with the following fields:
3378 \end_layout
3380 \begin_layout Itemize
3381 region_name (string): The readable name of the VMA
3382 \end_layout
3384 \begin_layout Itemize
3385 baseaddr (number): Base address of the VMA
3386 \end_layout
3388 \begin_layout Itemize
3389 lastaddr (number): Last address in the VMA.
3390 \end_layout
3392 \begin_layout Itemize
3393 size (number): The size of VMA in bytes.
3394 \end_layout
3396 \begin_layout Itemize
3397 readonly (boolean): True of the VMA corresponds to ROM.
3398 \end_layout
3400 \begin_layout Itemize
3401 iospace (boolean): True if the VMA is I/O space.
3402 \end_layout
3404 \begin_layout Itemize
3405 native_endian (boolean): True if the VMA has native endian as opposed to
3406  little endian.
3407 \end_layout
3409 \begin_layout Subsubsection
3410 memory.find_vma(number address)
3411 \end_layout
3413 \begin_layout Standard
3414 Finds the VMA containing specified address.
3415  Returns table in the same format as read_vma or nil if not found.
3416 \end_layout
3418 \begin_layout Subsubsection
3419 memory.readbyte(number address)
3420 \end_layout
3422 \begin_layout Standard
3423 Reads the specified address as unsigned byte and returns the result.
3424 \end_layout
3426 \begin_layout Subsubsection
3427 memory.readsbyte(number address)
3428 \end_layout
3430 \begin_layout Standard
3431 Reads the specified address as signed byte and returns the result.
3432 \end_layout
3434 \begin_layout Subsubsection
3435 memory.writebyte(number address, number value)
3436 \end_layout
3438 \begin_layout Standard
3439 Writes the specified value (negative values undergo 2's complement) to specified
3440  address (as a byte).
3441 \end_layout
3443 \begin_layout Subsubsection
3444 memory.readword(number address)
3445 \end_layout
3447 \begin_layout Standard
3448 Reads the specified address as unsigned word and returns the result.
3449 \end_layout
3451 \begin_layout Subsubsection
3452 memory.readsword(number address)
3453 \end_layout
3455 \begin_layout Standard
3456 Reads the specified address as signed word and returns the result.
3457 \end_layout
3459 \begin_layout Subsubsection
3460 memory.writeword(number address, number value)
3461 \end_layout
3463 \begin_layout Standard
3464 Writes the specified value (negative values undergo 2's complement) to specified
3465  address (as a word).
3466 \end_layout
3468 \begin_layout Subsubsection
3469 memory.readdword(number address)
3470 \end_layout
3472 \begin_layout Standard
3473 Reads the specified address as unsigned doubleword and returns the result.
3474 \end_layout
3476 \begin_layout Subsubsection
3477 memory.readsdword(number address)
3478 \end_layout
3480 \begin_layout Standard
3481 Reads the specified address as signed doubleword and returns the result.
3482 \end_layout
3484 \begin_layout Subsubsection
3485 memory.writedword(number address, number value)
3486 \end_layout
3488 \begin_layout Standard
3489 Writes the specified value (negative values undergo 2's complement) to specified
3490  address (as a doubleword).
3491 \end_layout
3493 \begin_layout Subsubsection
3494 memory.readqword(number address)
3495 \end_layout
3497 \begin_layout Standard
3498 Reads the specified address as unsigned quadword and returns the result.
3499 \end_layout
3501 \begin_layout Subsubsection
3502 memory.readsqword(number address)
3503 \end_layout
3505 \begin_layout Standard
3506 Reads the specified address as signed quadword and returns the result.
3507 \end_layout
3509 \begin_layout Subsubsection
3510 memory.writeqword(number address, number value)
3511 \end_layout
3513 \begin_layout Standard
3514 Writes the specified value (negative values undergo 2's complement) to specified
3515  address (as a quadword).
3516 \end_layout
3518 \begin_layout Subsubsection
3519 memory.hash_region(number base, number size)
3520 \end_layout
3522 \begin_layout Standard
3523 Hash specified number of bytes starting from specified address and return
3524  the SHA-256.
3525 \end_layout
3527 \begin_layout Subsubsection
3528 memory.hash_state()
3529 \end_layout
3531 \begin_layout Standard
3532 Hash the current system state.
3533  Mainly useful for debugging savestates.
3534 \end_layout
3536 \begin_layout Subsubsection
3537 memory.readregion(number base, number size)
3538 \end_layout
3540 \begin_layout Standard
3541 Read a region of memory.
3542 \end_layout
3544 \begin_layout Itemize
3545 Warning: If the region crosses VMA boundary, the results are undefined.
3546 \end_layout
3548 \begin_layout Subsubsection
3549 memory.map<type>([number base, number size])
3550 \end_layout
3552 \begin_layout Standard
3553 Returns a table mapping specified memory aperture for read/write.
3554  If parameters are omitted, entiere map space is the aperture.
3555 \end_layout
3557 \begin_layout Itemize
3558 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3559 \end_layout
3561 \begin_layout Subsubsection
3562 memory.writeregion(number base, number size, table data)
3563 \end_layout
3565 \begin_layout Standard
3566 Write a region of memory.
3567 \end_layout
3569 \begin_layout Itemize
3570 Warning: If the region crosses VMA boundary, the results are undefined.
3571 \end_layout
3573 \begin_layout Subsubsection
3574 memory.map_struct()
3575 \end_layout
3577 \begin_layout Standard
3578 Returns a new mapping structure (MMAP_STRUCT)
3579 \end_layout
3581 \begin_layout Subsubsection
3582 MMAP_STRUCT(string key, number address, string type)
3583 \end_layout
3585 \begin_layout Standard
3586 Bind key in mmap structure to specified address with specified type.
3587 \end_layout
3589 \begin_layout Itemize
3590 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3591 \end_layout
3593 \begin_layout Subsubsection
3594 memory.read_expr(string expr)
3595 \end_layout
3597 \begin_layout Standard
3598 Evaluate specified watch expression and return result
3599 \end_layout
3601 \begin_layout Subsection
3602 Table subtitle
3603 \end_layout
3605 \begin_layout Standard
3606 Contains functions for manipulating subtitles.
3607 \end_layout
3609 \begin_layout Subsubsection
3610 subtitle.byindex(number index)
3611 \end_layout
3613 \begin_layout Standard
3614 Get (basetime, length) pair of specified subtitle index or nothing if index
3615  isn't valid.
3616 \end_layout
3618 \begin_layout Subsubsection
3619 subtitle.get(number basetime, number length)
3620 \end_layout
3622 \begin_layout Standard
3623 Read the specified subtitle.
3624  Returns 
3625 \begin_inset Quotes eld
3626 \end_inset
3629 \begin_inset Quotes erd
3630 \end_inset
3632  if the subtitle does not exist.
3633 \end_layout
3635 \begin_layout Subsubsection
3636 subtitle.set(number basetime, number length, string content)
3637 \end_layout
3639 \begin_layout Standard
3640 Set the specified subtitle.
3641 \end_layout
3643 \begin_layout Subsubsection
3644 subtitle.deltete(number basetime, number length)
3645 \end_layout
3647 \begin_layout Standard
3648 Delete the specified subtitle.
3649 \end_layout
3651 \begin_layout Subsection
3652 Table _SYSTEM
3653 \end_layout
3655 \begin_layout Standard
3656 Contains copy of global variables from time of Lua initialization.
3657  Non-writeable.
3658 \end_layout
3660 \begin_layout Subsection
3661 Callbacks
3662 \end_layout
3664 \begin_layout Standard
3665 Various callbacks to Lua that can occur.
3666 \end_layout
3668 \begin_layout Subsubsection
3669 Callback: on_paint(bool not_synth)
3670 \end_layout
3672 \begin_layout Standard
3673 Called when screen is being painted.
3674  Any gui.* calls requiring graphic context draw on the screen.
3675 \end_layout
3677 \begin_layout Standard
3678 not_synth is true if this hook is being called in response to received frame,
3679  false otherwise.
3680 \end_layout
3682 \begin_layout Subsubsection
3683 Callback: on_video()
3684 \end_layout
3686 \begin_layout Standard
3687 Called when video dump frame is being painted.
3688  Any gui.* calls requiring graphic context draw on the video.
3689 \end_layout
3691 \begin_layout Subsubsection
3692 Callback: on_frame_emulated()
3693 \end_layout
3695 \begin_layout Standard
3696 Called when emulating frame has completed and on_paint()/on_video() calls
3697  are about to be issued.
3698 \end_layout
3700 \begin_layout Subsubsection
3701 Callback: on_frame()
3702 \end_layout
3704 \begin_layout Standard
3705 Called on each starting whole frame.
3706 \end_layout
3708 \begin_layout Subsubsection
3709 Callback: on_startup()
3710 \end_layout
3712 \begin_layout Standard
3713 Called when the emulator is starting (lsnes.rc and --run files has been run).
3714 \end_layout
3716 \begin_layout Subsubsection
3717 Callback: on_rewind()
3718 \end_layout
3720 \begin_layout Standard
3721 Called when rewind movie to beginning has completed.
3722 \end_layout
3724 \begin_layout Subsubsection
3725 Callback: on_pre_load(string name)
3726 \end_layout
3728 \begin_layout Standard
3729 Called just before savestate/movie load occurs (note: loads are always delayed,
3730  so this occurs even when load was initiated by lua).
3731 \end_layout
3733 \begin_layout Subsubsection
3734 Callback: on_err_load(string name)
3735 \end_layout
3737 \begin_layout Standard
3738 Called if loadstate goes wrong.
3739 \end_layout
3741 \begin_layout Subsubsection
3742 Callback: on_post_load(string name, boolean was_savestate)
3743 \end_layout
3745 \begin_layout Standard
3746 Called on successful loadstate.
3747  was_savestate gives if this was a savestate or a movie.
3748 \end_layout
3750 \begin_layout Subsubsection
3751 Callback: on_pre_save(string name, boolean is_savestate)
3752 \end_layout
3754 \begin_layout Standard
3755 Called just before savestate save occurs (note: movie saves are synchronous
3756  and won't trigger these callbacks if called from Lua).
3757 \end_layout
3759 \begin_layout Subsubsection
3760 Callback: on_err_save(string name)
3761 \end_layout
3763 \begin_layout Standard
3764 Called if savestate goes wrong.
3765 \end_layout
3767 \begin_layout Subsubsection
3768 Callback: on_post_save(string name, boolean is_savestate)
3769 \end_layout
3771 \begin_layout Standard
3772 Called on successful savaestate.
3773  is_savestate gives if this was a savestate or a movie.
3774 \end_layout
3776 \begin_layout Subsubsection
3777 Callback: on_quit()
3778 \end_layout
3780 \begin_layout Standard
3781 Called when emulator is shutting down.
3782 \end_layout
3784 \begin_layout Subsubsection
3785 Callback: on_input(boolean subframe)
3786 \end_layout
3788 \begin_layout Standard
3789 Called when emulator is just sending input to bsnes core.
3790  Warning: This is called even in readonly mode, but the results are ignored.
3791 \end_layout
3793 \begin_layout Subsubsection
3794 Callback: on_reset()
3795 \end_layout
3797 \begin_layout Standard
3798 Called when SNES is reset.
3799 \end_layout
3801 \begin_layout Subsubsection
3802 Callback: on_readwrite()
3803 \end_layout
3805 \begin_layout Standard
3806 Called when moving into readwrite mode as result of 
3807 \begin_inset Quotes eld
3808 \end_inset
3810 set-rwmode
3811 \begin_inset Quotes erd
3812 \end_inset
3814  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3815  entry protection).
3816 \end_layout
3818 \begin_layout Subsubsection
3819 Callback: on_snoop(number port, number controller, number index, number
3820  value)
3821 \end_layout
3823 \begin_layout Standard
3824 Called each time bsnes asks for input.
3825  The value is the final value to be sent to bsnes core (readonly mode, autohold
3826  and autofire have been taken into account).
3827  Might be useful when translating movies to format suitable for console
3828  verification.
3829  Note: There is no way to modify the value to be sent.
3830 \end_layout
3832 \begin_layout Subsubsection
3833 Callback: on_keyhook(string keyname, table state)
3834 \end_layout
3836 \begin_layout Standard
3837 Sent when key that has keyhook events requested changes state.
3838  Keyname is name of the key (group) and state is the state (same kind as
3839  table values in input.raw).
3840 \end_layout
3842 \begin_layout Subsubsection
3843 Callback: on_idle()
3844 \end_layout
3846 \begin_layout Standard
3847 Called when requested by set_idle_timeout(), the timeout has expired and
3848  emulator is waiting.
3849 \end_layout
3851 \begin_layout Subsubsection
3852 Callback: on_timer()
3853 \end_layout
3855 \begin_layout Standard
3856 Called when requested by set_idle_timeout() and the timeout has expired
3857  (regardless if emulator is waiting).
3858 \end_layout
3860 \begin_layout Subsubsection
3861 Callback: on_set_rewind(UNSAFEREWIND r)
3862 \end_layout
3864 \begin_layout Standard
3865 Called when unsafe rewind object has been constructed.
3866 \end_layout
3868 \begin_layout Subsubsection
3869 Callback: on_pre_rewind() 
3870 \end_layout
3872 \begin_layout Standard
3873 Called just before unsafe rewind is about to occur.
3874 \end_layout
3876 \begin_layout Subsubsection
3877 Callback: on_post_rewind() 
3878 \end_layout
3880 \begin_layout Standard
3881 Called just after unsafe rewind has occured.
3882 \end_layout
3884 \begin_layout Section
3885 Memory watch expression syntax
3886 \end_layout
3888 \begin_layout Standard
3889 Memory watch expressions are in RPN (Reverse Polish Notation).
3890  At the end of expression, the top entry on stack is taken as the final
3891  result.
3892 \end_layout
3894 \begin_layout Standard
3895 Notations:
3896 \end_layout
3898 \begin_layout Itemize
3899 Evaluation order is strictly left to right.
3900 \end_layout
3902 \begin_layout Itemize
3903 a is the entry on top of stack
3904 \end_layout
3906 \begin_layout Itemize
3907 b is the entry immediately below top of stack
3908 \end_layout
3910 \begin_layout Itemize
3911 ; separates values to be pushed (no intermediate pop).
3912 \end_layout
3914 \begin_layout Itemize
3915 After end of element, all used stack slots are popped and all results are
3916  pushed.
3917 \end_layout
3919 \begin_layout Itemize
3920 When pushing multiple values, the pushes occur in order shown.
3921 \end_layout
3923 \begin_layout Standard
3924 The following operators are available:
3925 \end_layout
3927 \begin_layout Itemize
3928 + : a + b
3929 \end_layout
3931 \begin_layout Itemize
3932 - : a - b
3933 \end_layout
3935 \begin_layout Itemize
3936 * : a * b
3937 \end_layout
3939 \begin_layout Itemize
3940 / : a / b
3941 \end_layout
3943 \begin_layout Itemize
3944 % : a % b
3945 \end_layout
3947 \begin_layout Itemize
3948 a : atan(a)
3949 \end_layout
3951 \begin_layout Itemize
3952 b : read_signed_byte(a)
3953 \end_layout
3955 \begin_layout Itemize
3956 c : cos(a)
3957 \end_layout
3959 \begin_layout Itemize
3960 d : read_signed_dword(a)
3961 \end_layout
3963 \begin_layout Itemize
3964 i : quotent(a / b)
3965 \end_layout
3967 \begin_layout Itemize
3968 p :
3969 \begin_inset Formula $\pi$
3970 \end_inset
3973 \end_layout
3975 \begin_layout Itemize
3976 q : read_signed_qword(a)
3977 \end_layout
3979 \begin_layout Itemize
3980 r : sqrt(a)
3981 \end_layout
3983 \begin_layout Itemize
3984 s : sin(a)
3985 \end_layout
3987 \begin_layout Itemize
3988 t : tan(a)
3989 \end_layout
3991 \begin_layout Itemize
3992 u : a; a
3993 \end_layout
3995 \begin_layout Itemize
3996 w : read_signed_word(a)
3997 \end_layout
3999 \begin_layout Itemize
4000 A : atan2(a, b)
4001 \end_layout
4003 \begin_layout Itemize
4004 B : read_unsigned_byte(a)
4005 \end_layout
4007 \begin_layout Itemize
4008 C<number>z : Push number <number> to stack.
4009 \end_layout
4011 \begin_layout Itemize
4012 D : read_unsigned_dword(a)
4013 \end_layout
4015 \begin_layout Itemize
4016 C0x<number>z : Push number <number> (hexadecimal) to stack.
4017 \end_layout
4019 \begin_layout Itemize
4020 Q : read_unsigned_qword(a)
4021 \end_layout
4023 \begin_layout Itemize
4024 R<digit> : round a to <digit> digits.
4025 \end_layout
4027 \begin_layout Itemize
4028 W : read_unsigned_word(a)
4029 \end_layout
4031 \begin_layout Subsection
4032 Example:
4033 \end_layout
4035 \begin_layout Standard
4036 C0x007e0878zWC0x007e002czW-
4037 \end_layout
4039 \begin_layout Enumerate
4040 Push value 0x7e0878 on top of stack (C0x007e0878z).
4041 \end_layout
4043 \begin_layout Enumerate
4044 Pop the value on top of stack (0x7e0878), read word value at that address
4045  and push the result,call it x1 (W).
4046 \end_layout
4048 \begin_layout Enumerate
4049 Push value 0x7e002c on top of stack (C0x007e002cz).
4050 \end_layout
4052 \begin_layout Enumerate
4053 Pop the value on top of stack (0x7e002c), read word value at that address
4054  and push the result,call it x2 (W).
4055 \end_layout
4057 \begin_layout Enumerate
4058 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
4059  x2 - x1 (-).
4060 \end_layout
4062 \begin_layout Enumerate
4063 Since the expression ends, the final memory watch result is the top one
4064  on stack, which is x2 - x1.
4065 \end_layout
4067 \begin_layout Section
4068 Modifier and key names:
4069 \end_layout
4071 \begin_layout Subsection
4072 SDL Platform
4073 \end_layout
4075 \begin_layout Subsubsection
4076 Modifier names
4077 \end_layout
4079 \begin_layout Standard
4080 Following modifier names are known:
4081 \end_layout
4083 \begin_layout Itemize
4084 ctrl, lctrl, rctrl: Control keys
4085 \end_layout
4087 \begin_layout Itemize
4088 alt, lalt, ralt: ALT keys.
4089 \end_layout
4091 \begin_layout Itemize
4092 shift, lshift, rshift: Shift keys.
4093 \end_layout
4095 \begin_layout Itemize
4096 meta, lmeta, rmeta: Meta keys.
4097 \end_layout
4099 \begin_layout Itemize
4100 num, caps: Numlock/Capslock (these are sticky!)
4101 \end_layout
4103 \begin_layout Itemize
4104 mode: Mode select.
4105 \end_layout
4107 \begin_layout Subsubsection
4108 Key names
4109 \end_layout
4111 \begin_layout Standard
4112 Following key names are known:
4113 \end_layout
4115 \begin_layout Itemize
4116 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4117  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4118  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4119  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4120  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4121  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4122  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4123  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4124  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4125  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4126  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4127  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4128  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4129  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4130  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4131  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4132  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4133  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4134  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4135  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4136  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4137  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4138  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4139  break, menu, power, euro, undo
4140 \end_layout
4142 \begin_layout Itemize
4143 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4144  hardware-dependent scan code of <n> (useful to bind those keys that don't
4145  have symbolic names).
4146 \end_layout
4148 \begin_layout Subsubsection
4149 Joystick pseudo-keys:
4150 \end_layout
4152 \begin_layout Itemize
4153 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4154 \end_layout
4156 \begin_layout Itemize
4157 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4158 \end_layout
4160 \begin_layout Itemize
4161 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4162 \end_layout
4164 \begin_layout Itemize
4165 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4166 \end_layout
4168 \begin_layout Itemize
4169 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4170 \end_layout
4172 \begin_layout Itemize
4173 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4174  position (axis modes axis and axis_inverse).
4175 \end_layout
4177 \begin_layout Itemize
4178 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4179  position (axis modes axis and axis_inverse).
4180 \end_layout
4182 \begin_layout Itemize
4183 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4184  modes pressure_*).
4185 \end_layout
4187 \begin_layout Subsubsection
4188 Special buttons:
4189 \end_layout
4191 \begin_layout Itemize
4192 Escape: Enter/Exit Command mode, cancel modal dialogs.
4193 \end_layout
4195 \begin_layout Itemize
4196 Return (also KPEnter): Execute command, ok modal dialog.
4197 \end_layout
4199 \begin_layout Itemize
4200 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4201  in command history
4202 \end_layout
4204 \begin_layout Itemize
4205 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4206  in command history
4207 \end_layout
4209 \begin_layout Itemize
4210 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4211 \end_layout
4213 \begin_layout Itemize
4214 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4215 \end_layout
4217 \begin_layout Itemize
4218 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4219 \end_layout
4221 \begin_layout Itemize
4222 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4223 \end_layout
4225 \begin_layout Itemize
4226 Delete (also KP.
4227  if no num lock; command mode): Delete character to right of cursor.
4228 \end_layout
4230 \begin_layout Itemize
4231 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4232  overwrite modes.
4233 \end_layout
4235 \begin_layout Itemize
4236 Backspace (command mode): Delete character to left of cursor.
4237 \end_layout
4239 \begin_layout Itemize
4240 CTRL+LEFT (also ALT+B; command mode): Previous word.
4241 \end_layout
4243 \begin_layout Itemize
4244 CTRL+RIGHT (also ALT+F; command mode): Next word.
4245 \end_layout
4247 \begin_layout Itemize
4248 ALT+D (also CTRL+W; command mode): Delete word.
4249 \end_layout
4251 \begin_layout Itemize
4252 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4253 \end_layout
4255 \begin_layout Subsection
4256 wxWidgets platform
4257 \end_layout
4259 \begin_layout Subsubsection
4260 Modifier names:
4261 \end_layout
4263 \begin_layout Standard
4264 Following modifier names are known:
4265 \end_layout
4267 \begin_layout Itemize
4269 \end_layout
4271 \begin_layout Itemize
4272 ctrl
4273 \end_layout
4275 \begin_layout Itemize
4276 shift 
4277 \end_layout
4279 \begin_layout Itemize
4280 meta
4281 \end_layout
4283 \begin_layout Itemize
4284 cmd (Mac OS X only)
4285 \end_layout
4287 \begin_layout Subsubsection
4288 Key names:
4289 \end_layout
4291 \begin_layout Standard
4292 Following key names are known:
4293 \end_layout
4295 \begin_layout Itemize
4296 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4297  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4298  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4299  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4300  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4301  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4302  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4303  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4304  pause, capital, end, home, lefT, up, right, down, select, print, execute,
4305  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4306  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4307  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4308  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4309  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4310  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4311  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4312  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4313  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4314  windows_right, windows_menu, command, special1, special2, special3, special4,
4315  special5, special6, special7, special8, special9, special10, special11,
4316  special12, special13, special14, special15, special16, special17, special18,
4317  special19, special20
4318 \end_layout
4320 \begin_layout Section
4321 Movie file format
4322 \end_layout
4324 \begin_layout Standard
4325 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4326  (note: If you recompress it, do not use compression methods other than
4327  store and deflate and especially do not use encryption of any kind).
4328 \end_layout
4330 \begin_layout Subsection
4331 Detecting clean start/SRAM/Savestate
4332 \end_layout
4334 \begin_layout Itemize
4335 If file has member 
4336 \begin_inset Quotes eld
4337 \end_inset
4339 savestate
4340 \begin_inset Quotes erd
4341 \end_inset
4343  it is savestate, otherwise:
4344 \end_layout
4346 \begin_layout Itemize
4347 If file has members with names starting 
4348 \begin_inset Quotes eld
4349 \end_inset
4351 moviesram.
4352 \begin_inset Quotes erd
4353 \end_inset
4355  it is movie starting from SRAM, otherwise:
4356 \end_layout
4358 \begin_layout Itemize
4359 It is movie starting from clear state.
4360 \end_layout
4362 \begin_layout Subsection
4363 Member: gametype
4364 \end_layout
4366 \begin_layout Standard
4367 Type of game ROM and region (as one line).
4368  Valid values are:
4369 \end_layout
4371 \begin_layout Standard
4372 \begin_inset Tabular
4373 <lyxtabular version="3" rows="8" columns="3">
4374 <features tabularvalignment="middle">
4375 <column alignment="center" valignment="top" width="0">
4376 <column alignment="center" valignment="top" width="0">
4377 <column alignment="center" valignment="top" width="0">
4378 <row>
4379 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4380 \begin_inset Text
4382 \begin_layout Plain Layout
4383 Value
4384 \end_layout
4386 \end_inset
4387 </cell>
4388 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4389 \begin_inset Text
4391 \begin_layout Plain Layout
4392 System
4393 \end_layout
4395 \end_inset
4396 </cell>
4397 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4398 \begin_inset Text
4400 \begin_layout Plain Layout
4401 Region
4402 \end_layout
4404 \end_inset
4405 </cell>
4406 </row>
4407 <row>
4408 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4409 \begin_inset Text
4411 \begin_layout Plain Layout
4412 snes_pal
4413 \end_layout
4415 \end_inset
4416 </cell>
4417 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4418 \begin_inset Text
4420 \begin_layout Plain Layout
4421 Super NES
4422 \end_layout
4424 \end_inset
4425 </cell>
4426 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4427 \begin_inset Text
4429 \begin_layout Plain Layout
4431 \end_layout
4433 \end_inset
4434 </cell>
4435 </row>
4436 <row>
4437 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4438 \begin_inset Text
4440 \begin_layout Plain Layout
4441 sgb_pal
4442 \end_layout
4444 \end_inset
4445 </cell>
4446 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4447 \begin_inset Text
4449 \begin_layout Plain Layout
4450 Super Game Boy
4451 \end_layout
4453 \end_inset
4454 </cell>
4455 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4456 \begin_inset Text
4458 \begin_layout Plain Layout
4460 \end_layout
4462 \end_inset
4463 </cell>
4464 </row>
4465 <row>
4466 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4467 \begin_inset Text
4469 \begin_layout Plain Layout
4470 snes_ntsc
4471 \end_layout
4473 \end_inset
4474 </cell>
4475 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4476 \begin_inset Text
4478 \begin_layout Plain Layout
4479 Super NES
4480 \end_layout
4482 \end_inset
4483 </cell>
4484 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4485 \begin_inset Text
4487 \begin_layout Plain Layout
4488 NTSC
4489 \end_layout
4491 \end_inset
4492 </cell>
4493 </row>
4494 <row>
4495 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4496 \begin_inset Text
4498 \begin_layout Plain Layout
4499 sgb_ntsc
4500 \end_layout
4502 \end_inset
4503 </cell>
4504 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4505 \begin_inset Text
4507 \begin_layout Plain Layout
4508 Super Game Boy
4509 \end_layout
4511 \end_inset
4512 </cell>
4513 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4514 \begin_inset Text
4516 \begin_layout Plain Layout
4517 NTSC
4518 \end_layout
4520 \end_inset
4521 </cell>
4522 </row>
4523 <row>
4524 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4525 \begin_inset Text
4527 \begin_layout Plain Layout
4529 \end_layout
4531 \end_inset
4532 </cell>
4533 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4534 \begin_inset Text
4536 \begin_layout Plain Layout
4537 BS-X (non-slotted)
4538 \end_layout
4540 \end_inset
4541 </cell>
4542 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4543 \begin_inset Text
4545 \begin_layout Plain Layout
4546 NTSC
4547 \end_layout
4549 \end_inset
4550 </cell>
4551 </row>
4552 <row>
4553 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4554 \begin_inset Text
4556 \begin_layout Plain Layout
4557 bsxslotted
4558 \end_layout
4560 \end_inset
4561 </cell>
4562 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4563 \begin_inset Text
4565 \begin_layout Plain Layout
4566 BS-X (slotted)
4567 \end_layout
4569 \end_inset
4570 </cell>
4571 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4572 \begin_inset Text
4574 \begin_layout Plain Layout
4575 NTSC
4576 \end_layout
4578 \end_inset
4579 </cell>
4580 </row>
4581 <row>
4582 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4583 \begin_inset Text
4585 \begin_layout Plain Layout
4586 sufamiturbo
4587 \end_layout
4589 \end_inset
4590 </cell>
4591 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4592 \begin_inset Text
4594 \begin_layout Plain Layout
4595 Sufami Turbo
4596 \end_layout
4598 \end_inset
4599 </cell>
4600 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4601 \begin_inset Text
4603 \begin_layout Plain Layout
4604 NTSC
4605 \end_layout
4607 \end_inset
4608 </cell>
4609 </row>
4610 </lyxtabular>
4612 \end_inset
4615 \end_layout
4617 \begin_layout Standard
4618 Frame rates are:
4619 \end_layout
4621 \begin_layout Standard
4622 \begin_inset Tabular
4623 <lyxtabular version="3" rows="3" columns="2">
4624 <features tabularvalignment="middle">
4625 <column alignment="center" valignment="top" width="0">
4626 <column alignment="center" valignment="top" width="0">
4627 <row>
4628 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4629 \begin_inset Text
4631 \begin_layout Plain Layout
4632 Region
4633 \end_layout
4635 \end_inset
4636 </cell>
4637 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4638 \begin_inset Text
4640 \begin_layout Plain Layout
4641 Framerate (fps)
4642 \end_layout
4644 \end_inset
4645 </cell>
4646 </row>
4647 <row>
4648 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4649 \begin_inset Text
4651 \begin_layout Plain Layout
4653 \end_layout
4655 \end_inset
4656 </cell>
4657 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4658 \begin_inset Text
4660 \begin_layout Plain Layout
4661 322445/6448
4662 \end_layout
4664 \end_inset
4665 </cell>
4666 </row>
4667 <row>
4668 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4669 \begin_inset Text
4671 \begin_layout Plain Layout
4672 NTSC
4673 \end_layout
4675 \end_inset
4676 </cell>
4677 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4678 \begin_inset Text
4680 \begin_layout Plain Layout
4681 10738636/178683
4682 \end_layout
4684 \end_inset
4685 </cell>
4686 </row>
4687 </lyxtabular>
4689 \end_inset
4692 \end_layout
4694 \begin_layout Subsection
4695 Member: port1
4696 \end_layout
4698 \begin_layout Standard
4699 Contains type of port #1 (as one line).
4700  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4701  If not present, defaults to 'gamepad'.
4702 \end_layout
4704 \begin_layout Subsection
4705 Member: port2
4706 \end_layout
4708 \begin_layout Standard
4709 Contains type of port #2 (as one line).
4710  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4711  'justifier' and 'justifiers'.
4712  If not present, defaults to 'none'.
4713 \end_layout
4715 \begin_layout Subsection
4716 Member: gamename
4717 \end_layout
4719 \begin_layout Standard
4720 Contains name of the game (as one line).
4721 \end_layout
4723 \begin_layout Subsection
4724 Member: authors
4725 \end_layout
4727 \begin_layout Standard
4728 Contains authors, one per line.
4729  Part before '|' is the full name, part after is the nickname.
4730 \end_layout
4732 \begin_layout Subsection
4733 Member: systemid
4734 \end_layout
4736 \begin_layout Standard
4737 Always 
4738 \begin_inset Quotes eld
4739 \end_inset
4741 lsnes-rr1
4742 \begin_inset Quotes erd
4743 \end_inset
4745  (one line).
4746  Used to reject other saves.
4747 \end_layout
4749 \begin_layout Subsection
4750 Member: controlsversion
4751 \end_layout
4753 \begin_layout Standard
4754 Always 
4755 \begin_inset Quotes eld
4756 \end_inset
4759 \begin_inset Quotes erd
4760 \end_inset
4762  (one line).
4763  Used to identify what controls are there.
4764 \end_layout
4766 \begin_layout Subsection
4767 Member: 
4768 \begin_inset Quotes eld
4769 \end_inset
4771 coreversion
4772 \begin_inset Quotes erd
4773 \end_inset
4776 \end_layout
4778 \begin_layout Standard
4779 Contains bsnes core version number (as one line).
4780 \end_layout
4782 \begin_layout Subsection
4783 Member: projectid
4784 \end_layout
4786 \begin_layout Standard
4787 Contains project ID (as one line).
4788  Used to identify if two movies are part of the same project.
4789 \end_layout
4791 \begin_layout Subsection
4792 Member: {rom,slota,slotb}{,xml}.sha256
4793 \end_layout
4795 \begin_layout Standard
4796 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4797  Absent if corresponding file is absent.
4798 \end_layout
4800 \begin_layout Subsection
4801 Member: moviesram.<name>
4802 \end_layout
4804 \begin_layout Standard
4805 Raw binary startup SRAM of kind <name>.
4806  Only present in savestates and movies starting from SRAM.
4807 \end_layout
4809 \begin_layout Subsection
4810 Member: saveframe
4811 \end_layout
4813 \begin_layout Standard
4814 Contains frame number (as one line) of frame movie was saved on.
4815  Only present in savestates.
4816 \end_layout
4818 \begin_layout Subsection
4819 Member: lagcounter
4820 \end_layout
4822 \begin_layout Standard
4823 Current value of lag counter (as one line).
4824  Only present in savestates.
4825 \end_layout
4827 \begin_layout Subsection
4828 Member: pollcounters
4829 \end_layout
4831 \begin_layout Standard
4832 Contains poll counters (currently 100 of them), one per line.
4833  Each line is raw poll count if DRDY is set for it.
4834  Otherwise it is negative poll count minus one.
4835  Only present in savestates.
4836 \end_layout
4838 \begin_layout Subsection
4839 Member: hostmemory
4840 \end_layout
4842 \begin_layout Standard
4843 Raw binary dump of host memory.
4844  Only present in savestates.
4845 \end_layout
4847 \begin_layout Subsection
4848 Member: savestate
4849 \end_layout
4851 \begin_layout Standard
4852 The raw binary savestate itself.
4853  Savestate detection uses this file, only present in savestates.
4854 \end_layout
4856 \begin_layout Subsection
4857 Member: screenshot
4858 \end_layout
4860 \begin_layout Standard
4861 Screenshot of current frame.
4862  Only present in savestates.
4863  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4864  data.
4865  Height of image is inferred from the width and size of data.
4866 \end_layout
4868 \begin_layout Subsection
4869 Member: sram.<name>
4870 \end_layout
4872 \begin_layout Standard
4873 Raw binary SRAM of kind <name> at time of savestate.
4874  Only present in savestates.
4875 \end_layout
4877 \begin_layout Subsection
4878 Member: input
4879 \end_layout
4881 \begin_layout Standard
4882 The actual input track, one line per subframe (blank lines are skipped).
4883 \end_layout
4885 \begin_layout Itemize
4886 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4887  part of same frame as previous, otherwise it starts a new frame.
4888 \end_layout
4890 \begin_layout Itemize
4891 First subframe must start a new frame.
4892 \end_layout
4894 \begin_layout Standard
4895 Length of movie in frames is number of lines in input file that start a
4896  new frame.
4897 \end_layout
4899 \begin_layout Subsection
4900 Member: subtitles
4901 \end_layout
4903 \begin_layout Standard
4904 Subtitle track.
4905  Optional.
4906 \end_layout
4908 \begin_layout Itemize
4909 Each line is in form <firstframe> <numframes> <text>.
4910 \end_layout
4912 \begin_layout Itemize
4913 Linefeed is encoded as 
4914 \backslash
4915 n, backslash is encoded as 
4916 \backslash
4918 \backslash
4920 \end_layout
4922 \begin_layout Subsection
4923 Member: rerecords
4924 \end_layout
4926 \begin_layout Standard
4927 Contains textual base-10 rerecord count (as one line; emulator just writes
4928  this, it doesn't read it) + 1.
4929 \end_layout
4931 \begin_layout Subsection
4932 Member: rrdata
4933 \end_layout
4935 \begin_layout Standard
4936 This member stores set of load IDs.
4937  There is one load ID per rerecord (plus one corresponding to start of project).
4938 \end_layout
4940 \begin_layout Itemize
4941 This member constists of concatenation of records
4942 \end_layout
4944 \begin_layout Itemize
4945 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4946  IDs.
4947 \end_layout
4949 \begin_layout Itemize
4950 IDs are interpretted as 256-bit big-endian integers with warparound.
4951 \end_layout
4953 \begin_layout Itemize
4954 Initial predicted ID is all zeroes.
4955 \end_layout
4957 \begin_layout Standard
4958 Format of each record is:
4959 \end_layout
4961 \begin_layout Itemize
4962 1 byte: Opcode byte.
4963  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4964  Bit 7 is unused.
4965 \end_layout
4967 \begin_layout Itemize
4968 32-prefixlen bytes of ID.
4969 \end_layout
4971 \begin_layout Itemize
4972 countlen bytes of big-endian count (count).
4973 \end_layout
4975 \begin_layout Standard
4976 Records are processed as follows:
4977 \end_layout
4979 \begin_layout Itemize
4980 To form the first ID encoded by record, take the first prefixlen bytes predicted
4981  ID and append the read ID value to it.
4982  The result is the first ID encoded.
4983 \end_layout
4985 \begin_layout Itemize
4986 If countlen is 0, record encodes 1 ID.
4987 \end_layout
4989 \begin_layout Itemize
4990 If countlen is 1, record encodes 2+count IDs.
4991 \end_layout
4993 \begin_layout Itemize
4994 If countlen is 2, record encodes 258+count IDs.
4995 \end_layout
4997 \begin_layout Itemize
4998 If countlen is 3, record encodes 65794+count IDs.
4999 \end_layout
5001 \begin_layout Itemize
5002 The new predicted ID is the next ID after last one encoded by the record.
5003 \end_layout
5005 \begin_layout Standard
5006 The number of rerecords + 1 is equal to the sum of number of IDs encoded
5007  by all records.
5008 \end_layout
5010 \begin_layout Subsection
5011 Member: starttime.second
5012 \end_layout
5014 \begin_layout Standard
5015 Movie starting time, second part.
5016  Epoch is Unix epoch.
5017  Default is 1,000,000,000.
5018 \end_layout
5020 \begin_layout Subsection
5021 Member: starttime.subsecond
5022 \end_layout
5024 \begin_layout Standard
5025 Movie starting time, subsecond part.
5026  Unit is CPU clocks.
5027  Default is 0.
5028 \end_layout
5030 \begin_layout Subsection
5031 Member: savetime.second
5032 \end_layout
5034 \begin_layout Standard
5035 Movie saving time, second part.
5036  Default is starttime.second.
5037  Only present in savestates.
5038 \end_layout
5040 \begin_layout Subsection
5041 Member: savetime.subsecond
5042 \end_layout
5044 \begin_layout Standard
5045 Movie saving time, subsecond part.
5046  Default is starttime.subsecond.
5047  Only present in savestates.
5048 \end_layout
5050 \begin_layout Section
5051 lsvs file format (commentary tracks)
5052 \end_layout
5054 \begin_layout Subsection
5055 Clusters
5056 \end_layout
5058 \begin_layout Itemize
5059 Each cluster is 8kB (8192 bytes) in size.
5060 \end_layout
5062 \begin_layout Itemize
5063 Cluster n starts at offset 8192*n in file.
5064 \end_layout
5066 \begin_layout Itemize
5067 The following clusters are system special:
5068 \end_layout
5070 \begin_deeper
5071 \begin_layout Itemize
5072 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5073 \end_layout
5075 \begin_layout Itemize
5076 Cluster 1 (superblock)
5077 \end_layout
5079 \end_deeper
5080 \begin_layout Subsection
5081 Cluster tables
5082 \end_layout
5084 \begin_layout Itemize
5085 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
5086  last 11 bits of n).
5087 \end_layout
5089 \begin_layout Itemize
5090 This cluster table consists of 2048 4-byte big-endian integers.
5091 \end_layout
5093 \begin_layout Itemize
5094 Each entry describes a cluster in 16MB supercluster, in order.
5095 \end_layout
5097 \begin_layout Itemize
5098 The valid values for entries are:
5099 \end_layout
5101 \begin_deeper
5102 \begin_layout Itemize
5103 0x00000000: Free cluster
5104 \end_layout
5106 \begin_layout Itemize
5107 0x00000001: Last cluster in chain.
5108 \end_layout
5110 \begin_layout Itemize
5111 0xFFFFFFFF: System cluster (cluster tables and superblock)
5112 \end_layout
5114 \begin_layout Itemize
5115 (anything else): Number of next cluster in chain.
5116  Must not be multiple of 2048.
5117 \end_layout
5119 \end_deeper
5120 \begin_layout Itemize
5121 Due to limitations of the format, there can be at most 2097052 superclusters,
5122  giving maximum file size of 16TB.
5123 \end_layout
5125 \begin_layout Subsection
5126 Stream table
5127 \end_layout
5129 \begin_layout Itemize
5130 The stream table chain always starts in cluster 2.
5131 \end_layout
5133 \begin_layout Itemize
5134 Otherwise, it follows normal chaining.
5135 \end_layout
5137 \begin_layout Itemize
5138 The stream table consists of 16-byte entries:
5139 \end_layout
5141 \begin_deeper
5142 \begin_layout Itemize
5143 The first 8 bytes of entry give big-endian beginning position of stream
5144  in units of 1/48000 s.
5145 \end_layout
5147 \begin_layout Itemize
5148 The next 4 bytes of entry give big-endian beginning cluster for control
5149  data.
5150  0 here marks the entry as not present.
5151 \end_layout
5153 \begin_layout Itemize
5154 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5155 \end_layout
5157 \end_deeper
5158 \begin_layout Itemize
5159 Stream table clusters are normal clusters, following normal chaining.
5160 \end_layout
5162 \begin_layout Itemize
5163 The stream begnning position is not guarenteed unique.
5164  There can be multiple streams with the same starting position in the file.
5165 \end_layout
5167 \begin_layout Subsection
5168 Stream control data
5169 \end_layout
5171 \begin_layout Itemize
5172 The stream control data consists of entries 4 bytes each:
5173 \end_layout
5175 \begin_deeper
5176 \begin_layout Itemize
5177 The first 2 bytes of entry gives big-endian length of packet
5178 \end_layout
5180 \begin_layout Itemize
5181 The next byte of entry gives audio length of packet in units of 1/400 s.
5182 \end_layout
5184 \begin_layout Itemize
5185 The last byte is control byte.
5186 \end_layout
5188 \begin_deeper
5189 \begin_layout Itemize
5190 0 means this entry is not present and the control data ends.
5191 \end_layout
5193 \begin_layout Itemize
5194 1 is valid control entry.
5195 \end_layout
5197 \end_deeper
5198 \end_deeper
5199 \begin_layout Itemize
5200 The stream control data can also end by running into end of the readable
5201  chain.
5202 \end_layout
5204 \begin_deeper
5205 \begin_layout Itemize
5206 This happens if there happens to be exact multiple of 2048 packets in stream
5207  and number of packets is nonzero.
5208 \end_layout
5210 \end_deeper
5211 \begin_layout Itemize
5212 These clusters follow normal chaining.
5213 \end_layout
5215 \begin_layout Subsection
5216 Stream codec data
5217 \end_layout
5219 \begin_layout Itemize
5220 Stream codec data consists of raw Opus data packets packed back to back
5221  with nothing in between.
5222 \end_layout
5224 \begin_layout Itemize
5225 Warning: Due to internal limitations, this data must reside in the first
5226  65536 superclusters (that is, the first 1TB of the file).
5227 \end_layout
5229 \begin_layout Subsection
5230 Superblock
5231 \end_layout
5233 \begin_layout Itemize
5234 The superblock is stored in cluster 1.
5236 \end_layout
5238 \begin_layout Itemize
5239 The first 11 bytes are 
5240 \begin_inset Quotes eld
5241 \end_inset
5243 sefs-magic
5244 \begin_inset Quotes erd
5245 \end_inset
5247 <NUL>.
5248 \end_layout
5250 \begin_layout Itemize
5251 The rest are unused.
5252 \end_layout
5254 \begin_layout Itemize
5255 This cluster 1 is marked as system special.
5256 \end_layout
5258 \begin_layout Section
5259 Known ROM extensions
5260 \end_layout
5262 \begin_layout Itemize
5263 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5264 \end_layout
5266 \begin_layout Itemize
5267 DMG cartridge ROMs: dmg, gb.
5268 \end_layout
5270 \begin_layout Itemize
5271 GBC cartridge ROMs: cgb, gbc.
5272 \end_layout
5274 \begin_layout Section
5275 Gamepack files
5276 \end_layout
5278 \begin_layout Itemize
5279 The first line must be: 
5280 \begin_inset Quotes eld
5281 \end_inset
5283 [GAMEPACK FILE]
5284 \begin_inset Quotes erd
5285 \end_inset
5288 \end_layout
5290 \begin_layout Itemize
5291 There is one needed line: 
5292 \begin_inset Quotes eld
5293 \end_inset
5295 type <systype>
5296 \begin_inset Quotes erd
5297 \end_inset
5300  This sets system type to <systype>.
5301  The following system types are valid:
5302 \end_layout
5304 \begin_deeper
5305 \begin_layout Itemize
5306 snes (SNES)
5307 \end_layout
5309 \begin_layout Itemize
5310 bsx (BS-X non-slotted)
5311 \end_layout
5313 \begin_layout Itemize
5314 bsxslotted (BS-X slotted)
5315 \end_layout
5317 \begin_layout Itemize
5318 sufamiturbo (Sufami Turbo)
5319 \end_layout
5321 \begin_layout Itemize
5322 sgb (Super Game Boy)
5323 \end_layout
5325 \begin_layout Itemize
5326 dmg (Game Boy)
5327 \end_layout
5329 \begin_layout Itemize
5330 gbc (Game Boy Color)
5331 \end_layout
5333 \begin_layout Itemize
5334 gbc_gba (Game Boy Color with GBA initial register values)
5335 \end_layout
5337 \end_deeper
5338 \begin_layout Itemize
5339 Optionally a region can be specified: 
5340 \begin_inset Quotes eld
5341 \end_inset
5343 region <region>
5344 \begin_inset Quotes erd
5345 \end_inset
5348  The following values are valid:
5349 \end_layout
5351 \begin_deeper
5352 \begin_layout Itemize
5353 autodetect (Autodetect region: snes and sgb only)
5354 \end_layout
5356 \begin_layout Itemize
5357 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5358 \end_layout
5360 \begin_layout Itemize
5361 pal (PAL: snes, sgb)
5362 \end_layout
5364 \begin_layout Itemize
5365 world (World: dmg, gbc, gbc_gba)
5366 \end_layout
5368 \end_deeper
5369 \begin_layout Itemize
5370 ROM images are loaded as: 
5371 \begin_inset Quotes eld
5372 \end_inset
5374 rom <type> <file>
5375 \begin_inset Quotes erd
5376 \end_inset
5379  The following types are valid:
5380 \end_layout
5382 \begin_deeper
5383 \begin_layout Itemize
5384 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5385  BIOS in bsx, bsxslotted, sufamiturbo)
5386 \end_layout
5388 \begin_layout Itemize
5389 bsx (Cartridge ROM in bsx, bsxslotted)
5390 \end_layout
5392 \begin_layout Itemize
5393 slot-a (Cartridge ROM in sufamiturbo)
5394 \end_layout
5396 \begin_layout Itemize
5397 slot-b (Cartridge ROM in sufamiturbo)
5398 \end_layout
5400 \end_deeper
5401 \begin_layout Itemize
5402 ROM markup can be loaded as: 
5403 \begin_inset Quotes eld
5404 \end_inset
5406 xml <type> <file>
5407 \begin_inset Quotes erd
5408 \end_inset
5411  The types valid are the same as for ROMs.
5412 \end_layout
5414 \begin_layout Itemize
5415 Patches can be loaded as 
5416 \begin_inset Quotes eld
5417 \end_inset
5419 patch[<offset>] <type> <file>
5420 \begin_inset Quotes erd
5421 \end_inset
5424  The types are the same as for ROMs.
5425 \end_layout
5427 \begin_deeper
5428 \begin_layout Itemize
5429 Offset is given in form [+-]<number>.
5430  Usually offset is either +0 or -512.
5431 \end_layout
5433 \begin_layout Itemize
5434 Default offset is +0.
5435 \end_layout
5437 \end_deeper
5438 \begin_layout Subsection
5439 Example:
5440 \end_layout
5442 \begin_layout LyX-Code
5443 [GAMEPACK FILE]
5444 \end_layout
5446 \begin_layout LyX-Code
5447 type snes
5448 \end_layout
5450 \begin_layout LyX-Code
5451 rom rom speedygonzales.sfc
5452 \end_layout
5454 \begin_layout LyX-Code
5455 patch-512 rom sonicthehedgehog.ips
5456 \end_layout
5458 \begin_layout Subsection
5459 Example 2:
5460 \end_layout
5462 \begin_layout LyX-Code
5463 [GAMEPACK FILE]
5464 \end_layout
5466 \begin_layout LyX-Code
5467 type sgb
5468 \end_layout
5470 \begin_layout LyX-Code
5471 rom rom supergameboy.sfc
5472 \end_layout
5474 \begin_layout LyX-Code
5475 rom dmg megamanV.dmg
5476 \end_layout
5478 \begin_layout Section
5479 Quick'n'dirty encode guide
5480 \end_layout
5482 \begin_layout Enumerate
5483 Start the emulator and load the ROM and movie file.
5484 \end_layout
5486 \begin_layout Enumerate
5487 Set large AVI option 'set-setting avi-large on'
5488 \end_layout
5490 \begin_layout Enumerate
5491 Enable dumping 'dump-avi tmpdump' 
5492 \end_layout
5494 \begin_layout Enumerate
5495 Unpause and let it run until you want to end dumping.
5496 \end_layout
5498 \begin_layout Enumerate
5499 Close the emulator (closing the window is the easiest way).
5500  Or use 'end-avi'.
5501 \end_layout
5503 \begin_layout Enumerate
5504 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5505  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5506 \end_layout
5508 \begin_layout Enumerate
5509 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5510 \end_layout
5512 \begin_layout Enumerate
5513 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5514  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5515 \end_layout
5517 \begin_layout Enumerate
5518 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5519  Now final.mkv contains quick'n'dirty encode.
5520 \end_layout
5522 \begin_layout Section
5523 Axis configurations for some gamepad types:
5524 \end_layout
5526 \begin_layout Subsection
5527 XBox360 controller:
5528 \end_layout
5530 \begin_layout Standard
5531 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5532 \end_layout
5534 \begin_layout LyX-Code
5535 set-axis joystick0axis2 pressure-+
5536 \end_layout
5538 \begin_layout LyX-Code
5539 set-axis joystick0axis5 pressure-+
5540 \end_layout
5542 \begin_layout Itemize
5543 This is needed for SDL only.
5544  EVDEV sets those types correctly.
5545 \end_layout
5547 \begin_layout Subsection
5548 PS3 
5549 \begin_inset Quotes eld
5550 \end_inset
5552 sixaxis
5553 \begin_inset Quotes erd
5554 \end_inset
5556  controller:
5557 \end_layout
5559 \begin_layout Standard
5560 Axes 8-19 should be disabled.
5561 \end_layout
5563 \begin_layout LyX-Code
5564 set-axis joystick0axis8 disabled
5565 \end_layout
5567 \begin_layout LyX-Code
5568 set-axis joystick0axis9 disabled
5569 \end_layout
5571 \begin_layout LyX-Code
5572 set-axis joystick0axis10 disabled
5573 \end_layout
5575 \begin_layout LyX-Code
5576 set-axis joystick0axis11 disabled
5577 \end_layout
5579 \begin_layout LyX-Code
5580 set-axis joystick0axis12 disabled
5581 \end_layout
5583 \begin_layout LyX-Code
5584 set-axis joystick0axis13 disabled
5585 \end_layout
5587 \begin_layout LyX-Code
5588 set-axis joystick0axis14 disabled
5589 \end_layout
5591 \begin_layout LyX-Code
5592 set-axis joystick0axis15 disabled
5593 \end_layout
5595 \begin_layout LyX-Code
5596 set-axis joystick0axis16 disabled
5597 \end_layout
5599 \begin_layout LyX-Code
5600 set-axis joystick0axis17 disabled
5601 \end_layout
5603 \begin_layout LyX-Code
5604 set-axis joystick0axis18 disabled
5605 \end_layout
5607 \begin_layout LyX-Code
5608 set-axis joystick0axis19 disabled
5609 \end_layout
5611 \begin_layout Section
5612 Errata:
5613 \end_layout
5615 \begin_layout Subsection
5616 Problems from BSNES core:
5617 \end_layout
5619 \begin_layout Itemize
5620 The whole pending save stuff.
5621 \end_layout
5623 \begin_layout Itemize
5624 Lack of layer hiding.
5625 \end_layout
5627 \begin_layout Itemize
5628 It is slow (especially accuracy).
5629 \end_layout
5631 \begin_layout Itemize
5632 Firmwares can't be loaded from ZIP archives.
5633 \end_layout
5635 \begin_layout Subsection
5636 Other problems:
5637 \end_layout
5639 \begin_layout Itemize
5640 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5641 \end_layout
5643 \begin_layout Itemize
5644 Audio for last dumped frame is not itself dumped.
5645 \end_layout
5647 \begin_layout Itemize
5648 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5649 \end_layout
5651 \begin_layout Itemize
5652 No menus, command based interface (SDL).
5653 \end_layout
5655 \begin_layout Itemize
5656 Long commands don't scroll.
5657 \end_layout
5659 \begin_layout Section
5660 Changelog:
5661 \end_layout
5663 \begin_layout Subsection
5664 rr0-beta1
5665 \end_layout
5667 \begin_layout Itemize
5668 Fix -Wall warnings
5669 \end_layout
5671 \begin_layout Itemize
5672 Fix dumper video corruption with levels 10-18.
5673 \end_layout
5675 \begin_layout Subsection
5676 rr0-beta2
5677 \end_layout
5679 \begin_layout Itemize
5680 Autofire
5681 \end_layout
5683 \begin_layout Itemize
5684 Lots of code cleanups
5685 \end_layout
5687 \begin_layout Itemize
5688 Lua interface to settings
5689 \end_layout
5691 \begin_layout Itemize
5692 Allow specifying AVI borders without Lua
5693 \end_layout
5695 \begin_layout Itemize
5696 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5697 \end_layout
5699 \begin_layout Itemize
5700 on_snoop lua callback
5701 \end_layout
5703 \begin_layout Itemize
5704 Faster movie loading and saving.
5705 \end_layout
5707 \begin_layout Subsection
5708 rr0-beta3
5709 \end_layout
5711 \begin_layout Itemize
5712 Joystick support
5713 \end_layout
5715 \begin_layout Subsection
5716 rr0-beta4
5717 \end_layout
5719 \begin_layout Itemize
5720 Fix multi-buttons
5721 \end_layout
5723 \begin_layout Itemize
5724 Save jukebox functionality.
5725 \end_layout
5727 \begin_layout Subsection
5728 rr0-beta5
5729 \end_layout
5731 \begin_layout Itemize
5732 Try to fix some nasty failing movie load edge cases
5733 \end_layout
5735 \begin_layout Itemize
5736 Allow specifying scripts to run on command line.
5737 \end_layout
5739 \begin_layout Subsection
5740 rr0-beta6
5741 \end_layout
5743 \begin_layout Itemize
5744 Major source code reorganization.
5745 \end_layout
5747 \begin_layout Itemize
5748 Backup savestates before overwriting.
5749 \end_layout
5751 \begin_layout Itemize
5752 Don't crash if loading initial state fails.
5753 \end_layout
5755 \begin_layout Subsection
5756 rr0-beta7
5757 \end_layout
5759 \begin_layout Itemize
5760 Fix firmware lookup
5761 \end_layout
5763 \begin_layout Itemize
5764 Fix author name parsing
5765 \end_layout
5767 \begin_layout Itemize
5768 Fix rerecord counting
5769 \end_layout
5771 \begin_layout Itemize
5772 (SDL) Print messages to console if SDL is uninitialized
5773 \end_layout
5775 \begin_layout Itemize
5776 Add movieinfo program
5777 \end_layout
5779 \begin_layout Itemize
5780 Fix loading movies starting from SRAM.
5781 \end_layout
5783 \begin_layout Subsection
5784 rr0-beta8
5785 \end_layout
5787 \begin_layout Itemize
5788 Add support for unattended dumping
5789 \end_layout
5791 \begin_layout Itemize
5792 Fix compiling for Win32
5793 \end_layout
5795 \begin_layout Itemize
5796 Don't lock up if sound can't be initialized
5797 \end_layout
5799 \begin_layout Itemize
5800 Strip trailing CR from commands
5801 \end_layout
5803 \begin_layout Itemize
5804 Don't try to do dubious things in global ctors (fix crash on startup)
5805 \end_layout
5807 \begin_layout Subsection
5808 rr0-beta9
5809 \end_layout
5811 \begin_layout Itemize
5812 Small documentation tweaking
5813 \end_layout
5815 \begin_layout Itemize
5816 Fix make clean
5817 \end_layout
5819 \begin_layout Itemize
5820 Fix major bug in modifier matching
5821 \end_layout
5823 \begin_layout Subsection
5824 rr0-beta10
5825 \end_layout
5827 \begin_layout Itemize
5828 Lots of documentation fixes
5829 \end_layout
5831 \begin_layout Itemize
5832 Use dedicated callbacks for event backcomm., not commands.
5833 \end_layout
5835 \begin_layout Itemize
5836 Ensure that the watchdog is not hit when executing delayed reset.
5837 \end_layout
5839 \begin_layout Itemize
5840 Remove errant tab from joystick message.
5841 \end_layout
5843 \begin_layout Subsection
5844 rr0-beta11
5845 \end_layout
5847 \begin_layout Itemize
5848 Make autofire operate in absolute time, not linear time
5849 \end_layout
5851 \begin_layout Itemize
5852 Reinitialize controls when resuming from loadstate
5853 \end_layout
5855 \begin_layout Itemize
5856 Some more code cleanups
5857 \end_layout
5859 \begin_layout Itemize
5860 If Lua allocator fails, call OOM_panic()
5861 \end_layout
5863 \begin_layout Itemize
5864 Byte/word/dword/qword sized host memory write/read functions.
5865 \end_layout
5867 \begin_layout Itemize
5868 Dump at correct framerate if dumping interlaced NTSC (height=448).
5869 \end_layout
5871 \begin_layout Subsection
5872 rr0-beta12
5873 \end_layout
5875 \begin_layout Itemize
5876 Actually include the complete source code
5877 \end_layout
5879 \begin_layout Itemize
5880 Keep track of RTC
5881 \end_layout
5883 \begin_layout Subsection
5884 rr0-beta13
5885 \end_layout
5887 \begin_layout Itemize
5888 Document {save,start}time.{,sub}second.
5889 \end_layout
5891 \begin_layout Itemize
5892 Intercept time() from bsnes core.
5893 \end_layout
5895 \begin_layout Subsection
5896 rr0-beta14
5897 \end_layout
5899 \begin_layout Itemize
5900 Allow disabling time() interception (allow build on Mac OS X)
5901 \end_layout
5903 \begin_layout Itemize
5904 Use SDLMain on Mac OS X (make SDL not crash)
5905 \end_layout
5907 \begin_layout Itemize
5908 Disable delayed resets (just plain too buggy for now).
5909 \end_layout
5911 \begin_layout Itemize
5912 Code cleanups
5913 \end_layout
5915 \begin_layout Itemize
5916 Use 16-bit for graphics/video instead of 32-bit.
5917 \end_layout
5919 \begin_layout Itemize
5920 gui.rectangle/gui.pixel
5921 \end_layout
5923 \begin_layout Itemize
5924 gui.crosshair
5925 \end_layout
5927 \begin_layout Itemize
5928 New CSCD writer implementation.
5929 \end_layout
5931 \begin_layout Subsection
5932 rr0-beta15
5933 \end_layout
5935 \begin_layout Itemize
5936 Fix interaction of * and +.
5937 \end_layout
5939 \begin_layout Itemize
5940 Manual improvements
5941 \end_layout
5943 \begin_layout Itemize
5944 Use gettimeofday()/usleep(), these seem portable enough.
5945 \end_layout
5947 \begin_layout Itemize
5948 Move joystick axis manipulation to keymapper code.
5949 \end_layout
5951 \begin_layout Itemize
5952 Changes to how read-only works.
5953 \end_layout
5955 \begin_layout Itemize
5956 Refactor controller input code.
5957 \end_layout
5959 \begin_layout Subsection
5960 rr0-beta16
5961 \end_layout
5963 \begin_layout Itemize
5964 Fix mouseclick scale compensation.
5965 \end_layout
5967 \begin_layout Itemize
5968 Draw area boundaries correctly in SDL code.
5969 \end_layout
5971 \begin_layout Itemize
5972 gui.screenshot.
5973 \end_layout
5975 \begin_layout Itemize
5976 Fix CSCD output (buffer overrun and race condition).
5977 \end_layout
5979 \begin_layout Subsection
5980 rr0-beta17
5981 \end_layout
5983 \begin_layout Itemize
5984 JMD dumping support.
5985 \end_layout
5987 \begin_layout Itemize
5988 Allow unattended dumping to JMD.
5989 \end_layout
5991 \begin_layout Itemize
5992 Move to BSNES v083.
5993 \end_layout
5995 \begin_layout Itemize
5996 Switch back to 32-bit colors.
5997 \end_layout
5999 \begin_layout Itemize
6000 Add Lua function gui.color.
6001 \end_layout
6003 \begin_layout Itemize
6004 Use some new C++11 features in GCC 4.6.
6005 \end_layout
6007 \begin_layout Itemize
6008 Be prepared for core frequency changes.
6009 \end_layout
6011 \begin_layout Itemize
6012 Pass colors in one chunk from Lua.
6013 \end_layout
6015 \begin_layout Subsection
6016 rr0-beta18
6017 \end_layout
6019 \begin_layout Itemize
6020 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
6021  memory.read_vma() and memory.find_vma().
6022 \end_layout
6024 \begin_layout Itemize
6025 Numerious documentation fixups
6026 \end_layout
6028 \begin_layout Itemize
6029 RTC time format changed
6030 \end_layout
6032 \begin_layout Itemize
6033 Reformat flags display
6034 \end_layout
6036 \begin_layout Itemize
6037 Allow lua package name to be overridden
6038 \end_layout
6040 \begin_layout Itemize
6041 SDUMP (high-quality dumping).
6042 \end_layout
6044 \begin_layout Itemize
6045 Split platform support to plugins.
6046 \end_layout
6048 \begin_layout Itemize
6049 Make all sound plugins support basic sound commands
6050 \end_layout
6052 \begin_layout Itemize
6053 Support portaudio for sound.
6054 \end_layout
6056 \begin_layout Itemize
6057 Allow disable Lua/SDL searching.
6058 \end_layout
6060 \begin_layout Itemize
6061 Upconvert colors when copying lcscreen to screen.
6062 \end_layout
6064 \begin_layout Itemize
6065 Reorganize source tree.
6066 \end_layout
6068 \begin_layout Itemize
6069 Evdev joystick support.
6070 \end_layout
6072 \begin_layout Itemize
6073 Refactor more code into generic window code.
6074 \end_layout
6076 \begin_layout Subsection
6077 rr0-beta19
6078 \end_layout
6080 \begin_layout Itemize
6081 Refactor message handling.
6082 \end_layout
6084 \begin_layout Itemize
6085 Rework makefile
6086 \end_layout
6088 \begin_layout Itemize
6089 Documentation fixes
6090 \end_layout
6092 \begin_layout Itemize
6093 Finish pending saves before load/quit.
6094 \end_layout
6096 \begin_layout Itemize
6097 Wxwidgets graphics plugin.
6098 \end_layout
6100 \begin_layout Subsection
6101 rr0-beta20
6102 \end_layout
6104 \begin_layout Itemize
6105 Get rid of win32-crap.[ch]pp.
6106 \end_layout
6108 \begin_layout Itemize
6109 Move files around a lot.
6110 \end_layout
6112 \begin_layout Itemize
6113 Get rid of need for host C++ compiler.
6114 \end_layout
6116 \begin_layout Itemize
6117 Bsnes v084 core.
6118 \end_layout
6120 \begin_layout Itemize
6121 Refactor inter-component communication.
6122 \end_layout
6124 \begin_layout Itemize
6125 Fix zero luma.
6126 \end_layout
6128 \begin_layout Itemize
6129 Fix crash on multiline aliases.
6130 \end_layout
6132 \begin_layout Itemize
6133 Load/Save settings in wxwidgets gui.
6134 \end_layout
6136 \begin_layout Subsection
6137 rr0-beta21
6138 \end_layout
6140 \begin_layout Itemize
6141 Patch problems in bsnes core
6142 \end_layout
6144 \begin_layout Itemize
6145 SNES is little-endian, not big-endian!
6146 \end_layout
6148 \begin_layout Itemize
6149 Fix memory corruption in lcscreen::load()
6150 \end_layout
6152 \begin_layout Subsection
6153 rr0-beta22
6154 \end_layout
6156 \begin_layout Itemize
6157 Fix interpretting repeat counts in rrdata loading.
6158 \end_layout
6160 \begin_layout Itemize
6161 New lua callback: on_frame()
6162 \end_layout
6164 \begin_layout Itemize
6165 Remove calls to runtosave() that aren't supposed to be there
6166 \end_layout
6168 \begin_layout Itemize
6169 Lua function: movie.read_rtc()
6170 \end_layout
6172 \begin_layout Itemize
6173 Ignore src/fonts/font.cpp
6174 \end_layout
6176 \begin_layout Itemize
6177 Fix more bsnes core problems
6178 \end_layout
6180 \begin_layout Itemize
6181 Control bsnes random seeding
6182 \end_layout
6184 \begin_layout Itemize
6185 Pause-on-end
6186 \end_layout
6188 \begin_layout Itemize
6189 Some bsnes core debugging features (state dump and state hash)
6190 \end_layout
6192 \begin_layout Itemize
6193 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6194  it was 'lsnes rr0-beta21').
6195 \end_layout
6197 \begin_layout Subsection
6198 rr0-beta23
6199 \end_layout
6201 \begin_layout Itemize
6202 Fix memory corruption due to macro/field mixup
6203 \end_layout
6205 \begin_layout Itemize
6206 search-memory update
6207 \end_layout
6209 \begin_layout Itemize
6210 Allow direct-mapped framebuffer
6211 \end_layout
6213 \begin_layout Itemize
6214 SDL: Use SDL_ANYFORMAT if possible
6215 \end_layout
6217 \begin_layout Itemize
6218 SDMP2SOX: 2s delay modes.
6219 \end_layout
6221 \begin_layout Itemize
6222 Wxwidgets: Cleanups
6223 \end_layout
6225 \begin_layout Itemize
6226 Use sed -E, not sed -r.
6227  Fixes building on Mac OS X.
6228 \end_layout
6230 \begin_layout Itemize
6231 Wxwidgets: Save jukebox on exit
6232 \end_layout
6234 \begin_layout Itemize
6235 Fix RTC if using load-movie on savestate.
6236 \end_layout
6238 \begin_layout Itemize
6239 Fix crash related to full console mode.
6240 \end_layout
6242 \begin_layout Subsection
6243 rr0-beta24
6244 \end_layout
6246 \begin_layout Itemize
6247 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6248 \end_layout
6250 \begin_layout Itemize
6251 Wxwidgets: Allow compiling on Mac OS X.
6252 \end_layout
6254 \begin_layout Itemize
6255 Use movie compare instead of movie hashing (faster save/load).
6256 \end_layout
6258 \begin_layout Itemize
6259 Lua: _SYSTEM table.
6260 \end_layout
6262 \begin_layout Subsection
6263 rr0-beta25
6264 \end_layout
6266 \begin_layout Itemize
6267 sdmp2sox: Pad soundtrack if using -l or -L.
6268 \end_layout
6270 \begin_layout Itemize
6271 sdmp2sox: Fix NTSC overscan.
6272 \end_layout
6274 \begin_layout Itemize
6275 sdmp2sox: Add AR correction mode.
6276 \end_layout
6278 \begin_layout Itemize
6279 call lua_close() when exiting.
6280 \end_layout
6282 \begin_layout Itemize
6283 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6284 \end_layout
6286 \begin_layout Subsection
6287 rr0-beta26
6288 \end_layout
6290 \begin_layout Itemize
6291 Fix IPS patching code (use bsnes core IPS patcher).
6292 \end_layout
6294 \begin_layout Itemize
6295 Implement BPS patching (using bsnes core IPS patcher).
6296 \end_layout
6298 \begin_layout Itemize
6299 Add feature to load headered ROMs.
6300 \end_layout
6302 \begin_layout Subsection
6303 rr0-beta27
6304 \end_layout
6306 \begin_layout Itemize
6307 Show command names when showing keybindings
6308 \end_layout
6310 \begin_layout Subsection
6312 \end_layout
6314 \begin_layout Itemize
6315 Fix pause-on-end to be actually controllable
6316 \end_layout
6318 \begin_layout Itemize
6319 SDL: Poll all events in queue, not just first one (fixes slowness in command
6320  typing)
6321 \end_layout
6323 \begin_layout Itemize
6324 Wxwidgets: Fix ROM loading.
6325 \end_layout
6327 \begin_layout Subsection
6328 rr1-beta0
6329 \end_layout
6331 \begin_layout Itemize
6332 Lua: Add gui.textH, gui.textV, gui.textHV
6333 \end_layout
6335 \begin_layout Itemize
6336 Fix text colors on SDL on Mac OS X
6337 \end_layout
6339 \begin_layout Itemize
6340 Mode 'F' for finished in readonly mode.
6341 \end_layout
6343 \begin_layout Itemize
6344 Fix some WS errors.
6345 \end_layout
6347 \begin_layout Itemize
6348 Reliably pause after skip poll
6349 \end_layout
6351 \begin_layout Itemize
6352 Split UI and core into their own threads
6353 \end_layout
6355 \begin_layout Subsection
6356 rr1-beta1
6357 \end_layout
6359 \begin_layout Itemize
6360 Remove leftover dummy SRAM slot
6361 \end_layout
6363 \begin_layout Itemize
6364 Fix controller numbers.
6365 \end_layout
6367 \begin_layout Subsection
6368 rr1-beta2
6369 \end_layout
6371 \begin_layout Itemize
6372 Fix lsnes-dumpavi after interface change.
6373 \end_layout
6375 \begin_layout Itemize
6376 Also give BSNES patches for v085.
6377 \end_layout
6379 \begin_layout Itemize
6380 Pack movie data in memory.
6381 \end_layout
6383 \begin_layout Subsection
6384 rr1-beta3
6385 \end_layout
6387 \begin_layout Itemize
6388 Fix framecount/length given when loading movies.
6389 \end_layout
6391 \begin_layout Itemize
6392 Controller command memory leak fixes.
6393 \end_layout
6395 \begin_layout Itemize
6396 Don't leak palette if freeing screen object.
6397 \end_layout
6399 \begin_layout Subsection
6400 rr1-beta4
6401 \end_layout
6403 \begin_layout Itemize
6404 Detect revisions.
6405 \end_layout
6407 \begin_layout Itemize
6408 Wxwidgets: Allow controlling dumper from the menu.
6409 \end_layout
6411 \begin_layout Subsection
6412 rr1-beta5
6413 \end_layout
6415 \begin_layout Itemize
6416 Rewrite parts of manual
6417 \end_layout
6419 \begin_layout Itemize
6420 Lua: Make it work with Lua 5.2.
6421 \end_layout
6423 \begin_layout Subsection
6424 rr1-beta6
6425 \end_layout
6427 \begin_layout Itemize
6428 Win32: Fix compile errors.
6429 \end_layout
6431 \begin_layout Subsection
6432 rr1-beta7
6433 \end_layout
6435 \begin_layout Itemize
6436 Refactor controller input code.
6437 \end_layout
6439 \begin_layout Itemize
6440 Fix crash when using command line on SDL / Mac OS X.
6441 \end_layout
6443 \begin_layout Subsection
6444 rr1-beta8
6445 \end_layout
6447 \begin_layout Itemize
6448 Delete core/coroutine (obsolete)
6449 \end_layout
6451 \begin_layout Itemize
6452 Lag input display by one frame.
6453 \end_layout
6455 \begin_layout Itemize
6456 Rewind movie to beginning function.
6457 \end_layout
6459 \begin_layout Itemize
6460 Fix wrong frame number reported to Lua when repainting after loadstate
6461 \end_layout
6463 \begin_layout Itemize
6464 Support UI editing of jukebox
6465 \end_layout
6467 \begin_layout Itemize
6468 Wxwidgets: Save settings on exit.
6469 \end_layout
6471 \begin_layout Itemize
6472 Support ${project} for filenames
6473 \end_layout
6475 \begin_layout Itemize
6476 SDL: Fix command history
6477 \end_layout
6479 \begin_layout Subsection
6480 rr1-beta9
6481 \end_layout
6483 \begin_layout Itemize
6484 Fix some order-of-global-ctor bugs.
6485 \end_layout
6487 \begin_layout Subsection
6488 rr1-beta10
6489 \end_layout
6491 \begin_layout Itemize
6492 Fix crashes when quitting on Win32.
6493 \end_layout
6495 \begin_layout Subsection
6496 rr1-beta11
6497 \end_layout
6499 \begin_layout Itemize
6500 EVDEV: Queue keypresses from joystick, don't send directly
6501 \end_layout
6503 \begin_layout Itemize
6504 Wxwidgets: Load-Preserve that actually works.
6505 \end_layout
6507 \begin_layout Subsection
6508 rr1-beta12
6509 \end_layout
6511 \begin_layout Itemize
6512 Wxwidgets: GUI for memory search.
6513 \end_layout
6515 \begin_layout Itemize
6516 Warn about using synchronous queue in UI callback.
6517 \end_layout
6519 \begin_layout Subsection
6520 rr1-beta13
6521 \end_layout
6523 \begin_layout Itemize
6524 Remember last saved file for each ROM
6525 \end_layout
6527 \begin_layout Itemize
6528 Support MT dumping via boost.
6529 \end_layout
6531 \begin_layout Itemize
6532 Lua: input.raw
6533 \end_layout
6535 \begin_layout Itemize
6536 Lua: input.keyhook
6537 \end_layout
6539 \begin_layout Itemize
6540 Make mouse be ordinary input instead of special-casing
6541 \end_layout
6543 \begin_layout Itemize
6544 SDL: Don't screw up commands with NUL codepoints.
6545 \end_layout
6547 \begin_layout Subsection
6548 rr1-beta14
6549 \end_layout
6551 \begin_layout Itemize
6552 Merge status panel and main window
6553 \end_layout
6555 \begin_layout Itemize
6556 True movie slot support (the rest of it)
6557 \end_layout
6559 \begin_layout Itemize
6560 SDL: Fix compilation error
6561 \end_layout
6563 \begin_layout Itemize
6564 Elminate cross calls in dump menu code.
6565 \end_layout
6567 \begin_layout Subsection
6568 rr1-beta15
6569 \end_layout
6571 \begin_layout Itemize
6572 Cancel pending saves command
6573 \end_layout
6575 \begin_layout Itemize
6576 Wxwidgets: Code refactoring
6577 \end_layout
6579 \begin_layout Itemize
6580 Wxwidgets: Fix system -> reset
6581 \end_layout
6583 \begin_layout Itemize
6584 Wxwidgets: Read watch expressions in the right thread
6585 \end_layout
6587 \begin_layout Subsection
6588 rr1-beta16
6589 \end_layout
6591 \begin_layout Itemize
6592 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6593  support that).
6594 \end_layout
6596 \begin_layout Itemize
6597 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6598 \end_layout
6600 \begin_layout Itemize
6601 Don't append trailing '-' to prefix when saving movie.
6602 \end_layout
6604 \begin_layout Itemize
6605 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6606 \end_layout
6608 \begin_layout Subsection
6610 \end_layout
6612 \begin_layout Itemize
6613 Document memory watch syntax.
6614 \end_layout
6616 \begin_layout Subsection
6617 rr1-delta1
6618 \end_layout
6620 \begin_layout Itemize
6621 Fix unattended dumping (lsnes-dumpavi)
6622 \end_layout
6624 \begin_layout Itemize
6625 Support RAW dumping
6626 \end_layout
6628 \begin_layout Itemize
6629 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6630 \end_layout
6632 \begin_layout Itemize
6633 Add option to control sample rate preturbation in AVI dumper
6634 \end_layout
6636 \begin_layout Subsection
6637 rr1-delta2
6638 \end_layout
6640 \begin_layout Itemize
6641 Wxwidgets: Fix dumper submodes
6642 \end_layout
6644 \begin_layout Itemize
6645 Set core controller types before loadstate
6646 \end_layout
6648 \begin_layout Subsection
6649 rr1-delta2epsilon1
6650 \end_layout
6652 \begin_layout Itemize
6653 Fix compiling with bsnes v086.
6654 \end_layout
6656 \begin_layout Subsection
6657 rr1-delta3
6658 \end_layout
6660 \begin_layout Itemize
6661 Don't prompt before quitting
6662 \end_layout
6664 \begin_layout Itemize
6665 Start unpaused, preserve pause/unpause over load.
6666 \end_layout
6668 \begin_layout Itemize
6669 Try to autodetect if ROM is headered.
6670 \end_layout
6672 \begin_layout Itemize
6673 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6674 \end_layout
6676 \begin_layout Itemize
6677 Allow configuring some hotkeys.
6678 \end_layout
6680 \begin_layout Subsection
6681 rr1-delta4
6682 \end_layout
6684 \begin_layout Itemize
6685 Lots of code cleanups
6686 \end_layout
6688 \begin_layout Itemize
6689 Fix JMD compression (JMD dumping was broken)
6690 \end_layout
6692 \begin_layout Itemize
6693 Don't crash if Lua C function throws an exception.
6694 \end_layout
6696 \begin_layout Itemize
6697 Support bitmap drawing in Lua.
6698 \end_layout
6700 \begin_layout Itemize
6701 Fix bsnes v085/v086 patches.
6702 \end_layout
6704 \begin_layout Itemize
6705 Improve stability on win32.
6706 \end_layout
6708 \begin_layout Subsection
6709 rr1-delta4epsilon1
6710 \end_layout
6712 \begin_layout Itemize
6713 Don't corrupt movie if movie length is integer multiple of frames per page.
6714 \end_layout
6716 \begin_layout Subsection
6717 rr1-delta5
6718 \end_layout
6720 \begin_layout Itemize
6721 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6722 \end_layout
6724 \begin_layout Itemize
6725 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6726 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6728 \end_layout
6730 \begin_layout Itemize
6731 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6732 \end_layout
6734 \begin_layout Itemize
6735 Wxwidgets: Fix broken modifiers
6736 \end_layout
6738 \begin_layout Itemize
6739 on_paint has parameter now.
6740 \end_layout
6742 \begin_layout Itemize
6743 Optional initital fill for bitmaps
6744 \end_layout
6746 \begin_layout Itemize
6747 Fix palette changing.
6748 \end_layout
6750 \begin_layout Itemize
6751 Optimize rendering a bit.
6752 \end_layout
6754 \begin_layout Itemize
6755 Bsnes v087 support.
6756 \end_layout
6758 \begin_layout Subsection
6759 rr1-delta5epsilon1
6760 \end_layout
6762 \begin_layout Itemize
6763 Movieinfo: Fix display of port #2 type.
6764 \end_layout
6766 \begin_layout Itemize
6767 Call on_input() after loadstate.
6768 \end_layout
6770 \begin_layout Subsection
6771 rr1-delta5epsilon2
6772 \end_layout
6774 \begin_layout Itemize
6775 Fix writing port2 data to movie.
6776 \end_layout
6778 \begin_layout Itemize
6779 Fix SRAM handling with Bsnes v087.
6780 \end_layout
6782 \begin_layout Subsection
6783 rr1-delta6
6784 \end_layout
6786 \begin_layout Itemize
6787 Library loading support
6788 \end_layout
6790 \begin_layout Itemize
6791 Built-in TSCC encoder
6792 \end_layout
6794 \begin_layout Itemize
6795 Hi-color (256T colors) dumping.
6796 \end_layout
6798 \begin_layout Itemize
6799 Dump over TCP/IP(v6)
6800 \end_layout
6802 \begin_layout Itemize
6803 Hidable status panel
6804 \end_layout
6806 \begin_layout Itemize
6807 Turbo toggle/hold
6808 \end_layout
6810 \begin_layout Itemize
6811 Adjustable sound volume
6812 \end_layout
6814 \begin_layout Itemize
6815 Screen scaling
6816 \end_layout
6818 \begin_layout Itemize
6819 Allow DnD into filename boxes
6820 \end_layout
6822 \begin_layout Itemize
6823 Configurable paths
6824 \end_layout
6826 \begin_layout Itemize
6827 Portaudio: Fix speaker popping at start
6828 \end_layout
6830 \begin_layout Itemize
6831 Lots of UI changes
6832 \end_layout
6834 \begin_layout Itemize
6835 Speed adjustment menu
6836 \end_layout
6838 \begin_layout Itemize
6839 Win32 joystick support
6840 \end_layout
6842 \begin_layout Itemize
6843 Lua: gui.rainbow and gui.box
6844 \end_layout
6846 \begin_layout Itemize
6847 Split key lists into classes (the key list was large!)
6848 \end_layout
6850 \begin_layout Itemize
6851 More save slots support
6852 \end_layout
6854 \begin_layout Itemize
6855 Wxwidgets (wxJoystick) joystick support
6856 \end_layout
6858 \begin_layout Subsection
6859 rr1-delta7
6860 \end_layout
6862 \begin_layout Itemize
6863 Lots of internal joystick refactoring
6864 \end_layout
6866 \begin_layout Itemize
6867 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6868 \end_layout
6870 \begin_layout Itemize
6871 Wxwidgets: Settings mode (open settings without ROM)
6872 \end_layout
6874 \begin_layout Itemize
6875 Wxwidgets: Prompt key to use option
6876 \end_layout
6878 \begin_layout Itemize
6879 Wxwidgets: Fix crash if key goes away underneath
6880 \end_layout
6882 \begin_layout Itemize
6883 Wxwidgets: Fix mouse position in presence of scaling
6884 \end_layout
6886 \begin_layout Itemize
6887 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6888 \end_layout
6890 \begin_layout Itemize
6891 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6892  seem to work well on WinXP)
6893 \end_layout
6895 \begin_layout Itemize
6896 Start paused option.
6897 \end_layout
6899 \begin_layout Subsection
6900 rr1-delta7epsilon1
6901 \end_layout
6903 \begin_layout Itemize
6904 AVI: ZMBV support
6905 \end_layout
6907 \begin_layout Itemize
6908 lsnes-dumpavi: Start Lua before starting dumper
6909 \end_layout
6911 \begin_layout Itemize
6912 AVI: Fix secondary audio in mode 4.
6913 \end_layout
6915 \begin_layout Subsection
6916 rr1-delta7epsilon2
6917 \end_layout
6919 \begin_layout Itemize
6920 AVI: Refactor ZMBV a bit.
6921 \end_layout
6923 \begin_layout Itemize
6924 Fix error reading analog values from movie file
6925 \end_layout
6927 \begin_layout Subsection
6928 rr1-delta8
6929 \end_layout
6931 \begin_layout Itemize
6932 Delayed reset support
6933 \end_layout
6935 \begin_layout Itemize
6936 Lua: memory.hash_region
6937 \end_layout
6939 \begin_layout Subsection
6940 rr1-delta8epsilon1
6941 \end_layout
6943 \begin_layout Itemize
6944 Rework the build system
6945 \end_layout
6947 \begin_layout Itemize
6948 Typing input support
6949 \end_layout
6951 \begin_layout Itemize
6952 Fix building with bsnes v086 and v087.
6953 \end_layout
6955 \begin_layout Itemize
6956 SDL: Save settings on exit
6957 \end_layout
6959 \begin_layout Itemize
6960 SDL: Command to enter command line mode with given command.
6961 \end_layout
6963 \begin_layout Itemize
6964 SDL: More advanced command editing.
6965 \end_layout
6967 \begin_layout Subsection
6968 rr1-delta9
6969 \end_layout
6971 \begin_layout Itemize
6972 wxMSW: Fix the 
6973 \begin_inset Quotes eld
6974 \end_inset
6976 arrow keys and enter don't work
6977 \begin_inset Quotes erd
6978 \end_inset
6980  problem
6981 \end_layout
6983 \begin_layout Itemize
6984 MSU-1 support
6985 \end_layout
6987 \begin_layout Itemize
6988 Show mode changes due to rewinding.
6989 \end_layout
6991 \begin_layout Itemize
6992 Unsafe rewind support
6993 \end_layout
6995 \begin_layout Itemize
6996 Fix directory transversal.
6997 \end_layout
6999 \begin_layout Subsection
7000 rr1-delta10
7001 \end_layout
7003 \begin_layout Itemize
7004 AVI: Sound mode 5 (48kHz high-quality)
7005 \end_layout
7007 \begin_layout Itemize
7008 Lua: Reset Lua VM
7009 \end_layout
7011 \begin_layout Itemize
7012 Map the SNES bus into address space
7013 \end_layout
7015 \begin_layout Itemize
7016 Fix loading memory watch files with CRLF line endings
7017 \end_layout
7019 \begin_layout Subsection
7020 rr1-delta10epsilon1
7021 \end_layout
7023 \begin_layout Itemize
7024 Map bsnes internal state into memory space
7025 \end_layout
7027 \begin_layout Itemize
7028 Fix the 
7029 \begin_inset Quotes eld
7030 \end_inset
7032 click on panel wedges the emulator
7033 \begin_inset Quotes erd
7034 \end_inset
7036  for real.
7037 \end_layout
7039 \begin_layout Itemize
7040 DnD movies/saves on the main window.
7041 \end_layout
7043 \begin_layout Subsection
7044 rr1-delta11
7045 \end_layout
7047 \begin_layout Itemize
7048 Split core bindings into own module.
7049 \end_layout
7051 \begin_layout Itemize
7052 Remember invalid settings
7053 \end_layout
7055 \begin_layout Itemize
7056 Support for modified Gambatte core for GB/GBC emulation.
7057 \end_layout
7059 \begin_layout Itemize
7060 Reload/swap ROM function
7061 \end_layout
7063 \begin_layout Subsection
7064 rr1-delta11epsilon1
7065 \end_layout
7067 \begin_layout Itemize
7068 Fix step poll function
7069 \end_layout
7071 \begin_layout Subsection
7072 rr1-delta12
7073 \end_layout
7075 \begin_layout Itemize
7076 Non-insane savestate anchoring
7077 \end_layout
7079 \begin_layout Subsection
7080 rr1-delta13
7081 \end_layout
7083 \begin_layout Itemize
7084 More Memory search methods
7085 \end_layout
7087 \begin_layout Itemize
7088 Preserve movie if loading in RO mode.
7089 \end_layout
7091 \begin_layout Itemize
7092 Fix a obscure case in timeline check
7093 \end_layout
7095 \begin_layout Itemize
7096 Revamp the entiere ROM loading code
7097 \end_layout
7099 \begin_layout Itemize
7100 Support DnD on ROMs
7101 \end_layout
7103 \begin_layout Itemize
7104 Revamp menu layout
7105 \end_layout
7107 \begin_layout Itemize
7108 Standalone hotkey config dialog
7109 \end_layout
7111 \begin_layout Itemize
7112 Show bindings in more user-friendly format
7113 \end_layout
7115 \begin_layout Subsection
7116 rr1-delta13epsilon1
7117 \end_layout
7119 \begin_layout Itemize
7120 Pipedec support
7121 \end_layout
7123 \begin_layout Itemize
7124 Fix uninitialized variables in bsnes v085
7125 \end_layout
7127 \begin_layout Subsection
7128 rr1-delta14
7129 \end_layout
7131 \begin_layout Itemize
7132 Merge gambatte core into mainline (from its own branch)
7133 \end_layout
7135 \begin_layout Itemize
7136 Wxwidgets: Show expected dump file formats
7137 \end_layout
7139 \begin_layout Itemize
7140 Memory watch: Data typing
7141 \end_layout
7143 \begin_layout Itemize
7144 lsnes internal MMIO area.
7145 \end_layout
7147 \begin_layout Itemize
7148 Wxwidgets: New memory watch editor
7149 \end_layout
7151 \begin_layout Itemize
7152 Hexadecimal memory watches
7153 \end_layout
7155 \begin_layout Itemize
7156 Wxwidgets: Monospaced panel
7157 \end_layout
7159 \begin_layout Itemize
7160 Wxwidgets: Split memory watches in panel
7161 \end_layout
7163 \begin_layout Itemize
7164 Wxwidgets: Disable VMAs in memory search
7165 \end_layout
7167 \begin_layout Itemize
7168 lsnes-dumpavi: Fix speed bug
7169 \end_layout
7171 \begin_layout Itemize
7172 Movie subtitle support
7173 \end_layout
7175 \begin_layout Itemize
7176 Fix rerecord count reporting
7177 \end_layout
7179 \begin_layout Itemize
7180 Don't trash movie when loading in readonly mode.
7181 \end_layout
7183 \begin_layout Subsection
7184 rr1-delta14epsilon1
7185 \end_layout
7187 \begin_layout Itemize
7188 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7189 \end_layout
7191 \begin_layout Itemize
7192 Fix build on Mac OS X.
7193 \end_layout
7195 \begin_layout Itemize
7196 Lua: loopwrapper
7197 \end_layout
7199 \begin_layout Itemize
7200 Wxwidgets: Hidable messages window
7201 \end_layout
7203 \begin_layout Itemize
7204 Lua: input.joyset
7205 \end_layout
7207 \begin_layout Itemize
7208 Bsnes: Support inconsistent saves
7209 \end_layout
7211 \begin_layout Itemize
7212 Bsnes: Allow simulating saving every frame
7213 \end_layout
7215 \begin_layout Itemize
7216 Fix desync if savestate is loaded in readonly mode in certain conditions.
7217 \end_layout
7219 \begin_layout Itemize
7220 Wxwidgets: Fix save dialogs on Mac OS X.
7221 \end_layout
7223 \begin_layout Itemize
7224 Wxwidgets: Fix insane status width on Win32.
7225 \end_layout
7227 \begin_layout Itemize
7228 Wxwidgets: Fix autohold processing to be faster.
7229 \end_layout
7231 \begin_layout Itemize
7232 Wxwidgets: Allow loading ROMs and movies from commandline.
7233 \end_layout
7235 \begin_layout Subsection
7236 rr1-delta15
7237 \end_layout
7239 \begin_layout Itemize
7240 Be a bit smarter with --load
7241 \end_layout
7243 \begin_layout Itemize
7244 Rewrote higher-level parts of audio system
7245 \end_layout
7247 \begin_layout Itemize
7248 Tool to build commentary tracks
7249 \end_layout
7251 \begin_layout Itemize
7252 Lua: input.joyget
7253 \end_layout
7255 \begin_layout Itemize
7256 Gambatte: Add support for SVN358
7257 \end_layout
7259 \begin_layout Itemize
7260 Use builtin font when rendering status panel.
7261 \end_layout
7263 \begin_layout Itemize
7264 Option to detach memory watch to its own window.
7265 \end_layout
7267 \begin_layout Itemize
7268 Recent ROMs/Movies menu
7269 \end_layout
7271 \begin_layout Itemize
7272 Libao support
7273 \end_layout
7275 \begin_layout Itemize
7276 Useful lag counter for SNES games that autopoll
7277 \end_layout
7279 \begin_layout Itemize
7280 Fix buffer overflow in gambatte sound output
7281 \end_layout
7283 \begin_layout Subsection
7284 rr1-delta15epsilon1
7285 \end_layout
7287 \begin_layout Itemize
7288 Don't blow up on wxGTK if the window is hidden somehow
7289 \end_layout
7291 \begin_layout Itemize
7292 Support simultaneous drop of ROM and movie.
7293 \end_layout
7295 \begin_layout Itemize
7296 Gambatte: Don't save spurious SRAMs.
7297 \end_layout
7299 \begin_layout Itemize
7300 Make SGB ROMs actually usable.
7301 \end_layout
7303 \begin_layout Itemize
7304 Fix so that saved movies appear in recent movies.
7305 \end_layout
7307 \begin_layout Itemize
7308 Don't open multiple commentary editors at once.
7309 \end_layout
7311 \begin_layout Subsection
7312 rr1-delta15epsilon2
7313 \end_layout
7315 \begin_layout Itemize
7316 Lua: memory.readregion/memory.writeregion
7317 \end_layout
7319 \begin_layout Itemize
7320 Lua: memory.map{,s}{byte,word,dword,qword}
7321 \end_layout
7323 \begin_layout Itemize
7324 Lua: memory.map_structure
7325 \end_layout
7327 \begin_layout Itemize
7328 Lua: Fix bus_address for gambatte
7329 \end_layout
7331 \begin_layout Itemize
7332 Fix features dependent of bsnes debugger
7333 \end_layout
7335 \begin_layout Itemize
7336 Cleanup bsnes debugger logic
7337 \end_layout
7339 \begin_layout Itemize
7340 Fix resets in presence of save every frame
7341 \end_layout
7343 \begin_layout Subsection
7344 rr1-delta15epsilon3
7345 \end_layout
7347 \begin_layout Itemize
7348 Lua: input.lcid_to_pcid
7349 \end_layout
7351 \begin_layout Itemize
7352 Fix off-by-one bug with slot hashes
7353 \end_layout
7355 \begin_layout Itemize
7356 Fix crashes on certain memory watch expressions
7357 \end_layout
7359 \begin_layout Itemize
7360 Lua: memory.read_expr
7361 \end_layout
7363 \begin_layout Itemize
7364 Lua: Fix memory.read_expr on nil argument
7365 \end_layout
7367 \begin_layout Itemize
7368 Fix the code to compile on G++ 4.7
7369 \end_layout
7371 \begin_layout Itemize
7372 Change button_id to be a function pointer field, not a virtual method
7373 \end_layout
7375 \begin_layout Itemize
7376 Add bsnes patches to fix libsnes to compile on GCC 4.7
7377 \end_layout
7379 \begin_layout Itemize
7380 Gambatte: Always use legacy lag counting
7381 \end_layout
7383 \begin_layout Itemize
7384 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
7385 \end_layout
7387 \begin_layout Itemize
7388 Fix analog controllers
7389 \end_layout
7391 \begin_layout Itemize
7392 Fix autohold menus
7393 \end_layout
7395 \begin_layout Itemize
7396 Fix button symbols in input display
7397 \end_layout
7399 \begin_layout Itemize
7400 Compensate for nuts bsnes superscope/justifier handling
7401 \end_layout
7403 \begin_layout Itemize
7404 Lua: Fix bit.extract boolean handling
7405 \end_layout
7407 \end_body
7408 \end_document