Lua: New function input.raw, which gives data for all buttons
[lsnes.git] / manual.lyx
blob1d6a685175eff6113a43d52d3d2a1d74b3cb6ab7
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 --headered-<kind>=<file> (lsnes/SDL, lsnes-avidump)
497 \end_layout
499 \begin_layout Standard
500 Load <file> as specified ROM, stripping first 512 bytes.
501  Handy for loading SMC / FIG and such files.
502 \end_layout
504 \begin_layout Subsubsection
505 --<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
506 \end_layout
508 \begin_layout Standard
509 Override hardware detection for ROM, reading the values from <file> (BSNES
510  XML format).
511 \end_layout
513 \begin_layout Subsubsection
514 --ips-<kind>=<file> (lsnes/SDL, lsnes-avidump)
515 \end_layout
517 \begin_layout Standard
518 Apply BPS/IPS patch <file> to ROM <kind>.
519  If specified multiple times, the patches are applied in order.
520 \end_layout
522 \begin_layout Subsubsection
523 --ips-<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
524 \end_layout
526 \begin_layout Standard
527 Apply BPS/IPS patch <file> to XML of ROM <kind>.
528  If specified multiple times, the patches are applied in order.
529 \end_layout
531 \begin_layout Subsubsection
532 --ips-offset=<offset> (lsnes/SDL, lsnes-avidump)
533 \end_layout
535 \begin_layout Standard
536 Set offset to apply to IPS patches.
537  May be negative.
538  Handy for applying headered IPS patches (use offset of -512 for this).
539  The offset must be 0 for BPS patches.
540 \end_layout
542 \begin_layout Subsubsection
543 --pal
544 \end_layout
546 \begin_layout Standard
547 Force ROM to be considered PAL-only.
548 \end_layout
550 \begin_layout Itemize
551 Only works on SNES and SGB ROMs (not BS-X or Sufami Turbo).
552 \end_layout
554 \begin_layout Itemize
555 Attempting to load NTSC movie file will error out.
556 \end_layout
558 \begin_layout Subsubsection
559 --ntsc
560 \end_layout
562 \begin_layout Standard
563 Force ROM to be considered NTSC-only.
564 \end_layout
566 \begin_layout Itemize
567 Attempting to load PAL movie file will error out.
568 \end_layout
570 \begin_layout Subsection
571 Session options
572 \end_layout
574 \begin_layout Subsubsection
575 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
576 \end_layout
578 \begin_layout Standard
579 Load <filename> as movie or savestate file.
580  All other session options are ignored.
581 \end_layout
583 \begin_layout Subsubsection
584 --port1=<device> (lsnes/SDL)
585 \end_layout
587 \begin_layout Standard
588 Set type of port1.
589  Valid values are:
590 \end_layout
592 \begin_layout Itemize
593 none: No device connected
594 \end_layout
596 \begin_layout Itemize
597 gamepad: One gamepad (the default)
598 \end_layout
600 \begin_layout Itemize
601 multitap: Four gamepads (warning: makes most games refuse to start)
602 \end_layout
604 \begin_layout Itemize
605 mouse: Mouse.
606 \end_layout
608 \begin_layout Subsubsection
609 --port2=<type> (lsnes/SDL)
610 \end_layout
612 \begin_layout Standard
613 Set type of port2.
614  Valid values are:
615 \end_layout
617 \begin_layout Itemize
618 none: No device connected (the default)
619 \end_layout
621 \begin_layout Itemize
622 gamepad: One gamepad
623 \end_layout
625 \begin_layout Itemize
626 multitap: Four gamepads.
627 \end_layout
629 \begin_layout Itemize
630 mouse: Mouse
631 \end_layout
633 \begin_layout Itemize
634 superscope: Super Scope
635 \end_layout
637 \begin_layout Itemize
638 justifier: One justifier
639 \end_layout
641 \begin_layout Itemize
642 justifiers: Two justifiers
643 \end_layout
645 \begin_layout Subsubsection
646 --gamename=<name> (lsnes/SDL)
647 \end_layout
649 \begin_layout Standard
650 Set the name of game to <name>.
651  Default is blank.
652 \end_layout
654 \begin_layout Subsubsection
655 --author=<name> (lsnes/SDL)
656 \end_layout
658 \begin_layout Standard
659 Add author with full name of <name> (no nickname).
660 \end_layout
662 \begin_layout Subsubsection
663 --author=|<name> (lsnes/SDL)
664 \end_layout
666 \begin_layout Standard
667 Add author with nickname of <name> (no full name).
668 \end_layout
670 \begin_layout Subsubsection
671 --author=<fullname>|<nickname> (lsnes/SDL)
672 \end_layout
674 \begin_layout Standard
675 Add author with full name of <fullname> and nickname of <nickname>.
676 \end_layout
678 \begin_layout Subsubsection
679 --rtc-second=<value> (lsnes/SDL)
680 \end_layout
682 \begin_layout Standard
683 Set RTC second (0 is 1st January 1970 00:00:00Z).
684  Default is 1,000,000,000.
685 \end_layout
687 \begin_layout Subsubsection
688 --rtc-subsecond=<value> (lsnes/SDL)
689 \end_layout
691 \begin_layout Standard
692 Set RTC subsecond.
693  Range is 0-.
694  Unit is CPU cycle.
695  Default is 0.
696 \end_layout
698 \begin_layout Subsection
699 Misc.
700  options:
701 \end_layout
703 \begin_layout Subsubsection
704 --run=<file> (lsnes/SDL)
705 \end_layout
707 \begin_layout Standard
708 After running main RC file, run this file.
709  If multiple are specified, these execute in order specified.
710 \end_layout
712 \begin_layout Subsection
713 dump options (lsnes-dumpavi only)
714 \end_layout
716 \begin_layout Subsubsection
717 --prefix=<prefix>
718 \end_layout
720 \begin_layout Standard
721 Set dump prefix.
722  Default is 
723 \begin_inset Quotes eld
724 \end_inset
726 avidump
727 \begin_inset Quotes erd
728 \end_inset
731 \end_layout
733 \begin_layout Subsubsection
734 --level=<level>
735 \end_layout
737 \begin_layout Standard
738 Set compression level (0-18).
739  Default is 7.
740 \end_layout
742 \begin_layout Subsubsection
743 --length=<length>
744 \end_layout
746 \begin_layout Standard
747 Set number of frames to dump.
748  Mandatory.
749 \end_layout
751 \begin_layout Subsubsection
752 --lua=<script>
753 \end_layout
755 \begin_layout Standard
756 Run specified lua script (lsnes-dumpavi does not have initialization files).
757 \end_layout
759 \begin_layout Subsubsection
760 --jmd
761 \end_layout
763 \begin_layout Standard
764 Use JMD dumping instead of AVI dumping.
765 \end_layout
767 \begin_layout Subsubsection
768 --sdmp
769 \end_layout
771 \begin_layout Standard
772 Use SDMP dumping instead of AVI dumping.
773 \end_layout
775 \begin_layout Subsubsection
776 --ss
777 \end_layout
779 \begin_layout Standard
780 Dump in single segment (SDMP only).
781 \end_layout
783 \begin_layout Section
784 Startup file lsnes.rc
785 \end_layout
787 \begin_layout Standard
788 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
789  This file is located in:
790 \end_layout
792 \begin_layout Itemize
793 Windows: %APPDATA%
794 \backslash
795 lsnes
796 \backslash
797 lsnes.rc (if %APPDATA% exists)
798 \end_layout
800 \begin_layout Itemize
801 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
802 \end_layout
804 \begin_layout Itemize
805 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
806 \end_layout
808 \begin_layout Itemize
809 All: ./lsnes.rc (fallback default).
810 \end_layout
812 \begin_layout Standard
813 If leading directories do not exist, attempt to create them is made.
814 \end_layout
816 \begin_layout Section
817 Internal commands
818 \end_layout
820 \begin_layout Itemize
821 Commands beginning with '*' invoke the corresponding command without alias
822  expansion.
823 \end_layout
825 \begin_layout Itemize
826 If command starts with '+' (after possible '*'), the command is executed
827  as-is when button is pressed, and when button is released, it is executed
828  with '+' replaced by '-'.
829 \end_layout
831 \begin_layout Itemize
832 Commands without '+' execute only on negative edge (release).
833 \end_layout
835 \begin_layout Subsection
836 Settings:
837 \end_layout
839 \begin_layout Standard
840 Settings control various aspects of emulator behaviour.
841 \end_layout
843 \begin_layout Subsubsection
844 set-setting <setting> <value>
845 \end_layout
847 \begin_layout Standard
848 Sets setting <setting> to value <value> (may be empty).
849 \end_layout
851 \begin_layout Subsubsection
852 unset-setting <setting>
853 \end_layout
855 \begin_layout Standard
856 Try to unset setting <setting> (not all settings can be unset).
857 \end_layout
859 \begin_layout Subsubsection
860 get-setting <setting>
861 \end_layout
863 \begin_layout Standard
864 Read value of setting <setting>
865 \end_layout
867 \begin_layout Subsubsection
868 show-settings
869 \end_layout
871 \begin_layout Standard
872 Print names and values of all settings.
873 \end_layout
875 \begin_layout Subsection
876 Keybindings
877 \end_layout
879 \begin_layout Standard
880 Keybindings bind commands or aliases to keys (or pseudo-keys).
882 \end_layout
884 \begin_layout Standard
885 Notes:
886 \end_layout
888 \begin_layout Itemize
889 Do not bind edge active (+/-) commands to keys with modifiers, that won't
890  work right!
891 \end_layout
893 \begin_layout Itemize
894 Names of keys and modifiers are platform-dependent.
895 \end_layout
897 \begin_layout Itemize
898 Be careful before binding pseudo-keys (such as joystick axes, buttons or
899  hats) with modifiers.
900  That may or may not work right.
901 \end_layout
903 \begin_layout Subsubsection
904 bind-key [<mod>/<modmask>] <key> <command>
905 \end_layout
907 \begin_layout Standard
908 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
909 ed list) are set as <mod> (comma-seperated list).
910 \end_layout
912 \begin_layout Standard
913 The names of keys and modifiers are platform-dependent.
914 \end_layout
916 \begin_layout Subsubsection
917 unbind-key [<mod>/<modmask>] <key>
918 \end_layout
920 \begin_layout Standard
921 Unbind command from <key> (with specified <mod> and <modmask>).
922 \end_layout
924 \begin_layout Subsubsection
925 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
926  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
927  [plus=<val>] [tolerance=<val>]
928 \end_layout
930 \begin_layout Standard
931 Set axis parameters for axis <axis>.
932 \end_layout
934 \begin_layout Itemize
935 disabled: Disable axis
936 \end_layout
938 \begin_layout Itemize
939 axis: Normal axis
940 \end_layout
942 \begin_layout Itemize
943 axis-inverse: Inverse axis
944 \end_layout
946 \begin_layout Itemize
947 pressure0-: Pressure sensitive.
948  Released at 0, pressed at -.
949 \end_layout
951 \begin_layout Itemize
952 pressure0+: Pressure sensitive.
953  Released at 0, pressed at +.
954 \end_layout
956 \begin_layout Itemize
957 pressure-0: Pressure sensitive.
958  Released at -, pressed at 0.
959 \end_layout
961 \begin_layout Itemize
962 pressure-+: Pressure sensitive.
963  Released at -, pressed at +.
964 \end_layout
966 \begin_layout Itemize
967 pressure+0: Pressure sensitive.
968  Released at +, pressed at 0.
969 \end_layout
971 \begin_layout Itemize
972 pressure+-: Pressure sensitive.
973  Released at +, pressed at -.
974 \end_layout
976 \begin_layout Itemize
977 minus=<val>: Calibration at extreme minus position (-32768-32767)
978 \end_layout
980 \begin_layout Itemize
981 zero=<val>: Calibration at neutral position (-32768-32767)
982 \end_layout
984 \begin_layout Itemize
985 plus=<val>: Calibration at extreme plus position (-32768-32767)
986 \end_layout
988 \begin_layout Itemize
989 tolerance=<value>: Center band tolerance (0<x<1).
990  The smaller the value, the more sensitive the control is.
991 \end_layout
993 \begin_layout Subsubsection
994 show-bindings
995 \end_layout
997 \begin_layout Standard
998 Print all key bindings in effect.
999 \end_layout
1001 \begin_layout Subsection
1002 Aliases
1003 \end_layout
1005 \begin_layout Standard
1006 Aliases bind command to sequence of commands.
1007  After alias has been defined, it replaces the command it shadows.
1008 \end_layout
1010 \begin_layout Standard
1011 Notes:
1012 \end_layout
1014 \begin_layout Itemize
1015 You can't alias command to itself.
1016 \end_layout
1018 \begin_layout Itemize
1019 Aliases starting with +/- are edge active just like ordinary commands starting
1020  with +/-.
1021 \end_layout
1023 \begin_layout Itemize
1024 One command can be aliased to multiple commands.
1025 \end_layout
1027 \begin_layout Subsubsection
1028 alias-command <command> <expansion>
1029 \end_layout
1031 \begin_layout Standard
1032 Append <expansion> to alias <command>.
1033  If alias does not already exist, it is created.
1034 \end_layout
1036 \begin_layout Subsubsection
1037 unalias-command <command>
1038 \end_layout
1040 \begin_layout Standard
1041 Clear alias expansion for <command>.
1042 \end_layout
1044 \begin_layout Subsubsection
1045 show-aliases
1046 \end_layout
1048 \begin_layout Standard
1049 Print all aliases and their expansions in effect.
1050 \end_layout
1052 \begin_layout Subsection
1053 run-script <script>
1054 \end_layout
1056 \begin_layout Standard
1057 Run <script> as if commands were entered on the command line.
1058 \end_layout
1060 \begin_layout Subsection
1061 Video dumping
1062 \end_layout
1064 \begin_layout Standard
1065 Following commands control video dumping:
1066 \end_layout
1068 \begin_layout Subsubsection
1069 dump-avi <prefix>
1070 \end_layout
1072 \begin_layout Standard
1073 Dump AVI video to prefix <prefix> Notes:
1074 \end_layout
1076 \begin_layout Itemize
1077 The codec is Camstudio Codec in gzip mode.
1078 \end_layout
1080 \begin_layout Itemize
1081 Encoder and muxer are internal, available on all platforms.
1082 \end_layout
1084 \begin_layout Itemize
1085 Audio enable/disable and framerate has no effect.
1086 \end_layout
1088 \begin_layout Itemize
1089 The audio dumped to .avi is low-quality version.
1090  The high-quality version is dumped to .sox file.
1091 \end_layout
1093 \begin_layout Subsubsection
1094 end-avi
1095 \end_layout
1097 \begin_layout Standard
1098 End current AVI video dump (closing the emulator also closes the dump).
1099 \end_layout
1101 \begin_layout Subsubsection
1102 dump-jmd <file>
1103 \end_layout
1105 \begin_layout Standard
1106 Dump JMD video to file <file>.
1107 \end_layout
1109 \begin_layout Subsubsection
1110 end-jmd
1111 \end_layout
1113 \begin_layout Standard
1114 End the current JMD dump in progress.
1115 \end_layout
1117 \begin_layout Subsubsection
1118 dump-sdmp <prefix>
1119 \end_layout
1121 \begin_layout Standard
1122 Dump SDMP to <prefix>, splitting at 2GB.
1123 \end_layout
1125 \begin_layout Subsubsection
1126 dump-sdmp-ss <file>
1127 \end_layout
1129 \begin_layout Standard
1130 Dump SDMP to <file>, no splitting
1131 \end_layout
1133 \begin_layout Subsubsection
1134 end-sdmp
1135 \end_layout
1137 \begin_layout Standard
1138 End the current SDMP dump in progress.
1139 \end_layout
1141 \begin_layout Subsection
1142 Memory manipulation
1143 \end_layout
1145 \begin_layout Standard
1146 <address> may be decimal or hexadecimal (prefixed with '0x').
1147  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
1148  with '-') decimal.
1149 \end_layout
1151 \begin_layout Standard
1152 The available element <sizes> are:
1153 \end_layout
1155 \begin_layout Itemize
1156 byte: 1 byte
1157 \end_layout
1159 \begin_layout Itemize
1160 word: 2 bytes
1161 \end_layout
1163 \begin_layout Itemize
1164 dword: 4 bytes
1165 \end_layout
1167 \begin_layout Itemize
1168 qword: 8 bytes
1169 \end_layout
1171 \begin_layout Standard
1172 When reading RAM and ROM, multi-byte reads/writes are big-endian.
1173  When dealing with DSP memory, multi-byte reads/writes are native-endian
1174  (do not use operand sizes exceeding DSP bitness, except dword is OK for
1175  24-bit memory).
1176 \end_layout
1178 \begin_layout Subsubsection
1179 read-<size> <address>
1180 \end_layout
1182 \begin_layout Standard
1183 Read the value of byte in <address>.
1184 \end_layout
1186 \begin_layout Subsubsection
1187 read-s<size> <address>
1188 \end_layout
1190 \begin_layout Standard
1191 Read the value of signed byte in <address>.
1192 \end_layout
1194 \begin_layout Subsubsection
1195 write-<size> <address> <value>
1196 \end_layout
1198 \begin_layout Standard
1199 Write <value> to byte in address <address>.
1200 \end_layout
1202 \begin_layout Subsubsection
1203 search-memory reset
1204 \end_layout
1206 \begin_layout Standard
1207 Reset the memory search
1208 \end_layout
1210 \begin_layout Subsubsection
1211 search-memory count
1212 \end_layout
1214 \begin_layout Standard
1215 Print number of candidates remaining
1216 \end_layout
1218 \begin_layout Subsubsection
1219 search-memory print
1220 \end_layout
1222 \begin_layout Standard
1223 Print all candidates remaining
1224 \end_layout
1226 \begin_layout Subsubsection
1227 search-memory <usflag><sizeflag><op>
1228 \end_layout
1230 \begin_layout Standard
1231 Searches memory for addresses satisfying criteria.
1232 \end_layout
1234 \begin_layout Standard
1235 <usflag> can be:
1236 \end_layout
1238 \begin_layout Itemize
1239 u: unsigned
1240 \end_layout
1242 \begin_layout Itemize
1243 s: signed
1244 \end_layout
1246 \begin_layout Standard
1247 <sizeflag> can be:
1248 \end_layout
1250 \begin_layout Itemize
1251 b: byte
1252 \end_layout
1254 \begin_layout Itemize
1255 w: word
1256 \end_layout
1258 \begin_layout Itemize
1259 d: dword
1260 \end_layout
1262 \begin_layout Itemize
1263 q: qword
1264 \end_layout
1266 \begin_layout Standard
1267 <op> can be:
1268 \end_layout
1270 \begin_layout Itemize
1271 lt: < previous value.
1272 \end_layout
1274 \begin_layout Itemize
1275 le: <= previous value.
1276 \end_layout
1278 \begin_layout Itemize
1279 eq: = previous value.
1280 \end_layout
1282 \begin_layout Itemize
1283 ne: != previous value.
1284 \end_layout
1286 \begin_layout Itemize
1287 ge: >= previous value.
1288 \end_layout
1290 \begin_layout Itemize
1291 gt: > previous value.
1292 \end_layout
1294 \begin_layout Subsubsection
1295 search-memory <sizeflag> <value>
1296 \end_layout
1298 \begin_layout Standard
1299 Searches for addresses that currently have value <value>.
1300  <sizeflag> is as in previous command.
1301 \end_layout
1303 \begin_layout Subsection
1304 Main commands
1305 \end_layout
1307 \begin_layout Standard
1308 These commands are not available in lsnesrc, but are available after ROM
1309  has been loaded.
1310 \end_layout
1312 \begin_layout Subsubsection
1313 quit-emulator [/y]
1314 \end_layout
1316 \begin_layout Standard
1317 Quits the emulator (asking for confirmation).
1318  If /y is given, no confirmation is asked.
1319 \end_layout
1321 \begin_layout Subsubsection
1322 pause-emulator
1323 \end_layout
1325 \begin_layout Standard
1326 Toggle paused/unpaused
1327 \end_layout
1329 \begin_layout Subsubsection
1330 +advance-frame 
1331 \end_layout
1333 \begin_layout Standard
1334 Advance frame.
1335  If the button is still held after configurable timeout expires, game unpauses
1336  for the duration frame advance is held.
1337 \end_layout
1339 \begin_layout Subsubsection
1340 +advance-poll 
1341 \end_layout
1343 \begin_layout Standard
1344 Advance subframe.
1345  If the button is still held after configurable timeout expires, game unpauses
1346  for the duration frame advance is held.
1347 \end_layout
1349 \begin_layout Subsubsection
1350 advance-skiplag 
1351 \end_layout
1353 \begin_layout Standard
1354 Skip to first poll in frame after current.
1355 \end_layout
1357 \begin_layout Subsubsection
1358 reset 
1359 \end_layout
1361 \begin_layout Standard
1362 Reset the SNES after this frame.
1363 \end_layout
1365 \begin_layout Subsubsection
1366 load <filename> 
1367 \end_layout
1369 \begin_layout Standard
1370 Load savestate <filename> in current mode.
1371 \end_layout
1373 \begin_layout Subsubsection
1374 load-state <filename> 
1375 \end_layout
1377 \begin_layout Standard
1378 Load savestate <filename> in readwrite mode.
1379 \end_layout
1381 \begin_layout Subsubsection
1382 load-readonly <filename> 
1383 \end_layout
1385 \begin_layout Standard
1386 Load savestate <filename> in readonly mode.
1387 \end_layout
1389 \begin_layout Subsubsection
1390 load-preserve <filename> 
1391 \end_layout
1393 \begin_layout Standard
1394 Load savestate <filename> in readonly mode, preserving current events.
1395 \end_layout
1397 \begin_layout Subsubsection
1398 load-movie <filename> 
1399 \end_layout
1401 \begin_layout Standard
1402 Load savestate <filename>, ignoring save part in readonly mode.
1403 \end_layout
1405 \begin_layout Subsubsection
1406 save-state <filename> 
1407 \end_layout
1409 \begin_layout Standard
1410 Save system state to <filename> as soon as possible.
1411 \end_layout
1413 \begin_layout Subsubsection
1414 save-movie <filename> 
1415 \end_layout
1417 \begin_layout Standard
1418 Save movie to <filename>.
1419 \end_layout
1421 \begin_layout Subsubsection
1422 set-rwmode 
1423 \end_layout
1425 \begin_layout Standard
1426 Set read-write mode.
1427 \end_layout
1429 \begin_layout Subsubsection
1430 set-romode 
1431 \end_layout
1433 \begin_layout Standard
1434 Set read-only mode
1435 \end_layout
1437 \begin_layout Subsubsection
1438 toggle-rwmode 
1439 \end_layout
1441 \begin_layout Standard
1442 Toggle between read-only and read-write modes.
1443 \end_layout
1445 \begin_layout Subsubsection
1446 set-gamename <name> 
1447 \end_layout
1449 \begin_layout Standard
1450 Set name of the game to <name>
1451 \end_layout
1453 \begin_layout Subsubsection
1454 get-gamename 
1455 \end_layout
1457 \begin_layout Standard
1458 Print the name of the game.
1459 \end_layout
1461 \begin_layout Subsubsection
1462 add-author <author> 
1463 \end_layout
1465 \begin_layout Standard
1466 Adds new author <author>.
1467  If <author> does not contain '|' it is full name.
1468  If it contains '|', '|' splits the full name and nickname.
1469 \end_layout
1471 \begin_layout Subsubsection
1472 edit-author <num> <author> 
1473 \end_layout
1475 \begin_layout Standard
1476 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1477  format)
1478 \end_layout
1480 \begin_layout Subsubsection
1481 remove-author <num> 
1482 \end_layout
1484 \begin_layout Standard
1485 Remove author in slot <num>
1486 \end_layout
1488 \begin_layout Subsubsection
1489 print-authors 
1490 \end_layout
1492 \begin_layout Standard
1493 Print authors.
1494 \end_layout
1496 \begin_layout Subsubsection
1497 test-1, test-2, test-3
1498 \end_layout
1500 \begin_layout Standard
1501 Internal test commands.
1502  Don't use.
1503 \end_layout
1505 \begin_layout Subsubsection
1506 take-screenshot <filename> 
1507 \end_layout
1509 \begin_layout Standard
1510 Save screenshot to <filename>.
1511 \end_layout
1513 \begin_layout Subsubsection
1514 +controller<num><button>
1515 \end_layout
1517 \begin_layout Standard
1518 Press button <button> on controller <num> (1-8).
1519  The following button names are known:
1520 \end_layout
1522 \begin_layout Itemize
1523 left
1524 \end_layout
1526 \begin_layout Itemize
1527 right
1528 \end_layout
1530 \begin_layout Itemize
1532 \end_layout
1534 \begin_layout Itemize
1535 down
1536 \end_layout
1538 \begin_layout Itemize
1540 \end_layout
1542 \begin_layout Itemize
1544 \end_layout
1546 \begin_layout Itemize
1548 \end_layout
1550 \begin_layout Itemize
1552 \end_layout
1554 \begin_layout Itemize
1556 \end_layout
1558 \begin_layout Itemize
1560 \end_layout
1562 \begin_layout Itemize
1563 select
1564 \end_layout
1566 \begin_layout Itemize
1567 start
1568 \end_layout
1570 \begin_layout Itemize
1571 trigger
1572 \end_layout
1574 \begin_layout Itemize
1575 cursor
1576 \end_layout
1578 \begin_layout Itemize
1579 pause
1580 \end_layout
1582 \begin_layout Itemize
1583 turbo
1584 \end_layout
1586 \begin_layout Subsubsection
1587 controllerh<num><button>
1588 \end_layout
1590 \begin_layout Standard
1591 Hold/unhold button <button> on controller <num> (1-8).
1592  See +controller for button names.
1593 \end_layout
1595 \begin_layout Subsubsection
1596 autofire (<pattern>|-)...
1597 \end_layout
1599 \begin_layout Standard
1600 Set autofire pattern.
1601  Each parameter is comma-separated list of button names (in form of 1start,
1602  1A, 2B, etc..) to hold on that frame.
1603  After reaching the end of pattern, the pattern restarts from the beginning.
1604 \end_layout
1606 \begin_layout Subsubsection
1607 repaint
1608 \end_layout
1610 \begin_layout Standard
1611 Force a repaint.
1612 \end_layout
1614 \begin_layout Subsection
1615 Save jukebox 
1616 \end_layout
1618 \begin_layout Subsubsection
1619 cycle-jukebox-backward
1620 \end_layout
1622 \begin_layout Standard
1623 Cycle save jukebox backwards.
1624 \end_layout
1626 \begin_layout Subsubsection
1627 cycle-jukebox-forward
1628 \end_layout
1630 \begin_layout Standard
1631 Cycle save jukebox forwards
1632 \end_layout
1634 \begin_layout Subsubsection
1635 add-jukebox-save <filename>
1636 \end_layout
1638 \begin_layout Standard
1639 Add <filename> to jukebox saves.
1640 \end_layout
1642 \begin_layout Subsubsection
1643 load-jukebox
1644 \end_layout
1646 \begin_layout Standard
1647 Do load from jukebox (current mode).
1648 \end_layout
1650 \begin_layout Subsubsection
1651 save-jukebox
1652 \end_layout
1654 \begin_layout Standard
1655 Do state save to jukebox.
1656 \end_layout
1658 \begin_layout Subsection
1659 Lua 
1660 \end_layout
1662 \begin_layout Standard
1663 Only available if lua support is compiled in.
1664 \end_layout
1666 \begin_layout Subsubsection
1667 evaluate-lua <luacode>
1668 \end_layout
1670 \begin_layout Standard
1671 Run Lua code <luacode> using built-in Lua interpretter.
1672 \end_layout
1674 \begin_layout Subsubsection
1675 run-lua <script>
1676 \end_layout
1678 \begin_layout Standard
1679 Run specified lua file using built-in Lua interpretter.
1680 \end_layout
1682 \begin_layout Subsection
1683 Memory watch
1684 \end_layout
1686 \begin_layout Subsubsection
1687 add-watch <name> <expression>
1688 \end_layout
1690 \begin_layout Standard
1691 Adds new watch (or modifies old one).
1692 \end_layout
1694 \begin_layout Subsubsection
1695 remove-watch <name>
1696 \end_layout
1698 \begin_layout Standard
1699 Remove a watch.
1700 \end_layout
1702 \begin_layout Subsection
1703 Sound 
1704 \end_layout
1706 \begin_layout Subsubsection
1707 enable-sound <on/off> 
1708 \end_layout
1710 \begin_layout Standard
1711 Enable/Disable sound.
1712 \end_layout
1714 \begin_layout Subsubsection
1715 set-sound-device <device> 
1716 \end_layout
1718 \begin_layout Standard
1719 Set sound device to <device>
1720 \end_layout
1722 \begin_layout Subsubsection
1723 show-sound-status 
1724 \end_layout
1726 \begin_layout Standard
1727 Show status of sound system.
1728 \end_layout
1730 \begin_layout Subsubsection
1731 show-sound-devices
1732 \end_layout
1734 \begin_layout Standard
1735 Show all available devices.
1736 \end_layout
1738 \begin_layout Subsection
1739 SDL Platform commands 
1740 \end_layout
1742 \begin_layout Standard
1743 The following are valid on SDL platform.
1744 \end_layout
1746 \begin_layout Subsubsection
1747 identify-key
1748 \end_layout
1750 \begin_layout Standard
1751 Asks to press a key and then identifies that (pseudo-)key.
1752 \end_layout
1754 \begin_layout Subsubsection
1755 toggle-console 
1756 \end_layout
1758 \begin_layout Standard
1759 Toggle between windowed/fullscreen console.
1760 \end_layout
1762 \begin_layout Subsubsection
1763 scroll-fullup 
1764 \end_layout
1766 \begin_layout Standard
1767 Scroll messages window as far back as it goes.
1768 \end_layout
1770 \begin_layout Subsubsection
1771 scroll-fulldown 
1772 \end_layout
1774 \begin_layout Standard
1775 Scroll messages window as far forward as it goes.
1776 \end_layout
1778 \begin_layout Subsubsection
1779 scroll-up 
1780 \end_layout
1782 \begin_layout Standard
1783 Scroll messages window back one screenful.
1784 \end_layout
1786 \begin_layout Subsubsection
1787 scroll-down 
1788 \end_layout
1790 \begin_layout Standard
1791 Scroll messages window forward one screenful.
1792 \end_layout
1794 \begin_layout Section
1795 Settings
1796 \end_layout
1798 \begin_layout Subsection
1799 Core settings
1800 \end_layout
1802 \begin_layout Subsubsection
1803 firmwarepath
1804 \end_layout
1806 \begin_layout Standard
1807 Set where bsnes looks for firmware files.
1808  Default is 
1809 \begin_inset Quotes eld
1810 \end_inset
1813 \begin_inset Quotes erd
1814 \end_inset
1817 \end_layout
1819 \begin_layout Subsubsection
1820 targetfps
1821 \end_layout
1823 \begin_layout Standard
1824 Set the target fps.
1825  Numeric, range is 0.001 to 
1826 \begin_inset Quotes eld
1827 \end_inset
1829 infinite
1830 \begin_inset Quotes erd
1831 \end_inset
1834  Default is native framerate.
1835 \end_layout
1837 \begin_layout Subsubsection
1838 savecompression
1839 \end_layout
1841 \begin_layout Standard
1842 Set save compression level (integer 0-9).
1843  Default is 7 (0 is no compression).
1844 \end_layout
1846 \begin_layout Subsubsection
1847 advance-timeout
1848 \end_layout
1850 \begin_layout Standard
1851 Set the frame advance timeout in milliseconds.
1852  Numeric integer, range is 0-999999999.
1853  Default is 500.
1854 \end_layout
1856 \begin_layout Subsection
1857 AVI dumper settings
1858 \end_layout
1860 \begin_layout Subsubsection
1861 avi-large
1862 \end_layout
1864 \begin_layout Standard
1865 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1866  outputs.
1867 \end_layout
1869 \begin_layout Subsubsection
1870 avi-left-border
1871 \end_layout
1873 \begin_layout Standard
1874 AVI dumper: Set the default left border thickness (unless lua overrides)
1875  for dumps.
1876  Range 0-8191.
1877  Default is 0.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 avi-right-border
1882 \end_layout
1884 \begin_layout Standard
1885 AVI dumper: Set the default right border thickness (unless lua overrides)
1886  for dumps.
1887  Range 0-8191.
1888  Default is 0.
1889 \end_layout
1891 \begin_layout Subsubsection
1892 avi-top-border
1893 \end_layout
1895 \begin_layout Standard
1896 AVI dumper: Set the default top border thickness (unless lua overrides)
1897  for dumps.
1898  Range 0-8191.
1899  Default is 0.
1900 \end_layout
1902 \begin_layout Subsubsection
1903 avi-bottom-border
1904 \end_layout
1906 \begin_layout Standard
1907 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1908  for dumps.
1909  Range 0-8191.
1910  Default is 0.
1911 \end_layout
1913 \begin_layout Subsubsection
1914 avi-maxframes
1915 \end_layout
1917 \begin_layout Standard
1918 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1919  Range 0-999999999.
1920  Default is 0.
1921 \end_layout
1923 \begin_layout Subsubsection
1924 avi-compresison
1925 \end_layout
1927 \begin_layout Standard
1928 AVI dumper: Compression level (0-18).
1929 \end_layout
1931 \begin_layout Itemize
1932 Compression levels 10 and above are not compatible with stock CSCD codec.
1933 \end_layout
1935 \begin_layout Itemize
1936 Recomended level is 7.
1937 \end_layout
1939 \begin_layout Subsection
1940 JMD options
1941 \end_layout
1943 \begin_layout Subsubsection
1944 jmd-copression
1945 \end_layout
1947 \begin_layout Standard
1948 JMD dumper: Compression level (0-9).
1949 \end_layout
1951 \begin_layout Subsection
1952 SDL platform settings
1953 \end_layout
1955 \begin_layout Subsubsection
1956 autorepeat-first-delay
1957 \end_layout
1959 \begin_layout Standard
1960 Sets the delay for first character in typematic autorepeat.
1961 \end_layout
1963 \begin_layout Subsubsection
1964 autorepeat-subsequent-delay
1965 \end_layout
1967 \begin_layout Standard
1968 Sets the delay for subsequent characters in typematic autorepeat.
1969 \end_layout
1971 \begin_layout Section
1972 Lua functions
1973 \end_layout
1975 \begin_layout Subsection
1976 Core (in main table)
1977 \end_layout
1979 \begin_layout Subsubsection
1980 print
1981 \end_layout
1983 \begin_layout Standard
1984 Print line to message console.
1985 \end_layout
1987 \begin_layout Subsubsection
1988 exec(string command)
1989 \end_layout
1991 \begin_layout Standard
1992 Run command as it was entered on the command line
1993 \end_layout
1995 \begin_layout Subsection
1996 Table bit:
1997 \end_layout
1999 \begin_layout Standard
2000 Bitwise logical functions and related.
2001 \end_layout
2003 \begin_layout Subsubsection
2004 bit.none(number...) / bit.bnot(number...)
2005 \end_layout
2007 \begin_layout Standard
2008 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2009  arguments).
2010 \end_layout
2012 \begin_layout Subsubsection
2013 bit.any(number...) / bit.bor(number...)
2014 \end_layout
2016 \begin_layout Standard
2017 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2018 \end_layout
2020 \begin_layout Subsubsection
2021 bit.all(number...) / bit.band(number...)
2022 \end_layout
2024 \begin_layout Standard
2025 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2027 \end_layout
2029 \begin_layout Subsubsection
2030 bit.parity(number...) / bit.bxor(number...)
2031 \end_layout
2033 \begin_layout Standard
2034 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2035  of the arguments).
2036 \end_layout
2038 \begin_layout Subsubsection
2039 bit.lrotate(number base[, number amount[, number bits]])
2040 \end_layout
2042 \begin_layout Standard
2043 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2044 \end_layout
2046 \begin_layout Subsubsection
2047 bit.rrotate(number base[, number amount[, number bits]])
2048 \end_layout
2050 \begin_layout Standard
2051 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2052  places.
2053 \end_layout
2055 \begin_layout Subsubsection
2056 bit.lshift(number base[, number amount[, number bits]])
2057 \end_layout
2059 \begin_layout Standard
2060 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2061  The new bits are filled with zeroes.
2062 \end_layout
2064 \begin_layout Subsubsection
2065 bit.lrshift(number base[, number amount[, number bits]])
2066 \end_layout
2068 \begin_layout Standard
2069 Shift bits-bit (max 48, default 48) number logically right by amount (default
2070  1) places.
2071  The new bits are filled with zeroes.
2072 \end_layout
2074 \begin_layout Subsubsection
2075 bit.arshift(number base[, number amount[, number bits]])
2076 \end_layout
2078 \begin_layout Standard
2079 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2080  (default 1) places.
2081  The new bits are shifted in with copy of the high bit.
2082 \end_layout
2084 \begin_layout Subsection
2085 Table gui:
2086 \end_layout
2088 \begin_layout Standard
2089 Most of these functions can only be called in on_paint and on_video callbacks.
2090  Exceptions are noted.
2091 \end_layout
2093 \begin_layout Standard
2094 Colors are 32-bit.
2095  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2096  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2097  opaque, 255 is almost transparent).
2098  -1 is the fully transparent color.
2099  Alpha values greater than 127 do work.
2100 \end_layout
2102 \begin_layout Standard
2103 Origin of coordinates is at top left corner of game display area.
2104  Left and top gaps correspond to negative coordinates.
2105 \end_layout
2107 \begin_layout Subsubsection
2108 gui.resolution()
2109 \end_layout
2111 \begin_layout Standard
2112 Returns 2-tuple (hresolution, vresolution).
2113 \end_layout
2115 \begin_layout Subsubsection
2116 gui.<class>_gap(number gap)
2117 \end_layout
2119 \begin_layout Standard
2120 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2121  is 8191).
2122 \end_layout
2124 \begin_layout Subsubsection
2125 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2126 \end_layout
2128 \begin_layout Standard
2129 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2130  16 high).
2131  Parameters:
2132 \end_layout
2134 \begin_layout Itemize
2135 x: X-coordinate to start the drawing from (and x-coordinate at begining
2136  of the lines).
2137 \end_layout
2139 \begin_layout Itemize
2140 y: Y-coordinate to start the drawing from.
2141 \end_layout
2143 \begin_layout Itemize
2144 text: The text to draw.
2145 \end_layout
2147 \begin_layout Itemize
2148 fgc: Text color (default is 0xFFFFFF (white))
2149 \end_layout
2151 \begin_layout Itemize
2152 bgc: Background color (default is -1 (transparent))
2153 \end_layout
2155 \begin_layout Subsubsection
2156 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2157 \end_layout
2159 \begin_layout Standard
2160 Like gui.text, but draw using double-width.
2161 \end_layout
2163 \begin_layout Subsubsection
2164 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2165 \end_layout
2167 \begin_layout Standard
2168 Like gui.text, but draw using double-height.
2169 \end_layout
2171 \begin_layout Subsubsection
2172 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2173 \end_layout
2175 \begin_layout Standard
2176 Like gui.text, but draw using double-width/double-height.
2177 \end_layout
2179 \begin_layout Subsubsection
2180 gui.rectangle(number x, number y, number width, number height[, number thickness[
2181 , number outline[, number fill]]])
2182 \end_layout
2184 \begin_layout Standard
2185 Draw rectangle on the GUI.
2186  Parameters:
2187 \end_layout
2189 \begin_layout Itemize
2190 x: X-coordinate of left edge.
2191 \end_layout
2193 \begin_layout Itemize
2194 y: Y-coordinate of upper edge.
2195 \end_layout
2197 \begin_layout Itemize
2198 width: Width of rectangle.
2199 \end_layout
2201 \begin_layout Itemize
2202 height: Height of rectangle.
2203 \end_layout
2205 \begin_layout Itemize
2206 thickness: Thickness of outline (default is 1).
2207 \end_layout
2209 \begin_layout Itemize
2210 outline: Color of outline (default is 0xFFFFFF (white))
2211 \end_layout
2213 \begin_layout Itemize
2214 fill: Color of fil (default is -1 (transparent))
2215 \end_layout
2217 \begin_layout Subsubsection
2218 gui.pixel(number x, number y[, number color])
2219 \end_layout
2221 \begin_layout Standard
2222 Draw one pixel on the GUI.
2223  Parameters:
2224 \end_layout
2226 \begin_layout Itemize
2227 x: X-coordinate of the pixel
2228 \end_layout
2230 \begin_layout Itemize
2231 y: Y-coordinate of the pixel
2232 \end_layout
2234 \begin_layout Itemize
2235 color: Color of the pixel (default is 0xFFFFFF (white))
2236 \end_layout
2238 \begin_layout Subsubsection
2239 gui.crosshair(number x, number y[, number length[, number color]])
2240 \end_layout
2242 \begin_layout Standard
2243 Draw a crosshair.
2244  Parameters:
2245 \end_layout
2247 \begin_layout Itemize
2248 x: X-coordinate of the crosshair
2249 \end_layout
2251 \begin_layout Itemize
2252 y: Y-coordinate of the crosshair
2253 \end_layout
2255 \begin_layout Itemize
2256 length: Length of the crosshair lines (default 10).
2257 \end_layout
2259 \begin_layout Itemize
2260 color: Color of the crosshair (default is 0xFFFFFF (white))
2261 \end_layout
2263 \begin_layout Subsubsection
2264 gui.line(number x1, number y1, number x2, number y2[, number color])
2265 \end_layout
2267 \begin_layout Standard
2268 Draw a thin line.
2269  Parameters:
2270 \end_layout
2272 \begin_layout Itemize
2273 x1: X-coordinate of one end.
2274 \end_layout
2276 \begin_layout Itemize
2277 y1: Y-coordinate of one end.
2278 \end_layout
2280 \begin_layout Itemize
2281 x2: X-coordinate of the other end.
2282 \end_layout
2284 \begin_layout Itemize
2285 y2: Y-coordinate of the other end.
2286 \end_layout
2288 \begin_layout Itemize
2289 color: Color of the line (default is 0xFFFFFF (white)).
2290 \end_layout
2292 \begin_layout Subsubsection
2293 gui.circle(number x, number y, number r[, number thick[, number border[,
2294  number fil]]])
2295 \end_layout
2297 \begin_layout Standard
2298 Draw a circle.
2299  Parameters.
2300 \end_layout
2302 \begin_layout Itemize
2303 x: X-coordinate of the center
2304 \end_layout
2306 \begin_layout Itemize
2307 y: Y-coordinate of the center
2308 \end_layout
2310 \begin_layout Itemize
2311 r: The radius of the circle
2312 \end_layout
2314 \begin_layout Itemize
2315 thick: Border thickness
2316 \end_layout
2318 \begin_layout Itemize
2319 border: Border color (default is 0xFFFFFF (white))
2320 \end_layout
2322 \begin_layout Itemize
2323 fill: Fill color (default is -1 (transparent)).
2324 \end_layout
2326 \begin_layout Subsubsection
2327 gui.repaint()
2328 \end_layout
2330 \begin_layout Standard
2331 Request on_repaint() to happen as soon as possible.
2332  Can be used anywhere.
2333 \end_layout
2335 \begin_layout Subsubsection
2336 gui.subframe_update(boolean on)
2337 \end_layout
2339 \begin_layout Standard
2340 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2341  or not happen (on=false).
2342  Can be used anywhere.
2343 \end_layout
2345 \begin_layout Subsubsection
2346 gui.screenshot(string filename)
2347 \end_layout
2349 \begin_layout Standard
2350 Write PNG screenshot of the current frame (no drawings) to specified file.
2351  Can be used anywhere.
2352 \end_layout
2354 \begin_layout Subsubsection
2355 gui.color(number r, number g, number b[, number a])
2356 \end_layout
2358 \begin_layout Standard
2359 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2360  each component in scale 0-255.
2361  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2362  opaque).
2363  The default alpha is 256.
2364 \end_layout
2366 \begin_layout Subsubsection
2367 gui.status(string name, string value)
2368 \end_layout
2370 \begin_layout Standard
2371 Set status field 
2372 \begin_inset Quotes eld
2373 \end_inset
2375 L[<name>]
2376 \begin_inset Quotes erd
2377 \end_inset
2379  to <value> in status area.
2380  Can be used anywhere.
2381 \end_layout
2383 \begin_layout Subsection
2384 table input
2385 \end_layout
2387 \begin_layout Standard
2388 Input handling.
2389  Only available in on_input callback.
2390 \end_layout
2392 \begin_layout Subsubsection
2393 input.get(number controller, number index)
2394 \end_layout
2396 \begin_layout Standard
2397 Read the specified index (0-11) from specified controller (0-7).
2398  Notes:
2399 \end_layout
2401 \begin_layout Itemize
2402 Uses physical controller numbering.
2403  Gamepad in port 2 is controller 4, not 1!
2404 \end_layout
2406 \begin_layout Subsubsection
2407 input.set(number controller, number index, number value)
2408 \end_layout
2410 \begin_layout Standard
2411 Write the specified index (0-11) from specified controller (0-7), storing
2412  value.
2413  Notes:
2414 \end_layout
2416 \begin_layout Itemize
2417 Uses physical controller numbering.
2418  Gamepad in port 2 is controller 4, not 1!
2419 \end_layout
2421 \begin_layout Subsubsection
2422 input.reset([number cycles])
2423 \end_layout
2425 \begin_layout Standard
2426 Execute reset.
2427  If cycles is greater than zero, do delayed reset.
2428  0 (or no value) causes immediate reset.
2429 \end_layout
2431 \begin_layout Itemize
2432 Only available with subframe flag false.
2433 \end_layout
2435 \begin_layout Subsubsection
2436 input.raw()
2437 \end_layout
2439 \begin_layout Standard
2440 Returns table of tables of all available keys and axes.
2441  The first table is indexed by key name (platform-dependent!), and the inner
2442  table has the following fields:
2443 \end_layout
2445 \begin_layout Itemize
2446 last_rawval: Last reported raw value for control.
2447 \end_layout
2449 \begin_layout Itemize
2450 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2451  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2452 \end_layout
2454 \begin_layout Itemize
2455 cal_left: Minimum calibration value.
2456  Only meaningful with axis and pressure types.
2457 \end_layout
2459 \begin_layout Itemize
2460 cal_center: Center calibration value.
2461  Only meaningful with axis and pressure types.
2462 \end_layout
2464 \begin_layout Itemize
2465 cal_right: Maximum calibration value.
2466  Only meaningful with axis and pressure types.
2467 \end_layout
2469 \begin_layout Itemize
2470 cal_tolerance: Dead zone tolerance.
2471  Only meaningful with axis and pressure types.
2472 \end_layout
2474 \begin_layout Subsection
2475 Table hostmemory
2476 \end_layout
2478 \begin_layout Standard
2479 Host memory handling (extra memory saved to savestates).
2480  Host memory starts empty.
2481 \end_layout
2483 \begin_layout Subsubsection
2484 hostmemory.read(number address)
2485 \end_layout
2487 \begin_layout Standard
2488 Reads hostmemory slot address.
2489  Slot numbers out of range return false instead of numeric.
2490 \end_layout
2492 \begin_layout Subsubsection
2493 hostmemory.write(number address, number value)
2494 \end_layout
2496 \begin_layout Standard
2497 Writes hostmemory slot with 0-255.
2498  Slot numbers out of range cause extension of host memory slot space.
2499 \end_layout
2501 \begin_layout Subsubsection
2502 hostmemory.readbyte(number address)
2503 \end_layout
2505 \begin_layout Standard
2506 Read unsigned byte (1 element) from given address.
2507  Slots out of range return false.
2508 \end_layout
2510 \begin_layout Subsubsection
2511 hostmemory.writebyte(number address, number value)
2512 \end_layout
2514 \begin_layout Standard
2515 Write unsigned byte (1 element) to given slot.
2516  Slot numbers out of range cause extension.
2517 \end_layout
2519 \begin_layout Subsubsection
2520 hostmemory.readsbyte(number address)
2521 \end_layout
2523 \begin_layout Standard
2524 Read signed byte (1 element) from given address.
2525  Slots out of range return false.
2526 \end_layout
2528 \begin_layout Subsubsection
2529 hostmemory.writesbyte(number address, number value)
2530 \end_layout
2532 \begin_layout Standard
2533 Write signed byte (1 element) to given slot.
2534  Slot numbers out of range cause extension.
2535 \end_layout
2537 \begin_layout Subsubsection
2538 hostmemory.readword(number address)
2539 \end_layout
2541 \begin_layout Standard
2542 Read unsigned word (2 elements) from given address.
2543  Slots out of range return false.
2544 \end_layout
2546 \begin_layout Subsubsection
2547 hostmemory.writeword(number address, number value)
2548 \end_layout
2550 \begin_layout Standard
2551 Write unsigned word (2 elements) to given slot.
2552  Slot numbers out of range cause extension.
2553 \end_layout
2555 \begin_layout Subsubsection
2556 hostmemory.readsword(number address)
2557 \end_layout
2559 \begin_layout Standard
2560 Read signed word (2 elements) from given address.
2561  Slots out of range return false.
2562 \end_layout
2564 \begin_layout Subsubsection
2565 hostmemory.writesword(number address, number value)
2566 \end_layout
2568 \begin_layout Standard
2569 Write signed word (2 elements) to given slot.
2570  Slot numbers out of range cause extension.
2571 \end_layout
2573 \begin_layout Subsubsection
2574 hostmemory.readdword(number address)
2575 \end_layout
2577 \begin_layout Standard
2578 Read unsigned doubleword (4 elements) from given address.
2579  Slots out of range return false.
2580 \end_layout
2582 \begin_layout Subsubsection
2583 hostmemory.writedword(number address, number value)
2584 \end_layout
2586 \begin_layout Standard
2587 Write unsigned doubleword (4 elements) to given slot.
2588  Slot numbers out of range cause extension.
2589 \end_layout
2591 \begin_layout Subsubsection
2592 hostmemory.readsdword(number address)
2593 \end_layout
2595 \begin_layout Standard
2596 Read signed doubleword (4 elements) from given address.
2597  Slots out of range return false.
2598 \end_layout
2600 \begin_layout Subsubsection
2601 hostmemory.writesdword(number address, number value)
2602 \end_layout
2604 \begin_layout Standard
2605 Write signed doubleword (4 elements) to given slot.
2606  Slot numbers out of range cause extension.
2607 \end_layout
2609 \begin_layout Subsubsection
2610 hostmemory.readqword(number address)
2611 \end_layout
2613 \begin_layout Standard
2614 Read unsigned quadword (8 elements) from given address.
2615  Slots out of range return false.
2616 \end_layout
2618 \begin_layout Subsubsection
2619 hostmemory.writeqword(number address, number value)
2620 \end_layout
2622 \begin_layout Standard
2623 Write unsigned quadword (4 elements) to given slot.
2624  Slot numbers out of range cause extension.
2625 \end_layout
2627 \begin_layout Subsubsection
2628 hostmemory.readsqword(number address)
2629 \end_layout
2631 \begin_layout Standard
2632 Read signed quadword (8 elements) from given address.
2633  Slots out of range return false.
2634 \end_layout
2636 \begin_layout Subsubsection
2637 hostmemory.writesqword(number address, number value)
2638 \end_layout
2640 \begin_layout Standard
2641 Write signed quadword (8 elements) to given slot.
2642  Slot numbers out of range cause extension.
2643 \end_layout
2645 \begin_layout Subsection
2646 Table movie
2647 \end_layout
2649 \begin_layout Standard
2650 Movie handling
2651 \end_layout
2653 \begin_layout Subsubsection
2654 movie.currentframe()
2655 \end_layout
2657 \begin_layout Standard
2658 Return number of current frame.
2659 \end_layout
2661 \begin_layout Subsubsection
2662 movie.framecount()
2663 \end_layout
2665 \begin_layout Standard
2666 Return number of frames in movie.
2667 \end_layout
2669 \begin_layout Subsubsection
2670 movie.readonly()
2671 \end_layout
2673 \begin_layout Standard
2674 Return true if in readonly mode, false if in readwrite.
2675 \end_layout
2677 \begin_layout Subsubsection
2678 movie.set_readwrite()
2679 \end_layout
2681 \begin_layout Standard
2682 Set readwrite mode (does not cause on_readwrite callback).
2683 \end_layout
2685 \begin_layout Subsubsection
2686 movie.frame_subframes(number frame)
2687 \end_layout
2689 \begin_layout Standard
2690 Count number of subframes in specified frame (frame numbers are 1-based)
2691  and return that.
2692 \end_layout
2694 \begin_layout Subsubsection
2695 movie.read_subframe(number frame, number subframe)
2696 \end_layout
2698 \begin_layout Standard
2699 Read specifed subframe in specified frame and return data as array (100
2700  elements, numbered 0-99 currently).
2701 \end_layout
2703 \begin_layout Subsection
2704 Table settings
2705 \end_layout
2707 \begin_layout Standard
2708 Routines for settings manipulation
2709 \end_layout
2711 \begin_layout Subsubsection
2712 settings.get(string name)
2713 \end_layout
2715 \begin_layout Standard
2716 Get value of setting.
2717  If setting is blank, returns false.
2718  If setting value can't be obtained, returns (nil, error message).
2719 \end_layout
2721 \begin_layout Subsubsection
2722 settings.set(string name, string value)
2723 \end_layout
2725 \begin_layout Standard
2726 Set value of setting.
2727  If setting can't be set, returns (nil, error message).
2728 \end_layout
2730 \begin_layout Subsubsection
2731 settings.is_set(string name)
2732 \end_layout
2734 \begin_layout Standard
2735 Returns if setting is set.
2736  If setting does not exist, returns (nil, error message).
2737 \end_layout
2739 \begin_layout Subsubsection
2740 settings.blank(string name)
2741 \end_layout
2743 \begin_layout Standard
2744 Blanks a setting and returns true.
2745  If setting can't be blanked, returns (nil, error message).
2746 \end_layout
2748 \begin_layout Subsection
2749 Table memory
2750 \end_layout
2752 \begin_layout Standard
2753 Contains various functions for managing memory
2754 \end_layout
2756 \begin_layout Subsubsection
2757 memory.vma_count()
2758 \end_layout
2760 \begin_layout Standard
2761 Returns the number of VMAs
2762 \end_layout
2764 \begin_layout Subsubsection
2765 memory.read_vma(number index)
2766 \end_layout
2768 \begin_layout Standard
2769 Reads the specified VMA (indices start from zero).
2770  Trying to read invalid VMA gives nil.
2771  The read VMA is table with the following fields:
2772 \end_layout
2774 \begin_layout Itemize
2775 region_name (string): The readable name of the VMA
2776 \end_layout
2778 \begin_layout Itemize
2779 baseaddr (number): Base address of the VMA
2780 \end_layout
2782 \begin_layout Itemize
2783 lastaddr (number): Last address in the VMA.
2784 \end_layout
2786 \begin_layout Itemize
2787 size (number): The size of VMA in bytes.
2788 \end_layout
2790 \begin_layout Itemize
2791 readonly (boolean): True of the VMA corresponds to ROM.
2792 \end_layout
2794 \begin_layout Itemize
2795 native_endian (boolean): True if the VMA has native endian as opposed to
2796  little endian.
2797 \end_layout
2799 \begin_layout Subsubsection
2800 memory.find_vma(number address)
2801 \end_layout
2803 \begin_layout Standard
2804 Finds the VMA containing specified address.
2805  Returns table in the same format as read_vma or nil if not found.
2806 \end_layout
2808 \begin_layout Subsubsection
2809 memory.readbyte(number address)
2810 \end_layout
2812 \begin_layout Standard
2813 Reads the specified address as unsigned byte and returns the result.
2814 \end_layout
2816 \begin_layout Subsubsection
2817 memory.readsbyte(number address)
2818 \end_layout
2820 \begin_layout Standard
2821 Reads the specified address as signed byte and returns the result.
2822 \end_layout
2824 \begin_layout Subsubsection
2825 memory.writebyte(number address, number value)
2826 \end_layout
2828 \begin_layout Standard
2829 Writes the specified value (negative values undergo 2's complement) to specified
2830  address (as a byte).
2831 \end_layout
2833 \begin_layout Subsubsection
2834 memory.readword(number address)
2835 \end_layout
2837 \begin_layout Standard
2838 Reads the specified address as unsigned word and returns the result.
2839 \end_layout
2841 \begin_layout Subsubsection
2842 memory.readsword(number address)
2843 \end_layout
2845 \begin_layout Standard
2846 Reads the specified address as signed word and returns the result.
2847 \end_layout
2849 \begin_layout Subsubsection
2850 memory.writeword(number address, number value)
2851 \end_layout
2853 \begin_layout Standard
2854 Writes the specified value (negative values undergo 2's complement) to specified
2855  address (as a word).
2856 \end_layout
2858 \begin_layout Subsubsection
2859 memory.readdword(number address)
2860 \end_layout
2862 \begin_layout Standard
2863 Reads the specified address as unsigned doubleword and returns the result.
2864 \end_layout
2866 \begin_layout Subsubsection
2867 memory.readsdword(number address)
2868 \end_layout
2870 \begin_layout Standard
2871 Reads the specified address as signed doubleword and returns the result.
2872 \end_layout
2874 \begin_layout Subsubsection
2875 memory.writedword(number address, number value)
2876 \end_layout
2878 \begin_layout Standard
2879 Writes the specified value (negative values undergo 2's complement) to specified
2880  address (as a doubleword).
2881 \end_layout
2883 \begin_layout Subsubsection
2884 memory.readqword(number address)
2885 \end_layout
2887 \begin_layout Standard
2888 Reads the specified address as unsigned quadword and returns the result.
2889 \end_layout
2891 \begin_layout Subsubsection
2892 memory.readsqword(number address)
2893 \end_layout
2895 \begin_layout Standard
2896 Reads the specified address as signed quadword and returns the result.
2897 \end_layout
2899 \begin_layout Subsubsection
2900 memory.writeqword(number address, number value)
2901 \end_layout
2903 \begin_layout Standard
2904 Writes the specified value (negative values undergo 2's complement) to specified
2905  address (as a quadword).
2906 \end_layout
2908 \begin_layout Subsection
2909 Table _SYSTEM
2910 \end_layout
2912 \begin_layout Standard
2913 Contains copy of global variables from time of Lua initialization.
2914  Non-writeable.
2915 \end_layout
2917 \begin_layout Subsection
2918 Callbacks
2919 \end_layout
2921 \begin_layout Standard
2922 Various callbacks to Lua that can occur.
2923 \end_layout
2925 \begin_layout Subsubsection
2926 Callback: on_paint()
2927 \end_layout
2929 \begin_layout Standard
2930 Called when screen is being painted.
2931  Any gui.* calls requiring graphic context draw on the screen.
2932 \end_layout
2934 \begin_layout Subsubsection
2935 Callback: on_video()
2936 \end_layout
2938 \begin_layout Standard
2939 Called when video dump frame is being painted.
2940  Any gui.* calls requiring graphic context draw on the video.
2941 \end_layout
2943 \begin_layout Subsubsection
2944 Callback: on_frame()
2945 \end_layout
2947 \begin_layout Standard
2948 Called on each starting whole frame.
2949 \end_layout
2951 \begin_layout Subsubsection
2952 Callback: on_startup()
2953 \end_layout
2955 \begin_layout Standard
2956 Called when the emulator is starting (lsnes.rc and --run files has been run).
2957 \end_layout
2959 \begin_layout Subsubsection
2960 Callback: on_pre_load(string name)
2961 \end_layout
2963 \begin_layout Standard
2964 Called just before savestate/movie load occurs (note: loads are always delayed,
2965  so this occurs even when load was initiated by lua).
2966 \end_layout
2968 \begin_layout Subsubsection
2969 Callback: on_err_load(string name)
2970 \end_layout
2972 \begin_layout Standard
2973 Called if loadstate goes wrong.
2974 \end_layout
2976 \begin_layout Subsubsection
2977 Callback: on_post_load(string name, boolean was_savestate)
2978 \end_layout
2980 \begin_layout Standard
2981 Called on successful loadstate.
2982  was_savestate gives if this was a savestate or a movie.
2983 \end_layout
2985 \begin_layout Subsubsection
2986 Callback: on_pre_save(string name, boolean is_savestate)
2987 \end_layout
2989 \begin_layout Standard
2990 Called just before savestate save occurs (note: movie saves are synchronous
2991  and won't trigger these callbacks if called from Lua).
2992 \end_layout
2994 \begin_layout Subsubsection
2995 Callback: on_err_save(string name)
2996 \end_layout
2998 \begin_layout Standard
2999 Called if savestate goes wrong.
3000 \end_layout
3002 \begin_layout Subsubsection
3003 Callback: on_post_save(string name, boolean is_savestate)
3004 \end_layout
3006 \begin_layout Standard
3007 Called on successful savaestate.
3008  is_savestate gives if this was a savestate or a movie.
3009 \end_layout
3011 \begin_layout Subsubsection
3012 Callback: on_quit()
3013 \end_layout
3015 \begin_layout Standard
3016 Called when emulator is shutting down.
3017 \end_layout
3019 \begin_layout Subsubsection
3020 Callback: on_input(boolean subframe)
3021 \end_layout
3023 \begin_layout Standard
3024 Called when emulator is just sending input to bsnes core.
3025  Warning: This is called even in readonly mode, but the results are ignored.
3026 \end_layout
3028 \begin_layout Subsubsection
3029 Callback: on_reset()
3030 \end_layout
3032 \begin_layout Standard
3033 Called when SNES is reset.
3034 \end_layout
3036 \begin_layout Subsubsection
3037 Callback: on_readwrite()
3038 \end_layout
3040 \begin_layout Standard
3041 Called when moving into readwrite mode as result of 
3042 \begin_inset Quotes eld
3043 \end_inset
3045 set-rwmode
3046 \begin_inset Quotes erd
3047 \end_inset
3049  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3050  entry protection).
3051 \end_layout
3053 \begin_layout Subsubsection
3054 Callback: on_snoop(number port, number controller, number index, number
3055  value)
3056 \end_layout
3058 \begin_layout Standard
3059 Called each time bsnes asks for input.
3060  The value is the final value to be sent to bsnes core (readonly mode, autohold
3061  and autofire have been taken into account).
3062  Might be useful when translating movies to format suitable for console
3063  verification.
3064  Note: There is no way to modify the value to be sent.
3065 \end_layout
3067 \begin_layout Section
3068 Modifier and key names:
3069 \end_layout
3071 \begin_layout Subsection
3072 SDL Platform
3073 \end_layout
3075 \begin_layout Subsubsection
3076 Modifier names
3077 \end_layout
3079 \begin_layout Standard
3080 Following modifier names are known:
3081 \end_layout
3083 \begin_layout Itemize
3084 ctrl, lctrl, rctrl: Control keys
3085 \end_layout
3087 \begin_layout Itemize
3088 alt, lalt, ralt: ALT keys.
3089 \end_layout
3091 \begin_layout Itemize
3092 shift, lshift, rshift: Shift keys.
3093 \end_layout
3095 \begin_layout Itemize
3096 meta, lmeta, rmeta: Meta keys.
3097 \end_layout
3099 \begin_layout Itemize
3100 num, caps: Numlock/Capslock (these are sticky!)
3101 \end_layout
3103 \begin_layout Itemize
3104 mode: Mode select.
3105 \end_layout
3107 \begin_layout Subsubsection
3108 Key names
3109 \end_layout
3111 \begin_layout Standard
3112 Following key names are known:
3113 \end_layout
3115 \begin_layout Itemize
3116 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3117  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3118  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3119  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3120  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3121  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3122  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3123  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3124  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3125  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3126  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3127  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3128  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3129  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3130  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3131  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3132  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3133  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3134  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3135  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3136  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3137  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3138  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3139  break, menu, power, euro, undo
3140 \end_layout
3142 \begin_layout Itemize
3143 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3144  hardware-dependent scan code of <n> (useful to bind those keys that don't
3145  have symbolic names).
3146 \end_layout
3148 \begin_layout Subsubsection
3149 Joystick pseudo-keys:
3150 \end_layout
3152 \begin_layout Itemize
3153 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3154 \end_layout
3156 \begin_layout Itemize
3157 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3158 \end_layout
3160 \begin_layout Itemize
3161 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3162 \end_layout
3164 \begin_layout Itemize
3165 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3166 \end_layout
3168 \begin_layout Itemize
3169 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3170 \end_layout
3172 \begin_layout Itemize
3173 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3174  position (axis modes axis and axis_inverse).
3175 \end_layout
3177 \begin_layout Itemize
3178 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3179  position (axis modes axis and axis_inverse).
3180 \end_layout
3182 \begin_layout Itemize
3183 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3184  modes pressure_*).
3185 \end_layout
3187 \begin_layout Subsubsection
3188 Special buttons:
3189 \end_layout
3191 \begin_layout Itemize
3192 Escape: Enter/Exit Command mode, cancel modal dialogs.
3193 \end_layout
3195 \begin_layout Itemize
3196 Return (also KPEnter): Execute command, ok modal dialog.
3197 \end_layout
3199 \begin_layout Itemize
3200 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
3201  history
3202 \end_layout
3204 \begin_layout Itemize
3205 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
3206  history
3207 \end_layout
3209 \begin_layout Itemize
3210 Home (also KP7 if no num lock; command mode): Beginning of command.
3211 \end_layout
3213 \begin_layout Itemize
3214 End (also KP1 if no num lock; command mode): End of command.
3215 \end_layout
3217 \begin_layout Itemize
3218 Left (also KP4 if no num lock; command mode): Move cursor left.
3219 \end_layout
3221 \begin_layout Itemize
3222 Right (also KP6 if no num lock; command mode): Move cursor right.
3223 \end_layout
3225 \begin_layout Itemize
3226 Delete (also KP.
3227  if no num lock; command mode): Delete character to right of cursor.
3228 \end_layout
3230 \begin_layout Itemize
3231 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3232  overwrite modes.
3233 \end_layout
3235 \begin_layout Itemize
3236 Backspace (command mode): Delete character to left of cursor.
3237 \end_layout
3239 \begin_layout Itemize
3240 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3241 \end_layout
3243 \begin_layout Subsection
3244 wxWidgets platform
3245 \end_layout
3247 \begin_layout Subsubsection
3248 Modifier names:
3249 \end_layout
3251 \begin_layout Standard
3252 Following modifier names are known:
3253 \end_layout
3255 \begin_layout Itemize
3257 \end_layout
3259 \begin_layout Itemize
3260 ctrl
3261 \end_layout
3263 \begin_layout Itemize
3264 shift 
3265 \end_layout
3267 \begin_layout Itemize
3268 meta
3269 \end_layout
3271 \begin_layout Itemize
3272 cmd (Mac OS X only)
3273 \end_layout
3275 \begin_layout Subsubsection
3276 Key names:
3277 \end_layout
3279 \begin_layout Standard
3280 Following key names are known:
3281 \end_layout
3283 \begin_layout Itemize
3284 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3285  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3286  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3287  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3288  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3289  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3290  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3291  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3292  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3293  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3294  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3295  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3296  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3297  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3298  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3299  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3300  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3301  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3302  windows_right, windows_menu, command, special1, special2, special3, special4,
3303  special5, special6, special7, special8, special9, special10, special11,
3304  special12, special13, special14, special15, special16, special17, special18,
3305  special19, special20
3306 \end_layout
3308 \begin_layout Section
3309 Movie file format
3310 \end_layout
3312 \begin_layout Standard
3313 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3314  (note: If you recompress it, do not use compression methods other than
3315  store and deflate and especially do not use encryption of any kind).
3316 \end_layout
3318 \begin_layout Subsection
3319 Detecting clean start/SRAM/Savestate
3320 \end_layout
3322 \begin_layout Itemize
3323 If file has member 
3324 \begin_inset Quotes eld
3325 \end_inset
3327 savestate
3328 \begin_inset Quotes erd
3329 \end_inset
3331  it is savestate, otherwise:
3332 \end_layout
3334 \begin_layout Itemize
3335 If file has members with names starting 
3336 \begin_inset Quotes eld
3337 \end_inset
3339 moviesram.
3340 \begin_inset Quotes erd
3341 \end_inset
3343  it is movie starting from SRAM, otherwise:
3344 \end_layout
3346 \begin_layout Itemize
3347 It is movie starting from clear state.
3348 \end_layout
3350 \begin_layout Subsection
3351 Member: gametype
3352 \end_layout
3354 \begin_layout Standard
3355 Type of game ROM and region (as one line).
3356  Valid values are:
3357 \end_layout
3359 \begin_layout Standard
3360 \begin_inset Tabular
3361 <lyxtabular version="3" rows="8" columns="3">
3362 <features tabularvalignment="middle">
3363 <column alignment="center" valignment="top" width="0">
3364 <column alignment="center" valignment="top" width="0">
3365 <column alignment="center" valignment="top" width="0">
3366 <row>
3367 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3368 \begin_inset Text
3370 \begin_layout Plain Layout
3371 Value
3372 \end_layout
3374 \end_inset
3375 </cell>
3376 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3377 \begin_inset Text
3379 \begin_layout Plain Layout
3380 System
3381 \end_layout
3383 \end_inset
3384 </cell>
3385 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3386 \begin_inset Text
3388 \begin_layout Plain Layout
3389 Region
3390 \end_layout
3392 \end_inset
3393 </cell>
3394 </row>
3395 <row>
3396 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3397 \begin_inset Text
3399 \begin_layout Plain Layout
3400 snes_pal
3401 \end_layout
3403 \end_inset
3404 </cell>
3405 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3406 \begin_inset Text
3408 \begin_layout Plain Layout
3409 Super NES
3410 \end_layout
3412 \end_inset
3413 </cell>
3414 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3415 \begin_inset Text
3417 \begin_layout Plain Layout
3419 \end_layout
3421 \end_inset
3422 </cell>
3423 </row>
3424 <row>
3425 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3426 \begin_inset Text
3428 \begin_layout Plain Layout
3429 sgb_pal
3430 \end_layout
3432 \end_inset
3433 </cell>
3434 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3435 \begin_inset Text
3437 \begin_layout Plain Layout
3438 Super Game Boy
3439 \end_layout
3441 \end_inset
3442 </cell>
3443 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3444 \begin_inset Text
3446 \begin_layout Plain Layout
3448 \end_layout
3450 \end_inset
3451 </cell>
3452 </row>
3453 <row>
3454 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3455 \begin_inset Text
3457 \begin_layout Plain Layout
3458 snes_ntsc
3459 \end_layout
3461 \end_inset
3462 </cell>
3463 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3464 \begin_inset Text
3466 \begin_layout Plain Layout
3467 Super NES
3468 \end_layout
3470 \end_inset
3471 </cell>
3472 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3473 \begin_inset Text
3475 \begin_layout Plain Layout
3476 NTSC
3477 \end_layout
3479 \end_inset
3480 </cell>
3481 </row>
3482 <row>
3483 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3484 \begin_inset Text
3486 \begin_layout Plain Layout
3487 sgb_ntsc
3488 \end_layout
3490 \end_inset
3491 </cell>
3492 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3493 \begin_inset Text
3495 \begin_layout Plain Layout
3496 Super Game Boy
3497 \end_layout
3499 \end_inset
3500 </cell>
3501 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3502 \begin_inset Text
3504 \begin_layout Plain Layout
3505 NTSC
3506 \end_layout
3508 \end_inset
3509 </cell>
3510 </row>
3511 <row>
3512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3513 \begin_inset Text
3515 \begin_layout Plain Layout
3517 \end_layout
3519 \end_inset
3520 </cell>
3521 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3522 \begin_inset Text
3524 \begin_layout Plain Layout
3525 BS-X (non-slotted)
3526 \end_layout
3528 \end_inset
3529 </cell>
3530 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3531 \begin_inset Text
3533 \begin_layout Plain Layout
3534 NTSC
3535 \end_layout
3537 \end_inset
3538 </cell>
3539 </row>
3540 <row>
3541 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3542 \begin_inset Text
3544 \begin_layout Plain Layout
3545 bsxslotted
3546 \end_layout
3548 \end_inset
3549 </cell>
3550 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3551 \begin_inset Text
3553 \begin_layout Plain Layout
3554 BS-X (slotted)
3555 \end_layout
3557 \end_inset
3558 </cell>
3559 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3560 \begin_inset Text
3562 \begin_layout Plain Layout
3563 NTSC
3564 \end_layout
3566 \end_inset
3567 </cell>
3568 </row>
3569 <row>
3570 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3571 \begin_inset Text
3573 \begin_layout Plain Layout
3574 sufamiturbo
3575 \end_layout
3577 \end_inset
3578 </cell>
3579 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3580 \begin_inset Text
3582 \begin_layout Plain Layout
3583 Sufami Turbo
3584 \end_layout
3586 \end_inset
3587 </cell>
3588 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3589 \begin_inset Text
3591 \begin_layout Plain Layout
3592 NTSC
3593 \end_layout
3595 \end_inset
3596 </cell>
3597 </row>
3598 </lyxtabular>
3600 \end_inset
3603 \end_layout
3605 \begin_layout Standard
3606 Frame rates are:
3607 \end_layout
3609 \begin_layout Standard
3610 \begin_inset Tabular
3611 <lyxtabular version="3" rows="3" columns="2">
3612 <features tabularvalignment="middle">
3613 <column alignment="center" valignment="top" width="0">
3614 <column alignment="center" valignment="top" width="0">
3615 <row>
3616 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3617 \begin_inset Text
3619 \begin_layout Plain Layout
3620 Region
3621 \end_layout
3623 \end_inset
3624 </cell>
3625 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3626 \begin_inset Text
3628 \begin_layout Plain Layout
3629 Framerate (fps)
3630 \end_layout
3632 \end_inset
3633 </cell>
3634 </row>
3635 <row>
3636 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3637 \begin_inset Text
3639 \begin_layout Plain Layout
3641 \end_layout
3643 \end_inset
3644 </cell>
3645 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3646 \begin_inset Text
3648 \begin_layout Plain Layout
3649 322445/6448
3650 \end_layout
3652 \end_inset
3653 </cell>
3654 </row>
3655 <row>
3656 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3657 \begin_inset Text
3659 \begin_layout Plain Layout
3660 NTSC
3661 \end_layout
3663 \end_inset
3664 </cell>
3665 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3666 \begin_inset Text
3668 \begin_layout Plain Layout
3669 10738636/178683
3670 \end_layout
3672 \end_inset
3673 </cell>
3674 </row>
3675 </lyxtabular>
3677 \end_inset
3680 \end_layout
3682 \begin_layout Subsection
3683 Member: port1
3684 \end_layout
3686 \begin_layout Standard
3687 Contains type of port #1 (as one line).
3688  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3689  If not present, defaults to 'gamepad'.
3690 \end_layout
3692 \begin_layout Subsection
3693 Member: port2
3694 \end_layout
3696 \begin_layout Standard
3697 Contains type of port #2 (as one line).
3698  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3699  'justifier' and 'justifiers'.
3700  If not present, defaults to 'none'.
3701 \end_layout
3703 \begin_layout Subsection
3704 Member: gamename
3705 \end_layout
3707 \begin_layout Standard
3708 Contains name of the game (as one line).
3709 \end_layout
3711 \begin_layout Subsection
3712 Member: authors
3713 \end_layout
3715 \begin_layout Standard
3716 Contains authors, one per line.
3717  Part before '|' is the full name, part after is the nickname.
3718 \end_layout
3720 \begin_layout Subsection
3721 Member: systemid
3722 \end_layout
3724 \begin_layout Standard
3725 Always 
3726 \begin_inset Quotes eld
3727 \end_inset
3729 lsnes-rr1
3730 \begin_inset Quotes erd
3731 \end_inset
3733  (one line).
3734  Used to reject other saves.
3735 \end_layout
3737 \begin_layout Subsection
3738 Member: controlsversion
3739 \end_layout
3741 \begin_layout Standard
3742 Always 
3743 \begin_inset Quotes eld
3744 \end_inset
3747 \begin_inset Quotes erd
3748 \end_inset
3750  (one line).
3751  Used to identify what controls are there.
3752 \end_layout
3754 \begin_layout Subsection
3755 Member: 
3756 \begin_inset Quotes eld
3757 \end_inset
3759 coreversion
3760 \begin_inset Quotes erd
3761 \end_inset
3764 \end_layout
3766 \begin_layout Standard
3767 Contains bsnes core version number (as one line).
3768 \end_layout
3770 \begin_layout Subsection
3771 Member: projectid
3772 \end_layout
3774 \begin_layout Standard
3775 Contains project ID (as one line).
3776  Used to identify if two movies are part of the same project.
3777 \end_layout
3779 \begin_layout Subsection
3780 Member: {rom,slota,slotb}{,xml}.sha256
3781 \end_layout
3783 \begin_layout Standard
3784 Contains SHA-256 of said ROM or ROM mapping file (as one line).
3785  Absent if corresponding file is absent.
3786 \end_layout
3788 \begin_layout Subsection
3789 Member: moviesram.<name>
3790 \end_layout
3792 \begin_layout Standard
3793 Raw binary startup SRAM of kind <name>.
3794  Only present in savestates and movies starting from SRAM.
3795 \end_layout
3797 \begin_layout Subsection
3798 Member: saveframe
3799 \end_layout
3801 \begin_layout Standard
3802 Contains frame number (as one line) of frame movie was saved on.
3803  Only present in savestates.
3804 \end_layout
3806 \begin_layout Subsection
3807 Member: lagcounter
3808 \end_layout
3810 \begin_layout Standard
3811 Current value of lag counter (as one line).
3812  Only present in savestates.
3813 \end_layout
3815 \begin_layout Subsection
3816 Member: pollcounters
3817 \end_layout
3819 \begin_layout Standard
3820 Contains poll counters (currently 100 of them), one per line.
3821  Each line is raw poll count if DRDY is set for it.
3822  Otherwise it is negative poll count minus one.
3823  Only present in savestates.
3824 \end_layout
3826 \begin_layout Subsection
3827 Member: hostmemory
3828 \end_layout
3830 \begin_layout Standard
3831 Raw binary dump of host memory.
3832  Only present in savestates.
3833 \end_layout
3835 \begin_layout Subsection
3836 Member: savestate
3837 \end_layout
3839 \begin_layout Standard
3840 The raw binary savestate itself.
3841  Savestate detection uses this file, only present in savestates.
3842 \end_layout
3844 \begin_layout Subsection
3845 Member: screenshot
3846 \end_layout
3848 \begin_layout Standard
3849 Screenshot of current frame.
3850  Only present in savestates.
3851  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
3852  data.
3853  Height of image is inferred from the width and size of data.
3854 \end_layout
3856 \begin_layout Subsection
3857 Member: sram.<name>
3858 \end_layout
3860 \begin_layout Standard
3861 Raw binary SRAM of kind <name> at time of savestate.
3862  Only present in savestates.
3863 \end_layout
3865 \begin_layout Subsection
3866 Member: input
3867 \end_layout
3869 \begin_layout Standard
3870 The actual input track, one line per subframe (blank lines are skipped).
3871 \end_layout
3873 \begin_layout Itemize
3874 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
3875  part of same frame as previous, otherwise it starts a new frame.
3876 \end_layout
3878 \begin_layout Itemize
3879 First subframe must start a new frame.
3880 \end_layout
3882 \begin_layout Standard
3883 Length of movie in frames is number of lines in input file that start a
3884  new frame.
3885 \end_layout
3887 \begin_layout Subsection
3888 Member: rerecords
3889 \end_layout
3891 \begin_layout Standard
3892 Contains textual base-10 rerecord count (as one line; emulator just writes
3893  this, it doesn't read it) + 1.
3894 \end_layout
3896 \begin_layout Subsection
3897 Member: rrdata
3898 \end_layout
3900 \begin_layout Standard
3901 This member stores set of load IDs.
3902  There is one load ID per rerecord (plus one corresponding to start of project).
3903 \end_layout
3905 \begin_layout Itemize
3906 This member constists of concatenation of records
3907 \end_layout
3909 \begin_layout Itemize
3910 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
3911  IDs.
3912 \end_layout
3914 \begin_layout Itemize
3915 IDs are interpretted as 256-bit big-endian integers with warparound.
3916 \end_layout
3918 \begin_layout Itemize
3919 Initial predicted ID is all zeroes.
3920 \end_layout
3922 \begin_layout Standard
3923 Format of each record is:
3924 \end_layout
3926 \begin_layout Itemize
3927 1 byte: Opcode byte.
3928  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
3929  Bit 7 is unused.
3930 \end_layout
3932 \begin_layout Itemize
3933 32-prefixlen bytes of ID.
3934 \end_layout
3936 \begin_layout Itemize
3937 countlen bytes of big-endian count (count).
3938 \end_layout
3940 \begin_layout Standard
3941 Records are processed as follows:
3942 \end_layout
3944 \begin_layout Itemize
3945 To form the first ID encoded by record, take the first prefixlen bytes predicted
3946  ID and append the read ID value to it.
3947  The result is the first ID encoded.
3948 \end_layout
3950 \begin_layout Itemize
3951 If countlen is 0, record encodes 1 ID.
3952 \end_layout
3954 \begin_layout Itemize
3955 If countlen is 1, record encodes 2+count IDs.
3956 \end_layout
3958 \begin_layout Itemize
3959 If countlen is 2, record encodes 258+count IDs.
3960 \end_layout
3962 \begin_layout Itemize
3963 If countlen is 3, record encodes 65794+count IDs.
3964 \end_layout
3966 \begin_layout Itemize
3967 The new predicted ID is the next ID after last one encoded by the record.
3968 \end_layout
3970 \begin_layout Standard
3971 The number of rerecords + 1 is equal to the sum of number of IDs encoded
3972  by all records.
3973 \end_layout
3975 \begin_layout Subsection
3976 Member: starttime.second
3977 \end_layout
3979 \begin_layout Standard
3980 Movie starting time, second part.
3981  Epoch is Unix epoch.
3982  Default is 1,000,000,000.
3983 \end_layout
3985 \begin_layout Subsection
3986 Member: starttime.subsecond
3987 \end_layout
3989 \begin_layout Standard
3990 Movie starting time, subsecond part.
3991  Unit is CPU clocks.
3992  Default is 0.
3993 \end_layout
3995 \begin_layout Subsection
3996 Member: savetime.second
3997 \end_layout
3999 \begin_layout Standard
4000 Movie saving time, second part.
4001  Default is starttime.second.
4002  Only present in savestates.
4003 \end_layout
4005 \begin_layout Subsection
4006 Member: savetime.subsecond
4007 \end_layout
4009 \begin_layout Standard
4010 Movie saving time, subsecond part.
4011  Default is starttime.subsecond.
4012  Only present in savestates.
4013 \end_layout
4015 \begin_layout Section
4016 Quick'n'dirty encode guide
4017 \end_layout
4019 \begin_layout Enumerate
4020 Start the emulator and load the movie file.
4021 \end_layout
4023 \begin_layout Enumerate
4024 Set large AVI option 'set-setting avi-large on'
4025 \end_layout
4027 \begin_layout Enumerate
4028 Enable dumping 'dump-avi tmpdump' 
4029 \end_layout
4031 \begin_layout Enumerate
4032 Unpause and let it run until you want to end dumping.
4033 \end_layout
4035 \begin_layout Enumerate
4036 Close the emulator (closing the window is the easiest way).
4037  Or use 'end-avi'.
4038 \end_layout
4040 \begin_layout Enumerate
4041 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4042  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4043 \end_layout
4045 \begin_layout Enumerate
4046 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4047 \end_layout
4049 \begin_layout Enumerate
4050 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4051  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4052 \end_layout
4054 \begin_layout Enumerate
4055 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4056  Now final.mkv contains quick'n'dirty encode.
4057 \end_layout
4059 \begin_layout Section
4060 Axis configurations for some gamepad types:
4061 \end_layout
4063 \begin_layout Subsection
4064 XBox360 controller:
4065 \end_layout
4067 \begin_layout Standard
4068 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4069 \end_layout
4071 \begin_layout LyX-Code
4072 set-axis joystick0axis2 pressure-+
4073 \end_layout
4075 \begin_layout LyX-Code
4076 set-axis joystick0axis5 pressure-+
4077 \end_layout
4079 \begin_layout Itemize
4080 This is needed for SDL only.
4081  EVDEV sets those types correctly.
4082 \end_layout
4084 \begin_layout Subsection
4085 PS3 
4086 \begin_inset Quotes eld
4087 \end_inset
4089 sixaxis
4090 \begin_inset Quotes erd
4091 \end_inset
4093  controller:
4094 \end_layout
4096 \begin_layout Standard
4097 Axes 8-19 should be disabled.
4098 \end_layout
4100 \begin_layout LyX-Code
4101 set-axis joystick0axis8 disabled
4102 \end_layout
4104 \begin_layout LyX-Code
4105 set-axis joystick0axis9 disabled
4106 \end_layout
4108 \begin_layout LyX-Code
4109 set-axis joystick0axis10 disabled
4110 \end_layout
4112 \begin_layout LyX-Code
4113 set-axis joystick0axis11 disabled
4114 \end_layout
4116 \begin_layout LyX-Code
4117 set-axis joystick0axis12 disabled
4118 \end_layout
4120 \begin_layout LyX-Code
4121 set-axis joystick0axis13 disabled
4122 \end_layout
4124 \begin_layout LyX-Code
4125 set-axis joystick0axis14 disabled
4126 \end_layout
4128 \begin_layout LyX-Code
4129 set-axis joystick0axis15 disabled
4130 \end_layout
4132 \begin_layout LyX-Code
4133 set-axis joystick0axis16 disabled
4134 \end_layout
4136 \begin_layout LyX-Code
4137 set-axis joystick0axis17 disabled
4138 \end_layout
4140 \begin_layout LyX-Code
4141 set-axis joystick0axis18 disabled
4142 \end_layout
4144 \begin_layout LyX-Code
4145 set-axis joystick0axis19 disabled
4146 \end_layout
4148 \begin_layout Section
4149 Errata:
4150 \end_layout
4152 \begin_layout Subsection
4153 Problems from BSNES core:
4154 \end_layout
4156 \begin_layout Itemize
4157 The whole pending save stuff.
4158 \end_layout
4160 \begin_layout Itemize
4161 Lack of layer hiding.
4162 \end_layout
4164 \begin_layout Itemize
4165 It is slow (especially accuracy).
4166 \end_layout
4168 \begin_layout Itemize
4169 Firmwares can't be loaded from ZIP archives.
4170 \end_layout
4172 \begin_layout Subsection
4173 Other problems:
4174 \end_layout
4176 \begin_layout Itemize
4177 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4178 \end_layout
4180 \begin_layout Itemize
4181 Audio for last dumped frame is not itself dumped.
4182 \end_layout
4184 \begin_layout Itemize
4185 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4186 \end_layout
4188 \begin_layout Itemize
4189 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4190 \end_layout
4192 \begin_layout Itemize
4193 No menus, command based interface (SDL).
4194 \end_layout
4196 \begin_layout Itemize
4197 Long commands don't scroll.
4198 \end_layout
4200 \begin_layout Itemize
4201 The SDL screen drawing is slow.
4202 \end_layout
4204 \begin_layout Itemize
4205 Wxwidgets UI is still pretty buggy.
4206 \end_layout
4208 \begin_layout Section
4209 Changelog:
4210 \end_layout
4212 \begin_layout Subsection
4213 rr0-beta1
4214 \end_layout
4216 \begin_layout Itemize
4217 Fix -Wall warnings
4218 \end_layout
4220 \begin_layout Itemize
4221 Fix dumper video corruption with levels 10-18.
4222 \end_layout
4224 \begin_layout Subsection
4225 rr0-beta2
4226 \end_layout
4228 \begin_layout Itemize
4229 Autofire
4230 \end_layout
4232 \begin_layout Itemize
4233 Lots of code cleanups
4234 \end_layout
4236 \begin_layout Itemize
4237 Lua interface to settings
4238 \end_layout
4240 \begin_layout Itemize
4241 Allow specifying AVI borders without Lua
4242 \end_layout
4244 \begin_layout Itemize
4245 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4246 \end_layout
4248 \begin_layout Itemize
4249 on_snoop lua callback
4250 \end_layout
4252 \begin_layout Itemize
4253 Faster movie loading and saving.
4254 \end_layout
4256 \begin_layout Subsection
4257 rr0-beta3
4258 \end_layout
4260 \begin_layout Itemize
4261 Joystick support
4262 \end_layout
4264 \begin_layout Subsection
4265 rr0-beta4
4266 \end_layout
4268 \begin_layout Itemize
4269 Fix multi-buttons
4270 \end_layout
4272 \begin_layout Itemize
4273 Save jukebox functionality.
4274 \end_layout
4276 \begin_layout Subsection
4277 rr0-beta5
4278 \end_layout
4280 \begin_layout Itemize
4281 Try to fix some nasty failing movie load edge cases
4282 \end_layout
4284 \begin_layout Itemize
4285 Allow specifying scripts to run on command line.
4286 \end_layout
4288 \begin_layout Subsection
4289 rr0-beta6
4290 \end_layout
4292 \begin_layout Itemize
4293 Major source code reorganization.
4294 \end_layout
4296 \begin_layout Itemize
4297 Backup savestates before overwriting.
4298 \end_layout
4300 \begin_layout Itemize
4301 Don't crash if loading initial state fails.
4302 \end_layout
4304 \begin_layout Subsection
4305 rr0-beta7
4306 \end_layout
4308 \begin_layout Itemize
4309 Fix firmware lookup
4310 \end_layout
4312 \begin_layout Itemize
4313 Fix author name parsing
4314 \end_layout
4316 \begin_layout Itemize
4317 Fix rerecord counting
4318 \end_layout
4320 \begin_layout Itemize
4321 (SDL) Print messages to console if SDL is uninitialized
4322 \end_layout
4324 \begin_layout Itemize
4325 Add movieinfo program
4326 \end_layout
4328 \begin_layout Itemize
4329 Fix loading movies starting from SRAM.
4330 \end_layout
4332 \begin_layout Subsection
4333 rr0-beta8
4334 \end_layout
4336 \begin_layout Itemize
4337 Add support for unattended dumping
4338 \end_layout
4340 \begin_layout Itemize
4341 Fix compiling for Win32
4342 \end_layout
4344 \begin_layout Itemize
4345 Don't lock up if sound can't be initialized
4346 \end_layout
4348 \begin_layout Itemize
4349 Strip trailing CR from commands
4350 \end_layout
4352 \begin_layout Itemize
4353 Don't try to do dubious things in global ctors (fix crash on startup)
4354 \end_layout
4356 \begin_layout Subsection
4357 rr0-beta9
4358 \end_layout
4360 \begin_layout Itemize
4361 Small documentation tweaking
4362 \end_layout
4364 \begin_layout Itemize
4365 Fix make clean
4366 \end_layout
4368 \begin_layout Itemize
4369 Fix major bug in modifier matching
4370 \end_layout
4372 \begin_layout Subsection
4373 rr0-beta10
4374 \end_layout
4376 \begin_layout Itemize
4377 Lots of documentation fixes
4378 \end_layout
4380 \begin_layout Itemize
4381 Use dedicated callbacks for event backcomm., not commands.
4382 \end_layout
4384 \begin_layout Itemize
4385 Ensure that the watchdog is not hit when executing delayed reset.
4386 \end_layout
4388 \begin_layout Itemize
4389 Remove errant tab from joystick message.
4390 \end_layout
4392 \begin_layout Subsection
4393 rr0-beta11
4394 \end_layout
4396 \begin_layout Itemize
4397 Make autofire operate in absolute time, not linear time
4398 \end_layout
4400 \begin_layout Itemize
4401 Reinitialize controls when resuming from loadstate
4402 \end_layout
4404 \begin_layout Itemize
4405 Some more code cleanups
4406 \end_layout
4408 \begin_layout Itemize
4409 If Lua allocator fails, call OOM_panic()
4410 \end_layout
4412 \begin_layout Itemize
4413 Byte/word/dword/qword sized host memory write/read functions.
4414 \end_layout
4416 \begin_layout Itemize
4417 Dump at correct framerate if dumping interlaced NTSC (height=448).
4418 \end_layout
4420 \begin_layout Subsection
4421 rr0-beta12
4422 \end_layout
4424 \begin_layout Itemize
4425 Actually include the complete source code
4426 \end_layout
4428 \begin_layout Itemize
4429 Keep track of RTC
4430 \end_layout
4432 \begin_layout Subsection
4433 rr0-beta13
4434 \end_layout
4436 \begin_layout Itemize
4437 Document {save,start}time.{,sub}second.
4438 \end_layout
4440 \begin_layout Itemize
4441 Intercept time() from bsnes core.
4442 \end_layout
4444 \begin_layout Subsection
4445 rr0-beta14
4446 \end_layout
4448 \begin_layout Itemize
4449 Allow disabling time() interception (allow build on Mac OS X)
4450 \end_layout
4452 \begin_layout Itemize
4453 Use SDLMain on Mac OS X (make SDL not crash)
4454 \end_layout
4456 \begin_layout Itemize
4457 Disable delayed resets (just plain too buggy for now).
4458 \end_layout
4460 \begin_layout Itemize
4461 Code cleanups
4462 \end_layout
4464 \begin_layout Itemize
4465 Use 16-bit for graphics/video instead of 32-bit.
4466 \end_layout
4468 \begin_layout Itemize
4469 gui.rectangle/gui.pixel
4470 \end_layout
4472 \begin_layout Itemize
4473 gui.crosshair
4474 \end_layout
4476 \begin_layout Itemize
4477 New CSCD writer implementation.
4478 \end_layout
4480 \begin_layout Subsection
4481 rr0-beta15
4482 \end_layout
4484 \begin_layout Itemize
4485 Fix interaction of * and +.
4486 \end_layout
4488 \begin_layout Itemize
4489 Manual improvements
4490 \end_layout
4492 \begin_layout Itemize
4493 Use gettimeofday()/usleep(), these seem portable enough.
4494 \end_layout
4496 \begin_layout Itemize
4497 Move joystick axis manipulation to keymapper code.
4498 \end_layout
4500 \begin_layout Itemize
4501 Changes to how read-only works.
4502 \end_layout
4504 \begin_layout Itemize
4505 Refactor controller input code.
4506 \end_layout
4508 \begin_layout Subsection
4509 rr0-beta16
4510 \end_layout
4512 \begin_layout Itemize
4513 Fix mouseclick scale compensation.
4514 \end_layout
4516 \begin_layout Itemize
4517 Draw area boundaries correctly in SDL code.
4518 \end_layout
4520 \begin_layout Itemize
4521 gui.screenshot.
4522 \end_layout
4524 \begin_layout Itemize
4525 Fix CSCD output (buffer overrun and race condition).
4526 \end_layout
4528 \begin_layout Subsection
4529 rr0-beta17
4530 \end_layout
4532 \begin_layout Itemize
4533 JMD dumping support.
4534 \end_layout
4536 \begin_layout Itemize
4537 Allow unattended dumping to JMD.
4538 \end_layout
4540 \begin_layout Itemize
4541 Move to BSNES v083.
4542 \end_layout
4544 \begin_layout Itemize
4545 Switch back to 32-bit colors.
4546 \end_layout
4548 \begin_layout Itemize
4549 Add Lua function gui.color.
4550 \end_layout
4552 \begin_layout Itemize
4553 Use some new C++11 features in GCC 4.6.
4554 \end_layout
4556 \begin_layout Itemize
4557 Be prepared for core frequency changes.
4558 \end_layout
4560 \begin_layout Itemize
4561 Pass colors in one chunk from Lua.
4562 \end_layout
4564 \begin_layout Subsection
4565 rr0-beta18
4566 \end_layout
4568 \begin_layout Itemize
4569 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4570  memory.read_vma() and memory.find_vma().
4571 \end_layout
4573 \begin_layout Itemize
4574 Numerious documentation fixups
4575 \end_layout
4577 \begin_layout Itemize
4578 RTC time format changed
4579 \end_layout
4581 \begin_layout Itemize
4582 Reformat flags display
4583 \end_layout
4585 \begin_layout Itemize
4586 Allow lua package name to be overridden
4587 \end_layout
4589 \begin_layout Itemize
4590 SDUMP (high-quality dumping).
4591 \end_layout
4593 \begin_layout Itemize
4594 Split platform support to plugins.
4595 \end_layout
4597 \begin_layout Itemize
4598 Make all sound plugins support basic sound commands
4599 \end_layout
4601 \begin_layout Itemize
4602 Support portaudio for sound.
4603 \end_layout
4605 \begin_layout Itemize
4606 Allow disable Lua/SDL searching.
4607 \end_layout
4609 \begin_layout Itemize
4610 Upconvert colors when copying lcscreen to screen.
4611 \end_layout
4613 \begin_layout Itemize
4614 Reorganize source tree.
4615 \end_layout
4617 \begin_layout Itemize
4618 Evdev joystick support.
4619 \end_layout
4621 \begin_layout Itemize
4622 Refactor more code into generic window code.
4623 \end_layout
4625 \begin_layout Subsection
4626 rr0-beta19
4627 \end_layout
4629 \begin_layout Itemize
4630 Refactor message handling.
4631 \end_layout
4633 \begin_layout Itemize
4634 Rework makefile
4635 \end_layout
4637 \begin_layout Itemize
4638 Documentation fixes
4639 \end_layout
4641 \begin_layout Itemize
4642 Finish pending saves before load/quit.
4643 \end_layout
4645 \begin_layout Itemize
4646 Wxwidgets graphics plugin.
4647 \end_layout
4649 \begin_layout Subsection
4650 rr0-beta20
4651 \end_layout
4653 \begin_layout Itemize
4654 Get rid of win32-crap.[ch]pp.
4655 \end_layout
4657 \begin_layout Itemize
4658 Move files around a lot.
4659 \end_layout
4661 \begin_layout Itemize
4662 Get rid of need for host C++ compiler.
4663 \end_layout
4665 \begin_layout Itemize
4666 Bsnes v084 core.
4667 \end_layout
4669 \begin_layout Itemize
4670 Refactor inter-component communication.
4671 \end_layout
4673 \begin_layout Itemize
4674 Fix zero luma.
4675 \end_layout
4677 \begin_layout Itemize
4678 Fix crash on multiline aliases.
4679 \end_layout
4681 \begin_layout Itemize
4682 Load/Save settings in wxwidgets gui.
4683 \end_layout
4685 \begin_layout Subsection
4686 rr0-beta21
4687 \end_layout
4689 \begin_layout Itemize
4690 Patch problems in bsnes core
4691 \end_layout
4693 \begin_layout Itemize
4694 SNES is little-endian, not big-endian!
4695 \end_layout
4697 \begin_layout Itemize
4698 Fix memory corruption in lcscreen::load()
4699 \end_layout
4701 \begin_layout Subsection
4702 rr0-beta22
4703 \end_layout
4705 \begin_layout Itemize
4706 Fix interpretting repeat counts in rrdata loading.
4707 \end_layout
4709 \begin_layout Itemize
4710 New lua callback: on_frame()
4711 \end_layout
4713 \begin_layout Itemize
4714 Remove calls to runtosave() that aren't supposed to be there
4715 \end_layout
4717 \begin_layout Itemize
4718 Lua function: movie.read_rtc()
4719 \end_layout
4721 \begin_layout Itemize
4722 Ignore src/fonts/font.cpp
4723 \end_layout
4725 \begin_layout Itemize
4726 Fix more bsnes core problems
4727 \end_layout
4729 \begin_layout Itemize
4730 Control bsnes random seeding
4731 \end_layout
4733 \begin_layout Itemize
4734 Pause-on-end
4735 \end_layout
4737 \begin_layout Itemize
4738 Some bsnes core debugging features (state dump and state hash)
4739 \end_layout
4741 \begin_layout Itemize
4742 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4743  it was 'lsnes rr0-beta21').
4744 \end_layout
4746 \begin_layout Subsection
4747 rr0-beta23
4748 \end_layout
4750 \begin_layout Itemize
4751 Fix memory corruption due to macro/field mixup
4752 \end_layout
4754 \begin_layout Itemize
4755 search-memory update
4756 \end_layout
4758 \begin_layout Itemize
4759 Allow direct-mapped framebuffer
4760 \end_layout
4762 \begin_layout Itemize
4763 SDL: Use SDL_ANYFORMAT if possible
4764 \end_layout
4766 \begin_layout Itemize
4767 SDMP2SOX: 2s delay modes.
4768 \end_layout
4770 \begin_layout Itemize
4771 Wxwidgets: Cleanups
4772 \end_layout
4774 \begin_layout Itemize
4775 Use sed -E, not sed -r.
4776  Fixes building on Mac OS X.
4777 \end_layout
4779 \begin_layout Itemize
4780 Wxwidgets: Save jukebox on exit
4781 \end_layout
4783 \begin_layout Itemize
4784 Fix RTC if using load-movie on savestate.
4785 \end_layout
4787 \begin_layout Itemize
4788 Fix crash related to full console mode.
4789 \end_layout
4791 \begin_layout Subsection
4792 rr0-beta24
4793 \end_layout
4795 \begin_layout Itemize
4796 Wxwidgets: Allow bringing application to foreground on Mac OS X.
4797 \end_layout
4799 \begin_layout Itemize
4800 Wxwidgets: Allow compiling on Mac OS X.
4801 \end_layout
4803 \begin_layout Itemize
4804 Use movie compare instead of movie hashing (faster save/load).
4805 \end_layout
4807 \begin_layout Itemize
4808 Lua: _SYSTEM table.
4809 \end_layout
4811 \begin_layout Subsection
4812 rr0-beta25
4813 \end_layout
4815 \begin_layout Itemize
4816 sdmp2sox: Pad soundtrack if using -l or -L.
4817 \end_layout
4819 \begin_layout Itemize
4820 sdmp2sox: Fix NTSC overscan.
4821 \end_layout
4823 \begin_layout Itemize
4824 sdmp2sox: Add AR correction mode.
4825 \end_layout
4827 \begin_layout Itemize
4828 call lua_close() when exiting.
4829 \end_layout
4831 \begin_layout Itemize
4832 Fix zip_writer bug causing warnings from info-zip and error from advzip.
4833 \end_layout
4835 \begin_layout Subsection
4836 rr0-beta26
4837 \end_layout
4839 \begin_layout Itemize
4840 Fix IPS patching code (use bsnes core IPS patcher).
4841 \end_layout
4843 \begin_layout Itemize
4844 Implement BPS patching (using bsnes core IPS patcher).
4845 \end_layout
4847 \begin_layout Itemize
4848 Add feature to load headered ROMs.
4849 \end_layout
4851 \begin_layout Subsection
4852 rr0-beta27
4853 \end_layout
4855 \begin_layout Itemize
4856 Show command names when showing keybindings
4857 \end_layout
4859 \begin_layout Subsection
4861 \end_layout
4863 \begin_layout Itemize
4864 Fix pause-on-end to be actually controllable
4865 \end_layout
4867 \begin_layout Itemize
4868 SDL: Poll all events in queue, not just first one (fixes slowness in command
4869  typing)
4870 \end_layout
4872 \begin_layout Itemize
4873 Wxwidgets: Fix ROM loading.
4874 \end_layout
4876 \begin_layout Subsection
4877 rr1-beta0
4878 \end_layout
4880 \begin_layout Itemize
4881 Lua: Add gui.textH, gui.textV, gui.textHV
4882 \end_layout
4884 \begin_layout Itemize
4885 Fix text colors on SDL on Mac OS X
4886 \end_layout
4888 \begin_layout Itemize
4889 Mode 'F' for finished in readonly mode.
4890 \end_layout
4892 \begin_layout Itemize
4893 Fix some WS errors.
4894 \end_layout
4896 \begin_layout Itemize
4897 Reliably pause after skip poll
4898 \end_layout
4900 \begin_layout Itemize
4901 Split UI and core into their own threads
4902 \end_layout
4904 \begin_layout Subsection
4905 rr1-beta1
4906 \end_layout
4908 \begin_layout Itemize
4909 Remove leftover dummy SRAM slot
4910 \end_layout
4912 \begin_layout Itemize
4913 Fix controller numbers.
4914 \end_layout
4916 \begin_layout Subsection
4917 rr1-beta2
4918 \end_layout
4920 \begin_layout Itemize
4921 Fix lsnes-dumpavi after interface change.
4922 \end_layout
4924 \begin_layout Itemize
4925 Also give BSNES patches for v085.
4926 \end_layout
4928 \begin_layout Itemize
4929 Pack movie data in memory.
4930 \end_layout
4932 \begin_layout Subsection
4933 rr1-beta3
4934 \end_layout
4936 \begin_layout Itemize
4937 Fix framecount/length given when loading movies.
4938 \end_layout
4940 \begin_layout Itemize
4941 Controller command memory leak fixes.
4942 \end_layout
4944 \begin_layout Itemize
4945 Don't leak palette if freeing screen object.
4946 \end_layout
4948 \begin_layout Subsection
4949 rr1-beta4
4950 \end_layout
4952 \begin_layout Itemize
4953 Detect revisions.
4954 \end_layout
4956 \begin_layout Itemize
4957 Wxwidgets: Allow controlling dumper from the menu.
4958 \end_layout
4960 \begin_layout Subsection
4961 rr1-beta5
4962 \end_layout
4964 \begin_layout Itemize
4965 Rewrite parts of manual
4966 \end_layout
4968 \begin_layout Itemize
4969 Lua: Make it work with Lua 5.2.
4970 \end_layout
4972 \begin_layout Subsection
4973 rr1-beta6
4974 \end_layout
4976 \begin_layout Itemize
4977 Win32: Fix compile errors.
4978 \end_layout
4980 \begin_layout Subsection
4981 rr1-beta7
4982 \end_layout
4984 \begin_layout Itemize
4985 Refactor controller input code.
4986 \end_layout
4988 \begin_layout Itemize
4989 Fix crash when using command line on SDL / Mac OS X.
4990 \end_layout
4992 \begin_layout Subsection
4993 rr1-beta8
4994 \end_layout
4996 \begin_layout Itemize
4997 Delete core/coroutine (obsolete)
4998 \end_layout
5000 \begin_layout Itemize
5001 Lag input display by one frame.
5002 \end_layout
5004 \begin_layout Itemize
5005 Rewind movie to beginning function.
5006 \end_layout
5008 \begin_layout Itemize
5009 Fix wrong frame number reported to Lua when repainting after loadstate
5010 \end_layout
5012 \begin_layout Itemize
5013 Support UI editing of jukebox
5014 \end_layout
5016 \begin_layout Itemize
5017 Wxwidgets: Save settings on exit.
5018 \end_layout
5020 \begin_layout Itemize
5021 Support ${project} for filenames
5022 \end_layout
5024 \begin_layout Itemize
5025 SDL: Fix command history
5026 \end_layout
5028 \begin_layout Subsection
5029 rr1-beta9
5030 \end_layout
5032 \begin_layout Itemize
5033 Fix some order-of-global-ctor bugs.
5034 \end_layout
5036 \begin_layout Subsection
5037 rr1-beta10
5038 \end_layout
5040 \begin_layout Itemize
5041 Fix crashes when quitting on Win32.
5042 \end_layout
5044 \begin_layout Subsection
5045 rr1-beta11
5046 \end_layout
5048 \begin_layout Itemize
5049 EVDEV: Queue keypresses from joystick, don't send directly
5050 \end_layout
5052 \begin_layout Itemize
5053 Wxwidgets: Load-Preserve that actually works.
5054 \end_layout
5056 \begin_layout Subsection
5057 rr1-beta12
5058 \end_layout
5060 \begin_layout Itemize
5061 Wxwidgets: GUI for memory search.
5062 \end_layout
5064 \begin_layout Itemize
5065 Warn about using synchronous queue in UI callback.
5066 \end_layout
5068 \end_body
5069 \end_document