Refactor codec zlib handling
[lsnes.git] / manual.lyx
blobdda574984541da3d91ee9fd268a8a2fa2e40fd35
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 --dumper=<dumper>
718 \end_layout
720 \begin_layout Standard
721 Set the dumper to use (required).
722  Use 'list' for listing of known dumpers.
723 \end_layout
725 \begin_layout Subsubsection
726 --mode=<mode>
727 \end_layout
729 \begin_layout Standard
730 Set the mode to use (required for dumpers with multiple modes, forbidden
731  otherwise).
732  Use 'list' for known modes.
733 \end_layout
735 \begin_layout Subsubsection
736 --prefix=<prefix>
737 \end_layout
739 \begin_layout Standard
740 Set dump prefix.
741  Default is 
742 \begin_inset Quotes eld
743 \end_inset
745 avidump
746 \begin_inset Quotes erd
747 \end_inset
750 \end_layout
752 \begin_layout Subsubsection
753 --option=<name>=<value>
754 \end_layout
756 \begin_layout Standard
757 Set option <name> to value <value>.
758 \end_layout
760 \begin_layout Subsubsection
761 --length=<length>
762 \end_layout
764 \begin_layout Standard
765 Set number of frames to dump.
766  Mandatory.
767 \end_layout
769 \begin_layout Subsubsection
770 --lua=<script>
771 \end_layout
773 \begin_layout Standard
774 Run specified lua script (lsnes-dumpavi does not have initialization files).
775 \end_layout
777 \begin_layout Subsubsection
778 --load-library=<library>
779 \end_layout
781 \begin_layout Standard
782 Load the specified shared object / dynamic library / dynamic link library.
783 \end_layout
785 \begin_layout Section
786 Startup file lsnes.rc
787 \end_layout
789 \begin_layout Standard
790 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
791  This file is located in:
792 \end_layout
794 \begin_layout Itemize
795 Windows: %APPDATA%
796 \backslash
797 lsnes
798 \backslash
799 lsnes.rc (if %APPDATA% exists)
800 \end_layout
802 \begin_layout Itemize
803 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
804 \end_layout
806 \begin_layout Itemize
807 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
808 \end_layout
810 \begin_layout Itemize
811 All: ./lsnes.rc (fallback default).
812 \end_layout
814 \begin_layout Standard
815 If leading directories do not exist, attempt to create them is made.
816 \end_layout
818 \begin_layout Section
819 Internal commands
820 \end_layout
822 \begin_layout Itemize
823 Commands beginning with '*' invoke the corresponding command without alias
824  expansion.
825 \end_layout
827 \begin_layout Itemize
828 If command starts with '+' (after possible '*'), the command is executed
829  as-is when button is pressed, and when button is released, it is executed
830  with '+' replaced by '-'.
831 \end_layout
833 \begin_layout Itemize
834 Commands without '+' execute only on negative edge (release).
835 \end_layout
837 \begin_layout Subsection
838 Settings:
839 \end_layout
841 \begin_layout Standard
842 Settings control various aspects of emulator behaviour.
843 \end_layout
845 \begin_layout Subsubsection
846 set-setting <setting> <value>
847 \end_layout
849 \begin_layout Standard
850 Sets setting <setting> to value <value> (may be empty).
851 \end_layout
853 \begin_layout Subsubsection
854 unset-setting <setting>
855 \end_layout
857 \begin_layout Standard
858 Try to unset setting <setting> (not all settings can be unset).
859 \end_layout
861 \begin_layout Subsubsection
862 get-setting <setting>
863 \end_layout
865 \begin_layout Standard
866 Read value of setting <setting>
867 \end_layout
869 \begin_layout Subsubsection
870 show-settings
871 \end_layout
873 \begin_layout Standard
874 Print names and values of all settings.
875 \end_layout
877 \begin_layout Subsection
878 Keybindings
879 \end_layout
881 \begin_layout Standard
882 Keybindings bind commands or aliases to keys (or pseudo-keys).
884 \end_layout
886 \begin_layout Standard
887 Notes:
888 \end_layout
890 \begin_layout Itemize
891 Do not bind edge active (+/-) commands to keys with modifiers, that won't
892  work right!
893 \end_layout
895 \begin_layout Itemize
896 Names of keys and modifiers are platform-dependent.
897 \end_layout
899 \begin_layout Itemize
900 Be careful before binding pseudo-keys (such as joystick axes, buttons or
901  hats) with modifiers.
902  That may or may not work right.
903 \end_layout
905 \begin_layout Subsubsection
906 bind-key [<mod>/<modmask>] <key> <command>
907 \end_layout
909 \begin_layout Standard
910 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
911 ed list) are set as <mod> (comma-seperated list).
912 \end_layout
914 \begin_layout Standard
915 The names of keys and modifiers are platform-dependent.
916 \end_layout
918 \begin_layout Subsubsection
919 unbind-key [<mod>/<modmask>] <key>
920 \end_layout
922 \begin_layout Standard
923 Unbind command from <key> (with specified <mod> and <modmask>).
924 \end_layout
926 \begin_layout Subsubsection
927 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
928  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
929  [plus=<val>] [tolerance=<val>]
930 \end_layout
932 \begin_layout Standard
933 Set axis parameters for axis <axis>.
934 \end_layout
936 \begin_layout Itemize
937 disabled: Disable axis
938 \end_layout
940 \begin_layout Itemize
941 axis: Normal axis
942 \end_layout
944 \begin_layout Itemize
945 axis-inverse: Inverse axis
946 \end_layout
948 \begin_layout Itemize
949 pressure0-: Pressure sensitive.
950  Released at 0, pressed at -.
951 \end_layout
953 \begin_layout Itemize
954 pressure0+: Pressure sensitive.
955  Released at 0, pressed at +.
956 \end_layout
958 \begin_layout Itemize
959 pressure-0: Pressure sensitive.
960  Released at -, pressed at 0.
961 \end_layout
963 \begin_layout Itemize
964 pressure-+: Pressure sensitive.
965  Released at -, pressed at +.
966 \end_layout
968 \begin_layout Itemize
969 pressure+0: Pressure sensitive.
970  Released at +, pressed at 0.
971 \end_layout
973 \begin_layout Itemize
974 pressure+-: Pressure sensitive.
975  Released at +, pressed at -.
976 \end_layout
978 \begin_layout Itemize
979 minus=<val>: Calibration at extreme minus position (-32768-32767)
980 \end_layout
982 \begin_layout Itemize
983 zero=<val>: Calibration at neutral position (-32768-32767)
984 \end_layout
986 \begin_layout Itemize
987 plus=<val>: Calibration at extreme plus position (-32768-32767)
988 \end_layout
990 \begin_layout Itemize
991 tolerance=<value>: Center band tolerance (0<x<1).
992  The smaller the value, the more sensitive the control is.
993 \end_layout
995 \begin_layout Subsubsection
996 show-bindings
997 \end_layout
999 \begin_layout Standard
1000 Print all key bindings in effect.
1001 \end_layout
1003 \begin_layout Subsection
1004 Aliases
1005 \end_layout
1007 \begin_layout Standard
1008 Aliases bind command to sequence of commands.
1009  After alias has been defined, it replaces the command it shadows.
1010 \end_layout
1012 \begin_layout Standard
1013 Notes:
1014 \end_layout
1016 \begin_layout Itemize
1017 You can't alias command to itself.
1018 \end_layout
1020 \begin_layout Itemize
1021 Aliases starting with +/- are edge active just like ordinary commands starting
1022  with +/-.
1023 \end_layout
1025 \begin_layout Itemize
1026 One command can be aliased to multiple commands.
1027 \end_layout
1029 \begin_layout Subsubsection
1030 alias-command <command> <expansion>
1031 \end_layout
1033 \begin_layout Standard
1034 Append <expansion> to alias <command>.
1035  If alias does not already exist, it is created.
1036 \end_layout
1038 \begin_layout Subsubsection
1039 unalias-command <command>
1040 \end_layout
1042 \begin_layout Standard
1043 Clear alias expansion for <command>.
1044 \end_layout
1046 \begin_layout Subsubsection
1047 show-aliases
1048 \end_layout
1050 \begin_layout Standard
1051 Print all aliases and their expansions in effect.
1052 \end_layout
1054 \begin_layout Subsection
1055 run-script <script>
1056 \end_layout
1058 \begin_layout Standard
1059 Run <script> as if commands were entered on the command line.
1060 \end_layout
1062 \begin_layout Subsection
1063 Video dumping
1064 \end_layout
1066 \begin_layout Standard
1067 Following commands control video dumping:
1068 \end_layout
1070 \begin_layout Subsubsection
1071 start-dump <dumper> [<mode>] <prefix/filename>
1072 \end_layout
1074 \begin_layout Standard
1075 Start dumping using dumper <dumper>.
1076  If mode is present or not and if prefix or filename is present depends
1077  on the dumper and dumper mode.
1078 \end_layout
1080 \begin_layout Standard
1081 The following dumpers are available:
1082 \end_layout
1084 \begin_layout Itemize
1085 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
1086 \end_layout
1088 \begin_deeper
1089 \begin_layout Itemize
1090 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
1091  Takes prefix.
1092 \end_layout
1094 \begin_layout Itemize
1095 Mode: cscd/pcm: CSCD video, PCM audio.
1096  Takes prefix.
1097 \end_layout
1099 \end_deeper
1100 \begin_layout Itemize
1101 INTERNAL-JMD: Internal .jmd dumper.
1102 \end_layout
1104 \begin_deeper
1105 \begin_layout Itemize
1106 Does not take mode.
1107 \end_layout
1109 \begin_layout Itemize
1110 Takes a filename.
1111 \end_layout
1113 \end_deeper
1114 \begin_layout Itemize
1115 INTERNAL-RAW: Internal RAW dumper.
1116 \end_layout
1118 \begin_deeper
1119 \begin_layout Itemize
1120 Does not take mode.
1121 \end_layout
1123 \begin_layout Itemize
1124 Takes a prefix.
1125 \end_layout
1127 \begin_layout Itemize
1128 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
1129 \end_layout
1131 \begin_layout Itemize
1132 Video is always upscaled to double resolution (512x448 / 512 x 478).
1133 \end_layout
1135 \begin_layout Itemize
1136 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
1137  for NTSC.
1138 \end_layout
1140 \end_deeper
1141 \begin_layout Itemize
1142 INTERNAL-SDMP: Internal SDMP dumper.
1143 \end_layout
1145 \begin_deeper
1146 \begin_layout Itemize
1147 Mode 'ms': Multi-segment.
1148  Takes prefix.
1149 \end_layout
1151 \begin_layout Itemize
1152 Mode 'ss': Single-segment.
1153  Takes filename.
1154 \end_layout
1156 \end_deeper
1157 \begin_layout Subsubsection
1158 end-dump <dumper>
1159 \end_layout
1161 \begin_layout Standard
1162 End dumping using <dumper>
1163 \end_layout
1165 \begin_layout Subsubsection
1166 show-dumpers [<dumper>]
1167 \end_layout
1169 \begin_layout Standard
1170 Show the list of dumpers or list of modes for <dumper>
1171 \end_layout
1173 \begin_layout Subsection
1174 Memory manipulation
1175 \end_layout
1177 \begin_layout Standard
1178 <address> may be decimal or hexadecimal (prefixed with '0x').
1179  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
1180  with '-') decimal.
1181 \end_layout
1183 \begin_layout Standard
1184 The available element <sizes> are:
1185 \end_layout
1187 \begin_layout Itemize
1188 byte: 1 byte
1189 \end_layout
1191 \begin_layout Itemize
1192 word: 2 bytes
1193 \end_layout
1195 \begin_layout Itemize
1196 dword: 4 bytes
1197 \end_layout
1199 \begin_layout Itemize
1200 qword: 8 bytes
1201 \end_layout
1203 \begin_layout Standard
1204 When reading RAM and ROM, multi-byte reads/writes are big-endian.
1205  When dealing with DSP memory, multi-byte reads/writes are native-endian
1206  (do not use operand sizes exceeding DSP bitness, except dword is OK for
1207  24-bit memory).
1208 \end_layout
1210 \begin_layout Subsubsection
1211 read-<size> <address>
1212 \end_layout
1214 \begin_layout Standard
1215 Read the value of byte in <address>.
1216 \end_layout
1218 \begin_layout Subsubsection
1219 read-s<size> <address>
1220 \end_layout
1222 \begin_layout Standard
1223 Read the value of signed byte in <address>.
1224 \end_layout
1226 \begin_layout Subsubsection
1227 write-<size> <address> <value>
1228 \end_layout
1230 \begin_layout Standard
1231 Write <value> to byte in address <address>.
1232 \end_layout
1234 \begin_layout Subsubsection
1235 search-memory reset
1236 \end_layout
1238 \begin_layout Standard
1239 Reset the memory search
1240 \end_layout
1242 \begin_layout Subsubsection
1243 search-memory count
1244 \end_layout
1246 \begin_layout Standard
1247 Print number of candidates remaining
1248 \end_layout
1250 \begin_layout Subsubsection
1251 search-memory print
1252 \end_layout
1254 \begin_layout Standard
1255 Print all candidates remaining
1256 \end_layout
1258 \begin_layout Subsubsection
1259 search-memory <usflag><sizeflag><op>
1260 \end_layout
1262 \begin_layout Standard
1263 Searches memory for addresses satisfying criteria.
1264 \end_layout
1266 \begin_layout Standard
1267 <usflag> can be:
1268 \end_layout
1270 \begin_layout Itemize
1271 u: unsigned
1272 \end_layout
1274 \begin_layout Itemize
1275 s: signed
1276 \end_layout
1278 \begin_layout Standard
1279 <sizeflag> can be:
1280 \end_layout
1282 \begin_layout Itemize
1283 b: byte
1284 \end_layout
1286 \begin_layout Itemize
1287 w: word
1288 \end_layout
1290 \begin_layout Itemize
1291 d: dword
1292 \end_layout
1294 \begin_layout Itemize
1295 q: qword
1296 \end_layout
1298 \begin_layout Standard
1299 <op> can be:
1300 \end_layout
1302 \begin_layout Itemize
1303 lt: < previous value.
1304 \end_layout
1306 \begin_layout Itemize
1307 le: <= previous value.
1308 \end_layout
1310 \begin_layout Itemize
1311 eq: = previous value.
1312 \end_layout
1314 \begin_layout Itemize
1315 ne: != previous value.
1316 \end_layout
1318 \begin_layout Itemize
1319 ge: >= previous value.
1320 \end_layout
1322 \begin_layout Itemize
1323 gt: > previous value.
1324 \end_layout
1326 \begin_layout Subsubsection
1327 search-memory <sizeflag> <value>
1328 \end_layout
1330 \begin_layout Standard
1331 Searches for addresses that currently have value <value>.
1332  <sizeflag> is as in previous command.
1333 \end_layout
1335 \begin_layout Subsection
1336 Main commands
1337 \end_layout
1339 \begin_layout Standard
1340 These commands are not available in lsnesrc, but are available after ROM
1341  has been loaded.
1342 \end_layout
1344 \begin_layout Subsubsection
1345 quit-emulator [/y]
1346 \end_layout
1348 \begin_layout Standard
1349 Quits the emulator (asking for confirmation).
1350  If /y is given, no confirmation is asked.
1351 \end_layout
1353 \begin_layout Subsubsection
1354 pause-emulator
1355 \end_layout
1357 \begin_layout Standard
1358 Toggle paused/unpaused
1359 \end_layout
1361 \begin_layout Subsubsection
1362 +advance-frame 
1363 \end_layout
1365 \begin_layout Standard
1366 Advance frame.
1367  If the button is still held after configurable timeout expires, game unpauses
1368  for the duration frame advance is held.
1369 \end_layout
1371 \begin_layout Subsubsection
1372 +advance-poll 
1373 \end_layout
1375 \begin_layout Standard
1376 Advance subframe.
1377  If the button is still held after configurable timeout expires, game unpauses
1378  for the duration frame advance is held.
1379 \end_layout
1381 \begin_layout Subsubsection
1382 advance-skiplag 
1383 \end_layout
1385 \begin_layout Standard
1386 Skip to first poll in frame after current.
1387 \end_layout
1389 \begin_layout Subsubsection
1390 reset 
1391 \end_layout
1393 \begin_layout Standard
1394 Reset the SNES after this frame.
1395 \end_layout
1397 \begin_layout Subsubsection
1398 load <filename> 
1399 \end_layout
1401 \begin_layout Standard
1402 Load savestate <filename> in current mode.
1403 \end_layout
1405 \begin_layout Subsubsection
1406 load-state <filename> 
1407 \end_layout
1409 \begin_layout Standard
1410 Load savestate <filename> in readwrite mode.
1411 \end_layout
1413 \begin_layout Subsubsection
1414 load-readonly <filename> 
1415 \end_layout
1417 \begin_layout Standard
1418 Load savestate <filename> in readonly mode.
1419 \end_layout
1421 \begin_layout Subsubsection
1422 load-preserve <filename> 
1423 \end_layout
1425 \begin_layout Standard
1426 Load savestate <filename> in readonly mode, preserving current events.
1427 \end_layout
1429 \begin_layout Subsubsection
1430 load-movie <filename> 
1431 \end_layout
1433 \begin_layout Standard
1434 Load savestate <filename>, ignoring save part in readonly mode.
1435 \end_layout
1437 \begin_layout Subsubsection
1438 save-state <filename> 
1439 \end_layout
1441 \begin_layout Standard
1442 Save system state to <filename> as soon as possible.
1443 \end_layout
1445 \begin_layout Subsubsection
1446 save-movie <filename> 
1447 \end_layout
1449 \begin_layout Standard
1450 Save movie to <filename>.
1451 \end_layout
1453 \begin_layout Subsubsection
1454 set-rwmode 
1455 \end_layout
1457 \begin_layout Standard
1458 Set read-write mode.
1459 \end_layout
1461 \begin_layout Subsubsection
1462 set-romode 
1463 \end_layout
1465 \begin_layout Standard
1466 Set read-only mode
1467 \end_layout
1469 \begin_layout Subsubsection
1470 toggle-rwmode 
1471 \end_layout
1473 \begin_layout Standard
1474 Toggle between read-only and read-write modes.
1475 \end_layout
1477 \begin_layout Subsubsection
1478 set-gamename <name> 
1479 \end_layout
1481 \begin_layout Standard
1482 Set name of the game to <name>
1483 \end_layout
1485 \begin_layout Subsubsection
1486 get-gamename 
1487 \end_layout
1489 \begin_layout Standard
1490 Print the name of the game.
1491 \end_layout
1493 \begin_layout Subsubsection
1494 add-author <author> 
1495 \end_layout
1497 \begin_layout Standard
1498 Adds new author <author>.
1499  If <author> does not contain '|' it is full name.
1500  If it contains '|', '|' splits the full name and nickname.
1501 \end_layout
1503 \begin_layout Subsubsection
1504 edit-author <num> <author> 
1505 \end_layout
1507 \begin_layout Standard
1508 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1509  format)
1510 \end_layout
1512 \begin_layout Subsubsection
1513 remove-author <num> 
1514 \end_layout
1516 \begin_layout Standard
1517 Remove author in slot <num>
1518 \end_layout
1520 \begin_layout Subsubsection
1521 print-authors 
1522 \end_layout
1524 \begin_layout Standard
1525 Print authors.
1526 \end_layout
1528 \begin_layout Subsubsection
1529 test-1, test-2, test-3
1530 \end_layout
1532 \begin_layout Standard
1533 Internal test commands.
1534  Don't use.
1535 \end_layout
1537 \begin_layout Subsubsection
1538 take-screenshot <filename> 
1539 \end_layout
1541 \begin_layout Standard
1542 Save screenshot to <filename>.
1543 \end_layout
1545 \begin_layout Subsubsection
1546 +controller<num><button>
1547 \end_layout
1549 \begin_layout Standard
1550 Press button <button> on controller <num> (1-8).
1551  The following button names are known:
1552 \end_layout
1554 \begin_layout Itemize
1555 left
1556 \end_layout
1558 \begin_layout Itemize
1559 right
1560 \end_layout
1562 \begin_layout Itemize
1564 \end_layout
1566 \begin_layout Itemize
1567 down
1568 \end_layout
1570 \begin_layout Itemize
1572 \end_layout
1574 \begin_layout Itemize
1576 \end_layout
1578 \begin_layout Itemize
1580 \end_layout
1582 \begin_layout Itemize
1584 \end_layout
1586 \begin_layout Itemize
1588 \end_layout
1590 \begin_layout Itemize
1592 \end_layout
1594 \begin_layout Itemize
1595 select
1596 \end_layout
1598 \begin_layout Itemize
1599 start
1600 \end_layout
1602 \begin_layout Itemize
1603 trigger
1604 \end_layout
1606 \begin_layout Itemize
1607 cursor
1608 \end_layout
1610 \begin_layout Itemize
1611 pause
1612 \end_layout
1614 \begin_layout Itemize
1615 turbo
1616 \end_layout
1618 \begin_layout Subsubsection
1619 controllerh<num><button>
1620 \end_layout
1622 \begin_layout Standard
1623 Hold/unhold button <button> on controller <num> (1-8).
1624  See +controller for button names.
1625 \end_layout
1627 \begin_layout Subsubsection
1628 autofire (<pattern>|-)...
1629 \end_layout
1631 \begin_layout Standard
1632 Set autofire pattern.
1633  Each parameter is comma-separated list of button names (in form of 1start,
1634  1A, 2B, etc..) to hold on that frame.
1635  After reaching the end of pattern, the pattern restarts from the beginning.
1636 \end_layout
1638 \begin_layout Subsubsection
1639 repaint
1640 \end_layout
1642 \begin_layout Standard
1643 Force a repaint.
1644 \end_layout
1646 \begin_layout Subsection
1647 Save jukebox 
1648 \end_layout
1650 \begin_layout Subsubsection
1651 cycle-jukebox-backward
1652 \end_layout
1654 \begin_layout Standard
1655 Cycle save jukebox backwards.
1656 \end_layout
1658 \begin_layout Subsubsection
1659 cycle-jukebox-forward
1660 \end_layout
1662 \begin_layout Standard
1663 Cycle save jukebox forwards
1664 \end_layout
1666 \begin_layout Subsubsection
1667 add-jukebox-save <filename>
1668 \end_layout
1670 \begin_layout Standard
1671 Add <filename> to jukebox saves.
1672 \end_layout
1674 \begin_layout Subsubsection
1675 load-jukebox
1676 \end_layout
1678 \begin_layout Standard
1679 Do load from jukebox (current mode).
1680 \end_layout
1682 \begin_layout Subsubsection
1683 save-jukebox
1684 \end_layout
1686 \begin_layout Standard
1687 Do state save to jukebox.
1688 \end_layout
1690 \begin_layout Subsection
1691 Lua 
1692 \end_layout
1694 \begin_layout Standard
1695 Only available if lua support is compiled in.
1696 \end_layout
1698 \begin_layout Subsubsection
1699 evaluate-lua <luacode>
1700 \end_layout
1702 \begin_layout Standard
1703 Run Lua code <luacode> using built-in Lua interpretter.
1704 \end_layout
1706 \begin_layout Subsubsection
1707 run-lua <script>
1708 \end_layout
1710 \begin_layout Standard
1711 Run specified lua file using built-in Lua interpretter.
1712 \end_layout
1714 \begin_layout Subsection
1715 Memory watch
1716 \end_layout
1718 \begin_layout Subsubsection
1719 add-watch <name> <expression>
1720 \end_layout
1722 \begin_layout Standard
1723 Adds new watch (or modifies old one).
1724 \end_layout
1726 \begin_layout Subsubsection
1727 remove-watch <name>
1728 \end_layout
1730 \begin_layout Standard
1731 Remove a watch.
1732 \end_layout
1734 \begin_layout Subsection
1735 Sound 
1736 \end_layout
1738 \begin_layout Subsubsection
1739 enable-sound <on/off> 
1740 \end_layout
1742 \begin_layout Standard
1743 Enable/Disable sound.
1744 \end_layout
1746 \begin_layout Subsubsection
1747 set-sound-device <device> 
1748 \end_layout
1750 \begin_layout Standard
1751 Set sound device to <device>
1752 \end_layout
1754 \begin_layout Subsubsection
1755 show-sound-status 
1756 \end_layout
1758 \begin_layout Standard
1759 Show status of sound system.
1760 \end_layout
1762 \begin_layout Subsubsection
1763 show-sound-devices
1764 \end_layout
1766 \begin_layout Standard
1767 Show all available devices.
1768 \end_layout
1770 \begin_layout Subsection
1771 SDL Platform commands 
1772 \end_layout
1774 \begin_layout Standard
1775 The following are valid on SDL platform.
1776 \end_layout
1778 \begin_layout Subsubsection
1779 identify-key
1780 \end_layout
1782 \begin_layout Standard
1783 Asks to press a key and then identifies that (pseudo-)key.
1784 \end_layout
1786 \begin_layout Subsubsection
1787 toggle-console 
1788 \end_layout
1790 \begin_layout Standard
1791 Toggle between windowed/fullscreen console.
1792 \end_layout
1794 \begin_layout Subsubsection
1795 scroll-fullup 
1796 \end_layout
1798 \begin_layout Standard
1799 Scroll messages window as far back as it goes.
1800 \end_layout
1802 \begin_layout Subsubsection
1803 scroll-fulldown 
1804 \end_layout
1806 \begin_layout Standard
1807 Scroll messages window as far forward as it goes.
1808 \end_layout
1810 \begin_layout Subsubsection
1811 scroll-up 
1812 \end_layout
1814 \begin_layout Standard
1815 Scroll messages window back one screenful.
1816 \end_layout
1818 \begin_layout Subsubsection
1819 scroll-down 
1820 \end_layout
1822 \begin_layout Standard
1823 Scroll messages window forward one screenful.
1824 \end_layout
1826 \begin_layout Section
1827 Settings
1828 \end_layout
1830 \begin_layout Subsection
1831 Core settings
1832 \end_layout
1834 \begin_layout Subsubsection
1835 firmwarepath
1836 \end_layout
1838 \begin_layout Standard
1839 Set where bsnes looks for firmware files.
1840  Default is 
1841 \begin_inset Quotes eld
1842 \end_inset
1845 \begin_inset Quotes erd
1846 \end_inset
1849 \end_layout
1851 \begin_layout Subsubsection
1852 targetfps
1853 \end_layout
1855 \begin_layout Standard
1856 Set the target fps.
1857  Numeric, range is 0.001 to 
1858 \begin_inset Quotes eld
1859 \end_inset
1861 infinite
1862 \begin_inset Quotes erd
1863 \end_inset
1866  Default is native framerate.
1867 \end_layout
1869 \begin_layout Subsubsection
1870 savecompression
1871 \end_layout
1873 \begin_layout Standard
1874 Set save compression level (integer 0-9).
1875  Default is 7 (0 is no compression).
1876 \end_layout
1878 \begin_layout Subsubsection
1879 advance-timeout
1880 \end_layout
1882 \begin_layout Standard
1883 Set the frame advance timeout in milliseconds.
1884  Numeric integer, range is 0-999999999.
1885  Default is 500.
1886 \end_layout
1888 \begin_layout Subsection
1889 AVI dumper settings
1890 \end_layout
1892 \begin_layout Subsubsection
1893 avi-large
1894 \end_layout
1896 \begin_layout Standard
1897 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1898  outputs.
1899 \end_layout
1901 \begin_layout Subsubsection
1902 avi-left-border
1903 \end_layout
1905 \begin_layout Standard
1906 AVI dumper: Set the default left border thickness (unless lua overrides)
1907  for dumps.
1908  Range 0-8191.
1909  Default is 0.
1910 \end_layout
1912 \begin_layout Subsubsection
1913 avi-right-border
1914 \end_layout
1916 \begin_layout Standard
1917 AVI dumper: Set the default right border thickness (unless lua overrides)
1918  for dumps.
1919  Range 0-8191.
1920  Default is 0.
1921 \end_layout
1923 \begin_layout Subsubsection
1924 avi-top-border
1925 \end_layout
1927 \begin_layout Standard
1928 AVI dumper: Set the default top border thickness (unless lua overrides)
1929  for dumps.
1930  Range 0-8191.
1931  Default is 0.
1932 \end_layout
1934 \begin_layout Subsubsection
1935 avi-bottom-border
1936 \end_layout
1938 \begin_layout Standard
1939 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1940  for dumps.
1941  Range 0-8191.
1942  Default is 0.
1943 \end_layout
1945 \begin_layout Subsubsection
1946 avi-maxframes
1947 \end_layout
1949 \begin_layout Standard
1950 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1951  Range 0-999999999.
1952  Default is 0.
1953 \end_layout
1955 \begin_layout Subsubsection
1956 avi-compresison
1957 \end_layout
1959 \begin_layout Standard
1960 AVI dumper: Compression level (0-18).
1961 \end_layout
1963 \begin_layout Itemize
1964 Compression levels 10 and above are not compatible with stock CSCD codec.
1965 \end_layout
1967 \begin_layout Itemize
1968 Recomended level is 7.
1969 \end_layout
1971 \begin_layout Subsubsection
1972 avi-soundrate
1973 \end_layout
1975 \begin_layout Standard
1976 AVI dumper: Set method of determining the sound rate.
1977 \end_layout
1979 \begin_layout Itemize
1980 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1981  128, 176.4 and 192 kHz.
1982 \end_layout
1984 \begin_layout Itemize
1985 1: Round down to nearest integer.
1986 \end_layout
1988 \begin_layout Itemize
1989 2: Round up to nearest ingeter.
1990 \end_layout
1992 \begin_layout Subsection
1993 JMD options
1994 \end_layout
1996 \begin_layout Subsubsection
1997 jmd-copression
1998 \end_layout
2000 \begin_layout Standard
2001 JMD dumper: Compression level (0-9).
2002 \end_layout
2004 \begin_layout Subsection
2005 SDL platform settings
2006 \end_layout
2008 \begin_layout Subsubsection
2009 autorepeat-first-delay
2010 \end_layout
2012 \begin_layout Standard
2013 Sets the delay for first character in typematic autorepeat.
2014 \end_layout
2016 \begin_layout Subsubsection
2017 autorepeat-subsequent-delay
2018 \end_layout
2020 \begin_layout Standard
2021 Sets the delay for subsequent characters in typematic autorepeat.
2022 \end_layout
2024 \begin_layout Section
2025 Lua functions
2026 \end_layout
2028 \begin_layout Subsection
2029 Core (in main table)
2030 \end_layout
2032 \begin_layout Subsubsection
2033 print
2034 \end_layout
2036 \begin_layout Standard
2037 Print line to message console.
2038 \end_layout
2040 \begin_layout Subsubsection
2041 exec(string command)
2042 \end_layout
2044 \begin_layout Standard
2045 Run command as it was entered on the command line
2046 \end_layout
2048 \begin_layout Subsection
2049 Table bit:
2050 \end_layout
2052 \begin_layout Standard
2053 Bitwise logical functions and related.
2054 \end_layout
2056 \begin_layout Subsubsection
2057 bit.none(number...) / bit.bnot(number...)
2058 \end_layout
2060 \begin_layout Standard
2061 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2062  arguments).
2063 \end_layout
2065 \begin_layout Subsubsection
2066 bit.any(number...) / bit.bor(number...)
2067 \end_layout
2069 \begin_layout Standard
2070 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2071 \end_layout
2073 \begin_layout Subsubsection
2074 bit.all(number...) / bit.band(number...)
2075 \end_layout
2077 \begin_layout Standard
2078 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2080 \end_layout
2082 \begin_layout Subsubsection
2083 bit.parity(number...) / bit.bxor(number...)
2084 \end_layout
2086 \begin_layout Standard
2087 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2088  of the arguments).
2089 \end_layout
2091 \begin_layout Subsubsection
2092 bit.lrotate(number base[, number amount[, number bits]])
2093 \end_layout
2095 \begin_layout Standard
2096 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2097 \end_layout
2099 \begin_layout Subsubsection
2100 bit.rrotate(number base[, number amount[, number bits]])
2101 \end_layout
2103 \begin_layout Standard
2104 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2105  places.
2106 \end_layout
2108 \begin_layout Subsubsection
2109 bit.lshift(number base[, number amount[, number bits]])
2110 \end_layout
2112 \begin_layout Standard
2113 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2114  The new bits are filled with zeroes.
2115 \end_layout
2117 \begin_layout Subsubsection
2118 bit.lrshift(number base[, number amount[, number bits]])
2119 \end_layout
2121 \begin_layout Standard
2122 Shift bits-bit (max 48, default 48) number logically right by amount (default
2123  1) places.
2124  The new bits are filled with zeroes.
2125 \end_layout
2127 \begin_layout Subsubsection
2128 bit.arshift(number base[, number amount[, number bits]])
2129 \end_layout
2131 \begin_layout Standard
2132 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2133  (default 1) places.
2134  The new bits are shifted in with copy of the high bit.
2135 \end_layout
2137 \begin_layout Subsection
2138 Table gui:
2139 \end_layout
2141 \begin_layout Standard
2142 Most of these functions can only be called in on_paint and on_video callbacks.
2143  Exceptions are noted.
2144 \end_layout
2146 \begin_layout Standard
2147 Colors are 32-bit.
2148  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2149  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2150  opaque, 255 is almost transparent).
2151  -1 is the fully transparent color.
2152  Alpha values greater than 127 do work.
2153 \end_layout
2155 \begin_layout Standard
2156 Origin of coordinates is at top left corner of game display area.
2157  Left and top gaps correspond to negative coordinates.
2158 \end_layout
2160 \begin_layout Subsubsection
2161 gui.resolution()
2162 \end_layout
2164 \begin_layout Standard
2165 Returns 2-tuple (hresolution, vresolution).
2166 \end_layout
2168 \begin_layout Subsubsection
2169 gui.<class>_gap(number gap)
2170 \end_layout
2172 \begin_layout Standard
2173 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2174  is 8191).
2175 \end_layout
2177 \begin_layout Subsubsection
2178 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2179 \end_layout
2181 \begin_layout Standard
2182 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2183  16 high).
2184  Parameters:
2185 \end_layout
2187 \begin_layout Itemize
2188 x: X-coordinate to start the drawing from (and x-coordinate at begining
2189  of the lines).
2190 \end_layout
2192 \begin_layout Itemize
2193 y: Y-coordinate to start the drawing from.
2194 \end_layout
2196 \begin_layout Itemize
2197 text: The text to draw.
2198 \end_layout
2200 \begin_layout Itemize
2201 fgc: Text color (default is 0xFFFFFF (white))
2202 \end_layout
2204 \begin_layout Itemize
2205 bgc: Background color (default is -1 (transparent))
2206 \end_layout
2208 \begin_layout Subsubsection
2209 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2210 \end_layout
2212 \begin_layout Standard
2213 Like gui.text, but draw using double-width.
2214 \end_layout
2216 \begin_layout Subsubsection
2217 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2218 \end_layout
2220 \begin_layout Standard
2221 Like gui.text, but draw using double-height.
2222 \end_layout
2224 \begin_layout Subsubsection
2225 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2226 \end_layout
2228 \begin_layout Standard
2229 Like gui.text, but draw using double-width/double-height.
2230 \end_layout
2232 \begin_layout Subsubsection
2233 gui.rectangle(number x, number y, number width, number height[, number thickness[
2234 , number outline[, number fill]]])
2235 \end_layout
2237 \begin_layout Standard
2238 Draw rectangle on the GUI.
2239  Parameters:
2240 \end_layout
2242 \begin_layout Itemize
2243 x: X-coordinate of left edge.
2244 \end_layout
2246 \begin_layout Itemize
2247 y: Y-coordinate of upper edge.
2248 \end_layout
2250 \begin_layout Itemize
2251 width: Width of rectangle.
2252 \end_layout
2254 \begin_layout Itemize
2255 height: Height of rectangle.
2256 \end_layout
2258 \begin_layout Itemize
2259 thickness: Thickness of outline (default is 1).
2260 \end_layout
2262 \begin_layout Itemize
2263 outline: Color of outline (default is 0xFFFFFF (white))
2264 \end_layout
2266 \begin_layout Itemize
2267 fill: Color of fil (default is -1 (transparent))
2268 \end_layout
2270 \begin_layout Subsubsection
2271 gui.pixel(number x, number y[, number color])
2272 \end_layout
2274 \begin_layout Standard
2275 Draw one pixel on the GUI.
2276  Parameters:
2277 \end_layout
2279 \begin_layout Itemize
2280 x: X-coordinate of the pixel
2281 \end_layout
2283 \begin_layout Itemize
2284 y: Y-coordinate of the pixel
2285 \end_layout
2287 \begin_layout Itemize
2288 color: Color of the pixel (default is 0xFFFFFF (white))
2289 \end_layout
2291 \begin_layout Subsubsection
2292 gui.crosshair(number x, number y[, number length[, number color]])
2293 \end_layout
2295 \begin_layout Standard
2296 Draw a crosshair.
2297  Parameters:
2298 \end_layout
2300 \begin_layout Itemize
2301 x: X-coordinate of the crosshair
2302 \end_layout
2304 \begin_layout Itemize
2305 y: Y-coordinate of the crosshair
2306 \end_layout
2308 \begin_layout Itemize
2309 length: Length of the crosshair lines (default 10).
2310 \end_layout
2312 \begin_layout Itemize
2313 color: Color of the crosshair (default is 0xFFFFFF (white))
2314 \end_layout
2316 \begin_layout Subsubsection
2317 gui.line(number x1, number y1, number x2, number y2[, number color])
2318 \end_layout
2320 \begin_layout Standard
2321 Draw a thin line.
2322  Parameters:
2323 \end_layout
2325 \begin_layout Itemize
2326 x1: X-coordinate of one end.
2327 \end_layout
2329 \begin_layout Itemize
2330 y1: Y-coordinate of one end.
2331 \end_layout
2333 \begin_layout Itemize
2334 x2: X-coordinate of the other end.
2335 \end_layout
2337 \begin_layout Itemize
2338 y2: Y-coordinate of the other end.
2339 \end_layout
2341 \begin_layout Itemize
2342 color: Color of the line (default is 0xFFFFFF (white)).
2343 \end_layout
2345 \begin_layout Subsubsection
2346 gui.circle(number x, number y, number r[, number thick[, number border[,
2347  number fil]]])
2348 \end_layout
2350 \begin_layout Standard
2351 Draw a circle.
2352  Parameters.
2353 \end_layout
2355 \begin_layout Itemize
2356 x: X-coordinate of the center
2357 \end_layout
2359 \begin_layout Itemize
2360 y: Y-coordinate of the center
2361 \end_layout
2363 \begin_layout Itemize
2364 r: The radius of the circle
2365 \end_layout
2367 \begin_layout Itemize
2368 thick: Border thickness
2369 \end_layout
2371 \begin_layout Itemize
2372 border: Border color (default is 0xFFFFFF (white))
2373 \end_layout
2375 \begin_layout Itemize
2376 fill: Fill color (default is -1 (transparent)).
2377 \end_layout
2379 \begin_layout Subsubsection
2380 gui.repaint()
2381 \end_layout
2383 \begin_layout Standard
2384 Request on_repaint() to happen as soon as possible.
2385  Can be used anywhere.
2386 \end_layout
2388 \begin_layout Subsubsection
2389 gui.subframe_update(boolean on)
2390 \end_layout
2392 \begin_layout Standard
2393 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2394  or not happen (on=false).
2395  Can be used anywhere.
2396 \end_layout
2398 \begin_layout Subsubsection
2399 gui.screenshot(string filename)
2400 \end_layout
2402 \begin_layout Standard
2403 Write PNG screenshot of the current frame (no drawings) to specified file.
2404  Can be used anywhere.
2405 \end_layout
2407 \begin_layout Subsubsection
2408 gui.color(number r, number g, number b[, number a])
2409 \end_layout
2411 \begin_layout Standard
2412 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2413  each component in scale 0-255.
2414  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2415  opaque).
2416  The default alpha is 256.
2417 \end_layout
2419 \begin_layout Subsubsection
2420 gui.status(string name, string value)
2421 \end_layout
2423 \begin_layout Standard
2424 Set status field 
2425 \begin_inset Quotes eld
2426 \end_inset
2428 L[<name>]
2429 \begin_inset Quotes erd
2430 \end_inset
2432  to <value> in status area.
2433  Can be used anywhere.
2434 \end_layout
2436 \begin_layout Subsection
2437 table input
2438 \end_layout
2440 \begin_layout Standard
2441 Input handling.
2442  Only available in on_input callback.
2443 \end_layout
2445 \begin_layout Subsubsection
2446 input.get(number controller, number index)
2447 \end_layout
2449 \begin_layout Standard
2450 Read the specified index (0-11) from specified controller (0-7).
2451  Notes:
2452 \end_layout
2454 \begin_layout Itemize
2455 Uses physical controller numbering.
2456  Gamepad in port 2 is controller 4, not 1!
2457 \end_layout
2459 \begin_layout Subsubsection
2460 input.set(number controller, number index, number value)
2461 \end_layout
2463 \begin_layout Standard
2464 Write the specified index (0-11) from specified controller (0-7), storing
2465  value.
2466  Notes:
2467 \end_layout
2469 \begin_layout Itemize
2470 Uses physical controller numbering.
2471  Gamepad in port 2 is controller 4, not 1!
2472 \end_layout
2474 \begin_layout Subsubsection
2475 input.reset([number cycles])
2476 \end_layout
2478 \begin_layout Standard
2479 Execute reset.
2480  If cycles is greater than zero, do delayed reset.
2481  0 (or no value) causes immediate reset.
2482 \end_layout
2484 \begin_layout Itemize
2485 Only available with subframe flag false.
2486 \end_layout
2488 \begin_layout Subsubsection
2489 input.raw()
2490 \end_layout
2492 \begin_layout Standard
2493 Returns table of tables of all available keys and axes.
2494  The first table is indexed by key name (platform-dependent!), and the inner
2495  table has the following fields:
2496 \end_layout
2498 \begin_layout Itemize
2499 last_rawval: Last reported raw value for control.
2500 \end_layout
2502 \begin_layout Itemize
2503 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2504  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2505 \end_layout
2507 \begin_layout Itemize
2508 cal_left: Minimum calibration value.
2509  Only meaningful with axis and pressure types.
2510 \end_layout
2512 \begin_layout Itemize
2513 cal_center: Center calibration value.
2514  Only meaningful with axis and pressure types.
2515 \end_layout
2517 \begin_layout Itemize
2518 cal_right: Maximum calibration value.
2519  Only meaningful with axis and pressure types.
2520 \end_layout
2522 \begin_layout Itemize
2523 cal_tolerance: Dead zone tolerance.
2524  Only meaningful with axis and pressure types.
2525 \end_layout
2527 \begin_layout Subsubsection
2528 input.keyhook(key, state)
2529 \end_layout
2531 \begin_layout Standard
2532 Requests that keyhook events to be sent for key (state=true) or not sent
2533  (state=false).
2534 \end_layout
2536 \begin_layout Subsection
2537 Table hostmemory
2538 \end_layout
2540 \begin_layout Standard
2541 Host memory handling (extra memory saved to savestates).
2542  Host memory starts empty.
2543 \end_layout
2545 \begin_layout Subsubsection
2546 hostmemory.read(number address)
2547 \end_layout
2549 \begin_layout Standard
2550 Reads hostmemory slot address.
2551  Slot numbers out of range return false instead of numeric.
2552 \end_layout
2554 \begin_layout Subsubsection
2555 hostmemory.write(number address, number value)
2556 \end_layout
2558 \begin_layout Standard
2559 Writes hostmemory slot with 0-255.
2560  Slot numbers out of range cause extension of host memory slot space.
2561 \end_layout
2563 \begin_layout Subsubsection
2564 hostmemory.readbyte(number address)
2565 \end_layout
2567 \begin_layout Standard
2568 Read unsigned byte (1 element) from given address.
2569  Slots out of range return false.
2570 \end_layout
2572 \begin_layout Subsubsection
2573 hostmemory.writebyte(number address, number value)
2574 \end_layout
2576 \begin_layout Standard
2577 Write unsigned byte (1 element) to given slot.
2578  Slot numbers out of range cause extension.
2579 \end_layout
2581 \begin_layout Subsubsection
2582 hostmemory.readsbyte(number address)
2583 \end_layout
2585 \begin_layout Standard
2586 Read signed byte (1 element) from given address.
2587  Slots out of range return false.
2588 \end_layout
2590 \begin_layout Subsubsection
2591 hostmemory.writesbyte(number address, number value)
2592 \end_layout
2594 \begin_layout Standard
2595 Write signed byte (1 element) to given slot.
2596  Slot numbers out of range cause extension.
2597 \end_layout
2599 \begin_layout Subsubsection
2600 hostmemory.readword(number address)
2601 \end_layout
2603 \begin_layout Standard
2604 Read unsigned word (2 elements) from given address.
2605  Slots out of range return false.
2606 \end_layout
2608 \begin_layout Subsubsection
2609 hostmemory.writeword(number address, number value)
2610 \end_layout
2612 \begin_layout Standard
2613 Write unsigned word (2 elements) to given slot.
2614  Slot numbers out of range cause extension.
2615 \end_layout
2617 \begin_layout Subsubsection
2618 hostmemory.readsword(number address)
2619 \end_layout
2621 \begin_layout Standard
2622 Read signed word (2 elements) from given address.
2623  Slots out of range return false.
2624 \end_layout
2626 \begin_layout Subsubsection
2627 hostmemory.writesword(number address, number value)
2628 \end_layout
2630 \begin_layout Standard
2631 Write signed word (2 elements) to given slot.
2632  Slot numbers out of range cause extension.
2633 \end_layout
2635 \begin_layout Subsubsection
2636 hostmemory.readdword(number address)
2637 \end_layout
2639 \begin_layout Standard
2640 Read unsigned doubleword (4 elements) from given address.
2641  Slots out of range return false.
2642 \end_layout
2644 \begin_layout Subsubsection
2645 hostmemory.writedword(number address, number value)
2646 \end_layout
2648 \begin_layout Standard
2649 Write unsigned doubleword (4 elements) to given slot.
2650  Slot numbers out of range cause extension.
2651 \end_layout
2653 \begin_layout Subsubsection
2654 hostmemory.readsdword(number address)
2655 \end_layout
2657 \begin_layout Standard
2658 Read signed doubleword (4 elements) from given address.
2659  Slots out of range return false.
2660 \end_layout
2662 \begin_layout Subsubsection
2663 hostmemory.writesdword(number address, number value)
2664 \end_layout
2666 \begin_layout Standard
2667 Write signed doubleword (4 elements) to given slot.
2668  Slot numbers out of range cause extension.
2669 \end_layout
2671 \begin_layout Subsubsection
2672 hostmemory.readqword(number address)
2673 \end_layout
2675 \begin_layout Standard
2676 Read unsigned quadword (8 elements) from given address.
2677  Slots out of range return false.
2678 \end_layout
2680 \begin_layout Subsubsection
2681 hostmemory.writeqword(number address, number value)
2682 \end_layout
2684 \begin_layout Standard
2685 Write unsigned quadword (4 elements) to given slot.
2686  Slot numbers out of range cause extension.
2687 \end_layout
2689 \begin_layout Subsubsection
2690 hostmemory.readsqword(number address)
2691 \end_layout
2693 \begin_layout Standard
2694 Read signed quadword (8 elements) from given address.
2695  Slots out of range return false.
2696 \end_layout
2698 \begin_layout Subsubsection
2699 hostmemory.writesqword(number address, number value)
2700 \end_layout
2702 \begin_layout Standard
2703 Write signed quadword (8 elements) to given slot.
2704  Slot numbers out of range cause extension.
2705 \end_layout
2707 \begin_layout Subsection
2708 Table movie
2709 \end_layout
2711 \begin_layout Standard
2712 Movie handling
2713 \end_layout
2715 \begin_layout Subsubsection
2716 movie.currentframe()
2717 \end_layout
2719 \begin_layout Standard
2720 Return number of current frame.
2721 \end_layout
2723 \begin_layout Subsubsection
2724 movie.framecount()
2725 \end_layout
2727 \begin_layout Standard
2728 Return number of frames in movie.
2729 \end_layout
2731 \begin_layout Subsubsection
2732 movie.readonly()
2733 \end_layout
2735 \begin_layout Standard
2736 Return true if in readonly mode, false if in readwrite.
2737 \end_layout
2739 \begin_layout Subsubsection
2740 movie.set_readwrite()
2741 \end_layout
2743 \begin_layout Standard
2744 Set readwrite mode (does not cause on_readwrite callback).
2745 \end_layout
2747 \begin_layout Subsubsection
2748 movie.frame_subframes(number frame)
2749 \end_layout
2751 \begin_layout Standard
2752 Count number of subframes in specified frame (frame numbers are 1-based)
2753  and return that.
2754 \end_layout
2756 \begin_layout Subsubsection
2757 movie.read_subframe(number frame, number subframe)
2758 \end_layout
2760 \begin_layout Standard
2761 Read specifed subframe in specified frame and return data as array (100
2762  elements, numbered 0-99 currently).
2763 \end_layout
2765 \begin_layout Subsection
2766 Table settings
2767 \end_layout
2769 \begin_layout Standard
2770 Routines for settings manipulation
2771 \end_layout
2773 \begin_layout Subsubsection
2774 settings.get(string name)
2775 \end_layout
2777 \begin_layout Standard
2778 Get value of setting.
2779  If setting is blank, returns false.
2780  If setting value can't be obtained, returns (nil, error message).
2781 \end_layout
2783 \begin_layout Subsubsection
2784 settings.set(string name, string value)
2785 \end_layout
2787 \begin_layout Standard
2788 Set value of setting.
2789  If setting can't be set, returns (nil, error message).
2790 \end_layout
2792 \begin_layout Subsubsection
2793 settings.is_set(string name)
2794 \end_layout
2796 \begin_layout Standard
2797 Returns if setting is set.
2798  If setting does not exist, returns (nil, error message).
2799 \end_layout
2801 \begin_layout Subsubsection
2802 settings.blank(string name)
2803 \end_layout
2805 \begin_layout Standard
2806 Blanks a setting and returns true.
2807  If setting can't be blanked, returns (nil, error message).
2808 \end_layout
2810 \begin_layout Subsection
2811 Table memory
2812 \end_layout
2814 \begin_layout Standard
2815 Contains various functions for managing memory
2816 \end_layout
2818 \begin_layout Subsubsection
2819 memory.vma_count()
2820 \end_layout
2822 \begin_layout Standard
2823 Returns the number of VMAs
2824 \end_layout
2826 \begin_layout Subsubsection
2827 memory.read_vma(number index)
2828 \end_layout
2830 \begin_layout Standard
2831 Reads the specified VMA (indices start from zero).
2832  Trying to read invalid VMA gives nil.
2833  The read VMA is table with the following fields:
2834 \end_layout
2836 \begin_layout Itemize
2837 region_name (string): The readable name of the VMA
2838 \end_layout
2840 \begin_layout Itemize
2841 baseaddr (number): Base address of the VMA
2842 \end_layout
2844 \begin_layout Itemize
2845 lastaddr (number): Last address in the VMA.
2846 \end_layout
2848 \begin_layout Itemize
2849 size (number): The size of VMA in bytes.
2850 \end_layout
2852 \begin_layout Itemize
2853 readonly (boolean): True of the VMA corresponds to ROM.
2854 \end_layout
2856 \begin_layout Itemize
2857 native_endian (boolean): True if the VMA has native endian as opposed to
2858  little endian.
2859 \end_layout
2861 \begin_layout Subsubsection
2862 memory.find_vma(number address)
2863 \end_layout
2865 \begin_layout Standard
2866 Finds the VMA containing specified address.
2867  Returns table in the same format as read_vma or nil if not found.
2868 \end_layout
2870 \begin_layout Subsubsection
2871 memory.readbyte(number address)
2872 \end_layout
2874 \begin_layout Standard
2875 Reads the specified address as unsigned byte and returns the result.
2876 \end_layout
2878 \begin_layout Subsubsection
2879 memory.readsbyte(number address)
2880 \end_layout
2882 \begin_layout Standard
2883 Reads the specified address as signed byte and returns the result.
2884 \end_layout
2886 \begin_layout Subsubsection
2887 memory.writebyte(number address, number value)
2888 \end_layout
2890 \begin_layout Standard
2891 Writes the specified value (negative values undergo 2's complement) to specified
2892  address (as a byte).
2893 \end_layout
2895 \begin_layout Subsubsection
2896 memory.readword(number address)
2897 \end_layout
2899 \begin_layout Standard
2900 Reads the specified address as unsigned word and returns the result.
2901 \end_layout
2903 \begin_layout Subsubsection
2904 memory.readsword(number address)
2905 \end_layout
2907 \begin_layout Standard
2908 Reads the specified address as signed word and returns the result.
2909 \end_layout
2911 \begin_layout Subsubsection
2912 memory.writeword(number address, number value)
2913 \end_layout
2915 \begin_layout Standard
2916 Writes the specified value (negative values undergo 2's complement) to specified
2917  address (as a word).
2918 \end_layout
2920 \begin_layout Subsubsection
2921 memory.readdword(number address)
2922 \end_layout
2924 \begin_layout Standard
2925 Reads the specified address as unsigned doubleword and returns the result.
2926 \end_layout
2928 \begin_layout Subsubsection
2929 memory.readsdword(number address)
2930 \end_layout
2932 \begin_layout Standard
2933 Reads the specified address as signed doubleword and returns the result.
2934 \end_layout
2936 \begin_layout Subsubsection
2937 memory.writedword(number address, number value)
2938 \end_layout
2940 \begin_layout Standard
2941 Writes the specified value (negative values undergo 2's complement) to specified
2942  address (as a doubleword).
2943 \end_layout
2945 \begin_layout Subsubsection
2946 memory.readqword(number address)
2947 \end_layout
2949 \begin_layout Standard
2950 Reads the specified address as unsigned quadword and returns the result.
2951 \end_layout
2953 \begin_layout Subsubsection
2954 memory.readsqword(number address)
2955 \end_layout
2957 \begin_layout Standard
2958 Reads the specified address as signed quadword and returns the result.
2959 \end_layout
2961 \begin_layout Subsubsection
2962 memory.writeqword(number address, number value)
2963 \end_layout
2965 \begin_layout Standard
2966 Writes the specified value (negative values undergo 2's complement) to specified
2967  address (as a quadword).
2968 \end_layout
2970 \begin_layout Subsection
2971 Table _SYSTEM
2972 \end_layout
2974 \begin_layout Standard
2975 Contains copy of global variables from time of Lua initialization.
2976  Non-writeable.
2977 \end_layout
2979 \begin_layout Subsection
2980 Callbacks
2981 \end_layout
2983 \begin_layout Standard
2984 Various callbacks to Lua that can occur.
2985 \end_layout
2987 \begin_layout Subsubsection
2988 Callback: on_paint()
2989 \end_layout
2991 \begin_layout Standard
2992 Called when screen is being painted.
2993  Any gui.* calls requiring graphic context draw on the screen.
2994 \end_layout
2996 \begin_layout Subsubsection
2997 Callback: on_video()
2998 \end_layout
3000 \begin_layout Standard
3001 Called when video dump frame is being painted.
3002  Any gui.* calls requiring graphic context draw on the video.
3003 \end_layout
3005 \begin_layout Subsubsection
3006 Callback: on_frame()
3007 \end_layout
3009 \begin_layout Standard
3010 Called on each starting whole frame.
3011 \end_layout
3013 \begin_layout Subsubsection
3014 Callback: on_startup()
3015 \end_layout
3017 \begin_layout Standard
3018 Called when the emulator is starting (lsnes.rc and --run files has been run).
3019 \end_layout
3021 \begin_layout Subsubsection
3022 Callback: on_pre_load(string name)
3023 \end_layout
3025 \begin_layout Standard
3026 Called just before savestate/movie load occurs (note: loads are always delayed,
3027  so this occurs even when load was initiated by lua).
3028 \end_layout
3030 \begin_layout Subsubsection
3031 Callback: on_err_load(string name)
3032 \end_layout
3034 \begin_layout Standard
3035 Called if loadstate goes wrong.
3036 \end_layout
3038 \begin_layout Subsubsection
3039 Callback: on_post_load(string name, boolean was_savestate)
3040 \end_layout
3042 \begin_layout Standard
3043 Called on successful loadstate.
3044  was_savestate gives if this was a savestate or a movie.
3045 \end_layout
3047 \begin_layout Subsubsection
3048 Callback: on_pre_save(string name, boolean is_savestate)
3049 \end_layout
3051 \begin_layout Standard
3052 Called just before savestate save occurs (note: movie saves are synchronous
3053  and won't trigger these callbacks if called from Lua).
3054 \end_layout
3056 \begin_layout Subsubsection
3057 Callback: on_err_save(string name)
3058 \end_layout
3060 \begin_layout Standard
3061 Called if savestate goes wrong.
3062 \end_layout
3064 \begin_layout Subsubsection
3065 Callback: on_post_save(string name, boolean is_savestate)
3066 \end_layout
3068 \begin_layout Standard
3069 Called on successful savaestate.
3070  is_savestate gives if this was a savestate or a movie.
3071 \end_layout
3073 \begin_layout Subsubsection
3074 Callback: on_quit()
3075 \end_layout
3077 \begin_layout Standard
3078 Called when emulator is shutting down.
3079 \end_layout
3081 \begin_layout Subsubsection
3082 Callback: on_input(boolean subframe)
3083 \end_layout
3085 \begin_layout Standard
3086 Called when emulator is just sending input to bsnes core.
3087  Warning: This is called even in readonly mode, but the results are ignored.
3088 \end_layout
3090 \begin_layout Subsubsection
3091 Callback: on_reset()
3092 \end_layout
3094 \begin_layout Standard
3095 Called when SNES is reset.
3096 \end_layout
3098 \begin_layout Subsubsection
3099 Callback: on_readwrite()
3100 \end_layout
3102 \begin_layout Standard
3103 Called when moving into readwrite mode as result of 
3104 \begin_inset Quotes eld
3105 \end_inset
3107 set-rwmode
3108 \begin_inset Quotes erd
3109 \end_inset
3111  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3112  entry protection).
3113 \end_layout
3115 \begin_layout Subsubsection
3116 Callback: on_snoop(number port, number controller, number index, number
3117  value)
3118 \end_layout
3120 \begin_layout Standard
3121 Called each time bsnes asks for input.
3122  The value is the final value to be sent to bsnes core (readonly mode, autohold
3123  and autofire have been taken into account).
3124  Might be useful when translating movies to format suitable for console
3125  verification.
3126  Note: There is no way to modify the value to be sent.
3127 \end_layout
3129 \begin_layout Subsubsection
3130 Callback: on_keyhook(string keyname, table state)
3131 \end_layout
3133 \begin_layout Standard
3134 Sent when key that has keyhook events requested changes state.
3135  Keyname is name of the key (group) and state is the state (same kind as
3136  table values in input.raw).
3137 \end_layout
3139 \begin_layout Section
3140 Memory watch expression syntax
3141 \end_layout
3143 \begin_layout Standard
3144 Memory watch expressions are in RPN (Reverse Polish Notation).
3145  At the end of expression, the top entry on stack is taken as the final
3146  result.
3147 \end_layout
3149 \begin_layout Standard
3150 Notations:
3151 \end_layout
3153 \begin_layout Itemize
3154 Evaluation order is strictly left to right.
3155 \end_layout
3157 \begin_layout Itemize
3158 a is the entry on top of stack
3159 \end_layout
3161 \begin_layout Itemize
3162 b is the entry immediately below top of stack
3163 \end_layout
3165 \begin_layout Itemize
3166 ; separates values to be pushed (no intermediate pop).
3167 \end_layout
3169 \begin_layout Itemize
3170 After end of element, all used stack slots are popped and all results are
3171  pushed.
3172 \end_layout
3174 \begin_layout Itemize
3175 When pushing multiple values, the pushes occur in order shown.
3176 \end_layout
3178 \begin_layout Standard
3179 The following operators are available:
3180 \end_layout
3182 \begin_layout Itemize
3183 + : a + b
3184 \end_layout
3186 \begin_layout Itemize
3187 - : a - b
3188 \end_layout
3190 \begin_layout Itemize
3191 * : a * b
3192 \end_layout
3194 \begin_layout Itemize
3195 / : a / b
3196 \end_layout
3198 \begin_layout Itemize
3199 % : a % b
3200 \end_layout
3202 \begin_layout Itemize
3203 a : atan(a)
3204 \end_layout
3206 \begin_layout Itemize
3207 b : read_signed_byte(a)
3208 \end_layout
3210 \begin_layout Itemize
3211 c : cos(a)
3212 \end_layout
3214 \begin_layout Itemize
3215 d : read_signed_dword(a)
3216 \end_layout
3218 \begin_layout Itemize
3219 i : quotent(a / b)
3220 \end_layout
3222 \begin_layout Itemize
3223 p :
3224 \begin_inset Formula $\pi$
3225 \end_inset
3228 \end_layout
3230 \begin_layout Itemize
3231 q : read_signed_qword(a)
3232 \end_layout
3234 \begin_layout Itemize
3235 r : sqrt(a)
3236 \end_layout
3238 \begin_layout Itemize
3239 s : sin(a)
3240 \end_layout
3242 \begin_layout Itemize
3243 t : tan(a)
3244 \end_layout
3246 \begin_layout Itemize
3247 u : a; a
3248 \end_layout
3250 \begin_layout Itemize
3251 w : read_signed_word(a)
3252 \end_layout
3254 \begin_layout Itemize
3255 A : atan2(a, b)
3256 \end_layout
3258 \begin_layout Itemize
3259 B : read_unsigned_byte(a)
3260 \end_layout
3262 \begin_layout Itemize
3263 C<number>z : Push number <number> to stack.
3264 \end_layout
3266 \begin_layout Itemize
3267 D : read_unsigned_dword(a)
3268 \end_layout
3270 \begin_layout Itemize
3271 C0x<number>z : Push number <number> (hexadecimal) to stack.
3272 \end_layout
3274 \begin_layout Itemize
3275 Q : read_unsigned_qword(a)
3276 \end_layout
3278 \begin_layout Itemize
3279 R<digit> : round a to <digit> digits.
3280 \end_layout
3282 \begin_layout Itemize
3283 W : read_unsigned_word(a)
3284 \end_layout
3286 \begin_layout Subsection
3287 Example:
3288 \end_layout
3290 \begin_layout Standard
3291 C0x007e0878zWC0x007e002czW-
3292 \end_layout
3294 \begin_layout Enumerate
3295 Push value 0x7e0878 on top of stack (C0x007e0878z).
3296 \end_layout
3298 \begin_layout Enumerate
3299 Pop the value on top of stack (0x7e0878), read word value at that address
3300  and push the result,call it x1 (W).
3301 \end_layout
3303 \begin_layout Enumerate
3304 Push value 0x7e002c on top of stack (C0x007e002cz).
3305 \end_layout
3307 \begin_layout Enumerate
3308 Pop the value on top of stack (0x7e002c), read word value at that address
3309  and push the result,call it x2 (W).
3310 \end_layout
3312 \begin_layout Enumerate
3313 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3314  x2 - x1 (-).
3315 \end_layout
3317 \begin_layout Enumerate
3318 Since the expression ends, the final memory watch result is the top one
3319  on stack, which is x2 - x1.
3320 \end_layout
3322 \begin_layout Section
3323 Modifier and key names:
3324 \end_layout
3326 \begin_layout Subsection
3327 SDL Platform
3328 \end_layout
3330 \begin_layout Subsubsection
3331 Modifier names
3332 \end_layout
3334 \begin_layout Standard
3335 Following modifier names are known:
3336 \end_layout
3338 \begin_layout Itemize
3339 ctrl, lctrl, rctrl: Control keys
3340 \end_layout
3342 \begin_layout Itemize
3343 alt, lalt, ralt: ALT keys.
3344 \end_layout
3346 \begin_layout Itemize
3347 shift, lshift, rshift: Shift keys.
3348 \end_layout
3350 \begin_layout Itemize
3351 meta, lmeta, rmeta: Meta keys.
3352 \end_layout
3354 \begin_layout Itemize
3355 num, caps: Numlock/Capslock (these are sticky!)
3356 \end_layout
3358 \begin_layout Itemize
3359 mode: Mode select.
3360 \end_layout
3362 \begin_layout Subsubsection
3363 Key names
3364 \end_layout
3366 \begin_layout Standard
3367 Following key names are known:
3368 \end_layout
3370 \begin_layout Itemize
3371 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3372  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3373  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3374  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3375  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3376  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3377  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3378  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3379  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3380  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3381  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3382  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3383  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3384  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3385  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3386  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3387  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3388  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3389  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3390  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3391  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3392  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3393  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3394  break, menu, power, euro, undo
3395 \end_layout
3397 \begin_layout Itemize
3398 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3399  hardware-dependent scan code of <n> (useful to bind those keys that don't
3400  have symbolic names).
3401 \end_layout
3403 \begin_layout Subsubsection
3404 Joystick pseudo-keys:
3405 \end_layout
3407 \begin_layout Itemize
3408 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3409 \end_layout
3411 \begin_layout Itemize
3412 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3413 \end_layout
3415 \begin_layout Itemize
3416 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3417 \end_layout
3419 \begin_layout Itemize
3420 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3421 \end_layout
3423 \begin_layout Itemize
3424 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3425 \end_layout
3427 \begin_layout Itemize
3428 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3429  position (axis modes axis and axis_inverse).
3430 \end_layout
3432 \begin_layout Itemize
3433 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3434  position (axis modes axis and axis_inverse).
3435 \end_layout
3437 \begin_layout Itemize
3438 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3439  modes pressure_*).
3440 \end_layout
3442 \begin_layout Subsubsection
3443 Special buttons:
3444 \end_layout
3446 \begin_layout Itemize
3447 Escape: Enter/Exit Command mode, cancel modal dialogs.
3448 \end_layout
3450 \begin_layout Itemize
3451 Return (also KPEnter): Execute command, ok modal dialog.
3452 \end_layout
3454 \begin_layout Itemize
3455 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
3456  history
3457 \end_layout
3459 \begin_layout Itemize
3460 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
3461  history
3462 \end_layout
3464 \begin_layout Itemize
3465 Home (also KP7 if no num lock; command mode): Beginning of command.
3466 \end_layout
3468 \begin_layout Itemize
3469 End (also KP1 if no num lock; command mode): End of command.
3470 \end_layout
3472 \begin_layout Itemize
3473 Left (also KP4 if no num lock; command mode): Move cursor left.
3474 \end_layout
3476 \begin_layout Itemize
3477 Right (also KP6 if no num lock; command mode): Move cursor right.
3478 \end_layout
3480 \begin_layout Itemize
3481 Delete (also KP.
3482  if no num lock; command mode): Delete character to right of cursor.
3483 \end_layout
3485 \begin_layout Itemize
3486 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3487  overwrite modes.
3488 \end_layout
3490 \begin_layout Itemize
3491 Backspace (command mode): Delete character to left of cursor.
3492 \end_layout
3494 \begin_layout Itemize
3495 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3496 \end_layout
3498 \begin_layout Subsection
3499 wxWidgets platform
3500 \end_layout
3502 \begin_layout Subsubsection
3503 Modifier names:
3504 \end_layout
3506 \begin_layout Standard
3507 Following modifier names are known:
3508 \end_layout
3510 \begin_layout Itemize
3512 \end_layout
3514 \begin_layout Itemize
3515 ctrl
3516 \end_layout
3518 \begin_layout Itemize
3519 shift 
3520 \end_layout
3522 \begin_layout Itemize
3523 meta
3524 \end_layout
3526 \begin_layout Itemize
3527 cmd (Mac OS X only)
3528 \end_layout
3530 \begin_layout Subsubsection
3531 Key names:
3532 \end_layout
3534 \begin_layout Standard
3535 Following key names are known:
3536 \end_layout
3538 \begin_layout Itemize
3539 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3540  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3541  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3542  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3543  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3544  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3545  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3546  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3547  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3548  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3549  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3550  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3551  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3552  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3553  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3554  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3555  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3556  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3557  windows_right, windows_menu, command, special1, special2, special3, special4,
3558  special5, special6, special7, special8, special9, special10, special11,
3559  special12, special13, special14, special15, special16, special17, special18,
3560  special19, special20
3561 \end_layout
3563 \begin_layout Section
3564 Movie file format
3565 \end_layout
3567 \begin_layout Standard
3568 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3569  (note: If you recompress it, do not use compression methods other than
3570  store and deflate and especially do not use encryption of any kind).
3571 \end_layout
3573 \begin_layout Subsection
3574 Detecting clean start/SRAM/Savestate
3575 \end_layout
3577 \begin_layout Itemize
3578 If file has member 
3579 \begin_inset Quotes eld
3580 \end_inset
3582 savestate
3583 \begin_inset Quotes erd
3584 \end_inset
3586  it is savestate, otherwise:
3587 \end_layout
3589 \begin_layout Itemize
3590 If file has members with names starting 
3591 \begin_inset Quotes eld
3592 \end_inset
3594 moviesram.
3595 \begin_inset Quotes erd
3596 \end_inset
3598  it is movie starting from SRAM, otherwise:
3599 \end_layout
3601 \begin_layout Itemize
3602 It is movie starting from clear state.
3603 \end_layout
3605 \begin_layout Subsection
3606 Member: gametype
3607 \end_layout
3609 \begin_layout Standard
3610 Type of game ROM and region (as one line).
3611  Valid values are:
3612 \end_layout
3614 \begin_layout Standard
3615 \begin_inset Tabular
3616 <lyxtabular version="3" rows="8" columns="3">
3617 <features tabularvalignment="middle">
3618 <column alignment="center" valignment="top" width="0">
3619 <column alignment="center" valignment="top" width="0">
3620 <column alignment="center" valignment="top" width="0">
3621 <row>
3622 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3623 \begin_inset Text
3625 \begin_layout Plain Layout
3626 Value
3627 \end_layout
3629 \end_inset
3630 </cell>
3631 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3632 \begin_inset Text
3634 \begin_layout Plain Layout
3635 System
3636 \end_layout
3638 \end_inset
3639 </cell>
3640 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3641 \begin_inset Text
3643 \begin_layout Plain Layout
3644 Region
3645 \end_layout
3647 \end_inset
3648 </cell>
3649 </row>
3650 <row>
3651 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3652 \begin_inset Text
3654 \begin_layout Plain Layout
3655 snes_pal
3656 \end_layout
3658 \end_inset
3659 </cell>
3660 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3661 \begin_inset Text
3663 \begin_layout Plain Layout
3664 Super NES
3665 \end_layout
3667 \end_inset
3668 </cell>
3669 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3670 \begin_inset Text
3672 \begin_layout Plain Layout
3674 \end_layout
3676 \end_inset
3677 </cell>
3678 </row>
3679 <row>
3680 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3681 \begin_inset Text
3683 \begin_layout Plain Layout
3684 sgb_pal
3685 \end_layout
3687 \end_inset
3688 </cell>
3689 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3690 \begin_inset Text
3692 \begin_layout Plain Layout
3693 Super Game Boy
3694 \end_layout
3696 \end_inset
3697 </cell>
3698 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3699 \begin_inset Text
3701 \begin_layout Plain Layout
3703 \end_layout
3705 \end_inset
3706 </cell>
3707 </row>
3708 <row>
3709 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3710 \begin_inset Text
3712 \begin_layout Plain Layout
3713 snes_ntsc
3714 \end_layout
3716 \end_inset
3717 </cell>
3718 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3719 \begin_inset Text
3721 \begin_layout Plain Layout
3722 Super NES
3723 \end_layout
3725 \end_inset
3726 </cell>
3727 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3728 \begin_inset Text
3730 \begin_layout Plain Layout
3731 NTSC
3732 \end_layout
3734 \end_inset
3735 </cell>
3736 </row>
3737 <row>
3738 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3739 \begin_inset Text
3741 \begin_layout Plain Layout
3742 sgb_ntsc
3743 \end_layout
3745 \end_inset
3746 </cell>
3747 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3748 \begin_inset Text
3750 \begin_layout Plain Layout
3751 Super Game Boy
3752 \end_layout
3754 \end_inset
3755 </cell>
3756 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3757 \begin_inset Text
3759 \begin_layout Plain Layout
3760 NTSC
3761 \end_layout
3763 \end_inset
3764 </cell>
3765 </row>
3766 <row>
3767 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3768 \begin_inset Text
3770 \begin_layout Plain Layout
3772 \end_layout
3774 \end_inset
3775 </cell>
3776 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3777 \begin_inset Text
3779 \begin_layout Plain Layout
3780 BS-X (non-slotted)
3781 \end_layout
3783 \end_inset
3784 </cell>
3785 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3786 \begin_inset Text
3788 \begin_layout Plain Layout
3789 NTSC
3790 \end_layout
3792 \end_inset
3793 </cell>
3794 </row>
3795 <row>
3796 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3797 \begin_inset Text
3799 \begin_layout Plain Layout
3800 bsxslotted
3801 \end_layout
3803 \end_inset
3804 </cell>
3805 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3806 \begin_inset Text
3808 \begin_layout Plain Layout
3809 BS-X (slotted)
3810 \end_layout
3812 \end_inset
3813 </cell>
3814 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3815 \begin_inset Text
3817 \begin_layout Plain Layout
3818 NTSC
3819 \end_layout
3821 \end_inset
3822 </cell>
3823 </row>
3824 <row>
3825 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3826 \begin_inset Text
3828 \begin_layout Plain Layout
3829 sufamiturbo
3830 \end_layout
3832 \end_inset
3833 </cell>
3834 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3835 \begin_inset Text
3837 \begin_layout Plain Layout
3838 Sufami Turbo
3839 \end_layout
3841 \end_inset
3842 </cell>
3843 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3844 \begin_inset Text
3846 \begin_layout Plain Layout
3847 NTSC
3848 \end_layout
3850 \end_inset
3851 </cell>
3852 </row>
3853 </lyxtabular>
3855 \end_inset
3858 \end_layout
3860 \begin_layout Standard
3861 Frame rates are:
3862 \end_layout
3864 \begin_layout Standard
3865 \begin_inset Tabular
3866 <lyxtabular version="3" rows="3" columns="2">
3867 <features tabularvalignment="middle">
3868 <column alignment="center" valignment="top" width="0">
3869 <column alignment="center" valignment="top" width="0">
3870 <row>
3871 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3872 \begin_inset Text
3874 \begin_layout Plain Layout
3875 Region
3876 \end_layout
3878 \end_inset
3879 </cell>
3880 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3881 \begin_inset Text
3883 \begin_layout Plain Layout
3884 Framerate (fps)
3885 \end_layout
3887 \end_inset
3888 </cell>
3889 </row>
3890 <row>
3891 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3892 \begin_inset Text
3894 \begin_layout Plain Layout
3896 \end_layout
3898 \end_inset
3899 </cell>
3900 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3901 \begin_inset Text
3903 \begin_layout Plain Layout
3904 322445/6448
3905 \end_layout
3907 \end_inset
3908 </cell>
3909 </row>
3910 <row>
3911 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3912 \begin_inset Text
3914 \begin_layout Plain Layout
3915 NTSC
3916 \end_layout
3918 \end_inset
3919 </cell>
3920 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3921 \begin_inset Text
3923 \begin_layout Plain Layout
3924 10738636/178683
3925 \end_layout
3927 \end_inset
3928 </cell>
3929 </row>
3930 </lyxtabular>
3932 \end_inset
3935 \end_layout
3937 \begin_layout Subsection
3938 Member: port1
3939 \end_layout
3941 \begin_layout Standard
3942 Contains type of port #1 (as one line).
3943  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3944  If not present, defaults to 'gamepad'.
3945 \end_layout
3947 \begin_layout Subsection
3948 Member: port2
3949 \end_layout
3951 \begin_layout Standard
3952 Contains type of port #2 (as one line).
3953  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3954  'justifier' and 'justifiers'.
3955  If not present, defaults to 'none'.
3956 \end_layout
3958 \begin_layout Subsection
3959 Member: gamename
3960 \end_layout
3962 \begin_layout Standard
3963 Contains name of the game (as one line).
3964 \end_layout
3966 \begin_layout Subsection
3967 Member: authors
3968 \end_layout
3970 \begin_layout Standard
3971 Contains authors, one per line.
3972  Part before '|' is the full name, part after is the nickname.
3973 \end_layout
3975 \begin_layout Subsection
3976 Member: systemid
3977 \end_layout
3979 \begin_layout Standard
3980 Always 
3981 \begin_inset Quotes eld
3982 \end_inset
3984 lsnes-rr1
3985 \begin_inset Quotes erd
3986 \end_inset
3988  (one line).
3989  Used to reject other saves.
3990 \end_layout
3992 \begin_layout Subsection
3993 Member: controlsversion
3994 \end_layout
3996 \begin_layout Standard
3997 Always 
3998 \begin_inset Quotes eld
3999 \end_inset
4002 \begin_inset Quotes erd
4003 \end_inset
4005  (one line).
4006  Used to identify what controls are there.
4007 \end_layout
4009 \begin_layout Subsection
4010 Member: 
4011 \begin_inset Quotes eld
4012 \end_inset
4014 coreversion
4015 \begin_inset Quotes erd
4016 \end_inset
4019 \end_layout
4021 \begin_layout Standard
4022 Contains bsnes core version number (as one line).
4023 \end_layout
4025 \begin_layout Subsection
4026 Member: projectid
4027 \end_layout
4029 \begin_layout Standard
4030 Contains project ID (as one line).
4031  Used to identify if two movies are part of the same project.
4032 \end_layout
4034 \begin_layout Subsection
4035 Member: {rom,slota,slotb}{,xml}.sha256
4036 \end_layout
4038 \begin_layout Standard
4039 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4040  Absent if corresponding file is absent.
4041 \end_layout
4043 \begin_layout Subsection
4044 Member: moviesram.<name>
4045 \end_layout
4047 \begin_layout Standard
4048 Raw binary startup SRAM of kind <name>.
4049  Only present in savestates and movies starting from SRAM.
4050 \end_layout
4052 \begin_layout Subsection
4053 Member: saveframe
4054 \end_layout
4056 \begin_layout Standard
4057 Contains frame number (as one line) of frame movie was saved on.
4058  Only present in savestates.
4059 \end_layout
4061 \begin_layout Subsection
4062 Member: lagcounter
4063 \end_layout
4065 \begin_layout Standard
4066 Current value of lag counter (as one line).
4067  Only present in savestates.
4068 \end_layout
4070 \begin_layout Subsection
4071 Member: pollcounters
4072 \end_layout
4074 \begin_layout Standard
4075 Contains poll counters (currently 100 of them), one per line.
4076  Each line is raw poll count if DRDY is set for it.
4077  Otherwise it is negative poll count minus one.
4078  Only present in savestates.
4079 \end_layout
4081 \begin_layout Subsection
4082 Member: hostmemory
4083 \end_layout
4085 \begin_layout Standard
4086 Raw binary dump of host memory.
4087  Only present in savestates.
4088 \end_layout
4090 \begin_layout Subsection
4091 Member: savestate
4092 \end_layout
4094 \begin_layout Standard
4095 The raw binary savestate itself.
4096  Savestate detection uses this file, only present in savestates.
4097 \end_layout
4099 \begin_layout Subsection
4100 Member: screenshot
4101 \end_layout
4103 \begin_layout Standard
4104 Screenshot of current frame.
4105  Only present in savestates.
4106  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4107  data.
4108  Height of image is inferred from the width and size of data.
4109 \end_layout
4111 \begin_layout Subsection
4112 Member: sram.<name>
4113 \end_layout
4115 \begin_layout Standard
4116 Raw binary SRAM of kind <name> at time of savestate.
4117  Only present in savestates.
4118 \end_layout
4120 \begin_layout Subsection
4121 Member: input
4122 \end_layout
4124 \begin_layout Standard
4125 The actual input track, one line per subframe (blank lines are skipped).
4126 \end_layout
4128 \begin_layout Itemize
4129 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4130  part of same frame as previous, otherwise it starts a new frame.
4131 \end_layout
4133 \begin_layout Itemize
4134 First subframe must start a new frame.
4135 \end_layout
4137 \begin_layout Standard
4138 Length of movie in frames is number of lines in input file that start a
4139  new frame.
4140 \end_layout
4142 \begin_layout Subsection
4143 Member: rerecords
4144 \end_layout
4146 \begin_layout Standard
4147 Contains textual base-10 rerecord count (as one line; emulator just writes
4148  this, it doesn't read it) + 1.
4149 \end_layout
4151 \begin_layout Subsection
4152 Member: rrdata
4153 \end_layout
4155 \begin_layout Standard
4156 This member stores set of load IDs.
4157  There is one load ID per rerecord (plus one corresponding to start of project).
4158 \end_layout
4160 \begin_layout Itemize
4161 This member constists of concatenation of records
4162 \end_layout
4164 \begin_layout Itemize
4165 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4166  IDs.
4167 \end_layout
4169 \begin_layout Itemize
4170 IDs are interpretted as 256-bit big-endian integers with warparound.
4171 \end_layout
4173 \begin_layout Itemize
4174 Initial predicted ID is all zeroes.
4175 \end_layout
4177 \begin_layout Standard
4178 Format of each record is:
4179 \end_layout
4181 \begin_layout Itemize
4182 1 byte: Opcode byte.
4183  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4184  Bit 7 is unused.
4185 \end_layout
4187 \begin_layout Itemize
4188 32-prefixlen bytes of ID.
4189 \end_layout
4191 \begin_layout Itemize
4192 countlen bytes of big-endian count (count).
4193 \end_layout
4195 \begin_layout Standard
4196 Records are processed as follows:
4197 \end_layout
4199 \begin_layout Itemize
4200 To form the first ID encoded by record, take the first prefixlen bytes predicted
4201  ID and append the read ID value to it.
4202  The result is the first ID encoded.
4203 \end_layout
4205 \begin_layout Itemize
4206 If countlen is 0, record encodes 1 ID.
4207 \end_layout
4209 \begin_layout Itemize
4210 If countlen is 1, record encodes 2+count IDs.
4211 \end_layout
4213 \begin_layout Itemize
4214 If countlen is 2, record encodes 258+count IDs.
4215 \end_layout
4217 \begin_layout Itemize
4218 If countlen is 3, record encodes 65794+count IDs.
4219 \end_layout
4221 \begin_layout Itemize
4222 The new predicted ID is the next ID after last one encoded by the record.
4223 \end_layout
4225 \begin_layout Standard
4226 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4227  by all records.
4228 \end_layout
4230 \begin_layout Subsection
4231 Member: starttime.second
4232 \end_layout
4234 \begin_layout Standard
4235 Movie starting time, second part.
4236  Epoch is Unix epoch.
4237  Default is 1,000,000,000.
4238 \end_layout
4240 \begin_layout Subsection
4241 Member: starttime.subsecond
4242 \end_layout
4244 \begin_layout Standard
4245 Movie starting time, subsecond part.
4246  Unit is CPU clocks.
4247  Default is 0.
4248 \end_layout
4250 \begin_layout Subsection
4251 Member: savetime.second
4252 \end_layout
4254 \begin_layout Standard
4255 Movie saving time, second part.
4256  Default is starttime.second.
4257  Only present in savestates.
4258 \end_layout
4260 \begin_layout Subsection
4261 Member: savetime.subsecond
4262 \end_layout
4264 \begin_layout Standard
4265 Movie saving time, subsecond part.
4266  Default is starttime.subsecond.
4267  Only present in savestates.
4268 \end_layout
4270 \begin_layout Section
4271 Quick'n'dirty encode guide
4272 \end_layout
4274 \begin_layout Enumerate
4275 Start the emulator and load the movie file.
4276 \end_layout
4278 \begin_layout Enumerate
4279 Set large AVI option 'set-setting avi-large on'
4280 \end_layout
4282 \begin_layout Enumerate
4283 Enable dumping 'dump-avi tmpdump' 
4284 \end_layout
4286 \begin_layout Enumerate
4287 Unpause and let it run until you want to end dumping.
4288 \end_layout
4290 \begin_layout Enumerate
4291 Close the emulator (closing the window is the easiest way).
4292  Or use 'end-avi'.
4293 \end_layout
4295 \begin_layout Enumerate
4296 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4297  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4298 \end_layout
4300 \begin_layout Enumerate
4301 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4302 \end_layout
4304 \begin_layout Enumerate
4305 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4306  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4307 \end_layout
4309 \begin_layout Enumerate
4310 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4311  Now final.mkv contains quick'n'dirty encode.
4312 \end_layout
4314 \begin_layout Section
4315 Axis configurations for some gamepad types:
4316 \end_layout
4318 \begin_layout Subsection
4319 XBox360 controller:
4320 \end_layout
4322 \begin_layout Standard
4323 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4324 \end_layout
4326 \begin_layout LyX-Code
4327 set-axis joystick0axis2 pressure-+
4328 \end_layout
4330 \begin_layout LyX-Code
4331 set-axis joystick0axis5 pressure-+
4332 \end_layout
4334 \begin_layout Itemize
4335 This is needed for SDL only.
4336  EVDEV sets those types correctly.
4337 \end_layout
4339 \begin_layout Subsection
4340 PS3 
4341 \begin_inset Quotes eld
4342 \end_inset
4344 sixaxis
4345 \begin_inset Quotes erd
4346 \end_inset
4348  controller:
4349 \end_layout
4351 \begin_layout Standard
4352 Axes 8-19 should be disabled.
4353 \end_layout
4355 \begin_layout LyX-Code
4356 set-axis joystick0axis8 disabled
4357 \end_layout
4359 \begin_layout LyX-Code
4360 set-axis joystick0axis9 disabled
4361 \end_layout
4363 \begin_layout LyX-Code
4364 set-axis joystick0axis10 disabled
4365 \end_layout
4367 \begin_layout LyX-Code
4368 set-axis joystick0axis11 disabled
4369 \end_layout
4371 \begin_layout LyX-Code
4372 set-axis joystick0axis12 disabled
4373 \end_layout
4375 \begin_layout LyX-Code
4376 set-axis joystick0axis13 disabled
4377 \end_layout
4379 \begin_layout LyX-Code
4380 set-axis joystick0axis14 disabled
4381 \end_layout
4383 \begin_layout LyX-Code
4384 set-axis joystick0axis15 disabled
4385 \end_layout
4387 \begin_layout LyX-Code
4388 set-axis joystick0axis16 disabled
4389 \end_layout
4391 \begin_layout LyX-Code
4392 set-axis joystick0axis17 disabled
4393 \end_layout
4395 \begin_layout LyX-Code
4396 set-axis joystick0axis18 disabled
4397 \end_layout
4399 \begin_layout LyX-Code
4400 set-axis joystick0axis19 disabled
4401 \end_layout
4403 \begin_layout Section
4404 Errata:
4405 \end_layout
4407 \begin_layout Subsection
4408 Problems from BSNES core:
4409 \end_layout
4411 \begin_layout Itemize
4412 The whole pending save stuff.
4413 \end_layout
4415 \begin_layout Itemize
4416 Lack of layer hiding.
4417 \end_layout
4419 \begin_layout Itemize
4420 It is slow (especially accuracy).
4421 \end_layout
4423 \begin_layout Itemize
4424 Firmwares can't be loaded from ZIP archives.
4425 \end_layout
4427 \begin_layout Subsection
4428 Other problems:
4429 \end_layout
4431 \begin_layout Itemize
4432 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4433 \end_layout
4435 \begin_layout Itemize
4436 Audio for last dumped frame is not itself dumped.
4437 \end_layout
4439 \begin_layout Itemize
4440 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4441 \end_layout
4443 \begin_layout Itemize
4444 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4445 \end_layout
4447 \begin_layout Itemize
4448 No menus, command based interface (SDL).
4449 \end_layout
4451 \begin_layout Itemize
4452 Long commands don't scroll.
4453 \end_layout
4455 \begin_layout Itemize
4456 Wxwidgets UI is still buggy.
4457 \end_layout
4459 \begin_layout Section
4460 Changelog:
4461 \end_layout
4463 \begin_layout Subsection
4464 rr0-beta1
4465 \end_layout
4467 \begin_layout Itemize
4468 Fix -Wall warnings
4469 \end_layout
4471 \begin_layout Itemize
4472 Fix dumper video corruption with levels 10-18.
4473 \end_layout
4475 \begin_layout Subsection
4476 rr0-beta2
4477 \end_layout
4479 \begin_layout Itemize
4480 Autofire
4481 \end_layout
4483 \begin_layout Itemize
4484 Lots of code cleanups
4485 \end_layout
4487 \begin_layout Itemize
4488 Lua interface to settings
4489 \end_layout
4491 \begin_layout Itemize
4492 Allow specifying AVI borders without Lua
4493 \end_layout
4495 \begin_layout Itemize
4496 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4497 \end_layout
4499 \begin_layout Itemize
4500 on_snoop lua callback
4501 \end_layout
4503 \begin_layout Itemize
4504 Faster movie loading and saving.
4505 \end_layout
4507 \begin_layout Subsection
4508 rr0-beta3
4509 \end_layout
4511 \begin_layout Itemize
4512 Joystick support
4513 \end_layout
4515 \begin_layout Subsection
4516 rr0-beta4
4517 \end_layout
4519 \begin_layout Itemize
4520 Fix multi-buttons
4521 \end_layout
4523 \begin_layout Itemize
4524 Save jukebox functionality.
4525 \end_layout
4527 \begin_layout Subsection
4528 rr0-beta5
4529 \end_layout
4531 \begin_layout Itemize
4532 Try to fix some nasty failing movie load edge cases
4533 \end_layout
4535 \begin_layout Itemize
4536 Allow specifying scripts to run on command line.
4537 \end_layout
4539 \begin_layout Subsection
4540 rr0-beta6
4541 \end_layout
4543 \begin_layout Itemize
4544 Major source code reorganization.
4545 \end_layout
4547 \begin_layout Itemize
4548 Backup savestates before overwriting.
4549 \end_layout
4551 \begin_layout Itemize
4552 Don't crash if loading initial state fails.
4553 \end_layout
4555 \begin_layout Subsection
4556 rr0-beta7
4557 \end_layout
4559 \begin_layout Itemize
4560 Fix firmware lookup
4561 \end_layout
4563 \begin_layout Itemize
4564 Fix author name parsing
4565 \end_layout
4567 \begin_layout Itemize
4568 Fix rerecord counting
4569 \end_layout
4571 \begin_layout Itemize
4572 (SDL) Print messages to console if SDL is uninitialized
4573 \end_layout
4575 \begin_layout Itemize
4576 Add movieinfo program
4577 \end_layout
4579 \begin_layout Itemize
4580 Fix loading movies starting from SRAM.
4581 \end_layout
4583 \begin_layout Subsection
4584 rr0-beta8
4585 \end_layout
4587 \begin_layout Itemize
4588 Add support for unattended dumping
4589 \end_layout
4591 \begin_layout Itemize
4592 Fix compiling for Win32
4593 \end_layout
4595 \begin_layout Itemize
4596 Don't lock up if sound can't be initialized
4597 \end_layout
4599 \begin_layout Itemize
4600 Strip trailing CR from commands
4601 \end_layout
4603 \begin_layout Itemize
4604 Don't try to do dubious things in global ctors (fix crash on startup)
4605 \end_layout
4607 \begin_layout Subsection
4608 rr0-beta9
4609 \end_layout
4611 \begin_layout Itemize
4612 Small documentation tweaking
4613 \end_layout
4615 \begin_layout Itemize
4616 Fix make clean
4617 \end_layout
4619 \begin_layout Itemize
4620 Fix major bug in modifier matching
4621 \end_layout
4623 \begin_layout Subsection
4624 rr0-beta10
4625 \end_layout
4627 \begin_layout Itemize
4628 Lots of documentation fixes
4629 \end_layout
4631 \begin_layout Itemize
4632 Use dedicated callbacks for event backcomm., not commands.
4633 \end_layout
4635 \begin_layout Itemize
4636 Ensure that the watchdog is not hit when executing delayed reset.
4637 \end_layout
4639 \begin_layout Itemize
4640 Remove errant tab from joystick message.
4641 \end_layout
4643 \begin_layout Subsection
4644 rr0-beta11
4645 \end_layout
4647 \begin_layout Itemize
4648 Make autofire operate in absolute time, not linear time
4649 \end_layout
4651 \begin_layout Itemize
4652 Reinitialize controls when resuming from loadstate
4653 \end_layout
4655 \begin_layout Itemize
4656 Some more code cleanups
4657 \end_layout
4659 \begin_layout Itemize
4660 If Lua allocator fails, call OOM_panic()
4661 \end_layout
4663 \begin_layout Itemize
4664 Byte/word/dword/qword sized host memory write/read functions.
4665 \end_layout
4667 \begin_layout Itemize
4668 Dump at correct framerate if dumping interlaced NTSC (height=448).
4669 \end_layout
4671 \begin_layout Subsection
4672 rr0-beta12
4673 \end_layout
4675 \begin_layout Itemize
4676 Actually include the complete source code
4677 \end_layout
4679 \begin_layout Itemize
4680 Keep track of RTC
4681 \end_layout
4683 \begin_layout Subsection
4684 rr0-beta13
4685 \end_layout
4687 \begin_layout Itemize
4688 Document {save,start}time.{,sub}second.
4689 \end_layout
4691 \begin_layout Itemize
4692 Intercept time() from bsnes core.
4693 \end_layout
4695 \begin_layout Subsection
4696 rr0-beta14
4697 \end_layout
4699 \begin_layout Itemize
4700 Allow disabling time() interception (allow build on Mac OS X)
4701 \end_layout
4703 \begin_layout Itemize
4704 Use SDLMain on Mac OS X (make SDL not crash)
4705 \end_layout
4707 \begin_layout Itemize
4708 Disable delayed resets (just plain too buggy for now).
4709 \end_layout
4711 \begin_layout Itemize
4712 Code cleanups
4713 \end_layout
4715 \begin_layout Itemize
4716 Use 16-bit for graphics/video instead of 32-bit.
4717 \end_layout
4719 \begin_layout Itemize
4720 gui.rectangle/gui.pixel
4721 \end_layout
4723 \begin_layout Itemize
4724 gui.crosshair
4725 \end_layout
4727 \begin_layout Itemize
4728 New CSCD writer implementation.
4729 \end_layout
4731 \begin_layout Subsection
4732 rr0-beta15
4733 \end_layout
4735 \begin_layout Itemize
4736 Fix interaction of * and +.
4737 \end_layout
4739 \begin_layout Itemize
4740 Manual improvements
4741 \end_layout
4743 \begin_layout Itemize
4744 Use gettimeofday()/usleep(), these seem portable enough.
4745 \end_layout
4747 \begin_layout Itemize
4748 Move joystick axis manipulation to keymapper code.
4749 \end_layout
4751 \begin_layout Itemize
4752 Changes to how read-only works.
4753 \end_layout
4755 \begin_layout Itemize
4756 Refactor controller input code.
4757 \end_layout
4759 \begin_layout Subsection
4760 rr0-beta16
4761 \end_layout
4763 \begin_layout Itemize
4764 Fix mouseclick scale compensation.
4765 \end_layout
4767 \begin_layout Itemize
4768 Draw area boundaries correctly in SDL code.
4769 \end_layout
4771 \begin_layout Itemize
4772 gui.screenshot.
4773 \end_layout
4775 \begin_layout Itemize
4776 Fix CSCD output (buffer overrun and race condition).
4777 \end_layout
4779 \begin_layout Subsection
4780 rr0-beta17
4781 \end_layout
4783 \begin_layout Itemize
4784 JMD dumping support.
4785 \end_layout
4787 \begin_layout Itemize
4788 Allow unattended dumping to JMD.
4789 \end_layout
4791 \begin_layout Itemize
4792 Move to BSNES v083.
4793 \end_layout
4795 \begin_layout Itemize
4796 Switch back to 32-bit colors.
4797 \end_layout
4799 \begin_layout Itemize
4800 Add Lua function gui.color.
4801 \end_layout
4803 \begin_layout Itemize
4804 Use some new C++11 features in GCC 4.6.
4805 \end_layout
4807 \begin_layout Itemize
4808 Be prepared for core frequency changes.
4809 \end_layout
4811 \begin_layout Itemize
4812 Pass colors in one chunk from Lua.
4813 \end_layout
4815 \begin_layout Subsection
4816 rr0-beta18
4817 \end_layout
4819 \begin_layout Itemize
4820 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4821  memory.read_vma() and memory.find_vma().
4822 \end_layout
4824 \begin_layout Itemize
4825 Numerious documentation fixups
4826 \end_layout
4828 \begin_layout Itemize
4829 RTC time format changed
4830 \end_layout
4832 \begin_layout Itemize
4833 Reformat flags display
4834 \end_layout
4836 \begin_layout Itemize
4837 Allow lua package name to be overridden
4838 \end_layout
4840 \begin_layout Itemize
4841 SDUMP (high-quality dumping).
4842 \end_layout
4844 \begin_layout Itemize
4845 Split platform support to plugins.
4846 \end_layout
4848 \begin_layout Itemize
4849 Make all sound plugins support basic sound commands
4850 \end_layout
4852 \begin_layout Itemize
4853 Support portaudio for sound.
4854 \end_layout
4856 \begin_layout Itemize
4857 Allow disable Lua/SDL searching.
4858 \end_layout
4860 \begin_layout Itemize
4861 Upconvert colors when copying lcscreen to screen.
4862 \end_layout
4864 \begin_layout Itemize
4865 Reorganize source tree.
4866 \end_layout
4868 \begin_layout Itemize
4869 Evdev joystick support.
4870 \end_layout
4872 \begin_layout Itemize
4873 Refactor more code into generic window code.
4874 \end_layout
4876 \begin_layout Subsection
4877 rr0-beta19
4878 \end_layout
4880 \begin_layout Itemize
4881 Refactor message handling.
4882 \end_layout
4884 \begin_layout Itemize
4885 Rework makefile
4886 \end_layout
4888 \begin_layout Itemize
4889 Documentation fixes
4890 \end_layout
4892 \begin_layout Itemize
4893 Finish pending saves before load/quit.
4894 \end_layout
4896 \begin_layout Itemize
4897 Wxwidgets graphics plugin.
4898 \end_layout
4900 \begin_layout Subsection
4901 rr0-beta20
4902 \end_layout
4904 \begin_layout Itemize
4905 Get rid of win32-crap.[ch]pp.
4906 \end_layout
4908 \begin_layout Itemize
4909 Move files around a lot.
4910 \end_layout
4912 \begin_layout Itemize
4913 Get rid of need for host C++ compiler.
4914 \end_layout
4916 \begin_layout Itemize
4917 Bsnes v084 core.
4918 \end_layout
4920 \begin_layout Itemize
4921 Refactor inter-component communication.
4922 \end_layout
4924 \begin_layout Itemize
4925 Fix zero luma.
4926 \end_layout
4928 \begin_layout Itemize
4929 Fix crash on multiline aliases.
4930 \end_layout
4932 \begin_layout Itemize
4933 Load/Save settings in wxwidgets gui.
4934 \end_layout
4936 \begin_layout Subsection
4937 rr0-beta21
4938 \end_layout
4940 \begin_layout Itemize
4941 Patch problems in bsnes core
4942 \end_layout
4944 \begin_layout Itemize
4945 SNES is little-endian, not big-endian!
4946 \end_layout
4948 \begin_layout Itemize
4949 Fix memory corruption in lcscreen::load()
4950 \end_layout
4952 \begin_layout Subsection
4953 rr0-beta22
4954 \end_layout
4956 \begin_layout Itemize
4957 Fix interpretting repeat counts in rrdata loading.
4958 \end_layout
4960 \begin_layout Itemize
4961 New lua callback: on_frame()
4962 \end_layout
4964 \begin_layout Itemize
4965 Remove calls to runtosave() that aren't supposed to be there
4966 \end_layout
4968 \begin_layout Itemize
4969 Lua function: movie.read_rtc()
4970 \end_layout
4972 \begin_layout Itemize
4973 Ignore src/fonts/font.cpp
4974 \end_layout
4976 \begin_layout Itemize
4977 Fix more bsnes core problems
4978 \end_layout
4980 \begin_layout Itemize
4981 Control bsnes random seeding
4982 \end_layout
4984 \begin_layout Itemize
4985 Pause-on-end
4986 \end_layout
4988 \begin_layout Itemize
4989 Some bsnes core debugging features (state dump and state hash)
4990 \end_layout
4992 \begin_layout Itemize
4993 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4994  it was 'lsnes rr0-beta21').
4995 \end_layout
4997 \begin_layout Subsection
4998 rr0-beta23
4999 \end_layout
5001 \begin_layout Itemize
5002 Fix memory corruption due to macro/field mixup
5003 \end_layout
5005 \begin_layout Itemize
5006 search-memory update
5007 \end_layout
5009 \begin_layout Itemize
5010 Allow direct-mapped framebuffer
5011 \end_layout
5013 \begin_layout Itemize
5014 SDL: Use SDL_ANYFORMAT if possible
5015 \end_layout
5017 \begin_layout Itemize
5018 SDMP2SOX: 2s delay modes.
5019 \end_layout
5021 \begin_layout Itemize
5022 Wxwidgets: Cleanups
5023 \end_layout
5025 \begin_layout Itemize
5026 Use sed -E, not sed -r.
5027  Fixes building on Mac OS X.
5028 \end_layout
5030 \begin_layout Itemize
5031 Wxwidgets: Save jukebox on exit
5032 \end_layout
5034 \begin_layout Itemize
5035 Fix RTC if using load-movie on savestate.
5036 \end_layout
5038 \begin_layout Itemize
5039 Fix crash related to full console mode.
5040 \end_layout
5042 \begin_layout Subsection
5043 rr0-beta24
5044 \end_layout
5046 \begin_layout Itemize
5047 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5048 \end_layout
5050 \begin_layout Itemize
5051 Wxwidgets: Allow compiling on Mac OS X.
5052 \end_layout
5054 \begin_layout Itemize
5055 Use movie compare instead of movie hashing (faster save/load).
5056 \end_layout
5058 \begin_layout Itemize
5059 Lua: _SYSTEM table.
5060 \end_layout
5062 \begin_layout Subsection
5063 rr0-beta25
5064 \end_layout
5066 \begin_layout Itemize
5067 sdmp2sox: Pad soundtrack if using -l or -L.
5068 \end_layout
5070 \begin_layout Itemize
5071 sdmp2sox: Fix NTSC overscan.
5072 \end_layout
5074 \begin_layout Itemize
5075 sdmp2sox: Add AR correction mode.
5076 \end_layout
5078 \begin_layout Itemize
5079 call lua_close() when exiting.
5080 \end_layout
5082 \begin_layout Itemize
5083 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5084 \end_layout
5086 \begin_layout Subsection
5087 rr0-beta26
5088 \end_layout
5090 \begin_layout Itemize
5091 Fix IPS patching code (use bsnes core IPS patcher).
5092 \end_layout
5094 \begin_layout Itemize
5095 Implement BPS patching (using bsnes core IPS patcher).
5096 \end_layout
5098 \begin_layout Itemize
5099 Add feature to load headered ROMs.
5100 \end_layout
5102 \begin_layout Subsection
5103 rr0-beta27
5104 \end_layout
5106 \begin_layout Itemize
5107 Show command names when showing keybindings
5108 \end_layout
5110 \begin_layout Subsection
5112 \end_layout
5114 \begin_layout Itemize
5115 Fix pause-on-end to be actually controllable
5116 \end_layout
5118 \begin_layout Itemize
5119 SDL: Poll all events in queue, not just first one (fixes slowness in command
5120  typing)
5121 \end_layout
5123 \begin_layout Itemize
5124 Wxwidgets: Fix ROM loading.
5125 \end_layout
5127 \begin_layout Subsection
5128 rr1-beta0
5129 \end_layout
5131 \begin_layout Itemize
5132 Lua: Add gui.textH, gui.textV, gui.textHV
5133 \end_layout
5135 \begin_layout Itemize
5136 Fix text colors on SDL on Mac OS X
5137 \end_layout
5139 \begin_layout Itemize
5140 Mode 'F' for finished in readonly mode.
5141 \end_layout
5143 \begin_layout Itemize
5144 Fix some WS errors.
5145 \end_layout
5147 \begin_layout Itemize
5148 Reliably pause after skip poll
5149 \end_layout
5151 \begin_layout Itemize
5152 Split UI and core into their own threads
5153 \end_layout
5155 \begin_layout Subsection
5156 rr1-beta1
5157 \end_layout
5159 \begin_layout Itemize
5160 Remove leftover dummy SRAM slot
5161 \end_layout
5163 \begin_layout Itemize
5164 Fix controller numbers.
5165 \end_layout
5167 \begin_layout Subsection
5168 rr1-beta2
5169 \end_layout
5171 \begin_layout Itemize
5172 Fix lsnes-dumpavi after interface change.
5173 \end_layout
5175 \begin_layout Itemize
5176 Also give BSNES patches for v085.
5177 \end_layout
5179 \begin_layout Itemize
5180 Pack movie data in memory.
5181 \end_layout
5183 \begin_layout Subsection
5184 rr1-beta3
5185 \end_layout
5187 \begin_layout Itemize
5188 Fix framecount/length given when loading movies.
5189 \end_layout
5191 \begin_layout Itemize
5192 Controller command memory leak fixes.
5193 \end_layout
5195 \begin_layout Itemize
5196 Don't leak palette if freeing screen object.
5197 \end_layout
5199 \begin_layout Subsection
5200 rr1-beta4
5201 \end_layout
5203 \begin_layout Itemize
5204 Detect revisions.
5205 \end_layout
5207 \begin_layout Itemize
5208 Wxwidgets: Allow controlling dumper from the menu.
5209 \end_layout
5211 \begin_layout Subsection
5212 rr1-beta5
5213 \end_layout
5215 \begin_layout Itemize
5216 Rewrite parts of manual
5217 \end_layout
5219 \begin_layout Itemize
5220 Lua: Make it work with Lua 5.2.
5221 \end_layout
5223 \begin_layout Subsection
5224 rr1-beta6
5225 \end_layout
5227 \begin_layout Itemize
5228 Win32: Fix compile errors.
5229 \end_layout
5231 \begin_layout Subsection
5232 rr1-beta7
5233 \end_layout
5235 \begin_layout Itemize
5236 Refactor controller input code.
5237 \end_layout
5239 \begin_layout Itemize
5240 Fix crash when using command line on SDL / Mac OS X.
5241 \end_layout
5243 \begin_layout Subsection
5244 rr1-beta8
5245 \end_layout
5247 \begin_layout Itemize
5248 Delete core/coroutine (obsolete)
5249 \end_layout
5251 \begin_layout Itemize
5252 Lag input display by one frame.
5253 \end_layout
5255 \begin_layout Itemize
5256 Rewind movie to beginning function.
5257 \end_layout
5259 \begin_layout Itemize
5260 Fix wrong frame number reported to Lua when repainting after loadstate
5261 \end_layout
5263 \begin_layout Itemize
5264 Support UI editing of jukebox
5265 \end_layout
5267 \begin_layout Itemize
5268 Wxwidgets: Save settings on exit.
5269 \end_layout
5271 \begin_layout Itemize
5272 Support ${project} for filenames
5273 \end_layout
5275 \begin_layout Itemize
5276 SDL: Fix command history
5277 \end_layout
5279 \begin_layout Subsection
5280 rr1-beta9
5281 \end_layout
5283 \begin_layout Itemize
5284 Fix some order-of-global-ctor bugs.
5285 \end_layout
5287 \begin_layout Subsection
5288 rr1-beta10
5289 \end_layout
5291 \begin_layout Itemize
5292 Fix crashes when quitting on Win32.
5293 \end_layout
5295 \begin_layout Subsection
5296 rr1-beta11
5297 \end_layout
5299 \begin_layout Itemize
5300 EVDEV: Queue keypresses from joystick, don't send directly
5301 \end_layout
5303 \begin_layout Itemize
5304 Wxwidgets: Load-Preserve that actually works.
5305 \end_layout
5307 \begin_layout Subsection
5308 rr1-beta12
5309 \end_layout
5311 \begin_layout Itemize
5312 Wxwidgets: GUI for memory search.
5313 \end_layout
5315 \begin_layout Itemize
5316 Warn about using synchronous queue in UI callback.
5317 \end_layout
5319 \begin_layout Subsection
5320 rr1-beta13
5321 \end_layout
5323 \begin_layout Itemize
5324 Remember last saved file for each ROM
5325 \end_layout
5327 \begin_layout Itemize
5328 Support MT dumping via boost.
5329 \end_layout
5331 \begin_layout Itemize
5332 Lua: input.raw
5333 \end_layout
5335 \begin_layout Itemize
5336 Lua: input.keyhook
5337 \end_layout
5339 \begin_layout Itemize
5340 Make mouse be ordinary input instead of special-casing
5341 \end_layout
5343 \begin_layout Itemize
5344 SDL: Don't screw up commands with NUL codepoints.
5345 \end_layout
5347 \begin_layout Subsection
5348 rr1-beta14
5349 \end_layout
5351 \begin_layout Itemize
5352 Merge status panel and main window
5353 \end_layout
5355 \begin_layout Itemize
5356 True movie slot support (the rest of it)
5357 \end_layout
5359 \begin_layout Itemize
5360 SDL: Fix compilation error
5361 \end_layout
5363 \begin_layout Itemize
5364 Elminate cross calls in dump menu code.
5365 \end_layout
5367 \begin_layout Subsection
5368 rr1-beta15
5369 \end_layout
5371 \begin_layout Itemize
5372 Cancel pending saves command
5373 \end_layout
5375 \begin_layout Itemize
5376 Wxwidgets: Code refactoring
5377 \end_layout
5379 \begin_layout Itemize
5380 Wxwidgets: Fix system -> reset
5381 \end_layout
5383 \begin_layout Itemize
5384 Wxwidgets: Read watch expressions in the right thread
5385 \end_layout
5387 \begin_layout Subsection
5388 rr1-beta16
5389 \end_layout
5391 \begin_layout Itemize
5392 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5393  support that).
5394 \end_layout
5396 \begin_layout Itemize
5397 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5398 \end_layout
5400 \begin_layout Itemize
5401 Don't append trailing '-' to prefix when saving movie.
5402 \end_layout
5404 \begin_layout Itemize
5405 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5406 \end_layout
5408 \begin_layout Subsection
5410 \end_layout
5412 \begin_layout Itemize
5413 Document memory watch syntax.
5414 \end_layout
5416 \begin_layout Subsection
5417 rr1-delta1
5418 \end_layout
5420 \begin_layout Itemize
5421 Fix unattended dumping (lsnes-dumpavi)
5422 \end_layout
5424 \begin_layout Itemize
5425 Support RAW dumping
5426 \end_layout
5428 \begin_layout Itemize
5429 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5430 \end_layout
5432 \begin_layout Itemize
5433 Add option to control sample rate preturbation in AVI dumper
5434 \end_layout
5436 \begin_layout Subsection
5437 rr1-delta2
5438 \end_layout
5440 \begin_layout Itemize
5441 Wxwidgets: Fix dumper submodes
5442 \end_layout
5444 \begin_layout Itemize
5445 Set core controller types before loadstate
5446 \end_layout
5448 \begin_layout Subsection
5449 rr1-delta2epsilon1
5450 \end_layout
5452 \begin_layout Itemize
5453 Fix compiling with bsnes v086.
5454 \end_layout
5456 \end_body
5457 \end_document