Add header file in order to make it compile with bsnes v086
[lsnes.git] / manual.lyx
blob80591f11cce44404059de72e5a65c45cae836177
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 Section
778 Startup file lsnes.rc
779 \end_layout
781 \begin_layout Standard
782 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
783  This file is located in:
784 \end_layout
786 \begin_layout Itemize
787 Windows: %APPDATA%
788 \backslash
789 lsnes
790 \backslash
791 lsnes.rc (if %APPDATA% exists)
792 \end_layout
794 \begin_layout Itemize
795 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
796 \end_layout
798 \begin_layout Itemize
799 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
800 \end_layout
802 \begin_layout Itemize
803 All: ./lsnes.rc (fallback default).
804 \end_layout
806 \begin_layout Standard
807 If leading directories do not exist, attempt to create them is made.
808 \end_layout
810 \begin_layout Section
811 Internal commands
812 \end_layout
814 \begin_layout Itemize
815 Commands beginning with '*' invoke the corresponding command without alias
816  expansion.
817 \end_layout
819 \begin_layout Itemize
820 If command starts with '+' (after possible '*'), the command is executed
821  as-is when button is pressed, and when button is released, it is executed
822  with '+' replaced by '-'.
823 \end_layout
825 \begin_layout Itemize
826 Commands without '+' execute only on negative edge (release).
827 \end_layout
829 \begin_layout Subsection
830 Settings:
831 \end_layout
833 \begin_layout Standard
834 Settings control various aspects of emulator behaviour.
835 \end_layout
837 \begin_layout Subsubsection
838 set-setting <setting> <value>
839 \end_layout
841 \begin_layout Standard
842 Sets setting <setting> to value <value> (may be empty).
843 \end_layout
845 \begin_layout Subsubsection
846 unset-setting <setting>
847 \end_layout
849 \begin_layout Standard
850 Try to unset setting <setting> (not all settings can be unset).
851 \end_layout
853 \begin_layout Subsubsection
854 get-setting <setting>
855 \end_layout
857 \begin_layout Standard
858 Read value of setting <setting>
859 \end_layout
861 \begin_layout Subsubsection
862 show-settings
863 \end_layout
865 \begin_layout Standard
866 Print names and values of all settings.
867 \end_layout
869 \begin_layout Subsection
870 Keybindings
871 \end_layout
873 \begin_layout Standard
874 Keybindings bind commands or aliases to keys (or pseudo-keys).
876 \end_layout
878 \begin_layout Standard
879 Notes:
880 \end_layout
882 \begin_layout Itemize
883 Do not bind edge active (+/-) commands to keys with modifiers, that won't
884  work right!
885 \end_layout
887 \begin_layout Itemize
888 Names of keys and modifiers are platform-dependent.
889 \end_layout
891 \begin_layout Itemize
892 Be careful before binding pseudo-keys (such as joystick axes, buttons or
893  hats) with modifiers.
894  That may or may not work right.
895 \end_layout
897 \begin_layout Subsubsection
898 bind-key [<mod>/<modmask>] <key> <command>
899 \end_layout
901 \begin_layout Standard
902 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
903 ed list) are set as <mod> (comma-seperated list).
904 \end_layout
906 \begin_layout Standard
907 The names of keys and modifiers are platform-dependent.
908 \end_layout
910 \begin_layout Subsubsection
911 unbind-key [<mod>/<modmask>] <key>
912 \end_layout
914 \begin_layout Standard
915 Unbind command from <key> (with specified <mod> and <modmask>).
916 \end_layout
918 \begin_layout Subsubsection
919 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
920  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
921  [plus=<val>] [tolerance=<val>]
922 \end_layout
924 \begin_layout Standard
925 Set axis parameters for axis <axis>.
926 \end_layout
928 \begin_layout Itemize
929 disabled: Disable axis
930 \end_layout
932 \begin_layout Itemize
933 axis: Normal axis
934 \end_layout
936 \begin_layout Itemize
937 axis-inverse: Inverse axis
938 \end_layout
940 \begin_layout Itemize
941 pressure0-: Pressure sensitive.
942  Released at 0, pressed at -.
943 \end_layout
945 \begin_layout Itemize
946 pressure0+: Pressure sensitive.
947  Released at 0, pressed at +.
948 \end_layout
950 \begin_layout Itemize
951 pressure-0: Pressure sensitive.
952  Released at -, pressed at 0.
953 \end_layout
955 \begin_layout Itemize
956 pressure-+: Pressure sensitive.
957  Released at -, pressed at +.
958 \end_layout
960 \begin_layout Itemize
961 pressure+0: Pressure sensitive.
962  Released at +, pressed at 0.
963 \end_layout
965 \begin_layout Itemize
966 pressure+-: Pressure sensitive.
967  Released at +, pressed at -.
968 \end_layout
970 \begin_layout Itemize
971 minus=<val>: Calibration at extreme minus position (-32768-32767)
972 \end_layout
974 \begin_layout Itemize
975 zero=<val>: Calibration at neutral position (-32768-32767)
976 \end_layout
978 \begin_layout Itemize
979 plus=<val>: Calibration at extreme plus position (-32768-32767)
980 \end_layout
982 \begin_layout Itemize
983 tolerance=<value>: Center band tolerance (0<x<1).
984  The smaller the value, the more sensitive the control is.
985 \end_layout
987 \begin_layout Subsubsection
988 show-bindings
989 \end_layout
991 \begin_layout Standard
992 Print all key bindings in effect.
993 \end_layout
995 \begin_layout Subsection
996 Aliases
997 \end_layout
999 \begin_layout Standard
1000 Aliases bind command to sequence of commands.
1001  After alias has been defined, it replaces the command it shadows.
1002 \end_layout
1004 \begin_layout Standard
1005 Notes:
1006 \end_layout
1008 \begin_layout Itemize
1009 You can't alias command to itself.
1010 \end_layout
1012 \begin_layout Itemize
1013 Aliases starting with +/- are edge active just like ordinary commands starting
1014  with +/-.
1015 \end_layout
1017 \begin_layout Itemize
1018 One command can be aliased to multiple commands.
1019 \end_layout
1021 \begin_layout Subsubsection
1022 alias-command <command> <expansion>
1023 \end_layout
1025 \begin_layout Standard
1026 Append <expansion> to alias <command>.
1027  If alias does not already exist, it is created.
1028 \end_layout
1030 \begin_layout Subsubsection
1031 unalias-command <command>
1032 \end_layout
1034 \begin_layout Standard
1035 Clear alias expansion for <command>.
1036 \end_layout
1038 \begin_layout Subsubsection
1039 show-aliases
1040 \end_layout
1042 \begin_layout Standard
1043 Print all aliases and their expansions in effect.
1044 \end_layout
1046 \begin_layout Subsection
1047 run-script <script>
1048 \end_layout
1050 \begin_layout Standard
1051 Run <script> as if commands were entered on the command line.
1052 \end_layout
1054 \begin_layout Subsection
1055 Video dumping
1056 \end_layout
1058 \begin_layout Standard
1059 Following commands control video dumping:
1060 \end_layout
1062 \begin_layout Subsubsection
1063 dump-avi <prefix>
1064 \end_layout
1066 \begin_layout Standard
1067 Dump AVI video to prefix <prefix> Notes:
1068 \end_layout
1070 \begin_layout Itemize
1071 The codec is Camstudio Codec in gzip mode.
1072 \end_layout
1074 \begin_layout Itemize
1075 Encoder and muxer are internal, available on all platforms.
1076 \end_layout
1078 \begin_layout Itemize
1079 Audio enable/disable and framerate has no effect.
1080 \end_layout
1082 \begin_layout Itemize
1083 The audio dumped to .avi is low-quality version.
1084  The high-quality version is dumped to .sox file.
1085 \end_layout
1087 \begin_layout Subsubsection
1088 end-avi
1089 \end_layout
1091 \begin_layout Standard
1092 End current AVI video dump (closing the emulator also closes the dump).
1093 \end_layout
1095 \begin_layout Subsubsection
1096 dump-jmd <file>
1097 \end_layout
1099 \begin_layout Standard
1100 Dump JMD video to file <file>.
1101 \end_layout
1103 \begin_layout Subsubsection
1104 end-jmd
1105 \end_layout
1107 \begin_layout Standard
1108 End the current JMD dump in progress.
1109 \end_layout
1111 \begin_layout Subsubsection
1112 dump-sdmp <prefix>
1113 \end_layout
1115 \begin_layout Standard
1116 Dump SDMP to <prefix>, splitting at 2GB.
1117 \end_layout
1119 \begin_layout Subsubsection
1120 dump-sdmp-ss <file>
1121 \end_layout
1123 \begin_layout Standard
1124 Dump SDMP to <file>, no splitting
1125 \end_layout
1127 \begin_layout Subsubsection
1128 end-sdmp
1129 \end_layout
1131 \begin_layout Standard
1132 End the current SDMP dump in progress.
1133 \end_layout
1135 \begin_layout Subsubsection
1136 dump-raw <prefix>
1137 \end_layout
1139 \begin_layout Standard
1140 Dump raw audio (to <prefix>.audio, at 32040.5Hz) and video (to <prefix>.video>,
1141  at nominal framerate and 512x448 / 512x478 size).
1142 \end_layout
1144 \begin_layout Subsubsection
1145 end-raw
1146 \end_layout
1148 \begin_layout Standard
1149 End the current RAW dump in progress.
1150 \end_layout
1152 \begin_layout Subsection
1153 Memory manipulation
1154 \end_layout
1156 \begin_layout Standard
1157 <address> may be decimal or hexadecimal (prefixed with '0x').
1158  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
1159  with '-') decimal.
1160 \end_layout
1162 \begin_layout Standard
1163 The available element <sizes> are:
1164 \end_layout
1166 \begin_layout Itemize
1167 byte: 1 byte
1168 \end_layout
1170 \begin_layout Itemize
1171 word: 2 bytes
1172 \end_layout
1174 \begin_layout Itemize
1175 dword: 4 bytes
1176 \end_layout
1178 \begin_layout Itemize
1179 qword: 8 bytes
1180 \end_layout
1182 \begin_layout Standard
1183 When reading RAM and ROM, multi-byte reads/writes are big-endian.
1184  When dealing with DSP memory, multi-byte reads/writes are native-endian
1185  (do not use operand sizes exceeding DSP bitness, except dword is OK for
1186  24-bit memory).
1187 \end_layout
1189 \begin_layout Subsubsection
1190 read-<size> <address>
1191 \end_layout
1193 \begin_layout Standard
1194 Read the value of byte in <address>.
1195 \end_layout
1197 \begin_layout Subsubsection
1198 read-s<size> <address>
1199 \end_layout
1201 \begin_layout Standard
1202 Read the value of signed byte in <address>.
1203 \end_layout
1205 \begin_layout Subsubsection
1206 write-<size> <address> <value>
1207 \end_layout
1209 \begin_layout Standard
1210 Write <value> to byte in address <address>.
1211 \end_layout
1213 \begin_layout Subsubsection
1214 search-memory reset
1215 \end_layout
1217 \begin_layout Standard
1218 Reset the memory search
1219 \end_layout
1221 \begin_layout Subsubsection
1222 search-memory count
1223 \end_layout
1225 \begin_layout Standard
1226 Print number of candidates remaining
1227 \end_layout
1229 \begin_layout Subsubsection
1230 search-memory print
1231 \end_layout
1233 \begin_layout Standard
1234 Print all candidates remaining
1235 \end_layout
1237 \begin_layout Subsubsection
1238 search-memory <usflag><sizeflag><op>
1239 \end_layout
1241 \begin_layout Standard
1242 Searches memory for addresses satisfying criteria.
1243 \end_layout
1245 \begin_layout Standard
1246 <usflag> can be:
1247 \end_layout
1249 \begin_layout Itemize
1250 u: unsigned
1251 \end_layout
1253 \begin_layout Itemize
1254 s: signed
1255 \end_layout
1257 \begin_layout Standard
1258 <sizeflag> can be:
1259 \end_layout
1261 \begin_layout Itemize
1262 b: byte
1263 \end_layout
1265 \begin_layout Itemize
1266 w: word
1267 \end_layout
1269 \begin_layout Itemize
1270 d: dword
1271 \end_layout
1273 \begin_layout Itemize
1274 q: qword
1275 \end_layout
1277 \begin_layout Standard
1278 <op> can be:
1279 \end_layout
1281 \begin_layout Itemize
1282 lt: < previous value.
1283 \end_layout
1285 \begin_layout Itemize
1286 le: <= previous value.
1287 \end_layout
1289 \begin_layout Itemize
1290 eq: = previous value.
1291 \end_layout
1293 \begin_layout Itemize
1294 ne: != previous value.
1295 \end_layout
1297 \begin_layout Itemize
1298 ge: >= previous value.
1299 \end_layout
1301 \begin_layout Itemize
1302 gt: > previous value.
1303 \end_layout
1305 \begin_layout Subsubsection
1306 search-memory <sizeflag> <value>
1307 \end_layout
1309 \begin_layout Standard
1310 Searches for addresses that currently have value <value>.
1311  <sizeflag> is as in previous command.
1312 \end_layout
1314 \begin_layout Subsection
1315 Main commands
1316 \end_layout
1318 \begin_layout Standard
1319 These commands are not available in lsnesrc, but are available after ROM
1320  has been loaded.
1321 \end_layout
1323 \begin_layout Subsubsection
1324 quit-emulator [/y]
1325 \end_layout
1327 \begin_layout Standard
1328 Quits the emulator (asking for confirmation).
1329  If /y is given, no confirmation is asked.
1330 \end_layout
1332 \begin_layout Subsubsection
1333 pause-emulator
1334 \end_layout
1336 \begin_layout Standard
1337 Toggle paused/unpaused
1338 \end_layout
1340 \begin_layout Subsubsection
1341 +advance-frame 
1342 \end_layout
1344 \begin_layout Standard
1345 Advance frame.
1346  If the button is still held after configurable timeout expires, game unpauses
1347  for the duration frame advance is held.
1348 \end_layout
1350 \begin_layout Subsubsection
1351 +advance-poll 
1352 \end_layout
1354 \begin_layout Standard
1355 Advance subframe.
1356  If the button is still held after configurable timeout expires, game unpauses
1357  for the duration frame advance is held.
1358 \end_layout
1360 \begin_layout Subsubsection
1361 advance-skiplag 
1362 \end_layout
1364 \begin_layout Standard
1365 Skip to first poll in frame after current.
1366 \end_layout
1368 \begin_layout Subsubsection
1369 reset 
1370 \end_layout
1372 \begin_layout Standard
1373 Reset the SNES after this frame.
1374 \end_layout
1376 \begin_layout Subsubsection
1377 load <filename> 
1378 \end_layout
1380 \begin_layout Standard
1381 Load savestate <filename> in current mode.
1382 \end_layout
1384 \begin_layout Subsubsection
1385 load-state <filename> 
1386 \end_layout
1388 \begin_layout Standard
1389 Load savestate <filename> in readwrite mode.
1390 \end_layout
1392 \begin_layout Subsubsection
1393 load-readonly <filename> 
1394 \end_layout
1396 \begin_layout Standard
1397 Load savestate <filename> in readonly mode.
1398 \end_layout
1400 \begin_layout Subsubsection
1401 load-preserve <filename> 
1402 \end_layout
1404 \begin_layout Standard
1405 Load savestate <filename> in readonly mode, preserving current events.
1406 \end_layout
1408 \begin_layout Subsubsection
1409 load-movie <filename> 
1410 \end_layout
1412 \begin_layout Standard
1413 Load savestate <filename>, ignoring save part in readonly mode.
1414 \end_layout
1416 \begin_layout Subsubsection
1417 save-state <filename> 
1418 \end_layout
1420 \begin_layout Standard
1421 Save system state to <filename> as soon as possible.
1422 \end_layout
1424 \begin_layout Subsubsection
1425 save-movie <filename> 
1426 \end_layout
1428 \begin_layout Standard
1429 Save movie to <filename>.
1430 \end_layout
1432 \begin_layout Subsubsection
1433 set-rwmode 
1434 \end_layout
1436 \begin_layout Standard
1437 Set read-write mode.
1438 \end_layout
1440 \begin_layout Subsubsection
1441 set-romode 
1442 \end_layout
1444 \begin_layout Standard
1445 Set read-only mode
1446 \end_layout
1448 \begin_layout Subsubsection
1449 toggle-rwmode 
1450 \end_layout
1452 \begin_layout Standard
1453 Toggle between read-only and read-write modes.
1454 \end_layout
1456 \begin_layout Subsubsection
1457 set-gamename <name> 
1458 \end_layout
1460 \begin_layout Standard
1461 Set name of the game to <name>
1462 \end_layout
1464 \begin_layout Subsubsection
1465 get-gamename 
1466 \end_layout
1468 \begin_layout Standard
1469 Print the name of the game.
1470 \end_layout
1472 \begin_layout Subsubsection
1473 add-author <author> 
1474 \end_layout
1476 \begin_layout Standard
1477 Adds new author <author>.
1478  If <author> does not contain '|' it is full name.
1479  If it contains '|', '|' splits the full name and nickname.
1480 \end_layout
1482 \begin_layout Subsubsection
1483 edit-author <num> <author> 
1484 \end_layout
1486 \begin_layout Standard
1487 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1488  format)
1489 \end_layout
1491 \begin_layout Subsubsection
1492 remove-author <num> 
1493 \end_layout
1495 \begin_layout Standard
1496 Remove author in slot <num>
1497 \end_layout
1499 \begin_layout Subsubsection
1500 print-authors 
1501 \end_layout
1503 \begin_layout Standard
1504 Print authors.
1505 \end_layout
1507 \begin_layout Subsubsection
1508 test-1, test-2, test-3
1509 \end_layout
1511 \begin_layout Standard
1512 Internal test commands.
1513  Don't use.
1514 \end_layout
1516 \begin_layout Subsubsection
1517 take-screenshot <filename> 
1518 \end_layout
1520 \begin_layout Standard
1521 Save screenshot to <filename>.
1522 \end_layout
1524 \begin_layout Subsubsection
1525 +controller<num><button>
1526 \end_layout
1528 \begin_layout Standard
1529 Press button <button> on controller <num> (1-8).
1530  The following button names are known:
1531 \end_layout
1533 \begin_layout Itemize
1534 left
1535 \end_layout
1537 \begin_layout Itemize
1538 right
1539 \end_layout
1541 \begin_layout Itemize
1543 \end_layout
1545 \begin_layout Itemize
1546 down
1547 \end_layout
1549 \begin_layout Itemize
1551 \end_layout
1553 \begin_layout Itemize
1555 \end_layout
1557 \begin_layout Itemize
1559 \end_layout
1561 \begin_layout Itemize
1563 \end_layout
1565 \begin_layout Itemize
1567 \end_layout
1569 \begin_layout Itemize
1571 \end_layout
1573 \begin_layout Itemize
1574 select
1575 \end_layout
1577 \begin_layout Itemize
1578 start
1579 \end_layout
1581 \begin_layout Itemize
1582 trigger
1583 \end_layout
1585 \begin_layout Itemize
1586 cursor
1587 \end_layout
1589 \begin_layout Itemize
1590 pause
1591 \end_layout
1593 \begin_layout Itemize
1594 turbo
1595 \end_layout
1597 \begin_layout Subsubsection
1598 controllerh<num><button>
1599 \end_layout
1601 \begin_layout Standard
1602 Hold/unhold button <button> on controller <num> (1-8).
1603  See +controller for button names.
1604 \end_layout
1606 \begin_layout Subsubsection
1607 autofire (<pattern>|-)...
1608 \end_layout
1610 \begin_layout Standard
1611 Set autofire pattern.
1612  Each parameter is comma-separated list of button names (in form of 1start,
1613  1A, 2B, etc..) to hold on that frame.
1614  After reaching the end of pattern, the pattern restarts from the beginning.
1615 \end_layout
1617 \begin_layout Subsubsection
1618 repaint
1619 \end_layout
1621 \begin_layout Standard
1622 Force a repaint.
1623 \end_layout
1625 \begin_layout Subsection
1626 Save jukebox 
1627 \end_layout
1629 \begin_layout Subsubsection
1630 cycle-jukebox-backward
1631 \end_layout
1633 \begin_layout Standard
1634 Cycle save jukebox backwards.
1635 \end_layout
1637 \begin_layout Subsubsection
1638 cycle-jukebox-forward
1639 \end_layout
1641 \begin_layout Standard
1642 Cycle save jukebox forwards
1643 \end_layout
1645 \begin_layout Subsubsection
1646 add-jukebox-save <filename>
1647 \end_layout
1649 \begin_layout Standard
1650 Add <filename> to jukebox saves.
1651 \end_layout
1653 \begin_layout Subsubsection
1654 load-jukebox
1655 \end_layout
1657 \begin_layout Standard
1658 Do load from jukebox (current mode).
1659 \end_layout
1661 \begin_layout Subsubsection
1662 save-jukebox
1663 \end_layout
1665 \begin_layout Standard
1666 Do state save to jukebox.
1667 \end_layout
1669 \begin_layout Subsection
1670 Lua 
1671 \end_layout
1673 \begin_layout Standard
1674 Only available if lua support is compiled in.
1675 \end_layout
1677 \begin_layout Subsubsection
1678 evaluate-lua <luacode>
1679 \end_layout
1681 \begin_layout Standard
1682 Run Lua code <luacode> using built-in Lua interpretter.
1683 \end_layout
1685 \begin_layout Subsubsection
1686 run-lua <script>
1687 \end_layout
1689 \begin_layout Standard
1690 Run specified lua file using built-in Lua interpretter.
1691 \end_layout
1693 \begin_layout Subsection
1694 Memory watch
1695 \end_layout
1697 \begin_layout Subsubsection
1698 add-watch <name> <expression>
1699 \end_layout
1701 \begin_layout Standard
1702 Adds new watch (or modifies old one).
1703 \end_layout
1705 \begin_layout Subsubsection
1706 remove-watch <name>
1707 \end_layout
1709 \begin_layout Standard
1710 Remove a watch.
1711 \end_layout
1713 \begin_layout Subsection
1714 Sound 
1715 \end_layout
1717 \begin_layout Subsubsection
1718 enable-sound <on/off> 
1719 \end_layout
1721 \begin_layout Standard
1722 Enable/Disable sound.
1723 \end_layout
1725 \begin_layout Subsubsection
1726 set-sound-device <device> 
1727 \end_layout
1729 \begin_layout Standard
1730 Set sound device to <device>
1731 \end_layout
1733 \begin_layout Subsubsection
1734 show-sound-status 
1735 \end_layout
1737 \begin_layout Standard
1738 Show status of sound system.
1739 \end_layout
1741 \begin_layout Subsubsection
1742 show-sound-devices
1743 \end_layout
1745 \begin_layout Standard
1746 Show all available devices.
1747 \end_layout
1749 \begin_layout Subsection
1750 SDL Platform commands 
1751 \end_layout
1753 \begin_layout Standard
1754 The following are valid on SDL platform.
1755 \end_layout
1757 \begin_layout Subsubsection
1758 identify-key
1759 \end_layout
1761 \begin_layout Standard
1762 Asks to press a key and then identifies that (pseudo-)key.
1763 \end_layout
1765 \begin_layout Subsubsection
1766 toggle-console 
1767 \end_layout
1769 \begin_layout Standard
1770 Toggle between windowed/fullscreen console.
1771 \end_layout
1773 \begin_layout Subsubsection
1774 scroll-fullup 
1775 \end_layout
1777 \begin_layout Standard
1778 Scroll messages window as far back as it goes.
1779 \end_layout
1781 \begin_layout Subsubsection
1782 scroll-fulldown 
1783 \end_layout
1785 \begin_layout Standard
1786 Scroll messages window as far forward as it goes.
1787 \end_layout
1789 \begin_layout Subsubsection
1790 scroll-up 
1791 \end_layout
1793 \begin_layout Standard
1794 Scroll messages window back one screenful.
1795 \end_layout
1797 \begin_layout Subsubsection
1798 scroll-down 
1799 \end_layout
1801 \begin_layout Standard
1802 Scroll messages window forward one screenful.
1803 \end_layout
1805 \begin_layout Section
1806 Settings
1807 \end_layout
1809 \begin_layout Subsection
1810 Core settings
1811 \end_layout
1813 \begin_layout Subsubsection
1814 firmwarepath
1815 \end_layout
1817 \begin_layout Standard
1818 Set where bsnes looks for firmware files.
1819  Default is 
1820 \begin_inset Quotes eld
1821 \end_inset
1824 \begin_inset Quotes erd
1825 \end_inset
1828 \end_layout
1830 \begin_layout Subsubsection
1831 targetfps
1832 \end_layout
1834 \begin_layout Standard
1835 Set the target fps.
1836  Numeric, range is 0.001 to 
1837 \begin_inset Quotes eld
1838 \end_inset
1840 infinite
1841 \begin_inset Quotes erd
1842 \end_inset
1845  Default is native framerate.
1846 \end_layout
1848 \begin_layout Subsubsection
1849 savecompression
1850 \end_layout
1852 \begin_layout Standard
1853 Set save compression level (integer 0-9).
1854  Default is 7 (0 is no compression).
1855 \end_layout
1857 \begin_layout Subsubsection
1858 advance-timeout
1859 \end_layout
1861 \begin_layout Standard
1862 Set the frame advance timeout in milliseconds.
1863  Numeric integer, range is 0-999999999.
1864  Default is 500.
1865 \end_layout
1867 \begin_layout Subsection
1868 AVI dumper settings
1869 \end_layout
1871 \begin_layout Subsubsection
1872 avi-large
1873 \end_layout
1875 \begin_layout Standard
1876 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1877  outputs.
1878 \end_layout
1880 \begin_layout Subsubsection
1881 avi-left-border
1882 \end_layout
1884 \begin_layout Standard
1885 AVI dumper: Set the default left border thickness (unless lua overrides)
1886  for dumps.
1887  Range 0-8191.
1888  Default is 0.
1889 \end_layout
1891 \begin_layout Subsubsection
1892 avi-right-border
1893 \end_layout
1895 \begin_layout Standard
1896 AVI dumper: Set the default right border thickness (unless lua overrides)
1897  for dumps.
1898  Range 0-8191.
1899  Default is 0.
1900 \end_layout
1902 \begin_layout Subsubsection
1903 avi-top-border
1904 \end_layout
1906 \begin_layout Standard
1907 AVI dumper: Set the default top border thickness (unless lua overrides)
1908  for dumps.
1909  Range 0-8191.
1910  Default is 0.
1911 \end_layout
1913 \begin_layout Subsubsection
1914 avi-bottom-border
1915 \end_layout
1917 \begin_layout Standard
1918 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1919  for dumps.
1920  Range 0-8191.
1921  Default is 0.
1922 \end_layout
1924 \begin_layout Subsubsection
1925 avi-maxframes
1926 \end_layout
1928 \begin_layout Standard
1929 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1930  Range 0-999999999.
1931  Default is 0.
1932 \end_layout
1934 \begin_layout Subsubsection
1935 avi-compresison
1936 \end_layout
1938 \begin_layout Standard
1939 AVI dumper: Compression level (0-18).
1940 \end_layout
1942 \begin_layout Itemize
1943 Compression levels 10 and above are not compatible with stock CSCD codec.
1944 \end_layout
1946 \begin_layout Itemize
1947 Recomended level is 7.
1948 \end_layout
1950 \begin_layout Subsubsection
1951 avi-soundrate
1952 \end_layout
1954 \begin_layout Standard
1955 AVI dumper: Set method of determining the sound rate.
1956 \end_layout
1958 \begin_layout Itemize
1959 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1960  128, 176.4 and 192 kHz.
1961 \end_layout
1963 \begin_layout Itemize
1964 1: Round down to nearest integer.
1965 \end_layout
1967 \begin_layout Itemize
1968 2: Round up to nearest ingeter.
1969 \end_layout
1971 \begin_layout Subsection
1972 JMD options
1973 \end_layout
1975 \begin_layout Subsubsection
1976 jmd-copression
1977 \end_layout
1979 \begin_layout Standard
1980 JMD dumper: Compression level (0-9).
1981 \end_layout
1983 \begin_layout Subsection
1984 SDL platform settings
1985 \end_layout
1987 \begin_layout Subsubsection
1988 autorepeat-first-delay
1989 \end_layout
1991 \begin_layout Standard
1992 Sets the delay for first character in typematic autorepeat.
1993 \end_layout
1995 \begin_layout Subsubsection
1996 autorepeat-subsequent-delay
1997 \end_layout
1999 \begin_layout Standard
2000 Sets the delay for subsequent characters in typematic autorepeat.
2001 \end_layout
2003 \begin_layout Section
2004 Lua functions
2005 \end_layout
2007 \begin_layout Subsection
2008 Core (in main table)
2009 \end_layout
2011 \begin_layout Subsubsection
2012 print
2013 \end_layout
2015 \begin_layout Standard
2016 Print line to message console.
2017 \end_layout
2019 \begin_layout Subsubsection
2020 exec(string command)
2021 \end_layout
2023 \begin_layout Standard
2024 Run command as it was entered on the command line
2025 \end_layout
2027 \begin_layout Subsection
2028 Table bit:
2029 \end_layout
2031 \begin_layout Standard
2032 Bitwise logical functions and related.
2033 \end_layout
2035 \begin_layout Subsubsection
2036 bit.none(number...) / bit.bnot(number...)
2037 \end_layout
2039 \begin_layout Standard
2040 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2041  arguments).
2042 \end_layout
2044 \begin_layout Subsubsection
2045 bit.any(number...) / bit.bor(number...)
2046 \end_layout
2048 \begin_layout Standard
2049 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2050 \end_layout
2052 \begin_layout Subsubsection
2053 bit.all(number...) / bit.band(number...)
2054 \end_layout
2056 \begin_layout Standard
2057 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2059 \end_layout
2061 \begin_layout Subsubsection
2062 bit.parity(number...) / bit.bxor(number...)
2063 \end_layout
2065 \begin_layout Standard
2066 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2067  of the arguments).
2068 \end_layout
2070 \begin_layout Subsubsection
2071 bit.lrotate(number base[, number amount[, number bits]])
2072 \end_layout
2074 \begin_layout Standard
2075 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2076 \end_layout
2078 \begin_layout Subsubsection
2079 bit.rrotate(number base[, number amount[, number bits]])
2080 \end_layout
2082 \begin_layout Standard
2083 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2084  places.
2085 \end_layout
2087 \begin_layout Subsubsection
2088 bit.lshift(number base[, number amount[, number bits]])
2089 \end_layout
2091 \begin_layout Standard
2092 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2093  The new bits are filled with zeroes.
2094 \end_layout
2096 \begin_layout Subsubsection
2097 bit.lrshift(number base[, number amount[, number bits]])
2098 \end_layout
2100 \begin_layout Standard
2101 Shift bits-bit (max 48, default 48) number logically right by amount (default
2102  1) places.
2103  The new bits are filled with zeroes.
2104 \end_layout
2106 \begin_layout Subsubsection
2107 bit.arshift(number base[, number amount[, number bits]])
2108 \end_layout
2110 \begin_layout Standard
2111 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2112  (default 1) places.
2113  The new bits are shifted in with copy of the high bit.
2114 \end_layout
2116 \begin_layout Subsection
2117 Table gui:
2118 \end_layout
2120 \begin_layout Standard
2121 Most of these functions can only be called in on_paint and on_video callbacks.
2122  Exceptions are noted.
2123 \end_layout
2125 \begin_layout Standard
2126 Colors are 32-bit.
2127  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2128  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2129  opaque, 255 is almost transparent).
2130  -1 is the fully transparent color.
2131  Alpha values greater than 127 do work.
2132 \end_layout
2134 \begin_layout Standard
2135 Origin of coordinates is at top left corner of game display area.
2136  Left and top gaps correspond to negative coordinates.
2137 \end_layout
2139 \begin_layout Subsubsection
2140 gui.resolution()
2141 \end_layout
2143 \begin_layout Standard
2144 Returns 2-tuple (hresolution, vresolution).
2145 \end_layout
2147 \begin_layout Subsubsection
2148 gui.<class>_gap(number gap)
2149 \end_layout
2151 \begin_layout Standard
2152 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2153  is 8191).
2154 \end_layout
2156 \begin_layout Subsubsection
2157 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2158 \end_layout
2160 \begin_layout Standard
2161 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2162  16 high).
2163  Parameters:
2164 \end_layout
2166 \begin_layout Itemize
2167 x: X-coordinate to start the drawing from (and x-coordinate at begining
2168  of the lines).
2169 \end_layout
2171 \begin_layout Itemize
2172 y: Y-coordinate to start the drawing from.
2173 \end_layout
2175 \begin_layout Itemize
2176 text: The text to draw.
2177 \end_layout
2179 \begin_layout Itemize
2180 fgc: Text color (default is 0xFFFFFF (white))
2181 \end_layout
2183 \begin_layout Itemize
2184 bgc: Background color (default is -1 (transparent))
2185 \end_layout
2187 \begin_layout Subsubsection
2188 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2189 \end_layout
2191 \begin_layout Standard
2192 Like gui.text, but draw using double-width.
2193 \end_layout
2195 \begin_layout Subsubsection
2196 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2197 \end_layout
2199 \begin_layout Standard
2200 Like gui.text, but draw using double-height.
2201 \end_layout
2203 \begin_layout Subsubsection
2204 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2205 \end_layout
2207 \begin_layout Standard
2208 Like gui.text, but draw using double-width/double-height.
2209 \end_layout
2211 \begin_layout Subsubsection
2212 gui.rectangle(number x, number y, number width, number height[, number thickness[
2213 , number outline[, number fill]]])
2214 \end_layout
2216 \begin_layout Standard
2217 Draw rectangle on the GUI.
2218  Parameters:
2219 \end_layout
2221 \begin_layout Itemize
2222 x: X-coordinate of left edge.
2223 \end_layout
2225 \begin_layout Itemize
2226 y: Y-coordinate of upper edge.
2227 \end_layout
2229 \begin_layout Itemize
2230 width: Width of rectangle.
2231 \end_layout
2233 \begin_layout Itemize
2234 height: Height of rectangle.
2235 \end_layout
2237 \begin_layout Itemize
2238 thickness: Thickness of outline (default is 1).
2239 \end_layout
2241 \begin_layout Itemize
2242 outline: Color of outline (default is 0xFFFFFF (white))
2243 \end_layout
2245 \begin_layout Itemize
2246 fill: Color of fil (default is -1 (transparent))
2247 \end_layout
2249 \begin_layout Subsubsection
2250 gui.pixel(number x, number y[, number color])
2251 \end_layout
2253 \begin_layout Standard
2254 Draw one pixel on the GUI.
2255  Parameters:
2256 \end_layout
2258 \begin_layout Itemize
2259 x: X-coordinate of the pixel
2260 \end_layout
2262 \begin_layout Itemize
2263 y: Y-coordinate of the pixel
2264 \end_layout
2266 \begin_layout Itemize
2267 color: Color of the pixel (default is 0xFFFFFF (white))
2268 \end_layout
2270 \begin_layout Subsubsection
2271 gui.crosshair(number x, number y[, number length[, number color]])
2272 \end_layout
2274 \begin_layout Standard
2275 Draw a crosshair.
2276  Parameters:
2277 \end_layout
2279 \begin_layout Itemize
2280 x: X-coordinate of the crosshair
2281 \end_layout
2283 \begin_layout Itemize
2284 y: Y-coordinate of the crosshair
2285 \end_layout
2287 \begin_layout Itemize
2288 length: Length of the crosshair lines (default 10).
2289 \end_layout
2291 \begin_layout Itemize
2292 color: Color of the crosshair (default is 0xFFFFFF (white))
2293 \end_layout
2295 \begin_layout Subsubsection
2296 gui.line(number x1, number y1, number x2, number y2[, number color])
2297 \end_layout
2299 \begin_layout Standard
2300 Draw a thin line.
2301  Parameters:
2302 \end_layout
2304 \begin_layout Itemize
2305 x1: X-coordinate of one end.
2306 \end_layout
2308 \begin_layout Itemize
2309 y1: Y-coordinate of one end.
2310 \end_layout
2312 \begin_layout Itemize
2313 x2: X-coordinate of the other end.
2314 \end_layout
2316 \begin_layout Itemize
2317 y2: Y-coordinate of the other end.
2318 \end_layout
2320 \begin_layout Itemize
2321 color: Color of the line (default is 0xFFFFFF (white)).
2322 \end_layout
2324 \begin_layout Subsubsection
2325 gui.circle(number x, number y, number r[, number thick[, number border[,
2326  number fil]]])
2327 \end_layout
2329 \begin_layout Standard
2330 Draw a circle.
2331  Parameters.
2332 \end_layout
2334 \begin_layout Itemize
2335 x: X-coordinate of the center
2336 \end_layout
2338 \begin_layout Itemize
2339 y: Y-coordinate of the center
2340 \end_layout
2342 \begin_layout Itemize
2343 r: The radius of the circle
2344 \end_layout
2346 \begin_layout Itemize
2347 thick: Border thickness
2348 \end_layout
2350 \begin_layout Itemize
2351 border: Border color (default is 0xFFFFFF (white))
2352 \end_layout
2354 \begin_layout Itemize
2355 fill: Fill color (default is -1 (transparent)).
2356 \end_layout
2358 \begin_layout Subsubsection
2359 gui.repaint()
2360 \end_layout
2362 \begin_layout Standard
2363 Request on_repaint() to happen as soon as possible.
2364  Can be used anywhere.
2365 \end_layout
2367 \begin_layout Subsubsection
2368 gui.subframe_update(boolean on)
2369 \end_layout
2371 \begin_layout Standard
2372 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2373  or not happen (on=false).
2374  Can be used anywhere.
2375 \end_layout
2377 \begin_layout Subsubsection
2378 gui.screenshot(string filename)
2379 \end_layout
2381 \begin_layout Standard
2382 Write PNG screenshot of the current frame (no drawings) to specified file.
2383  Can be used anywhere.
2384 \end_layout
2386 \begin_layout Subsubsection
2387 gui.color(number r, number g, number b[, number a])
2388 \end_layout
2390 \begin_layout Standard
2391 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2392  each component in scale 0-255.
2393  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2394  opaque).
2395  The default alpha is 256.
2396 \end_layout
2398 \begin_layout Subsubsection
2399 gui.status(string name, string value)
2400 \end_layout
2402 \begin_layout Standard
2403 Set status field 
2404 \begin_inset Quotes eld
2405 \end_inset
2407 L[<name>]
2408 \begin_inset Quotes erd
2409 \end_inset
2411  to <value> in status area.
2412  Can be used anywhere.
2413 \end_layout
2415 \begin_layout Subsection
2416 table input
2417 \end_layout
2419 \begin_layout Standard
2420 Input handling.
2421  Only available in on_input callback.
2422 \end_layout
2424 \begin_layout Subsubsection
2425 input.get(number controller, number index)
2426 \end_layout
2428 \begin_layout Standard
2429 Read the specified index (0-11) from specified controller (0-7).
2430  Notes:
2431 \end_layout
2433 \begin_layout Itemize
2434 Uses physical controller numbering.
2435  Gamepad in port 2 is controller 4, not 1!
2436 \end_layout
2438 \begin_layout Subsubsection
2439 input.set(number controller, number index, number value)
2440 \end_layout
2442 \begin_layout Standard
2443 Write the specified index (0-11) from specified controller (0-7), storing
2444  value.
2445  Notes:
2446 \end_layout
2448 \begin_layout Itemize
2449 Uses physical controller numbering.
2450  Gamepad in port 2 is controller 4, not 1!
2451 \end_layout
2453 \begin_layout Subsubsection
2454 input.reset([number cycles])
2455 \end_layout
2457 \begin_layout Standard
2458 Execute reset.
2459  If cycles is greater than zero, do delayed reset.
2460  0 (or no value) causes immediate reset.
2461 \end_layout
2463 \begin_layout Itemize
2464 Only available with subframe flag false.
2465 \end_layout
2467 \begin_layout Subsubsection
2468 input.raw()
2469 \end_layout
2471 \begin_layout Standard
2472 Returns table of tables of all available keys and axes.
2473  The first table is indexed by key name (platform-dependent!), and the inner
2474  table has the following fields:
2475 \end_layout
2477 \begin_layout Itemize
2478 last_rawval: Last reported raw value for control.
2479 \end_layout
2481 \begin_layout Itemize
2482 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2483  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2484 \end_layout
2486 \begin_layout Itemize
2487 cal_left: Minimum calibration value.
2488  Only meaningful with axis and pressure types.
2489 \end_layout
2491 \begin_layout Itemize
2492 cal_center: Center calibration value.
2493  Only meaningful with axis and pressure types.
2494 \end_layout
2496 \begin_layout Itemize
2497 cal_right: Maximum calibration value.
2498  Only meaningful with axis and pressure types.
2499 \end_layout
2501 \begin_layout Itemize
2502 cal_tolerance: Dead zone tolerance.
2503  Only meaningful with axis and pressure types.
2504 \end_layout
2506 \begin_layout Subsubsection
2507 input.keyhook(key, state)
2508 \end_layout
2510 \begin_layout Standard
2511 Requests that keyhook events to be sent for key (state=true) or not sent
2512  (state=false).
2513 \end_layout
2515 \begin_layout Subsection
2516 Table hostmemory
2517 \end_layout
2519 \begin_layout Standard
2520 Host memory handling (extra memory saved to savestates).
2521  Host memory starts empty.
2522 \end_layout
2524 \begin_layout Subsubsection
2525 hostmemory.read(number address)
2526 \end_layout
2528 \begin_layout Standard
2529 Reads hostmemory slot address.
2530  Slot numbers out of range return false instead of numeric.
2531 \end_layout
2533 \begin_layout Subsubsection
2534 hostmemory.write(number address, number value)
2535 \end_layout
2537 \begin_layout Standard
2538 Writes hostmemory slot with 0-255.
2539  Slot numbers out of range cause extension of host memory slot space.
2540 \end_layout
2542 \begin_layout Subsubsection
2543 hostmemory.readbyte(number address)
2544 \end_layout
2546 \begin_layout Standard
2547 Read unsigned byte (1 element) from given address.
2548  Slots out of range return false.
2549 \end_layout
2551 \begin_layout Subsubsection
2552 hostmemory.writebyte(number address, number value)
2553 \end_layout
2555 \begin_layout Standard
2556 Write unsigned byte (1 element) to given slot.
2557  Slot numbers out of range cause extension.
2558 \end_layout
2560 \begin_layout Subsubsection
2561 hostmemory.readsbyte(number address)
2562 \end_layout
2564 \begin_layout Standard
2565 Read signed byte (1 element) from given address.
2566  Slots out of range return false.
2567 \end_layout
2569 \begin_layout Subsubsection
2570 hostmemory.writesbyte(number address, number value)
2571 \end_layout
2573 \begin_layout Standard
2574 Write signed byte (1 element) to given slot.
2575  Slot numbers out of range cause extension.
2576 \end_layout
2578 \begin_layout Subsubsection
2579 hostmemory.readword(number address)
2580 \end_layout
2582 \begin_layout Standard
2583 Read unsigned word (2 elements) from given address.
2584  Slots out of range return false.
2585 \end_layout
2587 \begin_layout Subsubsection
2588 hostmemory.writeword(number address, number value)
2589 \end_layout
2591 \begin_layout Standard
2592 Write unsigned word (2 elements) to given slot.
2593  Slot numbers out of range cause extension.
2594 \end_layout
2596 \begin_layout Subsubsection
2597 hostmemory.readsword(number address)
2598 \end_layout
2600 \begin_layout Standard
2601 Read signed word (2 elements) from given address.
2602  Slots out of range return false.
2603 \end_layout
2605 \begin_layout Subsubsection
2606 hostmemory.writesword(number address, number value)
2607 \end_layout
2609 \begin_layout Standard
2610 Write signed word (2 elements) to given slot.
2611  Slot numbers out of range cause extension.
2612 \end_layout
2614 \begin_layout Subsubsection
2615 hostmemory.readdword(number address)
2616 \end_layout
2618 \begin_layout Standard
2619 Read unsigned doubleword (4 elements) from given address.
2620  Slots out of range return false.
2621 \end_layout
2623 \begin_layout Subsubsection
2624 hostmemory.writedword(number address, number value)
2625 \end_layout
2627 \begin_layout Standard
2628 Write unsigned doubleword (4 elements) to given slot.
2629  Slot numbers out of range cause extension.
2630 \end_layout
2632 \begin_layout Subsubsection
2633 hostmemory.readsdword(number address)
2634 \end_layout
2636 \begin_layout Standard
2637 Read signed doubleword (4 elements) from given address.
2638  Slots out of range return false.
2639 \end_layout
2641 \begin_layout Subsubsection
2642 hostmemory.writesdword(number address, number value)
2643 \end_layout
2645 \begin_layout Standard
2646 Write signed doubleword (4 elements) to given slot.
2647  Slot numbers out of range cause extension.
2648 \end_layout
2650 \begin_layout Subsubsection
2651 hostmemory.readqword(number address)
2652 \end_layout
2654 \begin_layout Standard
2655 Read unsigned quadword (8 elements) from given address.
2656  Slots out of range return false.
2657 \end_layout
2659 \begin_layout Subsubsection
2660 hostmemory.writeqword(number address, number value)
2661 \end_layout
2663 \begin_layout Standard
2664 Write unsigned quadword (4 elements) to given slot.
2665  Slot numbers out of range cause extension.
2666 \end_layout
2668 \begin_layout Subsubsection
2669 hostmemory.readsqword(number address)
2670 \end_layout
2672 \begin_layout Standard
2673 Read signed quadword (8 elements) from given address.
2674  Slots out of range return false.
2675 \end_layout
2677 \begin_layout Subsubsection
2678 hostmemory.writesqword(number address, number value)
2679 \end_layout
2681 \begin_layout Standard
2682 Write signed quadword (8 elements) to given slot.
2683  Slot numbers out of range cause extension.
2684 \end_layout
2686 \begin_layout Subsection
2687 Table movie
2688 \end_layout
2690 \begin_layout Standard
2691 Movie handling
2692 \end_layout
2694 \begin_layout Subsubsection
2695 movie.currentframe()
2696 \end_layout
2698 \begin_layout Standard
2699 Return number of current frame.
2700 \end_layout
2702 \begin_layout Subsubsection
2703 movie.framecount()
2704 \end_layout
2706 \begin_layout Standard
2707 Return number of frames in movie.
2708 \end_layout
2710 \begin_layout Subsubsection
2711 movie.readonly()
2712 \end_layout
2714 \begin_layout Standard
2715 Return true if in readonly mode, false if in readwrite.
2716 \end_layout
2718 \begin_layout Subsubsection
2719 movie.set_readwrite()
2720 \end_layout
2722 \begin_layout Standard
2723 Set readwrite mode (does not cause on_readwrite callback).
2724 \end_layout
2726 \begin_layout Subsubsection
2727 movie.frame_subframes(number frame)
2728 \end_layout
2730 \begin_layout Standard
2731 Count number of subframes in specified frame (frame numbers are 1-based)
2732  and return that.
2733 \end_layout
2735 \begin_layout Subsubsection
2736 movie.read_subframe(number frame, number subframe)
2737 \end_layout
2739 \begin_layout Standard
2740 Read specifed subframe in specified frame and return data as array (100
2741  elements, numbered 0-99 currently).
2742 \end_layout
2744 \begin_layout Subsection
2745 Table settings
2746 \end_layout
2748 \begin_layout Standard
2749 Routines for settings manipulation
2750 \end_layout
2752 \begin_layout Subsubsection
2753 settings.get(string name)
2754 \end_layout
2756 \begin_layout Standard
2757 Get value of setting.
2758  If setting is blank, returns false.
2759  If setting value can't be obtained, returns (nil, error message).
2760 \end_layout
2762 \begin_layout Subsubsection
2763 settings.set(string name, string value)
2764 \end_layout
2766 \begin_layout Standard
2767 Set value of setting.
2768  If setting can't be set, returns (nil, error message).
2769 \end_layout
2771 \begin_layout Subsubsection
2772 settings.is_set(string name)
2773 \end_layout
2775 \begin_layout Standard
2776 Returns if setting is set.
2777  If setting does not exist, returns (nil, error message).
2778 \end_layout
2780 \begin_layout Subsubsection
2781 settings.blank(string name)
2782 \end_layout
2784 \begin_layout Standard
2785 Blanks a setting and returns true.
2786  If setting can't be blanked, returns (nil, error message).
2787 \end_layout
2789 \begin_layout Subsection
2790 Table memory
2791 \end_layout
2793 \begin_layout Standard
2794 Contains various functions for managing memory
2795 \end_layout
2797 \begin_layout Subsubsection
2798 memory.vma_count()
2799 \end_layout
2801 \begin_layout Standard
2802 Returns the number of VMAs
2803 \end_layout
2805 \begin_layout Subsubsection
2806 memory.read_vma(number index)
2807 \end_layout
2809 \begin_layout Standard
2810 Reads the specified VMA (indices start from zero).
2811  Trying to read invalid VMA gives nil.
2812  The read VMA is table with the following fields:
2813 \end_layout
2815 \begin_layout Itemize
2816 region_name (string): The readable name of the VMA
2817 \end_layout
2819 \begin_layout Itemize
2820 baseaddr (number): Base address of the VMA
2821 \end_layout
2823 \begin_layout Itemize
2824 lastaddr (number): Last address in the VMA.
2825 \end_layout
2827 \begin_layout Itemize
2828 size (number): The size of VMA in bytes.
2829 \end_layout
2831 \begin_layout Itemize
2832 readonly (boolean): True of the VMA corresponds to ROM.
2833 \end_layout
2835 \begin_layout Itemize
2836 native_endian (boolean): True if the VMA has native endian as opposed to
2837  little endian.
2838 \end_layout
2840 \begin_layout Subsubsection
2841 memory.find_vma(number address)
2842 \end_layout
2844 \begin_layout Standard
2845 Finds the VMA containing specified address.
2846  Returns table in the same format as read_vma or nil if not found.
2847 \end_layout
2849 \begin_layout Subsubsection
2850 memory.readbyte(number address)
2851 \end_layout
2853 \begin_layout Standard
2854 Reads the specified address as unsigned byte and returns the result.
2855 \end_layout
2857 \begin_layout Subsubsection
2858 memory.readsbyte(number address)
2859 \end_layout
2861 \begin_layout Standard
2862 Reads the specified address as signed byte and returns the result.
2863 \end_layout
2865 \begin_layout Subsubsection
2866 memory.writebyte(number address, number value)
2867 \end_layout
2869 \begin_layout Standard
2870 Writes the specified value (negative values undergo 2's complement) to specified
2871  address (as a byte).
2872 \end_layout
2874 \begin_layout Subsubsection
2875 memory.readword(number address)
2876 \end_layout
2878 \begin_layout Standard
2879 Reads the specified address as unsigned word and returns the result.
2880 \end_layout
2882 \begin_layout Subsubsection
2883 memory.readsword(number address)
2884 \end_layout
2886 \begin_layout Standard
2887 Reads the specified address as signed word and returns the result.
2888 \end_layout
2890 \begin_layout Subsubsection
2891 memory.writeword(number address, number value)
2892 \end_layout
2894 \begin_layout Standard
2895 Writes the specified value (negative values undergo 2's complement) to specified
2896  address (as a word).
2897 \end_layout
2899 \begin_layout Subsubsection
2900 memory.readdword(number address)
2901 \end_layout
2903 \begin_layout Standard
2904 Reads the specified address as unsigned doubleword and returns the result.
2905 \end_layout
2907 \begin_layout Subsubsection
2908 memory.readsdword(number address)
2909 \end_layout
2911 \begin_layout Standard
2912 Reads the specified address as signed doubleword and returns the result.
2913 \end_layout
2915 \begin_layout Subsubsection
2916 memory.writedword(number address, number value)
2917 \end_layout
2919 \begin_layout Standard
2920 Writes the specified value (negative values undergo 2's complement) to specified
2921  address (as a doubleword).
2922 \end_layout
2924 \begin_layout Subsubsection
2925 memory.readqword(number address)
2926 \end_layout
2928 \begin_layout Standard
2929 Reads the specified address as unsigned quadword and returns the result.
2930 \end_layout
2932 \begin_layout Subsubsection
2933 memory.readsqword(number address)
2934 \end_layout
2936 \begin_layout Standard
2937 Reads the specified address as signed quadword and returns the result.
2938 \end_layout
2940 \begin_layout Subsubsection
2941 memory.writeqword(number address, number value)
2942 \end_layout
2944 \begin_layout Standard
2945 Writes the specified value (negative values undergo 2's complement) to specified
2946  address (as a quadword).
2947 \end_layout
2949 \begin_layout Subsection
2950 Table _SYSTEM
2951 \end_layout
2953 \begin_layout Standard
2954 Contains copy of global variables from time of Lua initialization.
2955  Non-writeable.
2956 \end_layout
2958 \begin_layout Subsection
2959 Callbacks
2960 \end_layout
2962 \begin_layout Standard
2963 Various callbacks to Lua that can occur.
2964 \end_layout
2966 \begin_layout Subsubsection
2967 Callback: on_paint()
2968 \end_layout
2970 \begin_layout Standard
2971 Called when screen is being painted.
2972  Any gui.* calls requiring graphic context draw on the screen.
2973 \end_layout
2975 \begin_layout Subsubsection
2976 Callback: on_video()
2977 \end_layout
2979 \begin_layout Standard
2980 Called when video dump frame is being painted.
2981  Any gui.* calls requiring graphic context draw on the video.
2982 \end_layout
2984 \begin_layout Subsubsection
2985 Callback: on_frame()
2986 \end_layout
2988 \begin_layout Standard
2989 Called on each starting whole frame.
2990 \end_layout
2992 \begin_layout Subsubsection
2993 Callback: on_startup()
2994 \end_layout
2996 \begin_layout Standard
2997 Called when the emulator is starting (lsnes.rc and --run files has been run).
2998 \end_layout
3000 \begin_layout Subsubsection
3001 Callback: on_pre_load(string name)
3002 \end_layout
3004 \begin_layout Standard
3005 Called just before savestate/movie load occurs (note: loads are always delayed,
3006  so this occurs even when load was initiated by lua).
3007 \end_layout
3009 \begin_layout Subsubsection
3010 Callback: on_err_load(string name)
3011 \end_layout
3013 \begin_layout Standard
3014 Called if loadstate goes wrong.
3015 \end_layout
3017 \begin_layout Subsubsection
3018 Callback: on_post_load(string name, boolean was_savestate)
3019 \end_layout
3021 \begin_layout Standard
3022 Called on successful loadstate.
3023  was_savestate gives if this was a savestate or a movie.
3024 \end_layout
3026 \begin_layout Subsubsection
3027 Callback: on_pre_save(string name, boolean is_savestate)
3028 \end_layout
3030 \begin_layout Standard
3031 Called just before savestate save occurs (note: movie saves are synchronous
3032  and won't trigger these callbacks if called from Lua).
3033 \end_layout
3035 \begin_layout Subsubsection
3036 Callback: on_err_save(string name)
3037 \end_layout
3039 \begin_layout Standard
3040 Called if savestate goes wrong.
3041 \end_layout
3043 \begin_layout Subsubsection
3044 Callback: on_post_save(string name, boolean is_savestate)
3045 \end_layout
3047 \begin_layout Standard
3048 Called on successful savaestate.
3049  is_savestate gives if this was a savestate or a movie.
3050 \end_layout
3052 \begin_layout Subsubsection
3053 Callback: on_quit()
3054 \end_layout
3056 \begin_layout Standard
3057 Called when emulator is shutting down.
3058 \end_layout
3060 \begin_layout Subsubsection
3061 Callback: on_input(boolean subframe)
3062 \end_layout
3064 \begin_layout Standard
3065 Called when emulator is just sending input to bsnes core.
3066  Warning: This is called even in readonly mode, but the results are ignored.
3067 \end_layout
3069 \begin_layout Subsubsection
3070 Callback: on_reset()
3071 \end_layout
3073 \begin_layout Standard
3074 Called when SNES is reset.
3075 \end_layout
3077 \begin_layout Subsubsection
3078 Callback: on_readwrite()
3079 \end_layout
3081 \begin_layout Standard
3082 Called when moving into readwrite mode as result of 
3083 \begin_inset Quotes eld
3084 \end_inset
3086 set-rwmode
3087 \begin_inset Quotes erd
3088 \end_inset
3090  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3091  entry protection).
3092 \end_layout
3094 \begin_layout Subsubsection
3095 Callback: on_snoop(number port, number controller, number index, number
3096  value)
3097 \end_layout
3099 \begin_layout Standard
3100 Called each time bsnes asks for input.
3101  The value is the final value to be sent to bsnes core (readonly mode, autohold
3102  and autofire have been taken into account).
3103  Might be useful when translating movies to format suitable for console
3104  verification.
3105  Note: There is no way to modify the value to be sent.
3106 \end_layout
3108 \begin_layout Subsubsection
3109 Callback: on_keyhook(string keyname, table state)
3110 \end_layout
3112 \begin_layout Standard
3113 Sent when key that has keyhook events requested changes state.
3114  Keyname is name of the key (group) and state is the state (same kind as
3115  table values in input.raw).
3116 \end_layout
3118 \begin_layout Section
3119 Memory watch expression syntax
3120 \end_layout
3122 \begin_layout Standard
3123 Memory watch expressions are in RPN (Reverse Polish Notation).
3124  At the end of expression, the top entry on stack is taken as the final
3125  result.
3126 \end_layout
3128 \begin_layout Standard
3129 Notations:
3130 \end_layout
3132 \begin_layout Itemize
3133 Evaluation order is strictly left to right.
3134 \end_layout
3136 \begin_layout Itemize
3137 a is the entry on top of stack
3138 \end_layout
3140 \begin_layout Itemize
3141 b is the entry immediately below top of stack
3142 \end_layout
3144 \begin_layout Itemize
3145 ; separates values to be pushed (no intermediate pop).
3146 \end_layout
3148 \begin_layout Itemize
3149 After end of element, all used stack slots are popped and all results are
3150  pushed.
3151 \end_layout
3153 \begin_layout Itemize
3154 When pushing multiple values, the pushes occur in order shown.
3155 \end_layout
3157 \begin_layout Standard
3158 The following operators are available:
3159 \end_layout
3161 \begin_layout Itemize
3162 + : a + b
3163 \end_layout
3165 \begin_layout Itemize
3166 - : a - b
3167 \end_layout
3169 \begin_layout Itemize
3170 * : a * b
3171 \end_layout
3173 \begin_layout Itemize
3174 / : a / b
3175 \end_layout
3177 \begin_layout Itemize
3178 % : a % b
3179 \end_layout
3181 \begin_layout Itemize
3182 a : atan(a)
3183 \end_layout
3185 \begin_layout Itemize
3186 b : read_signed_byte(a)
3187 \end_layout
3189 \begin_layout Itemize
3190 c : cos(a)
3191 \end_layout
3193 \begin_layout Itemize
3194 d : read_signed_dword(a)
3195 \end_layout
3197 \begin_layout Itemize
3198 i : quotent(a / b)
3199 \end_layout
3201 \begin_layout Itemize
3202 p :
3203 \begin_inset Formula $\pi$
3204 \end_inset
3207 \end_layout
3209 \begin_layout Itemize
3210 q : read_signed_qword(a)
3211 \end_layout
3213 \begin_layout Itemize
3214 r : sqrt(a)
3215 \end_layout
3217 \begin_layout Itemize
3218 s : sin(a)
3219 \end_layout
3221 \begin_layout Itemize
3222 t : tan(a)
3223 \end_layout
3225 \begin_layout Itemize
3226 u : a; a
3227 \end_layout
3229 \begin_layout Itemize
3230 w : read_signed_word(a)
3231 \end_layout
3233 \begin_layout Itemize
3234 A : atan2(a, b)
3235 \end_layout
3237 \begin_layout Itemize
3238 B : read_unsigned_byte(a)
3239 \end_layout
3241 \begin_layout Itemize
3242 C<number>z : Push number <number> to stack.
3243 \end_layout
3245 \begin_layout Itemize
3246 D : read_unsigned_dword(a)
3247 \end_layout
3249 \begin_layout Itemize
3250 C0x<number>z : Push number <number> (hexadecimal) to stack.
3251 \end_layout
3253 \begin_layout Itemize
3254 Q : read_unsigned_qword(a)
3255 \end_layout
3257 \begin_layout Itemize
3258 R<digit> : round a to <digit> digits.
3259 \end_layout
3261 \begin_layout Itemize
3262 W : read_unsigned_word(a)
3263 \end_layout
3265 \begin_layout Subsection
3266 Example:
3267 \end_layout
3269 \begin_layout Standard
3270 C0x007e0878zWC0x007e002czW-
3271 \end_layout
3273 \begin_layout Enumerate
3274 Push value 0x7e0878 on top of stack (C0x007e0878z).
3275 \end_layout
3277 \begin_layout Enumerate
3278 Pop the value on top of stack (0x7e0878), read word value at that address
3279  and push the result,call it x1 (W).
3280 \end_layout
3282 \begin_layout Enumerate
3283 Push value 0x7e002c on top of stack (C0x007e002cz).
3284 \end_layout
3286 \begin_layout Enumerate
3287 Pop the value on top of stack (0x7e002c), read word value at that address
3288  and push the result,call it x2 (W).
3289 \end_layout
3291 \begin_layout Enumerate
3292 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3293  x2 - x1 (-).
3294 \end_layout
3296 \begin_layout Enumerate
3297 Since the expression ends, the final memory watch result is the top one
3298  on stack, which is x2 - x1.
3299 \end_layout
3301 \begin_layout Section
3302 Modifier and key names:
3303 \end_layout
3305 \begin_layout Subsection
3306 SDL Platform
3307 \end_layout
3309 \begin_layout Subsubsection
3310 Modifier names
3311 \end_layout
3313 \begin_layout Standard
3314 Following modifier names are known:
3315 \end_layout
3317 \begin_layout Itemize
3318 ctrl, lctrl, rctrl: Control keys
3319 \end_layout
3321 \begin_layout Itemize
3322 alt, lalt, ralt: ALT keys.
3323 \end_layout
3325 \begin_layout Itemize
3326 shift, lshift, rshift: Shift keys.
3327 \end_layout
3329 \begin_layout Itemize
3330 meta, lmeta, rmeta: Meta keys.
3331 \end_layout
3333 \begin_layout Itemize
3334 num, caps: Numlock/Capslock (these are sticky!)
3335 \end_layout
3337 \begin_layout Itemize
3338 mode: Mode select.
3339 \end_layout
3341 \begin_layout Subsubsection
3342 Key names
3343 \end_layout
3345 \begin_layout Standard
3346 Following key names are known:
3347 \end_layout
3349 \begin_layout Itemize
3350 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3351  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3352  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3353  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3354  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3355  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3356  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3357  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3358  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3359  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3360  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3361  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3362  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3363  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3364  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3365  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3366  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3367  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3368  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3369  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3370  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3371  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3372  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3373  break, menu, power, euro, undo
3374 \end_layout
3376 \begin_layout Itemize
3377 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3378  hardware-dependent scan code of <n> (useful to bind those keys that don't
3379  have symbolic names).
3380 \end_layout
3382 \begin_layout Subsubsection
3383 Joystick pseudo-keys:
3384 \end_layout
3386 \begin_layout Itemize
3387 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3388 \end_layout
3390 \begin_layout Itemize
3391 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3392 \end_layout
3394 \begin_layout Itemize
3395 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3396 \end_layout
3398 \begin_layout Itemize
3399 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3400 \end_layout
3402 \begin_layout Itemize
3403 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3404 \end_layout
3406 \begin_layout Itemize
3407 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3408  position (axis modes axis and axis_inverse).
3409 \end_layout
3411 \begin_layout Itemize
3412 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3413  position (axis modes axis and axis_inverse).
3414 \end_layout
3416 \begin_layout Itemize
3417 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3418  modes pressure_*).
3419 \end_layout
3421 \begin_layout Subsubsection
3422 Special buttons:
3423 \end_layout
3425 \begin_layout Itemize
3426 Escape: Enter/Exit Command mode, cancel modal dialogs.
3427 \end_layout
3429 \begin_layout Itemize
3430 Return (also KPEnter): Execute command, ok modal dialog.
3431 \end_layout
3433 \begin_layout Itemize
3434 Pgup/Up (also KP8/9 if no num lock; command mode): Previous command in command
3435  history
3436 \end_layout
3438 \begin_layout Itemize
3439 Pgdn/Down(also KP2/3 if no num lock; command mode): Next command in command
3440  history
3441 \end_layout
3443 \begin_layout Itemize
3444 Home (also KP7 if no num lock; command mode): Beginning of command.
3445 \end_layout
3447 \begin_layout Itemize
3448 End (also KP1 if no num lock; command mode): End of command.
3449 \end_layout
3451 \begin_layout Itemize
3452 Left (also KP4 if no num lock; command mode): Move cursor left.
3453 \end_layout
3455 \begin_layout Itemize
3456 Right (also KP6 if no num lock; command mode): Move cursor right.
3457 \end_layout
3459 \begin_layout Itemize
3460 Delete (also KP.
3461  if no num lock; command mode): Delete character to right of cursor.
3462 \end_layout
3464 \begin_layout Itemize
3465 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3466  overwrite modes.
3467 \end_layout
3469 \begin_layout Itemize
3470 Backspace (command mode): Delete character to left of cursor.
3471 \end_layout
3473 \begin_layout Itemize
3474 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3475 \end_layout
3477 \begin_layout Subsection
3478 wxWidgets platform
3479 \end_layout
3481 \begin_layout Subsubsection
3482 Modifier names:
3483 \end_layout
3485 \begin_layout Standard
3486 Following modifier names are known:
3487 \end_layout
3489 \begin_layout Itemize
3491 \end_layout
3493 \begin_layout Itemize
3494 ctrl
3495 \end_layout
3497 \begin_layout Itemize
3498 shift 
3499 \end_layout
3501 \begin_layout Itemize
3502 meta
3503 \end_layout
3505 \begin_layout Itemize
3506 cmd (Mac OS X only)
3507 \end_layout
3509 \begin_layout Subsubsection
3510 Key names:
3511 \end_layout
3513 \begin_layout Standard
3514 Following key names are known:
3515 \end_layout
3517 \begin_layout Itemize
3518 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3519  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3520  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3521  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3522  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3523  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3524  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3525  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3526  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3527  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3528  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3529  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3530  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3531  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3532  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3533  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3534  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3535  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3536  windows_right, windows_menu, command, special1, special2, special3, special4,
3537  special5, special6, special7, special8, special9, special10, special11,
3538  special12, special13, special14, special15, special16, special17, special18,
3539  special19, special20
3540 \end_layout
3542 \begin_layout Section
3543 Movie file format
3544 \end_layout
3546 \begin_layout Standard
3547 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3548  (note: If you recompress it, do not use compression methods other than
3549  store and deflate and especially do not use encryption of any kind).
3550 \end_layout
3552 \begin_layout Subsection
3553 Detecting clean start/SRAM/Savestate
3554 \end_layout
3556 \begin_layout Itemize
3557 If file has member 
3558 \begin_inset Quotes eld
3559 \end_inset
3561 savestate
3562 \begin_inset Quotes erd
3563 \end_inset
3565  it is savestate, otherwise:
3566 \end_layout
3568 \begin_layout Itemize
3569 If file has members with names starting 
3570 \begin_inset Quotes eld
3571 \end_inset
3573 moviesram.
3574 \begin_inset Quotes erd
3575 \end_inset
3577  it is movie starting from SRAM, otherwise:
3578 \end_layout
3580 \begin_layout Itemize
3581 It is movie starting from clear state.
3582 \end_layout
3584 \begin_layout Subsection
3585 Member: gametype
3586 \end_layout
3588 \begin_layout Standard
3589 Type of game ROM and region (as one line).
3590  Valid values are:
3591 \end_layout
3593 \begin_layout Standard
3594 \begin_inset Tabular
3595 <lyxtabular version="3" rows="8" columns="3">
3596 <features tabularvalignment="middle">
3597 <column alignment="center" valignment="top" width="0">
3598 <column alignment="center" valignment="top" width="0">
3599 <column alignment="center" valignment="top" width="0">
3600 <row>
3601 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3602 \begin_inset Text
3604 \begin_layout Plain Layout
3605 Value
3606 \end_layout
3608 \end_inset
3609 </cell>
3610 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3611 \begin_inset Text
3613 \begin_layout Plain Layout
3614 System
3615 \end_layout
3617 \end_inset
3618 </cell>
3619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3620 \begin_inset Text
3622 \begin_layout Plain Layout
3623 Region
3624 \end_layout
3626 \end_inset
3627 </cell>
3628 </row>
3629 <row>
3630 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3631 \begin_inset Text
3633 \begin_layout Plain Layout
3634 snes_pal
3635 \end_layout
3637 \end_inset
3638 </cell>
3639 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3640 \begin_inset Text
3642 \begin_layout Plain Layout
3643 Super NES
3644 \end_layout
3646 \end_inset
3647 </cell>
3648 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3649 \begin_inset Text
3651 \begin_layout Plain Layout
3653 \end_layout
3655 \end_inset
3656 </cell>
3657 </row>
3658 <row>
3659 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3660 \begin_inset Text
3662 \begin_layout Plain Layout
3663 sgb_pal
3664 \end_layout
3666 \end_inset
3667 </cell>
3668 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3669 \begin_inset Text
3671 \begin_layout Plain Layout
3672 Super Game Boy
3673 \end_layout
3675 \end_inset
3676 </cell>
3677 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3678 \begin_inset Text
3680 \begin_layout Plain Layout
3682 \end_layout
3684 \end_inset
3685 </cell>
3686 </row>
3687 <row>
3688 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3689 \begin_inset Text
3691 \begin_layout Plain Layout
3692 snes_ntsc
3693 \end_layout
3695 \end_inset
3696 </cell>
3697 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3698 \begin_inset Text
3700 \begin_layout Plain Layout
3701 Super NES
3702 \end_layout
3704 \end_inset
3705 </cell>
3706 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3707 \begin_inset Text
3709 \begin_layout Plain Layout
3710 NTSC
3711 \end_layout
3713 \end_inset
3714 </cell>
3715 </row>
3716 <row>
3717 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3718 \begin_inset Text
3720 \begin_layout Plain Layout
3721 sgb_ntsc
3722 \end_layout
3724 \end_inset
3725 </cell>
3726 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3727 \begin_inset Text
3729 \begin_layout Plain Layout
3730 Super Game Boy
3731 \end_layout
3733 \end_inset
3734 </cell>
3735 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3736 \begin_inset Text
3738 \begin_layout Plain Layout
3739 NTSC
3740 \end_layout
3742 \end_inset
3743 </cell>
3744 </row>
3745 <row>
3746 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3747 \begin_inset Text
3749 \begin_layout Plain Layout
3751 \end_layout
3753 \end_inset
3754 </cell>
3755 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3756 \begin_inset Text
3758 \begin_layout Plain Layout
3759 BS-X (non-slotted)
3760 \end_layout
3762 \end_inset
3763 </cell>
3764 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3765 \begin_inset Text
3767 \begin_layout Plain Layout
3768 NTSC
3769 \end_layout
3771 \end_inset
3772 </cell>
3773 </row>
3774 <row>
3775 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3776 \begin_inset Text
3778 \begin_layout Plain Layout
3779 bsxslotted
3780 \end_layout
3782 \end_inset
3783 </cell>
3784 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3785 \begin_inset Text
3787 \begin_layout Plain Layout
3788 BS-X (slotted)
3789 \end_layout
3791 \end_inset
3792 </cell>
3793 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3794 \begin_inset Text
3796 \begin_layout Plain Layout
3797 NTSC
3798 \end_layout
3800 \end_inset
3801 </cell>
3802 </row>
3803 <row>
3804 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3805 \begin_inset Text
3807 \begin_layout Plain Layout
3808 sufamiturbo
3809 \end_layout
3811 \end_inset
3812 </cell>
3813 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3814 \begin_inset Text
3816 \begin_layout Plain Layout
3817 Sufami Turbo
3818 \end_layout
3820 \end_inset
3821 </cell>
3822 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3823 \begin_inset Text
3825 \begin_layout Plain Layout
3826 NTSC
3827 \end_layout
3829 \end_inset
3830 </cell>
3831 </row>
3832 </lyxtabular>
3834 \end_inset
3837 \end_layout
3839 \begin_layout Standard
3840 Frame rates are:
3841 \end_layout
3843 \begin_layout Standard
3844 \begin_inset Tabular
3845 <lyxtabular version="3" rows="3" columns="2">
3846 <features tabularvalignment="middle">
3847 <column alignment="center" valignment="top" width="0">
3848 <column alignment="center" valignment="top" width="0">
3849 <row>
3850 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3851 \begin_inset Text
3853 \begin_layout Plain Layout
3854 Region
3855 \end_layout
3857 \end_inset
3858 </cell>
3859 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3860 \begin_inset Text
3862 \begin_layout Plain Layout
3863 Framerate (fps)
3864 \end_layout
3866 \end_inset
3867 </cell>
3868 </row>
3869 <row>
3870 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3871 \begin_inset Text
3873 \begin_layout Plain Layout
3875 \end_layout
3877 \end_inset
3878 </cell>
3879 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3880 \begin_inset Text
3882 \begin_layout Plain Layout
3883 322445/6448
3884 \end_layout
3886 \end_inset
3887 </cell>
3888 </row>
3889 <row>
3890 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3891 \begin_inset Text
3893 \begin_layout Plain Layout
3894 NTSC
3895 \end_layout
3897 \end_inset
3898 </cell>
3899 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3900 \begin_inset Text
3902 \begin_layout Plain Layout
3903 10738636/178683
3904 \end_layout
3906 \end_inset
3907 </cell>
3908 </row>
3909 </lyxtabular>
3911 \end_inset
3914 \end_layout
3916 \begin_layout Subsection
3917 Member: port1
3918 \end_layout
3920 \begin_layout Standard
3921 Contains type of port #1 (as one line).
3922  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
3923  If not present, defaults to 'gamepad'.
3924 \end_layout
3926 \begin_layout Subsection
3927 Member: port2
3928 \end_layout
3930 \begin_layout Standard
3931 Contains type of port #2 (as one line).
3932  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
3933  'justifier' and 'justifiers'.
3934  If not present, defaults to 'none'.
3935 \end_layout
3937 \begin_layout Subsection
3938 Member: gamename
3939 \end_layout
3941 \begin_layout Standard
3942 Contains name of the game (as one line).
3943 \end_layout
3945 \begin_layout Subsection
3946 Member: authors
3947 \end_layout
3949 \begin_layout Standard
3950 Contains authors, one per line.
3951  Part before '|' is the full name, part after is the nickname.
3952 \end_layout
3954 \begin_layout Subsection
3955 Member: systemid
3956 \end_layout
3958 \begin_layout Standard
3959 Always 
3960 \begin_inset Quotes eld
3961 \end_inset
3963 lsnes-rr1
3964 \begin_inset Quotes erd
3965 \end_inset
3967  (one line).
3968  Used to reject other saves.
3969 \end_layout
3971 \begin_layout Subsection
3972 Member: controlsversion
3973 \end_layout
3975 \begin_layout Standard
3976 Always 
3977 \begin_inset Quotes eld
3978 \end_inset
3981 \begin_inset Quotes erd
3982 \end_inset
3984  (one line).
3985  Used to identify what controls are there.
3986 \end_layout
3988 \begin_layout Subsection
3989 Member: 
3990 \begin_inset Quotes eld
3991 \end_inset
3993 coreversion
3994 \begin_inset Quotes erd
3995 \end_inset
3998 \end_layout
4000 \begin_layout Standard
4001 Contains bsnes core version number (as one line).
4002 \end_layout
4004 \begin_layout Subsection
4005 Member: projectid
4006 \end_layout
4008 \begin_layout Standard
4009 Contains project ID (as one line).
4010  Used to identify if two movies are part of the same project.
4011 \end_layout
4013 \begin_layout Subsection
4014 Member: {rom,slota,slotb}{,xml}.sha256
4015 \end_layout
4017 \begin_layout Standard
4018 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4019  Absent if corresponding file is absent.
4020 \end_layout
4022 \begin_layout Subsection
4023 Member: moviesram.<name>
4024 \end_layout
4026 \begin_layout Standard
4027 Raw binary startup SRAM of kind <name>.
4028  Only present in savestates and movies starting from SRAM.
4029 \end_layout
4031 \begin_layout Subsection
4032 Member: saveframe
4033 \end_layout
4035 \begin_layout Standard
4036 Contains frame number (as one line) of frame movie was saved on.
4037  Only present in savestates.
4038 \end_layout
4040 \begin_layout Subsection
4041 Member: lagcounter
4042 \end_layout
4044 \begin_layout Standard
4045 Current value of lag counter (as one line).
4046  Only present in savestates.
4047 \end_layout
4049 \begin_layout Subsection
4050 Member: pollcounters
4051 \end_layout
4053 \begin_layout Standard
4054 Contains poll counters (currently 100 of them), one per line.
4055  Each line is raw poll count if DRDY is set for it.
4056  Otherwise it is negative poll count minus one.
4057  Only present in savestates.
4058 \end_layout
4060 \begin_layout Subsection
4061 Member: hostmemory
4062 \end_layout
4064 \begin_layout Standard
4065 Raw binary dump of host memory.
4066  Only present in savestates.
4067 \end_layout
4069 \begin_layout Subsection
4070 Member: savestate
4071 \end_layout
4073 \begin_layout Standard
4074 The raw binary savestate itself.
4075  Savestate detection uses this file, only present in savestates.
4076 \end_layout
4078 \begin_layout Subsection
4079 Member: screenshot
4080 \end_layout
4082 \begin_layout Standard
4083 Screenshot of current frame.
4084  Only present in savestates.
4085  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4086  data.
4087  Height of image is inferred from the width and size of data.
4088 \end_layout
4090 \begin_layout Subsection
4091 Member: sram.<name>
4092 \end_layout
4094 \begin_layout Standard
4095 Raw binary SRAM of kind <name> at time of savestate.
4096  Only present in savestates.
4097 \end_layout
4099 \begin_layout Subsection
4100 Member: input
4101 \end_layout
4103 \begin_layout Standard
4104 The actual input track, one line per subframe (blank lines are skipped).
4105 \end_layout
4107 \begin_layout Itemize
4108 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4109  part of same frame as previous, otherwise it starts a new frame.
4110 \end_layout
4112 \begin_layout Itemize
4113 First subframe must start a new frame.
4114 \end_layout
4116 \begin_layout Standard
4117 Length of movie in frames is number of lines in input file that start a
4118  new frame.
4119 \end_layout
4121 \begin_layout Subsection
4122 Member: rerecords
4123 \end_layout
4125 \begin_layout Standard
4126 Contains textual base-10 rerecord count (as one line; emulator just writes
4127  this, it doesn't read it) + 1.
4128 \end_layout
4130 \begin_layout Subsection
4131 Member: rrdata
4132 \end_layout
4134 \begin_layout Standard
4135 This member stores set of load IDs.
4136  There is one load ID per rerecord (plus one corresponding to start of project).
4137 \end_layout
4139 \begin_layout Itemize
4140 This member constists of concatenation of records
4141 \end_layout
4143 \begin_layout Itemize
4144 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4145  IDs.
4146 \end_layout
4148 \begin_layout Itemize
4149 IDs are interpretted as 256-bit big-endian integers with warparound.
4150 \end_layout
4152 \begin_layout Itemize
4153 Initial predicted ID is all zeroes.
4154 \end_layout
4156 \begin_layout Standard
4157 Format of each record is:
4158 \end_layout
4160 \begin_layout Itemize
4161 1 byte: Opcode byte.
4162  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4163  Bit 7 is unused.
4164 \end_layout
4166 \begin_layout Itemize
4167 32-prefixlen bytes of ID.
4168 \end_layout
4170 \begin_layout Itemize
4171 countlen bytes of big-endian count (count).
4172 \end_layout
4174 \begin_layout Standard
4175 Records are processed as follows:
4176 \end_layout
4178 \begin_layout Itemize
4179 To form the first ID encoded by record, take the first prefixlen bytes predicted
4180  ID and append the read ID value to it.
4181  The result is the first ID encoded.
4182 \end_layout
4184 \begin_layout Itemize
4185 If countlen is 0, record encodes 1 ID.
4186 \end_layout
4188 \begin_layout Itemize
4189 If countlen is 1, record encodes 2+count IDs.
4190 \end_layout
4192 \begin_layout Itemize
4193 If countlen is 2, record encodes 258+count IDs.
4194 \end_layout
4196 \begin_layout Itemize
4197 If countlen is 3, record encodes 65794+count IDs.
4198 \end_layout
4200 \begin_layout Itemize
4201 The new predicted ID is the next ID after last one encoded by the record.
4202 \end_layout
4204 \begin_layout Standard
4205 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4206  by all records.
4207 \end_layout
4209 \begin_layout Subsection
4210 Member: starttime.second
4211 \end_layout
4213 \begin_layout Standard
4214 Movie starting time, second part.
4215  Epoch is Unix epoch.
4216  Default is 1,000,000,000.
4217 \end_layout
4219 \begin_layout Subsection
4220 Member: starttime.subsecond
4221 \end_layout
4223 \begin_layout Standard
4224 Movie starting time, subsecond part.
4225  Unit is CPU clocks.
4226  Default is 0.
4227 \end_layout
4229 \begin_layout Subsection
4230 Member: savetime.second
4231 \end_layout
4233 \begin_layout Standard
4234 Movie saving time, second part.
4235  Default is starttime.second.
4236  Only present in savestates.
4237 \end_layout
4239 \begin_layout Subsection
4240 Member: savetime.subsecond
4241 \end_layout
4243 \begin_layout Standard
4244 Movie saving time, subsecond part.
4245  Default is starttime.subsecond.
4246  Only present in savestates.
4247 \end_layout
4249 \begin_layout Section
4250 Quick'n'dirty encode guide
4251 \end_layout
4253 \begin_layout Enumerate
4254 Start the emulator and load the movie file.
4255 \end_layout
4257 \begin_layout Enumerate
4258 Set large AVI option 'set-setting avi-large on'
4259 \end_layout
4261 \begin_layout Enumerate
4262 Enable dumping 'dump-avi tmpdump' 
4263 \end_layout
4265 \begin_layout Enumerate
4266 Unpause and let it run until you want to end dumping.
4267 \end_layout
4269 \begin_layout Enumerate
4270 Close the emulator (closing the window is the easiest way).
4271  Or use 'end-avi'.
4272 \end_layout
4274 \begin_layout Enumerate
4275 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4276  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4277 \end_layout
4279 \begin_layout Enumerate
4280 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4281 \end_layout
4283 \begin_layout Enumerate
4284 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4285  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4286 \end_layout
4288 \begin_layout Enumerate
4289 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4290  Now final.mkv contains quick'n'dirty encode.
4291 \end_layout
4293 \begin_layout Section
4294 Axis configurations for some gamepad types:
4295 \end_layout
4297 \begin_layout Subsection
4298 XBox360 controller:
4299 \end_layout
4301 \begin_layout Standard
4302 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4303 \end_layout
4305 \begin_layout LyX-Code
4306 set-axis joystick0axis2 pressure-+
4307 \end_layout
4309 \begin_layout LyX-Code
4310 set-axis joystick0axis5 pressure-+
4311 \end_layout
4313 \begin_layout Itemize
4314 This is needed for SDL only.
4315  EVDEV sets those types correctly.
4316 \end_layout
4318 \begin_layout Subsection
4319 PS3 
4320 \begin_inset Quotes eld
4321 \end_inset
4323 sixaxis
4324 \begin_inset Quotes erd
4325 \end_inset
4327  controller:
4328 \end_layout
4330 \begin_layout Standard
4331 Axes 8-19 should be disabled.
4332 \end_layout
4334 \begin_layout LyX-Code
4335 set-axis joystick0axis8 disabled
4336 \end_layout
4338 \begin_layout LyX-Code
4339 set-axis joystick0axis9 disabled
4340 \end_layout
4342 \begin_layout LyX-Code
4343 set-axis joystick0axis10 disabled
4344 \end_layout
4346 \begin_layout LyX-Code
4347 set-axis joystick0axis11 disabled
4348 \end_layout
4350 \begin_layout LyX-Code
4351 set-axis joystick0axis12 disabled
4352 \end_layout
4354 \begin_layout LyX-Code
4355 set-axis joystick0axis13 disabled
4356 \end_layout
4358 \begin_layout LyX-Code
4359 set-axis joystick0axis14 disabled
4360 \end_layout
4362 \begin_layout LyX-Code
4363 set-axis joystick0axis15 disabled
4364 \end_layout
4366 \begin_layout LyX-Code
4367 set-axis joystick0axis16 disabled
4368 \end_layout
4370 \begin_layout LyX-Code
4371 set-axis joystick0axis17 disabled
4372 \end_layout
4374 \begin_layout LyX-Code
4375 set-axis joystick0axis18 disabled
4376 \end_layout
4378 \begin_layout LyX-Code
4379 set-axis joystick0axis19 disabled
4380 \end_layout
4382 \begin_layout Section
4383 Errata:
4384 \end_layout
4386 \begin_layout Subsection
4387 Problems from BSNES core:
4388 \end_layout
4390 \begin_layout Itemize
4391 The whole pending save stuff.
4392 \end_layout
4394 \begin_layout Itemize
4395 Lack of layer hiding.
4396 \end_layout
4398 \begin_layout Itemize
4399 It is slow (especially accuracy).
4400 \end_layout
4402 \begin_layout Itemize
4403 Firmwares can't be loaded from ZIP archives.
4404 \end_layout
4406 \begin_layout Subsection
4407 Other problems:
4408 \end_layout
4410 \begin_layout Itemize
4411 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4412 \end_layout
4414 \begin_layout Itemize
4415 Audio for last dumped frame is not itself dumped.
4416 \end_layout
4418 \begin_layout Itemize
4419 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4420 \end_layout
4422 \begin_layout Itemize
4423 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4424 \end_layout
4426 \begin_layout Itemize
4427 No menus, command based interface (SDL).
4428 \end_layout
4430 \begin_layout Itemize
4431 Long commands don't scroll.
4432 \end_layout
4434 \begin_layout Itemize
4435 Wxwidgets UI is still buggy.
4436 \end_layout
4438 \begin_layout Section
4439 Changelog:
4440 \end_layout
4442 \begin_layout Subsection
4443 rr0-beta1
4444 \end_layout
4446 \begin_layout Itemize
4447 Fix -Wall warnings
4448 \end_layout
4450 \begin_layout Itemize
4451 Fix dumper video corruption with levels 10-18.
4452 \end_layout
4454 \begin_layout Subsection
4455 rr0-beta2
4456 \end_layout
4458 \begin_layout Itemize
4459 Autofire
4460 \end_layout
4462 \begin_layout Itemize
4463 Lots of code cleanups
4464 \end_layout
4466 \begin_layout Itemize
4467 Lua interface to settings
4468 \end_layout
4470 \begin_layout Itemize
4471 Allow specifying AVI borders without Lua
4472 \end_layout
4474 \begin_layout Itemize
4475 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4476 \end_layout
4478 \begin_layout Itemize
4479 on_snoop lua callback
4480 \end_layout
4482 \begin_layout Itemize
4483 Faster movie loading and saving.
4484 \end_layout
4486 \begin_layout Subsection
4487 rr0-beta3
4488 \end_layout
4490 \begin_layout Itemize
4491 Joystick support
4492 \end_layout
4494 \begin_layout Subsection
4495 rr0-beta4
4496 \end_layout
4498 \begin_layout Itemize
4499 Fix multi-buttons
4500 \end_layout
4502 \begin_layout Itemize
4503 Save jukebox functionality.
4504 \end_layout
4506 \begin_layout Subsection
4507 rr0-beta5
4508 \end_layout
4510 \begin_layout Itemize
4511 Try to fix some nasty failing movie load edge cases
4512 \end_layout
4514 \begin_layout Itemize
4515 Allow specifying scripts to run on command line.
4516 \end_layout
4518 \begin_layout Subsection
4519 rr0-beta6
4520 \end_layout
4522 \begin_layout Itemize
4523 Major source code reorganization.
4524 \end_layout
4526 \begin_layout Itemize
4527 Backup savestates before overwriting.
4528 \end_layout
4530 \begin_layout Itemize
4531 Don't crash if loading initial state fails.
4532 \end_layout
4534 \begin_layout Subsection
4535 rr0-beta7
4536 \end_layout
4538 \begin_layout Itemize
4539 Fix firmware lookup
4540 \end_layout
4542 \begin_layout Itemize
4543 Fix author name parsing
4544 \end_layout
4546 \begin_layout Itemize
4547 Fix rerecord counting
4548 \end_layout
4550 \begin_layout Itemize
4551 (SDL) Print messages to console if SDL is uninitialized
4552 \end_layout
4554 \begin_layout Itemize
4555 Add movieinfo program
4556 \end_layout
4558 \begin_layout Itemize
4559 Fix loading movies starting from SRAM.
4560 \end_layout
4562 \begin_layout Subsection
4563 rr0-beta8
4564 \end_layout
4566 \begin_layout Itemize
4567 Add support for unattended dumping
4568 \end_layout
4570 \begin_layout Itemize
4571 Fix compiling for Win32
4572 \end_layout
4574 \begin_layout Itemize
4575 Don't lock up if sound can't be initialized
4576 \end_layout
4578 \begin_layout Itemize
4579 Strip trailing CR from commands
4580 \end_layout
4582 \begin_layout Itemize
4583 Don't try to do dubious things in global ctors (fix crash on startup)
4584 \end_layout
4586 \begin_layout Subsection
4587 rr0-beta9
4588 \end_layout
4590 \begin_layout Itemize
4591 Small documentation tweaking
4592 \end_layout
4594 \begin_layout Itemize
4595 Fix make clean
4596 \end_layout
4598 \begin_layout Itemize
4599 Fix major bug in modifier matching
4600 \end_layout
4602 \begin_layout Subsection
4603 rr0-beta10
4604 \end_layout
4606 \begin_layout Itemize
4607 Lots of documentation fixes
4608 \end_layout
4610 \begin_layout Itemize
4611 Use dedicated callbacks for event backcomm., not commands.
4612 \end_layout
4614 \begin_layout Itemize
4615 Ensure that the watchdog is not hit when executing delayed reset.
4616 \end_layout
4618 \begin_layout Itemize
4619 Remove errant tab from joystick message.
4620 \end_layout
4622 \begin_layout Subsection
4623 rr0-beta11
4624 \end_layout
4626 \begin_layout Itemize
4627 Make autofire operate in absolute time, not linear time
4628 \end_layout
4630 \begin_layout Itemize
4631 Reinitialize controls when resuming from loadstate
4632 \end_layout
4634 \begin_layout Itemize
4635 Some more code cleanups
4636 \end_layout
4638 \begin_layout Itemize
4639 If Lua allocator fails, call OOM_panic()
4640 \end_layout
4642 \begin_layout Itemize
4643 Byte/word/dword/qword sized host memory write/read functions.
4644 \end_layout
4646 \begin_layout Itemize
4647 Dump at correct framerate if dumping interlaced NTSC (height=448).
4648 \end_layout
4650 \begin_layout Subsection
4651 rr0-beta12
4652 \end_layout
4654 \begin_layout Itemize
4655 Actually include the complete source code
4656 \end_layout
4658 \begin_layout Itemize
4659 Keep track of RTC
4660 \end_layout
4662 \begin_layout Subsection
4663 rr0-beta13
4664 \end_layout
4666 \begin_layout Itemize
4667 Document {save,start}time.{,sub}second.
4668 \end_layout
4670 \begin_layout Itemize
4671 Intercept time() from bsnes core.
4672 \end_layout
4674 \begin_layout Subsection
4675 rr0-beta14
4676 \end_layout
4678 \begin_layout Itemize
4679 Allow disabling time() interception (allow build on Mac OS X)
4680 \end_layout
4682 \begin_layout Itemize
4683 Use SDLMain on Mac OS X (make SDL not crash)
4684 \end_layout
4686 \begin_layout Itemize
4687 Disable delayed resets (just plain too buggy for now).
4688 \end_layout
4690 \begin_layout Itemize
4691 Code cleanups
4692 \end_layout
4694 \begin_layout Itemize
4695 Use 16-bit for graphics/video instead of 32-bit.
4696 \end_layout
4698 \begin_layout Itemize
4699 gui.rectangle/gui.pixel
4700 \end_layout
4702 \begin_layout Itemize
4703 gui.crosshair
4704 \end_layout
4706 \begin_layout Itemize
4707 New CSCD writer implementation.
4708 \end_layout
4710 \begin_layout Subsection
4711 rr0-beta15
4712 \end_layout
4714 \begin_layout Itemize
4715 Fix interaction of * and +.
4716 \end_layout
4718 \begin_layout Itemize
4719 Manual improvements
4720 \end_layout
4722 \begin_layout Itemize
4723 Use gettimeofday()/usleep(), these seem portable enough.
4724 \end_layout
4726 \begin_layout Itemize
4727 Move joystick axis manipulation to keymapper code.
4728 \end_layout
4730 \begin_layout Itemize
4731 Changes to how read-only works.
4732 \end_layout
4734 \begin_layout Itemize
4735 Refactor controller input code.
4736 \end_layout
4738 \begin_layout Subsection
4739 rr0-beta16
4740 \end_layout
4742 \begin_layout Itemize
4743 Fix mouseclick scale compensation.
4744 \end_layout
4746 \begin_layout Itemize
4747 Draw area boundaries correctly in SDL code.
4748 \end_layout
4750 \begin_layout Itemize
4751 gui.screenshot.
4752 \end_layout
4754 \begin_layout Itemize
4755 Fix CSCD output (buffer overrun and race condition).
4756 \end_layout
4758 \begin_layout Subsection
4759 rr0-beta17
4760 \end_layout
4762 \begin_layout Itemize
4763 JMD dumping support.
4764 \end_layout
4766 \begin_layout Itemize
4767 Allow unattended dumping to JMD.
4768 \end_layout
4770 \begin_layout Itemize
4771 Move to BSNES v083.
4772 \end_layout
4774 \begin_layout Itemize
4775 Switch back to 32-bit colors.
4776 \end_layout
4778 \begin_layout Itemize
4779 Add Lua function gui.color.
4780 \end_layout
4782 \begin_layout Itemize
4783 Use some new C++11 features in GCC 4.6.
4784 \end_layout
4786 \begin_layout Itemize
4787 Be prepared for core frequency changes.
4788 \end_layout
4790 \begin_layout Itemize
4791 Pass colors in one chunk from Lua.
4792 \end_layout
4794 \begin_layout Subsection
4795 rr0-beta18
4796 \end_layout
4798 \begin_layout Itemize
4799 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
4800  memory.read_vma() and memory.find_vma().
4801 \end_layout
4803 \begin_layout Itemize
4804 Numerious documentation fixups
4805 \end_layout
4807 \begin_layout Itemize
4808 RTC time format changed
4809 \end_layout
4811 \begin_layout Itemize
4812 Reformat flags display
4813 \end_layout
4815 \begin_layout Itemize
4816 Allow lua package name to be overridden
4817 \end_layout
4819 \begin_layout Itemize
4820 SDUMP (high-quality dumping).
4821 \end_layout
4823 \begin_layout Itemize
4824 Split platform support to plugins.
4825 \end_layout
4827 \begin_layout Itemize
4828 Make all sound plugins support basic sound commands
4829 \end_layout
4831 \begin_layout Itemize
4832 Support portaudio for sound.
4833 \end_layout
4835 \begin_layout Itemize
4836 Allow disable Lua/SDL searching.
4837 \end_layout
4839 \begin_layout Itemize
4840 Upconvert colors when copying lcscreen to screen.
4841 \end_layout
4843 \begin_layout Itemize
4844 Reorganize source tree.
4845 \end_layout
4847 \begin_layout Itemize
4848 Evdev joystick support.
4849 \end_layout
4851 \begin_layout Itemize
4852 Refactor more code into generic window code.
4853 \end_layout
4855 \begin_layout Subsection
4856 rr0-beta19
4857 \end_layout
4859 \begin_layout Itemize
4860 Refactor message handling.
4861 \end_layout
4863 \begin_layout Itemize
4864 Rework makefile
4865 \end_layout
4867 \begin_layout Itemize
4868 Documentation fixes
4869 \end_layout
4871 \begin_layout Itemize
4872 Finish pending saves before load/quit.
4873 \end_layout
4875 \begin_layout Itemize
4876 Wxwidgets graphics plugin.
4877 \end_layout
4879 \begin_layout Subsection
4880 rr0-beta20
4881 \end_layout
4883 \begin_layout Itemize
4884 Get rid of win32-crap.[ch]pp.
4885 \end_layout
4887 \begin_layout Itemize
4888 Move files around a lot.
4889 \end_layout
4891 \begin_layout Itemize
4892 Get rid of need for host C++ compiler.
4893 \end_layout
4895 \begin_layout Itemize
4896 Bsnes v084 core.
4897 \end_layout
4899 \begin_layout Itemize
4900 Refactor inter-component communication.
4901 \end_layout
4903 \begin_layout Itemize
4904 Fix zero luma.
4905 \end_layout
4907 \begin_layout Itemize
4908 Fix crash on multiline aliases.
4909 \end_layout
4911 \begin_layout Itemize
4912 Load/Save settings in wxwidgets gui.
4913 \end_layout
4915 \begin_layout Subsection
4916 rr0-beta21
4917 \end_layout
4919 \begin_layout Itemize
4920 Patch problems in bsnes core
4921 \end_layout
4923 \begin_layout Itemize
4924 SNES is little-endian, not big-endian!
4925 \end_layout
4927 \begin_layout Itemize
4928 Fix memory corruption in lcscreen::load()
4929 \end_layout
4931 \begin_layout Subsection
4932 rr0-beta22
4933 \end_layout
4935 \begin_layout Itemize
4936 Fix interpretting repeat counts in rrdata loading.
4937 \end_layout
4939 \begin_layout Itemize
4940 New lua callback: on_frame()
4941 \end_layout
4943 \begin_layout Itemize
4944 Remove calls to runtosave() that aren't supposed to be there
4945 \end_layout
4947 \begin_layout Itemize
4948 Lua function: movie.read_rtc()
4949 \end_layout
4951 \begin_layout Itemize
4952 Ignore src/fonts/font.cpp
4953 \end_layout
4955 \begin_layout Itemize
4956 Fix more bsnes core problems
4957 \end_layout
4959 \begin_layout Itemize
4960 Control bsnes random seeding
4961 \end_layout
4963 \begin_layout Itemize
4964 Pause-on-end
4965 \end_layout
4967 \begin_layout Itemize
4968 Some bsnes core debugging features (state dump and state hash)
4969 \end_layout
4971 \begin_layout Itemize
4972 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
4973  it was 'lsnes rr0-beta21').
4974 \end_layout
4976 \begin_layout Subsection
4977 rr0-beta23
4978 \end_layout
4980 \begin_layout Itemize
4981 Fix memory corruption due to macro/field mixup
4982 \end_layout
4984 \begin_layout Itemize
4985 search-memory update
4986 \end_layout
4988 \begin_layout Itemize
4989 Allow direct-mapped framebuffer
4990 \end_layout
4992 \begin_layout Itemize
4993 SDL: Use SDL_ANYFORMAT if possible
4994 \end_layout
4996 \begin_layout Itemize
4997 SDMP2SOX: 2s delay modes.
4998 \end_layout
5000 \begin_layout Itemize
5001 Wxwidgets: Cleanups
5002 \end_layout
5004 \begin_layout Itemize
5005 Use sed -E, not sed -r.
5006  Fixes building on Mac OS X.
5007 \end_layout
5009 \begin_layout Itemize
5010 Wxwidgets: Save jukebox on exit
5011 \end_layout
5013 \begin_layout Itemize
5014 Fix RTC if using load-movie on savestate.
5015 \end_layout
5017 \begin_layout Itemize
5018 Fix crash related to full console mode.
5019 \end_layout
5021 \begin_layout Subsection
5022 rr0-beta24
5023 \end_layout
5025 \begin_layout Itemize
5026 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5027 \end_layout
5029 \begin_layout Itemize
5030 Wxwidgets: Allow compiling on Mac OS X.
5031 \end_layout
5033 \begin_layout Itemize
5034 Use movie compare instead of movie hashing (faster save/load).
5035 \end_layout
5037 \begin_layout Itemize
5038 Lua: _SYSTEM table.
5039 \end_layout
5041 \begin_layout Subsection
5042 rr0-beta25
5043 \end_layout
5045 \begin_layout Itemize
5046 sdmp2sox: Pad soundtrack if using -l or -L.
5047 \end_layout
5049 \begin_layout Itemize
5050 sdmp2sox: Fix NTSC overscan.
5051 \end_layout
5053 \begin_layout Itemize
5054 sdmp2sox: Add AR correction mode.
5055 \end_layout
5057 \begin_layout Itemize
5058 call lua_close() when exiting.
5059 \end_layout
5061 \begin_layout Itemize
5062 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5063 \end_layout
5065 \begin_layout Subsection
5066 rr0-beta26
5067 \end_layout
5069 \begin_layout Itemize
5070 Fix IPS patching code (use bsnes core IPS patcher).
5071 \end_layout
5073 \begin_layout Itemize
5074 Implement BPS patching (using bsnes core IPS patcher).
5075 \end_layout
5077 \begin_layout Itemize
5078 Add feature to load headered ROMs.
5079 \end_layout
5081 \begin_layout Subsection
5082 rr0-beta27
5083 \end_layout
5085 \begin_layout Itemize
5086 Show command names when showing keybindings
5087 \end_layout
5089 \begin_layout Subsection
5091 \end_layout
5093 \begin_layout Itemize
5094 Fix pause-on-end to be actually controllable
5095 \end_layout
5097 \begin_layout Itemize
5098 SDL: Poll all events in queue, not just first one (fixes slowness in command
5099  typing)
5100 \end_layout
5102 \begin_layout Itemize
5103 Wxwidgets: Fix ROM loading.
5104 \end_layout
5106 \begin_layout Subsection
5107 rr1-beta0
5108 \end_layout
5110 \begin_layout Itemize
5111 Lua: Add gui.textH, gui.textV, gui.textHV
5112 \end_layout
5114 \begin_layout Itemize
5115 Fix text colors on SDL on Mac OS X
5116 \end_layout
5118 \begin_layout Itemize
5119 Mode 'F' for finished in readonly mode.
5120 \end_layout
5122 \begin_layout Itemize
5123 Fix some WS errors.
5124 \end_layout
5126 \begin_layout Itemize
5127 Reliably pause after skip poll
5128 \end_layout
5130 \begin_layout Itemize
5131 Split UI and core into their own threads
5132 \end_layout
5134 \begin_layout Subsection
5135 rr1-beta1
5136 \end_layout
5138 \begin_layout Itemize
5139 Remove leftover dummy SRAM slot
5140 \end_layout
5142 \begin_layout Itemize
5143 Fix controller numbers.
5144 \end_layout
5146 \begin_layout Subsection
5147 rr1-beta2
5148 \end_layout
5150 \begin_layout Itemize
5151 Fix lsnes-dumpavi after interface change.
5152 \end_layout
5154 \begin_layout Itemize
5155 Also give BSNES patches for v085.
5156 \end_layout
5158 \begin_layout Itemize
5159 Pack movie data in memory.
5160 \end_layout
5162 \begin_layout Subsection
5163 rr1-beta3
5164 \end_layout
5166 \begin_layout Itemize
5167 Fix framecount/length given when loading movies.
5168 \end_layout
5170 \begin_layout Itemize
5171 Controller command memory leak fixes.
5172 \end_layout
5174 \begin_layout Itemize
5175 Don't leak palette if freeing screen object.
5176 \end_layout
5178 \begin_layout Subsection
5179 rr1-beta4
5180 \end_layout
5182 \begin_layout Itemize
5183 Detect revisions.
5184 \end_layout
5186 \begin_layout Itemize
5187 Wxwidgets: Allow controlling dumper from the menu.
5188 \end_layout
5190 \begin_layout Subsection
5191 rr1-beta5
5192 \end_layout
5194 \begin_layout Itemize
5195 Rewrite parts of manual
5196 \end_layout
5198 \begin_layout Itemize
5199 Lua: Make it work with Lua 5.2.
5200 \end_layout
5202 \begin_layout Subsection
5203 rr1-beta6
5204 \end_layout
5206 \begin_layout Itemize
5207 Win32: Fix compile errors.
5208 \end_layout
5210 \begin_layout Subsection
5211 rr1-beta7
5212 \end_layout
5214 \begin_layout Itemize
5215 Refactor controller input code.
5216 \end_layout
5218 \begin_layout Itemize
5219 Fix crash when using command line on SDL / Mac OS X.
5220 \end_layout
5222 \begin_layout Subsection
5223 rr1-beta8
5224 \end_layout
5226 \begin_layout Itemize
5227 Delete core/coroutine (obsolete)
5228 \end_layout
5230 \begin_layout Itemize
5231 Lag input display by one frame.
5232 \end_layout
5234 \begin_layout Itemize
5235 Rewind movie to beginning function.
5236 \end_layout
5238 \begin_layout Itemize
5239 Fix wrong frame number reported to Lua when repainting after loadstate
5240 \end_layout
5242 \begin_layout Itemize
5243 Support UI editing of jukebox
5244 \end_layout
5246 \begin_layout Itemize
5247 Wxwidgets: Save settings on exit.
5248 \end_layout
5250 \begin_layout Itemize
5251 Support ${project} for filenames
5252 \end_layout
5254 \begin_layout Itemize
5255 SDL: Fix command history
5256 \end_layout
5258 \begin_layout Subsection
5259 rr1-beta9
5260 \end_layout
5262 \begin_layout Itemize
5263 Fix some order-of-global-ctor bugs.
5264 \end_layout
5266 \begin_layout Subsection
5267 rr1-beta10
5268 \end_layout
5270 \begin_layout Itemize
5271 Fix crashes when quitting on Win32.
5272 \end_layout
5274 \begin_layout Subsection
5275 rr1-beta11
5276 \end_layout
5278 \begin_layout Itemize
5279 EVDEV: Queue keypresses from joystick, don't send directly
5280 \end_layout
5282 \begin_layout Itemize
5283 Wxwidgets: Load-Preserve that actually works.
5284 \end_layout
5286 \begin_layout Subsection
5287 rr1-beta12
5288 \end_layout
5290 \begin_layout Itemize
5291 Wxwidgets: GUI for memory search.
5292 \end_layout
5294 \begin_layout Itemize
5295 Warn about using synchronous queue in UI callback.
5296 \end_layout
5298 \begin_layout Subsection
5299 rr1-beta13
5300 \end_layout
5302 \begin_layout Itemize
5303 Remember last saved file for each ROM
5304 \end_layout
5306 \begin_layout Itemize
5307 Support MT dumping via boost.
5308 \end_layout
5310 \begin_layout Itemize
5311 Lua: input.raw
5312 \end_layout
5314 \begin_layout Itemize
5315 Lua: input.keyhook
5316 \end_layout
5318 \begin_layout Itemize
5319 Make mouse be ordinary input instead of special-casing
5320 \end_layout
5322 \begin_layout Itemize
5323 SDL: Don't screw up commands with NUL codepoints.
5324 \end_layout
5326 \begin_layout Subsection
5327 rr1-beta14
5328 \end_layout
5330 \begin_layout Itemize
5331 Merge status panel and main window
5332 \end_layout
5334 \begin_layout Itemize
5335 True movie slot support (the rest of it)
5336 \end_layout
5338 \begin_layout Itemize
5339 SDL: Fix compilation error
5340 \end_layout
5342 \begin_layout Itemize
5343 Elminate cross calls in dump menu code.
5344 \end_layout
5346 \begin_layout Subsection
5347 rr1-beta15
5348 \end_layout
5350 \begin_layout Itemize
5351 Cancel pending saves command
5352 \end_layout
5354 \begin_layout Itemize
5355 Wxwidgets: Code refactoring
5356 \end_layout
5358 \begin_layout Itemize
5359 Wxwidgets: Fix system -> reset
5360 \end_layout
5362 \begin_layout Itemize
5363 Wxwidgets: Read watch expressions in the right thread
5364 \end_layout
5366 \begin_layout Subsection
5367 rr1-beta16
5368 \end_layout
5370 \begin_layout Itemize
5371 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5372  support that).
5373 \end_layout
5375 \begin_layout Itemize
5376 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5377 \end_layout
5379 \begin_layout Itemize
5380 Don't append trailing '-' to prefix when saving movie.
5381 \end_layout
5383 \begin_layout Itemize
5384 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5385 \end_layout
5387 \begin_layout Subsection
5389 \end_layout
5391 \begin_layout Itemize
5392 Document memory watch syntax.
5393 \end_layout
5395 \begin_layout Subsection
5396 rr1-delta1
5397 \end_layout
5399 \begin_layout Itemize
5400 Fix unattended dumping (lsnes-dumpavi)
5401 \end_layout
5403 \begin_layout Itemize
5404 Support RAW dumping
5405 \end_layout
5407 \begin_layout Itemize
5408 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5409 \end_layout
5411 \begin_layout Itemize
5412 Add option to control sample rate preturbation in AVI dumper
5413 \end_layout
5415 \begin_layout Subsection
5416 rr1-delta2
5417 \end_layout
5419 \begin_layout Itemize
5420 Wxwidgets: Fix dumper submodes
5421 \end_layout
5423 \begin_layout Itemize
5424 Set core controller types before loadstate
5425 \end_layout
5427 \end_body
5428 \end_document