lsnes rr1-Δ14
[lsnes.git] / manual.lyx
blobfea684c0879f9670536f16d1af2b1bdd3d5fba26
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 Lua (if Lua support is needed).
144 \end_layout
146 \begin_deeper
147 \begin_layout Itemize
148 Version 5.1.X or 5.2X.
149 \end_layout
151 \end_deeper
152 \begin_layout Enumerate
153 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
154 \end_layout
156 \begin_layout Section
157 Building
158 \end_layout
160 \begin_layout Itemize
161 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
162  bsnes core).
163 \end_layout
165 \begin_layout Itemize
166 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
167 \end_layout
169 \begin_layout Itemize
170 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
171 >', bsnes core)
172 \end_layout
174 \begin_layout Itemize
175 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
176 ersion>', gambatte core)
177 \end_layout
179 \begin_layout Itemize
180 Edit options.build (or copy of that file)
181 \end_layout
183 \begin_layout Itemize
184 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
186 \end_layout
188 \begin_layout Section
189 Command line options
190 \end_layout
192 \begin_layout Subsection
193 ROM options
194 \end_layout
196 \begin_layout Subsubsection
197 --rom=<file> (lsnes/SDL, lsnes-avidump)
198 \end_layout
200 \begin_layout Standard
201 Load <file> as ROM.
202 \end_layout
204 \begin_layout Subsection
205 Session options
206 \end_layout
208 \begin_layout Subsubsection
209 --pause
210 \end_layout
212 \begin_layout Standard
213 Start paused
214 \end_layout
216 \begin_layout Subsubsection
217 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
218 \end_layout
220 \begin_layout Standard
221 Load <filename> as movie or savestate file.
222  All other session options are ignored.
223 \end_layout
225 \begin_layout Subsubsection
226 --port1=<device> (lsnes/SDL, bsnes core only)
227 \end_layout
229 \begin_layout Standard
230 Set type of port1.
231  Valid values are:
232 \end_layout
234 \begin_layout Itemize
235 none: No device connected
236 \end_layout
238 \begin_layout Itemize
239 gamepad: One gamepad (the default)
240 \end_layout
242 \begin_layout Itemize
243 multitap: Four gamepads (warning: makes most games refuse to start)
244 \end_layout
246 \begin_layout Itemize
247 mouse: Mouse.
248 \end_layout
250 \begin_layout Subsubsection
251 --port2=<type> (lsnes/SDL, bsnes core only)
252 \end_layout
254 \begin_layout Standard
255 Set type of port2.
256  Valid values are:
257 \end_layout
259 \begin_layout Itemize
260 none: No device connected (the default)
261 \end_layout
263 \begin_layout Itemize
264 gamepad: One gamepad
265 \end_layout
267 \begin_layout Itemize
268 multitap: Four gamepads.
269 \end_layout
271 \begin_layout Itemize
272 mouse: Mouse
273 \end_layout
275 \begin_layout Itemize
276 superscope: Super Scope
277 \end_layout
279 \begin_layout Itemize
280 justifier: One justifier
281 \end_layout
283 \begin_layout Itemize
284 justifiers: Two justifiers
285 \end_layout
287 \begin_layout Subsubsection
288 --gamename=<name> (lsnes/SDL)
289 \end_layout
291 \begin_layout Standard
292 Set the name of game to <name>.
293  Default is blank.
294 \end_layout
296 \begin_layout Subsubsection
297 --author=<name> (lsnes/SDL)
298 \end_layout
300 \begin_layout Standard
301 Add author with full name of <name> (no nickname).
302 \end_layout
304 \begin_layout Subsubsection
305 --author=|<name> (lsnes/SDL)
306 \end_layout
308 \begin_layout Standard
309 Add author with nickname of <name> (no full name).
310 \end_layout
312 \begin_layout Subsubsection
313 --author=<fullname>|<nickname> (lsnes/SDL)
314 \end_layout
316 \begin_layout Standard
317 Add author with full name of <fullname> and nickname of <nickname>.
318 \end_layout
320 \begin_layout Subsubsection
321 --rtc-second=<value> (lsnes/SDL)
322 \end_layout
324 \begin_layout Standard
325 Set RTC second (0 is 1st January 1970 00:00:00Z).
326  Default is 1,000,000,000.
327 \end_layout
329 \begin_layout Subsubsection
330 --rtc-subsecond=<value> (lsnes/SDL)
331 \end_layout
333 \begin_layout Standard
334 Set RTC subsecond.
335  Range is 0-.
336  Unit is CPU cycle.
337  Default is 0.
338 \end_layout
340 \begin_layout Subsubsection
341 --anchor-savestate=<file> (lsnes/SDL)
342 \end_layout
344 \begin_layout Standard
345 Set the anchor savestate file.
346 \end_layout
348 \begin_layout Subsection
349 Misc.
350  options:
351 \end_layout
353 \begin_layout Subsubsection
354 --run=<file> (lsnes/SDL)
355 \end_layout
357 \begin_layout Standard
358 After running main RC file, run this file.
359  If multiple are specified, these execute in order specified.
360 \end_layout
362 \begin_layout Subsection
363 dump options (lsnes-dumpavi only)
364 \end_layout
366 \begin_layout Subsubsection
367 --dumper=<dumper>
368 \end_layout
370 \begin_layout Standard
371 Set the dumper to use (required).
372  Use 'list' for listing of known dumpers.
373 \end_layout
375 \begin_layout Subsubsection
376 --mode=<mode>
377 \end_layout
379 \begin_layout Standard
380 Set the mode to use (required for dumpers with multiple modes, forbidden
381  otherwise).
382  Use 'list' for known modes.
383 \end_layout
385 \begin_layout Subsubsection
386 --prefix=<prefix>
387 \end_layout
389 \begin_layout Standard
390 Set dump prefix.
391  Default is 
392 \begin_inset Quotes eld
393 \end_inset
395 avidump
396 \begin_inset Quotes erd
397 \end_inset
400 \end_layout
402 \begin_layout Subsubsection
403 --option=<name>=<value>
404 \end_layout
406 \begin_layout Standard
407 Set option <name> to value <value>.
408 \end_layout
410 \begin_layout Subsubsection
411 --length=<length>
412 \end_layout
414 \begin_layout Standard
415 Set number of frames to dump.
416  Mandatory.
417 \end_layout
419 \begin_layout Subsubsection
420 --lua=<script>
421 \end_layout
423 \begin_layout Standard
424 Run specified lua script (lsnes-dumpavi does not have initialization files).
425 \end_layout
427 \begin_layout Subsubsection
428 --load-library=<library>
429 \end_layout
431 \begin_layout Standard
432 Load the specified shared object / dynamic library / dynamic link library.
433 \end_layout
435 \begin_layout Section
436 Startup file lsnes.rc
437 \end_layout
439 \begin_layout Standard
440 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
441  This file is located in:
442 \end_layout
444 \begin_layout Itemize
445 Windows: %APPDATA%
446 \backslash
447 lsnes
448 \backslash
449 lsnes.rc (if %APPDATA% exists)
450 \end_layout
452 \begin_layout Itemize
453 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
454 \end_layout
456 \begin_layout Itemize
457 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
458 \end_layout
460 \begin_layout Itemize
461 All: ./lsnes.rc (fallback default).
462 \end_layout
464 \begin_layout Standard
465 If leading directories do not exist, attempt to create them is made.
466 \end_layout
468 \begin_layout Section
469 Internal commands
470 \end_layout
472 \begin_layout Itemize
473 Commands beginning with '*' invoke the corresponding command without alias
474  expansion.
475 \end_layout
477 \begin_layout Itemize
478 If command starts with '+' (after possible '*'), the command is executed
479  as-is when button is pressed, and when button is released, it is executed
480  with '+' replaced by '-'.
481 \end_layout
483 \begin_layout Itemize
484 Commands without '+' execute only on negative edge (release).
485 \end_layout
487 \begin_layout Subsection
488 Settings:
489 \end_layout
491 \begin_layout Standard
492 Settings control various aspects of emulator behaviour.
493 \end_layout
495 \begin_layout Subsubsection
496 set-setting <setting> <value>
497 \end_layout
499 \begin_layout Standard
500 Sets setting <setting> to value <value> (may be empty).
501 \end_layout
503 \begin_layout Subsubsection
504 unset-setting <setting>
505 \end_layout
507 \begin_layout Standard
508 Try to unset setting <setting> (not all settings can be unset).
509 \end_layout
511 \begin_layout Subsubsection
512 get-setting <setting>
513 \end_layout
515 \begin_layout Standard
516 Read value of setting <setting>
517 \end_layout
519 \begin_layout Subsubsection
520 show-settings
521 \end_layout
523 \begin_layout Standard
524 Print names and values of all settings.
525 \end_layout
527 \begin_layout Subsection
528 Keybindings
529 \end_layout
531 \begin_layout Standard
532 Keybindings bind commands or aliases to keys (or pseudo-keys).
534 \end_layout
536 \begin_layout Standard
537 Notes:
538 \end_layout
540 \begin_layout Itemize
541 Do not bind edge active (+/-) commands to keys with modifiers, that won't
542  work right!
543 \end_layout
545 \begin_layout Itemize
546 Names of keys and modifiers are platform-dependent.
547 \end_layout
549 \begin_layout Itemize
550 Be careful before binding pseudo-keys (such as joystick axes, buttons or
551  hats) with modifiers.
552  That may or may not work right.
553 \end_layout
555 \begin_layout Subsubsection
556 bind-key [<mod>/<modmask>] <key> <command>
557 \end_layout
559 \begin_layout Standard
560 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
561 ed list) are set as <mod> (comma-seperated list).
562 \end_layout
564 \begin_layout Standard
565 The names of keys and modifiers are platform-dependent.
566 \end_layout
568 \begin_layout Subsubsection
569 unbind-key [<mod>/<modmask>] <key>
570 \end_layout
572 \begin_layout Standard
573 Unbind command from <key> (with specified <mod> and <modmask>).
574 \end_layout
576 \begin_layout Subsubsection
577 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
578  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
579  [plus=<val>] [tolerance=<val>]
580 \end_layout
582 \begin_layout Standard
583 Set axis parameters for axis <axis>.
584 \end_layout
586 \begin_layout Itemize
587 disabled: Disable axis
588 \end_layout
590 \begin_layout Itemize
591 axis: Normal axis
592 \end_layout
594 \begin_layout Itemize
595 axis-inverse: Inverse axis
596 \end_layout
598 \begin_layout Itemize
599 pressure0-: Pressure sensitive.
600  Released at 0, pressed at -.
601 \end_layout
603 \begin_layout Itemize
604 pressure0+: Pressure sensitive.
605  Released at 0, pressed at +.
606 \end_layout
608 \begin_layout Itemize
609 pressure-0: Pressure sensitive.
610  Released at -, pressed at 0.
611 \end_layout
613 \begin_layout Itemize
614 pressure-+: Pressure sensitive.
615  Released at -, pressed at +.
616 \end_layout
618 \begin_layout Itemize
619 pressure+0: Pressure sensitive.
620  Released at +, pressed at 0.
621 \end_layout
623 \begin_layout Itemize
624 pressure+-: Pressure sensitive.
625  Released at +, pressed at -.
626 \end_layout
628 \begin_layout Itemize
629 minus=<val>: Calibration at extreme minus position (-32768-32767)
630 \end_layout
632 \begin_layout Itemize
633 zero=<val>: Calibration at neutral position (-32768-32767)
634 \end_layout
636 \begin_layout Itemize
637 plus=<val>: Calibration at extreme plus position (-32768-32767)
638 \end_layout
640 \begin_layout Itemize
641 tolerance=<value>: Center band tolerance (0<x<1).
642  The smaller the value, the more sensitive the control is.
643 \end_layout
645 \begin_layout Subsubsection
646 show-bindings
647 \end_layout
649 \begin_layout Standard
650 Print all key bindings in effect.
651 \end_layout
653 \begin_layout Subsection
654 Aliases
655 \end_layout
657 \begin_layout Standard
658 Aliases bind command to sequence of commands.
659  After alias has been defined, it replaces the command it shadows.
660 \end_layout
662 \begin_layout Standard
663 Notes:
664 \end_layout
666 \begin_layout Itemize
667 You can't alias command to itself.
668 \end_layout
670 \begin_layout Itemize
671 Aliases starting with +/- are edge active just like ordinary commands starting
672  with +/-.
673 \end_layout
675 \begin_layout Itemize
676 One command can be aliased to multiple commands.
677 \end_layout
679 \begin_layout Subsubsection
680 alias-command <command> <expansion>
681 \end_layout
683 \begin_layout Standard
684 Append <expansion> to alias <command>.
685  If alias does not already exist, it is created.
686 \end_layout
688 \begin_layout Subsubsection
689 unalias-command <command>
690 \end_layout
692 \begin_layout Standard
693 Clear alias expansion for <command>.
694 \end_layout
696 \begin_layout Subsubsection
697 show-aliases
698 \end_layout
700 \begin_layout Standard
701 Print all aliases and their expansions in effect.
702 \end_layout
704 \begin_layout Subsection
705 run-script <script>
706 \end_layout
708 \begin_layout Standard
709 Run <script> as if commands were entered on the command line.
710 \end_layout
712 \begin_layout Subsection
713 Video dumping
714 \end_layout
716 \begin_layout Standard
717 Following commands control video dumping:
718 \end_layout
720 \begin_layout Subsubsection
721 start-dump <dumper> [<mode>] <prefix/filename>
722 \end_layout
724 \begin_layout Standard
725 Start dumping using dumper <dumper>.
726  If mode is present or not and if prefix or filename is present depends
727  on the dumper and dumper mode.
728 \end_layout
730 \begin_layout Standard
731 The following dumpers are available:
732 \end_layout
734 \begin_layout Itemize
735 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
736 \end_layout
738 \begin_deeper
739 \begin_layout Itemize
740 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
741  Takes prefix.
742 \end_layout
744 \begin_layout Itemize
745 Mode: cscd/pcm: CSCD video, PCM audio.
746  Takes prefix.
747 \end_layout
749 \end_deeper
750 \begin_layout Itemize
751 INTERNAL-JMD: Internal .jmd dumper.
752 \end_layout
754 \begin_deeper
755 \begin_layout Itemize
756 Does not take mode.
757 \end_layout
759 \begin_layout Itemize
760 Takes a filename.
761 \end_layout
763 \end_deeper
764 \begin_layout Itemize
765 INTERNAL-RAW: Internal RAW dumper.
766 \end_layout
768 \begin_deeper
769 \begin_layout Itemize
770 Does not take mode.
771 \end_layout
773 \begin_layout Itemize
774 Takes a prefix.
775 \end_layout
777 \begin_layout Itemize
778 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
779 \end_layout
781 \begin_layout Itemize
782 Video is always upscaled to double resolution (512x448 / 512 x 478).
783 \end_layout
785 \begin_layout Itemize
786 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
787  for NTSC.
788 \end_layout
790 \end_deeper
791 \begin_layout Itemize
792 INTERNAL-SDMP: Internal SDMP dumper.
793 \end_layout
795 \begin_deeper
796 \begin_layout Itemize
797 Mode 'ms': Multi-segment.
798  Takes prefix.
799 \end_layout
801 \begin_layout Itemize
802 Mode 'ss': Single-segment.
803  Takes filename.
804 \end_layout
806 \end_deeper
807 \begin_layout Subsubsection
808 end-dump <dumper>
809 \end_layout
811 \begin_layout Standard
812 End dumping using <dumper>
813 \end_layout
815 \begin_layout Subsubsection
816 show-dumpers [<dumper>]
817 \end_layout
819 \begin_layout Standard
820 Show the list of dumpers or list of modes for <dumper>
821 \end_layout
823 \begin_layout Subsection
824 Memory manipulation
825 \end_layout
827 \begin_layout Standard
828 <address> may be decimal or hexadecimal (prefixed with '0x').
829  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
830  with '-') decimal.
831 \end_layout
833 \begin_layout Standard
834 The available element <sizes> are:
835 \end_layout
837 \begin_layout Itemize
838 byte: 1 byte
839 \end_layout
841 \begin_layout Itemize
842 word: 2 bytes
843 \end_layout
845 \begin_layout Itemize
846 dword: 4 bytes
847 \end_layout
849 \begin_layout Itemize
850 qword: 8 bytes
851 \end_layout
853 \begin_layout Standard
854 When reading RAM and ROM, multi-byte reads/writes are big-endian.
855  When dealing with DSP memory, multi-byte reads/writes are native-endian
856  (do not use operand sizes exceeding DSP bitness, except dword is OK for
857  24-bit memory).
858 \end_layout
860 \begin_layout Subsubsection
861 read-<size> <address>
862 \end_layout
864 \begin_layout Standard
865 Read the value of byte in <address>.
866 \end_layout
868 \begin_layout Subsubsection
869 read-s<size> <address>
870 \end_layout
872 \begin_layout Standard
873 Read the value of signed byte in <address>.
874 \end_layout
876 \begin_layout Subsubsection
877 write-<size> <address> <value>
878 \end_layout
880 \begin_layout Standard
881 Write <value> to byte in address <address>.
882 \end_layout
884 \begin_layout Subsubsection
885 search-memory reset
886 \end_layout
888 \begin_layout Standard
889 Reset the memory search
890 \end_layout
892 \begin_layout Subsubsection
893 search-memory count
894 \end_layout
896 \begin_layout Standard
897 Print number of candidates remaining
898 \end_layout
900 \begin_layout Subsubsection
901 search-memory print
902 \end_layout
904 \begin_layout Standard
905 Print all candidates remaining
906 \end_layout
908 \begin_layout Subsubsection
909 search-memory <usflag><sizeflag><op>
910 \end_layout
912 \begin_layout Standard
913 Searches memory for addresses satisfying criteria.
914 \end_layout
916 \begin_layout Standard
917 <usflag> can be:
918 \end_layout
920 \begin_layout Itemize
921 u: unsigned
922 \end_layout
924 \begin_layout Itemize
925 s: signed
926 \end_layout
928 \begin_layout Standard
929 <sizeflag> can be:
930 \end_layout
932 \begin_layout Itemize
933 b: byte
934 \end_layout
936 \begin_layout Itemize
937 w: word
938 \end_layout
940 \begin_layout Itemize
941 d: dword
942 \end_layout
944 \begin_layout Itemize
945 q: qword
946 \end_layout
948 \begin_layout Standard
949 <op> can be:
950 \end_layout
952 \begin_layout Itemize
953 lt: < previous value.
954 \end_layout
956 \begin_layout Itemize
957 le: <= previous value.
958 \end_layout
960 \begin_layout Itemize
961 eq: = previous value.
962 \end_layout
964 \begin_layout Itemize
965 ne: != previous value.
966 \end_layout
968 \begin_layout Itemize
969 ge: >= previous value.
970 \end_layout
972 \begin_layout Itemize
973 gt: > previous value.
974 \end_layout
976 \begin_layout Subsubsection
977 search-memory <sizeflag> <value>
978 \end_layout
980 \begin_layout Standard
981 Searches for addresses that currently have value <value>.
982  <sizeflag> is as in previous command.
983 \end_layout
985 \begin_layout Subsection
986 Main commands
987 \end_layout
989 \begin_layout Standard
990 These commands are not available in lsnesrc, but are available after ROM
991  has been loaded.
992 \end_layout
994 \begin_layout Subsubsection
995 quit-emulator [/y]
996 \end_layout
998 \begin_layout Standard
999 Quits the emulator (asking for confirmation).
1000  If /y is given, no confirmation is asked.
1001 \end_layout
1003 \begin_layout Subsubsection
1004 pause-emulator
1005 \end_layout
1007 \begin_layout Standard
1008 Toggle paused/unpaused
1009 \end_layout
1011 \begin_layout Subsubsection
1012 +advance-frame 
1013 \end_layout
1015 \begin_layout Standard
1016 Advance frame.
1017  If the button is still held after configurable timeout expires, game unpauses
1018  for the duration frame advance is held.
1019 \end_layout
1021 \begin_layout Subsubsection
1022 +advance-poll 
1023 \end_layout
1025 \begin_layout Standard
1026 Advance subframe.
1027  If the button is still held after configurable timeout expires, game unpauses
1028  for the duration frame advance is held.
1029 \end_layout
1031 \begin_layout Subsubsection
1032 advance-skiplag 
1033 \end_layout
1035 \begin_layout Standard
1036 Skip to first poll in frame after current.
1037 \end_layout
1039 \begin_layout Subsubsection
1040 reset 
1041 \end_layout
1043 \begin_layout Standard
1044 Reset the SNES after this frame.
1045 \end_layout
1047 \begin_layout Subsubsection
1048 load <filename> 
1049 \end_layout
1051 \begin_layout Standard
1052 Load savestate <filename> in current mode.
1053 \end_layout
1055 \begin_layout Subsubsection
1056 load-state <filename> 
1057 \end_layout
1059 \begin_layout Standard
1060 Load savestate <filename> in readwrite mode.
1061 \end_layout
1063 \begin_layout Subsubsection
1064 load-readonly <filename> 
1065 \end_layout
1067 \begin_layout Standard
1068 Load savestate <filename> in readonly mode.
1069 \end_layout
1071 \begin_layout Subsubsection
1072 load-preserve <filename> 
1073 \end_layout
1075 \begin_layout Standard
1076 Load savestate <filename> in readonly mode, preserving current events.
1077 \end_layout
1079 \begin_layout Subsubsection
1080 load-movie <filename> 
1081 \end_layout
1083 \begin_layout Standard
1084 Load savestate <filename>, ignoring save part in readonly mode.
1085 \end_layout
1087 \begin_layout Subsubsection
1088 save-state <filename> 
1089 \end_layout
1091 \begin_layout Standard
1092 Save system state to <filename> as soon as possible.
1093 \end_layout
1095 \begin_layout Subsubsection
1096 save-movie <filename> 
1097 \end_layout
1099 \begin_layout Standard
1100 Save movie to <filename>.
1101 \end_layout
1103 \begin_layout Subsubsection
1104 set-rwmode 
1105 \end_layout
1107 \begin_layout Standard
1108 Set read-write mode.
1109 \end_layout
1111 \begin_layout Subsubsection
1112 set-romode 
1113 \end_layout
1115 \begin_layout Standard
1116 Set read-only mode
1117 \end_layout
1119 \begin_layout Subsubsection
1120 toggle-rwmode 
1121 \end_layout
1123 \begin_layout Standard
1124 Toggle between read-only and read-write modes.
1125 \end_layout
1127 \begin_layout Subsubsection
1128 set-gamename <name> 
1129 \end_layout
1131 \begin_layout Standard
1132 Set name of the game to <name>
1133 \end_layout
1135 \begin_layout Subsubsection
1136 get-gamename 
1137 \end_layout
1139 \begin_layout Standard
1140 Print the name of the game.
1141 \end_layout
1143 \begin_layout Subsubsection
1144 add-author <author> 
1145 \end_layout
1147 \begin_layout Standard
1148 Adds new author <author>.
1149  If <author> does not contain '|' it is full name.
1150  If it contains '|', '|' splits the full name and nickname.
1151 \end_layout
1153 \begin_layout Subsubsection
1154 edit-author <num> <author> 
1155 \end_layout
1157 \begin_layout Standard
1158 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1159  format)
1160 \end_layout
1162 \begin_layout Subsubsection
1163 remove-author <num> 
1164 \end_layout
1166 \begin_layout Standard
1167 Remove author in slot <num>
1168 \end_layout
1170 \begin_layout Subsubsection
1171 print-authors 
1172 \end_layout
1174 \begin_layout Standard
1175 Print authors.
1176 \end_layout
1178 \begin_layout Subsubsection
1179 test-1, test-2, test-3
1180 \end_layout
1182 \begin_layout Standard
1183 Internal test commands.
1184  Don't use.
1185 \end_layout
1187 \begin_layout Subsubsection
1188 take-screenshot <filename> 
1189 \end_layout
1191 \begin_layout Standard
1192 Save screenshot to <filename>.
1193 \end_layout
1195 \begin_layout Subsubsection
1196 +controller<num><button>
1197 \end_layout
1199 \begin_layout Standard
1200 Press button <button> on controller <num> (1-8).
1201  The following button names are known:
1202 \end_layout
1204 \begin_layout Itemize
1205 left
1206 \end_layout
1208 \begin_layout Itemize
1209 right
1210 \end_layout
1212 \begin_layout Itemize
1214 \end_layout
1216 \begin_layout Itemize
1217 down
1218 \end_layout
1220 \begin_layout Itemize
1222 \end_layout
1224 \begin_layout Itemize
1226 \end_layout
1228 \begin_layout Itemize
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
1245 select
1246 \end_layout
1248 \begin_layout Itemize
1249 start
1250 \end_layout
1252 \begin_layout Itemize
1253 trigger
1254 \end_layout
1256 \begin_layout Itemize
1257 cursor
1258 \end_layout
1260 \begin_layout Itemize
1261 pause
1262 \end_layout
1264 \begin_layout Itemize
1265 turbo
1266 \end_layout
1268 \begin_layout Subsubsection
1269 controllerh<num><button>
1270 \end_layout
1272 \begin_layout Standard
1273 Hold/unhold button <button> on controller <num> (1-8).
1274  See +controller for button names.
1275 \end_layout
1277 \begin_layout Subsubsection
1278 controllerf<num><button>
1279 \end_layout
1281 \begin_layout Standard
1282 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1283  See +controller for button names.
1284 \end_layout
1286 \begin_layout Standard
1287 Cauntion: Does not work properly if outside frame advance.
1288 \end_layout
1290 \begin_layout Subsubsection
1291 autofire (<pattern>|-)...
1292 \end_layout
1294 \begin_layout Standard
1295 Set autofire pattern.
1296  Each parameter is comma-separated list of button names (in form of 1start,
1297  1A, 2B, etc..) to hold on that frame.
1298  After reaching the end of pattern, the pattern restarts from the beginning.
1299 \end_layout
1301 \begin_layout Subsubsection
1302 repaint
1303 \end_layout
1305 \begin_layout Standard
1306 Force a repaint.
1307 \end_layout
1309 \begin_layout Subsection
1310 Save jukebox 
1311 \end_layout
1313 \begin_layout Subsubsection
1314 cycle-jukebox-backward
1315 \end_layout
1317 \begin_layout Standard
1318 Cycle save jukebox backwards.
1319 \end_layout
1321 \begin_layout Subsubsection
1322 cycle-jukebox-forward
1323 \end_layout
1325 \begin_layout Standard
1326 Cycle save jukebox forwards
1327 \end_layout
1329 \begin_layout Subsubsection
1330 load-jukebox
1331 \end_layout
1333 \begin_layout Standard
1334 Do load from jukebox (current mode).
1335 \end_layout
1337 \begin_layout Subsubsection
1338 save-jukebox
1339 \end_layout
1341 \begin_layout Standard
1342 Do state save to jukebox.
1343 \end_layout
1345 \begin_layout Subsection
1346 Lua 
1347 \end_layout
1349 \begin_layout Standard
1350 Only available if lua support is compiled in.
1351 \end_layout
1353 \begin_layout Subsubsection
1354 evaluate-lua <luacode>
1355 \end_layout
1357 \begin_layout Standard
1358 Run Lua code <luacode> using built-in Lua interpretter.
1359 \end_layout
1361 \begin_layout Subsubsection
1362 run-lua <script>
1363 \end_layout
1365 \begin_layout Standard
1366 Run specified lua file using built-in Lua interpretter.
1367 \end_layout
1369 \begin_layout Subsubsection
1370 reset-lua
1371 \end_layout
1373 \begin_layout Standard
1374 Clear the Lua VM state and restore to factory defaults.
1375 \end_layout
1377 \begin_layout Subsection
1378 Memory watch
1379 \end_layout
1381 \begin_layout Subsubsection
1382 add-watch <name> <expression>
1383 \end_layout
1385 \begin_layout Standard
1386 Adds new watch (or modifies old one).
1387 \end_layout
1389 \begin_layout Subsubsection
1390 remove-watch <name>
1391 \end_layout
1393 \begin_layout Standard
1394 Remove a watch.
1395 \end_layout
1397 \begin_layout Subsection
1398 Sound 
1399 \end_layout
1401 \begin_layout Subsubsection
1402 enable-sound <on/off> 
1403 \end_layout
1405 \begin_layout Standard
1406 Enable/Disable sound.
1407 \end_layout
1409 \begin_layout Subsubsection
1410 set-sound-device <device> 
1411 \end_layout
1413 \begin_layout Standard
1414 Set sound device to <device>
1415 \end_layout
1417 \begin_layout Subsubsection
1418 show-sound-status 
1419 \end_layout
1421 \begin_layout Standard
1422 Show status of sound system.
1423 \end_layout
1425 \begin_layout Subsubsection
1426 show-sound-devices
1427 \end_layout
1429 \begin_layout Standard
1430 Show all available devices.
1431 \end_layout
1433 \begin_layout Subsubsection
1434 set-volume <multiplier>
1435 \end_layout
1437 \begin_layout Standard
1438 Set the volume multiplier to <multiplier>.
1439  1 is normal volume, and higher numbers are louder.
1440 \end_layout
1442 \begin_layout Subsubsection
1443 set-volume <multiplier>%
1444 \end_layout
1446 \begin_layout Standard
1447 Set the volume multiplier to <multiplier> percent.
1448  100 is normal volume, and higher numbers are louder.
1449 \end_layout
1451 \begin_layout Subsubsection
1452 set-volume <multiplier>dB
1453 \end_layout
1455 \begin_layout Standard
1456 Set the volume multiplier to <multiplier> dB.
1457  0 is normal volume, and higher numbers are louder.
1458  The value may be negative.
1459 \end_layout
1461 \begin_layout Subsection
1462 Misc.
1463 \end_layout
1465 \begin_layout Subsubsection
1466 reload-rom [<file>]
1467 \end_layout
1469 \begin_layout Standard
1470 Reloads the main ROM image from <file>.
1471 \end_layout
1473 \begin_layout Subsubsection
1474 edit-subtitle <firstframe> <length> [<text>]
1475 \end_layout
1477 \begin_layout Standard
1478 Edit or delete a subtitle.
1479 \end_layout
1481 \begin_layout Subsubsection
1482 list-subtitle
1483 \end_layout
1485 \begin_layout Standard
1486 List subtitles.
1487 \end_layout
1489 \begin_layout Subsection
1490 SDL Platform commands 
1491 \end_layout
1493 \begin_layout Standard
1494 The following are valid on SDL platform.
1495 \end_layout
1497 \begin_layout Subsubsection
1498 identify-key
1499 \end_layout
1501 \begin_layout Standard
1502 Asks to press a key and then identifies that (pseudo-)key.
1503 \end_layout
1505 \begin_layout Subsubsection
1506 toggle-console 
1507 \end_layout
1509 \begin_layout Standard
1510 Toggle between windowed/fullscreen console.
1511 \end_layout
1513 \begin_layout Subsubsection
1514 scroll-fullup 
1515 \end_layout
1517 \begin_layout Standard
1518 Scroll messages window as far back as it goes.
1519 \end_layout
1521 \begin_layout Subsubsection
1522 scroll-fulldown 
1523 \end_layout
1525 \begin_layout Standard
1526 Scroll messages window as far forward as it goes.
1527 \end_layout
1529 \begin_layout Subsubsection
1530 scroll-up 
1531 \end_layout
1533 \begin_layout Standard
1534 Scroll messages window back one screenful.
1535 \end_layout
1537 \begin_layout Subsubsection
1538 scroll-down 
1539 \end_layout
1541 \begin_layout Standard
1542 Scroll messages window forward one screenful.
1543 \end_layout
1545 \begin_layout Subsubsection
1546 prompt-command <command>
1547 \end_layout
1549 \begin_layout Standard
1550 Enter command prompt, with prompt prepopulated with specified command.
1551 \end_layout
1553 \begin_layout Section
1554 Settings
1555 \end_layout
1557 \begin_layout Subsection
1558 Core settings
1559 \end_layout
1561 \begin_layout Subsubsection
1562 firmwarepath
1563 \end_layout
1565 \begin_layout Standard
1566 Set where bsnes looks for firmware files.
1567  Default is 
1568 \begin_inset Quotes eld
1569 \end_inset
1572 \begin_inset Quotes erd
1573 \end_inset
1576 \end_layout
1578 \begin_layout Subsubsection
1579 target
1580 \end_layout
1582 \begin_layout Standard
1583 Set the target .
1584  Numeric, range is 0.001 to 
1585 \begin_inset Quotes eld
1586 \end_inset
1588 infinite
1589 \begin_inset Quotes erd
1590 \end_inset
1593  Default is native framerate.
1594 \end_layout
1596 \begin_layout Subsubsection
1597 savecompression
1598 \end_layout
1600 \begin_layout Standard
1601 Set save compression level (integer 0-9).
1602  Default is 7 (0 is no compression).
1603 \end_layout
1605 \begin_layout Subsubsection
1606 advance-timeout
1607 \end_layout
1609 \begin_layout Standard
1610 Set the frame advance timeout in milliseconds.
1611  Numeric integer, range is 0-999999999.
1612  Default is 500.
1613 \end_layout
1615 \begin_layout Subsection
1616 AVI dumper settings
1617 \end_layout
1619 \begin_layout Subsubsection
1620 avi-large
1621 \end_layout
1623 \begin_layout Standard
1624 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1625  outputs.
1626 \end_layout
1628 \begin_layout Subsubsection
1629 avi-left-border
1630 \end_layout
1632 \begin_layout Standard
1633 AVI dumper: Set the default left border thickness (unless lua overrides)
1634  for dumps.
1635  Range 0-8191.
1636  Default is 0.
1637 \end_layout
1639 \begin_layout Subsubsection
1640 avi-right-border
1641 \end_layout
1643 \begin_layout Standard
1644 AVI dumper: Set the default right border thickness (unless lua overrides)
1645  for dumps.
1646  Range 0-8191.
1647  Default is 0.
1648 \end_layout
1650 \begin_layout Subsubsection
1651 avi-top-border
1652 \end_layout
1654 \begin_layout Standard
1655 AVI dumper: Set the default top border thickness (unless lua overrides)
1656  for dumps.
1657  Range 0-8191.
1658  Default is 0.
1659 \end_layout
1661 \begin_layout Subsubsection
1662 avi-bottom-border
1663 \end_layout
1665 \begin_layout Standard
1666 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1667  for dumps.
1668  Range 0-8191.
1669  Default is 0.
1670 \end_layout
1672 \begin_layout Subsubsection
1673 avi-maxframes
1674 \end_layout
1676 \begin_layout Standard
1677 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1678  Range 0-999999999.
1679  Default is 0.
1680 \end_layout
1682 \begin_layout Subsubsection
1683 avi-compresison
1684 \end_layout
1686 \begin_layout Standard
1687 AVI dumper: Compression level (0-18).
1688 \end_layout
1690 \begin_layout Itemize
1691 Compression levels 10 and above are not compatible with stock CSCD codec.
1692 \end_layout
1694 \begin_layout Itemize
1695 Recomended level is 7.
1696 \end_layout
1698 \begin_layout Subsubsection
1699 avi-soundrate
1700 \end_layout
1702 \begin_layout Standard
1703 AVI dumper: Set method of determining the sound rate.
1704 \end_layout
1706 \begin_layout Itemize
1707 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1708  128, 176.4 and 192 kHz.
1709 \end_layout
1711 \begin_layout Itemize
1712 1: Round down to nearest integer.
1713 \end_layout
1715 \begin_layout Itemize
1716 2: Round up to nearest ingeter.
1717 \end_layout
1719 \begin_layout Subsection
1720 JMD options
1721 \end_layout
1723 \begin_layout Subsubsection
1724 jmd-copression
1725 \end_layout
1727 \begin_layout Standard
1728 JMD dumper: Compression level (0-9).
1729 \end_layout
1731 \begin_layout Subsection
1732 SDL platform settings
1733 \end_layout
1735 \begin_layout Subsubsection
1736 autorepeat-first-delay
1737 \end_layout
1739 \begin_layout Standard
1740 Sets the delay for first character in typematic autorepeat.
1741 \end_layout
1743 \begin_layout Subsubsection
1744 autorepeat-subsequent-delay
1745 \end_layout
1747 \begin_layout Standard
1748 Sets the delay for subsequent characters in typematic autorepeat.
1749 \end_layout
1751 \begin_layout Section
1752 Lua functions
1753 \end_layout
1755 \begin_layout Subsection
1756 Core (in main table)
1757 \end_layout
1759 \begin_layout Subsubsection
1760 print
1761 \end_layout
1763 \begin_layout Standard
1764 Print line to message console.
1765 \end_layout
1767 \begin_layout Subsubsection
1768 exec(string command)
1769 \end_layout
1771 \begin_layout Standard
1772 Run command as it was entered on the command line
1773 \end_layout
1775 \begin_layout Subsubsection
1776 utime()
1777 \end_layout
1779 \begin_layout Standard
1780 Returns two values.
1781  First is time since some epoch in seconds, the second is microseconds mod
1782  10^6 since that epoch.
1783 \end_layout
1785 \begin_layout Subsubsection
1786 emulator_ready()
1787 \end_layout
1789 \begin_layout Standard
1790 Returns true if emulator has finished booting, false if not (on_startup()
1791  will be issued later).
1792 \end_layout
1794 \begin_layout Subsubsection
1795 set_idle_timeout(number timeout)
1796 \end_layout
1798 \begin_layout Standard
1799 Set number of microseconds to block idle for.
1800  After this timeout has expired, on_idle() will be called once.
1801 \end_layout
1803 \begin_layout Subsubsection
1804 set_timer_timeout(number timeout)
1805 \end_layout
1807 \begin_layout Standard
1808 Set number of microseconds to block timer for.
1809  After this timeout has expired, on_timer() will be called once.
1810 \end_layout
1812 \begin_layout Subsubsection
1813 bus_address(number snesaddr)
1814 \end_layout
1816 \begin_layout Standard
1817 Returns virtual address corresponding to specified address on SNES bus.
1818 \end_layout
1820 \begin_layout Subsection
1821 Table bit:
1822 \end_layout
1824 \begin_layout Standard
1825 Bitwise logical functions and related.
1826 \end_layout
1828 \begin_layout Subsubsection
1829 bit.none(number...) / bit.bnot(number...)
1830 \end_layout
1832 \begin_layout Standard
1833 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1834  arguments).
1835 \end_layout
1837 \begin_layout Subsubsection
1838 bit.any(number...) / bit.bor(number...)
1839 \end_layout
1841 \begin_layout Standard
1842 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1843 \end_layout
1845 \begin_layout Subsubsection
1846 bit.all(number...) / bit.band(number...)
1847 \end_layout
1849 \begin_layout Standard
1850 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1852 \end_layout
1854 \begin_layout Subsubsection
1855 bit.parity(number...) / bit.bxor(number...)
1856 \end_layout
1858 \begin_layout Standard
1859 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1860  of the arguments).
1861 \end_layout
1863 \begin_layout Subsubsection
1864 bit.lrotate(number base[, number amount[, number bits]])
1865 \end_layout
1867 \begin_layout Standard
1868 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1869 \end_layout
1871 \begin_layout Subsubsection
1872 bit.rrotate(number base[, number amount[, number bits]])
1873 \end_layout
1875 \begin_layout Standard
1876 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1877  places.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 bit.lshift(number base[, number amount[, number bits]])
1882 \end_layout
1884 \begin_layout Standard
1885 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1886  The new bits are filled with zeroes.
1887 \end_layout
1889 \begin_layout Subsubsection
1890 bit.lrshift(number base[, number amount[, number bits]])
1891 \end_layout
1893 \begin_layout Standard
1894 Shift bits-bit (max 48, default 48) number logically right by amount (default
1895  1) places.
1896  The new bits are filled with zeroes.
1897 \end_layout
1899 \begin_layout Subsubsection
1900 bit.arshift(number base[, number amount[, number bits]])
1901 \end_layout
1903 \begin_layout Standard
1904 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1905  (default 1) places.
1906  The new bits are shifted in with copy of the high bit.
1907 \end_layout
1909 \begin_layout Subsubsection
1910 bit.extract(number base[, number bit0[, number bit1,...]])
1911 \end_layout
1913 \begin_layout Standard
1914 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
1915 \end_layout
1917 \begin_layout Standard
1918 Notes: 
1919 \end_layout
1921 \begin_layout Itemize
1922 Bit numbers up to 51 should work reliably (then things start falling apart
1923  due to double precision issues).
1924 \end_layout
1926 \begin_layout Itemize
1927 There are two special bit positions, true and false, standing for always
1928  set bit and always clear bit.
1929 \end_layout
1931 \begin_layout Subsubsection
1932 bit.value([number bit1[, number bit2,...]])
1933 \end_layout
1935 \begin_layout Standard
1936 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
1937  places and so on.
1938  As special value, nil argument is no-op.
1939 \end_layout
1941 \begin_layout Subsection
1942 Table gui:
1943 \end_layout
1945 \begin_layout Standard
1946 Most of these functions can only be called in on_paint and on_video callbacks.
1947  Exceptions are noted.
1948 \end_layout
1950 \begin_layout Standard
1951 Colors are 32-bit.
1952  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
1953  16-23 are the red component, bits 24-31 are alpha component (0 is fully
1954  opaque, 255 is almost transparent).
1955  -1 is the fully transparent color.
1956  Alpha values greater than 127 do work.
1957 \end_layout
1959 \begin_layout Standard
1960 Origin of coordinates is at top left corner of game display area.
1961  Left and top gaps correspond to negative coordinates.
1962 \end_layout
1964 \begin_layout Subsubsection
1965 gui.resolution()
1966 \end_layout
1968 \begin_layout Standard
1969 Returns 2-tuple (hresolution, vresolution).
1970 \end_layout
1972 \begin_layout Subsubsection
1973 gui.<class>_gap(number gap)
1974 \end_layout
1976 \begin_layout Standard
1977 Set the <class> (left, right, top, bottom) gap to specified value (max gap
1978  is 8191).
1979 \end_layout
1981 \begin_layout Subsubsection
1982 gui.text(number x, number y, string text[, number fgc[, number bgc]])
1983 \end_layout
1985 \begin_layout Standard
1986 Draw specified text on the GUI (each character cell is 8 or 16 wide and
1987  16 high).
1988  Parameters:
1989 \end_layout
1991 \begin_layout Itemize
1992 x: X-coordinate to start the drawing from (and x-coordinate at begining
1993  of the lines).
1994 \end_layout
1996 \begin_layout Itemize
1997 y: Y-coordinate to start the drawing from.
1998 \end_layout
2000 \begin_layout Itemize
2001 text: The text to draw.
2002 \end_layout
2004 \begin_layout Itemize
2005 fgc: Text color (default is 0xFFFFFF (white))
2006 \end_layout
2008 \begin_layout Itemize
2009 bgc: Background color (default is -1 (transparent))
2010 \end_layout
2012 \begin_layout Subsubsection
2013 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2014 \end_layout
2016 \begin_layout Standard
2017 Like gui.text, but draw using double-width.
2018 \end_layout
2020 \begin_layout Subsubsection
2021 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2022 \end_layout
2024 \begin_layout Standard
2025 Like gui.text, but draw using double-height.
2026 \end_layout
2028 \begin_layout Subsubsection
2029 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2030 \end_layout
2032 \begin_layout Standard
2033 Like gui.text, but draw using double-width/double-height.
2034 \end_layout
2036 \begin_layout Subsubsection
2037 gui.rectangle(number x, number y, number width, number height[, number thickness[
2038 , number outline[, number fill]]])
2039 \end_layout
2041 \begin_layout Standard
2042 Draw rectangle on the GUI.
2043  Parameters:
2044 \end_layout
2046 \begin_layout Itemize
2047 x: X-coordinate of left edge.
2048 \end_layout
2050 \begin_layout Itemize
2051 y: Y-coordinate of upper edge.
2052 \end_layout
2054 \begin_layout Itemize
2055 width: Width of rectangle.
2056 \end_layout
2058 \begin_layout Itemize
2059 height: Height of rectangle.
2060 \end_layout
2062 \begin_layout Itemize
2063 thickness: Thickness of outline (default is 1).
2064 \end_layout
2066 \begin_layout Itemize
2067 outline: Color of outline (default is 0xFFFFFF (white))
2068 \end_layout
2070 \begin_layout Itemize
2071 fill: Color of fill (default is -1 (transparent))
2072 \end_layout
2074 \begin_layout Subsubsection
2075 gui.box(number x, number y, number width, number height[, number thickness[,
2076  number outline1[,number outline2[, number fill]]]])
2077 \end_layout
2079 \begin_layout Standard
2080 Draw rectangle with 3D effect on the GUI.
2081  Parameters:
2082 \end_layout
2084 \begin_layout Itemize
2085 x: X-coordinate of left edge.
2086 \end_layout
2088 \begin_layout Itemize
2089 y: Y-coordinate of upper edge.
2090 \end_layout
2092 \begin_layout Itemize
2093 width: Width of rectangle.
2094 \end_layout
2096 \begin_layout Itemize
2097 height: Height of rectangle.
2098 \end_layout
2100 \begin_layout Itemize
2101 thickness: Thickness of outline (default is 1).
2102 \end_layout
2104 \begin_layout Itemize
2105 outline1: First color of outline (default is 0xFFFFFF (white))
2106 \end_layout
2108 \begin_layout Itemize
2109 outline2: First color of outline (default is 0x808080 (dark gray))
2110 \end_layout
2112 \begin_layout Itemize
2113 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2114 \end_layout
2116 \begin_layout Subsubsection
2117 gui.pixel(number x, number y[, number color])
2118 \end_layout
2120 \begin_layout Standard
2121 Draw one pixel on the GUI.
2122  Parameters:
2123 \end_layout
2125 \begin_layout Itemize
2126 x: X-coordinate of the pixel
2127 \end_layout
2129 \begin_layout Itemize
2130 y: Y-coordinate of the pixel
2131 \end_layout
2133 \begin_layout Itemize
2134 color: Color of the pixel (default is 0xFFFFFF (white))
2135 \end_layout
2137 \begin_layout Subsubsection
2138 gui.crosshair(number x, number y[, number length[, number color]])
2139 \end_layout
2141 \begin_layout Standard
2142 Draw a crosshair.
2143  Parameters:
2144 \end_layout
2146 \begin_layout Itemize
2147 x: X-coordinate of the crosshair
2148 \end_layout
2150 \begin_layout Itemize
2151 y: Y-coordinate of the crosshair
2152 \end_layout
2154 \begin_layout Itemize
2155 length: Length of the crosshair lines (default 10).
2156 \end_layout
2158 \begin_layout Itemize
2159 color: Color of the crosshair (default is 0xFFFFFF (white))
2160 \end_layout
2162 \begin_layout Subsubsection
2163 gui.line(number x1, number y1, number x2, number y2[, number color])
2164 \end_layout
2166 \begin_layout Standard
2167 Draw a thin line.
2168  Parameters:
2169 \end_layout
2171 \begin_layout Itemize
2172 x1: X-coordinate of one end.
2173 \end_layout
2175 \begin_layout Itemize
2176 y1: Y-coordinate of one end.
2177 \end_layout
2179 \begin_layout Itemize
2180 x2: X-coordinate of the other end.
2181 \end_layout
2183 \begin_layout Itemize
2184 y2: Y-coordinate of the other end.
2185 \end_layout
2187 \begin_layout Itemize
2188 color: Color of the line (default is 0xFFFFFF (white)).
2189 \end_layout
2191 \begin_layout Subsubsection
2192 gui.circle(number x, number y, number r[, number thick[, number border[,
2193  number fil]]])
2194 \end_layout
2196 \begin_layout Standard
2197 Draw a circle.
2198  Parameters.
2199 \end_layout
2201 \begin_layout Itemize
2202 x: X-coordinate of the center
2203 \end_layout
2205 \begin_layout Itemize
2206 y: Y-coordinate of the center
2207 \end_layout
2209 \begin_layout Itemize
2210 r: The radius of the circle
2211 \end_layout
2213 \begin_layout Itemize
2214 thick: Border thickness
2215 \end_layout
2217 \begin_layout Itemize
2218 border: Border color (default is 0xFFFFFF (white))
2219 \end_layout
2221 \begin_layout Itemize
2222 fill: Fill color (default is -1 (transparent)).
2223 \end_layout
2225 \begin_layout Subsubsection
2226 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2227 \end_layout
2229 \begin_layout Standard
2230 Draw a bitmap on screen with specified palette.
2231  Parameters:
2232 \end_layout
2234 \begin_layout Itemize
2235 x: X-coordinate of left edge.
2236 \end_layout
2238 \begin_layout Itemize
2239 y: Y-coordinate of top edge.
2240 \end_layout
2242 \begin_layout Itemize
2243 bitmap: The bitmap to draw
2244 \end_layout
2246 \begin_layout Itemize
2247 palette: The palette to draw the bitmap using.
2248 \end_layout
2250 \begin_layout Subsubsection
2251 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2252 \end_layout
2254 \begin_layout Standard
2255 Draw a bitmap on screen.
2256  Parameters:
2257 \end_layout
2259 \begin_layout Itemize
2260 x: X-coordinate of left edge.
2261 \end_layout
2263 \begin_layout Itemize
2264 y: Y-coordinate of top edge.
2265 \end_layout
2267 \begin_layout Itemize
2268 bitmap: The bitmap to draw
2269 \end_layout
2271 \begin_layout Subsubsection
2272 gui.palette_new()
2273 \end_layout
2275 \begin_layout Standard
2276 Returns a new palette (initially all transparent).
2277  Can be used anywhere.
2278 \end_layout
2280 \begin_layout Subsubsection
2281 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2282 \end_layout
2284 \begin_layout Standard
2285 Returns a new bitmap/dbitmap.
2286  Can be used anywhere.
2287  Parameters:
2288 \end_layout
2290 \begin_layout Itemize
2291 w: The width of new bitmap
2292 \end_layout
2294 \begin_layout Itemize
2295 h: The height of new bitmap
2296 \end_layout
2298 \begin_layout Itemize
2299 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2300 \end_layout
2302 \begin_layout Itemize
2303 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2304 \end_layout
2306 \begin_layout Subsubsection
2307 gui.bitmap_load(string file)
2308 \end_layout
2310 \begin_layout Standard
2311 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2312  for bitmap).
2313  Can be used anywhere.
2314  Parameters:
2315 \end_layout
2317 \begin_layout Itemize
2318 file: The name of file to load.
2319 \end_layout
2321 \begin_layout Subsubsection
2322 gui.palette_set(palette palette, number index, number color)
2323 \end_layout
2325 \begin_layout Standard
2326 Sets color in palette.
2327  Can be used anywhere.
2328  Parameters:
2329 \end_layout
2331 \begin_layout Itemize
2332 palette: The palette to manipulate
2333 \end_layout
2335 \begin_layout Itemize
2336 index: Index of color (0-65535).
2337 \end_layout
2339 \begin_layout Itemize
2340 color: The color value.
2341 \end_layout
2343 \begin_layout Subsubsection
2344 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2345 \end_layout
2347 \begin_layout Standard
2348 Sets specified pixel in bitmap.
2349  Can be used anywhere.
2350  Parameters:
2351 \end_layout
2353 \begin_layout Itemize
2354 bitmap: The bitmap to manipulate
2355 \end_layout
2357 \begin_layout Itemize
2358 x: The x-coordinate of the pixel.
2359 \end_layout
2361 \begin_layout Itemize
2362 y: The y-coordinate of the pixel.
2363 \end_layout
2365 \begin_layout Itemize
2366 color: If bitmap is a bitmap, color index (0-65535).
2367  Otherwise color value.
2368 \end_layout
2370 \begin_layout Subsubsection
2371 gui.bitmap_size(bitmap/dbitmap bitmap)
2372 \end_layout
2374 \begin_layout Standard
2375 Get size of bitmap.
2376  Can be used anywhere.
2377  Parameters:
2378 \end_layout
2380 \begin_layout Itemize
2381 bitmap: The bitmap to query.
2382 \end_layout
2384 \begin_layout Standard
2385 The first return is the width, the second is the height.
2386 \end_layout
2388 \begin_layout Subsubsection
2389 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2390  src, number sx, number sy, number w, number h[, number ck])
2391 \end_layout
2393 \begin_layout Standard
2394 Blit a part of bitmap to another.
2395  Can be used anywhere.
2396  Parameters:
2397 \end_layout
2399 \begin_layout Itemize
2400 dest: Destination to blit to.
2401 \end_layout
2403 \begin_layout Itemize
2404 dx: left edge of target
2405 \end_layout
2407 \begin_layout Itemize
2408 dy: Top edge of target
2409 \end_layout
2411 \begin_layout Itemize
2412 src: The source to blit from.
2413  Must be of the same type as destination.
2414 \end_layout
2416 \begin_layout Itemize
2417 sx: left edge of source
2418 \end_layout
2420 \begin_layout Itemize
2421 sy: Top edge of source
2422 \end_layout
2424 \begin_layout Itemize
2425 w: Width of region
2426 \end_layout
2428 \begin_layout Itemize
2429 h: Height of region.
2430 \end_layout
2432 \begin_layout Itemize
2433 ck: Color key.
2434  Pixels of this color are not blitted.
2435 \end_layout
2437 \begin_deeper
2438 \begin_layout Itemize
2439 If bitmaps are bitmaps, this is color index of colorkey.
2440  Values outside range 0-65535 cause no key to be used as colorkey.
2441 \end_layout
2443 \begin_layout Itemize
2444 If bitmaps are dbitmaps, this color value of colorkey.
2445 \end_layout
2447 \begin_layout Itemize
2448 May be absent or nil for no colorkey blit.
2449 \end_layout
2451 \end_deeper
2452 \begin_layout Subsubsection
2453 gui.repaint()
2454 \end_layout
2456 \begin_layout Standard
2457 Request on_repaint() to happen as soon as possible.
2458  Can be used anywhere.
2459 \end_layout
2461 \begin_layout Subsubsection
2462 gui.subframe_update(boolean on)
2463 \end_layout
2465 \begin_layout Standard
2466 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2467  or not happen (on=false).
2468  Can be used anywhere.
2469 \end_layout
2471 \begin_layout Subsubsection
2472 gui.screenshot(string filename)
2473 \end_layout
2475 \begin_layout Standard
2476 Write PNG screenshot of the current frame (no drawings) to specified file.
2477  Can be used anywhere.
2478 \end_layout
2480 \begin_layout Subsubsection
2481 gui.color(number r, number g, number b[, number a])
2482 \end_layout
2484 \begin_layout Standard
2485 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2486  each component in scale 0-255.
2487  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2488  opaque).
2489  The default alpha is 256.
2490 \end_layout
2492 \begin_layout Subsubsection
2493 gui.status(string name, string value)
2494 \end_layout
2496 \begin_layout Standard
2497 Set status field 
2498 \begin_inset Quotes eld
2499 \end_inset
2501 L[<name>]
2502 \begin_inset Quotes erd
2503 \end_inset
2505  to <value> in status area.
2506  Can be used anywhere.
2507 \end_layout
2509 \begin_layout Subsubsection
2510 gui.rainbow(number step, number steps[, number color])
2511 \end_layout
2513 \begin_layout Standard
2514 Perform hue rotation of color <color> (default bright red), by <step> steps.
2515  The number of steps per full rotation is given by absolute value of <steps>.
2516 \end_layout
2518 \begin_layout Standard
2519 If <steps> is negative, the rotation will be counterclockwise.
2520 \end_layout
2522 \begin_layout Subsection
2523 table input
2524 \end_layout
2526 \begin_layout Standard
2527 Input handling.
2528  Only available in on_input callback.
2529 \end_layout
2531 \begin_layout Subsubsection
2532 input.get(number controller, number index)
2533 \end_layout
2535 \begin_layout Standard
2536 Read the specified index (0-11) from specified controller (0-7).
2537  Notes:
2538 \end_layout
2540 \begin_layout Itemize
2541 Uses physical controller numbering.
2542  Gamepad in port 2 is controller 4, not 1!
2543 \end_layout
2545 \begin_layout Subsubsection
2546 input.set(number controller, number index, number value)
2547 \end_layout
2549 \begin_layout Standard
2550 Write the specified index (0-11) from specified controller (0-7), storing
2551  value.
2552  Notes:
2553 \end_layout
2555 \begin_layout Itemize
2556 Uses physical controller numbering.
2557  Gamepad in port 2 is controller 4, not 1!
2558 \end_layout
2560 \begin_layout Subsubsection
2561 input.geta(number controller)
2562 \end_layout
2564 \begin_layout Standard
2565 Get input state for entiere controller.
2566  Returns 13 return values.
2567 \end_layout
2569 \begin_layout Itemize
2570 1st return value: Bitmask: bit i is set if i:th index is nonzero
2571 \end_layout
2573 \begin_layout Itemize
2574 2nd-13th return value: value of i:th index.
2575 \end_layout
2577 \begin_layout Subsubsection
2578 input.seta(number controller, number bitmask, number args...)
2579 \end_layout
2581 \begin_layout Standard
2582 Set state for entiere controller.
2583  args is up to 12 values for indices (overriding values in bitmask if specified).
2584 \end_layout
2586 \begin_layout Subsubsection
2587 input.controllertype(number controller)
2588 \end_layout
2590 \begin_layout Standard
2591 Get the type of controller as string.
2592  Valid values are:
2593 \end_layout
2595 \begin_layout Itemize
2596 gamepad
2597 \end_layout
2599 \begin_layout Itemize
2600 mouse
2601 \end_layout
2603 \begin_layout Itemize
2604 justifier
2605 \end_layout
2607 \begin_layout Itemize
2608 superscope
2609 \end_layout
2611 \begin_layout Subsubsection
2612 input.reset([number cycles])
2613 \end_layout
2615 \begin_layout Standard
2616 Execute reset.
2617  If cycles is greater than zero, do delayed reset.
2618  0 (or no value) causes immediate reset.
2619 \end_layout
2621 \begin_layout Itemize
2622 Only available with subframe flag false.
2623 \end_layout
2625 \begin_layout Subsubsection
2626 input.raw()
2627 \end_layout
2629 \begin_layout Standard
2630 Returns table of tables of all available keys and axes.
2631  The first table is indexed by key name (platform-dependent!), and the inner
2632  table has the following fields:
2633 \end_layout
2635 \begin_layout Itemize
2636 last_rawval: Last reported raw value for control.
2637 \end_layout
2639 \begin_layout Itemize
2640 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2641  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2642 \end_layout
2644 \begin_layout Itemize
2645 cal_left: Minimum calibration value.
2646  Only meaningful with axis and pressure types.
2647 \end_layout
2649 \begin_layout Itemize
2650 cal_center: Center calibration value.
2651  Only meaningful with axis and pressure types.
2652 \end_layout
2654 \begin_layout Itemize
2655 cal_right: Maximum calibration value.
2656  Only meaningful with axis and pressure types.
2657 \end_layout
2659 \begin_layout Itemize
2660 cal_tolerance: Dead zone tolerance.
2661  Only meaningful with axis and pressure types.
2662 \end_layout
2664 \begin_layout Subsubsection
2665 input.keyhook(key, state)
2666 \end_layout
2668 \begin_layout Standard
2669 Requests that keyhook events to be sent for key (state=true) or not sent
2670  (state=false).
2671 \end_layout
2673 \begin_layout Subsection
2674 Table subtitle
2675 \end_layout
2677 \begin_layout Standard
2678 Subtitle handling
2679 \end_layout
2681 \begin_layout Subsubsection
2682 subtitle.byindex(number i)
2683 \end_layout
2685 \begin_layout Standard
2686 Read the frame and length of ith subtitle.
2687  Returns nothing if not present.
2688 \end_layout
2690 \begin_layout Subsubsection
2691 subtitle.set(number f, number l, string txt)
2692 \end_layout
2694 \begin_layout Standard
2695 Set the text of subtitle.
2696 \end_layout
2698 \begin_layout Subsubsection
2699 subtitle.get(number f, number l)
2700 \end_layout
2702 \begin_layout Standard
2703 Get the text of subtitle.
2704 \end_layout
2706 \begin_layout Subsubsection
2707 subtitle.delete(number f, number l)
2708 \end_layout
2710 \begin_layout Standard
2711 Delete specified subtitle.
2712 \end_layout
2714 \begin_layout Subsection
2715 Table hostmemory
2716 \end_layout
2718 \begin_layout Standard
2719 Host memory handling (extra memory saved to savestates).
2720  Host memory starts empty.
2721 \end_layout
2723 \begin_layout Subsubsection
2724 hostmemory.read(number address)
2725 \end_layout
2727 \begin_layout Standard
2728 Reads hostmemory slot address.
2729  Slot numbers out of range return false instead of numeric.
2730 \end_layout
2732 \begin_layout Subsubsection
2733 hostmemory.write(number address, number value)
2734 \end_layout
2736 \begin_layout Standard
2737 Writes hostmemory slot with 0-255.
2738  Slot numbers out of range cause extension of host memory slot space.
2739 \end_layout
2741 \begin_layout Subsubsection
2742 hostmemory.readbyte(number address)
2743 \end_layout
2745 \begin_layout Standard
2746 Read unsigned byte (1 element) from given address.
2747  Slots out of range return false.
2748 \end_layout
2750 \begin_layout Subsubsection
2751 hostmemory.writebyte(number address, number value)
2752 \end_layout
2754 \begin_layout Standard
2755 Write unsigned byte (1 element) to given slot.
2756  Slot numbers out of range cause extension.
2757 \end_layout
2759 \begin_layout Subsubsection
2760 hostmemory.readsbyte(number address)
2761 \end_layout
2763 \begin_layout Standard
2764 Read signed byte (1 element) from given address.
2765  Slots out of range return false.
2766 \end_layout
2768 \begin_layout Subsubsection
2769 hostmemory.writesbyte(number address, number value)
2770 \end_layout
2772 \begin_layout Standard
2773 Write signed byte (1 element) to given slot.
2774  Slot numbers out of range cause extension.
2775 \end_layout
2777 \begin_layout Subsubsection
2778 hostmemory.readword(number address)
2779 \end_layout
2781 \begin_layout Standard
2782 Read unsigned word (2 elements) from given address.
2783  Slots out of range return false.
2784 \end_layout
2786 \begin_layout Subsubsection
2787 hostmemory.writeword(number address, number value)
2788 \end_layout
2790 \begin_layout Standard
2791 Write unsigned word (2 elements) to given slot.
2792  Slot numbers out of range cause extension.
2793 \end_layout
2795 \begin_layout Subsubsection
2796 hostmemory.readsword(number address)
2797 \end_layout
2799 \begin_layout Standard
2800 Read signed word (2 elements) from given address.
2801  Slots out of range return false.
2802 \end_layout
2804 \begin_layout Subsubsection
2805 hostmemory.writesword(number address, number value)
2806 \end_layout
2808 \begin_layout Standard
2809 Write signed word (2 elements) to given slot.
2810  Slot numbers out of range cause extension.
2811 \end_layout
2813 \begin_layout Subsubsection
2814 hostmemory.readdword(number address)
2815 \end_layout
2817 \begin_layout Standard
2818 Read unsigned doubleword (4 elements) from given address.
2819  Slots out of range return false.
2820 \end_layout
2822 \begin_layout Subsubsection
2823 hostmemory.writedword(number address, number value)
2824 \end_layout
2826 \begin_layout Standard
2827 Write unsigned doubleword (4 elements) to given slot.
2828  Slot numbers out of range cause extension.
2829 \end_layout
2831 \begin_layout Subsubsection
2832 hostmemory.readsdword(number address)
2833 \end_layout
2835 \begin_layout Standard
2836 Read signed doubleword (4 elements) from given address.
2837  Slots out of range return false.
2838 \end_layout
2840 \begin_layout Subsubsection
2841 hostmemory.writesdword(number address, number value)
2842 \end_layout
2844 \begin_layout Standard
2845 Write signed doubleword (4 elements) to given slot.
2846  Slot numbers out of range cause extension.
2847 \end_layout
2849 \begin_layout Subsubsection
2850 hostmemory.readqword(number address)
2851 \end_layout
2853 \begin_layout Standard
2854 Read unsigned quadword (8 elements) from given address.
2855  Slots out of range return false.
2856 \end_layout
2858 \begin_layout Subsubsection
2859 hostmemory.writeqword(number address, number value)
2860 \end_layout
2862 \begin_layout Standard
2863 Write unsigned quadword (4 elements) to given slot.
2864  Slot numbers out of range cause extension.
2865 \end_layout
2867 \begin_layout Subsubsection
2868 hostmemory.readsqword(number address)
2869 \end_layout
2871 \begin_layout Standard
2872 Read signed quadword (8 elements) from given address.
2873  Slots out of range return false.
2874 \end_layout
2876 \begin_layout Subsubsection
2877 hostmemory.writesqword(number address, number value)
2878 \end_layout
2880 \begin_layout Standard
2881 Write signed quadword (8 elements) to given slot.
2882  Slot numbers out of range cause extension.
2883 \end_layout
2885 \begin_layout Subsection
2886 Table movie
2887 \end_layout
2889 \begin_layout Standard
2890 Movie handling
2891 \end_layout
2893 \begin_layout Subsubsection
2894 movie.currentframe()
2895 \end_layout
2897 \begin_layout Standard
2898 Return number of current frame.
2899 \end_layout
2901 \begin_layout Subsubsection
2902 movie.framecount()
2903 \end_layout
2905 \begin_layout Standard
2906 Return number of frames in movie.
2907 \end_layout
2909 \begin_layout Subsubsection
2910 movie.readonly()
2911 \end_layout
2913 \begin_layout Standard
2914 Return true if in readonly mode, false if in readwrite.
2915 \end_layout
2917 \begin_layout Subsubsection
2918 movie.set_readwrite()
2919 \end_layout
2921 \begin_layout Standard
2922 Set readwrite mode (does not cause on_readwrite callback).
2923 \end_layout
2925 \begin_layout Subsubsection
2926 movie.frame_subframes(number frame)
2927 \end_layout
2929 \begin_layout Standard
2930 Count number of subframes in specified frame (frame numbers are 1-based)
2931  and return that.
2932 \end_layout
2934 \begin_layout Subsubsection
2935 movie.read_subframe(number frame, number subframe)
2936 \end_layout
2938 \begin_layout Standard
2939 Read specifed subframe in specified frame and return data as array (100
2940  elements, numbered 0-99 currently).
2941 \end_layout
2943 \begin_layout Subsubsection
2944 movie.unsafe_rewind([UNSAFEREWIND state])
2945 \end_layout
2947 \begin_layout Standard
2948 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2949 \end_layout
2951 \begin_layout Itemize
2952 If called without argument, causes emulator to start process of setting
2953  unsafe rewind point.
2954  When this has finished, callback on_set_rewind occurs, passing the rewind
2955  state to lua script.
2956 \end_layout
2958 \begin_layout Itemize
2959 If called with argument, causes emulator rewind to passed rewind point as
2960  soon as possible.
2961  Readwrite mode is implicitly activated.
2962 \end_layout
2964 \begin_layout Standard
2965 The following warnings apply to unsafe rewinding:
2966 \end_layout
2968 \begin_layout Itemize
2969 There are no safety checks against misuse (that's what 
2970 \begin_inset Quotes eld
2971 \end_inset
2973 unsafe
2974 \begin_inset Quotes erd
2975 \end_inset
2977  comes from)!
2978 \end_layout
2980 \begin_layout Itemize
2981 Only call rewind from timeline rewind point was set from.
2982 \end_layout
2984 \begin_layout Itemize
2985 Only call rewind from after the rewind point was set.
2986 \end_layout
2988 \begin_layout Subsection
2989 Table settings
2990 \end_layout
2992 \begin_layout Standard
2993 Routines for settings manipulation
2994 \end_layout
2996 \begin_layout Subsubsection
2997 settings.get(string name)
2998 \end_layout
3000 \begin_layout Standard
3001 Get value of setting.
3002  If setting is blank, returns false.
3003  If setting value can't be obtained, returns (nil, error message).
3004 \end_layout
3006 \begin_layout Subsubsection
3007 settings.set(string name, string value)
3008 \end_layout
3010 \begin_layout Standard
3011 Set value of setting.
3012  If setting can't be set, returns (nil, error message).
3013 \end_layout
3015 \begin_layout Subsubsection
3016 settings.is_set(string name)
3017 \end_layout
3019 \begin_layout Standard
3020 Returns if setting is set.
3021  If setting does not exist, returns (nil, error message).
3022 \end_layout
3024 \begin_layout Subsubsection
3025 settings.blank(string name)
3026 \end_layout
3028 \begin_layout Standard
3029 Blanks a setting and returns true.
3030  If setting can't be blanked, returns (nil, error message).
3031 \end_layout
3033 \begin_layout Subsection
3034 Table memory
3035 \end_layout
3037 \begin_layout Standard
3038 Contains various functions for managing memory
3039 \end_layout
3041 \begin_layout Subsubsection
3042 memory.vma_count()
3043 \end_layout
3045 \begin_layout Standard
3046 Returns the number of VMAs
3047 \end_layout
3049 \begin_layout Subsubsection
3050 memory.read_vma(number index)
3051 \end_layout
3053 \begin_layout Standard
3054 Reads the specified VMA (indices start from zero).
3055  Trying to read invalid VMA gives nil.
3056  The read VMA is table with the following fields:
3057 \end_layout
3059 \begin_layout Itemize
3060 region_name (string): The readable name of the VMA
3061 \end_layout
3063 \begin_layout Itemize
3064 baseaddr (number): Base address of the VMA
3065 \end_layout
3067 \begin_layout Itemize
3068 lastaddr (number): Last address in the VMA.
3069 \end_layout
3071 \begin_layout Itemize
3072 size (number): The size of VMA in bytes.
3073 \end_layout
3075 \begin_layout Itemize
3076 readonly (boolean): True of the VMA corresponds to ROM.
3077 \end_layout
3079 \begin_layout Itemize
3080 iospace (boolean): True if the VMA is I/O space.
3081 \end_layout
3083 \begin_layout Itemize
3084 native_endian (boolean): True if the VMA has native endian as opposed to
3085  little endian.
3086 \end_layout
3088 \begin_layout Subsubsection
3089 memory.find_vma(number address)
3090 \end_layout
3092 \begin_layout Standard
3093 Finds the VMA containing specified address.
3094  Returns table in the same format as read_vma or nil if not found.
3095 \end_layout
3097 \begin_layout Subsubsection
3098 memory.readbyte(number address)
3099 \end_layout
3101 \begin_layout Standard
3102 Reads the specified address as unsigned byte and returns the result.
3103 \end_layout
3105 \begin_layout Subsubsection
3106 memory.readsbyte(number address)
3107 \end_layout
3109 \begin_layout Standard
3110 Reads the specified address as signed byte and returns the result.
3111 \end_layout
3113 \begin_layout Subsubsection
3114 memory.writebyte(number address, number value)
3115 \end_layout
3117 \begin_layout Standard
3118 Writes the specified value (negative values undergo 2's complement) to specified
3119  address (as a byte).
3120 \end_layout
3122 \begin_layout Subsubsection
3123 memory.readword(number address)
3124 \end_layout
3126 \begin_layout Standard
3127 Reads the specified address as unsigned word and returns the result.
3128 \end_layout
3130 \begin_layout Subsubsection
3131 memory.readsword(number address)
3132 \end_layout
3134 \begin_layout Standard
3135 Reads the specified address as signed word and returns the result.
3136 \end_layout
3138 \begin_layout Subsubsection
3139 memory.writeword(number address, number value)
3140 \end_layout
3142 \begin_layout Standard
3143 Writes the specified value (negative values undergo 2's complement) to specified
3144  address (as a word).
3145 \end_layout
3147 \begin_layout Subsubsection
3148 memory.readdword(number address)
3149 \end_layout
3151 \begin_layout Standard
3152 Reads the specified address as unsigned doubleword and returns the result.
3153 \end_layout
3155 \begin_layout Subsubsection
3156 memory.readsdword(number address)
3157 \end_layout
3159 \begin_layout Standard
3160 Reads the specified address as signed doubleword and returns the result.
3161 \end_layout
3163 \begin_layout Subsubsection
3164 memory.writedword(number address, number value)
3165 \end_layout
3167 \begin_layout Standard
3168 Writes the specified value (negative values undergo 2's complement) to specified
3169  address (as a doubleword).
3170 \end_layout
3172 \begin_layout Subsubsection
3173 memory.readqword(number address)
3174 \end_layout
3176 \begin_layout Standard
3177 Reads the specified address as unsigned quadword and returns the result.
3178 \end_layout
3180 \begin_layout Subsubsection
3181 memory.readsqword(number address)
3182 \end_layout
3184 \begin_layout Standard
3185 Reads the specified address as signed quadword and returns the result.
3186 \end_layout
3188 \begin_layout Subsubsection
3189 memory.writeqword(number address, number value)
3190 \end_layout
3192 \begin_layout Standard
3193 Writes the specified value (negative values undergo 2's complement) to specified
3194  address (as a quadword).
3195 \end_layout
3197 \begin_layout Subsubsection
3198 memory.hash_region(number base, number size)
3199 \end_layout
3201 \begin_layout Standard
3202 Hash specified number of bytes starting from specified address and return
3203  the SHA-256.
3204 \end_layout
3206 \begin_layout Subsection
3207 Table _SYSTEM
3208 \end_layout
3210 \begin_layout Standard
3211 Contains copy of global variables from time of Lua initialization.
3212  Non-writeable.
3213 \end_layout
3215 \begin_layout Subsection
3216 Callbacks
3217 \end_layout
3219 \begin_layout Standard
3220 Various callbacks to Lua that can occur.
3221 \end_layout
3223 \begin_layout Subsubsection
3224 Callback: on_paint(bool not_synth)
3225 \end_layout
3227 \begin_layout Standard
3228 Called when screen is being painted.
3229  Any gui.* calls requiring graphic context draw on the screen.
3230 \end_layout
3232 \begin_layout Standard
3233 not_synth is true if this hook is being called in response to received frame,
3234  false otherwise.
3235 \end_layout
3237 \begin_layout Subsubsection
3238 Callback: on_video()
3239 \end_layout
3241 \begin_layout Standard
3242 Called when video dump frame is being painted.
3243  Any gui.* calls requiring graphic context draw on the video.
3244 \end_layout
3246 \begin_layout Subsubsection
3247 Callback: on_frame_emulated()
3248 \end_layout
3250 \begin_layout Standard
3251 Called when emulating frame has completed and on_paint()/on_video() calls
3252  are about to be issued.
3253 \end_layout
3255 \begin_layout Subsubsection
3256 Callback: on_frame()
3257 \end_layout
3259 \begin_layout Standard
3260 Called on each starting whole frame.
3261 \end_layout
3263 \begin_layout Subsubsection
3264 Callback: on_startup()
3265 \end_layout
3267 \begin_layout Standard
3268 Called when the emulator is starting (lsnes.rc and --run files has been run).
3269 \end_layout
3271 \begin_layout Subsubsection
3272 Callback: on_rewind()
3273 \end_layout
3275 \begin_layout Standard
3276 Called when rewind movie to beginning has completed.
3277 \end_layout
3279 \begin_layout Subsubsection
3280 Callback: on_pre_load(string name)
3281 \end_layout
3283 \begin_layout Standard
3284 Called just before savestate/movie load occurs (note: loads are always delayed,
3285  so this occurs even when load was initiated by lua).
3286 \end_layout
3288 \begin_layout Subsubsection
3289 Callback: on_err_load(string name)
3290 \end_layout
3292 \begin_layout Standard
3293 Called if loadstate goes wrong.
3294 \end_layout
3296 \begin_layout Subsubsection
3297 Callback: on_post_load(string name, boolean was_savestate)
3298 \end_layout
3300 \begin_layout Standard
3301 Called on successful loadstate.
3302  was_savestate gives if this was a savestate or a movie.
3303 \end_layout
3305 \begin_layout Subsubsection
3306 Callback: on_pre_save(string name, boolean is_savestate)
3307 \end_layout
3309 \begin_layout Standard
3310 Called just before savestate save occurs (note: movie saves are synchronous
3311  and won't trigger these callbacks if called from Lua).
3312 \end_layout
3314 \begin_layout Subsubsection
3315 Callback: on_err_save(string name)
3316 \end_layout
3318 \begin_layout Standard
3319 Called if savestate goes wrong.
3320 \end_layout
3322 \begin_layout Subsubsection
3323 Callback: on_post_save(string name, boolean is_savestate)
3324 \end_layout
3326 \begin_layout Standard
3327 Called on successful savaestate.
3328  is_savestate gives if this was a savestate or a movie.
3329 \end_layout
3331 \begin_layout Subsubsection
3332 Callback: on_quit()
3333 \end_layout
3335 \begin_layout Standard
3336 Called when emulator is shutting down.
3337 \end_layout
3339 \begin_layout Subsubsection
3340 Callback: on_input(boolean subframe)
3341 \end_layout
3343 \begin_layout Standard
3344 Called when emulator is just sending input to bsnes core.
3345  Warning: This is called even in readonly mode, but the results are ignored.
3346 \end_layout
3348 \begin_layout Subsubsection
3349 Callback: on_reset()
3350 \end_layout
3352 \begin_layout Standard
3353 Called when SNES is reset.
3354 \end_layout
3356 \begin_layout Subsubsection
3357 Callback: on_readwrite()
3358 \end_layout
3360 \begin_layout Standard
3361 Called when moving into readwrite mode as result of 
3362 \begin_inset Quotes eld
3363 \end_inset
3365 set-rwmode
3366 \begin_inset Quotes erd
3367 \end_inset
3369  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3370  entry protection).
3371 \end_layout
3373 \begin_layout Subsubsection
3374 Callback: on_snoop(number port, number controller, number index, number
3375  value)
3376 \end_layout
3378 \begin_layout Standard
3379 Called each time bsnes asks for input.
3380  The value is the final value to be sent to bsnes core (readonly mode, autohold
3381  and autofire have been taken into account).
3382  Might be useful when translating movies to format suitable for console
3383  verification.
3384  Note: There is no way to modify the value to be sent.
3385 \end_layout
3387 \begin_layout Subsubsection
3388 Callback: on_keyhook(string keyname, table state)
3389 \end_layout
3391 \begin_layout Standard
3392 Sent when key that has keyhook events requested changes state.
3393  Keyname is name of the key (group) and state is the state (same kind as
3394  table values in input.raw).
3395 \end_layout
3397 \begin_layout Subsubsection
3398 Callback: on_idle()
3399 \end_layout
3401 \begin_layout Standard
3402 Called when requested by set_idle_timeout(), the timeout has expired and
3403  emulator is waiting.
3404 \end_layout
3406 \begin_layout Subsubsection
3407 Callback: on_timer()
3408 \end_layout
3410 \begin_layout Standard
3411 Called when requested by set_idle_timeout() and the timeout has expired
3412  (regardless if emulator is waiting).
3413 \end_layout
3415 \begin_layout Subsubsection
3416 Callback: on_set_rewind(UNSAFEREWIND r)
3417 \end_layout
3419 \begin_layout Standard
3420 Called when unsafe rewind object has been constructed.
3421 \end_layout
3423 \begin_layout Subsubsection
3424 Callback: on_pre_rewind() 
3425 \end_layout
3427 \begin_layout Standard
3428 Called just before unsafe rewind is about to occur.
3429 \end_layout
3431 \begin_layout Subsubsection
3432 Callback: on_post_rewind() 
3433 \end_layout
3435 \begin_layout Standard
3436 Called just after unsafe rewind has occured.
3437 \end_layout
3439 \begin_layout Section
3440 Memory watch expression syntax
3441 \end_layout
3443 \begin_layout Standard
3444 Memory watch expressions are in RPN (Reverse Polish Notation).
3445  At the end of expression, the top entry on stack is taken as the final
3446  result.
3447 \end_layout
3449 \begin_layout Standard
3450 Notations:
3451 \end_layout
3453 \begin_layout Itemize
3454 Evaluation order is strictly left to right.
3455 \end_layout
3457 \begin_layout Itemize
3458 a is the entry on top of stack
3459 \end_layout
3461 \begin_layout Itemize
3462 b is the entry immediately below top of stack
3463 \end_layout
3465 \begin_layout Itemize
3466 ; separates values to be pushed (no intermediate pop).
3467 \end_layout
3469 \begin_layout Itemize
3470 After end of element, all used stack slots are popped and all results are
3471  pushed.
3472 \end_layout
3474 \begin_layout Itemize
3475 When pushing multiple values, the pushes occur in order shown.
3476 \end_layout
3478 \begin_layout Standard
3479 The following operators are available:
3480 \end_layout
3482 \begin_layout Itemize
3483 + : a + b
3484 \end_layout
3486 \begin_layout Itemize
3487 - : a - b
3488 \end_layout
3490 \begin_layout Itemize
3491 * : a * b
3492 \end_layout
3494 \begin_layout Itemize
3495 / : a / b
3496 \end_layout
3498 \begin_layout Itemize
3499 % : a % b
3500 \end_layout
3502 \begin_layout Itemize
3503 a : atan(a)
3504 \end_layout
3506 \begin_layout Itemize
3507 b : read_signed_byte(a)
3508 \end_layout
3510 \begin_layout Itemize
3511 c : cos(a)
3512 \end_layout
3514 \begin_layout Itemize
3515 d : read_signed_dword(a)
3516 \end_layout
3518 \begin_layout Itemize
3519 i : quotent(a / b)
3520 \end_layout
3522 \begin_layout Itemize
3523 p :
3524 \begin_inset Formula $\pi$
3525 \end_inset
3528 \end_layout
3530 \begin_layout Itemize
3531 q : read_signed_qword(a)
3532 \end_layout
3534 \begin_layout Itemize
3535 r : sqrt(a)
3536 \end_layout
3538 \begin_layout Itemize
3539 s : sin(a)
3540 \end_layout
3542 \begin_layout Itemize
3543 t : tan(a)
3544 \end_layout
3546 \begin_layout Itemize
3547 u : a; a
3548 \end_layout
3550 \begin_layout Itemize
3551 w : read_signed_word(a)
3552 \end_layout
3554 \begin_layout Itemize
3555 A : atan2(a, b)
3556 \end_layout
3558 \begin_layout Itemize
3559 B : read_unsigned_byte(a)
3560 \end_layout
3562 \begin_layout Itemize
3563 C<number>z : Push number <number> to stack.
3564 \end_layout
3566 \begin_layout Itemize
3567 D : read_unsigned_dword(a)
3568 \end_layout
3570 \begin_layout Itemize
3571 C0x<number>z : Push number <number> (hexadecimal) to stack.
3572 \end_layout
3574 \begin_layout Itemize
3575 Q : read_unsigned_qword(a)
3576 \end_layout
3578 \begin_layout Itemize
3579 R<digit> : round a to <digit> digits.
3580 \end_layout
3582 \begin_layout Itemize
3583 W : read_unsigned_word(a)
3584 \end_layout
3586 \begin_layout Subsection
3587 Example:
3588 \end_layout
3590 \begin_layout Standard
3591 C0x007e0878zWC0x007e002czW-
3592 \end_layout
3594 \begin_layout Enumerate
3595 Push value 0x7e0878 on top of stack (C0x007e0878z).
3596 \end_layout
3598 \begin_layout Enumerate
3599 Pop the value on top of stack (0x7e0878), read word value at that address
3600  and push the result,call it x1 (W).
3601 \end_layout
3603 \begin_layout Enumerate
3604 Push value 0x7e002c on top of stack (C0x007e002cz).
3605 \end_layout
3607 \begin_layout Enumerate
3608 Pop the value on top of stack (0x7e002c), read word value at that address
3609  and push the result,call it x2 (W).
3610 \end_layout
3612 \begin_layout Enumerate
3613 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3614  x2 - x1 (-).
3615 \end_layout
3617 \begin_layout Enumerate
3618 Since the expression ends, the final memory watch result is the top one
3619  on stack, which is x2 - x1.
3620 \end_layout
3622 \begin_layout Section
3623 Modifier and key names:
3624 \end_layout
3626 \begin_layout Subsection
3627 SDL Platform
3628 \end_layout
3630 \begin_layout Subsubsection
3631 Modifier names
3632 \end_layout
3634 \begin_layout Standard
3635 Following modifier names are known:
3636 \end_layout
3638 \begin_layout Itemize
3639 ctrl, lctrl, rctrl: Control keys
3640 \end_layout
3642 \begin_layout Itemize
3643 alt, lalt, ralt: ALT keys.
3644 \end_layout
3646 \begin_layout Itemize
3647 shift, lshift, rshift: Shift keys.
3648 \end_layout
3650 \begin_layout Itemize
3651 meta, lmeta, rmeta: Meta keys.
3652 \end_layout
3654 \begin_layout Itemize
3655 num, caps: Numlock/Capslock (these are sticky!)
3656 \end_layout
3658 \begin_layout Itemize
3659 mode: Mode select.
3660 \end_layout
3662 \begin_layout Subsubsection
3663 Key names
3664 \end_layout
3666 \begin_layout Standard
3667 Following key names are known:
3668 \end_layout
3670 \begin_layout Itemize
3671 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3672  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3673  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3674  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3675  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3676  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3677  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3678  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3679  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3680  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3681  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3682  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3683  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3684  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3685  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3686  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3687  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3688  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3689  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3690  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3691  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3692  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3693  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3694  break, menu, power, euro, undo
3695 \end_layout
3697 \begin_layout Itemize
3698 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3699  hardware-dependent scan code of <n> (useful to bind those keys that don't
3700  have symbolic names).
3701 \end_layout
3703 \begin_layout Subsubsection
3704 Joystick pseudo-keys:
3705 \end_layout
3707 \begin_layout Itemize
3708 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3709 \end_layout
3711 \begin_layout Itemize
3712 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3713 \end_layout
3715 \begin_layout Itemize
3716 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3717 \end_layout
3719 \begin_layout Itemize
3720 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3721 \end_layout
3723 \begin_layout Itemize
3724 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3725 \end_layout
3727 \begin_layout Itemize
3728 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3729  position (axis modes axis and axis_inverse).
3730 \end_layout
3732 \begin_layout Itemize
3733 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3734  position (axis modes axis and axis_inverse).
3735 \end_layout
3737 \begin_layout Itemize
3738 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3739  modes pressure_*).
3740 \end_layout
3742 \begin_layout Subsubsection
3743 Special buttons:
3744 \end_layout
3746 \begin_layout Itemize
3747 Escape: Enter/Exit Command mode, cancel modal dialogs.
3748 \end_layout
3750 \begin_layout Itemize
3751 Return (also KPEnter): Execute command, ok modal dialog.
3752 \end_layout
3754 \begin_layout Itemize
3755 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3756  in command history
3757 \end_layout
3759 \begin_layout Itemize
3760 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3761  in command history
3762 \end_layout
3764 \begin_layout Itemize
3765 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3766 \end_layout
3768 \begin_layout Itemize
3769 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3770 \end_layout
3772 \begin_layout Itemize
3773 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3774 \end_layout
3776 \begin_layout Itemize
3777 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3778 \end_layout
3780 \begin_layout Itemize
3781 Delete (also KP.
3782  if no num lock; command mode): Delete character to right of cursor.
3783 \end_layout
3785 \begin_layout Itemize
3786 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3787  overwrite modes.
3788 \end_layout
3790 \begin_layout Itemize
3791 Backspace (command mode): Delete character to left of cursor.
3792 \end_layout
3794 \begin_layout Itemize
3795 CTRL+LEFT (also ALT+B; command mode): Previous word.
3796 \end_layout
3798 \begin_layout Itemize
3799 CTRL+RIGHT (also ALT+F; command mode): Next word.
3800 \end_layout
3802 \begin_layout Itemize
3803 ALT+D (also CTRL+W; command mode): Delete word.
3804 \end_layout
3806 \begin_layout Itemize
3807 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3808 \end_layout
3810 \begin_layout Subsection
3811 wxWidgets platform
3812 \end_layout
3814 \begin_layout Subsubsection
3815 Modifier names:
3816 \end_layout
3818 \begin_layout Standard
3819 Following modifier names are known:
3820 \end_layout
3822 \begin_layout Itemize
3824 \end_layout
3826 \begin_layout Itemize
3827 ctrl
3828 \end_layout
3830 \begin_layout Itemize
3831 shift 
3832 \end_layout
3834 \begin_layout Itemize
3835 meta
3836 \end_layout
3838 \begin_layout Itemize
3839 cmd (Mac OS X only)
3840 \end_layout
3842 \begin_layout Subsubsection
3843 Key names:
3844 \end_layout
3846 \begin_layout Standard
3847 Following key names are known:
3848 \end_layout
3850 \begin_layout Itemize
3851 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3852  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3853  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3854  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3855  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3856  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3857  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3858  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3859  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3860  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3861  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3862  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3863  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3864  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3865  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3866  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3867  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3868  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3869  windows_right, windows_menu, command, special1, special2, special3, special4,
3870  special5, special6, special7, special8, special9, special10, special11,
3871  special12, special13, special14, special15, special16, special17, special18,
3872  special19, special20
3873 \end_layout
3875 \begin_layout Section
3876 Movie file format
3877 \end_layout
3879 \begin_layout Standard
3880 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3881  (note: If you recompress it, do not use compression methods other than
3882  store and deflate and especially do not use encryption of any kind).
3883 \end_layout
3885 \begin_layout Subsection
3886 Detecting clean start/SRAM/Savestate
3887 \end_layout
3889 \begin_layout Itemize
3890 If file has member 
3891 \begin_inset Quotes eld
3892 \end_inset
3894 savestate
3895 \begin_inset Quotes erd
3896 \end_inset
3898  it is savestate, otherwise:
3899 \end_layout
3901 \begin_layout Itemize
3902 If file has members with names starting 
3903 \begin_inset Quotes eld
3904 \end_inset
3906 moviesram.
3907 \begin_inset Quotes erd
3908 \end_inset
3910  it is movie starting from SRAM, otherwise:
3911 \end_layout
3913 \begin_layout Itemize
3914 It is movie starting from clear state.
3915 \end_layout
3917 \begin_layout Subsection
3918 Member: gametype
3919 \end_layout
3921 \begin_layout Standard
3922 Type of game ROM and region (as one line).
3923  Valid values are:
3924 \end_layout
3926 \begin_layout Standard
3927 \begin_inset Tabular
3928 <lyxtabular version="3" rows="8" columns="3">
3929 <features tabularvalignment="middle">
3930 <column alignment="center" valignment="top" width="0">
3931 <column alignment="center" valignment="top" width="0">
3932 <column alignment="center" valignment="top" width="0">
3933 <row>
3934 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3935 \begin_inset Text
3937 \begin_layout Plain Layout
3938 Value
3939 \end_layout
3941 \end_inset
3942 </cell>
3943 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3944 \begin_inset Text
3946 \begin_layout Plain Layout
3947 System
3948 \end_layout
3950 \end_inset
3951 </cell>
3952 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3953 \begin_inset Text
3955 \begin_layout Plain Layout
3956 Region
3957 \end_layout
3959 \end_inset
3960 </cell>
3961 </row>
3962 <row>
3963 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3964 \begin_inset Text
3966 \begin_layout Plain Layout
3967 snes_pal
3968 \end_layout
3970 \end_inset
3971 </cell>
3972 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3973 \begin_inset Text
3975 \begin_layout Plain Layout
3976 Super NES
3977 \end_layout
3979 \end_inset
3980 </cell>
3981 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3982 \begin_inset Text
3984 \begin_layout Plain Layout
3986 \end_layout
3988 \end_inset
3989 </cell>
3990 </row>
3991 <row>
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3993 \begin_inset Text
3995 \begin_layout Plain Layout
3996 sgb_pal
3997 \end_layout
3999 \end_inset
4000 </cell>
4001 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4002 \begin_inset Text
4004 \begin_layout Plain Layout
4005 Super Game Boy
4006 \end_layout
4008 \end_inset
4009 </cell>
4010 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4011 \begin_inset Text
4013 \begin_layout Plain Layout
4015 \end_layout
4017 \end_inset
4018 </cell>
4019 </row>
4020 <row>
4021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4022 \begin_inset Text
4024 \begin_layout Plain Layout
4025 snes_ntsc
4026 \end_layout
4028 \end_inset
4029 </cell>
4030 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4031 \begin_inset Text
4033 \begin_layout Plain Layout
4034 Super NES
4035 \end_layout
4037 \end_inset
4038 </cell>
4039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4040 \begin_inset Text
4042 \begin_layout Plain Layout
4043 NTSC
4044 \end_layout
4046 \end_inset
4047 </cell>
4048 </row>
4049 <row>
4050 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4051 \begin_inset Text
4053 \begin_layout Plain Layout
4054 sgb_ntsc
4055 \end_layout
4057 \end_inset
4058 </cell>
4059 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4060 \begin_inset Text
4062 \begin_layout Plain Layout
4063 Super Game Boy
4064 \end_layout
4066 \end_inset
4067 </cell>
4068 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4069 \begin_inset Text
4071 \begin_layout Plain Layout
4072 NTSC
4073 \end_layout
4075 \end_inset
4076 </cell>
4077 </row>
4078 <row>
4079 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4080 \begin_inset Text
4082 \begin_layout Plain Layout
4084 \end_layout
4086 \end_inset
4087 </cell>
4088 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4089 \begin_inset Text
4091 \begin_layout Plain Layout
4092 BS-X (non-slotted)
4093 \end_layout
4095 \end_inset
4096 </cell>
4097 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4098 \begin_inset Text
4100 \begin_layout Plain Layout
4101 NTSC
4102 \end_layout
4104 \end_inset
4105 </cell>
4106 </row>
4107 <row>
4108 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4109 \begin_inset Text
4111 \begin_layout Plain Layout
4112 bsxslotted
4113 \end_layout
4115 \end_inset
4116 </cell>
4117 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4118 \begin_inset Text
4120 \begin_layout Plain Layout
4121 BS-X (slotted)
4122 \end_layout
4124 \end_inset
4125 </cell>
4126 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4127 \begin_inset Text
4129 \begin_layout Plain Layout
4130 NTSC
4131 \end_layout
4133 \end_inset
4134 </cell>
4135 </row>
4136 <row>
4137 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4138 \begin_inset Text
4140 \begin_layout Plain Layout
4141 sufamiturbo
4142 \end_layout
4144 \end_inset
4145 </cell>
4146 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4147 \begin_inset Text
4149 \begin_layout Plain Layout
4150 Sufami Turbo
4151 \end_layout
4153 \end_inset
4154 </cell>
4155 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4156 \begin_inset Text
4158 \begin_layout Plain Layout
4159 NTSC
4160 \end_layout
4162 \end_inset
4163 </cell>
4164 </row>
4165 </lyxtabular>
4167 \end_inset
4170 \end_layout
4172 \begin_layout Standard
4173 Frame rates are:
4174 \end_layout
4176 \begin_layout Standard
4177 \begin_inset Tabular
4178 <lyxtabular version="3" rows="3" columns="2">
4179 <features tabularvalignment="middle">
4180 <column alignment="center" valignment="top" width="0">
4181 <column alignment="center" valignment="top" width="0">
4182 <row>
4183 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4184 \begin_inset Text
4186 \begin_layout Plain Layout
4187 Region
4188 \end_layout
4190 \end_inset
4191 </cell>
4192 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4193 \begin_inset Text
4195 \begin_layout Plain Layout
4196 Framerate (fps)
4197 \end_layout
4199 \end_inset
4200 </cell>
4201 </row>
4202 <row>
4203 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4204 \begin_inset Text
4206 \begin_layout Plain Layout
4208 \end_layout
4210 \end_inset
4211 </cell>
4212 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4213 \begin_inset Text
4215 \begin_layout Plain Layout
4216 322445/6448
4217 \end_layout
4219 \end_inset
4220 </cell>
4221 </row>
4222 <row>
4223 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4224 \begin_inset Text
4226 \begin_layout Plain Layout
4227 NTSC
4228 \end_layout
4230 \end_inset
4231 </cell>
4232 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4233 \begin_inset Text
4235 \begin_layout Plain Layout
4236 10738636/178683
4237 \end_layout
4239 \end_inset
4240 </cell>
4241 </row>
4242 </lyxtabular>
4244 \end_inset
4247 \end_layout
4249 \begin_layout Subsection
4250 Member: port1
4251 \end_layout
4253 \begin_layout Standard
4254 Contains type of port #1 (as one line).
4255  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4256  If not present, defaults to 'gamepad'.
4257 \end_layout
4259 \begin_layout Subsection
4260 Member: port2
4261 \end_layout
4263 \begin_layout Standard
4264 Contains type of port #2 (as one line).
4265  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4266  'justifier' and 'justifiers'.
4267  If not present, defaults to 'none'.
4268 \end_layout
4270 \begin_layout Subsection
4271 Member: gamename
4272 \end_layout
4274 \begin_layout Standard
4275 Contains name of the game (as one line).
4276 \end_layout
4278 \begin_layout Subsection
4279 Member: authors
4280 \end_layout
4282 \begin_layout Standard
4283 Contains authors, one per line.
4284  Part before '|' is the full name, part after is the nickname.
4285 \end_layout
4287 \begin_layout Subsection
4288 Member: systemid
4289 \end_layout
4291 \begin_layout Standard
4292 Always 
4293 \begin_inset Quotes eld
4294 \end_inset
4296 lsnes-rr1
4297 \begin_inset Quotes erd
4298 \end_inset
4300  (one line).
4301  Used to reject other saves.
4302 \end_layout
4304 \begin_layout Subsection
4305 Member: controlsversion
4306 \end_layout
4308 \begin_layout Standard
4309 Always 
4310 \begin_inset Quotes eld
4311 \end_inset
4314 \begin_inset Quotes erd
4315 \end_inset
4317  (one line).
4318  Used to identify what controls are there.
4319 \end_layout
4321 \begin_layout Subsection
4322 Member: 
4323 \begin_inset Quotes eld
4324 \end_inset
4326 coreversion
4327 \begin_inset Quotes erd
4328 \end_inset
4331 \end_layout
4333 \begin_layout Standard
4334 Contains bsnes core version number (as one line).
4335 \end_layout
4337 \begin_layout Subsection
4338 Member: projectid
4339 \end_layout
4341 \begin_layout Standard
4342 Contains project ID (as one line).
4343  Used to identify if two movies are part of the same project.
4344 \end_layout
4346 \begin_layout Subsection
4347 Member: {rom,slota,slotb}{,xml}.sha256
4348 \end_layout
4350 \begin_layout Standard
4351 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4352  Absent if corresponding file is absent.
4353 \end_layout
4355 \begin_layout Subsection
4356 Member: moviesram.<name>
4357 \end_layout
4359 \begin_layout Standard
4360 Raw binary startup SRAM of kind <name>.
4361  Only present in savestates and movies starting from SRAM.
4362 \end_layout
4364 \begin_layout Subsection
4365 Member: saveframe
4366 \end_layout
4368 \begin_layout Standard
4369 Contains frame number (as one line) of frame movie was saved on.
4370  Only present in savestates.
4371 \end_layout
4373 \begin_layout Subsection
4374 Member: lagcounter
4375 \end_layout
4377 \begin_layout Standard
4378 Current value of lag counter (as one line).
4379  Only present in savestates.
4380 \end_layout
4382 \begin_layout Subsection
4383 Member: pollcounters
4384 \end_layout
4386 \begin_layout Standard
4387 Contains poll counters (currently 100 of them), one per line.
4388  Each line is raw poll count if DRDY is set for it.
4389  Otherwise it is negative poll count minus one.
4390  Only present in savestates.
4391 \end_layout
4393 \begin_layout Subsection
4394 Member: hostmemory
4395 \end_layout
4397 \begin_layout Standard
4398 Raw binary dump of host memory.
4399  Only present in savestates.
4400 \end_layout
4402 \begin_layout Subsection
4403 Member: savestate
4404 \end_layout
4406 \begin_layout Standard
4407 The raw binary savestate itself.
4408  Savestate detection uses this file, only present in savestates.
4409 \end_layout
4411 \begin_layout Subsection
4412 Member: screenshot
4413 \end_layout
4415 \begin_layout Standard
4416 Screenshot of current frame.
4417  Only present in savestates.
4418  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4419  data.
4420  Height of image is inferred from the width and size of data.
4421 \end_layout
4423 \begin_layout Subsection
4424 Member: sram.<name>
4425 \end_layout
4427 \begin_layout Standard
4428 Raw binary SRAM of kind <name> at time of savestate.
4429  Only present in savestates.
4430 \end_layout
4432 \begin_layout Subsection
4433 Member: input
4434 \end_layout
4436 \begin_layout Standard
4437 The actual input track, one line per subframe (blank lines are skipped).
4438 \end_layout
4440 \begin_layout Itemize
4441 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4442  part of same frame as previous, otherwise it starts a new frame.
4443 \end_layout
4445 \begin_layout Itemize
4446 First subframe must start a new frame.
4447 \end_layout
4449 \begin_layout Standard
4450 Length of movie in frames is number of lines in input file that start a
4451  new frame.
4452 \end_layout
4454 \begin_layout Subsection
4455 Member: subtitles
4456 \end_layout
4458 \begin_layout Standard
4459 Subtitle track.
4460  Optional.
4461 \end_layout
4463 \begin_layout Itemize
4464 Each line is in form <firstframe> <numframes> <text>.
4465 \end_layout
4467 \begin_layout Itemize
4468 Linefeed is encoded as 
4469 \backslash
4470 n, backslash is encoded as 
4471 \backslash
4473 \backslash
4475 \end_layout
4477 \begin_layout Subsection
4478 Member: rerecords
4479 \end_layout
4481 \begin_layout Standard
4482 Contains textual base-10 rerecord count (as one line; emulator just writes
4483  this, it doesn't read it) + 1.
4484 \end_layout
4486 \begin_layout Subsection
4487 Member: rrdata
4488 \end_layout
4490 \begin_layout Standard
4491 This member stores set of load IDs.
4492  There is one load ID per rerecord (plus one corresponding to start of project).
4493 \end_layout
4495 \begin_layout Itemize
4496 This member constists of concatenation of records
4497 \end_layout
4499 \begin_layout Itemize
4500 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4501  IDs.
4502 \end_layout
4504 \begin_layout Itemize
4505 IDs are interpretted as 256-bit big-endian integers with warparound.
4506 \end_layout
4508 \begin_layout Itemize
4509 Initial predicted ID is all zeroes.
4510 \end_layout
4512 \begin_layout Standard
4513 Format of each record is:
4514 \end_layout
4516 \begin_layout Itemize
4517 1 byte: Opcode byte.
4518  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4519  Bit 7 is unused.
4520 \end_layout
4522 \begin_layout Itemize
4523 32-prefixlen bytes of ID.
4524 \end_layout
4526 \begin_layout Itemize
4527 countlen bytes of big-endian count (count).
4528 \end_layout
4530 \begin_layout Standard
4531 Records are processed as follows:
4532 \end_layout
4534 \begin_layout Itemize
4535 To form the first ID encoded by record, take the first prefixlen bytes predicted
4536  ID and append the read ID value to it.
4537  The result is the first ID encoded.
4538 \end_layout
4540 \begin_layout Itemize
4541 If countlen is 0, record encodes 1 ID.
4542 \end_layout
4544 \begin_layout Itemize
4545 If countlen is 1, record encodes 2+count IDs.
4546 \end_layout
4548 \begin_layout Itemize
4549 If countlen is 2, record encodes 258+count IDs.
4550 \end_layout
4552 \begin_layout Itemize
4553 If countlen is 3, record encodes 65794+count IDs.
4554 \end_layout
4556 \begin_layout Itemize
4557 The new predicted ID is the next ID after last one encoded by the record.
4558 \end_layout
4560 \begin_layout Standard
4561 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4562  by all records.
4563 \end_layout
4565 \begin_layout Subsection
4566 Member: starttime.second
4567 \end_layout
4569 \begin_layout Standard
4570 Movie starting time, second part.
4571  Epoch is Unix epoch.
4572  Default is 1,000,000,000.
4573 \end_layout
4575 \begin_layout Subsection
4576 Member: starttime.subsecond
4577 \end_layout
4579 \begin_layout Standard
4580 Movie starting time, subsecond part.
4581  Unit is CPU clocks.
4582  Default is 0.
4583 \end_layout
4585 \begin_layout Subsection
4586 Member: savetime.second
4587 \end_layout
4589 \begin_layout Standard
4590 Movie saving time, second part.
4591  Default is starttime.second.
4592  Only present in savestates.
4593 \end_layout
4595 \begin_layout Subsection
4596 Member: savetime.subsecond
4597 \end_layout
4599 \begin_layout Standard
4600 Movie saving time, subsecond part.
4601  Default is starttime.subsecond.
4602  Only present in savestates.
4603 \end_layout
4605 \begin_layout Section
4606 Known ROM extensions
4607 \end_layout
4609 \begin_layout Itemize
4610 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
4611 \end_layout
4613 \begin_layout Itemize
4614 DMG cartridge ROMs: dmg, gb.
4615 \end_layout
4617 \begin_layout Itemize
4618 GBC cartridge ROMs: cgb, gbc.
4619 \end_layout
4621 \begin_layout Section
4622 Gamepack files
4623 \end_layout
4625 \begin_layout Itemize
4626 The first line must be: 
4627 \begin_inset Quotes eld
4628 \end_inset
4630 [GAMEPACK FILE]
4631 \begin_inset Quotes erd
4632 \end_inset
4635 \end_layout
4637 \begin_layout Itemize
4638 There is one needed line: 
4639 \begin_inset Quotes eld
4640 \end_inset
4642 type <systype>
4643 \begin_inset Quotes erd
4644 \end_inset
4647  This sets system type to <systype>.
4648  The following system types are valid:
4649 \end_layout
4651 \begin_deeper
4652 \begin_layout Itemize
4653 snes (SNES)
4654 \end_layout
4656 \begin_layout Itemize
4657 bsx (BS-X non-slotted)
4658 \end_layout
4660 \begin_layout Itemize
4661 bsxslotted (BS-X slotted)
4662 \end_layout
4664 \begin_layout Itemize
4665 sufamiturbo (Sufami Turbo)
4666 \end_layout
4668 \begin_layout Itemize
4669 sgb (Super Game Boy)
4670 \end_layout
4672 \begin_layout Itemize
4673 dmg (Game Boy)
4674 \end_layout
4676 \begin_layout Itemize
4677 gbc (Game Boy Color)
4678 \end_layout
4680 \begin_layout Itemize
4681 gbc_gba (Game Boy Color with GBA initial register values)
4682 \end_layout
4684 \end_deeper
4685 \begin_layout Itemize
4686 Optionally a region can be specified: 
4687 \begin_inset Quotes eld
4688 \end_inset
4690 region <region>
4691 \begin_inset Quotes erd
4692 \end_inset
4695  The following values are valid:
4696 \end_layout
4698 \begin_deeper
4699 \begin_layout Itemize
4700 autodetect (Autodetect region: snes and sgb only)
4701 \end_layout
4703 \begin_layout Itemize
4704 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
4705 \end_layout
4707 \begin_layout Itemize
4708 pal (PAL: snes, sgb)
4709 \end_layout
4711 \begin_layout Itemize
4712 world (World: dmg, gbc, gbc_gba)
4713 \end_layout
4715 \end_deeper
4716 \begin_layout Itemize
4717 ROM images are loaded as: 
4718 \begin_inset Quotes eld
4719 \end_inset
4721 rom <type> <file>
4722 \begin_inset Quotes erd
4723 \end_inset
4726  The following types are valid:
4727 \end_layout
4729 \begin_deeper
4730 \begin_layout Itemize
4731 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
4732  BIOS in bsx, bsxslotted, sufamiturbo)
4733 \end_layout
4735 \begin_layout Itemize
4736 bsx (Cartridge ROM in bsx, bsxslotted)
4737 \end_layout
4739 \begin_layout Itemize
4740 slot-a (Cartridge ROM in sufamiturbo)
4741 \end_layout
4743 \begin_layout Itemize
4744 slot-b (Cartridge ROM in sufamiturbo)
4745 \end_layout
4747 \end_deeper
4748 \begin_layout Itemize
4749 ROM markup can be loaded as: 
4750 \begin_inset Quotes eld
4751 \end_inset
4753 xml <type> <file>
4754 \begin_inset Quotes erd
4755 \end_inset
4758  The types valid are the same as for ROMs.
4759 \end_layout
4761 \begin_layout Itemize
4762 Patches can be loaded as 
4763 \begin_inset Quotes eld
4764 \end_inset
4766 patch[<offset>] <type> <file>
4767 \begin_inset Quotes erd
4768 \end_inset
4771  The types are the same as for ROMs.
4772 \end_layout
4774 \begin_deeper
4775 \begin_layout Itemize
4776 Offset is given in form [+-]<number>.
4777  Usually offset is either +0 or -512.
4778 \end_layout
4780 \begin_layout Itemize
4781 Default offset is +0.
4782 \end_layout
4784 \end_deeper
4785 \begin_layout Subsection
4786 Example:
4787 \end_layout
4789 \begin_layout LyX-Code
4790 [GAMEPACK FILE]
4791 \end_layout
4793 \begin_layout LyX-Code
4794 type snes
4795 \end_layout
4797 \begin_layout LyX-Code
4798 rom rom speedygonzales.sfc
4799 \end_layout
4801 \begin_layout LyX-Code
4802 patch-512 rom sonicthehedgehog.ips
4803 \end_layout
4805 \begin_layout Subsection
4806 Example 2:
4807 \end_layout
4809 \begin_layout LyX-Code
4810 [GAMEPACK FILE]
4811 \end_layout
4813 \begin_layout LyX-Code
4814 type sgb
4815 \end_layout
4817 \begin_layout LyX-Code
4818 rom rom supergameboy.sfc
4819 \end_layout
4821 \begin_layout LyX-Code
4822 rom dmg megamanV.dmg
4823 \end_layout
4825 \begin_layout Section
4826 Quick'n'dirty encode guide
4827 \end_layout
4829 \begin_layout Enumerate
4830 Start the emulator and load the ROM and movie file.
4831 \end_layout
4833 \begin_layout Enumerate
4834 Set large AVI option 'set-setting avi-large on'
4835 \end_layout
4837 \begin_layout Enumerate
4838 Enable dumping 'dump-avi tmpdump' 
4839 \end_layout
4841 \begin_layout Enumerate
4842 Unpause and let it run until you want to end dumping.
4843 \end_layout
4845 \begin_layout Enumerate
4846 Close the emulator (closing the window is the easiest way).
4847  Or use 'end-avi'.
4848 \end_layout
4850 \begin_layout Enumerate
4851 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4852  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4853 \end_layout
4855 \begin_layout Enumerate
4856 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4857 \end_layout
4859 \begin_layout Enumerate
4860 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4861  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4862 \end_layout
4864 \begin_layout Enumerate
4865 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4866  Now final.mkv contains quick'n'dirty encode.
4867 \end_layout
4869 \begin_layout Section
4870 Axis configurations for some gamepad types:
4871 \end_layout
4873 \begin_layout Subsection
4874 XBox360 controller:
4875 \end_layout
4877 \begin_layout Standard
4878 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4879 \end_layout
4881 \begin_layout LyX-Code
4882 set-axis joystick0axis2 pressure-+
4883 \end_layout
4885 \begin_layout LyX-Code
4886 set-axis joystick0axis5 pressure-+
4887 \end_layout
4889 \begin_layout Itemize
4890 This is needed for SDL only.
4891  EVDEV sets those types correctly.
4892 \end_layout
4894 \begin_layout Subsection
4895 PS3 
4896 \begin_inset Quotes eld
4897 \end_inset
4899 sixaxis
4900 \begin_inset Quotes erd
4901 \end_inset
4903  controller:
4904 \end_layout
4906 \begin_layout Standard
4907 Axes 8-19 should be disabled.
4908 \end_layout
4910 \begin_layout LyX-Code
4911 set-axis joystick0axis8 disabled
4912 \end_layout
4914 \begin_layout LyX-Code
4915 set-axis joystick0axis9 disabled
4916 \end_layout
4918 \begin_layout LyX-Code
4919 set-axis joystick0axis10 disabled
4920 \end_layout
4922 \begin_layout LyX-Code
4923 set-axis joystick0axis11 disabled
4924 \end_layout
4926 \begin_layout LyX-Code
4927 set-axis joystick0axis12 disabled
4928 \end_layout
4930 \begin_layout LyX-Code
4931 set-axis joystick0axis13 disabled
4932 \end_layout
4934 \begin_layout LyX-Code
4935 set-axis joystick0axis14 disabled
4936 \end_layout
4938 \begin_layout LyX-Code
4939 set-axis joystick0axis15 disabled
4940 \end_layout
4942 \begin_layout LyX-Code
4943 set-axis joystick0axis16 disabled
4944 \end_layout
4946 \begin_layout LyX-Code
4947 set-axis joystick0axis17 disabled
4948 \end_layout
4950 \begin_layout LyX-Code
4951 set-axis joystick0axis18 disabled
4952 \end_layout
4954 \begin_layout LyX-Code
4955 set-axis joystick0axis19 disabled
4956 \end_layout
4958 \begin_layout Section
4959 Errata:
4960 \end_layout
4962 \begin_layout Subsection
4963 Problems from BSNES core:
4964 \end_layout
4966 \begin_layout Itemize
4967 The whole pending save stuff.
4968 \end_layout
4970 \begin_layout Itemize
4971 Lack of layer hiding.
4972 \end_layout
4974 \begin_layout Itemize
4975 It is slow (especially accuracy).
4976 \end_layout
4978 \begin_layout Itemize
4979 Firmwares can't be loaded from ZIP archives.
4980 \end_layout
4982 \begin_layout Subsection
4983 Other problems:
4984 \end_layout
4986 \begin_layout Itemize
4987 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4988 \end_layout
4990 \begin_layout Itemize
4991 Audio for last dumped frame is not itself dumped.
4992 \end_layout
4994 \begin_layout Itemize
4995 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4996 \end_layout
4998 \begin_layout Itemize
4999 No menus, command based interface (SDL).
5000 \end_layout
5002 \begin_layout Itemize
5003 Long commands don't scroll.
5004 \end_layout
5006 \begin_layout Section
5007 Changelog:
5008 \end_layout
5010 \begin_layout Subsection
5011 rr0-beta1
5012 \end_layout
5014 \begin_layout Itemize
5015 Fix -Wall warnings
5016 \end_layout
5018 \begin_layout Itemize
5019 Fix dumper video corruption with levels 10-18.
5020 \end_layout
5022 \begin_layout Subsection
5023 rr0-beta2
5024 \end_layout
5026 \begin_layout Itemize
5027 Autofire
5028 \end_layout
5030 \begin_layout Itemize
5031 Lots of code cleanups
5032 \end_layout
5034 \begin_layout Itemize
5035 Lua interface to settings
5036 \end_layout
5038 \begin_layout Itemize
5039 Allow specifying AVI borders without Lua
5040 \end_layout
5042 \begin_layout Itemize
5043 Fix scaling if vscale > 1 and originx > 0 (left border exists)
5044 \end_layout
5046 \begin_layout Itemize
5047 on_snoop lua callback
5048 \end_layout
5050 \begin_layout Itemize
5051 Faster movie loading and saving.
5052 \end_layout
5054 \begin_layout Subsection
5055 rr0-beta3
5056 \end_layout
5058 \begin_layout Itemize
5059 Joystick support
5060 \end_layout
5062 \begin_layout Subsection
5063 rr0-beta4
5064 \end_layout
5066 \begin_layout Itemize
5067 Fix multi-buttons
5068 \end_layout
5070 \begin_layout Itemize
5071 Save jukebox functionality.
5072 \end_layout
5074 \begin_layout Subsection
5075 rr0-beta5
5076 \end_layout
5078 \begin_layout Itemize
5079 Try to fix some nasty failing movie load edge cases
5080 \end_layout
5082 \begin_layout Itemize
5083 Allow specifying scripts to run on command line.
5084 \end_layout
5086 \begin_layout Subsection
5087 rr0-beta6
5088 \end_layout
5090 \begin_layout Itemize
5091 Major source code reorganization.
5092 \end_layout
5094 \begin_layout Itemize
5095 Backup savestates before overwriting.
5096 \end_layout
5098 \begin_layout Itemize
5099 Don't crash if loading initial state fails.
5100 \end_layout
5102 \begin_layout Subsection
5103 rr0-beta7
5104 \end_layout
5106 \begin_layout Itemize
5107 Fix firmware lookup
5108 \end_layout
5110 \begin_layout Itemize
5111 Fix author name parsing
5112 \end_layout
5114 \begin_layout Itemize
5115 Fix rerecord counting
5116 \end_layout
5118 \begin_layout Itemize
5119 (SDL) Print messages to console if SDL is uninitialized
5120 \end_layout
5122 \begin_layout Itemize
5123 Add movieinfo program
5124 \end_layout
5126 \begin_layout Itemize
5127 Fix loading movies starting from SRAM.
5128 \end_layout
5130 \begin_layout Subsection
5131 rr0-beta8
5132 \end_layout
5134 \begin_layout Itemize
5135 Add support for unattended dumping
5136 \end_layout
5138 \begin_layout Itemize
5139 Fix compiling for Win32
5140 \end_layout
5142 \begin_layout Itemize
5143 Don't lock up if sound can't be initialized
5144 \end_layout
5146 \begin_layout Itemize
5147 Strip trailing CR from commands
5148 \end_layout
5150 \begin_layout Itemize
5151 Don't try to do dubious things in global ctors (fix crash on startup)
5152 \end_layout
5154 \begin_layout Subsection
5155 rr0-beta9
5156 \end_layout
5158 \begin_layout Itemize
5159 Small documentation tweaking
5160 \end_layout
5162 \begin_layout Itemize
5163 Fix make clean
5164 \end_layout
5166 \begin_layout Itemize
5167 Fix major bug in modifier matching
5168 \end_layout
5170 \begin_layout Subsection
5171 rr0-beta10
5172 \end_layout
5174 \begin_layout Itemize
5175 Lots of documentation fixes
5176 \end_layout
5178 \begin_layout Itemize
5179 Use dedicated callbacks for event backcomm., not commands.
5180 \end_layout
5182 \begin_layout Itemize
5183 Ensure that the watchdog is not hit when executing delayed reset.
5184 \end_layout
5186 \begin_layout Itemize
5187 Remove errant tab from joystick message.
5188 \end_layout
5190 \begin_layout Subsection
5191 rr0-beta11
5192 \end_layout
5194 \begin_layout Itemize
5195 Make autofire operate in absolute time, not linear time
5196 \end_layout
5198 \begin_layout Itemize
5199 Reinitialize controls when resuming from loadstate
5200 \end_layout
5202 \begin_layout Itemize
5203 Some more code cleanups
5204 \end_layout
5206 \begin_layout Itemize
5207 If Lua allocator fails, call OOM_panic()
5208 \end_layout
5210 \begin_layout Itemize
5211 Byte/word/dword/qword sized host memory write/read functions.
5212 \end_layout
5214 \begin_layout Itemize
5215 Dump at correct framerate if dumping interlaced NTSC (height=448).
5216 \end_layout
5218 \begin_layout Subsection
5219 rr0-beta12
5220 \end_layout
5222 \begin_layout Itemize
5223 Actually include the complete source code
5224 \end_layout
5226 \begin_layout Itemize
5227 Keep track of RTC
5228 \end_layout
5230 \begin_layout Subsection
5231 rr0-beta13
5232 \end_layout
5234 \begin_layout Itemize
5235 Document {save,start}time.{,sub}second.
5236 \end_layout
5238 \begin_layout Itemize
5239 Intercept time() from bsnes core.
5240 \end_layout
5242 \begin_layout Subsection
5243 rr0-beta14
5244 \end_layout
5246 \begin_layout Itemize
5247 Allow disabling time() interception (allow build on Mac OS X)
5248 \end_layout
5250 \begin_layout Itemize
5251 Use SDLMain on Mac OS X (make SDL not crash)
5252 \end_layout
5254 \begin_layout Itemize
5255 Disable delayed resets (just plain too buggy for now).
5256 \end_layout
5258 \begin_layout Itemize
5259 Code cleanups
5260 \end_layout
5262 \begin_layout Itemize
5263 Use 16-bit for graphics/video instead of 32-bit.
5264 \end_layout
5266 \begin_layout Itemize
5267 gui.rectangle/gui.pixel
5268 \end_layout
5270 \begin_layout Itemize
5271 gui.crosshair
5272 \end_layout
5274 \begin_layout Itemize
5275 New CSCD writer implementation.
5276 \end_layout
5278 \begin_layout Subsection
5279 rr0-beta15
5280 \end_layout
5282 \begin_layout Itemize
5283 Fix interaction of * and +.
5284 \end_layout
5286 \begin_layout Itemize
5287 Manual improvements
5288 \end_layout
5290 \begin_layout Itemize
5291 Use gettimeofday()/usleep(), these seem portable enough.
5292 \end_layout
5294 \begin_layout Itemize
5295 Move joystick axis manipulation to keymapper code.
5296 \end_layout
5298 \begin_layout Itemize
5299 Changes to how read-only works.
5300 \end_layout
5302 \begin_layout Itemize
5303 Refactor controller input code.
5304 \end_layout
5306 \begin_layout Subsection
5307 rr0-beta16
5308 \end_layout
5310 \begin_layout Itemize
5311 Fix mouseclick scale compensation.
5312 \end_layout
5314 \begin_layout Itemize
5315 Draw area boundaries correctly in SDL code.
5316 \end_layout
5318 \begin_layout Itemize
5319 gui.screenshot.
5320 \end_layout
5322 \begin_layout Itemize
5323 Fix CSCD output (buffer overrun and race condition).
5324 \end_layout
5326 \begin_layout Subsection
5327 rr0-beta17
5328 \end_layout
5330 \begin_layout Itemize
5331 JMD dumping support.
5332 \end_layout
5334 \begin_layout Itemize
5335 Allow unattended dumping to JMD.
5336 \end_layout
5338 \begin_layout Itemize
5339 Move to BSNES v083.
5340 \end_layout
5342 \begin_layout Itemize
5343 Switch back to 32-bit colors.
5344 \end_layout
5346 \begin_layout Itemize
5347 Add Lua function gui.color.
5348 \end_layout
5350 \begin_layout Itemize
5351 Use some new C++11 features in GCC 4.6.
5352 \end_layout
5354 \begin_layout Itemize
5355 Be prepared for core frequency changes.
5356 \end_layout
5358 \begin_layout Itemize
5359 Pass colors in one chunk from Lua.
5360 \end_layout
5362 \begin_layout Subsection
5363 rr0-beta18
5364 \end_layout
5366 \begin_layout Itemize
5367 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5368  memory.read_vma() and memory.find_vma().
5369 \end_layout
5371 \begin_layout Itemize
5372 Numerious documentation fixups
5373 \end_layout
5375 \begin_layout Itemize
5376 RTC time format changed
5377 \end_layout
5379 \begin_layout Itemize
5380 Reformat flags display
5381 \end_layout
5383 \begin_layout Itemize
5384 Allow lua package name to be overridden
5385 \end_layout
5387 \begin_layout Itemize
5388 SDUMP (high-quality dumping).
5389 \end_layout
5391 \begin_layout Itemize
5392 Split platform support to plugins.
5393 \end_layout
5395 \begin_layout Itemize
5396 Make all sound plugins support basic sound commands
5397 \end_layout
5399 \begin_layout Itemize
5400 Support portaudio for sound.
5401 \end_layout
5403 \begin_layout Itemize
5404 Allow disable Lua/SDL searching.
5405 \end_layout
5407 \begin_layout Itemize
5408 Upconvert colors when copying lcscreen to screen.
5409 \end_layout
5411 \begin_layout Itemize
5412 Reorganize source tree.
5413 \end_layout
5415 \begin_layout Itemize
5416 Evdev joystick support.
5417 \end_layout
5419 \begin_layout Itemize
5420 Refactor more code into generic window code.
5421 \end_layout
5423 \begin_layout Subsection
5424 rr0-beta19
5425 \end_layout
5427 \begin_layout Itemize
5428 Refactor message handling.
5429 \end_layout
5431 \begin_layout Itemize
5432 Rework makefile
5433 \end_layout
5435 \begin_layout Itemize
5436 Documentation fixes
5437 \end_layout
5439 \begin_layout Itemize
5440 Finish pending saves before load/quit.
5441 \end_layout
5443 \begin_layout Itemize
5444 Wxwidgets graphics plugin.
5445 \end_layout
5447 \begin_layout Subsection
5448 rr0-beta20
5449 \end_layout
5451 \begin_layout Itemize
5452 Get rid of win32-crap.[ch]pp.
5453 \end_layout
5455 \begin_layout Itemize
5456 Move files around a lot.
5457 \end_layout
5459 \begin_layout Itemize
5460 Get rid of need for host C++ compiler.
5461 \end_layout
5463 \begin_layout Itemize
5464 Bsnes v084 core.
5465 \end_layout
5467 \begin_layout Itemize
5468 Refactor inter-component communication.
5469 \end_layout
5471 \begin_layout Itemize
5472 Fix zero luma.
5473 \end_layout
5475 \begin_layout Itemize
5476 Fix crash on multiline aliases.
5477 \end_layout
5479 \begin_layout Itemize
5480 Load/Save settings in wxwidgets gui.
5481 \end_layout
5483 \begin_layout Subsection
5484 rr0-beta21
5485 \end_layout
5487 \begin_layout Itemize
5488 Patch problems in bsnes core
5489 \end_layout
5491 \begin_layout Itemize
5492 SNES is little-endian, not big-endian!
5493 \end_layout
5495 \begin_layout Itemize
5496 Fix memory corruption in lcscreen::load()
5497 \end_layout
5499 \begin_layout Subsection
5500 rr0-beta22
5501 \end_layout
5503 \begin_layout Itemize
5504 Fix interpretting repeat counts in rrdata loading.
5505 \end_layout
5507 \begin_layout Itemize
5508 New lua callback: on_frame()
5509 \end_layout
5511 \begin_layout Itemize
5512 Remove calls to runtosave() that aren't supposed to be there
5513 \end_layout
5515 \begin_layout Itemize
5516 Lua function: movie.read_rtc()
5517 \end_layout
5519 \begin_layout Itemize
5520 Ignore src/fonts/font.cpp
5521 \end_layout
5523 \begin_layout Itemize
5524 Fix more bsnes core problems
5525 \end_layout
5527 \begin_layout Itemize
5528 Control bsnes random seeding
5529 \end_layout
5531 \begin_layout Itemize
5532 Pause-on-end
5533 \end_layout
5535 \begin_layout Itemize
5536 Some bsnes core debugging features (state dump and state hash)
5537 \end_layout
5539 \begin_layout Itemize
5540 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5541  it was 'lsnes rr0-beta21').
5542 \end_layout
5544 \begin_layout Subsection
5545 rr0-beta23
5546 \end_layout
5548 \begin_layout Itemize
5549 Fix memory corruption due to macro/field mixup
5550 \end_layout
5552 \begin_layout Itemize
5553 search-memory update
5554 \end_layout
5556 \begin_layout Itemize
5557 Allow direct-mapped framebuffer
5558 \end_layout
5560 \begin_layout Itemize
5561 SDL: Use SDL_ANYFORMAT if possible
5562 \end_layout
5564 \begin_layout Itemize
5565 SDMP2SOX: 2s delay modes.
5566 \end_layout
5568 \begin_layout Itemize
5569 Wxwidgets: Cleanups
5570 \end_layout
5572 \begin_layout Itemize
5573 Use sed -E, not sed -r.
5574  Fixes building on Mac OS X.
5575 \end_layout
5577 \begin_layout Itemize
5578 Wxwidgets: Save jukebox on exit
5579 \end_layout
5581 \begin_layout Itemize
5582 Fix RTC if using load-movie on savestate.
5583 \end_layout
5585 \begin_layout Itemize
5586 Fix crash related to full console mode.
5587 \end_layout
5589 \begin_layout Subsection
5590 rr0-beta24
5591 \end_layout
5593 \begin_layout Itemize
5594 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5595 \end_layout
5597 \begin_layout Itemize
5598 Wxwidgets: Allow compiling on Mac OS X.
5599 \end_layout
5601 \begin_layout Itemize
5602 Use movie compare instead of movie hashing (faster save/load).
5603 \end_layout
5605 \begin_layout Itemize
5606 Lua: _SYSTEM table.
5607 \end_layout
5609 \begin_layout Subsection
5610 rr0-beta25
5611 \end_layout
5613 \begin_layout Itemize
5614 sdmp2sox: Pad soundtrack if using -l or -L.
5615 \end_layout
5617 \begin_layout Itemize
5618 sdmp2sox: Fix NTSC overscan.
5619 \end_layout
5621 \begin_layout Itemize
5622 sdmp2sox: Add AR correction mode.
5623 \end_layout
5625 \begin_layout Itemize
5626 call lua_close() when exiting.
5627 \end_layout
5629 \begin_layout Itemize
5630 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5631 \end_layout
5633 \begin_layout Subsection
5634 rr0-beta26
5635 \end_layout
5637 \begin_layout Itemize
5638 Fix IPS patching code (use bsnes core IPS patcher).
5639 \end_layout
5641 \begin_layout Itemize
5642 Implement BPS patching (using bsnes core IPS patcher).
5643 \end_layout
5645 \begin_layout Itemize
5646 Add feature to load headered ROMs.
5647 \end_layout
5649 \begin_layout Subsection
5650 rr0-beta27
5651 \end_layout
5653 \begin_layout Itemize
5654 Show command names when showing keybindings
5655 \end_layout
5657 \begin_layout Subsection
5659 \end_layout
5661 \begin_layout Itemize
5662 Fix pause-on-end to be actually controllable
5663 \end_layout
5665 \begin_layout Itemize
5666 SDL: Poll all events in queue, not just first one (fixes slowness in command
5667  typing)
5668 \end_layout
5670 \begin_layout Itemize
5671 Wxwidgets: Fix ROM loading.
5672 \end_layout
5674 \begin_layout Subsection
5675 rr1-beta0
5676 \end_layout
5678 \begin_layout Itemize
5679 Lua: Add gui.textH, gui.textV, gui.textHV
5680 \end_layout
5682 \begin_layout Itemize
5683 Fix text colors on SDL on Mac OS X
5684 \end_layout
5686 \begin_layout Itemize
5687 Mode 'F' for finished in readonly mode.
5688 \end_layout
5690 \begin_layout Itemize
5691 Fix some WS errors.
5692 \end_layout
5694 \begin_layout Itemize
5695 Reliably pause after skip poll
5696 \end_layout
5698 \begin_layout Itemize
5699 Split UI and core into their own threads
5700 \end_layout
5702 \begin_layout Subsection
5703 rr1-beta1
5704 \end_layout
5706 \begin_layout Itemize
5707 Remove leftover dummy SRAM slot
5708 \end_layout
5710 \begin_layout Itemize
5711 Fix controller numbers.
5712 \end_layout
5714 \begin_layout Subsection
5715 rr1-beta2
5716 \end_layout
5718 \begin_layout Itemize
5719 Fix lsnes-dumpavi after interface change.
5720 \end_layout
5722 \begin_layout Itemize
5723 Also give BSNES patches for v085.
5724 \end_layout
5726 \begin_layout Itemize
5727 Pack movie data in memory.
5728 \end_layout
5730 \begin_layout Subsection
5731 rr1-beta3
5732 \end_layout
5734 \begin_layout Itemize
5735 Fix framecount/length given when loading movies.
5736 \end_layout
5738 \begin_layout Itemize
5739 Controller command memory leak fixes.
5740 \end_layout
5742 \begin_layout Itemize
5743 Don't leak palette if freeing screen object.
5744 \end_layout
5746 \begin_layout Subsection
5747 rr1-beta4
5748 \end_layout
5750 \begin_layout Itemize
5751 Detect revisions.
5752 \end_layout
5754 \begin_layout Itemize
5755 Wxwidgets: Allow controlling dumper from the menu.
5756 \end_layout
5758 \begin_layout Subsection
5759 rr1-beta5
5760 \end_layout
5762 \begin_layout Itemize
5763 Rewrite parts of manual
5764 \end_layout
5766 \begin_layout Itemize
5767 Lua: Make it work with Lua 5.2.
5768 \end_layout
5770 \begin_layout Subsection
5771 rr1-beta6
5772 \end_layout
5774 \begin_layout Itemize
5775 Win32: Fix compile errors.
5776 \end_layout
5778 \begin_layout Subsection
5779 rr1-beta7
5780 \end_layout
5782 \begin_layout Itemize
5783 Refactor controller input code.
5784 \end_layout
5786 \begin_layout Itemize
5787 Fix crash when using command line on SDL / Mac OS X.
5788 \end_layout
5790 \begin_layout Subsection
5791 rr1-beta8
5792 \end_layout
5794 \begin_layout Itemize
5795 Delete core/coroutine (obsolete)
5796 \end_layout
5798 \begin_layout Itemize
5799 Lag input display by one frame.
5800 \end_layout
5802 \begin_layout Itemize
5803 Rewind movie to beginning function.
5804 \end_layout
5806 \begin_layout Itemize
5807 Fix wrong frame number reported to Lua when repainting after loadstate
5808 \end_layout
5810 \begin_layout Itemize
5811 Support UI editing of jukebox
5812 \end_layout
5814 \begin_layout Itemize
5815 Wxwidgets: Save settings on exit.
5816 \end_layout
5818 \begin_layout Itemize
5819 Support ${project} for filenames
5820 \end_layout
5822 \begin_layout Itemize
5823 SDL: Fix command history
5824 \end_layout
5826 \begin_layout Subsection
5827 rr1-beta9
5828 \end_layout
5830 \begin_layout Itemize
5831 Fix some order-of-global-ctor bugs.
5832 \end_layout
5834 \begin_layout Subsection
5835 rr1-beta10
5836 \end_layout
5838 \begin_layout Itemize
5839 Fix crashes when quitting on Win32.
5840 \end_layout
5842 \begin_layout Subsection
5843 rr1-beta11
5844 \end_layout
5846 \begin_layout Itemize
5847 EVDEV: Queue keypresses from joystick, don't send directly
5848 \end_layout
5850 \begin_layout Itemize
5851 Wxwidgets: Load-Preserve that actually works.
5852 \end_layout
5854 \begin_layout Subsection
5855 rr1-beta12
5856 \end_layout
5858 \begin_layout Itemize
5859 Wxwidgets: GUI for memory search.
5860 \end_layout
5862 \begin_layout Itemize
5863 Warn about using synchronous queue in UI callback.
5864 \end_layout
5866 \begin_layout Subsection
5867 rr1-beta13
5868 \end_layout
5870 \begin_layout Itemize
5871 Remember last saved file for each ROM
5872 \end_layout
5874 \begin_layout Itemize
5875 Support MT dumping via boost.
5876 \end_layout
5878 \begin_layout Itemize
5879 Lua: input.raw
5880 \end_layout
5882 \begin_layout Itemize
5883 Lua: input.keyhook
5884 \end_layout
5886 \begin_layout Itemize
5887 Make mouse be ordinary input instead of special-casing
5888 \end_layout
5890 \begin_layout Itemize
5891 SDL: Don't screw up commands with NUL codepoints.
5892 \end_layout
5894 \begin_layout Subsection
5895 rr1-beta14
5896 \end_layout
5898 \begin_layout Itemize
5899 Merge status panel and main window
5900 \end_layout
5902 \begin_layout Itemize
5903 True movie slot support (the rest of it)
5904 \end_layout
5906 \begin_layout Itemize
5907 SDL: Fix compilation error
5908 \end_layout
5910 \begin_layout Itemize
5911 Elminate cross calls in dump menu code.
5912 \end_layout
5914 \begin_layout Subsection
5915 rr1-beta15
5916 \end_layout
5918 \begin_layout Itemize
5919 Cancel pending saves command
5920 \end_layout
5922 \begin_layout Itemize
5923 Wxwidgets: Code refactoring
5924 \end_layout
5926 \begin_layout Itemize
5927 Wxwidgets: Fix system -> reset
5928 \end_layout
5930 \begin_layout Itemize
5931 Wxwidgets: Read watch expressions in the right thread
5932 \end_layout
5934 \begin_layout Subsection
5935 rr1-beta16
5936 \end_layout
5938 \begin_layout Itemize
5939 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5940  support that).
5941 \end_layout
5943 \begin_layout Itemize
5944 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5945 \end_layout
5947 \begin_layout Itemize
5948 Don't append trailing '-' to prefix when saving movie.
5949 \end_layout
5951 \begin_layout Itemize
5952 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5953 \end_layout
5955 \begin_layout Subsection
5957 \end_layout
5959 \begin_layout Itemize
5960 Document memory watch syntax.
5961 \end_layout
5963 \begin_layout Subsection
5964 rr1-delta1
5965 \end_layout
5967 \begin_layout Itemize
5968 Fix unattended dumping (lsnes-dumpavi)
5969 \end_layout
5971 \begin_layout Itemize
5972 Support RAW dumping
5973 \end_layout
5975 \begin_layout Itemize
5976 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5977 \end_layout
5979 \begin_layout Itemize
5980 Add option to control sample rate preturbation in AVI dumper
5981 \end_layout
5983 \begin_layout Subsection
5984 rr1-delta2
5985 \end_layout
5987 \begin_layout Itemize
5988 Wxwidgets: Fix dumper submodes
5989 \end_layout
5991 \begin_layout Itemize
5992 Set core controller types before loadstate
5993 \end_layout
5995 \begin_layout Subsection
5996 rr1-delta2epsilon1
5997 \end_layout
5999 \begin_layout Itemize
6000 Fix compiling with bsnes v086.
6001 \end_layout
6003 \begin_layout Subsection
6004 rr1-delta3
6005 \end_layout
6007 \begin_layout Itemize
6008 Don't prompt before quitting
6009 \end_layout
6011 \begin_layout Itemize
6012 Start unpaused, preserve pause/unpause over load.
6013 \end_layout
6015 \begin_layout Itemize
6016 Try to autodetect if ROM is headered.
6017 \end_layout
6019 \begin_layout Itemize
6020 Wxwidgets: Only bring up ROM patching screen if specifically requested.
6021 \end_layout
6023 \begin_layout Itemize
6024 Allow configuring some hotkeys.
6025 \end_layout
6027 \begin_layout Subsection
6028 rr1-delta4
6029 \end_layout
6031 \begin_layout Itemize
6032 Lots of code cleanups
6033 \end_layout
6035 \begin_layout Itemize
6036 Fix JMD compression (JMD dumping was broken)
6037 \end_layout
6039 \begin_layout Itemize
6040 Don't crash if Lua C function throws an exception.
6041 \end_layout
6043 \begin_layout Itemize
6044 Support bitmap drawing in Lua.
6045 \end_layout
6047 \begin_layout Itemize
6048 Fix bsnes v085/v086 patches.
6049 \end_layout
6051 \begin_layout Itemize
6052 Improve stability on win32.
6053 \end_layout
6055 \begin_layout Subsection
6056 rr1-delta4epsilon1
6057 \end_layout
6059 \begin_layout Itemize
6060 Don't corrupt movie if movie length is integer multiple of frames per page.
6061 \end_layout
6063 \begin_layout Subsection
6064 rr1-delta5
6065 \end_layout
6067 \begin_layout Itemize
6068 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
6069 \end_layout
6071 \begin_layout Itemize
6072 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
6073 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
6075 \end_layout
6077 \begin_layout Itemize
6078 Wxwidgets: Fix internal focus lost (hotkeys stop working)
6079 \end_layout
6081 \begin_layout Itemize
6082 Wxwidgets: Fix broken modifiers
6083 \end_layout
6085 \begin_layout Itemize
6086 on_paint has parameter now.
6087 \end_layout
6089 \begin_layout Itemize
6090 Optional initital fill for bitmaps
6091 \end_layout
6093 \begin_layout Itemize
6094 Fix palette changing.
6095 \end_layout
6097 \begin_layout Itemize
6098 Optimize rendering a bit.
6099 \end_layout
6101 \begin_layout Itemize
6102 Bsnes v087 support.
6103 \end_layout
6105 \begin_layout Subsection
6106 rr1-delta5epsilon1
6107 \end_layout
6109 \begin_layout Itemize
6110 Movieinfo: Fix display of port #2 type.
6111 \end_layout
6113 \begin_layout Itemize
6114 Call on_input() after loadstate.
6115 \end_layout
6117 \begin_layout Subsection
6118 rr1-delta5epsilon2
6119 \end_layout
6121 \begin_layout Itemize
6122 Fix writing port2 data to movie.
6123 \end_layout
6125 \begin_layout Itemize
6126 Fix SRAM handling with Bsnes v087.
6127 \end_layout
6129 \begin_layout Subsection
6130 rr1-delta6
6131 \end_layout
6133 \begin_layout Itemize
6134 Library loading support
6135 \end_layout
6137 \begin_layout Itemize
6138 Built-in TSCC encoder
6139 \end_layout
6141 \begin_layout Itemize
6142 Hi-color (256T colors) dumping.
6143 \end_layout
6145 \begin_layout Itemize
6146 Dump over TCP/IP(v6)
6147 \end_layout
6149 \begin_layout Itemize
6150 Hidable status panel
6151 \end_layout
6153 \begin_layout Itemize
6154 Turbo toggle/hold
6155 \end_layout
6157 \begin_layout Itemize
6158 Adjustable sound volume
6159 \end_layout
6161 \begin_layout Itemize
6162 Screen scaling
6163 \end_layout
6165 \begin_layout Itemize
6166 Allow DnD into filename boxes
6167 \end_layout
6169 \begin_layout Itemize
6170 Configurable paths
6171 \end_layout
6173 \begin_layout Itemize
6174 Portaudio: Fix speaker popping at start
6175 \end_layout
6177 \begin_layout Itemize
6178 Lots of UI changes
6179 \end_layout
6181 \begin_layout Itemize
6182 Speed adjustment menu
6183 \end_layout
6185 \begin_layout Itemize
6186 Win32 joystick support
6187 \end_layout
6189 \begin_layout Itemize
6190 Lua: gui.rainbow and gui.box
6191 \end_layout
6193 \begin_layout Itemize
6194 Split key lists into classes (the key list was large!)
6195 \end_layout
6197 \begin_layout Itemize
6198 More save slots support
6199 \end_layout
6201 \begin_layout Itemize
6202 Wxwidgets (wxJoystick) joystick support
6203 \end_layout
6205 \begin_layout Subsection
6206 rr1-delta7
6207 \end_layout
6209 \begin_layout Itemize
6210 Lots of internal joystick refactoring
6211 \end_layout
6213 \begin_layout Itemize
6214 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6215 \end_layout
6217 \begin_layout Itemize
6218 Wxwidgets: Settings mode (open settings without ROM)
6219 \end_layout
6221 \begin_layout Itemize
6222 Wxwidgets: Prompt key to use option
6223 \end_layout
6225 \begin_layout Itemize
6226 Wxwidgets: Fix crash if key goes away underneath
6227 \end_layout
6229 \begin_layout Itemize
6230 Wxwidgets: Fix mouse position in presence of scaling
6231 \end_layout
6233 \begin_layout Itemize
6234 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6235 \end_layout
6237 \begin_layout Itemize
6238 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6239  seem to work well on WinXP)
6240 \end_layout
6242 \begin_layout Itemize
6243 Start paused option.
6244 \end_layout
6246 \begin_layout Subsection
6247 rr1-delta7epsilon1
6248 \end_layout
6250 \begin_layout Itemize
6251 AVI: ZMBV support
6252 \end_layout
6254 \begin_layout Itemize
6255 lsnes-dumpavi: Start Lua before starting dumper
6256 \end_layout
6258 \begin_layout Itemize
6259 AVI: Fix secondary audio in mode 4.
6260 \end_layout
6262 \begin_layout Subsection
6263 rr1-delta7epsilon2
6264 \end_layout
6266 \begin_layout Itemize
6267 AVI: Refactor ZMBV a bit.
6268 \end_layout
6270 \begin_layout Itemize
6271 Fix error reading analog values from movie file
6272 \end_layout
6274 \begin_layout Subsection
6275 rr1-delta8
6276 \end_layout
6278 \begin_layout Itemize
6279 Delayed reset support
6280 \end_layout
6282 \begin_layout Itemize
6283 Lua: memory.hash_region
6284 \end_layout
6286 \begin_layout Subsection
6287 rr1-delta8epsilon1
6288 \end_layout
6290 \begin_layout Itemize
6291 Rework the build system
6292 \end_layout
6294 \begin_layout Itemize
6295 Typing input support
6296 \end_layout
6298 \begin_layout Itemize
6299 Fix building with bsnes v086 and v087.
6300 \end_layout
6302 \begin_layout Itemize
6303 SDL: Save settings on exit
6304 \end_layout
6306 \begin_layout Itemize
6307 SDL: Command to enter command line mode with given command.
6308 \end_layout
6310 \begin_layout Itemize
6311 SDL: More advanced command editing.
6312 \end_layout
6314 \begin_layout Subsection
6315 rr1-delta9
6316 \end_layout
6318 \begin_layout Itemize
6319 wxMSW: Fix the 
6320 \begin_inset Quotes eld
6321 \end_inset
6323 arrow keys and enter don't work
6324 \begin_inset Quotes erd
6325 \end_inset
6327  problem
6328 \end_layout
6330 \begin_layout Itemize
6331 MSU-1 support
6332 \end_layout
6334 \begin_layout Itemize
6335 Show mode changes due to rewinding.
6336 \end_layout
6338 \begin_layout Itemize
6339 Unsafe rewind support
6340 \end_layout
6342 \begin_layout Itemize
6343 Fix directory transversal.
6344 \end_layout
6346 \begin_layout Subsection
6347 rr1-delta10
6348 \end_layout
6350 \begin_layout Itemize
6351 AVI: Sound mode 5 (48kHz high-quality)
6352 \end_layout
6354 \begin_layout Itemize
6355 Lua: Reset Lua VM
6356 \end_layout
6358 \begin_layout Itemize
6359 Map the SNES bus into address space
6360 \end_layout
6362 \begin_layout Itemize
6363 Fix loading memory watch files with CRLF line endings
6364 \end_layout
6366 \begin_layout Subsection
6367 rr1-delta10epsilon1
6368 \end_layout
6370 \begin_layout Itemize
6371 Map bsnes internal state into memory space
6372 \end_layout
6374 \begin_layout Itemize
6375 Fix the 
6376 \begin_inset Quotes eld
6377 \end_inset
6379 click on panel wedges the emulator
6380 \begin_inset Quotes erd
6381 \end_inset
6383  for real.
6384 \end_layout
6386 \begin_layout Itemize
6387 DnD movies/saves on the main window.
6388 \end_layout
6390 \begin_layout Subsection
6391 rr1-delta11
6392 \end_layout
6394 \begin_layout Itemize
6395 Split core bindings into own module.
6396 \end_layout
6398 \begin_layout Itemize
6399 Remember invalid settings
6400 \end_layout
6402 \begin_layout Itemize
6403 Support for modified Gambatte core for GB/GBC emulation.
6404 \end_layout
6406 \begin_layout Itemize
6407 Reload/swap ROM function
6408 \end_layout
6410 \begin_layout Subsection
6411 rr1-delta11epsilon1
6412 \end_layout
6414 \begin_layout Itemize
6415 Fix step poll function
6416 \end_layout
6418 \begin_layout Subsection
6419 rr1-delta12
6420 \end_layout
6422 \begin_layout Itemize
6423 Non-insane savestate anchoring
6424 \end_layout
6426 \begin_layout Subsection
6427 rr1-delta13
6428 \end_layout
6430 \begin_layout Itemize
6431 More Memory search methods
6432 \end_layout
6434 \begin_layout Itemize
6435 Preserve movie if loading in RO mode.
6436 \end_layout
6438 \begin_layout Itemize
6439 Fix a obscure case in timeline check
6440 \end_layout
6442 \begin_layout Itemize
6443 Revamp the entiere ROM loading code
6444 \end_layout
6446 \begin_layout Itemize
6447 Support DnD on ROMs
6448 \end_layout
6450 \begin_layout Itemize
6451 Revamp menu layout
6452 \end_layout
6454 \begin_layout Itemize
6455 Standalone hotkey config dialog
6456 \end_layout
6458 \begin_layout Itemize
6459 Show bindings in more user-friendly format
6460 \end_layout
6462 \begin_layout Subsection
6463 rr1-delta13epsilon1
6464 \end_layout
6466 \begin_layout Itemize
6467 Pipedec support
6468 \end_layout
6470 \begin_layout Itemize
6471 Fix uninitialized variables in bsnes v085
6472 \end_layout
6474 \begin_layout Subsection
6475 rr1-delta14
6476 \end_layout
6478 \begin_layout Itemize
6479 Merge gambatte core into mainline (from its own branch)
6480 \end_layout
6482 \begin_layout Itemize
6483 Wxwidgets: Show expected dump file formats
6484 \end_layout
6486 \begin_layout Itemize
6487 Memory watch: Data typing
6488 \end_layout
6490 \begin_layout Itemize
6491 lsnes internal MMIO area.
6492 \end_layout
6494 \begin_layout Itemize
6495 Wxwidgets: New memory watch editor
6496 \end_layout
6498 \begin_layout Itemize
6499 Hexadecimal memory watches
6500 \end_layout
6502 \begin_layout Itemize
6503 Wxwidgets: Monospaced panel
6504 \end_layout
6506 \begin_layout Itemize
6507 Wxwidgets: Split memory watches in panel
6508 \end_layout
6510 \begin_layout Itemize
6511 Wxwidgets: Disable VMAs in memory search
6512 \end_layout
6514 \begin_layout Itemize
6515 lsnes-dumpavi: Fix speed bug
6516 \end_layout
6518 \begin_layout Itemize
6519 Movie subtitle support
6520 \end_layout
6522 \begin_layout Itemize
6523 Fix rerecord count reporting
6524 \end_layout
6526 \begin_layout Itemize
6527 Don't trash movie when loading in readonly mode.
6528 \end_layout
6530 \end_body
6531 \end_document