Try to fix the "key does not change" problem with Win32
[lsnes.git] / manual.lyx
blob7a2f3bc182289bf89174d8abe8ccf15297bbd635
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
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084 or 085
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 6 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 Zlib
94 \end_layout
96 \begin_layout Enumerate
97 boost_iostreams
98 \end_layout
100 \begin_layout Enumerate
101 boost_filesystem
102 \end_layout
104 \begin_layout Enumerate
105 boost_thread
106 \end_layout
108 \begin_layout Enumerate
109 libsdl (SDL only)
110 \end_layout
112 \begin_layout Enumerate
113 sdlmain (SDL only, part of SDL)
114 \end_layout
116 \begin_layout Enumerate
117 boost_conversion (this is header-only library)
118 \end_layout
120 \begin_layout Enumerate
121 libswscale (wxwidgets graphics only)
122 \end_layout
124 \begin_layout Enumerate
125 Portaudio (portaudio sound only)
126 \end_layout
128 \begin_layout Enumerate
129 std::thread and co (for threaded dumper only, not needed if std::thread
130  is available)
131 \end_layout
133 \begin_layout Enumerate
134 Lua (if Lua support is needed).
135 \end_layout
137 \begin_layout Itemize
138 Version 5.1.X or 5.2X.
139 \end_layout
141 \begin_layout Section
142 Building
143 \end_layout
145 \begin_layout Standard
146 Building is via makefile, the following options are available:
147 \end_layout
149 \begin_layout Itemize
150 CROSS_PREFIX=<prefix>
151 \end_layout
153 \begin_deeper
154 \begin_layout Itemize
155 Prefix to apply to commands when building executables / object files for
156  the target architecture.
158 \end_layout
160 \begin_layout Itemize
161 Default is blank.
162 \end_layout
164 \end_deeper
165 \begin_layout Itemize
166 CC=<name>
167 \end_layout
169 \begin_deeper
170 \begin_layout Itemize
171 Name of C++ compiler.
172 \end_layout
174 \begin_layout Itemize
175 CROSS_PREFIX is prepended if compiling for target architecture.
176 \end_layout
178 \begin_layout Itemize
179 This needs to be at least GCC 4.6.
180 \end_layout
182 \begin_layout Itemize
183 Set to 'g++-mp-4.6' if compiling on Mac OS X using GCC 4.6 from Macports.
184 \end_layout
186 \begin_layout Itemize
187 Default is 'g++'.
188 \end_layout
190 \end_deeper
191 \begin_layout Itemize
192 HOSTCC=<name>
193 \end_layout
195 \begin_deeper
196 \begin_layout Itemize
197 Name of host C++ compiler.
198 \end_layout
200 \begin_layout Itemize
201 Default is value of 'CC' option.
202 \end_layout
204 \end_deeper
205 \begin_layout Itemize
206 USER_HOSTCCFLAGS=<flags>:
207 \end_layout
209 \begin_deeper
210 \begin_layout Itemize
211 Compiler flags to pass when compiling/linking for host architecture.
212 \end_layout
214 \begin_layout Itemize
215 Default is blank.
216 \end_layout
218 \end_deeper
219 \begin_layout Itemize
220 USER_CFLAGS=<flags>
221 \end_layout
223 \begin_deeper
224 \begin_layout Itemize
225 Extra flags to pass when compiling for target architecture
226 \end_layout
228 \begin_layout Itemize
229 Default is blank.
230 \end_layout
232 \end_deeper
233 \begin_layout Itemize
234 USER_LDFLAGS=<flags>: 
235 \end_layout
237 \begin_deeper
238 \begin_layout Itemize
239 Extra flags to pass when linking for target architecture.
240 \end_layout
242 \begin_layout Itemize
243 Default is blank.
244 \end_layout
246 \end_deeper
247 \begin_layout Itemize
248 USER_PLATFORM_CFLAGS=<flags>
249 \end_layout
251 \begin_deeper
252 \begin_layout Itemize
253 Extra flags to pass when compiling files using platform-dependent code for
254  target architecture.
255 \end_layout
257 \begin_layout Itemize
258 Default is blank.
259 \end_layout
261 \end_deeper
262 \begin_layout Itemize
263 USER_PLATFORM_LDFLAGS=<flags>
264 \end_layout
266 \begin_deeper
267 \begin_layout Itemize
268 Extra flags to pass when linking files using platform-dependent code for
269  target architecture.
270 \end_layout
272 \begin_layout Itemize
273 Default is blank.
274 \end_layout
276 \end_deeper
277 \begin_layout Itemize
278 FONT_SRC=<file>
279 \end_layout
281 \begin_deeper
282 \begin_layout Itemize
283 Set the font file to use.
284 \end_layout
286 \begin_layout Itemize
287 Currently the valid values are:
288 \end_layout
290 \begin_deeper
291 \begin_layout Itemize
292 cp437.hex: Standard VGA font (256 characters).
293 \end_layout
295 \begin_layout Itemize
296 unifontfull-5.1.20080820.hex: GNU unifont (covers most of Unicode BMP)
297 \end_layout
299 \end_deeper
300 \begin_layout Itemize
301 Default is 'unifontfull-5.1.20080820.hex'
302 \end_layout
304 \end_deeper
305 \begin_layout Itemize
306 LUA=<package>
307 \end_layout
309 \begin_deeper
310 \begin_layout Itemize
311 Package to use for Lua support.
312 \end_layout
314 \begin_layout Itemize
315 Usually valid value is 'lua' or 'lua5.1'.
316 \end_layout
318 \begin_layout Itemize
319 Default is not to build Lua support.
320 \end_layout
322 \end_deeper
323 \begin_layout Itemize
324 THREADS=<value>
325 \end_layout
327 \begin_deeper
328 \begin_layout Itemize
329 Override platform default for dumper threading support.
330 \end_layout
332 \begin_layout Itemize
333 Threading is default on Linux.
334 \end_layout
336 \begin_layout Itemize
337 'YES' tries to use threading (std::thread).
338 \end_layout
340 \begin_layout Itemize
341 'BOOST' tries to use threading (boost::thread).
342 \end_layout
344 \begin_layout Itemize
345 'NO' disables threading.
346 \end_layout
348 \begin_layout Itemize
349 Note: This has absolutely nothing to do with platform threading.
350 \end_layout
352 \end_deeper
353 \begin_layout Itemize
354 BSNES_IS_COMPAT=<anything>
355 \end_layout
357 \begin_deeper
358 \begin_layout Itemize
359 Signals that BSNES core used is compatiblity core, not accuracy core.
360 \end_layout
362 \begin_layout Itemize
363 Default is to assume accuracy core.
364 \end_layout
366 \end_deeper
367 \begin_layout Itemize
368 JOYSTICK=<implementation>
369 \end_layout
371 \begin_deeper
372 \begin_layout Itemize
373 Set joystick implementation.
374  Valid values are:
375 \end_layout
377 \begin_deeper
378 \begin_layout Itemize
379 SDL: Use SDL for joystick (requires SDL graphics)
380 \end_layout
382 \begin_layout Itemize
383 EVDEV: Use EVDEV for joystick (Linux only).
384 \end_layout
386 \begin_layout Itemize
387 DUMMY: Disable joystick support.
388 \end_layout
390 \end_deeper
391 \begin_layout Itemize
392 Default is SDL.
393 \end_layout
395 \end_deeper
396 \begin_layout Itemize
397 SOUND=<implementation>
398 \end_layout
400 \begin_deeper
401 \begin_layout Itemize
402 Set sound implementation.
403  Valid values are:
404 \end_layout
406 \begin_deeper
407 \begin_layout Itemize
408 SDL: Use SDL for sound (requires SDL graphics)
409 \end_layout
411 \begin_layout Itemize
412 PORTAUDIO: Use Portaudio for sound.
413 \end_layout
415 \begin_layout Itemize
416 DUMMY: Disable sound support
417 \end_layout
419 \end_deeper
420 \begin_layout Itemize
421 Default is SDL.
422 \end_layout
424 \end_deeper
425 \begin_layout Itemize
426 GRAPHICS=<implementation>
427 \end_layout
429 \begin_deeper
430 \begin_layout Itemize
431 Set windowing library to use.
432  Valid values are:
433 \end_layout
435 \begin_deeper
436 \begin_layout Itemize
437 SDL: Use SDL for graphics
438 \end_layout
440 \begin_layout Itemize
441 WXWIDGETS: Use wxWidgets for graphics.
442 \end_layout
444 \end_deeper
445 \begin_layout Itemize
446 Default is SDL.
447 \end_layout
449 \end_deeper
450 \begin_layout Section
451 Command line options
452 \end_layout
454 \begin_layout Subsection
455 ROM options
456 \end_layout
458 \begin_layout Standard
459 <kind> in the following can be one of:
460 \end_layout
462 \begin_layout Itemize
463 rom: Cartridge ROM (BIOS for special carts).
464  This is required.
465 \end_layout
467 \begin_layout Itemize
468 bsx: BS-X (non-slotted) Game flash ROM.
469 \end_layout
471 \begin_layout Itemize
472 bsxslotted: BS-X (slotted) Game flash ROM.
473 \end_layout
475 \begin_layout Itemize
476 dmg: DMG game ROM
477 \end_layout
479 \begin_layout Itemize
480 slot-a: Sufami Turbo Slot A ROM
481 \end_layout
483 \begin_layout Itemize
484 slot-b: Sufami Turbo Slot B ROM
485 \end_layout
487 \begin_layout Subsubsection
488 --<kind>=<file> (lsnes/SDL, lsnes-avidump)
489 \end_layout
491 \begin_layout Standard
492 Load <file> as specified ROM (SFC/BS/DMG/ST file format).
493 \end_layout
495 \begin_layout Subsubsection
496 --<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
497 \end_layout
499 \begin_layout Standard
500 Override hardware detection for ROM, reading the values from <file> (BSNES
501  XML format).
502 \end_layout
504 \begin_layout Subsubsection
505 --ips-<kind>=<file> (lsnes/SDL, lsnes-avidump)
506 \end_layout
508 \begin_layout Standard
509 Apply BPS/IPS patch <file> to ROM <kind>.
510  If specified multiple times, the patches are applied in order.
511 \end_layout
513 \begin_layout Subsubsection
514 --ips-<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
515 \end_layout
517 \begin_layout Standard
518 Apply BPS/IPS patch <file> to XML of ROM <kind>.
519  If specified multiple times, the patches are applied in order.
520 \end_layout
522 \begin_layout Subsubsection
523 --ips-offset=<offset> (lsnes/SDL, lsnes-avidump)
524 \end_layout
526 \begin_layout Standard
527 Set offset to apply to IPS patches.
528  May be negative.
529  Handy for applying headered IPS patches (use offset of -512 for this).
530  The offset must be 0 for BPS patches.
531 \end_layout
533 \begin_layout Subsubsection
534 --pal
535 \end_layout
537 \begin_layout Standard
538 Force ROM to be considered PAL-only.
539 \end_layout
541 \begin_layout Itemize
542 Only works on SNES and SGB ROMs (not BS-X or Sufami Turbo).
543 \end_layout
545 \begin_layout Itemize
546 Attempting to load NTSC movie file will error out.
547 \end_layout
549 \begin_layout Subsubsection
550 --ntsc
551 \end_layout
553 \begin_layout Standard
554 Force ROM to be considered NTSC-only.
555 \end_layout
557 \begin_layout Itemize
558 Attempting to load PAL movie file will error out.
559 \end_layout
561 \begin_layout Subsection
562 Session options
563 \end_layout
565 \begin_layout Subsubsection
566 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
567 \end_layout
569 \begin_layout Standard
570 Load <filename> as movie or savestate file.
571  All other session options are ignored.
572 \end_layout
574 \begin_layout Subsubsection
575 --port1=<device> (lsnes/SDL)
576 \end_layout
578 \begin_layout Standard
579 Set type of port1.
580  Valid values are:
581 \end_layout
583 \begin_layout Itemize
584 none: No device connected
585 \end_layout
587 \begin_layout Itemize
588 gamepad: One gamepad (the default)
589 \end_layout
591 \begin_layout Itemize
592 multitap: Four gamepads (warning: makes most games refuse to start)
593 \end_layout
595 \begin_layout Itemize
596 mouse: Mouse.
597 \end_layout
599 \begin_layout Subsubsection
600 --port2=<type> (lsnes/SDL)
601 \end_layout
603 \begin_layout Standard
604 Set type of port2.
605  Valid values are:
606 \end_layout
608 \begin_layout Itemize
609 none: No device connected (the default)
610 \end_layout
612 \begin_layout Itemize
613 gamepad: One gamepad
614 \end_layout
616 \begin_layout Itemize
617 multitap: Four gamepads.
618 \end_layout
620 \begin_layout Itemize
621 mouse: Mouse
622 \end_layout
624 \begin_layout Itemize
625 superscope: Super Scope
626 \end_layout
628 \begin_layout Itemize
629 justifier: One justifier
630 \end_layout
632 \begin_layout Itemize
633 justifiers: Two justifiers
634 \end_layout
636 \begin_layout Subsubsection
637 --gamename=<name> (lsnes/SDL)
638 \end_layout
640 \begin_layout Standard
641 Set the name of game to <name>.
642  Default is blank.
643 \end_layout
645 \begin_layout Subsubsection
646 --author=<name> (lsnes/SDL)
647 \end_layout
649 \begin_layout Standard
650 Add author with full name of <name> (no nickname).
651 \end_layout
653 \begin_layout Subsubsection
654 --author=|<name> (lsnes/SDL)
655 \end_layout
657 \begin_layout Standard
658 Add author with nickname of <name> (no full name).
659 \end_layout
661 \begin_layout Subsubsection
662 --author=<fullname>|<nickname> (lsnes/SDL)
663 \end_layout
665 \begin_layout Standard
666 Add author with full name of <fullname> and nickname of <nickname>.
667 \end_layout
669 \begin_layout Subsubsection
670 --rtc-second=<value> (lsnes/SDL)
671 \end_layout
673 \begin_layout Standard
674 Set RTC second (0 is 1st January 1970 00:00:00Z).
675  Default is 1,000,000,000.
676 \end_layout
678 \begin_layout Subsubsection
679 --rtc-subsecond=<value> (lsnes/SDL)
680 \end_layout
682 \begin_layout Standard
683 Set RTC subsecond.
684  Range is 0-.
685  Unit is CPU cycle.
686  Default is 0.
687 \end_layout
689 \begin_layout Subsection
690 Misc.
691  options:
692 \end_layout
694 \begin_layout Subsubsection
695 --run=<file> (lsnes/SDL)
696 \end_layout
698 \begin_layout Standard
699 After running main RC file, run this file.
700  If multiple are specified, these execute in order specified.
701 \end_layout
703 \begin_layout Subsection
704 dump options (lsnes-dumpavi only)
705 \end_layout
707 \begin_layout Subsubsection
708 --dumper=<dumper>
709 \end_layout
711 \begin_layout Standard
712 Set the dumper to use (required).
713  Use 'list' for listing of known dumpers.
714 \end_layout
716 \begin_layout Subsubsection
717 --mode=<mode>
718 \end_layout
720 \begin_layout Standard
721 Set the mode to use (required for dumpers with multiple modes, forbidden
722  otherwise).
723  Use 'list' for known modes.
724 \end_layout
726 \begin_layout Subsubsection
727 --prefix=<prefix>
728 \end_layout
730 \begin_layout Standard
731 Set dump prefix.
732  Default is 
733 \begin_inset Quotes eld
734 \end_inset
736 avidump
737 \begin_inset Quotes erd
738 \end_inset
741 \end_layout
743 \begin_layout Subsubsection
744 --option=<name>=<value>
745 \end_layout
747 \begin_layout Standard
748 Set option <name> to value <value>.
749 \end_layout
751 \begin_layout Subsubsection
752 --length=<length>
753 \end_layout
755 \begin_layout Standard
756 Set number of frames to dump.
757  Mandatory.
758 \end_layout
760 \begin_layout Subsubsection
761 --lua=<script>
762 \end_layout
764 \begin_layout Standard
765 Run specified lua script (lsnes-dumpavi does not have initialization files).
766 \end_layout
768 \begin_layout Subsubsection
769 --load-library=<library>
770 \end_layout
772 \begin_layout Standard
773 Load the specified shared object / dynamic library / dynamic link library.
774 \end_layout
776 \begin_layout Section
777 Startup file lsnes.rc
778 \end_layout
780 \begin_layout Standard
781 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
782  This file is located in:
783 \end_layout
785 \begin_layout Itemize
786 Windows: %APPDATA%
787 \backslash
788 lsnes
789 \backslash
790 lsnes.rc (if %APPDATA% exists)
791 \end_layout
793 \begin_layout Itemize
794 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
795 \end_layout
797 \begin_layout Itemize
798 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
799 \end_layout
801 \begin_layout Itemize
802 All: ./lsnes.rc (fallback default).
803 \end_layout
805 \begin_layout Standard
806 If leading directories do not exist, attempt to create them is made.
807 \end_layout
809 \begin_layout Section
810 Internal commands
811 \end_layout
813 \begin_layout Itemize
814 Commands beginning with '*' invoke the corresponding command without alias
815  expansion.
816 \end_layout
818 \begin_layout Itemize
819 If command starts with '+' (after possible '*'), the command is executed
820  as-is when button is pressed, and when button is released, it is executed
821  with '+' replaced by '-'.
822 \end_layout
824 \begin_layout Itemize
825 Commands without '+' execute only on negative edge (release).
826 \end_layout
828 \begin_layout Subsection
829 Settings:
830 \end_layout
832 \begin_layout Standard
833 Settings control various aspects of emulator behaviour.
834 \end_layout
836 \begin_layout Subsubsection
837 set-setting <setting> <value>
838 \end_layout
840 \begin_layout Standard
841 Sets setting <setting> to value <value> (may be empty).
842 \end_layout
844 \begin_layout Subsubsection
845 unset-setting <setting>
846 \end_layout
848 \begin_layout Standard
849 Try to unset setting <setting> (not all settings can be unset).
850 \end_layout
852 \begin_layout Subsubsection
853 get-setting <setting>
854 \end_layout
856 \begin_layout Standard
857 Read value of setting <setting>
858 \end_layout
860 \begin_layout Subsubsection
861 show-settings
862 \end_layout
864 \begin_layout Standard
865 Print names and values of all settings.
866 \end_layout
868 \begin_layout Subsection
869 Keybindings
870 \end_layout
872 \begin_layout Standard
873 Keybindings bind commands or aliases to keys (or pseudo-keys).
875 \end_layout
877 \begin_layout Standard
878 Notes:
879 \end_layout
881 \begin_layout Itemize
882 Do not bind edge active (+/-) commands to keys with modifiers, that won't
883  work right!
884 \end_layout
886 \begin_layout Itemize
887 Names of keys and modifiers are platform-dependent.
888 \end_layout
890 \begin_layout Itemize
891 Be careful before binding pseudo-keys (such as joystick axes, buttons or
892  hats) with modifiers.
893  That may or may not work right.
894 \end_layout
896 \begin_layout Subsubsection
897 bind-key [<mod>/<modmask>] <key> <command>
898 \end_layout
900 \begin_layout Standard
901 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
902 ed list) are set as <mod> (comma-seperated list).
903 \end_layout
905 \begin_layout Standard
906 The names of keys and modifiers are platform-dependent.
907 \end_layout
909 \begin_layout Subsubsection
910 unbind-key [<mod>/<modmask>] <key>
911 \end_layout
913 \begin_layout Standard
914 Unbind command from <key> (with specified <mod> and <modmask>).
915 \end_layout
917 \begin_layout Subsubsection
918 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
919  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
920  [plus=<val>] [tolerance=<val>]
921 \end_layout
923 \begin_layout Standard
924 Set axis parameters for axis <axis>.
925 \end_layout
927 \begin_layout Itemize
928 disabled: Disable axis
929 \end_layout
931 \begin_layout Itemize
932 axis: Normal axis
933 \end_layout
935 \begin_layout Itemize
936 axis-inverse: Inverse axis
937 \end_layout
939 \begin_layout Itemize
940 pressure0-: Pressure sensitive.
941  Released at 0, pressed at -.
942 \end_layout
944 \begin_layout Itemize
945 pressure0+: Pressure sensitive.
946  Released at 0, pressed at +.
947 \end_layout
949 \begin_layout Itemize
950 pressure-0: Pressure sensitive.
951  Released at -, pressed at 0.
952 \end_layout
954 \begin_layout Itemize
955 pressure-+: Pressure sensitive.
956  Released at -, pressed at +.
957 \end_layout
959 \begin_layout Itemize
960 pressure+0: Pressure sensitive.
961  Released at +, pressed at 0.
962 \end_layout
964 \begin_layout Itemize
965 pressure+-: Pressure sensitive.
966  Released at +, pressed at -.
967 \end_layout
969 \begin_layout Itemize
970 minus=<val>: Calibration at extreme minus position (-32768-32767)
971 \end_layout
973 \begin_layout Itemize
974 zero=<val>: Calibration at neutral position (-32768-32767)
975 \end_layout
977 \begin_layout Itemize
978 plus=<val>: Calibration at extreme plus position (-32768-32767)
979 \end_layout
981 \begin_layout Itemize
982 tolerance=<value>: Center band tolerance (0<x<1).
983  The smaller the value, the more sensitive the control is.
984 \end_layout
986 \begin_layout Subsubsection
987 show-bindings
988 \end_layout
990 \begin_layout Standard
991 Print all key bindings in effect.
992 \end_layout
994 \begin_layout Subsection
995 Aliases
996 \end_layout
998 \begin_layout Standard
999 Aliases bind command to sequence of commands.
1000  After alias has been defined, it replaces the command it shadows.
1001 \end_layout
1003 \begin_layout Standard
1004 Notes:
1005 \end_layout
1007 \begin_layout Itemize
1008 You can't alias command to itself.
1009 \end_layout
1011 \begin_layout Itemize
1012 Aliases starting with +/- are edge active just like ordinary commands starting
1013  with +/-.
1014 \end_layout
1016 \begin_layout Itemize
1017 One command can be aliased to multiple commands.
1018 \end_layout
1020 \begin_layout Subsubsection
1021 alias-command <command> <expansion>
1022 \end_layout
1024 \begin_layout Standard
1025 Append <expansion> to alias <command>.
1026  If alias does not already exist, it is created.
1027 \end_layout
1029 \begin_layout Subsubsection
1030 unalias-command <command>
1031 \end_layout
1033 \begin_layout Standard
1034 Clear alias expansion for <command>.
1035 \end_layout
1037 \begin_layout Subsubsection
1038 show-aliases
1039 \end_layout
1041 \begin_layout Standard
1042 Print all aliases and their expansions in effect.
1043 \end_layout
1045 \begin_layout Subsection
1046 run-script <script>
1047 \end_layout
1049 \begin_layout Standard
1050 Run <script> as if commands were entered on the command line.
1051 \end_layout
1053 \begin_layout Subsection
1054 Video dumping
1055 \end_layout
1057 \begin_layout Standard
1058 Following commands control video dumping:
1059 \end_layout
1061 \begin_layout Subsubsection
1062 start-dump <dumper> [<mode>] <prefix/filename>
1063 \end_layout
1065 \begin_layout Standard
1066 Start dumping using dumper <dumper>.
1067  If mode is present or not and if prefix or filename is present depends
1068  on the dumper and dumper mode.
1069 \end_layout
1071 \begin_layout Standard
1072 The following dumpers are available:
1073 \end_layout
1075 \begin_layout Itemize
1076 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
1077 \end_layout
1079 \begin_deeper
1080 \begin_layout Itemize
1081 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
1082  Takes prefix.
1083 \end_layout
1085 \begin_layout Itemize
1086 Mode: cscd/pcm: CSCD video, PCM audio.
1087  Takes prefix.
1088 \end_layout
1090 \end_deeper
1091 \begin_layout Itemize
1092 INTERNAL-JMD: Internal .jmd dumper.
1093 \end_layout
1095 \begin_deeper
1096 \begin_layout Itemize
1097 Does not take mode.
1098 \end_layout
1100 \begin_layout Itemize
1101 Takes a filename.
1102 \end_layout
1104 \end_deeper
1105 \begin_layout Itemize
1106 INTERNAL-RAW: Internal RAW dumper.
1107 \end_layout
1109 \begin_deeper
1110 \begin_layout Itemize
1111 Does not take mode.
1112 \end_layout
1114 \begin_layout Itemize
1115 Takes a prefix.
1116 \end_layout
1118 \begin_layout Itemize
1119 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
1120 \end_layout
1122 \begin_layout Itemize
1123 Video is always upscaled to double resolution (512x448 / 512 x 478).
1124 \end_layout
1126 \begin_layout Itemize
1127 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
1128  for NTSC.
1129 \end_layout
1131 \end_deeper
1132 \begin_layout Itemize
1133 INTERNAL-SDMP: Internal SDMP dumper.
1134 \end_layout
1136 \begin_deeper
1137 \begin_layout Itemize
1138 Mode 'ms': Multi-segment.
1139  Takes prefix.
1140 \end_layout
1142 \begin_layout Itemize
1143 Mode 'ss': Single-segment.
1144  Takes filename.
1145 \end_layout
1147 \end_deeper
1148 \begin_layout Subsubsection
1149 end-dump <dumper>
1150 \end_layout
1152 \begin_layout Standard
1153 End dumping using <dumper>
1154 \end_layout
1156 \begin_layout Subsubsection
1157 show-dumpers [<dumper>]
1158 \end_layout
1160 \begin_layout Standard
1161 Show the list of dumpers or list of modes for <dumper>
1162 \end_layout
1164 \begin_layout Subsection
1165 Memory manipulation
1166 \end_layout
1168 \begin_layout Standard
1169 <address> may be decimal or hexadecimal (prefixed with '0x').
1170  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
1171  with '-') decimal.
1172 \end_layout
1174 \begin_layout Standard
1175 The available element <sizes> are:
1176 \end_layout
1178 \begin_layout Itemize
1179 byte: 1 byte
1180 \end_layout
1182 \begin_layout Itemize
1183 word: 2 bytes
1184 \end_layout
1186 \begin_layout Itemize
1187 dword: 4 bytes
1188 \end_layout
1190 \begin_layout Itemize
1191 qword: 8 bytes
1192 \end_layout
1194 \begin_layout Standard
1195 When reading RAM and ROM, multi-byte reads/writes are big-endian.
1196  When dealing with DSP memory, multi-byte reads/writes are native-endian
1197  (do not use operand sizes exceeding DSP bitness, except dword is OK for
1198  24-bit memory).
1199 \end_layout
1201 \begin_layout Subsubsection
1202 read-<size> <address>
1203 \end_layout
1205 \begin_layout Standard
1206 Read the value of byte in <address>.
1207 \end_layout
1209 \begin_layout Subsubsection
1210 read-s<size> <address>
1211 \end_layout
1213 \begin_layout Standard
1214 Read the value of signed byte in <address>.
1215 \end_layout
1217 \begin_layout Subsubsection
1218 write-<size> <address> <value>
1219 \end_layout
1221 \begin_layout Standard
1222 Write <value> to byte in address <address>.
1223 \end_layout
1225 \begin_layout Subsubsection
1226 search-memory reset
1227 \end_layout
1229 \begin_layout Standard
1230 Reset the memory search
1231 \end_layout
1233 \begin_layout Subsubsection
1234 search-memory count
1235 \end_layout
1237 \begin_layout Standard
1238 Print number of candidates remaining
1239 \end_layout
1241 \begin_layout Subsubsection
1242 search-memory print
1243 \end_layout
1245 \begin_layout Standard
1246 Print all candidates remaining
1247 \end_layout
1249 \begin_layout Subsubsection
1250 search-memory <usflag><sizeflag><op>
1251 \end_layout
1253 \begin_layout Standard
1254 Searches memory for addresses satisfying criteria.
1255 \end_layout
1257 \begin_layout Standard
1258 <usflag> can be:
1259 \end_layout
1261 \begin_layout Itemize
1262 u: unsigned
1263 \end_layout
1265 \begin_layout Itemize
1266 s: signed
1267 \end_layout
1269 \begin_layout Standard
1270 <sizeflag> can be:
1271 \end_layout
1273 \begin_layout Itemize
1274 b: byte
1275 \end_layout
1277 \begin_layout Itemize
1278 w: word
1279 \end_layout
1281 \begin_layout Itemize
1282 d: dword
1283 \end_layout
1285 \begin_layout Itemize
1286 q: qword
1287 \end_layout
1289 \begin_layout Standard
1290 <op> can be:
1291 \end_layout
1293 \begin_layout Itemize
1294 lt: < previous value.
1295 \end_layout
1297 \begin_layout Itemize
1298 le: <= previous value.
1299 \end_layout
1301 \begin_layout Itemize
1302 eq: = previous value.
1303 \end_layout
1305 \begin_layout Itemize
1306 ne: != previous value.
1307 \end_layout
1309 \begin_layout Itemize
1310 ge: >= previous value.
1311 \end_layout
1313 \begin_layout Itemize
1314 gt: > previous value.
1315 \end_layout
1317 \begin_layout Subsubsection
1318 search-memory <sizeflag> <value>
1319 \end_layout
1321 \begin_layout Standard
1322 Searches for addresses that currently have value <value>.
1323  <sizeflag> is as in previous command.
1324 \end_layout
1326 \begin_layout Subsection
1327 Main commands
1328 \end_layout
1330 \begin_layout Standard
1331 These commands are not available in lsnesrc, but are available after ROM
1332  has been loaded.
1333 \end_layout
1335 \begin_layout Subsubsection
1336 quit-emulator [/y]
1337 \end_layout
1339 \begin_layout Standard
1340 Quits the emulator (asking for confirmation).
1341  If /y is given, no confirmation is asked.
1342 \end_layout
1344 \begin_layout Subsubsection
1345 pause-emulator
1346 \end_layout
1348 \begin_layout Standard
1349 Toggle paused/unpaused
1350 \end_layout
1352 \begin_layout Subsubsection
1353 +advance-frame 
1354 \end_layout
1356 \begin_layout Standard
1357 Advance frame.
1358  If the button is still held after configurable timeout expires, game unpauses
1359  for the duration frame advance is held.
1360 \end_layout
1362 \begin_layout Subsubsection
1363 +advance-poll 
1364 \end_layout
1366 \begin_layout Standard
1367 Advance subframe.
1368  If the button is still held after configurable timeout expires, game unpauses
1369  for the duration frame advance is held.
1370 \end_layout
1372 \begin_layout Subsubsection
1373 advance-skiplag 
1374 \end_layout
1376 \begin_layout Standard
1377 Skip to first poll in frame after current.
1378 \end_layout
1380 \begin_layout Subsubsection
1381 reset 
1382 \end_layout
1384 \begin_layout Standard
1385 Reset the SNES after this frame.
1386 \end_layout
1388 \begin_layout Subsubsection
1389 load <filename> 
1390 \end_layout
1392 \begin_layout Standard
1393 Load savestate <filename> in current mode.
1394 \end_layout
1396 \begin_layout Subsubsection
1397 load-state <filename> 
1398 \end_layout
1400 \begin_layout Standard
1401 Load savestate <filename> in readwrite mode.
1402 \end_layout
1404 \begin_layout Subsubsection
1405 load-readonly <filename> 
1406 \end_layout
1408 \begin_layout Standard
1409 Load savestate <filename> in readonly mode.
1410 \end_layout
1412 \begin_layout Subsubsection
1413 load-preserve <filename> 
1414 \end_layout
1416 \begin_layout Standard
1417 Load savestate <filename> in readonly mode, preserving current events.
1418 \end_layout
1420 \begin_layout Subsubsection
1421 load-movie <filename> 
1422 \end_layout
1424 \begin_layout Standard
1425 Load savestate <filename>, ignoring save part in readonly mode.
1426 \end_layout
1428 \begin_layout Subsubsection
1429 save-state <filename> 
1430 \end_layout
1432 \begin_layout Standard
1433 Save system state to <filename> as soon as possible.
1434 \end_layout
1436 \begin_layout Subsubsection
1437 save-movie <filename> 
1438 \end_layout
1440 \begin_layout Standard
1441 Save movie to <filename>.
1442 \end_layout
1444 \begin_layout Subsubsection
1445 set-rwmode 
1446 \end_layout
1448 \begin_layout Standard
1449 Set read-write mode.
1450 \end_layout
1452 \begin_layout Subsubsection
1453 set-romode 
1454 \end_layout
1456 \begin_layout Standard
1457 Set read-only mode
1458 \end_layout
1460 \begin_layout Subsubsection
1461 toggle-rwmode 
1462 \end_layout
1464 \begin_layout Standard
1465 Toggle between read-only and read-write modes.
1466 \end_layout
1468 \begin_layout Subsubsection
1469 set-gamename <name> 
1470 \end_layout
1472 \begin_layout Standard
1473 Set name of the game to <name>
1474 \end_layout
1476 \begin_layout Subsubsection
1477 get-gamename 
1478 \end_layout
1480 \begin_layout Standard
1481 Print the name of the game.
1482 \end_layout
1484 \begin_layout Subsubsection
1485 add-author <author> 
1486 \end_layout
1488 \begin_layout Standard
1489 Adds new author <author>.
1490  If <author> does not contain '|' it is full name.
1491  If it contains '|', '|' splits the full name and nickname.
1492 \end_layout
1494 \begin_layout Subsubsection
1495 edit-author <num> <author> 
1496 \end_layout
1498 \begin_layout Standard
1499 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1500  format)
1501 \end_layout
1503 \begin_layout Subsubsection
1504 remove-author <num> 
1505 \end_layout
1507 \begin_layout Standard
1508 Remove author in slot <num>
1509 \end_layout
1511 \begin_layout Subsubsection
1512 print-authors 
1513 \end_layout
1515 \begin_layout Standard
1516 Print authors.
1517 \end_layout
1519 \begin_layout Subsubsection
1520 test-1, test-2, test-3
1521 \end_layout
1523 \begin_layout Standard
1524 Internal test commands.
1525  Don't use.
1526 \end_layout
1528 \begin_layout Subsubsection
1529 take-screenshot <filename> 
1530 \end_layout
1532 \begin_layout Standard
1533 Save screenshot to <filename>.
1534 \end_layout
1536 \begin_layout Subsubsection
1537 +controller<num><button>
1538 \end_layout
1540 \begin_layout Standard
1541 Press button <button> on controller <num> (1-8).
1542  The following button names are known:
1543 \end_layout
1545 \begin_layout Itemize
1546 left
1547 \end_layout
1549 \begin_layout Itemize
1550 right
1551 \end_layout
1553 \begin_layout Itemize
1555 \end_layout
1557 \begin_layout Itemize
1558 down
1559 \end_layout
1561 \begin_layout Itemize
1563 \end_layout
1565 \begin_layout Itemize
1567 \end_layout
1569 \begin_layout Itemize
1571 \end_layout
1573 \begin_layout Itemize
1575 \end_layout
1577 \begin_layout Itemize
1579 \end_layout
1581 \begin_layout Itemize
1583 \end_layout
1585 \begin_layout Itemize
1586 select
1587 \end_layout
1589 \begin_layout Itemize
1590 start
1591 \end_layout
1593 \begin_layout Itemize
1594 trigger
1595 \end_layout
1597 \begin_layout Itemize
1598 cursor
1599 \end_layout
1601 \begin_layout Itemize
1602 pause
1603 \end_layout
1605 \begin_layout Itemize
1606 turbo
1607 \end_layout
1609 \begin_layout Subsubsection
1610 controllerh<num><button>
1611 \end_layout
1613 \begin_layout Standard
1614 Hold/unhold button <button> on controller <num> (1-8).
1615  See +controller for button names.
1616 \end_layout
1618 \begin_layout Subsubsection
1619 autofire (<pattern>|-)...
1620 \end_layout
1622 \begin_layout Standard
1623 Set autofire pattern.
1624  Each parameter is comma-separated list of button names (in form of 1start,
1625  1A, 2B, etc..) to hold on that frame.
1626  After reaching the end of pattern, the pattern restarts from the beginning.
1627 \end_layout
1629 \begin_layout Subsubsection
1630 repaint
1631 \end_layout
1633 \begin_layout Standard
1634 Force a repaint.
1635 \end_layout
1637 \begin_layout Subsection
1638 Save jukebox 
1639 \end_layout
1641 \begin_layout Subsubsection
1642 cycle-jukebox-backward
1643 \end_layout
1645 \begin_layout Standard
1646 Cycle save jukebox backwards.
1647 \end_layout
1649 \begin_layout Subsubsection
1650 cycle-jukebox-forward
1651 \end_layout
1653 \begin_layout Standard
1654 Cycle save jukebox forwards
1655 \end_layout
1657 \begin_layout Subsubsection
1658 load-jukebox
1659 \end_layout
1661 \begin_layout Standard
1662 Do load from jukebox (current mode).
1663 \end_layout
1665 \begin_layout Subsubsection
1666 save-jukebox
1667 \end_layout
1669 \begin_layout Standard
1670 Do state save to jukebox.
1671 \end_layout
1673 \begin_layout Subsection
1674 Lua 
1675 \end_layout
1677 \begin_layout Standard
1678 Only available if lua support is compiled in.
1679 \end_layout
1681 \begin_layout Subsubsection
1682 evaluate-lua <luacode>
1683 \end_layout
1685 \begin_layout Standard
1686 Run Lua code <luacode> using built-in Lua interpretter.
1687 \end_layout
1689 \begin_layout Subsubsection
1690 run-lua <script>
1691 \end_layout
1693 \begin_layout Standard
1694 Run specified lua file using built-in Lua interpretter.
1695 \end_layout
1697 \begin_layout Subsection
1698 Memory watch
1699 \end_layout
1701 \begin_layout Subsubsection
1702 add-watch <name> <expression>
1703 \end_layout
1705 \begin_layout Standard
1706 Adds new watch (or modifies old one).
1707 \end_layout
1709 \begin_layout Subsubsection
1710 remove-watch <name>
1711 \end_layout
1713 \begin_layout Standard
1714 Remove a watch.
1715 \end_layout
1717 \begin_layout Subsection
1718 Sound 
1719 \end_layout
1721 \begin_layout Subsubsection
1722 enable-sound <on/off> 
1723 \end_layout
1725 \begin_layout Standard
1726 Enable/Disable sound.
1727 \end_layout
1729 \begin_layout Subsubsection
1730 set-sound-device <device> 
1731 \end_layout
1733 \begin_layout Standard
1734 Set sound device to <device>
1735 \end_layout
1737 \begin_layout Subsubsection
1738 show-sound-status 
1739 \end_layout
1741 \begin_layout Standard
1742 Show status of sound system.
1743 \end_layout
1745 \begin_layout Subsubsection
1746 show-sound-devices
1747 \end_layout
1749 \begin_layout Standard
1750 Show all available devices.
1751 \end_layout
1753 \begin_layout Subsubsection
1754 set-volume <multiplier>
1755 \end_layout
1757 \begin_layout Standard
1758 Set the volume multiplier to <multiplier>.
1759  1 is normal volume, and higher numbers are louder.
1760 \end_layout
1762 \begin_layout Subsubsection
1763 set-volume <multiplier>%
1764 \end_layout
1766 \begin_layout Standard
1767 Set the volume multiplier to <multiplier> percent.
1768  100 is normal volume, and higher numbers are louder.
1769 \end_layout
1771 \begin_layout Subsubsection
1772 set-volume <multiplier>dB
1773 \end_layout
1775 \begin_layout Standard
1776 Set the volume multiplier to <multiplier> dB.
1777  0 is normal volume, and higher numbers are louder.
1778  The value may be negative.
1779 \end_layout
1781 \begin_layout Subsection
1782 SDL Platform commands 
1783 \end_layout
1785 \begin_layout Standard
1786 The following are valid on SDL platform.
1787 \end_layout
1789 \begin_layout Subsubsection
1790 identify-key
1791 \end_layout
1793 \begin_layout Standard
1794 Asks to press a key and then identifies that (pseudo-)key.
1795 \end_layout
1797 \begin_layout Subsubsection
1798 toggle-console 
1799 \end_layout
1801 \begin_layout Standard
1802 Toggle between windowed/fullscreen console.
1803 \end_layout
1805 \begin_layout Subsubsection
1806 scroll-fullup 
1807 \end_layout
1809 \begin_layout Standard
1810 Scroll messages window as far back as it goes.
1811 \end_layout
1813 \begin_layout Subsubsection
1814 scroll-fulldown 
1815 \end_layout
1817 \begin_layout Standard
1818 Scroll messages window as far forward as it goes.
1819 \end_layout
1821 \begin_layout Subsubsection
1822 scroll-up 
1823 \end_layout
1825 \begin_layout Standard
1826 Scroll messages window back one screenful.
1827 \end_layout
1829 \begin_layout Subsubsection
1830 scroll-down 
1831 \end_layout
1833 \begin_layout Standard
1834 Scroll messages window forward one screenful.
1835 \end_layout
1837 \begin_layout Section
1838 Settings
1839 \end_layout
1841 \begin_layout Subsection
1842 Core settings
1843 \end_layout
1845 \begin_layout Subsubsection
1846 firmwarepath
1847 \end_layout
1849 \begin_layout Standard
1850 Set where bsnes looks for firmware files.
1851  Default is 
1852 \begin_inset Quotes eld
1853 \end_inset
1856 \begin_inset Quotes erd
1857 \end_inset
1860 \end_layout
1862 \begin_layout Subsubsection
1863 targetfps
1864 \end_layout
1866 \begin_layout Standard
1867 Set the target fps.
1868  Numeric, range is 0.001 to 
1869 \begin_inset Quotes eld
1870 \end_inset
1872 infinite
1873 \begin_inset Quotes erd
1874 \end_inset
1877  Default is native framerate.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 savecompression
1882 \end_layout
1884 \begin_layout Standard
1885 Set save compression level (integer 0-9).
1886  Default is 7 (0 is no compression).
1887 \end_layout
1889 \begin_layout Subsubsection
1890 advance-timeout
1891 \end_layout
1893 \begin_layout Standard
1894 Set the frame advance timeout in milliseconds.
1895  Numeric integer, range is 0-999999999.
1896  Default is 500.
1897 \end_layout
1899 \begin_layout Subsection
1900 AVI dumper settings
1901 \end_layout
1903 \begin_layout Subsubsection
1904 avi-large
1905 \end_layout
1907 \begin_layout Standard
1908 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1909  outputs.
1910 \end_layout
1912 \begin_layout Subsubsection
1913 avi-left-border
1914 \end_layout
1916 \begin_layout Standard
1917 AVI dumper: Set the default left border thickness (unless lua overrides)
1918  for dumps.
1919  Range 0-8191.
1920  Default is 0.
1921 \end_layout
1923 \begin_layout Subsubsection
1924 avi-right-border
1925 \end_layout
1927 \begin_layout Standard
1928 AVI dumper: Set the default right border thickness (unless lua overrides)
1929  for dumps.
1930  Range 0-8191.
1931  Default is 0.
1932 \end_layout
1934 \begin_layout Subsubsection
1935 avi-top-border
1936 \end_layout
1938 \begin_layout Standard
1939 AVI dumper: Set the default top border thickness (unless lua overrides)
1940  for dumps.
1941  Range 0-8191.
1942  Default is 0.
1943 \end_layout
1945 \begin_layout Subsubsection
1946 avi-bottom-border
1947 \end_layout
1949 \begin_layout Standard
1950 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1951  for dumps.
1952  Range 0-8191.
1953  Default is 0.
1954 \end_layout
1956 \begin_layout Subsubsection
1957 avi-maxframes
1958 \end_layout
1960 \begin_layout Standard
1961 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1962  Range 0-999999999.
1963  Default is 0.
1964 \end_layout
1966 \begin_layout Subsubsection
1967 avi-compresison
1968 \end_layout
1970 \begin_layout Standard
1971 AVI dumper: Compression level (0-18).
1972 \end_layout
1974 \begin_layout Itemize
1975 Compression levels 10 and above are not compatible with stock CSCD codec.
1976 \end_layout
1978 \begin_layout Itemize
1979 Recomended level is 7.
1980 \end_layout
1982 \begin_layout Subsubsection
1983 avi-soundrate
1984 \end_layout
1986 \begin_layout Standard
1987 AVI dumper: Set method of determining the sound rate.
1988 \end_layout
1990 \begin_layout Itemize
1991 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1992  128, 176.4 and 192 kHz.
1993 \end_layout
1995 \begin_layout Itemize
1996 1: Round down to nearest integer.
1997 \end_layout
1999 \begin_layout Itemize
2000 2: Round up to nearest ingeter.
2001 \end_layout
2003 \begin_layout Subsection
2004 JMD options
2005 \end_layout
2007 \begin_layout Subsubsection
2008 jmd-copression
2009 \end_layout
2011 \begin_layout Standard
2012 JMD dumper: Compression level (0-9).
2013 \end_layout
2015 \begin_layout Subsection
2016 SDL platform settings
2017 \end_layout
2019 \begin_layout Subsubsection
2020 autorepeat-first-delay
2021 \end_layout
2023 \begin_layout Standard
2024 Sets the delay for first character in typematic autorepeat.
2025 \end_layout
2027 \begin_layout Subsubsection
2028 autorepeat-subsequent-delay
2029 \end_layout
2031 \begin_layout Standard
2032 Sets the delay for subsequent characters in typematic autorepeat.
2033 \end_layout
2035 \begin_layout Section
2036 Lua functions
2037 \end_layout
2039 \begin_layout Subsection
2040 Core (in main table)
2041 \end_layout
2043 \begin_layout Subsubsection
2044 print
2045 \end_layout
2047 \begin_layout Standard
2048 Print line to message console.
2049 \end_layout
2051 \begin_layout Subsubsection
2052 exec(string command)
2053 \end_layout
2055 \begin_layout Standard
2056 Run command as it was entered on the command line
2057 \end_layout
2059 \begin_layout Subsubsection
2060 utime()
2061 \end_layout
2063 \begin_layout Standard
2064 Returns two values.
2065  First is time since some epoch in seconds, the second is microseconds mod
2066  10^6 since that epoch.
2067 \end_layout
2069 \begin_layout Subsubsection
2070 emulator_ready()
2071 \end_layout
2073 \begin_layout Standard
2074 Returns true if emulator has finished booting, false if not (on_startup()
2075  will be issued later).
2076 \end_layout
2078 \begin_layout Subsubsection
2079 set_idle_timeout(number timeout)
2080 \end_layout
2082 \begin_layout Standard
2083 Set number of microseconds to block idle for.
2084  After this timeout has expired, on_idle() will be called once.
2085 \end_layout
2087 \begin_layout Subsubsection
2088 set_timer_timeout(number timeout)
2089 \end_layout
2091 \begin_layout Standard
2092 Set number of microseconds to block timer for.
2093  After this timeout has expired, on_timer() will be called once.
2094 \end_layout
2096 \begin_layout Subsection
2097 Table bit:
2098 \end_layout
2100 \begin_layout Standard
2101 Bitwise logical functions and related.
2102 \end_layout
2104 \begin_layout Subsubsection
2105 bit.none(number...) / bit.bnot(number...)
2106 \end_layout
2108 \begin_layout Standard
2109 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2110  arguments).
2111 \end_layout
2113 \begin_layout Subsubsection
2114 bit.any(number...) / bit.bor(number...)
2115 \end_layout
2117 \begin_layout Standard
2118 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2119 \end_layout
2121 \begin_layout Subsubsection
2122 bit.all(number...) / bit.band(number...)
2123 \end_layout
2125 \begin_layout Standard
2126 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2128 \end_layout
2130 \begin_layout Subsubsection
2131 bit.parity(number...) / bit.bxor(number...)
2132 \end_layout
2134 \begin_layout Standard
2135 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2136  of the arguments).
2137 \end_layout
2139 \begin_layout Subsubsection
2140 bit.lrotate(number base[, number amount[, number bits]])
2141 \end_layout
2143 \begin_layout Standard
2144 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2145 \end_layout
2147 \begin_layout Subsubsection
2148 bit.rrotate(number base[, number amount[, number bits]])
2149 \end_layout
2151 \begin_layout Standard
2152 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2153  places.
2154 \end_layout
2156 \begin_layout Subsubsection
2157 bit.lshift(number base[, number amount[, number bits]])
2158 \end_layout
2160 \begin_layout Standard
2161 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2162  The new bits are filled with zeroes.
2163 \end_layout
2165 \begin_layout Subsubsection
2166 bit.lrshift(number base[, number amount[, number bits]])
2167 \end_layout
2169 \begin_layout Standard
2170 Shift bits-bit (max 48, default 48) number logically right by amount (default
2171  1) places.
2172  The new bits are filled with zeroes.
2173 \end_layout
2175 \begin_layout Subsubsection
2176 bit.arshift(number base[, number amount[, number bits]])
2177 \end_layout
2179 \begin_layout Standard
2180 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2181  (default 1) places.
2182  The new bits are shifted in with copy of the high bit.
2183 \end_layout
2185 \begin_layout Subsubsection
2186 bit.extract(number base[, number bit0[, number bit1,...]])
2187 \end_layout
2189 \begin_layout Standard
2190 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2191 \end_layout
2193 \begin_layout Standard
2194 Notes: 
2195 \end_layout
2197 \begin_layout Itemize
2198 Bit numbers up to 51 should work reliably (then things start falling apart
2199  due to double precision issues).
2200 \end_layout
2202 \begin_layout Itemize
2203 There are two special bit positions, true and false, standing for always
2204  set bit and always clear bit.
2205 \end_layout
2207 \begin_layout Subsubsection
2208 bit.value([number bit1[, number bit2,...]])
2209 \end_layout
2211 \begin_layout Standard
2212 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2213  places and so on.
2214  As special value, nil argument is no-op.
2215 \end_layout
2217 \begin_layout Subsection
2218 Table gui:
2219 \end_layout
2221 \begin_layout Standard
2222 Most of these functions can only be called in on_paint and on_video callbacks.
2223  Exceptions are noted.
2224 \end_layout
2226 \begin_layout Standard
2227 Colors are 32-bit.
2228  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2229  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2230  opaque, 255 is almost transparent).
2231  -1 is the fully transparent color.
2232  Alpha values greater than 127 do work.
2233 \end_layout
2235 \begin_layout Standard
2236 Origin of coordinates is at top left corner of game display area.
2237  Left and top gaps correspond to negative coordinates.
2238 \end_layout
2240 \begin_layout Subsubsection
2241 gui.resolution()
2242 \end_layout
2244 \begin_layout Standard
2245 Returns 2-tuple (hresolution, vresolution).
2246 \end_layout
2248 \begin_layout Subsubsection
2249 gui.<class>_gap(number gap)
2250 \end_layout
2252 \begin_layout Standard
2253 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2254  is 8191).
2255 \end_layout
2257 \begin_layout Subsubsection
2258 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2259 \end_layout
2261 \begin_layout Standard
2262 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2263  16 high).
2264  Parameters:
2265 \end_layout
2267 \begin_layout Itemize
2268 x: X-coordinate to start the drawing from (and x-coordinate at begining
2269  of the lines).
2270 \end_layout
2272 \begin_layout Itemize
2273 y: Y-coordinate to start the drawing from.
2274 \end_layout
2276 \begin_layout Itemize
2277 text: The text to draw.
2278 \end_layout
2280 \begin_layout Itemize
2281 fgc: Text color (default is 0xFFFFFF (white))
2282 \end_layout
2284 \begin_layout Itemize
2285 bgc: Background color (default is -1 (transparent))
2286 \end_layout
2288 \begin_layout Subsubsection
2289 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2290 \end_layout
2292 \begin_layout Standard
2293 Like gui.text, but draw using double-width.
2294 \end_layout
2296 \begin_layout Subsubsection
2297 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2298 \end_layout
2300 \begin_layout Standard
2301 Like gui.text, but draw using double-height.
2302 \end_layout
2304 \begin_layout Subsubsection
2305 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2306 \end_layout
2308 \begin_layout Standard
2309 Like gui.text, but draw using double-width/double-height.
2310 \end_layout
2312 \begin_layout Subsubsection
2313 gui.rectangle(number x, number y, number width, number height[, number thickness[
2314 , number outline[, number fill]]])
2315 \end_layout
2317 \begin_layout Standard
2318 Draw rectangle on the GUI.
2319  Parameters:
2320 \end_layout
2322 \begin_layout Itemize
2323 x: X-coordinate of left edge.
2324 \end_layout
2326 \begin_layout Itemize
2327 y: Y-coordinate of upper edge.
2328 \end_layout
2330 \begin_layout Itemize
2331 width: Width of rectangle.
2332 \end_layout
2334 \begin_layout Itemize
2335 height: Height of rectangle.
2336 \end_layout
2338 \begin_layout Itemize
2339 thickness: Thickness of outline (default is 1).
2340 \end_layout
2342 \begin_layout Itemize
2343 outline: Color of outline (default is 0xFFFFFF (white))
2344 \end_layout
2346 \begin_layout Itemize
2347 fill: Color of fill (default is -1 (transparent))
2348 \end_layout
2350 \begin_layout Subsubsection
2351 gui.box(number x, number y, number width, number height[, number thickness[,
2352  number outline1[,number outline2[, number fill]]]])
2353 \end_layout
2355 \begin_layout Standard
2356 Draw rectangle with 3D effect on the GUI.
2357  Parameters:
2358 \end_layout
2360 \begin_layout Itemize
2361 x: X-coordinate of left edge.
2362 \end_layout
2364 \begin_layout Itemize
2365 y: Y-coordinate of upper edge.
2366 \end_layout
2368 \begin_layout Itemize
2369 width: Width of rectangle.
2370 \end_layout
2372 \begin_layout Itemize
2373 height: Height of rectangle.
2374 \end_layout
2376 \begin_layout Itemize
2377 thickness: Thickness of outline (default is 1).
2378 \end_layout
2380 \begin_layout Itemize
2381 outline1: First color of outline (default is 0xFFFFFF (white))
2382 \end_layout
2384 \begin_layout Itemize
2385 outline2: First color of outline (default is 0x808080 (dark gray))
2386 \end_layout
2388 \begin_layout Itemize
2389 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2390 \end_layout
2392 \begin_layout Subsubsection
2393 gui.pixel(number x, number y[, number color])
2394 \end_layout
2396 \begin_layout Standard
2397 Draw one pixel on the GUI.
2398  Parameters:
2399 \end_layout
2401 \begin_layout Itemize
2402 x: X-coordinate of the pixel
2403 \end_layout
2405 \begin_layout Itemize
2406 y: Y-coordinate of the pixel
2407 \end_layout
2409 \begin_layout Itemize
2410 color: Color of the pixel (default is 0xFFFFFF (white))
2411 \end_layout
2413 \begin_layout Subsubsection
2414 gui.crosshair(number x, number y[, number length[, number color]])
2415 \end_layout
2417 \begin_layout Standard
2418 Draw a crosshair.
2419  Parameters:
2420 \end_layout
2422 \begin_layout Itemize
2423 x: X-coordinate of the crosshair
2424 \end_layout
2426 \begin_layout Itemize
2427 y: Y-coordinate of the crosshair
2428 \end_layout
2430 \begin_layout Itemize
2431 length: Length of the crosshair lines (default 10).
2432 \end_layout
2434 \begin_layout Itemize
2435 color: Color of the crosshair (default is 0xFFFFFF (white))
2436 \end_layout
2438 \begin_layout Subsubsection
2439 gui.line(number x1, number y1, number x2, number y2[, number color])
2440 \end_layout
2442 \begin_layout Standard
2443 Draw a thin line.
2444  Parameters:
2445 \end_layout
2447 \begin_layout Itemize
2448 x1: X-coordinate of one end.
2449 \end_layout
2451 \begin_layout Itemize
2452 y1: Y-coordinate of one end.
2453 \end_layout
2455 \begin_layout Itemize
2456 x2: X-coordinate of the other end.
2457 \end_layout
2459 \begin_layout Itemize
2460 y2: Y-coordinate of the other end.
2461 \end_layout
2463 \begin_layout Itemize
2464 color: Color of the line (default is 0xFFFFFF (white)).
2465 \end_layout
2467 \begin_layout Subsubsection
2468 gui.circle(number x, number y, number r[, number thick[, number border[,
2469  number fil]]])
2470 \end_layout
2472 \begin_layout Standard
2473 Draw a circle.
2474  Parameters.
2475 \end_layout
2477 \begin_layout Itemize
2478 x: X-coordinate of the center
2479 \end_layout
2481 \begin_layout Itemize
2482 y: Y-coordinate of the center
2483 \end_layout
2485 \begin_layout Itemize
2486 r: The radius of the circle
2487 \end_layout
2489 \begin_layout Itemize
2490 thick: Border thickness
2491 \end_layout
2493 \begin_layout Itemize
2494 border: Border color (default is 0xFFFFFF (white))
2495 \end_layout
2497 \begin_layout Itemize
2498 fill: Fill color (default is -1 (transparent)).
2499 \end_layout
2501 \begin_layout Subsubsection
2502 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2503 \end_layout
2505 \begin_layout Standard
2506 Draw a bitmap on screen with specified palette.
2507  Parameters:
2508 \end_layout
2510 \begin_layout Itemize
2511 x: X-coordinate of left edge.
2512 \end_layout
2514 \begin_layout Itemize
2515 y: Y-coordinate of top edge.
2516 \end_layout
2518 \begin_layout Itemize
2519 bitmap: The bitmap to draw
2520 \end_layout
2522 \begin_layout Itemize
2523 palette: The palette to draw the bitmap using.
2524 \end_layout
2526 \begin_layout Subsubsection
2527 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2528 \end_layout
2530 \begin_layout Standard
2531 Draw a bitmap on screen.
2532  Parameters:
2533 \end_layout
2535 \begin_layout Itemize
2536 x: X-coordinate of left edge.
2537 \end_layout
2539 \begin_layout Itemize
2540 y: Y-coordinate of top edge.
2541 \end_layout
2543 \begin_layout Itemize
2544 bitmap: The bitmap to draw
2545 \end_layout
2547 \begin_layout Subsubsection
2548 gui.palette_new()
2549 \end_layout
2551 \begin_layout Standard
2552 Returns a new palette (initially all transparent).
2553  Can be used anywhere.
2554 \end_layout
2556 \begin_layout Subsubsection
2557 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2558 \end_layout
2560 \begin_layout Standard
2561 Returns a new bitmap/dbitmap.
2562  Can be used anywhere.
2563  Parameters:
2564 \end_layout
2566 \begin_layout Itemize
2567 w: The width of new bitmap
2568 \end_layout
2570 \begin_layout Itemize
2571 h: The height of new bitmap
2572 \end_layout
2574 \begin_layout Itemize
2575 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2576 \end_layout
2578 \begin_layout Itemize
2579 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2580 \end_layout
2582 \begin_layout Subsubsection
2583 gui.bitmap_load(string file)
2584 \end_layout
2586 \begin_layout Standard
2587 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2588  for bitmap).
2589  Can be used anywhere.
2590  Parameters:
2591 \end_layout
2593 \begin_layout Itemize
2594 file: The name of file to load.
2595 \end_layout
2597 \begin_layout Subsubsection
2598 gui.palette_set(palette palette, number index, number color)
2599 \end_layout
2601 \begin_layout Standard
2602 Sets color in palette.
2603  Can be used anywhere.
2604  Parameters:
2605 \end_layout
2607 \begin_layout Itemize
2608 palette: The palette to manipulate
2609 \end_layout
2611 \begin_layout Itemize
2612 index: Index of color (0-65535).
2613 \end_layout
2615 \begin_layout Itemize
2616 color: The color value.
2617 \end_layout
2619 \begin_layout Subsubsection
2620 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2621 \end_layout
2623 \begin_layout Standard
2624 Sets specified pixel in bitmap.
2625  Can be used anywhere.
2626  Parameters:
2627 \end_layout
2629 \begin_layout Itemize
2630 bitmap: The bitmap to manipulate
2631 \end_layout
2633 \begin_layout Itemize
2634 x: The x-coordinate of the pixel.
2635 \end_layout
2637 \begin_layout Itemize
2638 y: The y-coordinate of the pixel.
2639 \end_layout
2641 \begin_layout Itemize
2642 color: If bitmap is a bitmap, color index (0-65535).
2643  Otherwise color value.
2644 \end_layout
2646 \begin_layout Subsubsection
2647 gui.bitmap_size(bitmap/dbitmap bitmap)
2648 \end_layout
2650 \begin_layout Standard
2651 Get size of bitmap.
2652  Can be used anywhere.
2653  Parameters:
2654 \end_layout
2656 \begin_layout Itemize
2657 bitmap: The bitmap to query.
2658 \end_layout
2660 \begin_layout Standard
2661 The first return is the width, the second is the height.
2662 \end_layout
2664 \begin_layout Subsubsection
2665 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2666  src, number sx, number sy, number w, number h[, number ck])
2667 \end_layout
2669 \begin_layout Standard
2670 Blit a part of bitmap to another.
2671  Can be used anywhere.
2672  Parameters:
2673 \end_layout
2675 \begin_layout Itemize
2676 dest: Destination to blit to.
2677 \end_layout
2679 \begin_layout Itemize
2680 dx: left edge of target
2681 \end_layout
2683 \begin_layout Itemize
2684 dy: Top edge of target
2685 \end_layout
2687 \begin_layout Itemize
2688 src: The source to blit from.
2689  Must be of the same type as destination.
2690 \end_layout
2692 \begin_layout Itemize
2693 sx: left edge of source
2694 \end_layout
2696 \begin_layout Itemize
2697 sy: Top edge of source
2698 \end_layout
2700 \begin_layout Itemize
2701 w: Width of region
2702 \end_layout
2704 \begin_layout Itemize
2705 h: Height of region.
2706 \end_layout
2708 \begin_layout Itemize
2709 ck: Color key.
2710  Pixels of this color are not blitted.
2711 \end_layout
2713 \begin_deeper
2714 \begin_layout Itemize
2715 If bitmaps are bitmaps, this is color index of colorkey.
2716  Values outside range 0-65535 cause no key to be used as colorkey.
2717 \end_layout
2719 \begin_layout Itemize
2720 If bitmaps are dbitmaps, this color value of colorkey.
2721 \end_layout
2723 \begin_layout Itemize
2724 May be absent or nil for no colorkey blit.
2725 \end_layout
2727 \end_deeper
2728 \begin_layout Subsubsection
2729 gui.repaint()
2730 \end_layout
2732 \begin_layout Standard
2733 Request on_repaint() to happen as soon as possible.
2734  Can be used anywhere.
2735 \end_layout
2737 \begin_layout Subsubsection
2738 gui.subframe_update(boolean on)
2739 \end_layout
2741 \begin_layout Standard
2742 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2743  or not happen (on=false).
2744  Can be used anywhere.
2745 \end_layout
2747 \begin_layout Subsubsection
2748 gui.screenshot(string filename)
2749 \end_layout
2751 \begin_layout Standard
2752 Write PNG screenshot of the current frame (no drawings) to specified file.
2753  Can be used anywhere.
2754 \end_layout
2756 \begin_layout Subsubsection
2757 gui.color(number r, number g, number b[, number a])
2758 \end_layout
2760 \begin_layout Standard
2761 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2762  each component in scale 0-255.
2763  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2764  opaque).
2765  The default alpha is 256.
2766 \end_layout
2768 \begin_layout Subsubsection
2769 gui.status(string name, string value)
2770 \end_layout
2772 \begin_layout Standard
2773 Set status field 
2774 \begin_inset Quotes eld
2775 \end_inset
2777 L[<name>]
2778 \begin_inset Quotes erd
2779 \end_inset
2781  to <value> in status area.
2782  Can be used anywhere.
2783 \end_layout
2785 \begin_layout Subsubsection
2786 gui.rainbow(number step, number steps[, number color])
2787 \end_layout
2789 \begin_layout Standard
2790 Perform hue rotation of color <color> (default bright red), by <step> steps.
2791  The number of steps per full rotation is given by absolute value of <steps>.
2792 \end_layout
2794 \begin_layout Standard
2795 If <steps> is negative, the rotation will be counterclockwise.
2796 \end_layout
2798 \begin_layout Subsection
2799 table input
2800 \end_layout
2802 \begin_layout Standard
2803 Input handling.
2804  Only available in on_input callback.
2805 \end_layout
2807 \begin_layout Subsubsection
2808 input.get(number controller, number index)
2809 \end_layout
2811 \begin_layout Standard
2812 Read the specified index (0-11) from specified controller (0-7).
2813  Notes:
2814 \end_layout
2816 \begin_layout Itemize
2817 Uses physical controller numbering.
2818  Gamepad in port 2 is controller 4, not 1!
2819 \end_layout
2821 \begin_layout Subsubsection
2822 input.set(number controller, number index, number value)
2823 \end_layout
2825 \begin_layout Standard
2826 Write the specified index (0-11) from specified controller (0-7), storing
2827  value.
2828  Notes:
2829 \end_layout
2831 \begin_layout Itemize
2832 Uses physical controller numbering.
2833  Gamepad in port 2 is controller 4, not 1!
2834 \end_layout
2836 \begin_layout Subsubsection
2837 input.geta(number controller)
2838 \end_layout
2840 \begin_layout Standard
2841 Get input state for entiere controller.
2842  Returns 13 return values.
2843 \end_layout
2845 \begin_layout Itemize
2846 1st return value: Bitmask: bit i is set if i:th index is nonzero
2847 \end_layout
2849 \begin_layout Itemize
2850 2nd-13th return value: value of i:th index.
2851 \end_layout
2853 \begin_layout Subsubsection
2854 input.seta(number controller, number bitmask, number args...)
2855 \end_layout
2857 \begin_layout Standard
2858 Set state for entiere controller.
2859  args is up to 12 values for indices (overriding values in bitmask if specified).
2860 \end_layout
2862 \begin_layout Subsubsection
2863 input.controllertype(number controller)
2864 \end_layout
2866 \begin_layout Standard
2867 Get the type of controller as string.
2868  Valid values are:
2869 \end_layout
2871 \begin_layout Itemize
2872 gamepad
2873 \end_layout
2875 \begin_layout Itemize
2876 mouse
2877 \end_layout
2879 \begin_layout Itemize
2880 justifier
2881 \end_layout
2883 \begin_layout Itemize
2884 superscope
2885 \end_layout
2887 \begin_layout Subsubsection
2888 input.reset([number cycles])
2889 \end_layout
2891 \begin_layout Standard
2892 Execute reset.
2893  If cycles is greater than zero, do delayed reset.
2894  0 (or no value) causes immediate reset.
2895 \end_layout
2897 \begin_layout Itemize
2898 Only available with subframe flag false.
2899 \end_layout
2901 \begin_layout Subsubsection
2902 input.raw()
2903 \end_layout
2905 \begin_layout Standard
2906 Returns table of tables of all available keys and axes.
2907  The first table is indexed by key name (platform-dependent!), and the inner
2908  table has the following fields:
2909 \end_layout
2911 \begin_layout Itemize
2912 last_rawval: Last reported raw value for control.
2913 \end_layout
2915 \begin_layout Itemize
2916 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2917  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2918 \end_layout
2920 \begin_layout Itemize
2921 cal_left: Minimum calibration value.
2922  Only meaningful with axis and pressure types.
2923 \end_layout
2925 \begin_layout Itemize
2926 cal_center: Center calibration value.
2927  Only meaningful with axis and pressure types.
2928 \end_layout
2930 \begin_layout Itemize
2931 cal_right: Maximum calibration value.
2932  Only meaningful with axis and pressure types.
2933 \end_layout
2935 \begin_layout Itemize
2936 cal_tolerance: Dead zone tolerance.
2937  Only meaningful with axis and pressure types.
2938 \end_layout
2940 \begin_layout Subsubsection
2941 input.keyhook(key, state)
2942 \end_layout
2944 \begin_layout Standard
2945 Requests that keyhook events to be sent for key (state=true) or not sent
2946  (state=false).
2947 \end_layout
2949 \begin_layout Subsection
2950 Table hostmemory
2951 \end_layout
2953 \begin_layout Standard
2954 Host memory handling (extra memory saved to savestates).
2955  Host memory starts empty.
2956 \end_layout
2958 \begin_layout Subsubsection
2959 hostmemory.read(number address)
2960 \end_layout
2962 \begin_layout Standard
2963 Reads hostmemory slot address.
2964  Slot numbers out of range return false instead of numeric.
2965 \end_layout
2967 \begin_layout Subsubsection
2968 hostmemory.write(number address, number value)
2969 \end_layout
2971 \begin_layout Standard
2972 Writes hostmemory slot with 0-255.
2973  Slot numbers out of range cause extension of host memory slot space.
2974 \end_layout
2976 \begin_layout Subsubsection
2977 hostmemory.readbyte(number address)
2978 \end_layout
2980 \begin_layout Standard
2981 Read unsigned byte (1 element) from given address.
2982  Slots out of range return false.
2983 \end_layout
2985 \begin_layout Subsubsection
2986 hostmemory.writebyte(number address, number value)
2987 \end_layout
2989 \begin_layout Standard
2990 Write unsigned byte (1 element) to given slot.
2991  Slot numbers out of range cause extension.
2992 \end_layout
2994 \begin_layout Subsubsection
2995 hostmemory.readsbyte(number address)
2996 \end_layout
2998 \begin_layout Standard
2999 Read signed byte (1 element) from given address.
3000  Slots out of range return false.
3001 \end_layout
3003 \begin_layout Subsubsection
3004 hostmemory.writesbyte(number address, number value)
3005 \end_layout
3007 \begin_layout Standard
3008 Write signed byte (1 element) to given slot.
3009  Slot numbers out of range cause extension.
3010 \end_layout
3012 \begin_layout Subsubsection
3013 hostmemory.readword(number address)
3014 \end_layout
3016 \begin_layout Standard
3017 Read unsigned word (2 elements) from given address.
3018  Slots out of range return false.
3019 \end_layout
3021 \begin_layout Subsubsection
3022 hostmemory.writeword(number address, number value)
3023 \end_layout
3025 \begin_layout Standard
3026 Write unsigned word (2 elements) to given slot.
3027  Slot numbers out of range cause extension.
3028 \end_layout
3030 \begin_layout Subsubsection
3031 hostmemory.readsword(number address)
3032 \end_layout
3034 \begin_layout Standard
3035 Read signed word (2 elements) from given address.
3036  Slots out of range return false.
3037 \end_layout
3039 \begin_layout Subsubsection
3040 hostmemory.writesword(number address, number value)
3041 \end_layout
3043 \begin_layout Standard
3044 Write signed word (2 elements) to given slot.
3045  Slot numbers out of range cause extension.
3046 \end_layout
3048 \begin_layout Subsubsection
3049 hostmemory.readdword(number address)
3050 \end_layout
3052 \begin_layout Standard
3053 Read unsigned doubleword (4 elements) from given address.
3054  Slots out of range return false.
3055 \end_layout
3057 \begin_layout Subsubsection
3058 hostmemory.writedword(number address, number value)
3059 \end_layout
3061 \begin_layout Standard
3062 Write unsigned doubleword (4 elements) to given slot.
3063  Slot numbers out of range cause extension.
3064 \end_layout
3066 \begin_layout Subsubsection
3067 hostmemory.readsdword(number address)
3068 \end_layout
3070 \begin_layout Standard
3071 Read signed doubleword (4 elements) from given address.
3072  Slots out of range return false.
3073 \end_layout
3075 \begin_layout Subsubsection
3076 hostmemory.writesdword(number address, number value)
3077 \end_layout
3079 \begin_layout Standard
3080 Write signed doubleword (4 elements) to given slot.
3081  Slot numbers out of range cause extension.
3082 \end_layout
3084 \begin_layout Subsubsection
3085 hostmemory.readqword(number address)
3086 \end_layout
3088 \begin_layout Standard
3089 Read unsigned quadword (8 elements) from given address.
3090  Slots out of range return false.
3091 \end_layout
3093 \begin_layout Subsubsection
3094 hostmemory.writeqword(number address, number value)
3095 \end_layout
3097 \begin_layout Standard
3098 Write unsigned quadword (4 elements) to given slot.
3099  Slot numbers out of range cause extension.
3100 \end_layout
3102 \begin_layout Subsubsection
3103 hostmemory.readsqword(number address)
3104 \end_layout
3106 \begin_layout Standard
3107 Read signed quadword (8 elements) from given address.
3108  Slots out of range return false.
3109 \end_layout
3111 \begin_layout Subsubsection
3112 hostmemory.writesqword(number address, number value)
3113 \end_layout
3115 \begin_layout Standard
3116 Write signed quadword (8 elements) to given slot.
3117  Slot numbers out of range cause extension.
3118 \end_layout
3120 \begin_layout Subsection
3121 Table movie
3122 \end_layout
3124 \begin_layout Standard
3125 Movie handling
3126 \end_layout
3128 \begin_layout Subsubsection
3129 movie.currentframe()
3130 \end_layout
3132 \begin_layout Standard
3133 Return number of current frame.
3134 \end_layout
3136 \begin_layout Subsubsection
3137 movie.framecount()
3138 \end_layout
3140 \begin_layout Standard
3141 Return number of frames in movie.
3142 \end_layout
3144 \begin_layout Subsubsection
3145 movie.readonly()
3146 \end_layout
3148 \begin_layout Standard
3149 Return true if in readonly mode, false if in readwrite.
3150 \end_layout
3152 \begin_layout Subsubsection
3153 movie.set_readwrite()
3154 \end_layout
3156 \begin_layout Standard
3157 Set readwrite mode (does not cause on_readwrite callback).
3158 \end_layout
3160 \begin_layout Subsubsection
3161 movie.frame_subframes(number frame)
3162 \end_layout
3164 \begin_layout Standard
3165 Count number of subframes in specified frame (frame numbers are 1-based)
3166  and return that.
3167 \end_layout
3169 \begin_layout Subsubsection
3170 movie.read_subframe(number frame, number subframe)
3171 \end_layout
3173 \begin_layout Standard
3174 Read specifed subframe in specified frame and return data as array (100
3175  elements, numbered 0-99 currently).
3176 \end_layout
3178 \begin_layout Subsection
3179 Table settings
3180 \end_layout
3182 \begin_layout Standard
3183 Routines for settings manipulation
3184 \end_layout
3186 \begin_layout Subsubsection
3187 settings.get(string name)
3188 \end_layout
3190 \begin_layout Standard
3191 Get value of setting.
3192  If setting is blank, returns false.
3193  If setting value can't be obtained, returns (nil, error message).
3194 \end_layout
3196 \begin_layout Subsubsection
3197 settings.set(string name, string value)
3198 \end_layout
3200 \begin_layout Standard
3201 Set value of setting.
3202  If setting can't be set, returns (nil, error message).
3203 \end_layout
3205 \begin_layout Subsubsection
3206 settings.is_set(string name)
3207 \end_layout
3209 \begin_layout Standard
3210 Returns if setting is set.
3211  If setting does not exist, returns (nil, error message).
3212 \end_layout
3214 \begin_layout Subsubsection
3215 settings.blank(string name)
3216 \end_layout
3218 \begin_layout Standard
3219 Blanks a setting and returns true.
3220  If setting can't be blanked, returns (nil, error message).
3221 \end_layout
3223 \begin_layout Subsection
3224 Table memory
3225 \end_layout
3227 \begin_layout Standard
3228 Contains various functions for managing memory
3229 \end_layout
3231 \begin_layout Subsubsection
3232 memory.vma_count()
3233 \end_layout
3235 \begin_layout Standard
3236 Returns the number of VMAs
3237 \end_layout
3239 \begin_layout Subsubsection
3240 memory.read_vma(number index)
3241 \end_layout
3243 \begin_layout Standard
3244 Reads the specified VMA (indices start from zero).
3245  Trying to read invalid VMA gives nil.
3246  The read VMA is table with the following fields:
3247 \end_layout
3249 \begin_layout Itemize
3250 region_name (string): The readable name of the VMA
3251 \end_layout
3253 \begin_layout Itemize
3254 baseaddr (number): Base address of the VMA
3255 \end_layout
3257 \begin_layout Itemize
3258 lastaddr (number): Last address in the VMA.
3259 \end_layout
3261 \begin_layout Itemize
3262 size (number): The size of VMA in bytes.
3263 \end_layout
3265 \begin_layout Itemize
3266 readonly (boolean): True of the VMA corresponds to ROM.
3267 \end_layout
3269 \begin_layout Itemize
3270 native_endian (boolean): True if the VMA has native endian as opposed to
3271  little endian.
3272 \end_layout
3274 \begin_layout Subsubsection
3275 memory.find_vma(number address)
3276 \end_layout
3278 \begin_layout Standard
3279 Finds the VMA containing specified address.
3280  Returns table in the same format as read_vma or nil if not found.
3281 \end_layout
3283 \begin_layout Subsubsection
3284 memory.readbyte(number address)
3285 \end_layout
3287 \begin_layout Standard
3288 Reads the specified address as unsigned byte and returns the result.
3289 \end_layout
3291 \begin_layout Subsubsection
3292 memory.readsbyte(number address)
3293 \end_layout
3295 \begin_layout Standard
3296 Reads the specified address as signed byte and returns the result.
3297 \end_layout
3299 \begin_layout Subsubsection
3300 memory.writebyte(number address, number value)
3301 \end_layout
3303 \begin_layout Standard
3304 Writes the specified value (negative values undergo 2's complement) to specified
3305  address (as a byte).
3306 \end_layout
3308 \begin_layout Subsubsection
3309 memory.readword(number address)
3310 \end_layout
3312 \begin_layout Standard
3313 Reads the specified address as unsigned word and returns the result.
3314 \end_layout
3316 \begin_layout Subsubsection
3317 memory.readsword(number address)
3318 \end_layout
3320 \begin_layout Standard
3321 Reads the specified address as signed word and returns the result.
3322 \end_layout
3324 \begin_layout Subsubsection
3325 memory.writeword(number address, number value)
3326 \end_layout
3328 \begin_layout Standard
3329 Writes the specified value (negative values undergo 2's complement) to specified
3330  address (as a word).
3331 \end_layout
3333 \begin_layout Subsubsection
3334 memory.readdword(number address)
3335 \end_layout
3337 \begin_layout Standard
3338 Reads the specified address as unsigned doubleword and returns the result.
3339 \end_layout
3341 \begin_layout Subsubsection
3342 memory.readsdword(number address)
3343 \end_layout
3345 \begin_layout Standard
3346 Reads the specified address as signed doubleword and returns the result.
3347 \end_layout
3349 \begin_layout Subsubsection
3350 memory.writedword(number address, number value)
3351 \end_layout
3353 \begin_layout Standard
3354 Writes the specified value (negative values undergo 2's complement) to specified
3355  address (as a doubleword).
3356 \end_layout
3358 \begin_layout Subsubsection
3359 memory.readqword(number address)
3360 \end_layout
3362 \begin_layout Standard
3363 Reads the specified address as unsigned quadword and returns the result.
3364 \end_layout
3366 \begin_layout Subsubsection
3367 memory.readsqword(number address)
3368 \end_layout
3370 \begin_layout Standard
3371 Reads the specified address as signed quadword and returns the result.
3372 \end_layout
3374 \begin_layout Subsubsection
3375 memory.writeqword(number address, number value)
3376 \end_layout
3378 \begin_layout Standard
3379 Writes the specified value (negative values undergo 2's complement) to specified
3380  address (as a quadword).
3381 \end_layout
3383 \begin_layout Subsection
3384 Table _SYSTEM
3385 \end_layout
3387 \begin_layout Standard
3388 Contains copy of global variables from time of Lua initialization.
3389  Non-writeable.
3390 \end_layout
3392 \begin_layout Subsection
3393 Callbacks
3394 \end_layout
3396 \begin_layout Standard
3397 Various callbacks to Lua that can occur.
3398 \end_layout
3400 \begin_layout Subsubsection
3401 Callback: on_paint(bool not_synth)
3402 \end_layout
3404 \begin_layout Standard
3405 Called when screen is being painted.
3406  Any gui.* calls requiring graphic context draw on the screen.
3407 \end_layout
3409 \begin_layout Standard
3410 not_synth is true if this hook is being called in response to received frame,
3411  false otherwise.
3412 \end_layout
3414 \begin_layout Subsubsection
3415 Callback: on_video()
3416 \end_layout
3418 \begin_layout Standard
3419 Called when video dump frame is being painted.
3420  Any gui.* calls requiring graphic context draw on the video.
3421 \end_layout
3423 \begin_layout Subsubsection
3424 Callback: on_frame_emulated()
3425 \end_layout
3427 \begin_layout Standard
3428 Called when emulating frame has completed and on_paint()/on_video() calls
3429  are about to be issued.
3430 \end_layout
3432 \begin_layout Subsubsection
3433 Callback: on_frame()
3434 \end_layout
3436 \begin_layout Standard
3437 Called on each starting whole frame.
3438 \end_layout
3440 \begin_layout Subsubsection
3441 Callback: on_startup()
3442 \end_layout
3444 \begin_layout Standard
3445 Called when the emulator is starting (lsnes.rc and --run files has been run).
3446 \end_layout
3448 \begin_layout Subsubsection
3449 Callback: on_rewind()
3450 \end_layout
3452 \begin_layout Standard
3453 Called when rewind movie to beginning has completed.
3454 \end_layout
3456 \begin_layout Subsubsection
3457 Callback: on_pre_load(string name)
3458 \end_layout
3460 \begin_layout Standard
3461 Called just before savestate/movie load occurs (note: loads are always delayed,
3462  so this occurs even when load was initiated by lua).
3463 \end_layout
3465 \begin_layout Subsubsection
3466 Callback: on_err_load(string name)
3467 \end_layout
3469 \begin_layout Standard
3470 Called if loadstate goes wrong.
3471 \end_layout
3473 \begin_layout Subsubsection
3474 Callback: on_post_load(string name, boolean was_savestate)
3475 \end_layout
3477 \begin_layout Standard
3478 Called on successful loadstate.
3479  was_savestate gives if this was a savestate or a movie.
3480 \end_layout
3482 \begin_layout Subsubsection
3483 Callback: on_pre_save(string name, boolean is_savestate)
3484 \end_layout
3486 \begin_layout Standard
3487 Called just before savestate save occurs (note: movie saves are synchronous
3488  and won't trigger these callbacks if called from Lua).
3489 \end_layout
3491 \begin_layout Subsubsection
3492 Callback: on_err_save(string name)
3493 \end_layout
3495 \begin_layout Standard
3496 Called if savestate goes wrong.
3497 \end_layout
3499 \begin_layout Subsubsection
3500 Callback: on_post_save(string name, boolean is_savestate)
3501 \end_layout
3503 \begin_layout Standard
3504 Called on successful savaestate.
3505  is_savestate gives if this was a savestate or a movie.
3506 \end_layout
3508 \begin_layout Subsubsection
3509 Callback: on_quit()
3510 \end_layout
3512 \begin_layout Standard
3513 Called when emulator is shutting down.
3514 \end_layout
3516 \begin_layout Subsubsection
3517 Callback: on_input(boolean subframe)
3518 \end_layout
3520 \begin_layout Standard
3521 Called when emulator is just sending input to bsnes core.
3522  Warning: This is called even in readonly mode, but the results are ignored.
3523 \end_layout
3525 \begin_layout Subsubsection
3526 Callback: on_reset()
3527 \end_layout
3529 \begin_layout Standard
3530 Called when SNES is reset.
3531 \end_layout
3533 \begin_layout Subsubsection
3534 Callback: on_readwrite()
3535 \end_layout
3537 \begin_layout Standard
3538 Called when moving into readwrite mode as result of 
3539 \begin_inset Quotes eld
3540 \end_inset
3542 set-rwmode
3543 \begin_inset Quotes erd
3544 \end_inset
3546  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3547  entry protection).
3548 \end_layout
3550 \begin_layout Subsubsection
3551 Callback: on_snoop(number port, number controller, number index, number
3552  value)
3553 \end_layout
3555 \begin_layout Standard
3556 Called each time bsnes asks for input.
3557  The value is the final value to be sent to bsnes core (readonly mode, autohold
3558  and autofire have been taken into account).
3559  Might be useful when translating movies to format suitable for console
3560  verification.
3561  Note: There is no way to modify the value to be sent.
3562 \end_layout
3564 \begin_layout Subsubsection
3565 Callback: on_keyhook(string keyname, table state)
3566 \end_layout
3568 \begin_layout Standard
3569 Sent when key that has keyhook events requested changes state.
3570  Keyname is name of the key (group) and state is the state (same kind as
3571  table values in input.raw).
3572 \end_layout
3574 \begin_layout Subsubsection
3575 Callback: on_idle()
3576 \end_layout
3578 \begin_layout Standard
3579 Called when requested by set_idle_timeout(), the timeout has expired and
3580  emulator is waiting.
3581 \end_layout
3583 \begin_layout Subsubsection
3584 Callback: on_timer()
3585 \end_layout
3587 \begin_layout Standard
3588 Called when requested by set_idle_timeout() and the timeout has expired
3589  (regardless if emulator is waiting).
3590 \end_layout
3592 \begin_layout Section
3593 Memory watch expression syntax
3594 \end_layout
3596 \begin_layout Standard
3597 Memory watch expressions are in RPN (Reverse Polish Notation).
3598  At the end of expression, the top entry on stack is taken as the final
3599  result.
3600 \end_layout
3602 \begin_layout Standard
3603 Notations:
3604 \end_layout
3606 \begin_layout Itemize
3607 Evaluation order is strictly left to right.
3608 \end_layout
3610 \begin_layout Itemize
3611 a is the entry on top of stack
3612 \end_layout
3614 \begin_layout Itemize
3615 b is the entry immediately below top of stack
3616 \end_layout
3618 \begin_layout Itemize
3619 ; separates values to be pushed (no intermediate pop).
3620 \end_layout
3622 \begin_layout Itemize
3623 After end of element, all used stack slots are popped and all results are
3624  pushed.
3625 \end_layout
3627 \begin_layout Itemize
3628 When pushing multiple values, the pushes occur in order shown.
3629 \end_layout
3631 \begin_layout Standard
3632 The following operators are available:
3633 \end_layout
3635 \begin_layout Itemize
3636 + : a + b
3637 \end_layout
3639 \begin_layout Itemize
3640 - : a - b
3641 \end_layout
3643 \begin_layout Itemize
3644 * : a * b
3645 \end_layout
3647 \begin_layout Itemize
3648 / : a / b
3649 \end_layout
3651 \begin_layout Itemize
3652 % : a % b
3653 \end_layout
3655 \begin_layout Itemize
3656 a : atan(a)
3657 \end_layout
3659 \begin_layout Itemize
3660 b : read_signed_byte(a)
3661 \end_layout
3663 \begin_layout Itemize
3664 c : cos(a)
3665 \end_layout
3667 \begin_layout Itemize
3668 d : read_signed_dword(a)
3669 \end_layout
3671 \begin_layout Itemize
3672 i : quotent(a / b)
3673 \end_layout
3675 \begin_layout Itemize
3676 p :
3677 \begin_inset Formula $\pi$
3678 \end_inset
3681 \end_layout
3683 \begin_layout Itemize
3684 q : read_signed_qword(a)
3685 \end_layout
3687 \begin_layout Itemize
3688 r : sqrt(a)
3689 \end_layout
3691 \begin_layout Itemize
3692 s : sin(a)
3693 \end_layout
3695 \begin_layout Itemize
3696 t : tan(a)
3697 \end_layout
3699 \begin_layout Itemize
3700 u : a; a
3701 \end_layout
3703 \begin_layout Itemize
3704 w : read_signed_word(a)
3705 \end_layout
3707 \begin_layout Itemize
3708 A : atan2(a, b)
3709 \end_layout
3711 \begin_layout Itemize
3712 B : read_unsigned_byte(a)
3713 \end_layout
3715 \begin_layout Itemize
3716 C<number>z : Push number <number> to stack.
3717 \end_layout
3719 \begin_layout Itemize
3720 D : read_unsigned_dword(a)
3721 \end_layout
3723 \begin_layout Itemize
3724 C0x<number>z : Push number <number> (hexadecimal) to stack.
3725 \end_layout
3727 \begin_layout Itemize
3728 Q : read_unsigned_qword(a)
3729 \end_layout
3731 \begin_layout Itemize
3732 R<digit> : round a to <digit> digits.
3733 \end_layout
3735 \begin_layout Itemize
3736 W : read_unsigned_word(a)
3737 \end_layout
3739 \begin_layout Subsection
3740 Example:
3741 \end_layout
3743 \begin_layout Standard
3744 C0x007e0878zWC0x007e002czW-
3745 \end_layout
3747 \begin_layout Enumerate
3748 Push value 0x7e0878 on top of stack (C0x007e0878z).
3749 \end_layout
3751 \begin_layout Enumerate
3752 Pop the value on top of stack (0x7e0878), read word value at that address
3753  and push the result,call it x1 (W).
3754 \end_layout
3756 \begin_layout Enumerate
3757 Push value 0x7e002c on top of stack (C0x007e002cz).
3758 \end_layout
3760 \begin_layout Enumerate
3761 Pop the value on top of stack (0x7e002c), read word value at that address
3762  and push the result,call it x2 (W).
3763 \end_layout
3765 \begin_layout Enumerate
3766 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3767  x2 - x1 (-).
3768 \end_layout
3770 \begin_layout Enumerate
3771 Since the expression ends, the final memory watch result is the top one
3772  on stack, which is x2 - x1.
3773 \end_layout
3775 \begin_layout Section
3776 Modifier and key names:
3777 \end_layout
3779 \begin_layout Subsection
3780 SDL Platform
3781 \end_layout
3783 \begin_layout Subsubsection
3784 Modifier names
3785 \end_layout
3787 \begin_layout Standard
3788 Following modifier names are known:
3789 \end_layout
3791 \begin_layout Itemize
3792 ctrl, lctrl, rctrl: Control keys
3793 \end_layout
3795 \begin_layout Itemize
3796 alt, lalt, ralt: ALT keys.
3797 \end_layout
3799 \begin_layout Itemize
3800 shift, lshift, rshift: Shift keys.
3801 \end_layout
3803 \begin_layout Itemize
3804 meta, lmeta, rmeta: Meta keys.
3805 \end_layout
3807 \begin_layout Itemize
3808 num, caps: Numlock/Capslock (these are sticky!)
3809 \end_layout
3811 \begin_layout Itemize
3812 mode: Mode select.
3813 \end_layout
3815 \begin_layout Subsubsection
3816 Key names
3817 \end_layout
3819 \begin_layout Standard
3820 Following key names are known:
3821 \end_layout
3823 \begin_layout Itemize
3824 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3825  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3826  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3827  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3828  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3829  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3830  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3831  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3832  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3833  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3834  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3835  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3836  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3837  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3838  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3839  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3840  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3841  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3842  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3843  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3844  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3845  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3846  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3847  break, menu, power, euro, undo
3848 \end_layout
3850 \begin_layout Itemize
3851 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3852  hardware-dependent scan code of <n> (useful to bind those keys that don't
3853  have symbolic names).
3854 \end_layout
3856 \begin_layout Subsubsection
3857 Joystick pseudo-keys:
3858 \end_layout
3860 \begin_layout Itemize
3861 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3862 \end_layout
3864 \begin_layout Itemize
3865 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3866 \end_layout
3868 \begin_layout Itemize
3869 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3870 \end_layout
3872 \begin_layout Itemize
3873 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3874 \end_layout
3876 \begin_layout Itemize
3877 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3878 \end_layout
3880 \begin_layout Itemize
3881 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3882  position (axis modes axis and axis_inverse).
3883 \end_layout
3885 \begin_layout Itemize
3886 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3887  position (axis modes axis and axis_inverse).
3888 \end_layout
3890 \begin_layout Itemize
3891 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3892  modes pressure_*).
3893 \end_layout
3895 \begin_layout Subsubsection
3896 Special buttons:
3897 \end_layout
3899 \begin_layout Itemize
3900 Escape: Enter/Exit Command mode, cancel modal dialogs.
3901 \end_layout
3903 \begin_layout Itemize
3904 Return (also KPEnter): Execute command, ok modal dialog.
3905 \end_layout
3907 \begin_layout Itemize
3908 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
3909  history
3910 \end_layout
3912 \begin_layout Itemize
3913 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
3914  history
3915 \end_layout
3917 \begin_layout Itemize
3918 Home (also KP7 if no num lock; command mode): Beginning of command.
3919 \end_layout
3921 \begin_layout Itemize
3922 End (also KP1 if no num lock; command mode): End of command.
3923 \end_layout
3925 \begin_layout Itemize
3926 Left (also KP4 if no num lock; command mode): Move cursor left.
3927 \end_layout
3929 \begin_layout Itemize
3930 Right (also KP6 if no num lock; command mode): Move cursor right.
3931 \end_layout
3933 \begin_layout Itemize
3934 Delete (also KP.
3935  if no num lock; command mode): Delete character to right of cursor.
3936 \end_layout
3938 \begin_layout Itemize
3939 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3940  overwrite modes.
3941 \end_layout
3943 \begin_layout Itemize
3944 Backspace (command mode): Delete character to left of cursor.
3945 \end_layout
3947 \begin_layout Itemize
3948 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3949 \end_layout
3951 \begin_layout Subsection
3952 wxWidgets platform
3953 \end_layout
3955 \begin_layout Subsubsection
3956 Modifier names:
3957 \end_layout
3959 \begin_layout Standard
3960 Following modifier names are known:
3961 \end_layout
3963 \begin_layout Itemize
3965 \end_layout
3967 \begin_layout Itemize
3968 ctrl
3969 \end_layout
3971 \begin_layout Itemize
3972 shift 
3973 \end_layout
3975 \begin_layout Itemize
3976 meta
3977 \end_layout
3979 \begin_layout Itemize
3980 cmd (Mac OS X only)
3981 \end_layout
3983 \begin_layout Subsubsection
3984 Key names:
3985 \end_layout
3987 \begin_layout Standard
3988 Following key names are known:
3989 \end_layout
3991 \begin_layout Itemize
3992 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3993  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3994  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3995  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3996  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3997  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3998  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3999  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4000  pause, capital, end, home, lefT, up, right, down, select, print, execute,
4001  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4002  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4003  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4004  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4005  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4006  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4007  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4008  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4009  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4010  windows_right, windows_menu, command, special1, special2, special3, special4,
4011  special5, special6, special7, special8, special9, special10, special11,
4012  special12, special13, special14, special15, special16, special17, special18,
4013  special19, special20
4014 \end_layout
4016 \begin_layout Section
4017 Movie file format
4018 \end_layout
4020 \begin_layout Standard
4021 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4022  (note: If you recompress it, do not use compression methods other than
4023  store and deflate and especially do not use encryption of any kind).
4024 \end_layout
4026 \begin_layout Subsection
4027 Detecting clean start/SRAM/Savestate
4028 \end_layout
4030 \begin_layout Itemize
4031 If file has member 
4032 \begin_inset Quotes eld
4033 \end_inset
4035 savestate
4036 \begin_inset Quotes erd
4037 \end_inset
4039  it is savestate, otherwise:
4040 \end_layout
4042 \begin_layout Itemize
4043 If file has members with names starting 
4044 \begin_inset Quotes eld
4045 \end_inset
4047 moviesram.
4048 \begin_inset Quotes erd
4049 \end_inset
4051  it is movie starting from SRAM, otherwise:
4052 \end_layout
4054 \begin_layout Itemize
4055 It is movie starting from clear state.
4056 \end_layout
4058 \begin_layout Subsection
4059 Member: gametype
4060 \end_layout
4062 \begin_layout Standard
4063 Type of game ROM and region (as one line).
4064  Valid values are:
4065 \end_layout
4067 \begin_layout Standard
4068 \begin_inset Tabular
4069 <lyxtabular version="3" rows="8" columns="3">
4070 <features tabularvalignment="middle">
4071 <column alignment="center" valignment="top" width="0">
4072 <column alignment="center" valignment="top" width="0">
4073 <column alignment="center" valignment="top" width="0">
4074 <row>
4075 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4076 \begin_inset Text
4078 \begin_layout Plain Layout
4079 Value
4080 \end_layout
4082 \end_inset
4083 </cell>
4084 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4085 \begin_inset Text
4087 \begin_layout Plain Layout
4088 System
4089 \end_layout
4091 \end_inset
4092 </cell>
4093 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4094 \begin_inset Text
4096 \begin_layout Plain Layout
4097 Region
4098 \end_layout
4100 \end_inset
4101 </cell>
4102 </row>
4103 <row>
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4105 \begin_inset Text
4107 \begin_layout Plain Layout
4108 snes_pal
4109 \end_layout
4111 \end_inset
4112 </cell>
4113 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4114 \begin_inset Text
4116 \begin_layout Plain Layout
4117 Super NES
4118 \end_layout
4120 \end_inset
4121 </cell>
4122 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4123 \begin_inset Text
4125 \begin_layout Plain Layout
4127 \end_layout
4129 \end_inset
4130 </cell>
4131 </row>
4132 <row>
4133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4134 \begin_inset Text
4136 \begin_layout Plain Layout
4137 sgb_pal
4138 \end_layout
4140 \end_inset
4141 </cell>
4142 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4143 \begin_inset Text
4145 \begin_layout Plain Layout
4146 Super Game Boy
4147 \end_layout
4149 \end_inset
4150 </cell>
4151 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4152 \begin_inset Text
4154 \begin_layout Plain Layout
4156 \end_layout
4158 \end_inset
4159 </cell>
4160 </row>
4161 <row>
4162 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4163 \begin_inset Text
4165 \begin_layout Plain Layout
4166 snes_ntsc
4167 \end_layout
4169 \end_inset
4170 </cell>
4171 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4172 \begin_inset Text
4174 \begin_layout Plain Layout
4175 Super NES
4176 \end_layout
4178 \end_inset
4179 </cell>
4180 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4181 \begin_inset Text
4183 \begin_layout Plain Layout
4184 NTSC
4185 \end_layout
4187 \end_inset
4188 </cell>
4189 </row>
4190 <row>
4191 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4192 \begin_inset Text
4194 \begin_layout Plain Layout
4195 sgb_ntsc
4196 \end_layout
4198 \end_inset
4199 </cell>
4200 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4201 \begin_inset Text
4203 \begin_layout Plain Layout
4204 Super Game Boy
4205 \end_layout
4207 \end_inset
4208 </cell>
4209 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4210 \begin_inset Text
4212 \begin_layout Plain Layout
4213 NTSC
4214 \end_layout
4216 \end_inset
4217 </cell>
4218 </row>
4219 <row>
4220 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4221 \begin_inset Text
4223 \begin_layout Plain Layout
4225 \end_layout
4227 \end_inset
4228 </cell>
4229 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4230 \begin_inset Text
4232 \begin_layout Plain Layout
4233 BS-X (non-slotted)
4234 \end_layout
4236 \end_inset
4237 </cell>
4238 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4239 \begin_inset Text
4241 \begin_layout Plain Layout
4242 NTSC
4243 \end_layout
4245 \end_inset
4246 </cell>
4247 </row>
4248 <row>
4249 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4250 \begin_inset Text
4252 \begin_layout Plain Layout
4253 bsxslotted
4254 \end_layout
4256 \end_inset
4257 </cell>
4258 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4259 \begin_inset Text
4261 \begin_layout Plain Layout
4262 BS-X (slotted)
4263 \end_layout
4265 \end_inset
4266 </cell>
4267 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4268 \begin_inset Text
4270 \begin_layout Plain Layout
4271 NTSC
4272 \end_layout
4274 \end_inset
4275 </cell>
4276 </row>
4277 <row>
4278 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4279 \begin_inset Text
4281 \begin_layout Plain Layout
4282 sufamiturbo
4283 \end_layout
4285 \end_inset
4286 </cell>
4287 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4288 \begin_inset Text
4290 \begin_layout Plain Layout
4291 Sufami Turbo
4292 \end_layout
4294 \end_inset
4295 </cell>
4296 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4297 \begin_inset Text
4299 \begin_layout Plain Layout
4300 NTSC
4301 \end_layout
4303 \end_inset
4304 </cell>
4305 </row>
4306 </lyxtabular>
4308 \end_inset
4311 \end_layout
4313 \begin_layout Standard
4314 Frame rates are:
4315 \end_layout
4317 \begin_layout Standard
4318 \begin_inset Tabular
4319 <lyxtabular version="3" rows="3" columns="2">
4320 <features tabularvalignment="middle">
4321 <column alignment="center" valignment="top" width="0">
4322 <column alignment="center" valignment="top" width="0">
4323 <row>
4324 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4325 \begin_inset Text
4327 \begin_layout Plain Layout
4328 Region
4329 \end_layout
4331 \end_inset
4332 </cell>
4333 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4334 \begin_inset Text
4336 \begin_layout Plain Layout
4337 Framerate (fps)
4338 \end_layout
4340 \end_inset
4341 </cell>
4342 </row>
4343 <row>
4344 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4345 \begin_inset Text
4347 \begin_layout Plain Layout
4349 \end_layout
4351 \end_inset
4352 </cell>
4353 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4354 \begin_inset Text
4356 \begin_layout Plain Layout
4357 322445/6448
4358 \end_layout
4360 \end_inset
4361 </cell>
4362 </row>
4363 <row>
4364 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4365 \begin_inset Text
4367 \begin_layout Plain Layout
4368 NTSC
4369 \end_layout
4371 \end_inset
4372 </cell>
4373 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4374 \begin_inset Text
4376 \begin_layout Plain Layout
4377 10738636/178683
4378 \end_layout
4380 \end_inset
4381 </cell>
4382 </row>
4383 </lyxtabular>
4385 \end_inset
4388 \end_layout
4390 \begin_layout Subsection
4391 Member: port1
4392 \end_layout
4394 \begin_layout Standard
4395 Contains type of port #1 (as one line).
4396  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4397  If not present, defaults to 'gamepad'.
4398 \end_layout
4400 \begin_layout Subsection
4401 Member: port2
4402 \end_layout
4404 \begin_layout Standard
4405 Contains type of port #2 (as one line).
4406  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4407  'justifier' and 'justifiers'.
4408  If not present, defaults to 'none'.
4409 \end_layout
4411 \begin_layout Subsection
4412 Member: gamename
4413 \end_layout
4415 \begin_layout Standard
4416 Contains name of the game (as one line).
4417 \end_layout
4419 \begin_layout Subsection
4420 Member: authors
4421 \end_layout
4423 \begin_layout Standard
4424 Contains authors, one per line.
4425  Part before '|' is the full name, part after is the nickname.
4426 \end_layout
4428 \begin_layout Subsection
4429 Member: systemid
4430 \end_layout
4432 \begin_layout Standard
4433 Always 
4434 \begin_inset Quotes eld
4435 \end_inset
4437 lsnes-rr1
4438 \begin_inset Quotes erd
4439 \end_inset
4441  (one line).
4442  Used to reject other saves.
4443 \end_layout
4445 \begin_layout Subsection
4446 Member: controlsversion
4447 \end_layout
4449 \begin_layout Standard
4450 Always 
4451 \begin_inset Quotes eld
4452 \end_inset
4455 \begin_inset Quotes erd
4456 \end_inset
4458  (one line).
4459  Used to identify what controls are there.
4460 \end_layout
4462 \begin_layout Subsection
4463 Member: 
4464 \begin_inset Quotes eld
4465 \end_inset
4467 coreversion
4468 \begin_inset Quotes erd
4469 \end_inset
4472 \end_layout
4474 \begin_layout Standard
4475 Contains bsnes core version number (as one line).
4476 \end_layout
4478 \begin_layout Subsection
4479 Member: projectid
4480 \end_layout
4482 \begin_layout Standard
4483 Contains project ID (as one line).
4484  Used to identify if two movies are part of the same project.
4485 \end_layout
4487 \begin_layout Subsection
4488 Member: {rom,slota,slotb}{,xml}.sha256
4489 \end_layout
4491 \begin_layout Standard
4492 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4493  Absent if corresponding file is absent.
4494 \end_layout
4496 \begin_layout Subsection
4497 Member: moviesram.<name>
4498 \end_layout
4500 \begin_layout Standard
4501 Raw binary startup SRAM of kind <name>.
4502  Only present in savestates and movies starting from SRAM.
4503 \end_layout
4505 \begin_layout Subsection
4506 Member: saveframe
4507 \end_layout
4509 \begin_layout Standard
4510 Contains frame number (as one line) of frame movie was saved on.
4511  Only present in savestates.
4512 \end_layout
4514 \begin_layout Subsection
4515 Member: lagcounter
4516 \end_layout
4518 \begin_layout Standard
4519 Current value of lag counter (as one line).
4520  Only present in savestates.
4521 \end_layout
4523 \begin_layout Subsection
4524 Member: pollcounters
4525 \end_layout
4527 \begin_layout Standard
4528 Contains poll counters (currently 100 of them), one per line.
4529  Each line is raw poll count if DRDY is set for it.
4530  Otherwise it is negative poll count minus one.
4531  Only present in savestates.
4532 \end_layout
4534 \begin_layout Subsection
4535 Member: hostmemory
4536 \end_layout
4538 \begin_layout Standard
4539 Raw binary dump of host memory.
4540  Only present in savestates.
4541 \end_layout
4543 \begin_layout Subsection
4544 Member: savestate
4545 \end_layout
4547 \begin_layout Standard
4548 The raw binary savestate itself.
4549  Savestate detection uses this file, only present in savestates.
4550 \end_layout
4552 \begin_layout Subsection
4553 Member: screenshot
4554 \end_layout
4556 \begin_layout Standard
4557 Screenshot of current frame.
4558  Only present in savestates.
4559  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4560  data.
4561  Height of image is inferred from the width and size of data.
4562 \end_layout
4564 \begin_layout Subsection
4565 Member: sram.<name>
4566 \end_layout
4568 \begin_layout Standard
4569 Raw binary SRAM of kind <name> at time of savestate.
4570  Only present in savestates.
4571 \end_layout
4573 \begin_layout Subsection
4574 Member: input
4575 \end_layout
4577 \begin_layout Standard
4578 The actual input track, one line per subframe (blank lines are skipped).
4579 \end_layout
4581 \begin_layout Itemize
4582 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4583  part of same frame as previous, otherwise it starts a new frame.
4584 \end_layout
4586 \begin_layout Itemize
4587 First subframe must start a new frame.
4588 \end_layout
4590 \begin_layout Standard
4591 Length of movie in frames is number of lines in input file that start a
4592  new frame.
4593 \end_layout
4595 \begin_layout Subsection
4596 Member: rerecords
4597 \end_layout
4599 \begin_layout Standard
4600 Contains textual base-10 rerecord count (as one line; emulator just writes
4601  this, it doesn't read it) + 1.
4602 \end_layout
4604 \begin_layout Subsection
4605 Member: rrdata
4606 \end_layout
4608 \begin_layout Standard
4609 This member stores set of load IDs.
4610  There is one load ID per rerecord (plus one corresponding to start of project).
4611 \end_layout
4613 \begin_layout Itemize
4614 This member constists of concatenation of records
4615 \end_layout
4617 \begin_layout Itemize
4618 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4619  IDs.
4620 \end_layout
4622 \begin_layout Itemize
4623 IDs are interpretted as 256-bit big-endian integers with warparound.
4624 \end_layout
4626 \begin_layout Itemize
4627 Initial predicted ID is all zeroes.
4628 \end_layout
4630 \begin_layout Standard
4631 Format of each record is:
4632 \end_layout
4634 \begin_layout Itemize
4635 1 byte: Opcode byte.
4636  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4637  Bit 7 is unused.
4638 \end_layout
4640 \begin_layout Itemize
4641 32-prefixlen bytes of ID.
4642 \end_layout
4644 \begin_layout Itemize
4645 countlen bytes of big-endian count (count).
4646 \end_layout
4648 \begin_layout Standard
4649 Records are processed as follows:
4650 \end_layout
4652 \begin_layout Itemize
4653 To form the first ID encoded by record, take the first prefixlen bytes predicted
4654  ID and append the read ID value to it.
4655  The result is the first ID encoded.
4656 \end_layout
4658 \begin_layout Itemize
4659 If countlen is 0, record encodes 1 ID.
4660 \end_layout
4662 \begin_layout Itemize
4663 If countlen is 1, record encodes 2+count IDs.
4664 \end_layout
4666 \begin_layout Itemize
4667 If countlen is 2, record encodes 258+count IDs.
4668 \end_layout
4670 \begin_layout Itemize
4671 If countlen is 3, record encodes 65794+count IDs.
4672 \end_layout
4674 \begin_layout Itemize
4675 The new predicted ID is the next ID after last one encoded by the record.
4676 \end_layout
4678 \begin_layout Standard
4679 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4680  by all records.
4681 \end_layout
4683 \begin_layout Subsection
4684 Member: starttime.second
4685 \end_layout
4687 \begin_layout Standard
4688 Movie starting time, second part.
4689  Epoch is Unix epoch.
4690  Default is 1,000,000,000.
4691 \end_layout
4693 \begin_layout Subsection
4694 Member: starttime.subsecond
4695 \end_layout
4697 \begin_layout Standard
4698 Movie starting time, subsecond part.
4699  Unit is CPU clocks.
4700  Default is 0.
4701 \end_layout
4703 \begin_layout Subsection
4704 Member: savetime.second
4705 \end_layout
4707 \begin_layout Standard
4708 Movie saving time, second part.
4709  Default is starttime.second.
4710  Only present in savestates.
4711 \end_layout
4713 \begin_layout Subsection
4714 Member: savetime.subsecond
4715 \end_layout
4717 \begin_layout Standard
4718 Movie saving time, subsecond part.
4719  Default is starttime.subsecond.
4720  Only present in savestates.
4721 \end_layout
4723 \begin_layout Section
4724 Quick'n'dirty encode guide
4725 \end_layout
4727 \begin_layout Enumerate
4728 Start the emulator and load the movie file.
4729 \end_layout
4731 \begin_layout Enumerate
4732 Set large AVI option 'set-setting avi-large on'
4733 \end_layout
4735 \begin_layout Enumerate
4736 Enable dumping 'dump-avi tmpdump' 
4737 \end_layout
4739 \begin_layout Enumerate
4740 Unpause and let it run until you want to end dumping.
4741 \end_layout
4743 \begin_layout Enumerate
4744 Close the emulator (closing the window is the easiest way).
4745  Or use 'end-avi'.
4746 \end_layout
4748 \begin_layout Enumerate
4749 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4750  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4751 \end_layout
4753 \begin_layout Enumerate
4754 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4755 \end_layout
4757 \begin_layout Enumerate
4758 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4759  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4760 \end_layout
4762 \begin_layout Enumerate
4763 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4764  Now final.mkv contains quick'n'dirty encode.
4765 \end_layout
4767 \begin_layout Section
4768 Axis configurations for some gamepad types:
4769 \end_layout
4771 \begin_layout Subsection
4772 XBox360 controller:
4773 \end_layout
4775 \begin_layout Standard
4776 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4777 \end_layout
4779 \begin_layout LyX-Code
4780 set-axis joystick0axis2 pressure-+
4781 \end_layout
4783 \begin_layout LyX-Code
4784 set-axis joystick0axis5 pressure-+
4785 \end_layout
4787 \begin_layout Itemize
4788 This is needed for SDL only.
4789  EVDEV sets those types correctly.
4790 \end_layout
4792 \begin_layout Subsection
4793 PS3 
4794 \begin_inset Quotes eld
4795 \end_inset
4797 sixaxis
4798 \begin_inset Quotes erd
4799 \end_inset
4801  controller:
4802 \end_layout
4804 \begin_layout Standard
4805 Axes 8-19 should be disabled.
4806 \end_layout
4808 \begin_layout LyX-Code
4809 set-axis joystick0axis8 disabled
4810 \end_layout
4812 \begin_layout LyX-Code
4813 set-axis joystick0axis9 disabled
4814 \end_layout
4816 \begin_layout LyX-Code
4817 set-axis joystick0axis10 disabled
4818 \end_layout
4820 \begin_layout LyX-Code
4821 set-axis joystick0axis11 disabled
4822 \end_layout
4824 \begin_layout LyX-Code
4825 set-axis joystick0axis12 disabled
4826 \end_layout
4828 \begin_layout LyX-Code
4829 set-axis joystick0axis13 disabled
4830 \end_layout
4832 \begin_layout LyX-Code
4833 set-axis joystick0axis14 disabled
4834 \end_layout
4836 \begin_layout LyX-Code
4837 set-axis joystick0axis15 disabled
4838 \end_layout
4840 \begin_layout LyX-Code
4841 set-axis joystick0axis16 disabled
4842 \end_layout
4844 \begin_layout LyX-Code
4845 set-axis joystick0axis17 disabled
4846 \end_layout
4848 \begin_layout LyX-Code
4849 set-axis joystick0axis18 disabled
4850 \end_layout
4852 \begin_layout LyX-Code
4853 set-axis joystick0axis19 disabled
4854 \end_layout
4856 \begin_layout Section
4857 Errata:
4858 \end_layout
4860 \begin_layout Subsection
4861 Problems from BSNES core:
4862 \end_layout
4864 \begin_layout Itemize
4865 The whole pending save stuff.
4866 \end_layout
4868 \begin_layout Itemize
4869 Lack of layer hiding.
4870 \end_layout
4872 \begin_layout Itemize
4873 It is slow (especially accuracy).
4874 \end_layout
4876 \begin_layout Itemize
4877 Firmwares can't be loaded from ZIP archives.
4878 \end_layout
4880 \begin_layout Subsection
4881 Other problems:
4882 \end_layout
4884 \begin_layout Itemize
4885 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4886 \end_layout
4888 \begin_layout Itemize
4889 Audio for last dumped frame is not itself dumped.
4890 \end_layout
4892 \begin_layout Itemize
4893 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4894 \end_layout
4896 \begin_layout Itemize
4897 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4898 \end_layout
4900 \begin_layout Itemize
4901 No menus, command based interface (SDL).
4902 \end_layout
4904 \begin_layout Itemize
4905 Long commands don't scroll.
4906 \end_layout
4908 \begin_layout Itemize
4909 Wxwidgets UI is still buggy.
4910 \end_layout
4912 \begin_layout Section
4913 Changelog:
4914 \end_layout
4916 \begin_layout Subsection
4917 rr0-beta1
4918 \end_layout
4920 \begin_layout Itemize
4921 Fix -Wall warnings
4922 \end_layout
4924 \begin_layout Itemize
4925 Fix dumper video corruption with levels 10-18.
4926 \end_layout
4928 \begin_layout Subsection
4929 rr0-beta2
4930 \end_layout
4932 \begin_layout Itemize
4933 Autofire
4934 \end_layout
4936 \begin_layout Itemize
4937 Lots of code cleanups
4938 \end_layout
4940 \begin_layout Itemize
4941 Lua interface to settings
4942 \end_layout
4944 \begin_layout Itemize
4945 Allow specifying AVI borders without Lua
4946 \end_layout
4948 \begin_layout Itemize
4949 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4950 \end_layout
4952 \begin_layout Itemize
4953 on_snoop lua callback
4954 \end_layout
4956 \begin_layout Itemize
4957 Faster movie loading and saving.
4958 \end_layout
4960 \begin_layout Subsection
4961 rr0-beta3
4962 \end_layout
4964 \begin_layout Itemize
4965 Joystick support
4966 \end_layout
4968 \begin_layout Subsection
4969 rr0-beta4
4970 \end_layout
4972 \begin_layout Itemize
4973 Fix multi-buttons
4974 \end_layout
4976 \begin_layout Itemize
4977 Save jukebox functionality.
4978 \end_layout
4980 \begin_layout Subsection
4981 rr0-beta5
4982 \end_layout
4984 \begin_layout Itemize
4985 Try to fix some nasty failing movie load edge cases
4986 \end_layout
4988 \begin_layout Itemize
4989 Allow specifying scripts to run on command line.
4990 \end_layout
4992 \begin_layout Subsection
4993 rr0-beta6
4994 \end_layout
4996 \begin_layout Itemize
4997 Major source code reorganization.
4998 \end_layout
5000 \begin_layout Itemize
5001 Backup savestates before overwriting.
5002 \end_layout
5004 \begin_layout Itemize
5005 Don't crash if loading initial state fails.
5006 \end_layout
5008 \begin_layout Subsection
5009 rr0-beta7
5010 \end_layout
5012 \begin_layout Itemize
5013 Fix firmware lookup
5014 \end_layout
5016 \begin_layout Itemize
5017 Fix author name parsing
5018 \end_layout
5020 \begin_layout Itemize
5021 Fix rerecord counting
5022 \end_layout
5024 \begin_layout Itemize
5025 (SDL) Print messages to console if SDL is uninitialized
5026 \end_layout
5028 \begin_layout Itemize
5029 Add movieinfo program
5030 \end_layout
5032 \begin_layout Itemize
5033 Fix loading movies starting from SRAM.
5034 \end_layout
5036 \begin_layout Subsection
5037 rr0-beta8
5038 \end_layout
5040 \begin_layout Itemize
5041 Add support for unattended dumping
5042 \end_layout
5044 \begin_layout Itemize
5045 Fix compiling for Win32
5046 \end_layout
5048 \begin_layout Itemize
5049 Don't lock up if sound can't be initialized
5050 \end_layout
5052 \begin_layout Itemize
5053 Strip trailing CR from commands
5054 \end_layout
5056 \begin_layout Itemize
5057 Don't try to do dubious things in global ctors (fix crash on startup)
5058 \end_layout
5060 \begin_layout Subsection
5061 rr0-beta9
5062 \end_layout
5064 \begin_layout Itemize
5065 Small documentation tweaking
5066 \end_layout
5068 \begin_layout Itemize
5069 Fix make clean
5070 \end_layout
5072 \begin_layout Itemize
5073 Fix major bug in modifier matching
5074 \end_layout
5076 \begin_layout Subsection
5077 rr0-beta10
5078 \end_layout
5080 \begin_layout Itemize
5081 Lots of documentation fixes
5082 \end_layout
5084 \begin_layout Itemize
5085 Use dedicated callbacks for event backcomm., not commands.
5086 \end_layout
5088 \begin_layout Itemize
5089 Ensure that the watchdog is not hit when executing delayed reset.
5090 \end_layout
5092 \begin_layout Itemize
5093 Remove errant tab from joystick message.
5094 \end_layout
5096 \begin_layout Subsection
5097 rr0-beta11
5098 \end_layout
5100 \begin_layout Itemize
5101 Make autofire operate in absolute time, not linear time
5102 \end_layout
5104 \begin_layout Itemize
5105 Reinitialize controls when resuming from loadstate
5106 \end_layout
5108 \begin_layout Itemize
5109 Some more code cleanups
5110 \end_layout
5112 \begin_layout Itemize
5113 If Lua allocator fails, call OOM_panic()
5114 \end_layout
5116 \begin_layout Itemize
5117 Byte/word/dword/qword sized host memory write/read functions.
5118 \end_layout
5120 \begin_layout Itemize
5121 Dump at correct framerate if dumping interlaced NTSC (height=448).
5122 \end_layout
5124 \begin_layout Subsection
5125 rr0-beta12
5126 \end_layout
5128 \begin_layout Itemize
5129 Actually include the complete source code
5130 \end_layout
5132 \begin_layout Itemize
5133 Keep track of RTC
5134 \end_layout
5136 \begin_layout Subsection
5137 rr0-beta13
5138 \end_layout
5140 \begin_layout Itemize
5141 Document {save,start}time.{,sub}second.
5142 \end_layout
5144 \begin_layout Itemize
5145 Intercept time() from bsnes core.
5146 \end_layout
5148 \begin_layout Subsection
5149 rr0-beta14
5150 \end_layout
5152 \begin_layout Itemize
5153 Allow disabling time() interception (allow build on Mac OS X)
5154 \end_layout
5156 \begin_layout Itemize
5157 Use SDLMain on Mac OS X (make SDL not crash)
5158 \end_layout
5160 \begin_layout Itemize
5161 Disable delayed resets (just plain too buggy for now).
5162 \end_layout
5164 \begin_layout Itemize
5165 Code cleanups
5166 \end_layout
5168 \begin_layout Itemize
5169 Use 16-bit for graphics/video instead of 32-bit.
5170 \end_layout
5172 \begin_layout Itemize
5173 gui.rectangle/gui.pixel
5174 \end_layout
5176 \begin_layout Itemize
5177 gui.crosshair
5178 \end_layout
5180 \begin_layout Itemize
5181 New CSCD writer implementation.
5182 \end_layout
5184 \begin_layout Subsection
5185 rr0-beta15
5186 \end_layout
5188 \begin_layout Itemize
5189 Fix interaction of * and +.
5190 \end_layout
5192 \begin_layout Itemize
5193 Manual improvements
5194 \end_layout
5196 \begin_layout Itemize
5197 Use gettimeofday()/usleep(), these seem portable enough.
5198 \end_layout
5200 \begin_layout Itemize
5201 Move joystick axis manipulation to keymapper code.
5202 \end_layout
5204 \begin_layout Itemize
5205 Changes to how read-only works.
5206 \end_layout
5208 \begin_layout Itemize
5209 Refactor controller input code.
5210 \end_layout
5212 \begin_layout Subsection
5213 rr0-beta16
5214 \end_layout
5216 \begin_layout Itemize
5217 Fix mouseclick scale compensation.
5218 \end_layout
5220 \begin_layout Itemize
5221 Draw area boundaries correctly in SDL code.
5222 \end_layout
5224 \begin_layout Itemize
5225 gui.screenshot.
5226 \end_layout
5228 \begin_layout Itemize
5229 Fix CSCD output (buffer overrun and race condition).
5230 \end_layout
5232 \begin_layout Subsection
5233 rr0-beta17
5234 \end_layout
5236 \begin_layout Itemize
5237 JMD dumping support.
5238 \end_layout
5240 \begin_layout Itemize
5241 Allow unattended dumping to JMD.
5242 \end_layout
5244 \begin_layout Itemize
5245 Move to BSNES v083.
5246 \end_layout
5248 \begin_layout Itemize
5249 Switch back to 32-bit colors.
5250 \end_layout
5252 \begin_layout Itemize
5253 Add Lua function gui.color.
5254 \end_layout
5256 \begin_layout Itemize
5257 Use some new C++11 features in GCC 4.6.
5258 \end_layout
5260 \begin_layout Itemize
5261 Be prepared for core frequency changes.
5262 \end_layout
5264 \begin_layout Itemize
5265 Pass colors in one chunk from Lua.
5266 \end_layout
5268 \begin_layout Subsection
5269 rr0-beta18
5270 \end_layout
5272 \begin_layout Itemize
5273 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5274  memory.read_vma() and memory.find_vma().
5275 \end_layout
5277 \begin_layout Itemize
5278 Numerious documentation fixups
5279 \end_layout
5281 \begin_layout Itemize
5282 RTC time format changed
5283 \end_layout
5285 \begin_layout Itemize
5286 Reformat flags display
5287 \end_layout
5289 \begin_layout Itemize
5290 Allow lua package name to be overridden
5291 \end_layout
5293 \begin_layout Itemize
5294 SDUMP (high-quality dumping).
5295 \end_layout
5297 \begin_layout Itemize
5298 Split platform support to plugins.
5299 \end_layout
5301 \begin_layout Itemize
5302 Make all sound plugins support basic sound commands
5303 \end_layout
5305 \begin_layout Itemize
5306 Support portaudio for sound.
5307 \end_layout
5309 \begin_layout Itemize
5310 Allow disable Lua/SDL searching.
5311 \end_layout
5313 \begin_layout Itemize
5314 Upconvert colors when copying lcscreen to screen.
5315 \end_layout
5317 \begin_layout Itemize
5318 Reorganize source tree.
5319 \end_layout
5321 \begin_layout Itemize
5322 Evdev joystick support.
5323 \end_layout
5325 \begin_layout Itemize
5326 Refactor more code into generic window code.
5327 \end_layout
5329 \begin_layout Subsection
5330 rr0-beta19
5331 \end_layout
5333 \begin_layout Itemize
5334 Refactor message handling.
5335 \end_layout
5337 \begin_layout Itemize
5338 Rework makefile
5339 \end_layout
5341 \begin_layout Itemize
5342 Documentation fixes
5343 \end_layout
5345 \begin_layout Itemize
5346 Finish pending saves before load/quit.
5347 \end_layout
5349 \begin_layout Itemize
5350 Wxwidgets graphics plugin.
5351 \end_layout
5353 \begin_layout Subsection
5354 rr0-beta20
5355 \end_layout
5357 \begin_layout Itemize
5358 Get rid of win32-crap.[ch]pp.
5359 \end_layout
5361 \begin_layout Itemize
5362 Move files around a lot.
5363 \end_layout
5365 \begin_layout Itemize
5366 Get rid of need for host C++ compiler.
5367 \end_layout
5369 \begin_layout Itemize
5370 Bsnes v084 core.
5371 \end_layout
5373 \begin_layout Itemize
5374 Refactor inter-component communication.
5375 \end_layout
5377 \begin_layout Itemize
5378 Fix zero luma.
5379 \end_layout
5381 \begin_layout Itemize
5382 Fix crash on multiline aliases.
5383 \end_layout
5385 \begin_layout Itemize
5386 Load/Save settings in wxwidgets gui.
5387 \end_layout
5389 \begin_layout Subsection
5390 rr0-beta21
5391 \end_layout
5393 \begin_layout Itemize
5394 Patch problems in bsnes core
5395 \end_layout
5397 \begin_layout Itemize
5398 SNES is little-endian, not big-endian!
5399 \end_layout
5401 \begin_layout Itemize
5402 Fix memory corruption in lcscreen::load()
5403 \end_layout
5405 \begin_layout Subsection
5406 rr0-beta22
5407 \end_layout
5409 \begin_layout Itemize
5410 Fix interpretting repeat counts in rrdata loading.
5411 \end_layout
5413 \begin_layout Itemize
5414 New lua callback: on_frame()
5415 \end_layout
5417 \begin_layout Itemize
5418 Remove calls to runtosave() that aren't supposed to be there
5419 \end_layout
5421 \begin_layout Itemize
5422 Lua function: movie.read_rtc()
5423 \end_layout
5425 \begin_layout Itemize
5426 Ignore src/fonts/font.cpp
5427 \end_layout
5429 \begin_layout Itemize
5430 Fix more bsnes core problems
5431 \end_layout
5433 \begin_layout Itemize
5434 Control bsnes random seeding
5435 \end_layout
5437 \begin_layout Itemize
5438 Pause-on-end
5439 \end_layout
5441 \begin_layout Itemize
5442 Some bsnes core debugging features (state dump and state hash)
5443 \end_layout
5445 \begin_layout Itemize
5446 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5447  it was 'lsnes rr0-beta21').
5448 \end_layout
5450 \begin_layout Subsection
5451 rr0-beta23
5452 \end_layout
5454 \begin_layout Itemize
5455 Fix memory corruption due to macro/field mixup
5456 \end_layout
5458 \begin_layout Itemize
5459 search-memory update
5460 \end_layout
5462 \begin_layout Itemize
5463 Allow direct-mapped framebuffer
5464 \end_layout
5466 \begin_layout Itemize
5467 SDL: Use SDL_ANYFORMAT if possible
5468 \end_layout
5470 \begin_layout Itemize
5471 SDMP2SOX: 2s delay modes.
5472 \end_layout
5474 \begin_layout Itemize
5475 Wxwidgets: Cleanups
5476 \end_layout
5478 \begin_layout Itemize
5479 Use sed -E, not sed -r.
5480  Fixes building on Mac OS X.
5481 \end_layout
5483 \begin_layout Itemize
5484 Wxwidgets: Save jukebox on exit
5485 \end_layout
5487 \begin_layout Itemize
5488 Fix RTC if using load-movie on savestate.
5489 \end_layout
5491 \begin_layout Itemize
5492 Fix crash related to full console mode.
5493 \end_layout
5495 \begin_layout Subsection
5496 rr0-beta24
5497 \end_layout
5499 \begin_layout Itemize
5500 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5501 \end_layout
5503 \begin_layout Itemize
5504 Wxwidgets: Allow compiling on Mac OS X.
5505 \end_layout
5507 \begin_layout Itemize
5508 Use movie compare instead of movie hashing (faster save/load).
5509 \end_layout
5511 \begin_layout Itemize
5512 Lua: _SYSTEM table.
5513 \end_layout
5515 \begin_layout Subsection
5516 rr0-beta25
5517 \end_layout
5519 \begin_layout Itemize
5520 sdmp2sox: Pad soundtrack if using -l or -L.
5521 \end_layout
5523 \begin_layout Itemize
5524 sdmp2sox: Fix NTSC overscan.
5525 \end_layout
5527 \begin_layout Itemize
5528 sdmp2sox: Add AR correction mode.
5529 \end_layout
5531 \begin_layout Itemize
5532 call lua_close() when exiting.
5533 \end_layout
5535 \begin_layout Itemize
5536 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5537 \end_layout
5539 \begin_layout Subsection
5540 rr0-beta26
5541 \end_layout
5543 \begin_layout Itemize
5544 Fix IPS patching code (use bsnes core IPS patcher).
5545 \end_layout
5547 \begin_layout Itemize
5548 Implement BPS patching (using bsnes core IPS patcher).
5549 \end_layout
5551 \begin_layout Itemize
5552 Add feature to load headered ROMs.
5553 \end_layout
5555 \begin_layout Subsection
5556 rr0-beta27
5557 \end_layout
5559 \begin_layout Itemize
5560 Show command names when showing keybindings
5561 \end_layout
5563 \begin_layout Subsection
5565 \end_layout
5567 \begin_layout Itemize
5568 Fix pause-on-end to be actually controllable
5569 \end_layout
5571 \begin_layout Itemize
5572 SDL: Poll all events in queue, not just first one (fixes slowness in command
5573  typing)
5574 \end_layout
5576 \begin_layout Itemize
5577 Wxwidgets: Fix ROM loading.
5578 \end_layout
5580 \begin_layout Subsection
5581 rr1-beta0
5582 \end_layout
5584 \begin_layout Itemize
5585 Lua: Add gui.textH, gui.textV, gui.textHV
5586 \end_layout
5588 \begin_layout Itemize
5589 Fix text colors on SDL on Mac OS X
5590 \end_layout
5592 \begin_layout Itemize
5593 Mode 'F' for finished in readonly mode.
5594 \end_layout
5596 \begin_layout Itemize
5597 Fix some WS errors.
5598 \end_layout
5600 \begin_layout Itemize
5601 Reliably pause after skip poll
5602 \end_layout
5604 \begin_layout Itemize
5605 Split UI and core into their own threads
5606 \end_layout
5608 \begin_layout Subsection
5609 rr1-beta1
5610 \end_layout
5612 \begin_layout Itemize
5613 Remove leftover dummy SRAM slot
5614 \end_layout
5616 \begin_layout Itemize
5617 Fix controller numbers.
5618 \end_layout
5620 \begin_layout Subsection
5621 rr1-beta2
5622 \end_layout
5624 \begin_layout Itemize
5625 Fix lsnes-dumpavi after interface change.
5626 \end_layout
5628 \begin_layout Itemize
5629 Also give BSNES patches for v085.
5630 \end_layout
5632 \begin_layout Itemize
5633 Pack movie data in memory.
5634 \end_layout
5636 \begin_layout Subsection
5637 rr1-beta3
5638 \end_layout
5640 \begin_layout Itemize
5641 Fix framecount/length given when loading movies.
5642 \end_layout
5644 \begin_layout Itemize
5645 Controller command memory leak fixes.
5646 \end_layout
5648 \begin_layout Itemize
5649 Don't leak palette if freeing screen object.
5650 \end_layout
5652 \begin_layout Subsection
5653 rr1-beta4
5654 \end_layout
5656 \begin_layout Itemize
5657 Detect revisions.
5658 \end_layout
5660 \begin_layout Itemize
5661 Wxwidgets: Allow controlling dumper from the menu.
5662 \end_layout
5664 \begin_layout Subsection
5665 rr1-beta5
5666 \end_layout
5668 \begin_layout Itemize
5669 Rewrite parts of manual
5670 \end_layout
5672 \begin_layout Itemize
5673 Lua: Make it work with Lua 5.2.
5674 \end_layout
5676 \begin_layout Subsection
5677 rr1-beta6
5678 \end_layout
5680 \begin_layout Itemize
5681 Win32: Fix compile errors.
5682 \end_layout
5684 \begin_layout Subsection
5685 rr1-beta7
5686 \end_layout
5688 \begin_layout Itemize
5689 Refactor controller input code.
5690 \end_layout
5692 \begin_layout Itemize
5693 Fix crash when using command line on SDL / Mac OS X.
5694 \end_layout
5696 \begin_layout Subsection
5697 rr1-beta8
5698 \end_layout
5700 \begin_layout Itemize
5701 Delete core/coroutine (obsolete)
5702 \end_layout
5704 \begin_layout Itemize
5705 Lag input display by one frame.
5706 \end_layout
5708 \begin_layout Itemize
5709 Rewind movie to beginning function.
5710 \end_layout
5712 \begin_layout Itemize
5713 Fix wrong frame number reported to Lua when repainting after loadstate
5714 \end_layout
5716 \begin_layout Itemize
5717 Support UI editing of jukebox
5718 \end_layout
5720 \begin_layout Itemize
5721 Wxwidgets: Save settings on exit.
5722 \end_layout
5724 \begin_layout Itemize
5725 Support ${project} for filenames
5726 \end_layout
5728 \begin_layout Itemize
5729 SDL: Fix command history
5730 \end_layout
5732 \begin_layout Subsection
5733 rr1-beta9
5734 \end_layout
5736 \begin_layout Itemize
5737 Fix some order-of-global-ctor bugs.
5738 \end_layout
5740 \begin_layout Subsection
5741 rr1-beta10
5742 \end_layout
5744 \begin_layout Itemize
5745 Fix crashes when quitting on Win32.
5746 \end_layout
5748 \begin_layout Subsection
5749 rr1-beta11
5750 \end_layout
5752 \begin_layout Itemize
5753 EVDEV: Queue keypresses from joystick, don't send directly
5754 \end_layout
5756 \begin_layout Itemize
5757 Wxwidgets: Load-Preserve that actually works.
5758 \end_layout
5760 \begin_layout Subsection
5761 rr1-beta12
5762 \end_layout
5764 \begin_layout Itemize
5765 Wxwidgets: GUI for memory search.
5766 \end_layout
5768 \begin_layout Itemize
5769 Warn about using synchronous queue in UI callback.
5770 \end_layout
5772 \begin_layout Subsection
5773 rr1-beta13
5774 \end_layout
5776 \begin_layout Itemize
5777 Remember last saved file for each ROM
5778 \end_layout
5780 \begin_layout Itemize
5781 Support MT dumping via boost.
5782 \end_layout
5784 \begin_layout Itemize
5785 Lua: input.raw
5786 \end_layout
5788 \begin_layout Itemize
5789 Lua: input.keyhook
5790 \end_layout
5792 \begin_layout Itemize
5793 Make mouse be ordinary input instead of special-casing
5794 \end_layout
5796 \begin_layout Itemize
5797 SDL: Don't screw up commands with NUL codepoints.
5798 \end_layout
5800 \begin_layout Subsection
5801 rr1-beta14
5802 \end_layout
5804 \begin_layout Itemize
5805 Merge status panel and main window
5806 \end_layout
5808 \begin_layout Itemize
5809 True movie slot support (the rest of it)
5810 \end_layout
5812 \begin_layout Itemize
5813 SDL: Fix compilation error
5814 \end_layout
5816 \begin_layout Itemize
5817 Elminate cross calls in dump menu code.
5818 \end_layout
5820 \begin_layout Subsection
5821 rr1-beta15
5822 \end_layout
5824 \begin_layout Itemize
5825 Cancel pending saves command
5826 \end_layout
5828 \begin_layout Itemize
5829 Wxwidgets: Code refactoring
5830 \end_layout
5832 \begin_layout Itemize
5833 Wxwidgets: Fix system -> reset
5834 \end_layout
5836 \begin_layout Itemize
5837 Wxwidgets: Read watch expressions in the right thread
5838 \end_layout
5840 \begin_layout Subsection
5841 rr1-beta16
5842 \end_layout
5844 \begin_layout Itemize
5845 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5846  support that).
5847 \end_layout
5849 \begin_layout Itemize
5850 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5851 \end_layout
5853 \begin_layout Itemize
5854 Don't append trailing '-' to prefix when saving movie.
5855 \end_layout
5857 \begin_layout Itemize
5858 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5859 \end_layout
5861 \begin_layout Subsection
5863 \end_layout
5865 \begin_layout Itemize
5866 Document memory watch syntax.
5867 \end_layout
5869 \begin_layout Subsection
5870 rr1-delta1
5871 \end_layout
5873 \begin_layout Itemize
5874 Fix unattended dumping (lsnes-dumpavi)
5875 \end_layout
5877 \begin_layout Itemize
5878 Support RAW dumping
5879 \end_layout
5881 \begin_layout Itemize
5882 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5883 \end_layout
5885 \begin_layout Itemize
5886 Add option to control sample rate preturbation in AVI dumper
5887 \end_layout
5889 \begin_layout Subsection
5890 rr1-delta2
5891 \end_layout
5893 \begin_layout Itemize
5894 Wxwidgets: Fix dumper submodes
5895 \end_layout
5897 \begin_layout Itemize
5898 Set core controller types before loadstate
5899 \end_layout
5901 \begin_layout Subsection
5902 rr1-delta2epsilon1
5903 \end_layout
5905 \begin_layout Itemize
5906 Fix compiling with bsnes v086.
5907 \end_layout
5909 \begin_layout Subsection
5910 rr1-delta3
5911 \end_layout
5913 \begin_layout Itemize
5914 Don't prompt before quitting
5915 \end_layout
5917 \begin_layout Itemize
5918 Start unpaused, preserve pause/unpause over load.
5919 \end_layout
5921 \begin_layout Itemize
5922 Try to autodetect if ROM is headered.
5923 \end_layout
5925 \begin_layout Itemize
5926 Wxwidgets: Only bring up ROM patching screen if specifically requested.
5927 \end_layout
5929 \begin_layout Itemize
5930 Allow configuring some hotkeys.
5931 \end_layout
5933 \begin_layout Subsection
5934 rr1-delta4
5935 \end_layout
5937 \begin_layout Itemize
5938 Lots of code cleanups
5939 \end_layout
5941 \begin_layout Itemize
5942 Fix JMD compression (JMD dumping was broken)
5943 \end_layout
5945 \begin_layout Itemize
5946 Don't crash if Lua C function throws an exception.
5947 \end_layout
5949 \begin_layout Itemize
5950 Support bitmap drawing in Lua.
5951 \end_layout
5953 \begin_layout Itemize
5954 Fix bsnes v085/v086 patches.
5955 \end_layout
5957 \begin_layout Itemize
5958 Improve stability on win32.
5959 \end_layout
5961 \begin_layout Subsection
5962 rr1-delta4epsilon1
5963 \end_layout
5965 \begin_layout Itemize
5966 Don't corrupt movie if movie length is integer multiple of frames per page.
5967 \end_layout
5969 \begin_layout Subsection
5970 rr1-delta5
5971 \end_layout
5973 \begin_layout Itemize
5974 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
5975 \end_layout
5977 \begin_layout Itemize
5978 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
5979 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
5981 \end_layout
5983 \begin_layout Itemize
5984 Wxwidgets: Fix internal focus lost (hotkeys stop working)
5985 \end_layout
5987 \begin_layout Itemize
5988 Wxwidgets: Fix broken modifiers
5989 \end_layout
5991 \begin_layout Itemize
5992 on_paint has parameter now.
5993 \end_layout
5995 \begin_layout Itemize
5996 Optional initital fill for bitmaps
5997 \end_layout
5999 \begin_layout Itemize
6000 Fix palette changing.
6001 \end_layout
6003 \begin_layout Itemize
6004 Optimize rendering a bit.
6005 \end_layout
6007 \begin_layout Itemize
6008 Bsnes v087 support.
6009 \end_layout
6011 \begin_layout Subsection
6012 rr1-delta5epsilon1
6013 \end_layout
6015 \begin_layout Itemize
6016 Movieinfo: Fix display of port #2 type.
6017 \end_layout
6019 \begin_layout Itemize
6020 Call on_input() after loadstate.
6021 \end_layout
6023 \begin_layout Subsection
6024 rr1-delta5epsilon2
6025 \end_layout
6027 \begin_layout Itemize
6028 Fix writing port2 data to movie.
6029 \end_layout
6031 \begin_layout Itemize
6032 Fix SRAM handling with Bsnes v087.
6033 \end_layout
6035 \end_body
6036 \end_document