Lua: memory.readregion / memory.writeregion
[lsnes.git] / manual.lyx
blob66bb0e5467c25c4a5bbf838d8cf005d174bf2328
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua (if Lua support is needed).
148 \end_layout
150 \begin_deeper
151 \begin_layout Itemize
152 Version 5.1.X or 5.2X.
153 \end_layout
155 \end_deeper
156 \begin_layout Enumerate
157 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
158 \end_layout
160 \begin_layout Section
161 Building
162 \end_layout
164 \begin_layout Itemize
165 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
166  bsnes core).
167 \end_layout
169 \begin_layout Itemize
170 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
171 \end_layout
173 \begin_layout Itemize
174 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
175 >', bsnes core)
176 \end_layout
178 \begin_layout Itemize
179 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
180 ersion>', gambatte core)
181 \end_layout
183 \begin_layout Itemize
184 Edit options.build (or copy of that file)
185 \end_layout
187 \begin_layout Itemize
188 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
190 \end_layout
192 \begin_layout Section
193 Command line options
194 \end_layout
196 \begin_layout Subsection
197 ROM options
198 \end_layout
200 \begin_layout Subsubsection
201 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
202 \end_layout
204 \begin_layout Standard
205 Load <file> as ROM.
206 \end_layout
208 \begin_layout Subsection
209 Session options
210 \end_layout
212 \begin_layout Subsubsection
213 --pause
214 \end_layout
216 \begin_layout Standard
217 Start paused
218 \end_layout
220 \begin_layout Subsubsection
221 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
222 \end_layout
224 \begin_layout Standard
225 Load <filename> as movie or savestate file.
226  All other session options are ignored.
227 \end_layout
229 \begin_layout Subsubsection
230 --port1=<device> (lsnes/SDL, bsnes core only)
231 \end_layout
233 \begin_layout Standard
234 Set type of port1.
235  Valid values are:
236 \end_layout
238 \begin_layout Itemize
239 none: No device connected
240 \end_layout
242 \begin_layout Itemize
243 gamepad: One gamepad (the default)
244 \end_layout
246 \begin_layout Itemize
247 multitap: Four gamepads (warning: makes most games refuse to start)
248 \end_layout
250 \begin_layout Itemize
251 mouse: Mouse.
252 \end_layout
254 \begin_layout Subsubsection
255 --port2=<type> (lsnes/SDL, bsnes core only)
256 \end_layout
258 \begin_layout Standard
259 Set type of port2.
260  Valid values are:
261 \end_layout
263 \begin_layout Itemize
264 none: No device connected (the default)
265 \end_layout
267 \begin_layout Itemize
268 gamepad: One gamepad
269 \end_layout
271 \begin_layout Itemize
272 multitap: Four gamepads.
273 \end_layout
275 \begin_layout Itemize
276 mouse: Mouse
277 \end_layout
279 \begin_layout Itemize
280 superscope: Super Scope
281 \end_layout
283 \begin_layout Itemize
284 justifier: One justifier
285 \end_layout
287 \begin_layout Itemize
288 justifiers: Two justifiers
289 \end_layout
291 \begin_layout Subsubsection
292 --gamename=<name> (lsnes/SDL)
293 \end_layout
295 \begin_layout Standard
296 Set the name of game to <name>.
297  Default is blank.
298 \end_layout
300 \begin_layout Subsubsection
301 --author=<name> (lsnes/SDL)
302 \end_layout
304 \begin_layout Standard
305 Add author with full name of <name> (no nickname).
306 \end_layout
308 \begin_layout Subsubsection
309 --author=|<name> (lsnes/SDL)
310 \end_layout
312 \begin_layout Standard
313 Add author with nickname of <name> (no full name).
314 \end_layout
316 \begin_layout Subsubsection
317 --author=<fullname>|<nickname> (lsnes/SDL)
318 \end_layout
320 \begin_layout Standard
321 Add author with full name of <fullname> and nickname of <nickname>.
322 \end_layout
324 \begin_layout Subsubsection
325 --rtc-second=<value> (lsnes/SDL)
326 \end_layout
328 \begin_layout Standard
329 Set RTC second (0 is 1st January 1970 00:00:00Z).
330  Default is 1,000,000,000.
331 \end_layout
333 \begin_layout Subsubsection
334 --rtc-subsecond=<value> (lsnes/SDL)
335 \end_layout
337 \begin_layout Standard
338 Set RTC subsecond.
339  Range is 0-.
340  Unit is CPU cycle.
341  Default is 0.
342 \end_layout
344 \begin_layout Subsubsection
345 --anchor-savestate=<file> (lsnes/SDL)
346 \end_layout
348 \begin_layout Standard
349 Set the anchor savestate file.
350 \end_layout
352 \begin_layout Subsubsection
353 --load=<file> (lsnes/wxwidgets)
354 \end_layout
356 \begin_layout Standard
357 After loading the ROM, load <file> as savestate/movie.
358 \end_layout
360 \begin_layout Subsection
361 Misc.
362  options:
363 \end_layout
365 \begin_layout Subsubsection
366 --run=<file> (lsnes/SDL)
367 \end_layout
369 \begin_layout Standard
370 After running main RC file, run this file.
371  If multiple are specified, these execute in order specified.
372 \end_layout
374 \begin_layout Subsection
375 dump options (lsnes-dumpavi only)
376 \end_layout
378 \begin_layout Subsubsection
379 --dumper=<dumper>
380 \end_layout
382 \begin_layout Standard
383 Set the dumper to use (required).
384  Use 'list' for listing of known dumpers.
385 \end_layout
387 \begin_layout Subsubsection
388 --mode=<mode>
389 \end_layout
391 \begin_layout Standard
392 Set the mode to use (required for dumpers with multiple modes, forbidden
393  otherwise).
394  Use 'list' for known modes.
395 \end_layout
397 \begin_layout Subsubsection
398 --prefix=<prefix>
399 \end_layout
401 \begin_layout Standard
402 Set dump prefix.
403  Default is 
404 \begin_inset Quotes eld
405 \end_inset
407 avidump
408 \begin_inset Quotes erd
409 \end_inset
412 \end_layout
414 \begin_layout Subsubsection
415 --option=<name>=<value>
416 \end_layout
418 \begin_layout Standard
419 Set option <name> to value <value>.
420 \end_layout
422 \begin_layout Subsubsection
423 --length=<length>
424 \end_layout
426 \begin_layout Standard
427 Set number of frames to dump.
428  Mandatory.
429 \end_layout
431 \begin_layout Subsubsection
432 --lua=<script>
433 \end_layout
435 \begin_layout Standard
436 Run specified lua script (lsnes-dumpavi does not have initialization files).
437 \end_layout
439 \begin_layout Subsubsection
440 --load-library=<library>
441 \end_layout
443 \begin_layout Standard
444 Load the specified shared object / dynamic library / dynamic link library.
445 \end_layout
447 \begin_layout Section
448 Startup file lsnes.rc
449 \end_layout
451 \begin_layout Standard
452 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
453  This file is located in:
454 \end_layout
456 \begin_layout Itemize
457 Windows: %APPDATA%
458 \backslash
459 lsnes
460 \backslash
461 lsnes.rc (if %APPDATA% exists)
462 \end_layout
464 \begin_layout Itemize
465 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
466 \end_layout
468 \begin_layout Itemize
469 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
470 \end_layout
472 \begin_layout Itemize
473 All: ./lsnes.rc (fallback default).
474 \end_layout
476 \begin_layout Standard
477 If leading directories do not exist, attempt to create them is made.
478 \end_layout
480 \begin_layout Section
481 Internal commands
482 \end_layout
484 \begin_layout Itemize
485 Commands beginning with '*' invoke the corresponding command without alias
486  expansion.
487 \end_layout
489 \begin_layout Itemize
490 If command starts with '+' (after possible '*'), the command is executed
491  as-is when button is pressed, and when button is released, it is executed
492  with '+' replaced by '-'.
493 \end_layout
495 \begin_layout Itemize
496 Commands without '+' execute only on negative edge (release).
497 \end_layout
499 \begin_layout Subsection
500 Settings:
501 \end_layout
503 \begin_layout Standard
504 Settings control various aspects of emulator behaviour.
505 \end_layout
507 \begin_layout Subsubsection
508 set-setting <setting> <value>
509 \end_layout
511 \begin_layout Standard
512 Sets setting <setting> to value <value> (may be empty).
513 \end_layout
515 \begin_layout Subsubsection
516 unset-setting <setting>
517 \end_layout
519 \begin_layout Standard
520 Try to unset setting <setting> (not all settings can be unset).
521 \end_layout
523 \begin_layout Subsubsection
524 get-setting <setting>
525 \end_layout
527 \begin_layout Standard
528 Read value of setting <setting>
529 \end_layout
531 \begin_layout Subsubsection
532 show-settings
533 \end_layout
535 \begin_layout Standard
536 Print names and values of all settings.
537 \end_layout
539 \begin_layout Subsection
540 Keybindings
541 \end_layout
543 \begin_layout Standard
544 Keybindings bind commands or aliases to keys (or pseudo-keys).
546 \end_layout
548 \begin_layout Standard
549 Notes:
550 \end_layout
552 \begin_layout Itemize
553 Do not bind edge active (+/-) commands to keys with modifiers, that won't
554  work right!
555 \end_layout
557 \begin_layout Itemize
558 Names of keys and modifiers are platform-dependent.
559 \end_layout
561 \begin_layout Itemize
562 Be careful before binding pseudo-keys (such as joystick axes, buttons or
563  hats) with modifiers.
564  That may or may not work right.
565 \end_layout
567 \begin_layout Subsubsection
568 bind-key [<mod>/<modmask>] <key> <command>
569 \end_layout
571 \begin_layout Standard
572 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
573 ed list) are set as <mod> (comma-seperated list).
574 \end_layout
576 \begin_layout Standard
577 The names of keys and modifiers are platform-dependent.
578 \end_layout
580 \begin_layout Subsubsection
581 unbind-key [<mod>/<modmask>] <key>
582 \end_layout
584 \begin_layout Standard
585 Unbind command from <key> (with specified <mod> and <modmask>).
586 \end_layout
588 \begin_layout Subsubsection
589 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
590  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
591  [plus=<val>] [tolerance=<val>]
592 \end_layout
594 \begin_layout Standard
595 Set axis parameters for axis <axis>.
596 \end_layout
598 \begin_layout Itemize
599 disabled: Disable axis
600 \end_layout
602 \begin_layout Itemize
603 axis: Normal axis
604 \end_layout
606 \begin_layout Itemize
607 axis-inverse: Inverse axis
608 \end_layout
610 \begin_layout Itemize
611 pressure0-: Pressure sensitive.
612  Released at 0, pressed at -.
613 \end_layout
615 \begin_layout Itemize
616 pressure0+: Pressure sensitive.
617  Released at 0, pressed at +.
618 \end_layout
620 \begin_layout Itemize
621 pressure-0: Pressure sensitive.
622  Released at -, pressed at 0.
623 \end_layout
625 \begin_layout Itemize
626 pressure-+: Pressure sensitive.
627  Released at -, pressed at +.
628 \end_layout
630 \begin_layout Itemize
631 pressure+0: Pressure sensitive.
632  Released at +, pressed at 0.
633 \end_layout
635 \begin_layout Itemize
636 pressure+-: Pressure sensitive.
637  Released at +, pressed at -.
638 \end_layout
640 \begin_layout Itemize
641 minus=<val>: Calibration at extreme minus position (-32768-32767)
642 \end_layout
644 \begin_layout Itemize
645 zero=<val>: Calibration at neutral position (-32768-32767)
646 \end_layout
648 \begin_layout Itemize
649 plus=<val>: Calibration at extreme plus position (-32768-32767)
650 \end_layout
652 \begin_layout Itemize
653 tolerance=<value>: Center band tolerance (0<x<1).
654  The smaller the value, the more sensitive the control is.
655 \end_layout
657 \begin_layout Subsubsection
658 show-bindings
659 \end_layout
661 \begin_layout Standard
662 Print all key bindings in effect.
663 \end_layout
665 \begin_layout Subsection
666 Aliases
667 \end_layout
669 \begin_layout Standard
670 Aliases bind command to sequence of commands.
671  After alias has been defined, it replaces the command it shadows.
672 \end_layout
674 \begin_layout Standard
675 Notes:
676 \end_layout
678 \begin_layout Itemize
679 You can't alias command to itself.
680 \end_layout
682 \begin_layout Itemize
683 Aliases starting with +/- are edge active just like ordinary commands starting
684  with +/-.
685 \end_layout
687 \begin_layout Itemize
688 One command can be aliased to multiple commands.
689 \end_layout
691 \begin_layout Subsubsection
692 alias-command <command> <expansion>
693 \end_layout
695 \begin_layout Standard
696 Append <expansion> to alias <command>.
697  If alias does not already exist, it is created.
698 \end_layout
700 \begin_layout Subsubsection
701 unalias-command <command>
702 \end_layout
704 \begin_layout Standard
705 Clear alias expansion for <command>.
706 \end_layout
708 \begin_layout Subsubsection
709 show-aliases
710 \end_layout
712 \begin_layout Standard
713 Print all aliases and their expansions in effect.
714 \end_layout
716 \begin_layout Subsection
717 run-script <script>
718 \end_layout
720 \begin_layout Standard
721 Run <script> as if commands were entered on the command line.
722 \end_layout
724 \begin_layout Subsection
725 Video dumping
726 \end_layout
728 \begin_layout Standard
729 Following commands control video dumping:
730 \end_layout
732 \begin_layout Subsubsection
733 start-dump <dumper> [<mode>] <prefix/filename>
734 \end_layout
736 \begin_layout Standard
737 Start dumping using dumper <dumper>.
738  If mode is present or not and if prefix or filename is present depends
739  on the dumper and dumper mode.
740 \end_layout
742 \begin_layout Standard
743 The following dumpers are available:
744 \end_layout
746 \begin_layout Itemize
747 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
748 \end_layout
750 \begin_deeper
751 \begin_layout Itemize
752 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
753  Takes prefix.
754 \end_layout
756 \begin_layout Itemize
757 Mode: cscd/pcm: CSCD video, PCM audio.
758  Takes prefix.
759 \end_layout
761 \end_deeper
762 \begin_layout Itemize
763 INTERNAL-JMD: Internal .jmd dumper.
764 \end_layout
766 \begin_deeper
767 \begin_layout Itemize
768 Does not take mode.
769 \end_layout
771 \begin_layout Itemize
772 Takes a filename.
773 \end_layout
775 \end_deeper
776 \begin_layout Itemize
777 INTERNAL-RAW: Internal RAW dumper.
778 \end_layout
780 \begin_deeper
781 \begin_layout Itemize
782 Does not take mode.
783 \end_layout
785 \begin_layout Itemize
786 Takes a prefix.
787 \end_layout
789 \begin_layout Itemize
790 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
791 \end_layout
793 \begin_layout Itemize
794 Video is always upscaled to double resolution (512x448 / 512 x 478).
795 \end_layout
797 \begin_layout Itemize
798 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
799  for NTSC.
800 \end_layout
802 \end_deeper
803 \begin_layout Itemize
804 INTERNAL-SDMP: Internal SDMP dumper.
805 \end_layout
807 \begin_deeper
808 \begin_layout Itemize
809 Mode 'ms': Multi-segment.
810  Takes prefix.
811 \end_layout
813 \begin_layout Itemize
814 Mode 'ss': Single-segment.
815  Takes filename.
816 \end_layout
818 \end_deeper
819 \begin_layout Subsubsection
820 end-dump <dumper>
821 \end_layout
823 \begin_layout Standard
824 End dumping using <dumper>
825 \end_layout
827 \begin_layout Subsubsection
828 show-dumpers [<dumper>]
829 \end_layout
831 \begin_layout Standard
832 Show the list of dumpers or list of modes for <dumper>
833 \end_layout
835 \begin_layout Subsection
836 Memory manipulation
837 \end_layout
839 \begin_layout Standard
840 <address> may be decimal or hexadecimal (prefixed with '0x').
841  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
842  with '-') decimal.
843 \end_layout
845 \begin_layout Standard
846 The available element <sizes> are:
847 \end_layout
849 \begin_layout Itemize
850 byte: 1 byte
851 \end_layout
853 \begin_layout Itemize
854 word: 2 bytes
855 \end_layout
857 \begin_layout Itemize
858 dword: 4 bytes
859 \end_layout
861 \begin_layout Itemize
862 qword: 8 bytes
863 \end_layout
865 \begin_layout Standard
866 When reading RAM and ROM, multi-byte reads/writes are big-endian.
867  When dealing with DSP memory, multi-byte reads/writes are native-endian
868  (do not use operand sizes exceeding DSP bitness, except dword is OK for
869  24-bit memory).
870 \end_layout
872 \begin_layout Subsubsection
873 read-<size> <address>
874 \end_layout
876 \begin_layout Standard
877 Read the value of byte in <address>.
878 \end_layout
880 \begin_layout Subsubsection
881 read-s<size> <address>
882 \end_layout
884 \begin_layout Standard
885 Read the value of signed byte in <address>.
886 \end_layout
888 \begin_layout Subsubsection
889 write-<size> <address> <value>
890 \end_layout
892 \begin_layout Standard
893 Write <value> to byte in address <address>.
894 \end_layout
896 \begin_layout Subsubsection
897 search-memory reset
898 \end_layout
900 \begin_layout Standard
901 Reset the memory search
902 \end_layout
904 \begin_layout Subsubsection
905 search-memory count
906 \end_layout
908 \begin_layout Standard
909 Print number of candidates remaining
910 \end_layout
912 \begin_layout Subsubsection
913 search-memory print
914 \end_layout
916 \begin_layout Standard
917 Print all candidates remaining
918 \end_layout
920 \begin_layout Subsubsection
921 search-memory <usflag><sizeflag><op>
922 \end_layout
924 \begin_layout Standard
925 Searches memory for addresses satisfying criteria.
926 \end_layout
928 \begin_layout Standard
929 <usflag> can be:
930 \end_layout
932 \begin_layout Itemize
933 u: unsigned
934 \end_layout
936 \begin_layout Itemize
937 s: signed
938 \end_layout
940 \begin_layout Standard
941 <sizeflag> can be:
942 \end_layout
944 \begin_layout Itemize
945 b: byte
946 \end_layout
948 \begin_layout Itemize
949 w: word
950 \end_layout
952 \begin_layout Itemize
953 d: dword
954 \end_layout
956 \begin_layout Itemize
957 q: qword
958 \end_layout
960 \begin_layout Standard
961 <op> can be:
962 \end_layout
964 \begin_layout Itemize
965 lt: < previous value.
966 \end_layout
968 \begin_layout Itemize
969 le: <= previous value.
970 \end_layout
972 \begin_layout Itemize
973 eq: = previous value.
974 \end_layout
976 \begin_layout Itemize
977 ne: != previous value.
978 \end_layout
980 \begin_layout Itemize
981 ge: >= previous value.
982 \end_layout
984 \begin_layout Itemize
985 gt: > previous value.
986 \end_layout
988 \begin_layout Subsubsection
989 search-memory <sizeflag> <value>
990 \end_layout
992 \begin_layout Standard
993 Searches for addresses that currently have value <value>.
994  <sizeflag> is as in previous command.
995 \end_layout
997 \begin_layout Subsection
998 Main commands
999 \end_layout
1001 \begin_layout Standard
1002 These commands are not available in lsnesrc, but are available after ROM
1003  has been loaded.
1004 \end_layout
1006 \begin_layout Subsubsection
1007 quit-emulator [/y]
1008 \end_layout
1010 \begin_layout Standard
1011 Quits the emulator (asking for confirmation).
1012  If /y is given, no confirmation is asked.
1013 \end_layout
1015 \begin_layout Subsubsection
1016 pause-emulator
1017 \end_layout
1019 \begin_layout Standard
1020 Toggle paused/unpaused
1021 \end_layout
1023 \begin_layout Subsubsection
1024 +advance-frame 
1025 \end_layout
1027 \begin_layout Standard
1028 Advance frame.
1029  If the button is still held after configurable timeout expires, game unpauses
1030  for the duration frame advance is held.
1031 \end_layout
1033 \begin_layout Subsubsection
1034 +advance-poll 
1035 \end_layout
1037 \begin_layout Standard
1038 Advance subframe.
1039  If the button is still held after configurable timeout expires, game unpauses
1040  for the duration frame advance is held.
1041 \end_layout
1043 \begin_layout Subsubsection
1044 advance-skiplag 
1045 \end_layout
1047 \begin_layout Standard
1048 Skip to first poll in frame after current.
1049 \end_layout
1051 \begin_layout Subsubsection
1052 reset 
1053 \end_layout
1055 \begin_layout Standard
1056 Reset the SNES after this frame.
1057 \end_layout
1059 \begin_layout Subsubsection
1060 load <filename> 
1061 \end_layout
1063 \begin_layout Standard
1064 Load savestate <filename> in current mode.
1065 \end_layout
1067 \begin_layout Subsubsection
1068 load-state <filename> 
1069 \end_layout
1071 \begin_layout Standard
1072 Load savestate <filename> in readwrite mode.
1073 \end_layout
1075 \begin_layout Subsubsection
1076 load-readonly <filename> 
1077 \end_layout
1079 \begin_layout Standard
1080 Load savestate <filename> in readonly mode.
1081 \end_layout
1083 \begin_layout Subsubsection
1084 load-preserve <filename> 
1085 \end_layout
1087 \begin_layout Standard
1088 Load savestate <filename> in readonly mode, preserving current events.
1089 \end_layout
1091 \begin_layout Subsubsection
1092 load-movie <filename> 
1093 \end_layout
1095 \begin_layout Standard
1096 Load savestate <filename>, ignoring save part in readonly mode.
1097 \end_layout
1099 \begin_layout Subsubsection
1100 save-state <filename> 
1101 \end_layout
1103 \begin_layout Standard
1104 Save system state to <filename> as soon as possible.
1105 \end_layout
1107 \begin_layout Subsubsection
1108 save-movie <filename> 
1109 \end_layout
1111 \begin_layout Standard
1112 Save movie to <filename>.
1113 \end_layout
1115 \begin_layout Subsubsection
1116 set-rwmode 
1117 \end_layout
1119 \begin_layout Standard
1120 Set read-write mode.
1121 \end_layout
1123 \begin_layout Subsubsection
1124 set-romode 
1125 \end_layout
1127 \begin_layout Standard
1128 Set read-only mode
1129 \end_layout
1131 \begin_layout Subsubsection
1132 toggle-rwmode 
1133 \end_layout
1135 \begin_layout Standard
1136 Toggle between read-only and read-write modes.
1137 \end_layout
1139 \begin_layout Subsubsection
1140 set-gamename <name> 
1141 \end_layout
1143 \begin_layout Standard
1144 Set name of the game to <name>
1145 \end_layout
1147 \begin_layout Subsubsection
1148 get-gamename 
1149 \end_layout
1151 \begin_layout Standard
1152 Print the name of the game.
1153 \end_layout
1155 \begin_layout Subsubsection
1156 add-author <author> 
1157 \end_layout
1159 \begin_layout Standard
1160 Adds new author <author>.
1161  If <author> does not contain '|' it is full name.
1162  If it contains '|', '|' splits the full name and nickname.
1163 \end_layout
1165 \begin_layout Subsubsection
1166 edit-author <num> <author> 
1167 \end_layout
1169 \begin_layout Standard
1170 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1171  format)
1172 \end_layout
1174 \begin_layout Subsubsection
1175 remove-author <num> 
1176 \end_layout
1178 \begin_layout Standard
1179 Remove author in slot <num>
1180 \end_layout
1182 \begin_layout Subsubsection
1183 print-authors 
1184 \end_layout
1186 \begin_layout Standard
1187 Print authors.
1188 \end_layout
1190 \begin_layout Subsubsection
1191 test-1, test-2, test-3
1192 \end_layout
1194 \begin_layout Standard
1195 Internal test commands.
1196  Don't use.
1197 \end_layout
1199 \begin_layout Subsubsection
1200 take-screenshot <filename> 
1201 \end_layout
1203 \begin_layout Standard
1204 Save screenshot to <filename>.
1205 \end_layout
1207 \begin_layout Subsubsection
1208 +controller<num><button>
1209 \end_layout
1211 \begin_layout Standard
1212 Press button <button> on controller <num> (1-8).
1213  The following button names are known:
1214 \end_layout
1216 \begin_layout Itemize
1217 left
1218 \end_layout
1220 \begin_layout Itemize
1221 right
1222 \end_layout
1224 \begin_layout Itemize
1226 \end_layout
1228 \begin_layout Itemize
1229 down
1230 \end_layout
1232 \begin_layout Itemize
1234 \end_layout
1236 \begin_layout Itemize
1238 \end_layout
1240 \begin_layout Itemize
1242 \end_layout
1244 \begin_layout Itemize
1246 \end_layout
1248 \begin_layout Itemize
1250 \end_layout
1252 \begin_layout Itemize
1254 \end_layout
1256 \begin_layout Itemize
1257 select
1258 \end_layout
1260 \begin_layout Itemize
1261 start
1262 \end_layout
1264 \begin_layout Itemize
1265 trigger
1266 \end_layout
1268 \begin_layout Itemize
1269 cursor
1270 \end_layout
1272 \begin_layout Itemize
1273 pause
1274 \end_layout
1276 \begin_layout Itemize
1277 turbo
1278 \end_layout
1280 \begin_layout Subsubsection
1281 controllerh<num><button>
1282 \end_layout
1284 \begin_layout Standard
1285 Hold/unhold button <button> on controller <num> (1-8).
1286  See +controller for button names.
1287 \end_layout
1289 \begin_layout Subsubsection
1290 controllerf<num><button>
1291 \end_layout
1293 \begin_layout Standard
1294 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1295  See +controller for button names.
1296 \end_layout
1298 \begin_layout Standard
1299 Cauntion: Does not work properly if outside frame advance.
1300 \end_layout
1302 \begin_layout Subsubsection
1303 autofire (<pattern>|-)...
1304 \end_layout
1306 \begin_layout Standard
1307 Set autofire pattern.
1308  Each parameter is comma-separated list of button names (in form of 1start,
1309  1A, 2B, etc..) to hold on that frame.
1310  After reaching the end of pattern, the pattern restarts from the beginning.
1311 \end_layout
1313 \begin_layout Subsubsection
1314 repaint
1315 \end_layout
1317 \begin_layout Standard
1318 Force a repaint.
1319 \end_layout
1321 \begin_layout Subsection
1322 Save jukebox 
1323 \end_layout
1325 \begin_layout Subsubsection
1326 cycle-jukebox-backward
1327 \end_layout
1329 \begin_layout Standard
1330 Cycle save jukebox backwards.
1331 \end_layout
1333 \begin_layout Subsubsection
1334 cycle-jukebox-forward
1335 \end_layout
1337 \begin_layout Standard
1338 Cycle save jukebox forwards
1339 \end_layout
1341 \begin_layout Subsubsection
1342 load-jukebox
1343 \end_layout
1345 \begin_layout Standard
1346 Do load from jukebox (current mode).
1347 \end_layout
1349 \begin_layout Subsubsection
1350 save-jukebox
1351 \end_layout
1353 \begin_layout Standard
1354 Do state save to jukebox.
1355 \end_layout
1357 \begin_layout Subsection
1358 Lua 
1359 \end_layout
1361 \begin_layout Standard
1362 Only available if lua support is compiled in.
1363 \end_layout
1365 \begin_layout Subsubsection
1366 evaluate-lua <luacode>
1367 \end_layout
1369 \begin_layout Standard
1370 Run Lua code <luacode> using built-in Lua interpretter.
1371 \end_layout
1373 \begin_layout Subsubsection
1374 run-lua <script>
1375 \end_layout
1377 \begin_layout Standard
1378 Run specified lua file using built-in Lua interpretter.
1379 \end_layout
1381 \begin_layout Subsubsection
1382 reset-lua
1383 \end_layout
1385 \begin_layout Standard
1386 Clear the Lua VM state and restore to factory defaults.
1387 \end_layout
1389 \begin_layout Subsection
1390 Memory watch
1391 \end_layout
1393 \begin_layout Subsubsection
1394 add-watch <name> <expression>
1395 \end_layout
1397 \begin_layout Standard
1398 Adds new watch (or modifies old one).
1399 \end_layout
1401 \begin_layout Subsubsection
1402 remove-watch <name>
1403 \end_layout
1405 \begin_layout Standard
1406 Remove a watch.
1407 \end_layout
1409 \begin_layout Subsection
1410 Sound 
1411 \end_layout
1413 \begin_layout Subsubsection
1414 enable-sound <on/off> 
1415 \end_layout
1417 \begin_layout Standard
1418 Enable/Disable sound.
1419 \end_layout
1421 \begin_layout Subsubsection
1422 set-sound-device <device> 
1423 \end_layout
1425 \begin_layout Standard
1426 Set sound device to <device>
1427 \end_layout
1429 \begin_layout Subsubsection
1430 show-sound-status 
1431 \end_layout
1433 \begin_layout Standard
1434 Show status of sound system.
1435 \end_layout
1437 \begin_layout Subsubsection
1438 show-sound-devices
1439 \end_layout
1441 \begin_layout Standard
1442 Show all available devices.
1443 \end_layout
1445 \begin_layout Subsubsection
1446 set-volume <multiplier>
1447 \end_layout
1449 \begin_layout Standard
1450 Set the volume multiplier to <multiplier>.
1451  1 is normal volume, and higher numbers are louder.
1452 \end_layout
1454 \begin_layout Subsubsection
1455 set-volume <multiplier>%
1456 \end_layout
1458 \begin_layout Standard
1459 Set the volume multiplier to <multiplier> percent.
1460  100 is normal volume, and higher numbers are louder.
1461 \end_layout
1463 \begin_layout Subsubsection
1464 set-volume <multiplier>dB
1465 \end_layout
1467 \begin_layout Standard
1468 Set the volume multiplier to <multiplier> dB.
1469  0 is normal volume, and higher numbers are louder.
1470  The value may be negative.
1471 \end_layout
1473 \begin_layout Subsection
1474 Misc.
1475 \end_layout
1477 \begin_layout Subsubsection
1478 reload-rom [<file>]
1479 \end_layout
1481 \begin_layout Standard
1482 Reloads the main ROM image from <file>.
1483 \end_layout
1485 \begin_layout Subsubsection
1486 edit-subtitle <firstframe> <length> [<text>]
1487 \end_layout
1489 \begin_layout Standard
1490 Edit or delete a subtitle.
1491 \end_layout
1493 \begin_layout Subsubsection
1494 list-subtitle
1495 \end_layout
1497 \begin_layout Standard
1498 List subtitles.
1499 \end_layout
1501 \begin_layout Subsection
1502 Commentary track
1503 \end_layout
1505 \begin_layout Subsubsection
1506 list-streams
1507 \end_layout
1509 \begin_layout Standard
1510 List streams
1511 \end_layout
1513 \begin_layout Subsubsection
1514 play-stream <id>
1515 \end_layout
1517 \begin_layout Standard
1518 Play stream <id>.
1519 \end_layout
1521 \begin_layout Subsubsection
1522 delete-stream <id>
1523 \end_layout
1525 \begin_layout Standard
1526 Delete stream <id>
1527 \end_layout
1529 \begin_layout Subsubsection
1530 change-timebase <id> <newbase>
1531 \end_layout
1533 \begin_layout Standard
1534 Change time base of <id> to <newbase>.
1535  The time base can be given as samples (integer) or second (postfix with
1536  s).
1537 \end_layout
1539 \begin_layout Subsubsection
1540 import-stream-opus <timebase> <file>
1541 \end_layout
1543 \begin_layout Standard
1544 Import opus stream from <file>, placing it at <timebase>.
1545  This operation is lossless.
1546 \end_layout
1548 \begin_layout Subsubsection
1549 import-stream-pcm <timebase> <file>
1550 \end_layout
1552 \begin_layout Standard
1553 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1554 \end_layout
1556 \begin_layout Subsubsection
1557 export-stream-opus <id> <file>
1558 \end_layout
1560 \begin_layout Standard
1561 Export stream <id> as opus stream to <file>.
1562  This operation is lossless.
1563 \end_layout
1565 \begin_layout Subsubsection
1566 export-stream-pcm <id> <file>
1567 \end_layout
1569 \begin_layout Standard
1570 Export stream <id> as PCM (.sox) stream to <file>.
1572 \end_layout
1574 \begin_layout Subsubsection
1575 export-superstream <file>
1576 \end_layout
1578 \begin_layout Standard
1579 Export the entiere superstream as PCM (.sox) stream to <file>.
1580 \end_layout
1582 \begin_layout Subsubsection
1583 load-collection <file>
1584 \end_layout
1586 \begin_layout Standard
1587 Load collection (if there is existing collection, unload it) from <file>
1588 \end_layout
1590 \begin_layout Subsubsection
1591 unload-collection
1592 \end_layout
1594 \begin_layout Standard
1595 Unload collection.
1596 \end_layout
1598 \begin_layout Subsubsection
1599 +tangent
1600 \end_layout
1602 \begin_layout Standard
1603 Tangent for recording voice for commentary track.
1604  While pressed, record a stream.
1605 \end_layout
1607 \begin_layout Subsection
1608 SDL Platform commands 
1609 \end_layout
1611 \begin_layout Standard
1612 The following are valid on SDL platform.
1613 \end_layout
1615 \begin_layout Subsubsection
1616 identify-key
1617 \end_layout
1619 \begin_layout Standard
1620 Asks to press a key and then identifies that (pseudo-)key.
1621 \end_layout
1623 \begin_layout Subsubsection
1624 toggle-console 
1625 \end_layout
1627 \begin_layout Standard
1628 Toggle between windowed/fullscreen console.
1629 \end_layout
1631 \begin_layout Subsubsection
1632 scroll-fullup 
1633 \end_layout
1635 \begin_layout Standard
1636 Scroll messages window as far back as it goes.
1637 \end_layout
1639 \begin_layout Subsubsection
1640 scroll-fulldown 
1641 \end_layout
1643 \begin_layout Standard
1644 Scroll messages window as far forward as it goes.
1645 \end_layout
1647 \begin_layout Subsubsection
1648 scroll-up 
1649 \end_layout
1651 \begin_layout Standard
1652 Scroll messages window back one screenful.
1653 \end_layout
1655 \begin_layout Subsubsection
1656 scroll-down 
1657 \end_layout
1659 \begin_layout Standard
1660 Scroll messages window forward one screenful.
1661 \end_layout
1663 \begin_layout Subsubsection
1664 prompt-command <command>
1665 \end_layout
1667 \begin_layout Standard
1668 Enter command prompt, with prompt prepopulated with specified command.
1669 \end_layout
1671 \begin_layout Section
1672 Settings
1673 \end_layout
1675 \begin_layout Subsection
1676 Core settings
1677 \end_layout
1679 \begin_layout Subsubsection
1680 firmwarepath
1681 \end_layout
1683 \begin_layout Standard
1684 Set where bsnes looks for firmware files.
1685  Default is 
1686 \begin_inset Quotes eld
1687 \end_inset
1690 \begin_inset Quotes erd
1691 \end_inset
1694 \end_layout
1696 \begin_layout Subsubsection
1697 target
1698 \end_layout
1700 \begin_layout Standard
1701 Set the target .
1702  Numeric, range is 0.001 to 
1703 \begin_inset Quotes eld
1704 \end_inset
1706 infinite
1707 \begin_inset Quotes erd
1708 \end_inset
1711  Default is native framerate.
1712 \end_layout
1714 \begin_layout Subsubsection
1715 savecompression
1716 \end_layout
1718 \begin_layout Standard
1719 Set save compression level (integer 0-9).
1720  Default is 7 (0 is no compression).
1721 \end_layout
1723 \begin_layout Subsubsection
1724 advance-timeout
1725 \end_layout
1727 \begin_layout Standard
1728 Set the frame advance timeout in milliseconds.
1729  Numeric integer, range is 0-999999999.
1730  Default is 500.
1731 \end_layout
1733 \begin_layout Subsubsection
1734 allow-inconsistent-saves (bsnes only)
1735 \end_layout
1737 \begin_layout Standard
1738 If true, save without synchronization.
1739  Makes games seriously unstable.
1740 \end_layout
1742 \begin_layout Subsubsection
1743 save-every-frame (bsnes only)
1744 \end_layout
1746 \begin_layout Standard
1747 If true, simulate saving on each frame.
1748  Trades off emulation accuracy for sync stability.
1749  Also needed if the movie assumes saving on each frame for rewind.
1750 \end_layout
1752 \begin_layout Subsection
1753 AVI dumper settings
1754 \end_layout
1756 \begin_layout Subsubsection
1757 avi-large
1758 \end_layout
1760 \begin_layout Standard
1761 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1762  outputs.
1763 \end_layout
1765 \begin_layout Subsubsection
1766 avi-left-border
1767 \end_layout
1769 \begin_layout Standard
1770 AVI dumper: Set the default left border thickness (unless lua overrides)
1771  for dumps.
1772  Range 0-8191.
1773  Default is 0.
1774 \end_layout
1776 \begin_layout Subsubsection
1777 avi-right-border
1778 \end_layout
1780 \begin_layout Standard
1781 AVI dumper: Set the default right border thickness (unless lua overrides)
1782  for dumps.
1783  Range 0-8191.
1784  Default is 0.
1785 \end_layout
1787 \begin_layout Subsubsection
1788 avi-top-border
1789 \end_layout
1791 \begin_layout Standard
1792 AVI dumper: Set the default top border thickness (unless lua overrides)
1793  for dumps.
1794  Range 0-8191.
1795  Default is 0.
1796 \end_layout
1798 \begin_layout Subsubsection
1799 avi-bottom-border
1800 \end_layout
1802 \begin_layout Standard
1803 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1804  for dumps.
1805  Range 0-8191.
1806  Default is 0.
1807 \end_layout
1809 \begin_layout Subsubsection
1810 avi-maxframes
1811 \end_layout
1813 \begin_layout Standard
1814 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1815  Range 0-999999999.
1816  Default is 0.
1817 \end_layout
1819 \begin_layout Subsubsection
1820 avi-compresison
1821 \end_layout
1823 \begin_layout Standard
1824 AVI dumper: Compression level (0-18).
1825 \end_layout
1827 \begin_layout Itemize
1828 Compression levels 10 and above are not compatible with stock CSCD codec.
1829 \end_layout
1831 \begin_layout Itemize
1832 Recomended level is 7.
1833 \end_layout
1835 \begin_layout Subsubsection
1836 avi-soundrate
1837 \end_layout
1839 \begin_layout Standard
1840 AVI dumper: Set method of determining the sound rate.
1841 \end_layout
1843 \begin_layout Itemize
1844 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1845  128, 176.4 and 192 kHz.
1846 \end_layout
1848 \begin_layout Itemize
1849 1: Round down to nearest integer.
1850 \end_layout
1852 \begin_layout Itemize
1853 2: Round up to nearest ingeter.
1854 \end_layout
1856 \begin_layout Subsection
1857 JMD options
1858 \end_layout
1860 \begin_layout Subsubsection
1861 jmd-copression
1862 \end_layout
1864 \begin_layout Standard
1865 JMD dumper: Compression level (0-9).
1866 \end_layout
1868 \begin_layout Subsection
1869 SDL platform settings
1870 \end_layout
1872 \begin_layout Subsubsection
1873 autorepeat-first-delay
1874 \end_layout
1876 \begin_layout Standard
1877 Sets the delay for first character in typematic autorepeat.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 autorepeat-subsequent-delay
1882 \end_layout
1884 \begin_layout Standard
1885 Sets the delay for subsequent characters in typematic autorepeat.
1886 \end_layout
1888 \begin_layout Section
1889 Lua functions
1890 \end_layout
1892 \begin_layout Subsection
1893 Core (in main table)
1894 \end_layout
1896 \begin_layout Subsubsection
1897 print
1898 \end_layout
1900 \begin_layout Standard
1901 Print line to message console.
1902 \end_layout
1904 \begin_layout Subsubsection
1905 exec(string command)
1906 \end_layout
1908 \begin_layout Standard
1909 Run command as it was entered on the command line
1910 \end_layout
1912 \begin_layout Subsubsection
1913 utime()
1914 \end_layout
1916 \begin_layout Standard
1917 Returns two values.
1918  First is time since some epoch in seconds, the second is microseconds mod
1919  10^6 since that epoch.
1920 \end_layout
1922 \begin_layout Subsubsection
1923 emulator_ready()
1924 \end_layout
1926 \begin_layout Standard
1927 Returns true if emulator has finished booting, false if not (on_startup()
1928  will be issued later).
1929 \end_layout
1931 \begin_layout Subsubsection
1932 set_idle_timeout(number timeout)
1933 \end_layout
1935 \begin_layout Standard
1936 Set number of microseconds to block idle for.
1937  After this timeout has expired, on_idle() will be called once.
1938 \end_layout
1940 \begin_layout Subsubsection
1941 set_timer_timeout(number timeout)
1942 \end_layout
1944 \begin_layout Standard
1945 Set number of microseconds to block timer for.
1946  After this timeout has expired, on_timer() will be called once.
1947 \end_layout
1949 \begin_layout Subsubsection
1950 bus_address(number snesaddr)
1951 \end_layout
1953 \begin_layout Standard
1954 Returns virtual address corresponding to specified address on SNES bus.
1955 \end_layout
1957 \begin_layout Subsubsection
1958 loopwrapper(function fun, ...)
1959 \end_layout
1961 \begin_layout Standard
1962 Calls function fun with function and specified arguments.
1963  The function passed suspends execution until the function returned is called.
1964  Handy for linear flow control among multiple invocations of a hook.
1965  Example code:
1966 \end_layout
1968 \begin_layout LyX-Code
1969 on_paint = loopwrapper(function(wait)
1970 \end_layout
1972 \begin_deeper
1973 \begin_layout LyX-Code
1974 while true do
1975 \end_layout
1977 \begin_deeper
1978 \begin_layout LyX-Code
1979 gui.text(0, 0, 
1980 \begin_inset Quotes eld
1981 \end_inset
1983 Test!
1984 \begin_inset Quotes erd
1985 \end_inset
1988 \end_layout
1990 \begin_layout LyX-Code
1991 wait();
1992 \end_layout
1994 \end_deeper
1995 \begin_layout LyX-Code
1997 \end_layout
1999 \end_deeper
2000 \begin_layout LyX-Code
2001 end);
2002 \end_layout
2004 \begin_layout Subsection
2005 Table bit:
2006 \end_layout
2008 \begin_layout Standard
2009 Bitwise logical functions and related.
2010 \end_layout
2012 \begin_layout Subsubsection
2013 bit.none(number...) / bit.bnot(number...)
2014 \end_layout
2016 \begin_layout Standard
2017 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2018  arguments).
2019 \end_layout
2021 \begin_layout Subsubsection
2022 bit.any(number...) / bit.bor(number...)
2023 \end_layout
2025 \begin_layout Standard
2026 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2027 \end_layout
2029 \begin_layout Subsubsection
2030 bit.all(number...) / bit.band(number...)
2031 \end_layout
2033 \begin_layout Standard
2034 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2036 \end_layout
2038 \begin_layout Subsubsection
2039 bit.parity(number...) / bit.bxor(number...)
2040 \end_layout
2042 \begin_layout Standard
2043 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2044  of the arguments).
2045 \end_layout
2047 \begin_layout Subsubsection
2048 bit.lrotate(number base[, number amount[, number bits]])
2049 \end_layout
2051 \begin_layout Standard
2052 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2053 \end_layout
2055 \begin_layout Subsubsection
2056 bit.rrotate(number base[, number amount[, number bits]])
2057 \end_layout
2059 \begin_layout Standard
2060 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2061  places.
2062 \end_layout
2064 \begin_layout Subsubsection
2065 bit.lshift(number base[, number amount[, number bits]])
2066 \end_layout
2068 \begin_layout Standard
2069 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2070  The new bits are filled with zeroes.
2071 \end_layout
2073 \begin_layout Subsubsection
2074 bit.lrshift(number base[, number amount[, number bits]])
2075 \end_layout
2077 \begin_layout Standard
2078 Shift bits-bit (max 48, default 48) number logically right by amount (default
2079  1) places.
2080  The new bits are filled with zeroes.
2081 \end_layout
2083 \begin_layout Subsubsection
2084 bit.arshift(number base[, number amount[, number bits]])
2085 \end_layout
2087 \begin_layout Standard
2088 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2089  (default 1) places.
2090  The new bits are shifted in with copy of the high bit.
2091 \end_layout
2093 \begin_layout Subsubsection
2094 bit.extract(number base[, number bit0[, number bit1,...]])
2095 \end_layout
2097 \begin_layout Standard
2098 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2099 \end_layout
2101 \begin_layout Standard
2102 Notes: 
2103 \end_layout
2105 \begin_layout Itemize
2106 Bit numbers up to 51 should work reliably (then things start falling apart
2107  due to double precision issues).
2108 \end_layout
2110 \begin_layout Itemize
2111 There are two special bit positions, true and false, standing for always
2112  set bit and always clear bit.
2113 \end_layout
2115 \begin_layout Subsubsection
2116 bit.value([number bit1[, number bit2,...]])
2117 \end_layout
2119 \begin_layout Standard
2120 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2121  places and so on.
2122  As special value, nil argument is no-op.
2123 \end_layout
2125 \begin_layout Subsection
2126 Table gui:
2127 \end_layout
2129 \begin_layout Standard
2130 Most of these functions can only be called in on_paint and on_video callbacks.
2131  Exceptions are noted.
2132 \end_layout
2134 \begin_layout Standard
2135 Colors are 32-bit.
2136  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2137  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2138  opaque, 255 is almost transparent).
2139  -1 is the fully transparent color.
2140  Alpha values greater than 127 do work.
2141 \end_layout
2143 \begin_layout Standard
2144 Origin of coordinates is at top left corner of game display area.
2145  Left and top gaps correspond to negative coordinates.
2146 \end_layout
2148 \begin_layout Subsubsection
2149 gui.resolution()
2150 \end_layout
2152 \begin_layout Standard
2153 Returns 2-tuple (hresolution, vresolution).
2154 \end_layout
2156 \begin_layout Subsubsection
2157 gui.<class>_gap(number gap)
2158 \end_layout
2160 \begin_layout Standard
2161 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2162  is 8191).
2163 \end_layout
2165 \begin_layout Subsubsection
2166 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2167 \end_layout
2169 \begin_layout Standard
2170 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2171  16 high).
2172  Parameters:
2173 \end_layout
2175 \begin_layout Itemize
2176 x: X-coordinate to start the drawing from (and x-coordinate at begining
2177  of the lines).
2178 \end_layout
2180 \begin_layout Itemize
2181 y: Y-coordinate to start the drawing from.
2182 \end_layout
2184 \begin_layout Itemize
2185 text: The text to draw.
2186 \end_layout
2188 \begin_layout Itemize
2189 fgc: Text color (default is 0xFFFFFF (white))
2190 \end_layout
2192 \begin_layout Itemize
2193 bgc: Background color (default is -1 (transparent))
2194 \end_layout
2196 \begin_layout Subsubsection
2197 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2198 \end_layout
2200 \begin_layout Standard
2201 Like gui.text, but draw using double-width.
2202 \end_layout
2204 \begin_layout Subsubsection
2205 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2206 \end_layout
2208 \begin_layout Standard
2209 Like gui.text, but draw using double-height.
2210 \end_layout
2212 \begin_layout Subsubsection
2213 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2214 \end_layout
2216 \begin_layout Standard
2217 Like gui.text, but draw using double-width/double-height.
2218 \end_layout
2220 \begin_layout Subsubsection
2221 gui.rectangle(number x, number y, number width, number height[, number thickness[
2222 , number outline[, number fill]]])
2223 \end_layout
2225 \begin_layout Standard
2226 Draw rectangle on the GUI.
2227  Parameters:
2228 \end_layout
2230 \begin_layout Itemize
2231 x: X-coordinate of left edge.
2232 \end_layout
2234 \begin_layout Itemize
2235 y: Y-coordinate of upper edge.
2236 \end_layout
2238 \begin_layout Itemize
2239 width: Width of rectangle.
2240 \end_layout
2242 \begin_layout Itemize
2243 height: Height of rectangle.
2244 \end_layout
2246 \begin_layout Itemize
2247 thickness: Thickness of outline (default is 1).
2248 \end_layout
2250 \begin_layout Itemize
2251 outline: Color of outline (default is 0xFFFFFF (white))
2252 \end_layout
2254 \begin_layout Itemize
2255 fill: Color of fill (default is -1 (transparent))
2256 \end_layout
2258 \begin_layout Subsubsection
2259 gui.box(number x, number y, number width, number height[, number thickness[,
2260  number outline1[,number outline2[, number fill]]]])
2261 \end_layout
2263 \begin_layout Standard
2264 Draw rectangle with 3D effect on the GUI.
2265  Parameters:
2266 \end_layout
2268 \begin_layout Itemize
2269 x: X-coordinate of left edge.
2270 \end_layout
2272 \begin_layout Itemize
2273 y: Y-coordinate of upper edge.
2274 \end_layout
2276 \begin_layout Itemize
2277 width: Width of rectangle.
2278 \end_layout
2280 \begin_layout Itemize
2281 height: Height of rectangle.
2282 \end_layout
2284 \begin_layout Itemize
2285 thickness: Thickness of outline (default is 1).
2286 \end_layout
2288 \begin_layout Itemize
2289 outline1: First color of outline (default is 0xFFFFFF (white))
2290 \end_layout
2292 \begin_layout Itemize
2293 outline2: First color of outline (default is 0x808080 (dark gray))
2294 \end_layout
2296 \begin_layout Itemize
2297 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2298 \end_layout
2300 \begin_layout Subsubsection
2301 gui.pixel(number x, number y[, number color])
2302 \end_layout
2304 \begin_layout Standard
2305 Draw one pixel on the GUI.
2306  Parameters:
2307 \end_layout
2309 \begin_layout Itemize
2310 x: X-coordinate of the pixel
2311 \end_layout
2313 \begin_layout Itemize
2314 y: Y-coordinate of the pixel
2315 \end_layout
2317 \begin_layout Itemize
2318 color: Color of the pixel (default is 0xFFFFFF (white))
2319 \end_layout
2321 \begin_layout Subsubsection
2322 gui.crosshair(number x, number y[, number length[, number color]])
2323 \end_layout
2325 \begin_layout Standard
2326 Draw a crosshair.
2327  Parameters:
2328 \end_layout
2330 \begin_layout Itemize
2331 x: X-coordinate of the crosshair
2332 \end_layout
2334 \begin_layout Itemize
2335 y: Y-coordinate of the crosshair
2336 \end_layout
2338 \begin_layout Itemize
2339 length: Length of the crosshair lines (default 10).
2340 \end_layout
2342 \begin_layout Itemize
2343 color: Color of the crosshair (default is 0xFFFFFF (white))
2344 \end_layout
2346 \begin_layout Subsubsection
2347 gui.line(number x1, number y1, number x2, number y2[, number color])
2348 \end_layout
2350 \begin_layout Standard
2351 Draw a thin line.
2352  Parameters:
2353 \end_layout
2355 \begin_layout Itemize
2356 x1: X-coordinate of one end.
2357 \end_layout
2359 \begin_layout Itemize
2360 y1: Y-coordinate of one end.
2361 \end_layout
2363 \begin_layout Itemize
2364 x2: X-coordinate of the other end.
2365 \end_layout
2367 \begin_layout Itemize
2368 y2: Y-coordinate of the other end.
2369 \end_layout
2371 \begin_layout Itemize
2372 color: Color of the line (default is 0xFFFFFF (white)).
2373 \end_layout
2375 \begin_layout Subsubsection
2376 gui.circle(number x, number y, number r[, number thick[, number border[,
2377  number fil]]])
2378 \end_layout
2380 \begin_layout Standard
2381 Draw a circle.
2382  Parameters.
2383 \end_layout
2385 \begin_layout Itemize
2386 x: X-coordinate of the center
2387 \end_layout
2389 \begin_layout Itemize
2390 y: Y-coordinate of the center
2391 \end_layout
2393 \begin_layout Itemize
2394 r: The radius of the circle
2395 \end_layout
2397 \begin_layout Itemize
2398 thick: Border thickness
2399 \end_layout
2401 \begin_layout Itemize
2402 border: Border color (default is 0xFFFFFF (white))
2403 \end_layout
2405 \begin_layout Itemize
2406 fill: Fill color (default is -1 (transparent)).
2407 \end_layout
2409 \begin_layout Subsubsection
2410 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2411 \end_layout
2413 \begin_layout Standard
2414 Draw a bitmap on screen with specified palette.
2415  Parameters:
2416 \end_layout
2418 \begin_layout Itemize
2419 x: X-coordinate of left edge.
2420 \end_layout
2422 \begin_layout Itemize
2423 y: Y-coordinate of top edge.
2424 \end_layout
2426 \begin_layout Itemize
2427 bitmap: The bitmap to draw
2428 \end_layout
2430 \begin_layout Itemize
2431 palette: The palette to draw the bitmap using.
2432 \end_layout
2434 \begin_layout Subsubsection
2435 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2436 \end_layout
2438 \begin_layout Standard
2439 Draw a bitmap on screen.
2440  Parameters:
2441 \end_layout
2443 \begin_layout Itemize
2444 x: X-coordinate of left edge.
2445 \end_layout
2447 \begin_layout Itemize
2448 y: Y-coordinate of top edge.
2449 \end_layout
2451 \begin_layout Itemize
2452 bitmap: The bitmap to draw
2453 \end_layout
2455 \begin_layout Subsubsection
2456 gui.palette_new()
2457 \end_layout
2459 \begin_layout Standard
2460 Returns a new palette (initially all transparent).
2461  Can be used anywhere.
2462 \end_layout
2464 \begin_layout Subsubsection
2465 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2466 \end_layout
2468 \begin_layout Standard
2469 Returns a new bitmap/dbitmap.
2470  Can be used anywhere.
2471  Parameters:
2472 \end_layout
2474 \begin_layout Itemize
2475 w: The width of new bitmap
2476 \end_layout
2478 \begin_layout Itemize
2479 h: The height of new bitmap
2480 \end_layout
2482 \begin_layout Itemize
2483 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2484 \end_layout
2486 \begin_layout Itemize
2487 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2488 \end_layout
2490 \begin_layout Subsubsection
2491 gui.bitmap_load(string file)
2492 \end_layout
2494 \begin_layout Standard
2495 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2496  for bitmap).
2497  Can be used anywhere.
2498  Parameters:
2499 \end_layout
2501 \begin_layout Itemize
2502 file: The name of file to load.
2503 \end_layout
2505 \begin_layout Subsubsection
2506 gui.palette_set(palette palette, number index, number color)
2507 \end_layout
2509 \begin_layout Standard
2510 Sets color in palette.
2511  Can be used anywhere.
2512  Parameters:
2513 \end_layout
2515 \begin_layout Itemize
2516 palette: The palette to manipulate
2517 \end_layout
2519 \begin_layout Itemize
2520 index: Index of color (0-65535).
2521 \end_layout
2523 \begin_layout Itemize
2524 color: The color value.
2525 \end_layout
2527 \begin_layout Subsubsection
2528 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2529 \end_layout
2531 \begin_layout Standard
2532 Sets specified pixel in bitmap.
2533  Can be used anywhere.
2534  Parameters:
2535 \end_layout
2537 \begin_layout Itemize
2538 bitmap: The bitmap to manipulate
2539 \end_layout
2541 \begin_layout Itemize
2542 x: The x-coordinate of the pixel.
2543 \end_layout
2545 \begin_layout Itemize
2546 y: The y-coordinate of the pixel.
2547 \end_layout
2549 \begin_layout Itemize
2550 color: If bitmap is a bitmap, color index (0-65535).
2551  Otherwise color value.
2552 \end_layout
2554 \begin_layout Subsubsection
2555 gui.bitmap_size(bitmap/dbitmap bitmap)
2556 \end_layout
2558 \begin_layout Standard
2559 Get size of bitmap.
2560  Can be used anywhere.
2561  Parameters:
2562 \end_layout
2564 \begin_layout Itemize
2565 bitmap: The bitmap to query.
2566 \end_layout
2568 \begin_layout Standard
2569 The first return is the width, the second is the height.
2570 \end_layout
2572 \begin_layout Subsubsection
2573 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2574  src, number sx, number sy, number w, number h[, number ck])
2575 \end_layout
2577 \begin_layout Standard
2578 Blit a part of bitmap to another.
2579  Can be used anywhere.
2580  Parameters:
2581 \end_layout
2583 \begin_layout Itemize
2584 dest: Destination to blit to.
2585 \end_layout
2587 \begin_layout Itemize
2588 dx: left edge of target
2589 \end_layout
2591 \begin_layout Itemize
2592 dy: Top edge of target
2593 \end_layout
2595 \begin_layout Itemize
2596 src: The source to blit from.
2597  Must be of the same type as destination.
2598 \end_layout
2600 \begin_layout Itemize
2601 sx: left edge of source
2602 \end_layout
2604 \begin_layout Itemize
2605 sy: Top edge of source
2606 \end_layout
2608 \begin_layout Itemize
2609 w: Width of region
2610 \end_layout
2612 \begin_layout Itemize
2613 h: Height of region.
2614 \end_layout
2616 \begin_layout Itemize
2617 ck: Color key.
2618  Pixels of this color are not blitted.
2619 \end_layout
2621 \begin_deeper
2622 \begin_layout Itemize
2623 If bitmaps are bitmaps, this is color index of colorkey.
2624  Values outside range 0-65535 cause no key to be used as colorkey.
2625 \end_layout
2627 \begin_layout Itemize
2628 If bitmaps are dbitmaps, this color value of colorkey.
2629 \end_layout
2631 \begin_layout Itemize
2632 May be absent or nil for no colorkey blit.
2633 \end_layout
2635 \end_deeper
2636 \begin_layout Subsubsection
2637 gui.repaint()
2638 \end_layout
2640 \begin_layout Standard
2641 Request on_repaint() to happen as soon as possible.
2642  Can be used anywhere.
2643 \end_layout
2645 \begin_layout Subsubsection
2646 gui.subframe_update(boolean on)
2647 \end_layout
2649 \begin_layout Standard
2650 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2651  or not happen (on=false).
2652  Can be used anywhere.
2653 \end_layout
2655 \begin_layout Subsubsection
2656 gui.screenshot(string filename)
2657 \end_layout
2659 \begin_layout Standard
2660 Write PNG screenshot of the current frame (no drawings) to specified file.
2661  Can be used anywhere.
2662 \end_layout
2664 \begin_layout Subsubsection
2665 gui.color(number r, number g, number b[, number a])
2666 \end_layout
2668 \begin_layout Standard
2669 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2670  each component in scale 0-255.
2671  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2672  opaque).
2673  The default alpha is 256.
2674 \end_layout
2676 \begin_layout Subsubsection
2677 gui.status(string name, string value)
2678 \end_layout
2680 \begin_layout Standard
2681 Set status field 
2682 \begin_inset Quotes eld
2683 \end_inset
2685 L[<name>]
2686 \begin_inset Quotes erd
2687 \end_inset
2689  to <value> in status area.
2690  Can be used anywhere.
2691 \end_layout
2693 \begin_layout Subsubsection
2694 gui.rainbow(number step, number steps[, number color])
2695 \end_layout
2697 \begin_layout Standard
2698 Perform hue rotation of color <color> (default bright red), by <step> steps.
2699  The number of steps per full rotation is given by absolute value of <steps>.
2700 \end_layout
2702 \begin_layout Standard
2703 If <steps> is negative, the rotation will be counterclockwise.
2704 \end_layout
2706 \begin_layout Subsubsection
2707 gui.screenshot(string filename)
2708 \end_layout
2710 \begin_layout Standard
2711 Saves a screenshot into specified file.
2712 \end_layout
2714 \begin_layout Subsection
2715 table input
2716 \end_layout
2718 \begin_layout Standard
2719 Input handling.
2720  Only available in on_input callback.
2721 \end_layout
2723 \begin_layout Subsubsection
2724 input.get(number controller, number index)
2725 \end_layout
2727 \begin_layout Standard
2728 Read the specified index (0-11) from specified controller (0-7).
2729  Notes:
2730 \end_layout
2732 \begin_layout Itemize
2733 Uses physical controller numbering.
2734  Gamepad in port 2 is controller 4, not 1!
2735 \end_layout
2737 \begin_layout Subsubsection
2738 input.set(number controller, number index, number value)
2739 \end_layout
2741 \begin_layout Standard
2742 Write the specified index (0-11) from specified controller (0-7), storing
2743  value.
2744  Notes:
2745 \end_layout
2747 \begin_layout Itemize
2748 Uses physical controller numbering.
2749  Gamepad in port 2 is controller 4, not 1!
2750 \end_layout
2752 \begin_layout Subsubsection
2753 input.geta(number controller)
2754 \end_layout
2756 \begin_layout Standard
2757 Get input state for entiere controller.
2758  Returns 13 return values.
2759 \end_layout
2761 \begin_layout Itemize
2762 1st return value: Bitmask: bit i is set if i:th index is nonzero
2763 \end_layout
2765 \begin_layout Itemize
2766 2nd-13th return value: value of i:th index.
2767 \end_layout
2769 \begin_layout Subsubsection
2770 input.seta(number controller, number bitmask, number args...)
2771 \end_layout
2773 \begin_layout Standard
2774 Set state for entiere controller.
2775  args is up to 12 values for indices (overriding values in bitmask if specified).
2776 \end_layout
2778 \begin_layout Subsubsection
2779 input.controllertype(number controller)
2780 \end_layout
2782 \begin_layout Standard
2783 Get the type of controller as string.
2784  Valid values are:
2785 \end_layout
2787 \begin_layout Itemize
2788 gamepad
2789 \end_layout
2791 \begin_layout Itemize
2792 mouse
2793 \end_layout
2795 \begin_layout Itemize
2796 justifier
2797 \end_layout
2799 \begin_layout Itemize
2800 superscope
2801 \end_layout
2803 \begin_layout Subsubsection
2804 input.reset([number cycles])
2805 \end_layout
2807 \begin_layout Standard
2808 Execute reset.
2809  If cycles is greater than zero, do delayed reset.
2810  0 (or no value) causes immediate reset.
2811 \end_layout
2813 \begin_layout Itemize
2814 Only available with subframe flag false.
2815 \end_layout
2817 \begin_layout Subsubsection
2818 input.raw()
2819 \end_layout
2821 \begin_layout Standard
2822 Returns table of tables of all available keys and axes.
2823  The first table is indexed by key name (platform-dependent!), and the inner
2824  table has the following fields:
2825 \end_layout
2827 \begin_layout Itemize
2828 last_rawval: Last reported raw value for control.
2829 \end_layout
2831 \begin_layout Itemize
2832 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2833  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2834 \end_layout
2836 \begin_layout Itemize
2837 cal_left: Minimum calibration value.
2838  Only meaningful with axis and pressure types.
2839 \end_layout
2841 \begin_layout Itemize
2842 cal_center: Center calibration value.
2843  Only meaningful with axis and pressure types.
2844 \end_layout
2846 \begin_layout Itemize
2847 cal_right: Maximum calibration value.
2848  Only meaningful with axis and pressure types.
2849 \end_layout
2851 \begin_layout Itemize
2852 cal_tolerance: Dead zone tolerance.
2853  Only meaningful with axis and pressure types.
2854 \end_layout
2856 \begin_layout Subsubsection
2857 input.keyhook(string key, boolean state)
2858 \end_layout
2860 \begin_layout Standard
2861 Requests that keyhook events to be sent for key (state=true) or not sent
2862  (state=false).
2863 \end_layout
2865 \begin_layout Subsubsection
2866 input.joyget(number controller)
2867 \end_layout
2869 \begin_layout Standard
2870 Returns table for current controls for specified controller.
2871  The names of fields vary by controller type.
2872 \end_layout
2874 \begin_layout Itemize
2875 The buttons have the same name as those are referred to in other contexts
2876  in the emulator
2877 \end_layout
2879 \begin_layout Itemize
2880 The analog axes are 
2881 \begin_inset Quotes eld
2882 \end_inset
2884 xaxis
2885 \begin_inset Quotes erd
2886 \end_inset
2888  and 
2889 \begin_inset Quotes eld
2890 \end_inset
2892 yaxis
2893 \begin_inset Quotes erd
2894 \end_inset
2897 \end_layout
2899 \begin_layout Subsubsection
2900 input.joyset(number controller, table controls)
2901 \end_layout
2903 \begin_layout Standard
2904 Set the the state of specified controller to values specified in specified
2905  table.
2906 \end_layout
2908 \begin_layout Subsection
2909 Table subtitle
2910 \end_layout
2912 \begin_layout Standard
2913 Subtitle handling
2914 \end_layout
2916 \begin_layout Subsubsection
2917 subtitle.byindex(number i)
2918 \end_layout
2920 \begin_layout Standard
2921 Read the frame and length of ith subtitle.
2922  Returns nothing if not present.
2923 \end_layout
2925 \begin_layout Subsubsection
2926 subtitle.set(number f, number l, string txt)
2927 \end_layout
2929 \begin_layout Standard
2930 Set the text of subtitle.
2931 \end_layout
2933 \begin_layout Subsubsection
2934 subtitle.get(number f, number l)
2935 \end_layout
2937 \begin_layout Standard
2938 Get the text of subtitle.
2939 \end_layout
2941 \begin_layout Subsubsection
2942 subtitle.delete(number f, number l)
2943 \end_layout
2945 \begin_layout Standard
2946 Delete specified subtitle.
2947 \end_layout
2949 \begin_layout Subsection
2950 Table hostmemory
2951 \end_layout
2953 \begin_layout Standard
2954 Host memory handling (extra memory saved to savestates).
2955  Host memory starts empty.
2956 \end_layout
2958 \begin_layout Subsubsection
2959 hostmemory.read(number address)
2960 \end_layout
2962 \begin_layout Standard
2963 Reads hostmemory slot address.
2964  Slot numbers out of range return false instead of numeric.
2965 \end_layout
2967 \begin_layout Subsubsection
2968 hostmemory.write(number address, number value)
2969 \end_layout
2971 \begin_layout Standard
2972 Writes hostmemory slot with 0-255.
2973  Slot numbers out of range cause extension of host memory slot space.
2974 \end_layout
2976 \begin_layout Subsubsection
2977 hostmemory.readbyte(number address)
2978 \end_layout
2980 \begin_layout Standard
2981 Read unsigned byte (1 element) from given address.
2982  Slots out of range return false.
2983 \end_layout
2985 \begin_layout Subsubsection
2986 hostmemory.writebyte(number address, number value)
2987 \end_layout
2989 \begin_layout Standard
2990 Write unsigned byte (1 element) to given slot.
2991  Slot numbers out of range cause extension.
2992 \end_layout
2994 \begin_layout Subsubsection
2995 hostmemory.readsbyte(number address)
2996 \end_layout
2998 \begin_layout Standard
2999 Read signed byte (1 element) from given address.
3000  Slots out of range return false.
3001 \end_layout
3003 \begin_layout Subsubsection
3004 hostmemory.writesbyte(number address, number value)
3005 \end_layout
3007 \begin_layout Standard
3008 Write signed byte (1 element) to given slot.
3009  Slot numbers out of range cause extension.
3010 \end_layout
3012 \begin_layout Subsubsection
3013 hostmemory.readword(number address)
3014 \end_layout
3016 \begin_layout Standard
3017 Read unsigned word (2 elements) from given address.
3018  Slots out of range return false.
3019 \end_layout
3021 \begin_layout Subsubsection
3022 hostmemory.writeword(number address, number value)
3023 \end_layout
3025 \begin_layout Standard
3026 Write unsigned word (2 elements) to given slot.
3027  Slot numbers out of range cause extension.
3028 \end_layout
3030 \begin_layout Subsubsection
3031 hostmemory.readsword(number address)
3032 \end_layout
3034 \begin_layout Standard
3035 Read signed word (2 elements) from given address.
3036  Slots out of range return false.
3037 \end_layout
3039 \begin_layout Subsubsection
3040 hostmemory.writesword(number address, number value)
3041 \end_layout
3043 \begin_layout Standard
3044 Write signed word (2 elements) to given slot.
3045  Slot numbers out of range cause extension.
3046 \end_layout
3048 \begin_layout Subsubsection
3049 hostmemory.readdword(number address)
3050 \end_layout
3052 \begin_layout Standard
3053 Read unsigned doubleword (4 elements) from given address.
3054  Slots out of range return false.
3055 \end_layout
3057 \begin_layout Subsubsection
3058 hostmemory.writedword(number address, number value)
3059 \end_layout
3061 \begin_layout Standard
3062 Write unsigned doubleword (4 elements) to given slot.
3063  Slot numbers out of range cause extension.
3064 \end_layout
3066 \begin_layout Subsubsection
3067 hostmemory.readsdword(number address)
3068 \end_layout
3070 \begin_layout Standard
3071 Read signed doubleword (4 elements) from given address.
3072  Slots out of range return false.
3073 \end_layout
3075 \begin_layout Subsubsection
3076 hostmemory.writesdword(number address, number value)
3077 \end_layout
3079 \begin_layout Standard
3080 Write signed doubleword (4 elements) to given slot.
3081  Slot numbers out of range cause extension.
3082 \end_layout
3084 \begin_layout Subsubsection
3085 hostmemory.readqword(number address)
3086 \end_layout
3088 \begin_layout Standard
3089 Read unsigned quadword (8 elements) from given address.
3090  Slots out of range return false.
3091 \end_layout
3093 \begin_layout Subsubsection
3094 hostmemory.writeqword(number address, number value)
3095 \end_layout
3097 \begin_layout Standard
3098 Write unsigned quadword (4 elements) to given slot.
3099  Slot numbers out of range cause extension.
3100 \end_layout
3102 \begin_layout Subsubsection
3103 hostmemory.readsqword(number address)
3104 \end_layout
3106 \begin_layout Standard
3107 Read signed quadword (8 elements) from given address.
3108  Slots out of range return false.
3109 \end_layout
3111 \begin_layout Subsubsection
3112 hostmemory.writesqword(number address, number value)
3113 \end_layout
3115 \begin_layout Standard
3116 Write signed quadword (8 elements) to given slot.
3117  Slot numbers out of range cause extension.
3118 \end_layout
3120 \begin_layout Subsection
3121 Table movie
3122 \end_layout
3124 \begin_layout Standard
3125 Movie handling
3126 \end_layout
3128 \begin_layout Subsubsection
3129 movie.currentframe()
3130 \end_layout
3132 \begin_layout Standard
3133 Return number of current frame.
3134 \end_layout
3136 \begin_layout Subsubsection
3137 movie.framecount()
3138 \end_layout
3140 \begin_layout Standard
3141 Return number of frames in movie.
3142 \end_layout
3144 \begin_layout Subsubsection
3145 movie.readonly()
3146 \end_layout
3148 \begin_layout Standard
3149 Return true if in readonly mode, false if in readwrite.
3150 \end_layout
3152 \begin_layout Subsubsection
3153 movie.rerecords()
3154 \end_layout
3156 \begin_layout Standard
3157 Returns the current value of rerecord count.
3158 \end_layout
3160 \begin_layout Subsubsection
3161 movie.set_readwrite()
3162 \end_layout
3164 \begin_layout Standard
3165 Set readwrite mode (does not cause on_readwrite callback).
3166 \end_layout
3168 \begin_layout Subsubsection
3169 movie.frame_subframes(number frame)
3170 \end_layout
3172 \begin_layout Standard
3173 Count number of subframes in specified frame (frame numbers are 1-based)
3174  and return that.
3175 \end_layout
3177 \begin_layout Subsubsection
3178 movie.read_subframe(number frame, number subframe)
3179 \end_layout
3181 \begin_layout Standard
3182 Read specifed subframe in specified frame and return data as array (100
3183  elements, numbered 0-99 currently).
3184 \end_layout
3186 \begin_layout Subsubsection
3187 movie.read_rtc()
3188 \end_layout
3190 \begin_layout Standard
3191 Returns the current value of the RTC as a pair (second, subsecond).
3192 \end_layout
3194 \begin_layout Subsubsection
3195 movie.unsafe_rewind([UNSAFEREWIND state])
3196 \end_layout
3198 \begin_layout Standard
3199 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3200 \end_layout
3202 \begin_layout Itemize
3203 If called without argument, causes emulator to start process of setting
3204  unsafe rewind point.
3205  When this has finished, callback on_set_rewind occurs, passing the rewind
3206  state to lua script.
3207 \end_layout
3209 \begin_layout Itemize
3210 If called with argument, causes emulator rewind to passed rewind point as
3211  soon as possible.
3212  Readwrite mode is implicitly activated.
3213 \end_layout
3215 \begin_layout Standard
3216 The following warnings apply to unsafe rewinding:
3217 \end_layout
3219 \begin_layout Itemize
3220 There are no safety checks against misuse (that's what 
3221 \begin_inset Quotes eld
3222 \end_inset
3224 unsafe
3225 \begin_inset Quotes erd
3226 \end_inset
3228  comes from)!
3229 \end_layout
3231 \begin_layout Itemize
3232 Only call rewind from timeline rewind point was set from.
3233 \end_layout
3235 \begin_layout Itemize
3236 Only call rewind from after the rewind point was set.
3237 \end_layout
3239 \begin_layout Subsection
3240 Table settings
3241 \end_layout
3243 \begin_layout Standard
3244 Routines for settings manipulation
3245 \end_layout
3247 \begin_layout Subsubsection
3248 settings.get(string name)
3249 \end_layout
3251 \begin_layout Standard
3252 Get value of setting.
3253  If setting is blank, returns false.
3254  If setting value can't be obtained, returns (nil, error message).
3255 \end_layout
3257 \begin_layout Subsubsection
3258 settings.set(string name, string value)
3259 \end_layout
3261 \begin_layout Standard
3262 Set value of setting.
3263  If setting can't be set, returns (nil, error message).
3264 \end_layout
3266 \begin_layout Subsubsection
3267 settings.is_set(string name)
3268 \end_layout
3270 \begin_layout Standard
3271 Returns if setting is set.
3272  If setting does not exist, returns (nil, error message).
3273 \end_layout
3275 \begin_layout Subsubsection
3276 settings.blank(string name)
3277 \end_layout
3279 \begin_layout Standard
3280 Blanks a setting and returns true.
3281  If setting can't be blanked, returns (nil, error message).
3282 \end_layout
3284 \begin_layout Subsection
3285 Table memory
3286 \end_layout
3288 \begin_layout Standard
3289 Contains various functions for managing memory
3290 \end_layout
3292 \begin_layout Subsubsection
3293 memory.vma_count()
3294 \end_layout
3296 \begin_layout Standard
3297 Returns the number of VMAs
3298 \end_layout
3300 \begin_layout Subsubsection
3301 memory.read_vma(number index)
3302 \end_layout
3304 \begin_layout Standard
3305 Reads the specified VMA (indices start from zero).
3306  Trying to read invalid VMA gives nil.
3307  The read VMA is table with the following fields:
3308 \end_layout
3310 \begin_layout Itemize
3311 region_name (string): The readable name of the VMA
3312 \end_layout
3314 \begin_layout Itemize
3315 baseaddr (number): Base address of the VMA
3316 \end_layout
3318 \begin_layout Itemize
3319 lastaddr (number): Last address in the VMA.
3320 \end_layout
3322 \begin_layout Itemize
3323 size (number): The size of VMA in bytes.
3324 \end_layout
3326 \begin_layout Itemize
3327 readonly (boolean): True of the VMA corresponds to ROM.
3328 \end_layout
3330 \begin_layout Itemize
3331 iospace (boolean): True if the VMA is I/O space.
3332 \end_layout
3334 \begin_layout Itemize
3335 native_endian (boolean): True if the VMA has native endian as opposed to
3336  little endian.
3337 \end_layout
3339 \begin_layout Subsubsection
3340 memory.find_vma(number address)
3341 \end_layout
3343 \begin_layout Standard
3344 Finds the VMA containing specified address.
3345  Returns table in the same format as read_vma or nil if not found.
3346 \end_layout
3348 \begin_layout Subsubsection
3349 memory.readbyte(number address)
3350 \end_layout
3352 \begin_layout Standard
3353 Reads the specified address as unsigned byte and returns the result.
3354 \end_layout
3356 \begin_layout Subsubsection
3357 memory.readsbyte(number address)
3358 \end_layout
3360 \begin_layout Standard
3361 Reads the specified address as signed byte and returns the result.
3362 \end_layout
3364 \begin_layout Subsubsection
3365 memory.writebyte(number address, number value)
3366 \end_layout
3368 \begin_layout Standard
3369 Writes the specified value (negative values undergo 2's complement) to specified
3370  address (as a byte).
3371 \end_layout
3373 \begin_layout Subsubsection
3374 memory.readword(number address)
3375 \end_layout
3377 \begin_layout Standard
3378 Reads the specified address as unsigned word and returns the result.
3379 \end_layout
3381 \begin_layout Subsubsection
3382 memory.readsword(number address)
3383 \end_layout
3385 \begin_layout Standard
3386 Reads the specified address as signed word and returns the result.
3387 \end_layout
3389 \begin_layout Subsubsection
3390 memory.writeword(number address, number value)
3391 \end_layout
3393 \begin_layout Standard
3394 Writes the specified value (negative values undergo 2's complement) to specified
3395  address (as a word).
3396 \end_layout
3398 \begin_layout Subsubsection
3399 memory.readdword(number address)
3400 \end_layout
3402 \begin_layout Standard
3403 Reads the specified address as unsigned doubleword and returns the result.
3404 \end_layout
3406 \begin_layout Subsubsection
3407 memory.readsdword(number address)
3408 \end_layout
3410 \begin_layout Standard
3411 Reads the specified address as signed doubleword and returns the result.
3412 \end_layout
3414 \begin_layout Subsubsection
3415 memory.writedword(number address, number value)
3416 \end_layout
3418 \begin_layout Standard
3419 Writes the specified value (negative values undergo 2's complement) to specified
3420  address (as a doubleword).
3421 \end_layout
3423 \begin_layout Subsubsection
3424 memory.readqword(number address)
3425 \end_layout
3427 \begin_layout Standard
3428 Reads the specified address as unsigned quadword and returns the result.
3429 \end_layout
3431 \begin_layout Subsubsection
3432 memory.readsqword(number address)
3433 \end_layout
3435 \begin_layout Standard
3436 Reads the specified address as signed quadword and returns the result.
3437 \end_layout
3439 \begin_layout Subsubsection
3440 memory.writeqword(number address, number value)
3441 \end_layout
3443 \begin_layout Standard
3444 Writes the specified value (negative values undergo 2's complement) to specified
3445  address (as a quadword).
3446 \end_layout
3448 \begin_layout Subsubsection
3449 memory.hash_region(number base, number size)
3450 \end_layout
3452 \begin_layout Standard
3453 Hash specified number of bytes starting from specified address and return
3454  the SHA-256.
3455 \end_layout
3457 \begin_layout Subsubsection
3458 memory.hash_state()
3459 \end_layout
3461 \begin_layout Standard
3462 Hash the current system state.
3463  Mainly useful for debugging savestates.
3464 \end_layout
3466 \begin_layout Subsubsection
3467 memory.readregion(number base, number size)
3468 \end_layout
3470 \begin_layout Standard
3471 Read a region of memory.
3472 \end_layout
3474 \begin_layout Itemize
3475 Warning: If the region crosses VMA boundary, the results are undefined.
3476 \end_layout
3478 \begin_layout Subsubsection
3479 memory.writeregion(number base, number size, table data)
3480 \end_layout
3482 \begin_layout Standard
3483 Write a region of memory.
3484 \end_layout
3486 \begin_layout Itemize
3487 Warning: If the region crosses VMA boundary, the results are undefined.
3488 \end_layout
3490 \begin_layout Subsection
3491 Table subtitle
3492 \end_layout
3494 \begin_layout Standard
3495 Contains functions for manipulating subtitles.
3496 \end_layout
3498 \begin_layout Subsubsection
3499 subtitle.byindex(number index)
3500 \end_layout
3502 \begin_layout Standard
3503 Get (basetime, length) pair of specified subtitle index or nothing if index
3504  isn't valid.
3505 \end_layout
3507 \begin_layout Subsubsection
3508 subtitle.get(number basetime, number length)
3509 \end_layout
3511 \begin_layout Standard
3512 Read the specified subtitle.
3513  Returns 
3514 \begin_inset Quotes eld
3515 \end_inset
3518 \begin_inset Quotes erd
3519 \end_inset
3521  if the subtitle does not exist.
3522 \end_layout
3524 \begin_layout Subsubsection
3525 subtitle.set(number basetime, number length, string content)
3526 \end_layout
3528 \begin_layout Standard
3529 Set the specified subtitle.
3530 \end_layout
3532 \begin_layout Subsubsection
3533 subtitle.deltete(number basetime, number length)
3534 \end_layout
3536 \begin_layout Standard
3537 Delete the specified subtitle.
3538 \end_layout
3540 \begin_layout Subsection
3541 Table _SYSTEM
3542 \end_layout
3544 \begin_layout Standard
3545 Contains copy of global variables from time of Lua initialization.
3546  Non-writeable.
3547 \end_layout
3549 \begin_layout Subsection
3550 Callbacks
3551 \end_layout
3553 \begin_layout Standard
3554 Various callbacks to Lua that can occur.
3555 \end_layout
3557 \begin_layout Subsubsection
3558 Callback: on_paint(bool not_synth)
3559 \end_layout
3561 \begin_layout Standard
3562 Called when screen is being painted.
3563  Any gui.* calls requiring graphic context draw on the screen.
3564 \end_layout
3566 \begin_layout Standard
3567 not_synth is true if this hook is being called in response to received frame,
3568  false otherwise.
3569 \end_layout
3571 \begin_layout Subsubsection
3572 Callback: on_video()
3573 \end_layout
3575 \begin_layout Standard
3576 Called when video dump frame is being painted.
3577  Any gui.* calls requiring graphic context draw on the video.
3578 \end_layout
3580 \begin_layout Subsubsection
3581 Callback: on_frame_emulated()
3582 \end_layout
3584 \begin_layout Standard
3585 Called when emulating frame has completed and on_paint()/on_video() calls
3586  are about to be issued.
3587 \end_layout
3589 \begin_layout Subsubsection
3590 Callback: on_frame()
3591 \end_layout
3593 \begin_layout Standard
3594 Called on each starting whole frame.
3595 \end_layout
3597 \begin_layout Subsubsection
3598 Callback: on_startup()
3599 \end_layout
3601 \begin_layout Standard
3602 Called when the emulator is starting (lsnes.rc and --run files has been run).
3603 \end_layout
3605 \begin_layout Subsubsection
3606 Callback: on_rewind()
3607 \end_layout
3609 \begin_layout Standard
3610 Called when rewind movie to beginning has completed.
3611 \end_layout
3613 \begin_layout Subsubsection
3614 Callback: on_pre_load(string name)
3615 \end_layout
3617 \begin_layout Standard
3618 Called just before savestate/movie load occurs (note: loads are always delayed,
3619  so this occurs even when load was initiated by lua).
3620 \end_layout
3622 \begin_layout Subsubsection
3623 Callback: on_err_load(string name)
3624 \end_layout
3626 \begin_layout Standard
3627 Called if loadstate goes wrong.
3628 \end_layout
3630 \begin_layout Subsubsection
3631 Callback: on_post_load(string name, boolean was_savestate)
3632 \end_layout
3634 \begin_layout Standard
3635 Called on successful loadstate.
3636  was_savestate gives if this was a savestate or a movie.
3637 \end_layout
3639 \begin_layout Subsubsection
3640 Callback: on_pre_save(string name, boolean is_savestate)
3641 \end_layout
3643 \begin_layout Standard
3644 Called just before savestate save occurs (note: movie saves are synchronous
3645  and won't trigger these callbacks if called from Lua).
3646 \end_layout
3648 \begin_layout Subsubsection
3649 Callback: on_err_save(string name)
3650 \end_layout
3652 \begin_layout Standard
3653 Called if savestate goes wrong.
3654 \end_layout
3656 \begin_layout Subsubsection
3657 Callback: on_post_save(string name, boolean is_savestate)
3658 \end_layout
3660 \begin_layout Standard
3661 Called on successful savaestate.
3662  is_savestate gives if this was a savestate or a movie.
3663 \end_layout
3665 \begin_layout Subsubsection
3666 Callback: on_quit()
3667 \end_layout
3669 \begin_layout Standard
3670 Called when emulator is shutting down.
3671 \end_layout
3673 \begin_layout Subsubsection
3674 Callback: on_input(boolean subframe)
3675 \end_layout
3677 \begin_layout Standard
3678 Called when emulator is just sending input to bsnes core.
3679  Warning: This is called even in readonly mode, but the results are ignored.
3680 \end_layout
3682 \begin_layout Subsubsection
3683 Callback: on_reset()
3684 \end_layout
3686 \begin_layout Standard
3687 Called when SNES is reset.
3688 \end_layout
3690 \begin_layout Subsubsection
3691 Callback: on_readwrite()
3692 \end_layout
3694 \begin_layout Standard
3695 Called when moving into readwrite mode as result of 
3696 \begin_inset Quotes eld
3697 \end_inset
3699 set-rwmode
3700 \begin_inset Quotes erd
3701 \end_inset
3703  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3704  entry protection).
3705 \end_layout
3707 \begin_layout Subsubsection
3708 Callback: on_snoop(number port, number controller, number index, number
3709  value)
3710 \end_layout
3712 \begin_layout Standard
3713 Called each time bsnes asks for input.
3714  The value is the final value to be sent to bsnes core (readonly mode, autohold
3715  and autofire have been taken into account).
3716  Might be useful when translating movies to format suitable for console
3717  verification.
3718  Note: There is no way to modify the value to be sent.
3719 \end_layout
3721 \begin_layout Subsubsection
3722 Callback: on_keyhook(string keyname, table state)
3723 \end_layout
3725 \begin_layout Standard
3726 Sent when key that has keyhook events requested changes state.
3727  Keyname is name of the key (group) and state is the state (same kind as
3728  table values in input.raw).
3729 \end_layout
3731 \begin_layout Subsubsection
3732 Callback: on_idle()
3733 \end_layout
3735 \begin_layout Standard
3736 Called when requested by set_idle_timeout(), the timeout has expired and
3737  emulator is waiting.
3738 \end_layout
3740 \begin_layout Subsubsection
3741 Callback: on_timer()
3742 \end_layout
3744 \begin_layout Standard
3745 Called when requested by set_idle_timeout() and the timeout has expired
3746  (regardless if emulator is waiting).
3747 \end_layout
3749 \begin_layout Subsubsection
3750 Callback: on_set_rewind(UNSAFEREWIND r)
3751 \end_layout
3753 \begin_layout Standard
3754 Called when unsafe rewind object has been constructed.
3755 \end_layout
3757 \begin_layout Subsubsection
3758 Callback: on_pre_rewind() 
3759 \end_layout
3761 \begin_layout Standard
3762 Called just before unsafe rewind is about to occur.
3763 \end_layout
3765 \begin_layout Subsubsection
3766 Callback: on_post_rewind() 
3767 \end_layout
3769 \begin_layout Standard
3770 Called just after unsafe rewind has occured.
3771 \end_layout
3773 \begin_layout Section
3774 Memory watch expression syntax
3775 \end_layout
3777 \begin_layout Standard
3778 Memory watch expressions are in RPN (Reverse Polish Notation).
3779  At the end of expression, the top entry on stack is taken as the final
3780  result.
3781 \end_layout
3783 \begin_layout Standard
3784 Notations:
3785 \end_layout
3787 \begin_layout Itemize
3788 Evaluation order is strictly left to right.
3789 \end_layout
3791 \begin_layout Itemize
3792 a is the entry on top of stack
3793 \end_layout
3795 \begin_layout Itemize
3796 b is the entry immediately below top of stack
3797 \end_layout
3799 \begin_layout Itemize
3800 ; separates values to be pushed (no intermediate pop).
3801 \end_layout
3803 \begin_layout Itemize
3804 After end of element, all used stack slots are popped and all results are
3805  pushed.
3806 \end_layout
3808 \begin_layout Itemize
3809 When pushing multiple values, the pushes occur in order shown.
3810 \end_layout
3812 \begin_layout Standard
3813 The following operators are available:
3814 \end_layout
3816 \begin_layout Itemize
3817 + : a + b
3818 \end_layout
3820 \begin_layout Itemize
3821 - : a - b
3822 \end_layout
3824 \begin_layout Itemize
3825 * : a * b
3826 \end_layout
3828 \begin_layout Itemize
3829 / : a / b
3830 \end_layout
3832 \begin_layout Itemize
3833 % : a % b
3834 \end_layout
3836 \begin_layout Itemize
3837 a : atan(a)
3838 \end_layout
3840 \begin_layout Itemize
3841 b : read_signed_byte(a)
3842 \end_layout
3844 \begin_layout Itemize
3845 c : cos(a)
3846 \end_layout
3848 \begin_layout Itemize
3849 d : read_signed_dword(a)
3850 \end_layout
3852 \begin_layout Itemize
3853 i : quotent(a / b)
3854 \end_layout
3856 \begin_layout Itemize
3857 p :
3858 \begin_inset Formula $\pi$
3859 \end_inset
3862 \end_layout
3864 \begin_layout Itemize
3865 q : read_signed_qword(a)
3866 \end_layout
3868 \begin_layout Itemize
3869 r : sqrt(a)
3870 \end_layout
3872 \begin_layout Itemize
3873 s : sin(a)
3874 \end_layout
3876 \begin_layout Itemize
3877 t : tan(a)
3878 \end_layout
3880 \begin_layout Itemize
3881 u : a; a
3882 \end_layout
3884 \begin_layout Itemize
3885 w : read_signed_word(a)
3886 \end_layout
3888 \begin_layout Itemize
3889 A : atan2(a, b)
3890 \end_layout
3892 \begin_layout Itemize
3893 B : read_unsigned_byte(a)
3894 \end_layout
3896 \begin_layout Itemize
3897 C<number>z : Push number <number> to stack.
3898 \end_layout
3900 \begin_layout Itemize
3901 D : read_unsigned_dword(a)
3902 \end_layout
3904 \begin_layout Itemize
3905 C0x<number>z : Push number <number> (hexadecimal) to stack.
3906 \end_layout
3908 \begin_layout Itemize
3909 Q : read_unsigned_qword(a)
3910 \end_layout
3912 \begin_layout Itemize
3913 R<digit> : round a to <digit> digits.
3914 \end_layout
3916 \begin_layout Itemize
3917 W : read_unsigned_word(a)
3918 \end_layout
3920 \begin_layout Subsection
3921 Example:
3922 \end_layout
3924 \begin_layout Standard
3925 C0x007e0878zWC0x007e002czW-
3926 \end_layout
3928 \begin_layout Enumerate
3929 Push value 0x7e0878 on top of stack (C0x007e0878z).
3930 \end_layout
3932 \begin_layout Enumerate
3933 Pop the value on top of stack (0x7e0878), read word value at that address
3934  and push the result,call it x1 (W).
3935 \end_layout
3937 \begin_layout Enumerate
3938 Push value 0x7e002c on top of stack (C0x007e002cz).
3939 \end_layout
3941 \begin_layout Enumerate
3942 Pop the value on top of stack (0x7e002c), read word value at that address
3943  and push the result,call it x2 (W).
3944 \end_layout
3946 \begin_layout Enumerate
3947 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3948  x2 - x1 (-).
3949 \end_layout
3951 \begin_layout Enumerate
3952 Since the expression ends, the final memory watch result is the top one
3953  on stack, which is x2 - x1.
3954 \end_layout
3956 \begin_layout Section
3957 Modifier and key names:
3958 \end_layout
3960 \begin_layout Subsection
3961 SDL Platform
3962 \end_layout
3964 \begin_layout Subsubsection
3965 Modifier names
3966 \end_layout
3968 \begin_layout Standard
3969 Following modifier names are known:
3970 \end_layout
3972 \begin_layout Itemize
3973 ctrl, lctrl, rctrl: Control keys
3974 \end_layout
3976 \begin_layout Itemize
3977 alt, lalt, ralt: ALT keys.
3978 \end_layout
3980 \begin_layout Itemize
3981 shift, lshift, rshift: Shift keys.
3982 \end_layout
3984 \begin_layout Itemize
3985 meta, lmeta, rmeta: Meta keys.
3986 \end_layout
3988 \begin_layout Itemize
3989 num, caps: Numlock/Capslock (these are sticky!)
3990 \end_layout
3992 \begin_layout Itemize
3993 mode: Mode select.
3994 \end_layout
3996 \begin_layout Subsubsection
3997 Key names
3998 \end_layout
4000 \begin_layout Standard
4001 Following key names are known:
4002 \end_layout
4004 \begin_layout Itemize
4005 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4006  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4007  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4008  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4009  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4010  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4011  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4012  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4013  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4014  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4015  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4016  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4017  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4018  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4019  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4020  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4021  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4022  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4023  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4024  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4025  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4026  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4027  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4028  break, menu, power, euro, undo
4029 \end_layout
4031 \begin_layout Itemize
4032 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4033  hardware-dependent scan code of <n> (useful to bind those keys that don't
4034  have symbolic names).
4035 \end_layout
4037 \begin_layout Subsubsection
4038 Joystick pseudo-keys:
4039 \end_layout
4041 \begin_layout Itemize
4042 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4043 \end_layout
4045 \begin_layout Itemize
4046 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4047 \end_layout
4049 \begin_layout Itemize
4050 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4051 \end_layout
4053 \begin_layout Itemize
4054 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4055 \end_layout
4057 \begin_layout Itemize
4058 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4059 \end_layout
4061 \begin_layout Itemize
4062 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4063  position (axis modes axis and axis_inverse).
4064 \end_layout
4066 \begin_layout Itemize
4067 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4068  position (axis modes axis and axis_inverse).
4069 \end_layout
4071 \begin_layout Itemize
4072 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4073  modes pressure_*).
4074 \end_layout
4076 \begin_layout Subsubsection
4077 Special buttons:
4078 \end_layout
4080 \begin_layout Itemize
4081 Escape: Enter/Exit Command mode, cancel modal dialogs.
4082 \end_layout
4084 \begin_layout Itemize
4085 Return (also KPEnter): Execute command, ok modal dialog.
4086 \end_layout
4088 \begin_layout Itemize
4089 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4090  in command history
4091 \end_layout
4093 \begin_layout Itemize
4094 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4095  in command history
4096 \end_layout
4098 \begin_layout Itemize
4099 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4100 \end_layout
4102 \begin_layout Itemize
4103 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4104 \end_layout
4106 \begin_layout Itemize
4107 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4108 \end_layout
4110 \begin_layout Itemize
4111 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4112 \end_layout
4114 \begin_layout Itemize
4115 Delete (also KP.
4116  if no num lock; command mode): Delete character to right of cursor.
4117 \end_layout
4119 \begin_layout Itemize
4120 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4121  overwrite modes.
4122 \end_layout
4124 \begin_layout Itemize
4125 Backspace (command mode): Delete character to left of cursor.
4126 \end_layout
4128 \begin_layout Itemize
4129 CTRL+LEFT (also ALT+B; command mode): Previous word.
4130 \end_layout
4132 \begin_layout Itemize
4133 CTRL+RIGHT (also ALT+F; command mode): Next word.
4134 \end_layout
4136 \begin_layout Itemize
4137 ALT+D (also CTRL+W; command mode): Delete word.
4138 \end_layout
4140 \begin_layout Itemize
4141 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4142 \end_layout
4144 \begin_layout Subsection
4145 wxWidgets platform
4146 \end_layout
4148 \begin_layout Subsubsection
4149 Modifier names:
4150 \end_layout
4152 \begin_layout Standard
4153 Following modifier names are known:
4154 \end_layout
4156 \begin_layout Itemize
4158 \end_layout
4160 \begin_layout Itemize
4161 ctrl
4162 \end_layout
4164 \begin_layout Itemize
4165 shift 
4166 \end_layout
4168 \begin_layout Itemize
4169 meta
4170 \end_layout
4172 \begin_layout Itemize
4173 cmd (Mac OS X only)
4174 \end_layout
4176 \begin_layout Subsubsection
4177 Key names:
4178 \end_layout
4180 \begin_layout Standard
4181 Following key names are known:
4182 \end_layout
4184 \begin_layout Itemize
4185 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4186  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4187  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4188  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4189  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4190  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4191  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4192  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4193  pause, capital, end, home, lefT, up, right, down, select, print, execute,
4194  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4195  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4196  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4197  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4198  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4199  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4200  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4201  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4202  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4203  windows_right, windows_menu, command, special1, special2, special3, special4,
4204  special5, special6, special7, special8, special9, special10, special11,
4205  special12, special13, special14, special15, special16, special17, special18,
4206  special19, special20
4207 \end_layout
4209 \begin_layout Section
4210 Movie file format
4211 \end_layout
4213 \begin_layout Standard
4214 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4215  (note: If you recompress it, do not use compression methods other than
4216  store and deflate and especially do not use encryption of any kind).
4217 \end_layout
4219 \begin_layout Subsection
4220 Detecting clean start/SRAM/Savestate
4221 \end_layout
4223 \begin_layout Itemize
4224 If file has member 
4225 \begin_inset Quotes eld
4226 \end_inset
4228 savestate
4229 \begin_inset Quotes erd
4230 \end_inset
4232  it is savestate, otherwise:
4233 \end_layout
4235 \begin_layout Itemize
4236 If file has members with names starting 
4237 \begin_inset Quotes eld
4238 \end_inset
4240 moviesram.
4241 \begin_inset Quotes erd
4242 \end_inset
4244  it is movie starting from SRAM, otherwise:
4245 \end_layout
4247 \begin_layout Itemize
4248 It is movie starting from clear state.
4249 \end_layout
4251 \begin_layout Subsection
4252 Member: gametype
4253 \end_layout
4255 \begin_layout Standard
4256 Type of game ROM and region (as one line).
4257  Valid values are:
4258 \end_layout
4260 \begin_layout Standard
4261 \begin_inset Tabular
4262 <lyxtabular version="3" rows="8" columns="3">
4263 <features tabularvalignment="middle">
4264 <column alignment="center" valignment="top" width="0">
4265 <column alignment="center" valignment="top" width="0">
4266 <column alignment="center" valignment="top" width="0">
4267 <row>
4268 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4269 \begin_inset Text
4271 \begin_layout Plain Layout
4272 Value
4273 \end_layout
4275 \end_inset
4276 </cell>
4277 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4278 \begin_inset Text
4280 \begin_layout Plain Layout
4281 System
4282 \end_layout
4284 \end_inset
4285 </cell>
4286 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4287 \begin_inset Text
4289 \begin_layout Plain Layout
4290 Region
4291 \end_layout
4293 \end_inset
4294 </cell>
4295 </row>
4296 <row>
4297 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4298 \begin_inset Text
4300 \begin_layout Plain Layout
4301 snes_pal
4302 \end_layout
4304 \end_inset
4305 </cell>
4306 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4307 \begin_inset Text
4309 \begin_layout Plain Layout
4310 Super NES
4311 \end_layout
4313 \end_inset
4314 </cell>
4315 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4316 \begin_inset Text
4318 \begin_layout Plain Layout
4320 \end_layout
4322 \end_inset
4323 </cell>
4324 </row>
4325 <row>
4326 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4327 \begin_inset Text
4329 \begin_layout Plain Layout
4330 sgb_pal
4331 \end_layout
4333 \end_inset
4334 </cell>
4335 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4336 \begin_inset Text
4338 \begin_layout Plain Layout
4339 Super Game Boy
4340 \end_layout
4342 \end_inset
4343 </cell>
4344 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4345 \begin_inset Text
4347 \begin_layout Plain Layout
4349 \end_layout
4351 \end_inset
4352 </cell>
4353 </row>
4354 <row>
4355 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4356 \begin_inset Text
4358 \begin_layout Plain Layout
4359 snes_ntsc
4360 \end_layout
4362 \end_inset
4363 </cell>
4364 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4365 \begin_inset Text
4367 \begin_layout Plain Layout
4368 Super NES
4369 \end_layout
4371 \end_inset
4372 </cell>
4373 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4374 \begin_inset Text
4376 \begin_layout Plain Layout
4377 NTSC
4378 \end_layout
4380 \end_inset
4381 </cell>
4382 </row>
4383 <row>
4384 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4385 \begin_inset Text
4387 \begin_layout Plain Layout
4388 sgb_ntsc
4389 \end_layout
4391 \end_inset
4392 </cell>
4393 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4394 \begin_inset Text
4396 \begin_layout Plain Layout
4397 Super Game Boy
4398 \end_layout
4400 \end_inset
4401 </cell>
4402 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4403 \begin_inset Text
4405 \begin_layout Plain Layout
4406 NTSC
4407 \end_layout
4409 \end_inset
4410 </cell>
4411 </row>
4412 <row>
4413 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4414 \begin_inset Text
4416 \begin_layout Plain Layout
4418 \end_layout
4420 \end_inset
4421 </cell>
4422 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4423 \begin_inset Text
4425 \begin_layout Plain Layout
4426 BS-X (non-slotted)
4427 \end_layout
4429 \end_inset
4430 </cell>
4431 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4432 \begin_inset Text
4434 \begin_layout Plain Layout
4435 NTSC
4436 \end_layout
4438 \end_inset
4439 </cell>
4440 </row>
4441 <row>
4442 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4443 \begin_inset Text
4445 \begin_layout Plain Layout
4446 bsxslotted
4447 \end_layout
4449 \end_inset
4450 </cell>
4451 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4452 \begin_inset Text
4454 \begin_layout Plain Layout
4455 BS-X (slotted)
4456 \end_layout
4458 \end_inset
4459 </cell>
4460 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4461 \begin_inset Text
4463 \begin_layout Plain Layout
4464 NTSC
4465 \end_layout
4467 \end_inset
4468 </cell>
4469 </row>
4470 <row>
4471 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4472 \begin_inset Text
4474 \begin_layout Plain Layout
4475 sufamiturbo
4476 \end_layout
4478 \end_inset
4479 </cell>
4480 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4481 \begin_inset Text
4483 \begin_layout Plain Layout
4484 Sufami Turbo
4485 \end_layout
4487 \end_inset
4488 </cell>
4489 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4490 \begin_inset Text
4492 \begin_layout Plain Layout
4493 NTSC
4494 \end_layout
4496 \end_inset
4497 </cell>
4498 </row>
4499 </lyxtabular>
4501 \end_inset
4504 \end_layout
4506 \begin_layout Standard
4507 Frame rates are:
4508 \end_layout
4510 \begin_layout Standard
4511 \begin_inset Tabular
4512 <lyxtabular version="3" rows="3" columns="2">
4513 <features tabularvalignment="middle">
4514 <column alignment="center" valignment="top" width="0">
4515 <column alignment="center" valignment="top" width="0">
4516 <row>
4517 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4518 \begin_inset Text
4520 \begin_layout Plain Layout
4521 Region
4522 \end_layout
4524 \end_inset
4525 </cell>
4526 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4527 \begin_inset Text
4529 \begin_layout Plain Layout
4530 Framerate (fps)
4531 \end_layout
4533 \end_inset
4534 </cell>
4535 </row>
4536 <row>
4537 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4538 \begin_inset Text
4540 \begin_layout Plain Layout
4542 \end_layout
4544 \end_inset
4545 </cell>
4546 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4547 \begin_inset Text
4549 \begin_layout Plain Layout
4550 322445/6448
4551 \end_layout
4553 \end_inset
4554 </cell>
4555 </row>
4556 <row>
4557 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4558 \begin_inset Text
4560 \begin_layout Plain Layout
4561 NTSC
4562 \end_layout
4564 \end_inset
4565 </cell>
4566 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4567 \begin_inset Text
4569 \begin_layout Plain Layout
4570 10738636/178683
4571 \end_layout
4573 \end_inset
4574 </cell>
4575 </row>
4576 </lyxtabular>
4578 \end_inset
4581 \end_layout
4583 \begin_layout Subsection
4584 Member: port1
4585 \end_layout
4587 \begin_layout Standard
4588 Contains type of port #1 (as one line).
4589  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4590  If not present, defaults to 'gamepad'.
4591 \end_layout
4593 \begin_layout Subsection
4594 Member: port2
4595 \end_layout
4597 \begin_layout Standard
4598 Contains type of port #2 (as one line).
4599  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4600  'justifier' and 'justifiers'.
4601  If not present, defaults to 'none'.
4602 \end_layout
4604 \begin_layout Subsection
4605 Member: gamename
4606 \end_layout
4608 \begin_layout Standard
4609 Contains name of the game (as one line).
4610 \end_layout
4612 \begin_layout Subsection
4613 Member: authors
4614 \end_layout
4616 \begin_layout Standard
4617 Contains authors, one per line.
4618  Part before '|' is the full name, part after is the nickname.
4619 \end_layout
4621 \begin_layout Subsection
4622 Member: systemid
4623 \end_layout
4625 \begin_layout Standard
4626 Always 
4627 \begin_inset Quotes eld
4628 \end_inset
4630 lsnes-rr1
4631 \begin_inset Quotes erd
4632 \end_inset
4634  (one line).
4635  Used to reject other saves.
4636 \end_layout
4638 \begin_layout Subsection
4639 Member: controlsversion
4640 \end_layout
4642 \begin_layout Standard
4643 Always 
4644 \begin_inset Quotes eld
4645 \end_inset
4648 \begin_inset Quotes erd
4649 \end_inset
4651  (one line).
4652  Used to identify what controls are there.
4653 \end_layout
4655 \begin_layout Subsection
4656 Member: 
4657 \begin_inset Quotes eld
4658 \end_inset
4660 coreversion
4661 \begin_inset Quotes erd
4662 \end_inset
4665 \end_layout
4667 \begin_layout Standard
4668 Contains bsnes core version number (as one line).
4669 \end_layout
4671 \begin_layout Subsection
4672 Member: projectid
4673 \end_layout
4675 \begin_layout Standard
4676 Contains project ID (as one line).
4677  Used to identify if two movies are part of the same project.
4678 \end_layout
4680 \begin_layout Subsection
4681 Member: {rom,slota,slotb}{,xml}.sha256
4682 \end_layout
4684 \begin_layout Standard
4685 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4686  Absent if corresponding file is absent.
4687 \end_layout
4689 \begin_layout Subsection
4690 Member: moviesram.<name>
4691 \end_layout
4693 \begin_layout Standard
4694 Raw binary startup SRAM of kind <name>.
4695  Only present in savestates and movies starting from SRAM.
4696 \end_layout
4698 \begin_layout Subsection
4699 Member: saveframe
4700 \end_layout
4702 \begin_layout Standard
4703 Contains frame number (as one line) of frame movie was saved on.
4704  Only present in savestates.
4705 \end_layout
4707 \begin_layout Subsection
4708 Member: lagcounter
4709 \end_layout
4711 \begin_layout Standard
4712 Current value of lag counter (as one line).
4713  Only present in savestates.
4714 \end_layout
4716 \begin_layout Subsection
4717 Member: pollcounters
4718 \end_layout
4720 \begin_layout Standard
4721 Contains poll counters (currently 100 of them), one per line.
4722  Each line is raw poll count if DRDY is set for it.
4723  Otherwise it is negative poll count minus one.
4724  Only present in savestates.
4725 \end_layout
4727 \begin_layout Subsection
4728 Member: hostmemory
4729 \end_layout
4731 \begin_layout Standard
4732 Raw binary dump of host memory.
4733  Only present in savestates.
4734 \end_layout
4736 \begin_layout Subsection
4737 Member: savestate
4738 \end_layout
4740 \begin_layout Standard
4741 The raw binary savestate itself.
4742  Savestate detection uses this file, only present in savestates.
4743 \end_layout
4745 \begin_layout Subsection
4746 Member: screenshot
4747 \end_layout
4749 \begin_layout Standard
4750 Screenshot of current frame.
4751  Only present in savestates.
4752  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4753  data.
4754  Height of image is inferred from the width and size of data.
4755 \end_layout
4757 \begin_layout Subsection
4758 Member: sram.<name>
4759 \end_layout
4761 \begin_layout Standard
4762 Raw binary SRAM of kind <name> at time of savestate.
4763  Only present in savestates.
4764 \end_layout
4766 \begin_layout Subsection
4767 Member: input
4768 \end_layout
4770 \begin_layout Standard
4771 The actual input track, one line per subframe (blank lines are skipped).
4772 \end_layout
4774 \begin_layout Itemize
4775 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4776  part of same frame as previous, otherwise it starts a new frame.
4777 \end_layout
4779 \begin_layout Itemize
4780 First subframe must start a new frame.
4781 \end_layout
4783 \begin_layout Standard
4784 Length of movie in frames is number of lines in input file that start a
4785  new frame.
4786 \end_layout
4788 \begin_layout Subsection
4789 Member: subtitles
4790 \end_layout
4792 \begin_layout Standard
4793 Subtitle track.
4794  Optional.
4795 \end_layout
4797 \begin_layout Itemize
4798 Each line is in form <firstframe> <numframes> <text>.
4799 \end_layout
4801 \begin_layout Itemize
4802 Linefeed is encoded as 
4803 \backslash
4804 n, backslash is encoded as 
4805 \backslash
4807 \backslash
4809 \end_layout
4811 \begin_layout Subsection
4812 Member: rerecords
4813 \end_layout
4815 \begin_layout Standard
4816 Contains textual base-10 rerecord count (as one line; emulator just writes
4817  this, it doesn't read it) + 1.
4818 \end_layout
4820 \begin_layout Subsection
4821 Member: rrdata
4822 \end_layout
4824 \begin_layout Standard
4825 This member stores set of load IDs.
4826  There is one load ID per rerecord (plus one corresponding to start of project).
4827 \end_layout
4829 \begin_layout Itemize
4830 This member constists of concatenation of records
4831 \end_layout
4833 \begin_layout Itemize
4834 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4835  IDs.
4836 \end_layout
4838 \begin_layout Itemize
4839 IDs are interpretted as 256-bit big-endian integers with warparound.
4840 \end_layout
4842 \begin_layout Itemize
4843 Initial predicted ID is all zeroes.
4844 \end_layout
4846 \begin_layout Standard
4847 Format of each record is:
4848 \end_layout
4850 \begin_layout Itemize
4851 1 byte: Opcode byte.
4852  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4853  Bit 7 is unused.
4854 \end_layout
4856 \begin_layout Itemize
4857 32-prefixlen bytes of ID.
4858 \end_layout
4860 \begin_layout Itemize
4861 countlen bytes of big-endian count (count).
4862 \end_layout
4864 \begin_layout Standard
4865 Records are processed as follows:
4866 \end_layout
4868 \begin_layout Itemize
4869 To form the first ID encoded by record, take the first prefixlen bytes predicted
4870  ID and append the read ID value to it.
4871  The result is the first ID encoded.
4872 \end_layout
4874 \begin_layout Itemize
4875 If countlen is 0, record encodes 1 ID.
4876 \end_layout
4878 \begin_layout Itemize
4879 If countlen is 1, record encodes 2+count IDs.
4880 \end_layout
4882 \begin_layout Itemize
4883 If countlen is 2, record encodes 258+count IDs.
4884 \end_layout
4886 \begin_layout Itemize
4887 If countlen is 3, record encodes 65794+count IDs.
4888 \end_layout
4890 \begin_layout Itemize
4891 The new predicted ID is the next ID after last one encoded by the record.
4892 \end_layout
4894 \begin_layout Standard
4895 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4896  by all records.
4897 \end_layout
4899 \begin_layout Subsection
4900 Member: starttime.second
4901 \end_layout
4903 \begin_layout Standard
4904 Movie starting time, second part.
4905  Epoch is Unix epoch.
4906  Default is 1,000,000,000.
4907 \end_layout
4909 \begin_layout Subsection
4910 Member: starttime.subsecond
4911 \end_layout
4913 \begin_layout Standard
4914 Movie starting time, subsecond part.
4915  Unit is CPU clocks.
4916  Default is 0.
4917 \end_layout
4919 \begin_layout Subsection
4920 Member: savetime.second
4921 \end_layout
4923 \begin_layout Standard
4924 Movie saving time, second part.
4925  Default is starttime.second.
4926  Only present in savestates.
4927 \end_layout
4929 \begin_layout Subsection
4930 Member: savetime.subsecond
4931 \end_layout
4933 \begin_layout Standard
4934 Movie saving time, subsecond part.
4935  Default is starttime.subsecond.
4936  Only present in savestates.
4937 \end_layout
4939 \begin_layout Section
4940 lsvs file format (commentary tracks)
4941 \end_layout
4943 \begin_layout Subsection
4944 Clusters
4945 \end_layout
4947 \begin_layout Itemize
4948 Each cluster is 8kB (8192 bytes) in size.
4949 \end_layout
4951 \begin_layout Itemize
4952 Cluster n starts at offset 8192*n in file.
4953 \end_layout
4955 \begin_layout Itemize
4956 The following clusters are system special:
4957 \end_layout
4959 \begin_deeper
4960 \begin_layout Itemize
4961 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
4962 \end_layout
4964 \begin_layout Itemize
4965 Cluster 1 (superblock)
4966 \end_layout
4968 \end_deeper
4969 \begin_layout Subsection
4970 Cluster tables
4971 \end_layout
4973 \begin_layout Itemize
4974 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
4975  last 11 bits of n).
4976 \end_layout
4978 \begin_layout Itemize
4979 This cluster table consists of 2048 4-byte big-endian integers.
4980 \end_layout
4982 \begin_layout Itemize
4983 Each entry describes a cluster in 16MB supercluster, in order.
4984 \end_layout
4986 \begin_layout Itemize
4987 The valid values for entries are:
4988 \end_layout
4990 \begin_deeper
4991 \begin_layout Itemize
4992 0x00000000: Free cluster
4993 \end_layout
4995 \begin_layout Itemize
4996 0x00000001: Last cluster in chain.
4997 \end_layout
4999 \begin_layout Itemize
5000 0xFFFFFFFF: System cluster (cluster tables and superblock)
5001 \end_layout
5003 \begin_layout Itemize
5004 (anything else): Number of next cluster in chain.
5005  Must not be multiple of 2048.
5006 \end_layout
5008 \end_deeper
5009 \begin_layout Itemize
5010 Due to limitations of the format, there can be at most 2097052 superclusters,
5011  giving maximum file size of 16TB.
5012 \end_layout
5014 \begin_layout Subsection
5015 Stream table
5016 \end_layout
5018 \begin_layout Itemize
5019 The stream table chain always starts in cluster 2.
5020 \end_layout
5022 \begin_layout Itemize
5023 Otherwise, it follows normal chaining.
5024 \end_layout
5026 \begin_layout Itemize
5027 The stream table consists of 16-byte entries:
5028 \end_layout
5030 \begin_deeper
5031 \begin_layout Itemize
5032 The first 8 bytes of entry give big-endian beginning position of stream
5033  in units of 1/48000 s.
5034 \end_layout
5036 \begin_layout Itemize
5037 The next 4 bytes of entry give big-endian beginning cluster for control
5038  data.
5039  0 here marks the entry as not present.
5040 \end_layout
5042 \begin_layout Itemize
5043 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5044 \end_layout
5046 \end_deeper
5047 \begin_layout Itemize
5048 Stream table clusters are normal clusters, following normal chaining.
5049 \end_layout
5051 \begin_layout Itemize
5052 The stream begnning position is not guarenteed unique.
5053  There can be multiple streams with the same starting position in the file.
5054 \end_layout
5056 \begin_layout Subsection
5057 Stream control data
5058 \end_layout
5060 \begin_layout Itemize
5061 The stream control data consists of entries 4 bytes each:
5062 \end_layout
5064 \begin_deeper
5065 \begin_layout Itemize
5066 The first 2 bytes of entry gives big-endian length of packet
5067 \end_layout
5069 \begin_layout Itemize
5070 The next byte of entry gives audio length of packet in units of 1/400 s.
5071 \end_layout
5073 \begin_layout Itemize
5074 The last byte is control byte.
5075 \end_layout
5077 \begin_deeper
5078 \begin_layout Itemize
5079 0 means this entry is not present and the control data ends.
5080 \end_layout
5082 \begin_layout Itemize
5083 1 is valid control entry.
5084 \end_layout
5086 \end_deeper
5087 \end_deeper
5088 \begin_layout Itemize
5089 The stream control data can also end by running into end of the readable
5090  chain.
5091 \end_layout
5093 \begin_deeper
5094 \begin_layout Itemize
5095 This happens if there happens to be exact multiple of 2048 packets in stream
5096  and number of packets is nonzero.
5097 \end_layout
5099 \end_deeper
5100 \begin_layout Itemize
5101 These clusters follow normal chaining.
5102 \end_layout
5104 \begin_layout Subsection
5105 Stream codec data
5106 \end_layout
5108 \begin_layout Itemize
5109 Stream codec data consists of raw Opus data packets packed back to back
5110  with nothing in between.
5111 \end_layout
5113 \begin_layout Itemize
5114 Warning: Due to internal limitations, this data must reside in the first
5115  65536 superclusters (that is, the first 1TB of the file).
5116 \end_layout
5118 \begin_layout Subsection
5119 Superblock
5120 \end_layout
5122 \begin_layout Itemize
5123 The superblock is stored in cluster 1.
5125 \end_layout
5127 \begin_layout Itemize
5128 The first 11 bytes are 
5129 \begin_inset Quotes eld
5130 \end_inset
5132 sefs-magic
5133 \begin_inset Quotes erd
5134 \end_inset
5136 <NUL>.
5137 \end_layout
5139 \begin_layout Itemize
5140 The rest are unused.
5141 \end_layout
5143 \begin_layout Itemize
5144 This cluster 1 is marked as system special.
5145 \end_layout
5147 \begin_layout Section
5148 Known ROM extensions
5149 \end_layout
5151 \begin_layout Itemize
5152 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5153 \end_layout
5155 \begin_layout Itemize
5156 DMG cartridge ROMs: dmg, gb.
5157 \end_layout
5159 \begin_layout Itemize
5160 GBC cartridge ROMs: cgb, gbc.
5161 \end_layout
5163 \begin_layout Section
5164 Gamepack files
5165 \end_layout
5167 \begin_layout Itemize
5168 The first line must be: 
5169 \begin_inset Quotes eld
5170 \end_inset
5172 [GAMEPACK FILE]
5173 \begin_inset Quotes erd
5174 \end_inset
5177 \end_layout
5179 \begin_layout Itemize
5180 There is one needed line: 
5181 \begin_inset Quotes eld
5182 \end_inset
5184 type <systype>
5185 \begin_inset Quotes erd
5186 \end_inset
5189  This sets system type to <systype>.
5190  The following system types are valid:
5191 \end_layout
5193 \begin_deeper
5194 \begin_layout Itemize
5195 snes (SNES)
5196 \end_layout
5198 \begin_layout Itemize
5199 bsx (BS-X non-slotted)
5200 \end_layout
5202 \begin_layout Itemize
5203 bsxslotted (BS-X slotted)
5204 \end_layout
5206 \begin_layout Itemize
5207 sufamiturbo (Sufami Turbo)
5208 \end_layout
5210 \begin_layout Itemize
5211 sgb (Super Game Boy)
5212 \end_layout
5214 \begin_layout Itemize
5215 dmg (Game Boy)
5216 \end_layout
5218 \begin_layout Itemize
5219 gbc (Game Boy Color)
5220 \end_layout
5222 \begin_layout Itemize
5223 gbc_gba (Game Boy Color with GBA initial register values)
5224 \end_layout
5226 \end_deeper
5227 \begin_layout Itemize
5228 Optionally a region can be specified: 
5229 \begin_inset Quotes eld
5230 \end_inset
5232 region <region>
5233 \begin_inset Quotes erd
5234 \end_inset
5237  The following values are valid:
5238 \end_layout
5240 \begin_deeper
5241 \begin_layout Itemize
5242 autodetect (Autodetect region: snes and sgb only)
5243 \end_layout
5245 \begin_layout Itemize
5246 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5247 \end_layout
5249 \begin_layout Itemize
5250 pal (PAL: snes, sgb)
5251 \end_layout
5253 \begin_layout Itemize
5254 world (World: dmg, gbc, gbc_gba)
5255 \end_layout
5257 \end_deeper
5258 \begin_layout Itemize
5259 ROM images are loaded as: 
5260 \begin_inset Quotes eld
5261 \end_inset
5263 rom <type> <file>
5264 \begin_inset Quotes erd
5265 \end_inset
5268  The following types are valid:
5269 \end_layout
5271 \begin_deeper
5272 \begin_layout Itemize
5273 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5274  BIOS in bsx, bsxslotted, sufamiturbo)
5275 \end_layout
5277 \begin_layout Itemize
5278 bsx (Cartridge ROM in bsx, bsxslotted)
5279 \end_layout
5281 \begin_layout Itemize
5282 slot-a (Cartridge ROM in sufamiturbo)
5283 \end_layout
5285 \begin_layout Itemize
5286 slot-b (Cartridge ROM in sufamiturbo)
5287 \end_layout
5289 \end_deeper
5290 \begin_layout Itemize
5291 ROM markup can be loaded as: 
5292 \begin_inset Quotes eld
5293 \end_inset
5295 xml <type> <file>
5296 \begin_inset Quotes erd
5297 \end_inset
5300  The types valid are the same as for ROMs.
5301 \end_layout
5303 \begin_layout Itemize
5304 Patches can be loaded as 
5305 \begin_inset Quotes eld
5306 \end_inset
5308 patch[<offset>] <type> <file>
5309 \begin_inset Quotes erd
5310 \end_inset
5313  The types are the same as for ROMs.
5314 \end_layout
5316 \begin_deeper
5317 \begin_layout Itemize
5318 Offset is given in form [+-]<number>.
5319  Usually offset is either +0 or -512.
5320 \end_layout
5322 \begin_layout Itemize
5323 Default offset is +0.
5324 \end_layout
5326 \end_deeper
5327 \begin_layout Subsection
5328 Example:
5329 \end_layout
5331 \begin_layout LyX-Code
5332 [GAMEPACK FILE]
5333 \end_layout
5335 \begin_layout LyX-Code
5336 type snes
5337 \end_layout
5339 \begin_layout LyX-Code
5340 rom rom speedygonzales.sfc
5341 \end_layout
5343 \begin_layout LyX-Code
5344 patch-512 rom sonicthehedgehog.ips
5345 \end_layout
5347 \begin_layout Subsection
5348 Example 2:
5349 \end_layout
5351 \begin_layout LyX-Code
5352 [GAMEPACK FILE]
5353 \end_layout
5355 \begin_layout LyX-Code
5356 type sgb
5357 \end_layout
5359 \begin_layout LyX-Code
5360 rom rom supergameboy.sfc
5361 \end_layout
5363 \begin_layout LyX-Code
5364 rom dmg megamanV.dmg
5365 \end_layout
5367 \begin_layout Section
5368 Quick'n'dirty encode guide
5369 \end_layout
5371 \begin_layout Enumerate
5372 Start the emulator and load the ROM and movie file.
5373 \end_layout
5375 \begin_layout Enumerate
5376 Set large AVI option 'set-setting avi-large on'
5377 \end_layout
5379 \begin_layout Enumerate
5380 Enable dumping 'dump-avi tmpdump' 
5381 \end_layout
5383 \begin_layout Enumerate
5384 Unpause and let it run until you want to end dumping.
5385 \end_layout
5387 \begin_layout Enumerate
5388 Close the emulator (closing the window is the easiest way).
5389  Or use 'end-avi'.
5390 \end_layout
5392 \begin_layout Enumerate
5393 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5394  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5395 \end_layout
5397 \begin_layout Enumerate
5398 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5399 \end_layout
5401 \begin_layout Enumerate
5402 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5403  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5404 \end_layout
5406 \begin_layout Enumerate
5407 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5408  Now final.mkv contains quick'n'dirty encode.
5409 \end_layout
5411 \begin_layout Section
5412 Axis configurations for some gamepad types:
5413 \end_layout
5415 \begin_layout Subsection
5416 XBox360 controller:
5417 \end_layout
5419 \begin_layout Standard
5420 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5421 \end_layout
5423 \begin_layout LyX-Code
5424 set-axis joystick0axis2 pressure-+
5425 \end_layout
5427 \begin_layout LyX-Code
5428 set-axis joystick0axis5 pressure-+
5429 \end_layout
5431 \begin_layout Itemize
5432 This is needed for SDL only.
5433  EVDEV sets those types correctly.
5434 \end_layout
5436 \begin_layout Subsection
5437 PS3 
5438 \begin_inset Quotes eld
5439 \end_inset
5441 sixaxis
5442 \begin_inset Quotes erd
5443 \end_inset
5445  controller:
5446 \end_layout
5448 \begin_layout Standard
5449 Axes 8-19 should be disabled.
5450 \end_layout
5452 \begin_layout LyX-Code
5453 set-axis joystick0axis8 disabled
5454 \end_layout
5456 \begin_layout LyX-Code
5457 set-axis joystick0axis9 disabled
5458 \end_layout
5460 \begin_layout LyX-Code
5461 set-axis joystick0axis10 disabled
5462 \end_layout
5464 \begin_layout LyX-Code
5465 set-axis joystick0axis11 disabled
5466 \end_layout
5468 \begin_layout LyX-Code
5469 set-axis joystick0axis12 disabled
5470 \end_layout
5472 \begin_layout LyX-Code
5473 set-axis joystick0axis13 disabled
5474 \end_layout
5476 \begin_layout LyX-Code
5477 set-axis joystick0axis14 disabled
5478 \end_layout
5480 \begin_layout LyX-Code
5481 set-axis joystick0axis15 disabled
5482 \end_layout
5484 \begin_layout LyX-Code
5485 set-axis joystick0axis16 disabled
5486 \end_layout
5488 \begin_layout LyX-Code
5489 set-axis joystick0axis17 disabled
5490 \end_layout
5492 \begin_layout LyX-Code
5493 set-axis joystick0axis18 disabled
5494 \end_layout
5496 \begin_layout LyX-Code
5497 set-axis joystick0axis19 disabled
5498 \end_layout
5500 \begin_layout Section
5501 Errata:
5502 \end_layout
5504 \begin_layout Subsection
5505 Problems from BSNES core:
5506 \end_layout
5508 \begin_layout Itemize
5509 The whole pending save stuff.
5510 \end_layout
5512 \begin_layout Itemize
5513 Lack of layer hiding.
5514 \end_layout
5516 \begin_layout Itemize
5517 It is slow (especially accuracy).
5518 \end_layout
5520 \begin_layout Itemize
5521 Firmwares can't be loaded from ZIP archives.
5522 \end_layout
5524 \begin_layout Subsection
5525 Other problems:
5526 \end_layout
5528 \begin_layout Itemize
5529 Modifiers don't work with pseudo-keys (SDL, EVDEV).
5530 \end_layout
5532 \begin_layout Itemize
5533 Audio for last dumped frame is not itself dumped.
5534 \end_layout
5536 \begin_layout Itemize
5537 Audio in UI is pretty bad in quality if game doesn't run at full speed.
5538 \end_layout
5540 \begin_layout Itemize
5541 No menus, command based interface (SDL).
5542 \end_layout
5544 \begin_layout Itemize
5545 Long commands don't scroll.
5546 \end_layout
5548 \begin_layout Section
5549 Changelog:
5550 \end_layout
5552 \begin_layout Subsection
5553 rr0-beta1
5554 \end_layout
5556 \begin_layout Itemize
5557 Fix -Wall warnings
5558 \end_layout
5560 \begin_layout Itemize
5561 Fix dumper video corruption with levels 10-18.
5562 \end_layout
5564 \begin_layout Subsection
5565 rr0-beta2
5566 \end_layout
5568 \begin_layout Itemize
5569 Autofire
5570 \end_layout
5572 \begin_layout Itemize
5573 Lots of code cleanups
5574 \end_layout
5576 \begin_layout Itemize
5577 Lua interface to settings
5578 \end_layout
5580 \begin_layout Itemize
5581 Allow specifying AVI borders without Lua
5582 \end_layout
5584 \begin_layout Itemize
5585 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5586 \end_layout
5588 \begin_layout Itemize
5589 on_snoop lua callback
5590 \end_layout
5592 \begin_layout Itemize
5593 Faster movie loading and saving.
5594 \end_layout
5596 \begin_layout Subsection
5597 rr0-beta3
5598 \end_layout
5600 \begin_layout Itemize
5601 Joystick support
5602 \end_layout
5604 \begin_layout Subsection
5605 rr0-beta4
5606 \end_layout
5608 \begin_layout Itemize
5609 Fix multi-buttons
5610 \end_layout
5612 \begin_layout Itemize
5613 Save jukebox functionality.
5614 \end_layout
5616 \begin_layout Subsection
5617 rr0-beta5
5618 \end_layout
5620 \begin_layout Itemize
5621 Try to fix some nasty failing movie load edge cases
5622 \end_layout
5624 \begin_layout Itemize
5625 Allow specifying scripts to run on command line.
5626 \end_layout
5628 \begin_layout Subsection
5629 rr0-beta6
5630 \end_layout
5632 \begin_layout Itemize
5633 Major source code reorganization.
5634 \end_layout
5636 \begin_layout Itemize
5637 Backup savestates before overwriting.
5638 \end_layout
5640 \begin_layout Itemize
5641 Don't crash if loading initial state fails.
5642 \end_layout
5644 \begin_layout Subsection
5645 rr0-beta7
5646 \end_layout
5648 \begin_layout Itemize
5649 Fix firmware lookup
5650 \end_layout
5652 \begin_layout Itemize
5653 Fix author name parsing
5654 \end_layout
5656 \begin_layout Itemize
5657 Fix rerecord counting
5658 \end_layout
5660 \begin_layout Itemize
5661 (SDL) Print messages to console if SDL is uninitialized
5662 \end_layout
5664 \begin_layout Itemize
5665 Add movieinfo program
5666 \end_layout
5668 \begin_layout Itemize
5669 Fix loading movies starting from SRAM.
5670 \end_layout
5672 \begin_layout Subsection
5673 rr0-beta8
5674 \end_layout
5676 \begin_layout Itemize
5677 Add support for unattended dumping
5678 \end_layout
5680 \begin_layout Itemize
5681 Fix compiling for Win32
5682 \end_layout
5684 \begin_layout Itemize
5685 Don't lock up if sound can't be initialized
5686 \end_layout
5688 \begin_layout Itemize
5689 Strip trailing CR from commands
5690 \end_layout
5692 \begin_layout Itemize
5693 Don't try to do dubious things in global ctors (fix crash on startup)
5694 \end_layout
5696 \begin_layout Subsection
5697 rr0-beta9
5698 \end_layout
5700 \begin_layout Itemize
5701 Small documentation tweaking
5702 \end_layout
5704 \begin_layout Itemize
5705 Fix make clean
5706 \end_layout
5708 \begin_layout Itemize
5709 Fix major bug in modifier matching
5710 \end_layout
5712 \begin_layout Subsection
5713 rr0-beta10
5714 \end_layout
5716 \begin_layout Itemize
5717 Lots of documentation fixes
5718 \end_layout
5720 \begin_layout Itemize
5721 Use dedicated callbacks for event backcomm., not commands.
5722 \end_layout
5724 \begin_layout Itemize
5725 Ensure that the watchdog is not hit when executing delayed reset.
5726 \end_layout
5728 \begin_layout Itemize
5729 Remove errant tab from joystick message.
5730 \end_layout
5732 \begin_layout Subsection
5733 rr0-beta11
5734 \end_layout
5736 \begin_layout Itemize
5737 Make autofire operate in absolute time, not linear time
5738 \end_layout
5740 \begin_layout Itemize
5741 Reinitialize controls when resuming from loadstate
5742 \end_layout
5744 \begin_layout Itemize
5745 Some more code cleanups
5746 \end_layout
5748 \begin_layout Itemize
5749 If Lua allocator fails, call OOM_panic()
5750 \end_layout
5752 \begin_layout Itemize
5753 Byte/word/dword/qword sized host memory write/read functions.
5754 \end_layout
5756 \begin_layout Itemize
5757 Dump at correct framerate if dumping interlaced NTSC (height=448).
5758 \end_layout
5760 \begin_layout Subsection
5761 rr0-beta12
5762 \end_layout
5764 \begin_layout Itemize
5765 Actually include the complete source code
5766 \end_layout
5768 \begin_layout Itemize
5769 Keep track of RTC
5770 \end_layout
5772 \begin_layout Subsection
5773 rr0-beta13
5774 \end_layout
5776 \begin_layout Itemize
5777 Document {save,start}time.{,sub}second.
5778 \end_layout
5780 \begin_layout Itemize
5781 Intercept time() from bsnes core.
5782 \end_layout
5784 \begin_layout Subsection
5785 rr0-beta14
5786 \end_layout
5788 \begin_layout Itemize
5789 Allow disabling time() interception (allow build on Mac OS X)
5790 \end_layout
5792 \begin_layout Itemize
5793 Use SDLMain on Mac OS X (make SDL not crash)
5794 \end_layout
5796 \begin_layout Itemize
5797 Disable delayed resets (just plain too buggy for now).
5798 \end_layout
5800 \begin_layout Itemize
5801 Code cleanups
5802 \end_layout
5804 \begin_layout Itemize
5805 Use 16-bit for graphics/video instead of 32-bit.
5806 \end_layout
5808 \begin_layout Itemize
5809 gui.rectangle/gui.pixel
5810 \end_layout
5812 \begin_layout Itemize
5813 gui.crosshair
5814 \end_layout
5816 \begin_layout Itemize
5817 New CSCD writer implementation.
5818 \end_layout
5820 \begin_layout Subsection
5821 rr0-beta15
5822 \end_layout
5824 \begin_layout Itemize
5825 Fix interaction of * and +.
5826 \end_layout
5828 \begin_layout Itemize
5829 Manual improvements
5830 \end_layout
5832 \begin_layout Itemize
5833 Use gettimeofday()/usleep(), these seem portable enough.
5834 \end_layout
5836 \begin_layout Itemize
5837 Move joystick axis manipulation to keymapper code.
5838 \end_layout
5840 \begin_layout Itemize
5841 Changes to how read-only works.
5842 \end_layout
5844 \begin_layout Itemize
5845 Refactor controller input code.
5846 \end_layout
5848 \begin_layout Subsection
5849 rr0-beta16
5850 \end_layout
5852 \begin_layout Itemize
5853 Fix mouseclick scale compensation.
5854 \end_layout
5856 \begin_layout Itemize
5857 Draw area boundaries correctly in SDL code.
5858 \end_layout
5860 \begin_layout Itemize
5861 gui.screenshot.
5862 \end_layout
5864 \begin_layout Itemize
5865 Fix CSCD output (buffer overrun and race condition).
5866 \end_layout
5868 \begin_layout Subsection
5869 rr0-beta17
5870 \end_layout
5872 \begin_layout Itemize
5873 JMD dumping support.
5874 \end_layout
5876 \begin_layout Itemize
5877 Allow unattended dumping to JMD.
5878 \end_layout
5880 \begin_layout Itemize
5881 Move to BSNES v083.
5882 \end_layout
5884 \begin_layout Itemize
5885 Switch back to 32-bit colors.
5886 \end_layout
5888 \begin_layout Itemize
5889 Add Lua function gui.color.
5890 \end_layout
5892 \begin_layout Itemize
5893 Use some new C++11 features in GCC 4.6.
5894 \end_layout
5896 \begin_layout Itemize
5897 Be prepared for core frequency changes.
5898 \end_layout
5900 \begin_layout Itemize
5901 Pass colors in one chunk from Lua.
5902 \end_layout
5904 \begin_layout Subsection
5905 rr0-beta18
5906 \end_layout
5908 \begin_layout Itemize
5909 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5910  memory.read_vma() and memory.find_vma().
5911 \end_layout
5913 \begin_layout Itemize
5914 Numerious documentation fixups
5915 \end_layout
5917 \begin_layout Itemize
5918 RTC time format changed
5919 \end_layout
5921 \begin_layout Itemize
5922 Reformat flags display
5923 \end_layout
5925 \begin_layout Itemize
5926 Allow lua package name to be overridden
5927 \end_layout
5929 \begin_layout Itemize
5930 SDUMP (high-quality dumping).
5931 \end_layout
5933 \begin_layout Itemize
5934 Split platform support to plugins.
5935 \end_layout
5937 \begin_layout Itemize
5938 Make all sound plugins support basic sound commands
5939 \end_layout
5941 \begin_layout Itemize
5942 Support portaudio for sound.
5943 \end_layout
5945 \begin_layout Itemize
5946 Allow disable Lua/SDL searching.
5947 \end_layout
5949 \begin_layout Itemize
5950 Upconvert colors when copying lcscreen to screen.
5951 \end_layout
5953 \begin_layout Itemize
5954 Reorganize source tree.
5955 \end_layout
5957 \begin_layout Itemize
5958 Evdev joystick support.
5959 \end_layout
5961 \begin_layout Itemize
5962 Refactor more code into generic window code.
5963 \end_layout
5965 \begin_layout Subsection
5966 rr0-beta19
5967 \end_layout
5969 \begin_layout Itemize
5970 Refactor message handling.
5971 \end_layout
5973 \begin_layout Itemize
5974 Rework makefile
5975 \end_layout
5977 \begin_layout Itemize
5978 Documentation fixes
5979 \end_layout
5981 \begin_layout Itemize
5982 Finish pending saves before load/quit.
5983 \end_layout
5985 \begin_layout Itemize
5986 Wxwidgets graphics plugin.
5987 \end_layout
5989 \begin_layout Subsection
5990 rr0-beta20
5991 \end_layout
5993 \begin_layout Itemize
5994 Get rid of win32-crap.[ch]pp.
5995 \end_layout
5997 \begin_layout Itemize
5998 Move files around a lot.
5999 \end_layout
6001 \begin_layout Itemize
6002 Get rid of need for host C++ compiler.
6003 \end_layout
6005 \begin_layout Itemize
6006 Bsnes v084 core.
6007 \end_layout
6009 \begin_layout Itemize
6010 Refactor inter-component communication.
6011 \end_layout
6013 \begin_layout Itemize
6014 Fix zero luma.
6015 \end_layout
6017 \begin_layout Itemize
6018 Fix crash on multiline aliases.
6019 \end_layout
6021 \begin_layout Itemize
6022 Load/Save settings in wxwidgets gui.
6023 \end_layout
6025 \begin_layout Subsection
6026 rr0-beta21
6027 \end_layout
6029 \begin_layout Itemize
6030 Patch problems in bsnes core
6031 \end_layout
6033 \begin_layout Itemize
6034 SNES is little-endian, not big-endian!
6035 \end_layout
6037 \begin_layout Itemize
6038 Fix memory corruption in lcscreen::load()
6039 \end_layout
6041 \begin_layout Subsection
6042 rr0-beta22
6043 \end_layout
6045 \begin_layout Itemize
6046 Fix interpretting repeat counts in rrdata loading.
6047 \end_layout
6049 \begin_layout Itemize
6050 New lua callback: on_frame()
6051 \end_layout
6053 \begin_layout Itemize
6054 Remove calls to runtosave() that aren't supposed to be there
6055 \end_layout
6057 \begin_layout Itemize
6058 Lua function: movie.read_rtc()
6059 \end_layout
6061 \begin_layout Itemize
6062 Ignore src/fonts/font.cpp
6063 \end_layout
6065 \begin_layout Itemize
6066 Fix more bsnes core problems
6067 \end_layout
6069 \begin_layout Itemize
6070 Control bsnes random seeding
6071 \end_layout
6073 \begin_layout Itemize
6074 Pause-on-end
6075 \end_layout
6077 \begin_layout Itemize
6078 Some bsnes core debugging features (state dump and state hash)
6079 \end_layout
6081 \begin_layout Itemize
6082 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6083  it was 'lsnes rr0-beta21').
6084 \end_layout
6086 \begin_layout Subsection
6087 rr0-beta23
6088 \end_layout
6090 \begin_layout Itemize
6091 Fix memory corruption due to macro/field mixup
6092 \end_layout
6094 \begin_layout Itemize
6095 search-memory update
6096 \end_layout
6098 \begin_layout Itemize
6099 Allow direct-mapped framebuffer
6100 \end_layout
6102 \begin_layout Itemize
6103 SDL: Use SDL_ANYFORMAT if possible
6104 \end_layout
6106 \begin_layout Itemize
6107 SDMP2SOX: 2s delay modes.
6108 \end_layout
6110 \begin_layout Itemize
6111 Wxwidgets: Cleanups
6112 \end_layout
6114 \begin_layout Itemize
6115 Use sed -E, not sed -r.
6116  Fixes building on Mac OS X.
6117 \end_layout
6119 \begin_layout Itemize
6120 Wxwidgets: Save jukebox on exit
6121 \end_layout
6123 \begin_layout Itemize
6124 Fix RTC if using load-movie on savestate.
6125 \end_layout
6127 \begin_layout Itemize
6128 Fix crash related to full console mode.
6129 \end_layout
6131 \begin_layout Subsection
6132 rr0-beta24
6133 \end_layout
6135 \begin_layout Itemize
6136 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6137 \end_layout
6139 \begin_layout Itemize
6140 Wxwidgets: Allow compiling on Mac OS X.
6141 \end_layout
6143 \begin_layout Itemize
6144 Use movie compare instead of movie hashing (faster save/load).
6145 \end_layout
6147 \begin_layout Itemize
6148 Lua: _SYSTEM table.
6149 \end_layout
6151 \begin_layout Subsection
6152 rr0-beta25
6153 \end_layout
6155 \begin_layout Itemize
6156 sdmp2sox: Pad soundtrack if using -l or -L.
6157 \end_layout
6159 \begin_layout Itemize
6160 sdmp2sox: Fix NTSC overscan.
6161 \end_layout
6163 \begin_layout Itemize
6164 sdmp2sox: Add AR correction mode.
6165 \end_layout
6167 \begin_layout Itemize
6168 call lua_close() when exiting.
6169 \end_layout
6171 \begin_layout Itemize
6172 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6173 \end_layout
6175 \begin_layout Subsection
6176 rr0-beta26
6177 \end_layout
6179 \begin_layout Itemize
6180 Fix IPS patching code (use bsnes core IPS patcher).
6181 \end_layout
6183 \begin_layout Itemize
6184 Implement BPS patching (using bsnes core IPS patcher).
6185 \end_layout
6187 \begin_layout Itemize
6188 Add feature to load headered ROMs.
6189 \end_layout
6191 \begin_layout Subsection
6192 rr0-beta27
6193 \end_layout
6195 \begin_layout Itemize
6196 Show command names when showing keybindings
6197 \end_layout
6199 \begin_layout Subsection
6201 \end_layout
6203 \begin_layout Itemize
6204 Fix pause-on-end to be actually controllable
6205 \end_layout
6207 \begin_layout Itemize
6208 SDL: Poll all events in queue, not just first one (fixes slowness in command
6209  typing)
6210 \end_layout
6212 \begin_layout Itemize
6213 Wxwidgets: Fix ROM loading.
6214 \end_layout
6216 \begin_layout Subsection
6217 rr1-beta0
6218 \end_layout
6220 \begin_layout Itemize
6221 Lua: Add gui.textH, gui.textV, gui.textHV
6222 \end_layout
6224 \begin_layout Itemize
6225 Fix text colors on SDL on Mac OS X
6226 \end_layout
6228 \begin_layout Itemize
6229 Mode 'F' for finished in readonly mode.
6230 \end_layout
6232 \begin_layout Itemize
6233 Fix some WS errors.
6234 \end_layout
6236 \begin_layout Itemize
6237 Reliably pause after skip poll
6238 \end_layout
6240 \begin_layout Itemize
6241 Split UI and core into their own threads
6242 \end_layout
6244 \begin_layout Subsection
6245 rr1-beta1
6246 \end_layout
6248 \begin_layout Itemize
6249 Remove leftover dummy SRAM slot
6250 \end_layout
6252 \begin_layout Itemize
6253 Fix controller numbers.
6254 \end_layout
6256 \begin_layout Subsection
6257 rr1-beta2
6258 \end_layout
6260 \begin_layout Itemize
6261 Fix lsnes-dumpavi after interface change.
6262 \end_layout
6264 \begin_layout Itemize
6265 Also give BSNES patches for v085.
6266 \end_layout
6268 \begin_layout Itemize
6269 Pack movie data in memory.
6270 \end_layout
6272 \begin_layout Subsection
6273 rr1-beta3
6274 \end_layout
6276 \begin_layout Itemize
6277 Fix framecount/length given when loading movies.
6278 \end_layout
6280 \begin_layout Itemize
6281 Controller command memory leak fixes.
6282 \end_layout
6284 \begin_layout Itemize
6285 Don't leak palette if freeing screen object.
6286 \end_layout
6288 \begin_layout Subsection
6289 rr1-beta4
6290 \end_layout
6292 \begin_layout Itemize
6293 Detect revisions.
6294 \end_layout
6296 \begin_layout Itemize
6297 Wxwidgets: Allow controlling dumper from the menu.
6298 \end_layout
6300 \begin_layout Subsection
6301 rr1-beta5
6302 \end_layout
6304 \begin_layout Itemize
6305 Rewrite parts of manual
6306 \end_layout
6308 \begin_layout Itemize
6309 Lua: Make it work with Lua 5.2.
6310 \end_layout
6312 \begin_layout Subsection
6313 rr1-beta6
6314 \end_layout
6316 \begin_layout Itemize
6317 Win32: Fix compile errors.
6318 \end_layout
6320 \begin_layout Subsection
6321 rr1-beta7
6322 \end_layout
6324 \begin_layout Itemize
6325 Refactor controller input code.
6326 \end_layout
6328 \begin_layout Itemize
6329 Fix crash when using command line on SDL / Mac OS X.
6330 \end_layout
6332 \begin_layout Subsection
6333 rr1-beta8
6334 \end_layout
6336 \begin_layout Itemize
6337 Delete core/coroutine (obsolete)
6338 \end_layout
6340 \begin_layout Itemize
6341 Lag input display by one frame.
6342 \end_layout
6344 \begin_layout Itemize
6345 Rewind movie to beginning function.
6346 \end_layout
6348 \begin_layout Itemize
6349 Fix wrong frame number reported to Lua when repainting after loadstate
6350 \end_layout
6352 \begin_layout Itemize
6353 Support UI editing of jukebox
6354 \end_layout
6356 \begin_layout Itemize
6357 Wxwidgets: Save settings on exit.
6358 \end_layout
6360 \begin_layout Itemize
6361 Support ${project} for filenames
6362 \end_layout
6364 \begin_layout Itemize
6365 SDL: Fix command history
6366 \end_layout
6368 \begin_layout Subsection
6369 rr1-beta9
6370 \end_layout
6372 \begin_layout Itemize
6373 Fix some order-of-global-ctor bugs.
6374 \end_layout
6376 \begin_layout Subsection
6377 rr1-beta10
6378 \end_layout
6380 \begin_layout Itemize
6381 Fix crashes when quitting on Win32.
6382 \end_layout
6384 \begin_layout Subsection
6385 rr1-beta11
6386 \end_layout
6388 \begin_layout Itemize
6389 EVDEV: Queue keypresses from joystick, don't send directly
6390 \end_layout
6392 \begin_layout Itemize
6393 Wxwidgets: Load-Preserve that actually works.
6394 \end_layout
6396 \begin_layout Subsection
6397 rr1-beta12
6398 \end_layout
6400 \begin_layout Itemize
6401 Wxwidgets: GUI for memory search.
6402 \end_layout
6404 \begin_layout Itemize
6405 Warn about using synchronous queue in UI callback.
6406 \end_layout
6408 \begin_layout Subsection
6409 rr1-beta13
6410 \end_layout
6412 \begin_layout Itemize
6413 Remember last saved file for each ROM
6414 \end_layout
6416 \begin_layout Itemize
6417 Support MT dumping via boost.
6418 \end_layout
6420 \begin_layout Itemize
6421 Lua: input.raw
6422 \end_layout
6424 \begin_layout Itemize
6425 Lua: input.keyhook
6426 \end_layout
6428 \begin_layout Itemize
6429 Make mouse be ordinary input instead of special-casing
6430 \end_layout
6432 \begin_layout Itemize
6433 SDL: Don't screw up commands with NUL codepoints.
6434 \end_layout
6436 \begin_layout Subsection
6437 rr1-beta14
6438 \end_layout
6440 \begin_layout Itemize
6441 Merge status panel and main window
6442 \end_layout
6444 \begin_layout Itemize
6445 True movie slot support (the rest of it)
6446 \end_layout
6448 \begin_layout Itemize
6449 SDL: Fix compilation error
6450 \end_layout
6452 \begin_layout Itemize
6453 Elminate cross calls in dump menu code.
6454 \end_layout
6456 \begin_layout Subsection
6457 rr1-beta15
6458 \end_layout
6460 \begin_layout Itemize
6461 Cancel pending saves command
6462 \end_layout
6464 \begin_layout Itemize
6465 Wxwidgets: Code refactoring
6466 \end_layout
6468 \begin_layout Itemize
6469 Wxwidgets: Fix system -> reset
6470 \end_layout
6472 \begin_layout Itemize
6473 Wxwidgets: Read watch expressions in the right thread
6474 \end_layout
6476 \begin_layout Subsection
6477 rr1-beta16
6478 \end_layout
6480 \begin_layout Itemize
6481 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
6482  support that).
6483 \end_layout
6485 \begin_layout Itemize
6486 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
6487 \end_layout
6489 \begin_layout Itemize
6490 Don't append trailing '-' to prefix when saving movie.
6491 \end_layout
6493 \begin_layout Itemize
6494 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
6495 \end_layout
6497 \begin_layout Subsection
6499 \end_layout
6501 \begin_layout Itemize
6502 Document memory watch syntax.
6503 \end_layout
6505 \begin_layout Subsection
6506 rr1-delta1
6507 \end_layout
6509 \begin_layout Itemize
6510 Fix unattended dumping (lsnes-dumpavi)
6511 \end_layout
6513 \begin_layout Itemize
6514 Support RAW dumping
6515 \end_layout
6517 \begin_layout Itemize
6518 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
6519 \end_layout
6521 \begin_layout Itemize
6522 Add option to control sample rate preturbation in AVI dumper
6523 \end_layout
6525 \begin_layout Subsection
6526 rr1-delta2
6527 \end_layout
6529 \begin_layout Itemize
6530 Wxwidgets: Fix dumper submodes
6531 \end_layout
6533 \begin_layout Itemize
6534 Set core controller types before loadstate
6535 \end_layout
6537 \begin_layout Subsection
6538 rr1-delta2epsilon1
6539 \end_layout
6541 \begin_layout Itemize
6542 Fix compiling with bsnes v086.
6543 \end_layout
6545 \begin_layout Subsection
6546 rr1-delta3
6547 \end_layout
6549 \begin_layout Itemize
6550 Don't prompt before quitting
6551 \end_layout
6553 \begin_layout Itemize
6554 Start unpaused, preserve pause/unpause over load.
6555 \end_layout
6557 \begin_layout Itemize
6558 Try to autodetect if ROM is headered.
6559 \end_layout
6561 \begin_layout Itemize
6562 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6563 \end_layout
6565 \begin_layout Itemize
6566 Allow configuring some hotkeys.
6567 \end_layout
6569 \begin_layout Subsection
6570 rr1-delta4
6571 \end_layout
6573 \begin_layout Itemize
6574 Lots of code cleanups
6575 \end_layout
6577 \begin_layout Itemize
6578 Fix JMD compression (JMD dumping was broken)
6579 \end_layout
6581 \begin_layout Itemize
6582 Don't crash if Lua C function throws an exception.
6583 \end_layout
6585 \begin_layout Itemize
6586 Support bitmap drawing in Lua.
6587 \end_layout
6589 \begin_layout Itemize
6590 Fix bsnes v085/v086 patches.
6591 \end_layout
6593 \begin_layout Itemize
6594 Improve stability on win32.
6595 \end_layout
6597 \begin_layout Subsection
6598 rr1-delta4epsilon1
6599 \end_layout
6601 \begin_layout Itemize
6602 Don't corrupt movie if movie length is integer multiple of frames per page.
6603 \end_layout
6605 \begin_layout Subsection
6606 rr1-delta5
6607 \end_layout
6609 \begin_layout Itemize
6610 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6611 \end_layout
6613 \begin_layout Itemize
6614 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6615 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6617 \end_layout
6619 \begin_layout Itemize
6620 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6621 \end_layout
6623 \begin_layout Itemize
6624 Wxwidgets: Fix broken modifiers
6625 \end_layout
6627 \begin_layout Itemize
6628 on_paint has parameter now.
6629 \end_layout
6631 \begin_layout Itemize
6632 Optional initital fill for bitmaps
6633 \end_layout
6635 \begin_layout Itemize
6636 Fix palette changing.
6637 \end_layout
6639 \begin_layout Itemize
6640 Optimize rendering a bit.
6641 \end_layout
6643 \begin_layout Itemize
6644 Bsnes v087 support.
6645 \end_layout
6647 \begin_layout Subsection
6648 rr1-delta5epsilon1
6649 \end_layout
6651 \begin_layout Itemize
6652 Movieinfo: Fix display of port #2 type.
6653 \end_layout
6655 \begin_layout Itemize
6656 Call on_input() after loadstate.
6657 \end_layout
6659 \begin_layout Subsection
6660 rr1-delta5epsilon2
6661 \end_layout
6663 \begin_layout Itemize
6664 Fix writing port2 data to movie.
6665 \end_layout
6667 \begin_layout Itemize
6668 Fix SRAM handling with Bsnes v087.
6669 \end_layout
6671 \begin_layout Subsection
6672 rr1-delta6
6673 \end_layout
6675 \begin_layout Itemize
6676 Library loading support
6677 \end_layout
6679 \begin_layout Itemize
6680 Built-in TSCC encoder
6681 \end_layout
6683 \begin_layout Itemize
6684 Hi-color (256T colors) dumping.
6685 \end_layout
6687 \begin_layout Itemize
6688 Dump over TCP/IP(v6)
6689 \end_layout
6691 \begin_layout Itemize
6692 Hidable status panel
6693 \end_layout
6695 \begin_layout Itemize
6696 Turbo toggle/hold
6697 \end_layout
6699 \begin_layout Itemize
6700 Adjustable sound volume
6701 \end_layout
6703 \begin_layout Itemize
6704 Screen scaling
6705 \end_layout
6707 \begin_layout Itemize
6708 Allow DnD into filename boxes
6709 \end_layout
6711 \begin_layout Itemize
6712 Configurable paths
6713 \end_layout
6715 \begin_layout Itemize
6716 Portaudio: Fix speaker popping at start
6717 \end_layout
6719 \begin_layout Itemize
6720 Lots of UI changes
6721 \end_layout
6723 \begin_layout Itemize
6724 Speed adjustment menu
6725 \end_layout
6727 \begin_layout Itemize
6728 Win32 joystick support
6729 \end_layout
6731 \begin_layout Itemize
6732 Lua: gui.rainbow and gui.box
6733 \end_layout
6735 \begin_layout Itemize
6736 Split key lists into classes (the key list was large!)
6737 \end_layout
6739 \begin_layout Itemize
6740 More save slots support
6741 \end_layout
6743 \begin_layout Itemize
6744 Wxwidgets (wxJoystick) joystick support
6745 \end_layout
6747 \begin_layout Subsection
6748 rr1-delta7
6749 \end_layout
6751 \begin_layout Itemize
6752 Lots of internal joystick refactoring
6753 \end_layout
6755 \begin_layout Itemize
6756 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6757 \end_layout
6759 \begin_layout Itemize
6760 Wxwidgets: Settings mode (open settings without ROM)
6761 \end_layout
6763 \begin_layout Itemize
6764 Wxwidgets: Prompt key to use option
6765 \end_layout
6767 \begin_layout Itemize
6768 Wxwidgets: Fix crash if key goes away underneath
6769 \end_layout
6771 \begin_layout Itemize
6772 Wxwidgets: Fix mouse position in presence of scaling
6773 \end_layout
6775 \begin_layout Itemize
6776 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6777 \end_layout
6779 \begin_layout Itemize
6780 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6781  seem to work well on WinXP)
6782 \end_layout
6784 \begin_layout Itemize
6785 Start paused option.
6786 \end_layout
6788 \begin_layout Subsection
6789 rr1-delta7epsilon1
6790 \end_layout
6792 \begin_layout Itemize
6793 AVI: ZMBV support
6794 \end_layout
6796 \begin_layout Itemize
6797 lsnes-dumpavi: Start Lua before starting dumper
6798 \end_layout
6800 \begin_layout Itemize
6801 AVI: Fix secondary audio in mode 4.
6802 \end_layout
6804 \begin_layout Subsection
6805 rr1-delta7epsilon2
6806 \end_layout
6808 \begin_layout Itemize
6809 AVI: Refactor ZMBV a bit.
6810 \end_layout
6812 \begin_layout Itemize
6813 Fix error reading analog values from movie file
6814 \end_layout
6816 \begin_layout Subsection
6817 rr1-delta8
6818 \end_layout
6820 \begin_layout Itemize
6821 Delayed reset support
6822 \end_layout
6824 \begin_layout Itemize
6825 Lua: memory.hash_region
6826 \end_layout
6828 \begin_layout Subsection
6829 rr1-delta8epsilon1
6830 \end_layout
6832 \begin_layout Itemize
6833 Rework the build system
6834 \end_layout
6836 \begin_layout Itemize
6837 Typing input support
6838 \end_layout
6840 \begin_layout Itemize
6841 Fix building with bsnes v086 and v087.
6842 \end_layout
6844 \begin_layout Itemize
6845 SDL: Save settings on exit
6846 \end_layout
6848 \begin_layout Itemize
6849 SDL: Command to enter command line mode with given command.
6850 \end_layout
6852 \begin_layout Itemize
6853 SDL: More advanced command editing.
6854 \end_layout
6856 \begin_layout Subsection
6857 rr1-delta9
6858 \end_layout
6860 \begin_layout Itemize
6861 wxMSW: Fix the 
6862 \begin_inset Quotes eld
6863 \end_inset
6865 arrow keys and enter don't work
6866 \begin_inset Quotes erd
6867 \end_inset
6869  problem
6870 \end_layout
6872 \begin_layout Itemize
6873 MSU-1 support
6874 \end_layout
6876 \begin_layout Itemize
6877 Show mode changes due to rewinding.
6878 \end_layout
6880 \begin_layout Itemize
6881 Unsafe rewind support
6882 \end_layout
6884 \begin_layout Itemize
6885 Fix directory transversal.
6886 \end_layout
6888 \begin_layout Subsection
6889 rr1-delta10
6890 \end_layout
6892 \begin_layout Itemize
6893 AVI: Sound mode 5 (48kHz high-quality)
6894 \end_layout
6896 \begin_layout Itemize
6897 Lua: Reset Lua VM
6898 \end_layout
6900 \begin_layout Itemize
6901 Map the SNES bus into address space
6902 \end_layout
6904 \begin_layout Itemize
6905 Fix loading memory watch files with CRLF line endings
6906 \end_layout
6908 \begin_layout Subsection
6909 rr1-delta10epsilon1
6910 \end_layout
6912 \begin_layout Itemize
6913 Map bsnes internal state into memory space
6914 \end_layout
6916 \begin_layout Itemize
6917 Fix the 
6918 \begin_inset Quotes eld
6919 \end_inset
6921 click on panel wedges the emulator
6922 \begin_inset Quotes erd
6923 \end_inset
6925  for real.
6926 \end_layout
6928 \begin_layout Itemize
6929 DnD movies/saves on the main window.
6930 \end_layout
6932 \begin_layout Subsection
6933 rr1-delta11
6934 \end_layout
6936 \begin_layout Itemize
6937 Split core bindings into own module.
6938 \end_layout
6940 \begin_layout Itemize
6941 Remember invalid settings
6942 \end_layout
6944 \begin_layout Itemize
6945 Support for modified Gambatte core for GB/GBC emulation.
6946 \end_layout
6948 \begin_layout Itemize
6949 Reload/swap ROM function
6950 \end_layout
6952 \begin_layout Subsection
6953 rr1-delta11epsilon1
6954 \end_layout
6956 \begin_layout Itemize
6957 Fix step poll function
6958 \end_layout
6960 \begin_layout Subsection
6961 rr1-delta12
6962 \end_layout
6964 \begin_layout Itemize
6965 Non-insane savestate anchoring
6966 \end_layout
6968 \begin_layout Subsection
6969 rr1-delta13
6970 \end_layout
6972 \begin_layout Itemize
6973 More Memory search methods
6974 \end_layout
6976 \begin_layout Itemize
6977 Preserve movie if loading in RO mode.
6978 \end_layout
6980 \begin_layout Itemize
6981 Fix a obscure case in timeline check
6982 \end_layout
6984 \begin_layout Itemize
6985 Revamp the entiere ROM loading code
6986 \end_layout
6988 \begin_layout Itemize
6989 Support DnD on ROMs
6990 \end_layout
6992 \begin_layout Itemize
6993 Revamp menu layout
6994 \end_layout
6996 \begin_layout Itemize
6997 Standalone hotkey config dialog
6998 \end_layout
7000 \begin_layout Itemize
7001 Show bindings in more user-friendly format
7002 \end_layout
7004 \begin_layout Subsection
7005 rr1-delta13epsilon1
7006 \end_layout
7008 \begin_layout Itemize
7009 Pipedec support
7010 \end_layout
7012 \begin_layout Itemize
7013 Fix uninitialized variables in bsnes v085
7014 \end_layout
7016 \begin_layout Subsection
7017 rr1-delta14
7018 \end_layout
7020 \begin_layout Itemize
7021 Merge gambatte core into mainline (from its own branch)
7022 \end_layout
7024 \begin_layout Itemize
7025 Wxwidgets: Show expected dump file formats
7026 \end_layout
7028 \begin_layout Itemize
7029 Memory watch: Data typing
7030 \end_layout
7032 \begin_layout Itemize
7033 lsnes internal MMIO area.
7034 \end_layout
7036 \begin_layout Itemize
7037 Wxwidgets: New memory watch editor
7038 \end_layout
7040 \begin_layout Itemize
7041 Hexadecimal memory watches
7042 \end_layout
7044 \begin_layout Itemize
7045 Wxwidgets: Monospaced panel
7046 \end_layout
7048 \begin_layout Itemize
7049 Wxwidgets: Split memory watches in panel
7050 \end_layout
7052 \begin_layout Itemize
7053 Wxwidgets: Disable VMAs in memory search
7054 \end_layout
7056 \begin_layout Itemize
7057 lsnes-dumpavi: Fix speed bug
7058 \end_layout
7060 \begin_layout Itemize
7061 Movie subtitle support
7062 \end_layout
7064 \begin_layout Itemize
7065 Fix rerecord count reporting
7066 \end_layout
7068 \begin_layout Itemize
7069 Don't trash movie when loading in readonly mode.
7070 \end_layout
7072 \begin_layout Subsection
7073 rr1-delta14epsilon1
7074 \end_layout
7076 \begin_layout Itemize
7077 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7078 \end_layout
7080 \begin_layout Itemize
7081 Fix build on Mac OS X.
7082 \end_layout
7084 \begin_layout Itemize
7085 Lua: loopwrapper
7086 \end_layout
7088 \begin_layout Itemize
7089 Wxwidgets: Hidable messages window
7090 \end_layout
7092 \begin_layout Itemize
7093 Lua: input.joyset
7094 \end_layout
7096 \begin_layout Itemize
7097 Bsnes: Support inconsistent saves
7098 \end_layout
7100 \begin_layout Itemize
7101 Bsnes: Allow simulating saving every frame
7102 \end_layout
7104 \begin_layout Itemize
7105 Fix desync if savestate is loaded in readonly mode in certain conditions.
7106 \end_layout
7108 \begin_layout Itemize
7109 Wxwidgets: Fix save dialogs on Mac OS X.
7110 \end_layout
7112 \begin_layout Itemize
7113 Wxwidgets: Fix insane status width on Win32.
7114 \end_layout
7116 \begin_layout Itemize
7117 Wxwidgets: Fix autohold processing to be faster.
7118 \end_layout
7120 \begin_layout Itemize
7121 Wxwidgets: Allow loading ROMs and movies from commandline.
7122 \end_layout
7124 \begin_layout Subsection
7125 rr1-delta15
7126 \end_layout
7128 \begin_layout Itemize
7129 Be a bit smarter with --load
7130 \end_layout
7132 \begin_layout Itemize
7133 Rewrote higher-level parts of audio system
7134 \end_layout
7136 \begin_layout Itemize
7137 Tool to build commentary tracks
7138 \end_layout
7140 \begin_layout Itemize
7141 Lua: input.joyget
7142 \end_layout
7144 \begin_layout Itemize
7145 Gambatte: Add support for SVN358
7146 \end_layout
7148 \begin_layout Itemize
7149 Use builtin font when rendering status panel.
7150 \end_layout
7152 \begin_layout Itemize
7153 Option to detach memory watch to its own window.
7154 \end_layout
7156 \begin_layout Itemize
7157 Recent ROMs/Movies menu
7158 \end_layout
7160 \begin_layout Itemize
7161 Libao support
7162 \end_layout
7164 \begin_layout Itemize
7165 Useful lag counter for SNES games that autopoll
7166 \end_layout
7168 \begin_layout Itemize
7169 Fix buffer overflow in gambatte sound output
7170 \end_layout
7172 \begin_layout Subsection
7173 rr1-delta15epsilon1
7174 \end_layout
7176 \begin_layout Itemize
7177 Don't blow up on wxGTK if the window is hidden somehow
7178 \end_layout
7180 \begin_layout Itemize
7181 Support simultaneous drop of ROM and movie.
7182 \end_layout
7184 \begin_layout Itemize
7185 Gambatte: Don't save spurious SRAMs.
7186 \end_layout
7188 \begin_layout Itemize
7189 Make SGB ROMs actually usable.
7190 \end_layout
7192 \begin_layout Itemize
7193 Fix so that saved movies appear in recent movies.
7194 \end_layout
7196 \begin_layout Itemize
7197 Don't open multiple commentary editors at once.
7198 \end_layout
7200 \end_body
7201 \end_document