lsnes rr1-Δ11ε1
[lsnes.git] / manual.lyx
blobcfc9e0beb380be78d0ab4217f3973cf0be6d8ea4
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass article
6 \use_default_options true
7 \maintain_unincluded_children false
8 \language finnish
9 \language_package default
10 \inputencoding auto
11 \fontencoding global
12 \font_roman default
13 \font_sans default
14 \font_typewriter default
15 \font_default_family default
16 \use_non_tex_fonts false
17 \font_sc false
18 \font_osf false
19 \font_sf_scale 100
20 \font_tt_scale 100
22 \graphics default
23 \default_output_format default
24 \output_sync 0
25 \bibtex_command default
26 \index_command default
27 \paperfontsize default
28 \use_hyperref false
29 \papersize default
30 \use_geometry false
31 \use_amsmath 1
32 \use_esint 1
33 \use_mhchem 1
34 \use_mathdots 1
35 \cite_engine basic
36 \use_bibtopic false
37 \use_indices false
38 \paperorientation portrait
39 \suppress_date false
40 \use_refstyle 1
41 \index Hakusana
42 \shortcut idx
43 \color #008000
44 \end_index
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \paragraph_indentation default
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle default
53 \tracking_changes false
54 \output_changes false
55 \html_math_output 0
56 \html_css_as_file 0
57 \html_be_strict false
58 \end_header
60 \begin_body
62 \begin_layout Section
63 Introduction
64 \end_layout
66 \begin_layout Standard
67 lsnes is SNES rerecording emulator based on bsnes core.
68 \end_layout
70 \begin_layout Section
71 Dependencies
72 \end_layout
74 \begin_layout Enumerate
75 bsnes libsnes (for bsnes SNES core)
76 \end_layout
78 \begin_deeper
79 \begin_layout Enumerate
80 v084-v087 (v084 or v085 for delayreset support)
81 \end_layout
83 \begin_layout Enumerate
84 accuracy or compatiblity core with debugger enabled.
85 \end_layout
87 \begin_layout Enumerate
88 Patched version (using included 7 patches)
89 \end_layout
91 \end_deeper
92 \begin_layout Enumerate
93 gambatte (for gambatte core)
94 \end_layout
96 \begin_deeper
97 \begin_layout Enumerate
98 SVN r320
99 \end_layout
101 \begin_layout Enumerate
102 Patched with included patches
103 \end_layout
105 \end_deeper
106 \begin_layout Enumerate
107 Zlib
108 \end_layout
110 \begin_layout Enumerate
111 boost_iostreams
112 \end_layout
114 \begin_layout Enumerate
115 boost_filesystem
116 \end_layout
118 \begin_layout Enumerate
119 boost_thread (if native std::thread is not available)
120 \end_layout
122 \begin_layout Enumerate
123 libsdl (SDL only)
124 \end_layout
126 \begin_layout Enumerate
127 sdlmain (SDL only, part of SDL)
128 \end_layout
130 \begin_layout Enumerate
131 boost_conversion (this is header-only library)
132 \end_layout
134 \begin_layout Enumerate
135 libswscale (wxwidgets graphics only)
136 \end_layout
138 \begin_layout Enumerate
139 Portaudio (portaudio sound only)
140 \end_layout
142 \begin_layout Enumerate
143 Lua (if Lua support is needed).
144 \end_layout
146 \begin_deeper
147 \begin_layout Itemize
148 Version 5.1.X or 5.2X.
149 \end_layout
151 \end_deeper
152 \begin_layout Enumerate
153 G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
154 \end_layout
156 \begin_layout Section
157 Building
158 \end_layout
160 \begin_layout Itemize
161 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
162  bsnes core).
163 \end_layout
165 \begin_layout Itemize
166 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
167 \end_layout
169 \begin_layout Itemize
170 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
171 >', bsnes core)
172 \end_layout
174 \begin_layout Itemize
175 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
176 ersion>', gambatte core)
177 \end_layout
179 \begin_layout Itemize
180 Edit options.build (or copy of that file)
181 \end_layout
183 \begin_layout Itemize
184 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
186 \end_layout
188 \begin_layout Section
189 Command line options
190 \end_layout
192 \begin_layout Subsection
193 ROM options
194 \end_layout
196 \begin_layout Standard
197 <kind> in the following can be one of:
198 \end_layout
200 \begin_layout Itemize
201 rom: Cartridge ROM (BIOS for special carts).
202  This is required.
203  (bsnes)
204 \end_layout
206 \begin_layout Itemize
207 bsx: BS-X (non-slotted) Game flash ROM.
208  (bsnes)
209 \end_layout
211 \begin_layout Itemize
212 bsxslotted: BS-X (slotted) Game flash ROM.
213  (bsnes)
214 \end_layout
216 \begin_layout Itemize
217 dmg: DMG game ROM (bsnes)
218 \end_layout
220 \begin_layout Itemize
221 slot-a: Sufami Turbo Slot A ROM (bsnes)
222 \end_layout
224 \begin_layout Itemize
225 slot-b: Sufami Turbo Slot B ROM (bsnes)
226 \end_layout
228 \begin_layout Itemize
229 gbrom: Game Boy ROM (gambatte)
230 \end_layout
232 \begin_layout Itemize
233 gbcrom: Game Boy Color ROM (gambatte)
234 \end_layout
236 \begin_layout Itemize
237 gbcarom: Game Boy Color ROM (Use GBA initial registers, gambatte)
238 \end_layout
240 \begin_layout Subsubsection
241 --<kind>=<file> (lsnes/SDL, lsnes-avidump)
242 \end_layout
244 \begin_layout Standard
245 Load <file> as specified ROM (SFC/BS/DMG/GB/GBC/ST file format).
246 \end_layout
248 \begin_layout Subsubsection
249 --<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
250 \end_layout
252 \begin_layout Standard
253 Override hardware detection for ROM, reading the values from <file> (BSNES
254  XML format or gambatte extra flags).
255 \end_layout
257 \begin_layout Subsubsection
258 --ips-<kind>=<file> (lsnes/SDL, lsnes-avidump)
259 \end_layout
261 \begin_layout Standard
262 Apply BPS/IPS patch <file> to ROM <kind>.
263  If specified multiple times, the patches are applied in order.
264 \end_layout
266 \begin_layout Subsubsection
267 --ips-<kind>-xml=<file> (lsnes/SDL, lsnes-avidump)
268 \end_layout
270 \begin_layout Standard
271 Apply BPS/IPS patch <file> to XML of ROM <kind>.
272  If specified multiple times, the patches are applied in order.
273 \end_layout
275 \begin_layout Subsubsection
276 --ips-offset=<offset> (lsnes/SDL, lsnes-avidump)
277 \end_layout
279 \begin_layout Standard
280 Set offset to apply to IPS patches.
281  May be negative.
282  Handy for applying headered IPS patches (use offset of -512 for this).
283  The offset must be 0 for BPS patches.
284 \end_layout
286 \begin_layout Subsubsection
287 --region=pal (BSNES core only)
288 \end_layout
290 \begin_layout Standard
291 Force ROM to be considered PAL-only.
292 \end_layout
294 \begin_layout Itemize
295 Only works on SNES and SGB ROMs (not BS-X or Sufami Turbo).
296 \end_layout
298 \begin_layout Itemize
299 Attempting to load NTSC movie file will error out.
300 \end_layout
302 \begin_layout Subsubsection
303 --region=ntsc (BSNES core only)
304 \end_layout
306 \begin_layout Standard
307 Force ROM to be considered NTSC-only.
308 \end_layout
310 \begin_layout Itemize
311 Attempting to load PAL movie file will error out.
312 \end_layout
314 \begin_layout Subsection
315 Session options
316 \end_layout
318 \begin_layout Subsubsection
319 --pause
320 \end_layout
322 \begin_layout Standard
323 Start paused
324 \end_layout
326 \begin_layout Subsubsection
327 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
328 \end_layout
330 \begin_layout Standard
331 Load <filename> as movie or savestate file.
332  All other session options are ignored.
333 \end_layout
335 \begin_layout Subsubsection
336 --port1=<device> (lsnes/SDL, bsnes core only)
337 \end_layout
339 \begin_layout Standard
340 Set type of port1.
341  Valid values are:
342 \end_layout
344 \begin_layout Itemize
345 none: No device connected
346 \end_layout
348 \begin_layout Itemize
349 gamepad: One gamepad (the default)
350 \end_layout
352 \begin_layout Itemize
353 multitap: Four gamepads (warning: makes most games refuse to start)
354 \end_layout
356 \begin_layout Itemize
357 mouse: Mouse.
358 \end_layout
360 \begin_layout Subsubsection
361 --port2=<type> (lsnes/SDL, bsnes core only)
362 \end_layout
364 \begin_layout Standard
365 Set type of port2.
366  Valid values are:
367 \end_layout
369 \begin_layout Itemize
370 none: No device connected (the default)
371 \end_layout
373 \begin_layout Itemize
374 gamepad: One gamepad
375 \end_layout
377 \begin_layout Itemize
378 multitap: Four gamepads.
379 \end_layout
381 \begin_layout Itemize
382 mouse: Mouse
383 \end_layout
385 \begin_layout Itemize
386 superscope: Super Scope
387 \end_layout
389 \begin_layout Itemize
390 justifier: One justifier
391 \end_layout
393 \begin_layout Itemize
394 justifiers: Two justifiers
395 \end_layout
397 \begin_layout Subsubsection
398 --gamename=<name> (lsnes/SDL)
399 \end_layout
401 \begin_layout Standard
402 Set the name of game to <name>.
403  Default is blank.
404 \end_layout
406 \begin_layout Subsubsection
407 --author=<name> (lsnes/SDL)
408 \end_layout
410 \begin_layout Standard
411 Add author with full name of <name> (no nickname).
412 \end_layout
414 \begin_layout Subsubsection
415 --author=|<name> (lsnes/SDL)
416 \end_layout
418 \begin_layout Standard
419 Add author with nickname of <name> (no full name).
420 \end_layout
422 \begin_layout Subsubsection
423 --author=<fullname>|<nickname> (lsnes/SDL)
424 \end_layout
426 \begin_layout Standard
427 Add author with full name of <fullname> and nickname of <nickname>.
428 \end_layout
430 \begin_layout Subsubsection
431 --rtc-second=<value> (lsnes/SDL)
432 \end_layout
434 \begin_layout Standard
435 Set RTC second (0 is 1st January 1970 00:00:00Z).
436  Default is 1,000,000,000.
437 \end_layout
439 \begin_layout Subsubsection
440 --rtc-subsecond=<value> (lsnes/SDL)
441 \end_layout
443 \begin_layout Standard
444 Set RTC subsecond.
445  Range is 0-.
446  Unit is CPU cycle.
447  Default is 0.
448 \end_layout
450 \begin_layout Subsection
451 Misc.
452  options:
453 \end_layout
455 \begin_layout Subsubsection
456 --run=<file> (lsnes/SDL)
457 \end_layout
459 \begin_layout Standard
460 After running main RC file, run this file.
461  If multiple are specified, these execute in order specified.
462 \end_layout
464 \begin_layout Subsection
465 dump options (lsnes-dumpavi only)
466 \end_layout
468 \begin_layout Subsubsection
469 --dumper=<dumper>
470 \end_layout
472 \begin_layout Standard
473 Set the dumper to use (required).
474  Use 'list' for listing of known dumpers.
475 \end_layout
477 \begin_layout Subsubsection
478 --mode=<mode>
479 \end_layout
481 \begin_layout Standard
482 Set the mode to use (required for dumpers with multiple modes, forbidden
483  otherwise).
484  Use 'list' for known modes.
485 \end_layout
487 \begin_layout Subsubsection
488 --prefix=<prefix>
489 \end_layout
491 \begin_layout Standard
492 Set dump prefix.
493  Default is 
494 \begin_inset Quotes eld
495 \end_inset
497 avidump
498 \begin_inset Quotes erd
499 \end_inset
502 \end_layout
504 \begin_layout Subsubsection
505 --option=<name>=<value>
506 \end_layout
508 \begin_layout Standard
509 Set option <name> to value <value>.
510 \end_layout
512 \begin_layout Subsubsection
513 --length=<length>
514 \end_layout
516 \begin_layout Standard
517 Set number of frames to dump.
518  Mandatory.
519 \end_layout
521 \begin_layout Subsubsection
522 --lua=<script>
523 \end_layout
525 \begin_layout Standard
526 Run specified lua script (lsnes-dumpavi does not have initialization files).
527 \end_layout
529 \begin_layout Subsubsection
530 --load-library=<library>
531 \end_layout
533 \begin_layout Standard
534 Load the specified shared object / dynamic library / dynamic link library.
535 \end_layout
537 \begin_layout Section
538 Startup file lsnes.rc
539 \end_layout
541 \begin_layout Standard
542 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
543  This file is located in:
544 \end_layout
546 \begin_layout Itemize
547 Windows: %APPDATA%
548 \backslash
549 lsnes
550 \backslash
551 lsnes.rc (if %APPDATA% exists)
552 \end_layout
554 \begin_layout Itemize
555 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
556 \end_layout
558 \begin_layout Itemize
559 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
560 \end_layout
562 \begin_layout Itemize
563 All: ./lsnes.rc (fallback default).
564 \end_layout
566 \begin_layout Standard
567 If leading directories do not exist, attempt to create them is made.
568 \end_layout
570 \begin_layout Section
571 Internal commands
572 \end_layout
574 \begin_layout Itemize
575 Commands beginning with '*' invoke the corresponding command without alias
576  expansion.
577 \end_layout
579 \begin_layout Itemize
580 If command starts with '+' (after possible '*'), the command is executed
581  as-is when button is pressed, and when button is released, it is executed
582  with '+' replaced by '-'.
583 \end_layout
585 \begin_layout Itemize
586 Commands without '+' execute only on negative edge (release).
587 \end_layout
589 \begin_layout Subsection
590 Settings:
591 \end_layout
593 \begin_layout Standard
594 Settings control various aspects of emulator behaviour.
595 \end_layout
597 \begin_layout Subsubsection
598 set-setting <setting> <value>
599 \end_layout
601 \begin_layout Standard
602 Sets setting <setting> to value <value> (may be empty).
603 \end_layout
605 \begin_layout Subsubsection
606 unset-setting <setting>
607 \end_layout
609 \begin_layout Standard
610 Try to unset setting <setting> (not all settings can be unset).
611 \end_layout
613 \begin_layout Subsubsection
614 get-setting <setting>
615 \end_layout
617 \begin_layout Standard
618 Read value of setting <setting>
619 \end_layout
621 \begin_layout Subsubsection
622 show-settings
623 \end_layout
625 \begin_layout Standard
626 Print names and values of all settings.
627 \end_layout
629 \begin_layout Subsection
630 Keybindings
631 \end_layout
633 \begin_layout Standard
634 Keybindings bind commands or aliases to keys (or pseudo-keys).
636 \end_layout
638 \begin_layout Standard
639 Notes:
640 \end_layout
642 \begin_layout Itemize
643 Do not bind edge active (+/-) commands to keys with modifiers, that won't
644  work right!
645 \end_layout
647 \begin_layout Itemize
648 Names of keys and modifiers are platform-dependent.
649 \end_layout
651 \begin_layout Itemize
652 Be careful before binding pseudo-keys (such as joystick axes, buttons or
653  hats) with modifiers.
654  That may or may not work right.
655 \end_layout
657 \begin_layout Subsubsection
658 bind-key [<mod>/<modmask>] <key> <command>
659 \end_layout
661 \begin_layout Standard
662 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
663 ed list) are set as <mod> (comma-seperated list).
664 \end_layout
666 \begin_layout Standard
667 The names of keys and modifiers are platform-dependent.
668 \end_layout
670 \begin_layout Subsubsection
671 unbind-key [<mod>/<modmask>] <key>
672 \end_layout
674 \begin_layout Standard
675 Unbind command from <key> (with specified <mod> and <modmask>).
676 \end_layout
678 \begin_layout Subsubsection
679 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
680  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
681  [plus=<val>] [tolerance=<val>]
682 \end_layout
684 \begin_layout Standard
685 Set axis parameters for axis <axis>.
686 \end_layout
688 \begin_layout Itemize
689 disabled: Disable axis
690 \end_layout
692 \begin_layout Itemize
693 axis: Normal axis
694 \end_layout
696 \begin_layout Itemize
697 axis-inverse: Inverse axis
698 \end_layout
700 \begin_layout Itemize
701 pressure0-: Pressure sensitive.
702  Released at 0, pressed at -.
703 \end_layout
705 \begin_layout Itemize
706 pressure0+: Pressure sensitive.
707  Released at 0, pressed at +.
708 \end_layout
710 \begin_layout Itemize
711 pressure-0: Pressure sensitive.
712  Released at -, pressed at 0.
713 \end_layout
715 \begin_layout Itemize
716 pressure-+: Pressure sensitive.
717  Released at -, pressed at +.
718 \end_layout
720 \begin_layout Itemize
721 pressure+0: Pressure sensitive.
722  Released at +, pressed at 0.
723 \end_layout
725 \begin_layout Itemize
726 pressure+-: Pressure sensitive.
727  Released at +, pressed at -.
728 \end_layout
730 \begin_layout Itemize
731 minus=<val>: Calibration at extreme minus position (-32768-32767)
732 \end_layout
734 \begin_layout Itemize
735 zero=<val>: Calibration at neutral position (-32768-32767)
736 \end_layout
738 \begin_layout Itemize
739 plus=<val>: Calibration at extreme plus position (-32768-32767)
740 \end_layout
742 \begin_layout Itemize
743 tolerance=<value>: Center band tolerance (0<x<1).
744  The smaller the value, the more sensitive the control is.
745 \end_layout
747 \begin_layout Subsubsection
748 show-bindings
749 \end_layout
751 \begin_layout Standard
752 Print all key bindings in effect.
753 \end_layout
755 \begin_layout Subsection
756 Aliases
757 \end_layout
759 \begin_layout Standard
760 Aliases bind command to sequence of commands.
761  After alias has been defined, it replaces the command it shadows.
762 \end_layout
764 \begin_layout Standard
765 Notes:
766 \end_layout
768 \begin_layout Itemize
769 You can't alias command to itself.
770 \end_layout
772 \begin_layout Itemize
773 Aliases starting with +/- are edge active just like ordinary commands starting
774  with +/-.
775 \end_layout
777 \begin_layout Itemize
778 One command can be aliased to multiple commands.
779 \end_layout
781 \begin_layout Subsubsection
782 alias-command <command> <expansion>
783 \end_layout
785 \begin_layout Standard
786 Append <expansion> to alias <command>.
787  If alias does not already exist, it is created.
788 \end_layout
790 \begin_layout Subsubsection
791 unalias-command <command>
792 \end_layout
794 \begin_layout Standard
795 Clear alias expansion for <command>.
796 \end_layout
798 \begin_layout Subsubsection
799 show-aliases
800 \end_layout
802 \begin_layout Standard
803 Print all aliases and their expansions in effect.
804 \end_layout
806 \begin_layout Subsection
807 run-script <script>
808 \end_layout
810 \begin_layout Standard
811 Run <script> as if commands were entered on the command line.
812 \end_layout
814 \begin_layout Subsection
815 Video dumping
816 \end_layout
818 \begin_layout Standard
819 Following commands control video dumping:
820 \end_layout
822 \begin_layout Subsubsection
823 start-dump <dumper> [<mode>] <prefix/filename>
824 \end_layout
826 \begin_layout Standard
827 Start dumping using dumper <dumper>.
828  If mode is present or not and if prefix or filename is present depends
829  on the dumper and dumper mode.
830 \end_layout
832 \begin_layout Standard
833 The following dumpers are available:
834 \end_layout
836 \begin_layout Itemize
837 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
838 \end_layout
840 \begin_deeper
841 \begin_layout Itemize
842 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
843  Takes prefix.
844 \end_layout
846 \begin_layout Itemize
847 Mode: cscd/pcm: CSCD video, PCM audio.
848  Takes prefix.
849 \end_layout
851 \end_deeper
852 \begin_layout Itemize
853 INTERNAL-JMD: Internal .jmd dumper.
854 \end_layout
856 \begin_deeper
857 \begin_layout Itemize
858 Does not take mode.
859 \end_layout
861 \begin_layout Itemize
862 Takes a filename.
863 \end_layout
865 \end_deeper
866 \begin_layout Itemize
867 INTERNAL-RAW: Internal RAW dumper.
868 \end_layout
870 \begin_deeper
871 \begin_layout Itemize
872 Does not take mode.
873 \end_layout
875 \begin_layout Itemize
876 Takes a prefix.
877 \end_layout
879 \begin_layout Itemize
880 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
881 \end_layout
883 \begin_layout Itemize
884 Video is always upscaled to double resolution (512x448 / 512 x 478).
885 \end_layout
887 \begin_layout Itemize
888 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
889  for NTSC.
890 \end_layout
892 \end_deeper
893 \begin_layout Itemize
894 INTERNAL-SDMP: Internal SDMP dumper.
895 \end_layout
897 \begin_deeper
898 \begin_layout Itemize
899 Mode 'ms': Multi-segment.
900  Takes prefix.
901 \end_layout
903 \begin_layout Itemize
904 Mode 'ss': Single-segment.
905  Takes filename.
906 \end_layout
908 \end_deeper
909 \begin_layout Subsubsection
910 end-dump <dumper>
911 \end_layout
913 \begin_layout Standard
914 End dumping using <dumper>
915 \end_layout
917 \begin_layout Subsubsection
918 show-dumpers [<dumper>]
919 \end_layout
921 \begin_layout Standard
922 Show the list of dumpers or list of modes for <dumper>
923 \end_layout
925 \begin_layout Subsection
926 Memory manipulation
927 \end_layout
929 \begin_layout Standard
930 <address> may be decimal or hexadecimal (prefixed with '0x').
931  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
932  with '-') decimal.
933 \end_layout
935 \begin_layout Standard
936 The available element <sizes> are:
937 \end_layout
939 \begin_layout Itemize
940 byte: 1 byte
941 \end_layout
943 \begin_layout Itemize
944 word: 2 bytes
945 \end_layout
947 \begin_layout Itemize
948 dword: 4 bytes
949 \end_layout
951 \begin_layout Itemize
952 qword: 8 bytes
953 \end_layout
955 \begin_layout Standard
956 When reading RAM and ROM, multi-byte reads/writes are big-endian.
957  When dealing with DSP memory, multi-byte reads/writes are native-endian
958  (do not use operand sizes exceeding DSP bitness, except dword is OK for
959  24-bit memory).
960 \end_layout
962 \begin_layout Subsubsection
963 read-<size> <address>
964 \end_layout
966 \begin_layout Standard
967 Read the value of byte in <address>.
968 \end_layout
970 \begin_layout Subsubsection
971 read-s<size> <address>
972 \end_layout
974 \begin_layout Standard
975 Read the value of signed byte in <address>.
976 \end_layout
978 \begin_layout Subsubsection
979 write-<size> <address> <value>
980 \end_layout
982 \begin_layout Standard
983 Write <value> to byte in address <address>.
984 \end_layout
986 \begin_layout Subsubsection
987 search-memory reset
988 \end_layout
990 \begin_layout Standard
991 Reset the memory search
992 \end_layout
994 \begin_layout Subsubsection
995 search-memory count
996 \end_layout
998 \begin_layout Standard
999 Print number of candidates remaining
1000 \end_layout
1002 \begin_layout Subsubsection
1003 search-memory print
1004 \end_layout
1006 \begin_layout Standard
1007 Print all candidates remaining
1008 \end_layout
1010 \begin_layout Subsubsection
1011 search-memory <usflag><sizeflag><op>
1012 \end_layout
1014 \begin_layout Standard
1015 Searches memory for addresses satisfying criteria.
1016 \end_layout
1018 \begin_layout Standard
1019 <usflag> can be:
1020 \end_layout
1022 \begin_layout Itemize
1023 u: unsigned
1024 \end_layout
1026 \begin_layout Itemize
1027 s: signed
1028 \end_layout
1030 \begin_layout Standard
1031 <sizeflag> can be:
1032 \end_layout
1034 \begin_layout Itemize
1035 b: byte
1036 \end_layout
1038 \begin_layout Itemize
1039 w: word
1040 \end_layout
1042 \begin_layout Itemize
1043 d: dword
1044 \end_layout
1046 \begin_layout Itemize
1047 q: qword
1048 \end_layout
1050 \begin_layout Standard
1051 <op> can be:
1052 \end_layout
1054 \begin_layout Itemize
1055 lt: < previous value.
1056 \end_layout
1058 \begin_layout Itemize
1059 le: <= previous value.
1060 \end_layout
1062 \begin_layout Itemize
1063 eq: = previous value.
1064 \end_layout
1066 \begin_layout Itemize
1067 ne: != previous value.
1068 \end_layout
1070 \begin_layout Itemize
1071 ge: >= previous value.
1072 \end_layout
1074 \begin_layout Itemize
1075 gt: > previous value.
1076 \end_layout
1078 \begin_layout Subsubsection
1079 search-memory <sizeflag> <value>
1080 \end_layout
1082 \begin_layout Standard
1083 Searches for addresses that currently have value <value>.
1084  <sizeflag> is as in previous command.
1085 \end_layout
1087 \begin_layout Subsection
1088 Main commands
1089 \end_layout
1091 \begin_layout Standard
1092 These commands are not available in lsnesrc, but are available after ROM
1093  has been loaded.
1094 \end_layout
1096 \begin_layout Subsubsection
1097 quit-emulator [/y]
1098 \end_layout
1100 \begin_layout Standard
1101 Quits the emulator (asking for confirmation).
1102  If /y is given, no confirmation is asked.
1103 \end_layout
1105 \begin_layout Subsubsection
1106 pause-emulator
1107 \end_layout
1109 \begin_layout Standard
1110 Toggle paused/unpaused
1111 \end_layout
1113 \begin_layout Subsubsection
1114 +advance-frame 
1115 \end_layout
1117 \begin_layout Standard
1118 Advance frame.
1119  If the button is still held after configurable timeout expires, game unpauses
1120  for the duration frame advance is held.
1121 \end_layout
1123 \begin_layout Subsubsection
1124 +advance-poll 
1125 \end_layout
1127 \begin_layout Standard
1128 Advance subframe.
1129  If the button is still held after configurable timeout expires, game unpauses
1130  for the duration frame advance is held.
1131 \end_layout
1133 \begin_layout Subsubsection
1134 advance-skiplag 
1135 \end_layout
1137 \begin_layout Standard
1138 Skip to first poll in frame after current.
1139 \end_layout
1141 \begin_layout Subsubsection
1142 reset 
1143 \end_layout
1145 \begin_layout Standard
1146 Reset the SNES after this frame.
1147 \end_layout
1149 \begin_layout Subsubsection
1150 load <filename> 
1151 \end_layout
1153 \begin_layout Standard
1154 Load savestate <filename> in current mode.
1155 \end_layout
1157 \begin_layout Subsubsection
1158 load-state <filename> 
1159 \end_layout
1161 \begin_layout Standard
1162 Load savestate <filename> in readwrite mode.
1163 \end_layout
1165 \begin_layout Subsubsection
1166 load-readonly <filename> 
1167 \end_layout
1169 \begin_layout Standard
1170 Load savestate <filename> in readonly mode.
1171 \end_layout
1173 \begin_layout Subsubsection
1174 load-preserve <filename> 
1175 \end_layout
1177 \begin_layout Standard
1178 Load savestate <filename> in readonly mode, preserving current events.
1179 \end_layout
1181 \begin_layout Subsubsection
1182 load-movie <filename> 
1183 \end_layout
1185 \begin_layout Standard
1186 Load savestate <filename>, ignoring save part in readonly mode.
1187 \end_layout
1189 \begin_layout Subsubsection
1190 save-state <filename> 
1191 \end_layout
1193 \begin_layout Standard
1194 Save system state to <filename> as soon as possible.
1195 \end_layout
1197 \begin_layout Subsubsection
1198 save-movie <filename> 
1199 \end_layout
1201 \begin_layout Standard
1202 Save movie to <filename>.
1203 \end_layout
1205 \begin_layout Subsubsection
1206 set-rwmode 
1207 \end_layout
1209 \begin_layout Standard
1210 Set read-write mode.
1211 \end_layout
1213 \begin_layout Subsubsection
1214 set-romode 
1215 \end_layout
1217 \begin_layout Standard
1218 Set read-only mode
1219 \end_layout
1221 \begin_layout Subsubsection
1222 toggle-rwmode 
1223 \end_layout
1225 \begin_layout Standard
1226 Toggle between read-only and read-write modes.
1227 \end_layout
1229 \begin_layout Subsubsection
1230 set-gamename <name> 
1231 \end_layout
1233 \begin_layout Standard
1234 Set name of the game to <name>
1235 \end_layout
1237 \begin_layout Subsubsection
1238 get-gamename 
1239 \end_layout
1241 \begin_layout Standard
1242 Print the name of the game.
1243 \end_layout
1245 \begin_layout Subsubsection
1246 add-author <author> 
1247 \end_layout
1249 \begin_layout Standard
1250 Adds new author <author>.
1251  If <author> does not contain '|' it is full name.
1252  If it contains '|', '|' splits the full name and nickname.
1253 \end_layout
1255 \begin_layout Subsubsection
1256 edit-author <num> <author> 
1257 \end_layout
1259 \begin_layout Standard
1260 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1261  format)
1262 \end_layout
1264 \begin_layout Subsubsection
1265 remove-author <num> 
1266 \end_layout
1268 \begin_layout Standard
1269 Remove author in slot <num>
1270 \end_layout
1272 \begin_layout Subsubsection
1273 print-authors 
1274 \end_layout
1276 \begin_layout Standard
1277 Print authors.
1278 \end_layout
1280 \begin_layout Subsubsection
1281 test-1, test-2, test-3
1282 \end_layout
1284 \begin_layout Standard
1285 Internal test commands.
1286  Don't use.
1287 \end_layout
1289 \begin_layout Subsubsection
1290 take-screenshot <filename> 
1291 \end_layout
1293 \begin_layout Standard
1294 Save screenshot to <filename>.
1295 \end_layout
1297 \begin_layout Subsubsection
1298 +controller<num><button>
1299 \end_layout
1301 \begin_layout Standard
1302 Press button <button> on controller <num> (1-8).
1303  The following button names are known:
1304 \end_layout
1306 \begin_layout Itemize
1307 left
1308 \end_layout
1310 \begin_layout Itemize
1311 right
1312 \end_layout
1314 \begin_layout Itemize
1316 \end_layout
1318 \begin_layout Itemize
1319 down
1320 \end_layout
1322 \begin_layout Itemize
1324 \end_layout
1326 \begin_layout Itemize
1328 \end_layout
1330 \begin_layout Itemize
1332 \end_layout
1334 \begin_layout Itemize
1336 \end_layout
1338 \begin_layout Itemize
1340 \end_layout
1342 \begin_layout Itemize
1344 \end_layout
1346 \begin_layout Itemize
1347 select
1348 \end_layout
1350 \begin_layout Itemize
1351 start
1352 \end_layout
1354 \begin_layout Itemize
1355 trigger
1356 \end_layout
1358 \begin_layout Itemize
1359 cursor
1360 \end_layout
1362 \begin_layout Itemize
1363 pause
1364 \end_layout
1366 \begin_layout Itemize
1367 turbo
1368 \end_layout
1370 \begin_layout Subsubsection
1371 controllerh<num><button>
1372 \end_layout
1374 \begin_layout Standard
1375 Hold/unhold button <button> on controller <num> (1-8).
1376  See +controller for button names.
1377 \end_layout
1379 \begin_layout Subsubsection
1380 controllerf<num><button>
1381 \end_layout
1383 \begin_layout Standard
1384 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1385  See +controller for button names.
1386 \end_layout
1388 \begin_layout Standard
1389 Cauntion: Does not work properly if outside frame advance.
1390 \end_layout
1392 \begin_layout Subsubsection
1393 autofire (<pattern>|-)...
1394 \end_layout
1396 \begin_layout Standard
1397 Set autofire pattern.
1398  Each parameter is comma-separated list of button names (in form of 1start,
1399  1A, 2B, etc..) to hold on that frame.
1400  After reaching the end of pattern, the pattern restarts from the beginning.
1401 \end_layout
1403 \begin_layout Subsubsection
1404 repaint
1405 \end_layout
1407 \begin_layout Standard
1408 Force a repaint.
1409 \end_layout
1411 \begin_layout Subsection
1412 Save jukebox 
1413 \end_layout
1415 \begin_layout Subsubsection
1416 cycle-jukebox-backward
1417 \end_layout
1419 \begin_layout Standard
1420 Cycle save jukebox backwards.
1421 \end_layout
1423 \begin_layout Subsubsection
1424 cycle-jukebox-forward
1425 \end_layout
1427 \begin_layout Standard
1428 Cycle save jukebox forwards
1429 \end_layout
1431 \begin_layout Subsubsection
1432 load-jukebox
1433 \end_layout
1435 \begin_layout Standard
1436 Do load from jukebox (current mode).
1437 \end_layout
1439 \begin_layout Subsubsection
1440 save-jukebox
1441 \end_layout
1443 \begin_layout Standard
1444 Do state save to jukebox.
1445 \end_layout
1447 \begin_layout Subsection
1448 Lua 
1449 \end_layout
1451 \begin_layout Standard
1452 Only available if lua support is compiled in.
1453 \end_layout
1455 \begin_layout Subsubsection
1456 evaluate-lua <luacode>
1457 \end_layout
1459 \begin_layout Standard
1460 Run Lua code <luacode> using built-in Lua interpretter.
1461 \end_layout
1463 \begin_layout Subsubsection
1464 run-lua <script>
1465 \end_layout
1467 \begin_layout Standard
1468 Run specified lua file using built-in Lua interpretter.
1469 \end_layout
1471 \begin_layout Subsubsection
1472 reset-lua
1473 \end_layout
1475 \begin_layout Standard
1476 Clear the Lua VM state and restore to factory defaults.
1477 \end_layout
1479 \begin_layout Subsection
1480 Memory watch
1481 \end_layout
1483 \begin_layout Subsubsection
1484 add-watch <name> <expression>
1485 \end_layout
1487 \begin_layout Standard
1488 Adds new watch (or modifies old one).
1489 \end_layout
1491 \begin_layout Subsubsection
1492 remove-watch <name>
1493 \end_layout
1495 \begin_layout Standard
1496 Remove a watch.
1497 \end_layout
1499 \begin_layout Subsection
1500 Sound 
1501 \end_layout
1503 \begin_layout Subsubsection
1504 enable-sound <on/off> 
1505 \end_layout
1507 \begin_layout Standard
1508 Enable/Disable sound.
1509 \end_layout
1511 \begin_layout Subsubsection
1512 set-sound-device <device> 
1513 \end_layout
1515 \begin_layout Standard
1516 Set sound device to <device>
1517 \end_layout
1519 \begin_layout Subsubsection
1520 show-sound-status 
1521 \end_layout
1523 \begin_layout Standard
1524 Show status of sound system.
1525 \end_layout
1527 \begin_layout Subsubsection
1528 show-sound-devices
1529 \end_layout
1531 \begin_layout Standard
1532 Show all available devices.
1533 \end_layout
1535 \begin_layout Subsubsection
1536 set-volume <multiplier>
1537 \end_layout
1539 \begin_layout Standard
1540 Set the volume multiplier to <multiplier>.
1541  1 is normal volume, and higher numbers are louder.
1542 \end_layout
1544 \begin_layout Subsubsection
1545 set-volume <multiplier>%
1546 \end_layout
1548 \begin_layout Standard
1549 Set the volume multiplier to <multiplier> percent.
1550  100 is normal volume, and higher numbers are louder.
1551 \end_layout
1553 \begin_layout Subsubsection
1554 set-volume <multiplier>dB
1555 \end_layout
1557 \begin_layout Standard
1558 Set the volume multiplier to <multiplier> dB.
1559  0 is normal volume, and higher numbers are louder.
1560  The value may be negative.
1561 \end_layout
1563 \begin_layout Subsection
1564 Misc.
1565 \end_layout
1567 \begin_layout Subsubsection
1568 reload-rom [<file>]
1569 \end_layout
1571 \begin_layout Standard
1572 Reloads the main ROM image from <file>.
1573 \end_layout
1575 \begin_layout Subsection
1576 SDL Platform commands 
1577 \end_layout
1579 \begin_layout Standard
1580 The following are valid on SDL platform.
1581 \end_layout
1583 \begin_layout Subsubsection
1584 identify-key
1585 \end_layout
1587 \begin_layout Standard
1588 Asks to press a key and then identifies that (pseudo-)key.
1589 \end_layout
1591 \begin_layout Subsubsection
1592 toggle-console 
1593 \end_layout
1595 \begin_layout Standard
1596 Toggle between windowed/fullscreen console.
1597 \end_layout
1599 \begin_layout Subsubsection
1600 scroll-fullup 
1601 \end_layout
1603 \begin_layout Standard
1604 Scroll messages window as far back as it goes.
1605 \end_layout
1607 \begin_layout Subsubsection
1608 scroll-fulldown 
1609 \end_layout
1611 \begin_layout Standard
1612 Scroll messages window as far forward as it goes.
1613 \end_layout
1615 \begin_layout Subsubsection
1616 scroll-up 
1617 \end_layout
1619 \begin_layout Standard
1620 Scroll messages window back one screenful.
1621 \end_layout
1623 \begin_layout Subsubsection
1624 scroll-down 
1625 \end_layout
1627 \begin_layout Standard
1628 Scroll messages window forward one screenful.
1629 \end_layout
1631 \begin_layout Subsubsection
1632 prompt-command <command>
1633 \end_layout
1635 \begin_layout Standard
1636 Enter command prompt, with prompt prepopulated with specified command.
1637 \end_layout
1639 \begin_layout Section
1640 Settings
1641 \end_layout
1643 \begin_layout Subsection
1644 Core settings
1645 \end_layout
1647 \begin_layout Subsubsection
1648 firmwarepath
1649 \end_layout
1651 \begin_layout Standard
1652 Set where bsnes looks for firmware files.
1653  Default is 
1654 \begin_inset Quotes eld
1655 \end_inset
1658 \begin_inset Quotes erd
1659 \end_inset
1662 \end_layout
1664 \begin_layout Subsubsection
1665 target
1666 \end_layout
1668 \begin_layout Standard
1669 Set the target .
1670  Numeric, range is 0.001 to 
1671 \begin_inset Quotes eld
1672 \end_inset
1674 infinite
1675 \begin_inset Quotes erd
1676 \end_inset
1679  Default is native framerate.
1680 \end_layout
1682 \begin_layout Subsubsection
1683 savecompression
1684 \end_layout
1686 \begin_layout Standard
1687 Set save compression level (integer 0-9).
1688  Default is 7 (0 is no compression).
1689 \end_layout
1691 \begin_layout Subsubsection
1692 advance-timeout
1693 \end_layout
1695 \begin_layout Standard
1696 Set the frame advance timeout in milliseconds.
1697  Numeric integer, range is 0-999999999.
1698  Default is 500.
1699 \end_layout
1701 \begin_layout Subsection
1702 AVI dumper settings
1703 \end_layout
1705 \begin_layout Subsubsection
1706 avi-large
1707 \end_layout
1709 \begin_layout Standard
1710 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1711  outputs.
1712 \end_layout
1714 \begin_layout Subsubsection
1715 avi-left-border
1716 \end_layout
1718 \begin_layout Standard
1719 AVI dumper: Set the default left border thickness (unless lua overrides)
1720  for dumps.
1721  Range 0-8191.
1722  Default is 0.
1723 \end_layout
1725 \begin_layout Subsubsection
1726 avi-right-border
1727 \end_layout
1729 \begin_layout Standard
1730 AVI dumper: Set the default right border thickness (unless lua overrides)
1731  for dumps.
1732  Range 0-8191.
1733  Default is 0.
1734 \end_layout
1736 \begin_layout Subsubsection
1737 avi-top-border
1738 \end_layout
1740 \begin_layout Standard
1741 AVI dumper: Set the default top border thickness (unless lua overrides)
1742  for dumps.
1743  Range 0-8191.
1744  Default is 0.
1745 \end_layout
1747 \begin_layout Subsubsection
1748 avi-bottom-border
1749 \end_layout
1751 \begin_layout Standard
1752 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1753  for dumps.
1754  Range 0-8191.
1755  Default is 0.
1756 \end_layout
1758 \begin_layout Subsubsection
1759 avi-maxframes
1760 \end_layout
1762 \begin_layout Standard
1763 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1764  Range 0-999999999.
1765  Default is 0.
1766 \end_layout
1768 \begin_layout Subsubsection
1769 avi-compresison
1770 \end_layout
1772 \begin_layout Standard
1773 AVI dumper: Compression level (0-18).
1774 \end_layout
1776 \begin_layout Itemize
1777 Compression levels 10 and above are not compatible with stock CSCD codec.
1778 \end_layout
1780 \begin_layout Itemize
1781 Recomended level is 7.
1782 \end_layout
1784 \begin_layout Subsubsection
1785 avi-soundrate
1786 \end_layout
1788 \begin_layout Standard
1789 AVI dumper: Set method of determining the sound rate.
1790 \end_layout
1792 \begin_layout Itemize
1793 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1794  128, 176.4 and 192 kHz.
1795 \end_layout
1797 \begin_layout Itemize
1798 1: Round down to nearest integer.
1799 \end_layout
1801 \begin_layout Itemize
1802 2: Round up to nearest ingeter.
1803 \end_layout
1805 \begin_layout Subsection
1806 JMD options
1807 \end_layout
1809 \begin_layout Subsubsection
1810 jmd-copression
1811 \end_layout
1813 \begin_layout Standard
1814 JMD dumper: Compression level (0-9).
1815 \end_layout
1817 \begin_layout Subsection
1818 SDL platform settings
1819 \end_layout
1821 \begin_layout Subsubsection
1822 autorepeat-first-delay
1823 \end_layout
1825 \begin_layout Standard
1826 Sets the delay for first character in typematic autorepeat.
1827 \end_layout
1829 \begin_layout Subsubsection
1830 autorepeat-subsequent-delay
1831 \end_layout
1833 \begin_layout Standard
1834 Sets the delay for subsequent characters in typematic autorepeat.
1835 \end_layout
1837 \begin_layout Section
1838 Lua functions
1839 \end_layout
1841 \begin_layout Subsection
1842 Core (in main table)
1843 \end_layout
1845 \begin_layout Subsubsection
1846 print
1847 \end_layout
1849 \begin_layout Standard
1850 Print line to message console.
1851 \end_layout
1853 \begin_layout Subsubsection
1854 exec(string command)
1855 \end_layout
1857 \begin_layout Standard
1858 Run command as it was entered on the command line
1859 \end_layout
1861 \begin_layout Subsubsection
1862 utime()
1863 \end_layout
1865 \begin_layout Standard
1866 Returns two values.
1867  First is time since some epoch in seconds, the second is microseconds mod
1868  10^6 since that epoch.
1869 \end_layout
1871 \begin_layout Subsubsection
1872 emulator_ready()
1873 \end_layout
1875 \begin_layout Standard
1876 Returns true if emulator has finished booting, false if not (on_startup()
1877  will be issued later).
1878 \end_layout
1880 \begin_layout Subsubsection
1881 set_idle_timeout(number timeout)
1882 \end_layout
1884 \begin_layout Standard
1885 Set number of microseconds to block idle for.
1886  After this timeout has expired, on_idle() will be called once.
1887 \end_layout
1889 \begin_layout Subsubsection
1890 set_timer_timeout(number timeout)
1891 \end_layout
1893 \begin_layout Standard
1894 Set number of microseconds to block timer for.
1895  After this timeout has expired, on_timer() will be called once.
1896 \end_layout
1898 \begin_layout Subsubsection
1899 bus_address(number snesaddr)
1900 \end_layout
1902 \begin_layout Standard
1903 Returns virtual address corresponding to specified address on SNES bus.
1904 \end_layout
1906 \begin_layout Subsection
1907 Table bit:
1908 \end_layout
1910 \begin_layout Standard
1911 Bitwise logical functions and related.
1912 \end_layout
1914 \begin_layout Subsubsection
1915 bit.none(number...) / bit.bnot(number...)
1916 \end_layout
1918 \begin_layout Standard
1919 48-bit bitwise NOT / NONE function (set bits that are set in none of the
1920  arguments).
1921 \end_layout
1923 \begin_layout Subsubsection
1924 bit.any(number...) / bit.bor(number...)
1925 \end_layout
1927 \begin_layout Standard
1928 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
1929 \end_layout
1931 \begin_layout Subsubsection
1932 bit.all(number...) / bit.band(number...)
1933 \end_layout
1935 \begin_layout Standard
1936 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
1938 \end_layout
1940 \begin_layout Subsubsection
1941 bit.parity(number...) / bit.bxor(number...)
1942 \end_layout
1944 \begin_layout Standard
1945 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
1946  of the arguments).
1947 \end_layout
1949 \begin_layout Subsubsection
1950 bit.lrotate(number base[, number amount[, number bits]])
1951 \end_layout
1953 \begin_layout Standard
1954 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
1955 \end_layout
1957 \begin_layout Subsubsection
1958 bit.rrotate(number base[, number amount[, number bits]])
1959 \end_layout
1961 \begin_layout Standard
1962 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
1963  places.
1964 \end_layout
1966 \begin_layout Subsubsection
1967 bit.lshift(number base[, number amount[, number bits]])
1968 \end_layout
1970 \begin_layout Standard
1971 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
1972  The new bits are filled with zeroes.
1973 \end_layout
1975 \begin_layout Subsubsection
1976 bit.lrshift(number base[, number amount[, number bits]])
1977 \end_layout
1979 \begin_layout Standard
1980 Shift bits-bit (max 48, default 48) number logically right by amount (default
1981  1) places.
1982  The new bits are filled with zeroes.
1983 \end_layout
1985 \begin_layout Subsubsection
1986 bit.arshift(number base[, number amount[, number bits]])
1987 \end_layout
1989 \begin_layout Standard
1990 Shift bits-bit (max 48, default 48) number arithmetically right by amount
1991  (default 1) places.
1992  The new bits are shifted in with copy of the high bit.
1993 \end_layout
1995 \begin_layout Subsubsection
1996 bit.extract(number base[, number bit0[, number bit1,...]])
1997 \end_layout
1999 \begin_layout Standard
2000 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2001 \end_layout
2003 \begin_layout Standard
2004 Notes: 
2005 \end_layout
2007 \begin_layout Itemize
2008 Bit numbers up to 51 should work reliably (then things start falling apart
2009  due to double precision issues).
2010 \end_layout
2012 \begin_layout Itemize
2013 There are two special bit positions, true and false, standing for always
2014  set bit and always clear bit.
2015 \end_layout
2017 \begin_layout Subsubsection
2018 bit.value([number bit1[, number bit2,...]])
2019 \end_layout
2021 \begin_layout Standard
2022 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2023  places and so on.
2024  As special value, nil argument is no-op.
2025 \end_layout
2027 \begin_layout Subsection
2028 Table gui:
2029 \end_layout
2031 \begin_layout Standard
2032 Most of these functions can only be called in on_paint and on_video callbacks.
2033  Exceptions are noted.
2034 \end_layout
2036 \begin_layout Standard
2037 Colors are 32-bit.
2038  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2039  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2040  opaque, 255 is almost transparent).
2041  -1 is the fully transparent color.
2042  Alpha values greater than 127 do work.
2043 \end_layout
2045 \begin_layout Standard
2046 Origin of coordinates is at top left corner of game display area.
2047  Left and top gaps correspond to negative coordinates.
2048 \end_layout
2050 \begin_layout Subsubsection
2051 gui.resolution()
2052 \end_layout
2054 \begin_layout Standard
2055 Returns 2-tuple (hresolution, vresolution).
2056 \end_layout
2058 \begin_layout Subsubsection
2059 gui.<class>_gap(number gap)
2060 \end_layout
2062 \begin_layout Standard
2063 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2064  is 8191).
2065 \end_layout
2067 \begin_layout Subsubsection
2068 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2069 \end_layout
2071 \begin_layout Standard
2072 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2073  16 high).
2074  Parameters:
2075 \end_layout
2077 \begin_layout Itemize
2078 x: X-coordinate to start the drawing from (and x-coordinate at begining
2079  of the lines).
2080 \end_layout
2082 \begin_layout Itemize
2083 y: Y-coordinate to start the drawing from.
2084 \end_layout
2086 \begin_layout Itemize
2087 text: The text to draw.
2088 \end_layout
2090 \begin_layout Itemize
2091 fgc: Text color (default is 0xFFFFFF (white))
2092 \end_layout
2094 \begin_layout Itemize
2095 bgc: Background color (default is -1 (transparent))
2096 \end_layout
2098 \begin_layout Subsubsection
2099 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2100 \end_layout
2102 \begin_layout Standard
2103 Like gui.text, but draw using double-width.
2104 \end_layout
2106 \begin_layout Subsubsection
2107 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2108 \end_layout
2110 \begin_layout Standard
2111 Like gui.text, but draw using double-height.
2112 \end_layout
2114 \begin_layout Subsubsection
2115 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2116 \end_layout
2118 \begin_layout Standard
2119 Like gui.text, but draw using double-width/double-height.
2120 \end_layout
2122 \begin_layout Subsubsection
2123 gui.rectangle(number x, number y, number width, number height[, number thickness[
2124 , number outline[, number fill]]])
2125 \end_layout
2127 \begin_layout Standard
2128 Draw rectangle on the GUI.
2129  Parameters:
2130 \end_layout
2132 \begin_layout Itemize
2133 x: X-coordinate of left edge.
2134 \end_layout
2136 \begin_layout Itemize
2137 y: Y-coordinate of upper edge.
2138 \end_layout
2140 \begin_layout Itemize
2141 width: Width of rectangle.
2142 \end_layout
2144 \begin_layout Itemize
2145 height: Height of rectangle.
2146 \end_layout
2148 \begin_layout Itemize
2149 thickness: Thickness of outline (default is 1).
2150 \end_layout
2152 \begin_layout Itemize
2153 outline: Color of outline (default is 0xFFFFFF (white))
2154 \end_layout
2156 \begin_layout Itemize
2157 fill: Color of fill (default is -1 (transparent))
2158 \end_layout
2160 \begin_layout Subsubsection
2161 gui.box(number x, number y, number width, number height[, number thickness[,
2162  number outline1[,number outline2[, number fill]]]])
2163 \end_layout
2165 \begin_layout Standard
2166 Draw rectangle with 3D effect on the GUI.
2167  Parameters:
2168 \end_layout
2170 \begin_layout Itemize
2171 x: X-coordinate of left edge.
2172 \end_layout
2174 \begin_layout Itemize
2175 y: Y-coordinate of upper edge.
2176 \end_layout
2178 \begin_layout Itemize
2179 width: Width of rectangle.
2180 \end_layout
2182 \begin_layout Itemize
2183 height: Height of rectangle.
2184 \end_layout
2186 \begin_layout Itemize
2187 thickness: Thickness of outline (default is 1).
2188 \end_layout
2190 \begin_layout Itemize
2191 outline1: First color of outline (default is 0xFFFFFF (white))
2192 \end_layout
2194 \begin_layout Itemize
2195 outline2: First color of outline (default is 0x808080 (dark gray))
2196 \end_layout
2198 \begin_layout Itemize
2199 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2200 \end_layout
2202 \begin_layout Subsubsection
2203 gui.pixel(number x, number y[, number color])
2204 \end_layout
2206 \begin_layout Standard
2207 Draw one pixel on the GUI.
2208  Parameters:
2209 \end_layout
2211 \begin_layout Itemize
2212 x: X-coordinate of the pixel
2213 \end_layout
2215 \begin_layout Itemize
2216 y: Y-coordinate of the pixel
2217 \end_layout
2219 \begin_layout Itemize
2220 color: Color of the pixel (default is 0xFFFFFF (white))
2221 \end_layout
2223 \begin_layout Subsubsection
2224 gui.crosshair(number x, number y[, number length[, number color]])
2225 \end_layout
2227 \begin_layout Standard
2228 Draw a crosshair.
2229  Parameters:
2230 \end_layout
2232 \begin_layout Itemize
2233 x: X-coordinate of the crosshair
2234 \end_layout
2236 \begin_layout Itemize
2237 y: Y-coordinate of the crosshair
2238 \end_layout
2240 \begin_layout Itemize
2241 length: Length of the crosshair lines (default 10).
2242 \end_layout
2244 \begin_layout Itemize
2245 color: Color of the crosshair (default is 0xFFFFFF (white))
2246 \end_layout
2248 \begin_layout Subsubsection
2249 gui.line(number x1, number y1, number x2, number y2[, number color])
2250 \end_layout
2252 \begin_layout Standard
2253 Draw a thin line.
2254  Parameters:
2255 \end_layout
2257 \begin_layout Itemize
2258 x1: X-coordinate of one end.
2259 \end_layout
2261 \begin_layout Itemize
2262 y1: Y-coordinate of one end.
2263 \end_layout
2265 \begin_layout Itemize
2266 x2: X-coordinate of the other end.
2267 \end_layout
2269 \begin_layout Itemize
2270 y2: Y-coordinate of the other end.
2271 \end_layout
2273 \begin_layout Itemize
2274 color: Color of the line (default is 0xFFFFFF (white)).
2275 \end_layout
2277 \begin_layout Subsubsection
2278 gui.circle(number x, number y, number r[, number thick[, number border[,
2279  number fil]]])
2280 \end_layout
2282 \begin_layout Standard
2283 Draw a circle.
2284  Parameters.
2285 \end_layout
2287 \begin_layout Itemize
2288 x: X-coordinate of the center
2289 \end_layout
2291 \begin_layout Itemize
2292 y: Y-coordinate of the center
2293 \end_layout
2295 \begin_layout Itemize
2296 r: The radius of the circle
2297 \end_layout
2299 \begin_layout Itemize
2300 thick: Border thickness
2301 \end_layout
2303 \begin_layout Itemize
2304 border: Border color (default is 0xFFFFFF (white))
2305 \end_layout
2307 \begin_layout Itemize
2308 fill: Fill color (default is -1 (transparent)).
2309 \end_layout
2311 \begin_layout Subsubsection
2312 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2313 \end_layout
2315 \begin_layout Standard
2316 Draw a bitmap on screen with specified palette.
2317  Parameters:
2318 \end_layout
2320 \begin_layout Itemize
2321 x: X-coordinate of left edge.
2322 \end_layout
2324 \begin_layout Itemize
2325 y: Y-coordinate of top edge.
2326 \end_layout
2328 \begin_layout Itemize
2329 bitmap: The bitmap to draw
2330 \end_layout
2332 \begin_layout Itemize
2333 palette: The palette to draw the bitmap using.
2334 \end_layout
2336 \begin_layout Subsubsection
2337 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2338 \end_layout
2340 \begin_layout Standard
2341 Draw a bitmap on screen.
2342  Parameters:
2343 \end_layout
2345 \begin_layout Itemize
2346 x: X-coordinate of left edge.
2347 \end_layout
2349 \begin_layout Itemize
2350 y: Y-coordinate of top edge.
2351 \end_layout
2353 \begin_layout Itemize
2354 bitmap: The bitmap to draw
2355 \end_layout
2357 \begin_layout Subsubsection
2358 gui.palette_new()
2359 \end_layout
2361 \begin_layout Standard
2362 Returns a new palette (initially all transparent).
2363  Can be used anywhere.
2364 \end_layout
2366 \begin_layout Subsubsection
2367 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2368 \end_layout
2370 \begin_layout Standard
2371 Returns a new bitmap/dbitmap.
2372  Can be used anywhere.
2373  Parameters:
2374 \end_layout
2376 \begin_layout Itemize
2377 w: The width of new bitmap
2378 \end_layout
2380 \begin_layout Itemize
2381 h: The height of new bitmap
2382 \end_layout
2384 \begin_layout Itemize
2385 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2386 \end_layout
2388 \begin_layout Itemize
2389 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2390 \end_layout
2392 \begin_layout Subsubsection
2393 gui.bitmap_load(string file)
2394 \end_layout
2396 \begin_layout Standard
2397 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2398  for bitmap).
2399  Can be used anywhere.
2400  Parameters:
2401 \end_layout
2403 \begin_layout Itemize
2404 file: The name of file to load.
2405 \end_layout
2407 \begin_layout Subsubsection
2408 gui.palette_set(palette palette, number index, number color)
2409 \end_layout
2411 \begin_layout Standard
2412 Sets color in palette.
2413  Can be used anywhere.
2414  Parameters:
2415 \end_layout
2417 \begin_layout Itemize
2418 palette: The palette to manipulate
2419 \end_layout
2421 \begin_layout Itemize
2422 index: Index of color (0-65535).
2423 \end_layout
2425 \begin_layout Itemize
2426 color: The color value.
2427 \end_layout
2429 \begin_layout Subsubsection
2430 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2431 \end_layout
2433 \begin_layout Standard
2434 Sets specified pixel in bitmap.
2435  Can be used anywhere.
2436  Parameters:
2437 \end_layout
2439 \begin_layout Itemize
2440 bitmap: The bitmap to manipulate
2441 \end_layout
2443 \begin_layout Itemize
2444 x: The x-coordinate of the pixel.
2445 \end_layout
2447 \begin_layout Itemize
2448 y: The y-coordinate of the pixel.
2449 \end_layout
2451 \begin_layout Itemize
2452 color: If bitmap is a bitmap, color index (0-65535).
2453  Otherwise color value.
2454 \end_layout
2456 \begin_layout Subsubsection
2457 gui.bitmap_size(bitmap/dbitmap bitmap)
2458 \end_layout
2460 \begin_layout Standard
2461 Get size of bitmap.
2462  Can be used anywhere.
2463  Parameters:
2464 \end_layout
2466 \begin_layout Itemize
2467 bitmap: The bitmap to query.
2468 \end_layout
2470 \begin_layout Standard
2471 The first return is the width, the second is the height.
2472 \end_layout
2474 \begin_layout Subsubsection
2475 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2476  src, number sx, number sy, number w, number h[, number ck])
2477 \end_layout
2479 \begin_layout Standard
2480 Blit a part of bitmap to another.
2481  Can be used anywhere.
2482  Parameters:
2483 \end_layout
2485 \begin_layout Itemize
2486 dest: Destination to blit to.
2487 \end_layout
2489 \begin_layout Itemize
2490 dx: left edge of target
2491 \end_layout
2493 \begin_layout Itemize
2494 dy: Top edge of target
2495 \end_layout
2497 \begin_layout Itemize
2498 src: The source to blit from.
2499  Must be of the same type as destination.
2500 \end_layout
2502 \begin_layout Itemize
2503 sx: left edge of source
2504 \end_layout
2506 \begin_layout Itemize
2507 sy: Top edge of source
2508 \end_layout
2510 \begin_layout Itemize
2511 w: Width of region
2512 \end_layout
2514 \begin_layout Itemize
2515 h: Height of region.
2516 \end_layout
2518 \begin_layout Itemize
2519 ck: Color key.
2520  Pixels of this color are not blitted.
2521 \end_layout
2523 \begin_deeper
2524 \begin_layout Itemize
2525 If bitmaps are bitmaps, this is color index of colorkey.
2526  Values outside range 0-65535 cause no key to be used as colorkey.
2527 \end_layout
2529 \begin_layout Itemize
2530 If bitmaps are dbitmaps, this color value of colorkey.
2531 \end_layout
2533 \begin_layout Itemize
2534 May be absent or nil for no colorkey blit.
2535 \end_layout
2537 \end_deeper
2538 \begin_layout Subsubsection
2539 gui.repaint()
2540 \end_layout
2542 \begin_layout Standard
2543 Request on_repaint() to happen as soon as possible.
2544  Can be used anywhere.
2545 \end_layout
2547 \begin_layout Subsubsection
2548 gui.subframe_update(boolean on)
2549 \end_layout
2551 \begin_layout Standard
2552 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2553  or not happen (on=false).
2554  Can be used anywhere.
2555 \end_layout
2557 \begin_layout Subsubsection
2558 gui.screenshot(string filename)
2559 \end_layout
2561 \begin_layout Standard
2562 Write PNG screenshot of the current frame (no drawings) to specified file.
2563  Can be used anywhere.
2564 \end_layout
2566 \begin_layout Subsubsection
2567 gui.color(number r, number g, number b[, number a])
2568 \end_layout
2570 \begin_layout Standard
2571 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2572  each component in scale 0-255.
2573  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2574  opaque).
2575  The default alpha is 256.
2576 \end_layout
2578 \begin_layout Subsubsection
2579 gui.status(string name, string value)
2580 \end_layout
2582 \begin_layout Standard
2583 Set status field 
2584 \begin_inset Quotes eld
2585 \end_inset
2587 L[<name>]
2588 \begin_inset Quotes erd
2589 \end_inset
2591  to <value> in status area.
2592  Can be used anywhere.
2593 \end_layout
2595 \begin_layout Subsubsection
2596 gui.rainbow(number step, number steps[, number color])
2597 \end_layout
2599 \begin_layout Standard
2600 Perform hue rotation of color <color> (default bright red), by <step> steps.
2601  The number of steps per full rotation is given by absolute value of <steps>.
2602 \end_layout
2604 \begin_layout Standard
2605 If <steps> is negative, the rotation will be counterclockwise.
2606 \end_layout
2608 \begin_layout Subsection
2609 table input
2610 \end_layout
2612 \begin_layout Standard
2613 Input handling.
2614  Only available in on_input callback.
2615 \end_layout
2617 \begin_layout Subsubsection
2618 input.get(number controller, number index)
2619 \end_layout
2621 \begin_layout Standard
2622 Read the specified index (0-11) from specified controller (0-7).
2623  Notes:
2624 \end_layout
2626 \begin_layout Itemize
2627 Uses physical controller numbering.
2628  Gamepad in port 2 is controller 4, not 1!
2629 \end_layout
2631 \begin_layout Subsubsection
2632 input.set(number controller, number index, number value)
2633 \end_layout
2635 \begin_layout Standard
2636 Write the specified index (0-11) from specified controller (0-7), storing
2637  value.
2638  Notes:
2639 \end_layout
2641 \begin_layout Itemize
2642 Uses physical controller numbering.
2643  Gamepad in port 2 is controller 4, not 1!
2644 \end_layout
2646 \begin_layout Subsubsection
2647 input.geta(number controller)
2648 \end_layout
2650 \begin_layout Standard
2651 Get input state for entiere controller.
2652  Returns 13 return values.
2653 \end_layout
2655 \begin_layout Itemize
2656 1st return value: Bitmask: bit i is set if i:th index is nonzero
2657 \end_layout
2659 \begin_layout Itemize
2660 2nd-13th return value: value of i:th index.
2661 \end_layout
2663 \begin_layout Subsubsection
2664 input.seta(number controller, number bitmask, number args...)
2665 \end_layout
2667 \begin_layout Standard
2668 Set state for entiere controller.
2669  args is up to 12 values for indices (overriding values in bitmask if specified).
2670 \end_layout
2672 \begin_layout Subsubsection
2673 input.controllertype(number controller)
2674 \end_layout
2676 \begin_layout Standard
2677 Get the type of controller as string.
2678  Valid values are:
2679 \end_layout
2681 \begin_layout Itemize
2682 gamepad
2683 \end_layout
2685 \begin_layout Itemize
2686 mouse
2687 \end_layout
2689 \begin_layout Itemize
2690 justifier
2691 \end_layout
2693 \begin_layout Itemize
2694 superscope
2695 \end_layout
2697 \begin_layout Subsubsection
2698 input.reset([number cycles])
2699 \end_layout
2701 \begin_layout Standard
2702 Execute reset.
2703  If cycles is greater than zero, do delayed reset.
2704  0 (or no value) causes immediate reset.
2705 \end_layout
2707 \begin_layout Itemize
2708 Only available with subframe flag false.
2709 \end_layout
2711 \begin_layout Subsubsection
2712 input.raw()
2713 \end_layout
2715 \begin_layout Standard
2716 Returns table of tables of all available keys and axes.
2717  The first table is indexed by key name (platform-dependent!), and the inner
2718  table has the following fields:
2719 \end_layout
2721 \begin_layout Itemize
2722 last_rawval: Last reported raw value for control.
2723 \end_layout
2725 \begin_layout Itemize
2726 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
2727  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
2728 \end_layout
2730 \begin_layout Itemize
2731 cal_left: Minimum calibration value.
2732  Only meaningful with axis and pressure types.
2733 \end_layout
2735 \begin_layout Itemize
2736 cal_center: Center calibration value.
2737  Only meaningful with axis and pressure types.
2738 \end_layout
2740 \begin_layout Itemize
2741 cal_right: Maximum calibration value.
2742  Only meaningful with axis and pressure types.
2743 \end_layout
2745 \begin_layout Itemize
2746 cal_tolerance: Dead zone tolerance.
2747  Only meaningful with axis and pressure types.
2748 \end_layout
2750 \begin_layout Subsubsection
2751 input.keyhook(key, state)
2752 \end_layout
2754 \begin_layout Standard
2755 Requests that keyhook events to be sent for key (state=true) or not sent
2756  (state=false).
2757 \end_layout
2759 \begin_layout Subsection
2760 Table hostmemory
2761 \end_layout
2763 \begin_layout Standard
2764 Host memory handling (extra memory saved to savestates).
2765  Host memory starts empty.
2766 \end_layout
2768 \begin_layout Subsubsection
2769 hostmemory.read(number address)
2770 \end_layout
2772 \begin_layout Standard
2773 Reads hostmemory slot address.
2774  Slot numbers out of range return false instead of numeric.
2775 \end_layout
2777 \begin_layout Subsubsection
2778 hostmemory.write(number address, number value)
2779 \end_layout
2781 \begin_layout Standard
2782 Writes hostmemory slot with 0-255.
2783  Slot numbers out of range cause extension of host memory slot space.
2784 \end_layout
2786 \begin_layout Subsubsection
2787 hostmemory.readbyte(number address)
2788 \end_layout
2790 \begin_layout Standard
2791 Read unsigned byte (1 element) from given address.
2792  Slots out of range return false.
2793 \end_layout
2795 \begin_layout Subsubsection
2796 hostmemory.writebyte(number address, number value)
2797 \end_layout
2799 \begin_layout Standard
2800 Write unsigned byte (1 element) to given slot.
2801  Slot numbers out of range cause extension.
2802 \end_layout
2804 \begin_layout Subsubsection
2805 hostmemory.readsbyte(number address)
2806 \end_layout
2808 \begin_layout Standard
2809 Read signed byte (1 element) from given address.
2810  Slots out of range return false.
2811 \end_layout
2813 \begin_layout Subsubsection
2814 hostmemory.writesbyte(number address, number value)
2815 \end_layout
2817 \begin_layout Standard
2818 Write signed byte (1 element) to given slot.
2819  Slot numbers out of range cause extension.
2820 \end_layout
2822 \begin_layout Subsubsection
2823 hostmemory.readword(number address)
2824 \end_layout
2826 \begin_layout Standard
2827 Read unsigned word (2 elements) from given address.
2828  Slots out of range return false.
2829 \end_layout
2831 \begin_layout Subsubsection
2832 hostmemory.writeword(number address, number value)
2833 \end_layout
2835 \begin_layout Standard
2836 Write unsigned word (2 elements) to given slot.
2837  Slot numbers out of range cause extension.
2838 \end_layout
2840 \begin_layout Subsubsection
2841 hostmemory.readsword(number address)
2842 \end_layout
2844 \begin_layout Standard
2845 Read signed word (2 elements) from given address.
2846  Slots out of range return false.
2847 \end_layout
2849 \begin_layout Subsubsection
2850 hostmemory.writesword(number address, number value)
2851 \end_layout
2853 \begin_layout Standard
2854 Write signed word (2 elements) to given slot.
2855  Slot numbers out of range cause extension.
2856 \end_layout
2858 \begin_layout Subsubsection
2859 hostmemory.readdword(number address)
2860 \end_layout
2862 \begin_layout Standard
2863 Read unsigned doubleword (4 elements) from given address.
2864  Slots out of range return false.
2865 \end_layout
2867 \begin_layout Subsubsection
2868 hostmemory.writedword(number address, number value)
2869 \end_layout
2871 \begin_layout Standard
2872 Write unsigned doubleword (4 elements) to given slot.
2873  Slot numbers out of range cause extension.
2874 \end_layout
2876 \begin_layout Subsubsection
2877 hostmemory.readsdword(number address)
2878 \end_layout
2880 \begin_layout Standard
2881 Read signed doubleword (4 elements) from given address.
2882  Slots out of range return false.
2883 \end_layout
2885 \begin_layout Subsubsection
2886 hostmemory.writesdword(number address, number value)
2887 \end_layout
2889 \begin_layout Standard
2890 Write signed doubleword (4 elements) to given slot.
2891  Slot numbers out of range cause extension.
2892 \end_layout
2894 \begin_layout Subsubsection
2895 hostmemory.readqword(number address)
2896 \end_layout
2898 \begin_layout Standard
2899 Read unsigned quadword (8 elements) from given address.
2900  Slots out of range return false.
2901 \end_layout
2903 \begin_layout Subsubsection
2904 hostmemory.writeqword(number address, number value)
2905 \end_layout
2907 \begin_layout Standard
2908 Write unsigned quadword (4 elements) to given slot.
2909  Slot numbers out of range cause extension.
2910 \end_layout
2912 \begin_layout Subsubsection
2913 hostmemory.readsqword(number address)
2914 \end_layout
2916 \begin_layout Standard
2917 Read signed quadword (8 elements) from given address.
2918  Slots out of range return false.
2919 \end_layout
2921 \begin_layout Subsubsection
2922 hostmemory.writesqword(number address, number value)
2923 \end_layout
2925 \begin_layout Standard
2926 Write signed quadword (8 elements) to given slot.
2927  Slot numbers out of range cause extension.
2928 \end_layout
2930 \begin_layout Subsection
2931 Table movie
2932 \end_layout
2934 \begin_layout Standard
2935 Movie handling
2936 \end_layout
2938 \begin_layout Subsubsection
2939 movie.currentframe()
2940 \end_layout
2942 \begin_layout Standard
2943 Return number of current frame.
2944 \end_layout
2946 \begin_layout Subsubsection
2947 movie.framecount()
2948 \end_layout
2950 \begin_layout Standard
2951 Return number of frames in movie.
2952 \end_layout
2954 \begin_layout Subsubsection
2955 movie.readonly()
2956 \end_layout
2958 \begin_layout Standard
2959 Return true if in readonly mode, false if in readwrite.
2960 \end_layout
2962 \begin_layout Subsubsection
2963 movie.set_readwrite()
2964 \end_layout
2966 \begin_layout Standard
2967 Set readwrite mode (does not cause on_readwrite callback).
2968 \end_layout
2970 \begin_layout Subsubsection
2971 movie.frame_subframes(number frame)
2972 \end_layout
2974 \begin_layout Standard
2975 Count number of subframes in specified frame (frame numbers are 1-based)
2976  and return that.
2977 \end_layout
2979 \begin_layout Subsubsection
2980 movie.read_subframe(number frame, number subframe)
2981 \end_layout
2983 \begin_layout Standard
2984 Read specifed subframe in specified frame and return data as array (100
2985  elements, numbered 0-99 currently).
2986 \end_layout
2988 \begin_layout Subsubsection
2989 movie.unsafe_rewind([UNSAFEREWIND state])
2990 \end_layout
2992 \begin_layout Standard
2993 Start setting point for unsafe rewind or jump to point of unsafe rewind.
2994 \end_layout
2996 \begin_layout Itemize
2997 If called without argument, causes emulator to start process of setting
2998  unsafe rewind point.
2999  When this has finished, callback on_set_rewind occurs, passing the rewind
3000  state to lua script.
3001 \end_layout
3003 \begin_layout Itemize
3004 If called with argument, causes emulator rewind to passed rewind point as
3005  soon as possible.
3006  Readwrite mode is implicitly activated.
3007 \end_layout
3009 \begin_layout Standard
3010 The following warnings apply to unsafe rewinding:
3011 \end_layout
3013 \begin_layout Itemize
3014 There are no safety checks against misuse (that's what 
3015 \begin_inset Quotes eld
3016 \end_inset
3018 unsafe
3019 \begin_inset Quotes erd
3020 \end_inset
3022  comes from)!
3023 \end_layout
3025 \begin_layout Itemize
3026 Only call rewind from timeline rewind point was set from.
3027 \end_layout
3029 \begin_layout Itemize
3030 Only call rewind from after the rewind point was set.
3031 \end_layout
3033 \begin_layout Subsection
3034 Table settings
3035 \end_layout
3037 \begin_layout Standard
3038 Routines for settings manipulation
3039 \end_layout
3041 \begin_layout Subsubsection
3042 settings.get(string name)
3043 \end_layout
3045 \begin_layout Standard
3046 Get value of setting.
3047  If setting is blank, returns false.
3048  If setting value can't be obtained, returns (nil, error message).
3049 \end_layout
3051 \begin_layout Subsubsection
3052 settings.set(string name, string value)
3053 \end_layout
3055 \begin_layout Standard
3056 Set value of setting.
3057  If setting can't be set, returns (nil, error message).
3058 \end_layout
3060 \begin_layout Subsubsection
3061 settings.is_set(string name)
3062 \end_layout
3064 \begin_layout Standard
3065 Returns if setting is set.
3066  If setting does not exist, returns (nil, error message).
3067 \end_layout
3069 \begin_layout Subsubsection
3070 settings.blank(string name)
3071 \end_layout
3073 \begin_layout Standard
3074 Blanks a setting and returns true.
3075  If setting can't be blanked, returns (nil, error message).
3076 \end_layout
3078 \begin_layout Subsection
3079 Table memory
3080 \end_layout
3082 \begin_layout Standard
3083 Contains various functions for managing memory
3084 \end_layout
3086 \begin_layout Subsubsection
3087 memory.vma_count()
3088 \end_layout
3090 \begin_layout Standard
3091 Returns the number of VMAs
3092 \end_layout
3094 \begin_layout Subsubsection
3095 memory.read_vma(number index)
3096 \end_layout
3098 \begin_layout Standard
3099 Reads the specified VMA (indices start from zero).
3100  Trying to read invalid VMA gives nil.
3101  The read VMA is table with the following fields:
3102 \end_layout
3104 \begin_layout Itemize
3105 region_name (string): The readable name of the VMA
3106 \end_layout
3108 \begin_layout Itemize
3109 baseaddr (number): Base address of the VMA
3110 \end_layout
3112 \begin_layout Itemize
3113 lastaddr (number): Last address in the VMA.
3114 \end_layout
3116 \begin_layout Itemize
3117 size (number): The size of VMA in bytes.
3118 \end_layout
3120 \begin_layout Itemize
3121 readonly (boolean): True of the VMA corresponds to ROM.
3122 \end_layout
3124 \begin_layout Itemize
3125 iospace (boolean): True if the VMA is I/O space.
3126 \end_layout
3128 \begin_layout Itemize
3129 native_endian (boolean): True if the VMA has native endian as opposed to
3130  little endian.
3131 \end_layout
3133 \begin_layout Subsubsection
3134 memory.find_vma(number address)
3135 \end_layout
3137 \begin_layout Standard
3138 Finds the VMA containing specified address.
3139  Returns table in the same format as read_vma or nil if not found.
3140 \end_layout
3142 \begin_layout Subsubsection
3143 memory.readbyte(number address)
3144 \end_layout
3146 \begin_layout Standard
3147 Reads the specified address as unsigned byte and returns the result.
3148 \end_layout
3150 \begin_layout Subsubsection
3151 memory.readsbyte(number address)
3152 \end_layout
3154 \begin_layout Standard
3155 Reads the specified address as signed byte and returns the result.
3156 \end_layout
3158 \begin_layout Subsubsection
3159 memory.writebyte(number address, number value)
3160 \end_layout
3162 \begin_layout Standard
3163 Writes the specified value (negative values undergo 2's complement) to specified
3164  address (as a byte).
3165 \end_layout
3167 \begin_layout Subsubsection
3168 memory.readword(number address)
3169 \end_layout
3171 \begin_layout Standard
3172 Reads the specified address as unsigned word and returns the result.
3173 \end_layout
3175 \begin_layout Subsubsection
3176 memory.readsword(number address)
3177 \end_layout
3179 \begin_layout Standard
3180 Reads the specified address as signed word and returns the result.
3181 \end_layout
3183 \begin_layout Subsubsection
3184 memory.writeword(number address, number value)
3185 \end_layout
3187 \begin_layout Standard
3188 Writes the specified value (negative values undergo 2's complement) to specified
3189  address (as a word).
3190 \end_layout
3192 \begin_layout Subsubsection
3193 memory.readdword(number address)
3194 \end_layout
3196 \begin_layout Standard
3197 Reads the specified address as unsigned doubleword and returns the result.
3198 \end_layout
3200 \begin_layout Subsubsection
3201 memory.readsdword(number address)
3202 \end_layout
3204 \begin_layout Standard
3205 Reads the specified address as signed doubleword and returns the result.
3206 \end_layout
3208 \begin_layout Subsubsection
3209 memory.writedword(number address, number value)
3210 \end_layout
3212 \begin_layout Standard
3213 Writes the specified value (negative values undergo 2's complement) to specified
3214  address (as a doubleword).
3215 \end_layout
3217 \begin_layout Subsubsection
3218 memory.readqword(number address)
3219 \end_layout
3221 \begin_layout Standard
3222 Reads the specified address as unsigned quadword and returns the result.
3223 \end_layout
3225 \begin_layout Subsubsection
3226 memory.readsqword(number address)
3227 \end_layout
3229 \begin_layout Standard
3230 Reads the specified address as signed quadword and returns the result.
3231 \end_layout
3233 \begin_layout Subsubsection
3234 memory.writeqword(number address, number value)
3235 \end_layout
3237 \begin_layout Standard
3238 Writes the specified value (negative values undergo 2's complement) to specified
3239  address (as a quadword).
3240 \end_layout
3242 \begin_layout Subsubsection
3243 memory.hash_region(number base, number size)
3244 \end_layout
3246 \begin_layout Standard
3247 Hash specified number of bytes starting from specified address and return
3248  the SHA-256.
3249 \end_layout
3251 \begin_layout Subsection
3252 Table _SYSTEM
3253 \end_layout
3255 \begin_layout Standard
3256 Contains copy of global variables from time of Lua initialization.
3257  Non-writeable.
3258 \end_layout
3260 \begin_layout Subsection
3261 Callbacks
3262 \end_layout
3264 \begin_layout Standard
3265 Various callbacks to Lua that can occur.
3266 \end_layout
3268 \begin_layout Subsubsection
3269 Callback: on_paint(bool not_synth)
3270 \end_layout
3272 \begin_layout Standard
3273 Called when screen is being painted.
3274  Any gui.* calls requiring graphic context draw on the screen.
3275 \end_layout
3277 \begin_layout Standard
3278 not_synth is true if this hook is being called in response to received frame,
3279  false otherwise.
3280 \end_layout
3282 \begin_layout Subsubsection
3283 Callback: on_video()
3284 \end_layout
3286 \begin_layout Standard
3287 Called when video dump frame is being painted.
3288  Any gui.* calls requiring graphic context draw on the video.
3289 \end_layout
3291 \begin_layout Subsubsection
3292 Callback: on_frame_emulated()
3293 \end_layout
3295 \begin_layout Standard
3296 Called when emulating frame has completed and on_paint()/on_video() calls
3297  are about to be issued.
3298 \end_layout
3300 \begin_layout Subsubsection
3301 Callback: on_frame()
3302 \end_layout
3304 \begin_layout Standard
3305 Called on each starting whole frame.
3306 \end_layout
3308 \begin_layout Subsubsection
3309 Callback: on_startup()
3310 \end_layout
3312 \begin_layout Standard
3313 Called when the emulator is starting (lsnes.rc and --run files has been run).
3314 \end_layout
3316 \begin_layout Subsubsection
3317 Callback: on_rewind()
3318 \end_layout
3320 \begin_layout Standard
3321 Called when rewind movie to beginning has completed.
3322 \end_layout
3324 \begin_layout Subsubsection
3325 Callback: on_pre_load(string name)
3326 \end_layout
3328 \begin_layout Standard
3329 Called just before savestate/movie load occurs (note: loads are always delayed,
3330  so this occurs even when load was initiated by lua).
3331 \end_layout
3333 \begin_layout Subsubsection
3334 Callback: on_err_load(string name)
3335 \end_layout
3337 \begin_layout Standard
3338 Called if loadstate goes wrong.
3339 \end_layout
3341 \begin_layout Subsubsection
3342 Callback: on_post_load(string name, boolean was_savestate)
3343 \end_layout
3345 \begin_layout Standard
3346 Called on successful loadstate.
3347  was_savestate gives if this was a savestate or a movie.
3348 \end_layout
3350 \begin_layout Subsubsection
3351 Callback: on_pre_save(string name, boolean is_savestate)
3352 \end_layout
3354 \begin_layout Standard
3355 Called just before savestate save occurs (note: movie saves are synchronous
3356  and won't trigger these callbacks if called from Lua).
3357 \end_layout
3359 \begin_layout Subsubsection
3360 Callback: on_err_save(string name)
3361 \end_layout
3363 \begin_layout Standard
3364 Called if savestate goes wrong.
3365 \end_layout
3367 \begin_layout Subsubsection
3368 Callback: on_post_save(string name, boolean is_savestate)
3369 \end_layout
3371 \begin_layout Standard
3372 Called on successful savaestate.
3373  is_savestate gives if this was a savestate or a movie.
3374 \end_layout
3376 \begin_layout Subsubsection
3377 Callback: on_quit()
3378 \end_layout
3380 \begin_layout Standard
3381 Called when emulator is shutting down.
3382 \end_layout
3384 \begin_layout Subsubsection
3385 Callback: on_input(boolean subframe)
3386 \end_layout
3388 \begin_layout Standard
3389 Called when emulator is just sending input to bsnes core.
3390  Warning: This is called even in readonly mode, but the results are ignored.
3391 \end_layout
3393 \begin_layout Subsubsection
3394 Callback: on_reset()
3395 \end_layout
3397 \begin_layout Standard
3398 Called when SNES is reset.
3399 \end_layout
3401 \begin_layout Subsubsection
3402 Callback: on_readwrite()
3403 \end_layout
3405 \begin_layout Standard
3406 Called when moving into readwrite mode as result of 
3407 \begin_inset Quotes eld
3408 \end_inset
3410 set-rwmode
3411 \begin_inset Quotes erd
3412 \end_inset
3414  command (note: moving to rwmode by Lua won't trigger this, as per recursive
3415  entry protection).
3416 \end_layout
3418 \begin_layout Subsubsection
3419 Callback: on_snoop(number port, number controller, number index, number
3420  value)
3421 \end_layout
3423 \begin_layout Standard
3424 Called each time bsnes asks for input.
3425  The value is the final value to be sent to bsnes core (readonly mode, autohold
3426  and autofire have been taken into account).
3427  Might be useful when translating movies to format suitable for console
3428  verification.
3429  Note: There is no way to modify the value to be sent.
3430 \end_layout
3432 \begin_layout Subsubsection
3433 Callback: on_keyhook(string keyname, table state)
3434 \end_layout
3436 \begin_layout Standard
3437 Sent when key that has keyhook events requested changes state.
3438  Keyname is name of the key (group) and state is the state (same kind as
3439  table values in input.raw).
3440 \end_layout
3442 \begin_layout Subsubsection
3443 Callback: on_idle()
3444 \end_layout
3446 \begin_layout Standard
3447 Called when requested by set_idle_timeout(), the timeout has expired and
3448  emulator is waiting.
3449 \end_layout
3451 \begin_layout Subsubsection
3452 Callback: on_timer()
3453 \end_layout
3455 \begin_layout Standard
3456 Called when requested by set_idle_timeout() and the timeout has expired
3457  (regardless if emulator is waiting).
3458 \end_layout
3460 \begin_layout Subsubsection
3461 Callback: on_set_rewind(UNSAFEREWIND r)
3462 \end_layout
3464 \begin_layout Standard
3465 Called when unsafe rewind object has been constructed.
3466 \end_layout
3468 \begin_layout Subsubsection
3469 Callback: on_pre_rewind() 
3470 \end_layout
3472 \begin_layout Standard
3473 Called just before unsafe rewind is about to occur.
3474 \end_layout
3476 \begin_layout Subsubsection
3477 Callback: on_post_rewind() 
3478 \end_layout
3480 \begin_layout Standard
3481 Called just after unsafe rewind has occured.
3482 \end_layout
3484 \begin_layout Section
3485 Memory watch expression syntax
3486 \end_layout
3488 \begin_layout Standard
3489 Memory watch expressions are in RPN (Reverse Polish Notation).
3490  At the end of expression, the top entry on stack is taken as the final
3491  result.
3492 \end_layout
3494 \begin_layout Standard
3495 Notations:
3496 \end_layout
3498 \begin_layout Itemize
3499 Evaluation order is strictly left to right.
3500 \end_layout
3502 \begin_layout Itemize
3503 a is the entry on top of stack
3504 \end_layout
3506 \begin_layout Itemize
3507 b is the entry immediately below top of stack
3508 \end_layout
3510 \begin_layout Itemize
3511 ; separates values to be pushed (no intermediate pop).
3512 \end_layout
3514 \begin_layout Itemize
3515 After end of element, all used stack slots are popped and all results are
3516  pushed.
3517 \end_layout
3519 \begin_layout Itemize
3520 When pushing multiple values, the pushes occur in order shown.
3521 \end_layout
3523 \begin_layout Standard
3524 The following operators are available:
3525 \end_layout
3527 \begin_layout Itemize
3528 + : a + b
3529 \end_layout
3531 \begin_layout Itemize
3532 - : a - b
3533 \end_layout
3535 \begin_layout Itemize
3536 * : a * b
3537 \end_layout
3539 \begin_layout Itemize
3540 / : a / b
3541 \end_layout
3543 \begin_layout Itemize
3544 % : a % b
3545 \end_layout
3547 \begin_layout Itemize
3548 a : atan(a)
3549 \end_layout
3551 \begin_layout Itemize
3552 b : read_signed_byte(a)
3553 \end_layout
3555 \begin_layout Itemize
3556 c : cos(a)
3557 \end_layout
3559 \begin_layout Itemize
3560 d : read_signed_dword(a)
3561 \end_layout
3563 \begin_layout Itemize
3564 i : quotent(a / b)
3565 \end_layout
3567 \begin_layout Itemize
3568 p :
3569 \begin_inset Formula $\pi$
3570 \end_inset
3573 \end_layout
3575 \begin_layout Itemize
3576 q : read_signed_qword(a)
3577 \end_layout
3579 \begin_layout Itemize
3580 r : sqrt(a)
3581 \end_layout
3583 \begin_layout Itemize
3584 s : sin(a)
3585 \end_layout
3587 \begin_layout Itemize
3588 t : tan(a)
3589 \end_layout
3591 \begin_layout Itemize
3592 u : a; a
3593 \end_layout
3595 \begin_layout Itemize
3596 w : read_signed_word(a)
3597 \end_layout
3599 \begin_layout Itemize
3600 A : atan2(a, b)
3601 \end_layout
3603 \begin_layout Itemize
3604 B : read_unsigned_byte(a)
3605 \end_layout
3607 \begin_layout Itemize
3608 C<number>z : Push number <number> to stack.
3609 \end_layout
3611 \begin_layout Itemize
3612 D : read_unsigned_dword(a)
3613 \end_layout
3615 \begin_layout Itemize
3616 C0x<number>z : Push number <number> (hexadecimal) to stack.
3617 \end_layout
3619 \begin_layout Itemize
3620 Q : read_unsigned_qword(a)
3621 \end_layout
3623 \begin_layout Itemize
3624 R<digit> : round a to <digit> digits.
3625 \end_layout
3627 \begin_layout Itemize
3628 W : read_unsigned_word(a)
3629 \end_layout
3631 \begin_layout Subsection
3632 Example:
3633 \end_layout
3635 \begin_layout Standard
3636 C0x007e0878zWC0x007e002czW-
3637 \end_layout
3639 \begin_layout Enumerate
3640 Push value 0x7e0878 on top of stack (C0x007e0878z).
3641 \end_layout
3643 \begin_layout Enumerate
3644 Pop the value on top of stack (0x7e0878), read word value at that address
3645  and push the result,call it x1 (W).
3646 \end_layout
3648 \begin_layout Enumerate
3649 Push value 0x7e002c on top of stack (C0x007e002cz).
3650 \end_layout
3652 \begin_layout Enumerate
3653 Pop the value on top of stack (0x7e002c), read word value at that address
3654  and push the result,call it x2 (W).
3655 \end_layout
3657 \begin_layout Enumerate
3658 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
3659  x2 - x1 (-).
3660 \end_layout
3662 \begin_layout Enumerate
3663 Since the expression ends, the final memory watch result is the top one
3664  on stack, which is x2 - x1.
3665 \end_layout
3667 \begin_layout Section
3668 Modifier and key names:
3669 \end_layout
3671 \begin_layout Subsection
3672 SDL Platform
3673 \end_layout
3675 \begin_layout Subsubsection
3676 Modifier names
3677 \end_layout
3679 \begin_layout Standard
3680 Following modifier names are known:
3681 \end_layout
3683 \begin_layout Itemize
3684 ctrl, lctrl, rctrl: Control keys
3685 \end_layout
3687 \begin_layout Itemize
3688 alt, lalt, ralt: ALT keys.
3689 \end_layout
3691 \begin_layout Itemize
3692 shift, lshift, rshift: Shift keys.
3693 \end_layout
3695 \begin_layout Itemize
3696 meta, lmeta, rmeta: Meta keys.
3697 \end_layout
3699 \begin_layout Itemize
3700 num, caps: Numlock/Capslock (these are sticky!)
3701 \end_layout
3703 \begin_layout Itemize
3704 mode: Mode select.
3705 \end_layout
3707 \begin_layout Subsubsection
3708 Key names
3709 \end_layout
3711 \begin_layout Standard
3712 Following key names are known:
3713 \end_layout
3715 \begin_layout Itemize
3716 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
3717  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
3718  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
3719  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
3720  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
3721  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
3722  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
3723  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
3724  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
3725  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
3726  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
3727  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
3728  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
3729  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
3730  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
3731  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
3732  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
3733  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
3734  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
3735  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
3736  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
3737  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
3738  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
3739  break, menu, power, euro, undo
3740 \end_layout
3742 \begin_layout Itemize
3743 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
3744  hardware-dependent scan code of <n> (useful to bind those keys that don't
3745  have symbolic names).
3746 \end_layout
3748 \begin_layout Subsubsection
3749 Joystick pseudo-keys:
3750 \end_layout
3752 \begin_layout Itemize
3753 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
3754 \end_layout
3756 \begin_layout Itemize
3757 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
3758 \end_layout
3760 \begin_layout Itemize
3761 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
3762 \end_layout
3764 \begin_layout Itemize
3765 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
3766 \end_layout
3768 \begin_layout Itemize
3769 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
3770 \end_layout
3772 \begin_layout Itemize
3773 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
3774  position (axis modes axis and axis_inverse).
3775 \end_layout
3777 \begin_layout Itemize
3778 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
3779  position (axis modes axis and axis_inverse).
3780 \end_layout
3782 \begin_layout Itemize
3783 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
3784  modes pressure_*).
3785 \end_layout
3787 \begin_layout Subsubsection
3788 Special buttons:
3789 \end_layout
3791 \begin_layout Itemize
3792 Escape: Enter/Exit Command mode, cancel modal dialogs.
3793 \end_layout
3795 \begin_layout Itemize
3796 Return (also KPEnter): Execute command, ok modal dialog.
3797 \end_layout
3799 \begin_layout Itemize
3800 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
3801  in command history
3802 \end_layout
3804 \begin_layout Itemize
3805 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
3806  in command history
3807 \end_layout
3809 \begin_layout Itemize
3810 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
3811 \end_layout
3813 \begin_layout Itemize
3814 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
3815 \end_layout
3817 \begin_layout Itemize
3818 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
3819 \end_layout
3821 \begin_layout Itemize
3822 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
3823 \end_layout
3825 \begin_layout Itemize
3826 Delete (also KP.
3827  if no num lock; command mode): Delete character to right of cursor.
3828 \end_layout
3830 \begin_layout Itemize
3831 Insert (also KP0 if no num lock; command mode): Toggle between insert /
3832  overwrite modes.
3833 \end_layout
3835 \begin_layout Itemize
3836 Backspace (command mode): Delete character to left of cursor.
3837 \end_layout
3839 \begin_layout Itemize
3840 CTRL+LEFT (also ALT+B; command mode): Previous word.
3841 \end_layout
3843 \begin_layout Itemize
3844 CTRL+RIGHT (also ALT+F; command mode): Next word.
3845 \end_layout
3847 \begin_layout Itemize
3848 ALT+D (also CTRL+W; command mode): Delete word.
3849 \end_layout
3851 \begin_layout Itemize
3852 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
3853 \end_layout
3855 \begin_layout Subsection
3856 wxWidgets platform
3857 \end_layout
3859 \begin_layout Subsubsection
3860 Modifier names:
3861 \end_layout
3863 \begin_layout Standard
3864 Following modifier names are known:
3865 \end_layout
3867 \begin_layout Itemize
3869 \end_layout
3871 \begin_layout Itemize
3872 ctrl
3873 \end_layout
3875 \begin_layout Itemize
3876 shift 
3877 \end_layout
3879 \begin_layout Itemize
3880 meta
3881 \end_layout
3883 \begin_layout Itemize
3884 cmd (Mac OS X only)
3885 \end_layout
3887 \begin_layout Subsubsection
3888 Key names:
3889 \end_layout
3891 \begin_layout Standard
3892 Following key names are known:
3893 \end_layout
3895 \begin_layout Itemize
3896 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
3897  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
3898  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
3899  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3900  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
3901  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
3902  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
3903  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
3904  pause, capital, end, home, lefT, up, right, down, select, print, execute,
3905  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
3906  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
3907  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
3908  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
3909  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
3910  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
3911  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
3912  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
3913  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
3914  windows_right, windows_menu, command, special1, special2, special3, special4,
3915  special5, special6, special7, special8, special9, special10, special11,
3916  special12, special13, special14, special15, special16, special17, special18,
3917  special19, special20
3918 \end_layout
3920 \begin_layout Section
3921 Movie file format
3922 \end_layout
3924 \begin_layout Standard
3925 Movie file is .zip archive in itself, normal ZIP archive tools work on it
3926  (note: If you recompress it, do not use compression methods other than
3927  store and deflate and especially do not use encryption of any kind).
3928 \end_layout
3930 \begin_layout Subsection
3931 Detecting clean start/SRAM/Savestate
3932 \end_layout
3934 \begin_layout Itemize
3935 If file has member 
3936 \begin_inset Quotes eld
3937 \end_inset
3939 savestate
3940 \begin_inset Quotes erd
3941 \end_inset
3943  it is savestate, otherwise:
3944 \end_layout
3946 \begin_layout Itemize
3947 If file has members with names starting 
3948 \begin_inset Quotes eld
3949 \end_inset
3951 moviesram.
3952 \begin_inset Quotes erd
3953 \end_inset
3955  it is movie starting from SRAM, otherwise:
3956 \end_layout
3958 \begin_layout Itemize
3959 It is movie starting from clear state.
3960 \end_layout
3962 \begin_layout Subsection
3963 Member: gametype
3964 \end_layout
3966 \begin_layout Standard
3967 Type of game ROM and region (as one line).
3968  Valid values are:
3969 \end_layout
3971 \begin_layout Standard
3972 \begin_inset Tabular
3973 <lyxtabular version="3" rows="8" columns="3">
3974 <features tabularvalignment="middle">
3975 <column alignment="center" valignment="top" width="0">
3976 <column alignment="center" valignment="top" width="0">
3977 <column alignment="center" valignment="top" width="0">
3978 <row>
3979 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3980 \begin_inset Text
3982 \begin_layout Plain Layout
3983 Value
3984 \end_layout
3986 \end_inset
3987 </cell>
3988 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3989 \begin_inset Text
3991 \begin_layout Plain Layout
3992 System
3993 \end_layout
3995 \end_inset
3996 </cell>
3997 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3998 \begin_inset Text
4000 \begin_layout Plain Layout
4001 Region
4002 \end_layout
4004 \end_inset
4005 </cell>
4006 </row>
4007 <row>
4008 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4009 \begin_inset Text
4011 \begin_layout Plain Layout
4012 snes_pal
4013 \end_layout
4015 \end_inset
4016 </cell>
4017 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4018 \begin_inset Text
4020 \begin_layout Plain Layout
4021 Super NES
4022 \end_layout
4024 \end_inset
4025 </cell>
4026 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4027 \begin_inset Text
4029 \begin_layout Plain Layout
4031 \end_layout
4033 \end_inset
4034 </cell>
4035 </row>
4036 <row>
4037 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4038 \begin_inset Text
4040 \begin_layout Plain Layout
4041 sgb_pal
4042 \end_layout
4044 \end_inset
4045 </cell>
4046 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4047 \begin_inset Text
4049 \begin_layout Plain Layout
4050 Super Game Boy
4051 \end_layout
4053 \end_inset
4054 </cell>
4055 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4056 \begin_inset Text
4058 \begin_layout Plain Layout
4060 \end_layout
4062 \end_inset
4063 </cell>
4064 </row>
4065 <row>
4066 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4067 \begin_inset Text
4069 \begin_layout Plain Layout
4070 snes_ntsc
4071 \end_layout
4073 \end_inset
4074 </cell>
4075 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4076 \begin_inset Text
4078 \begin_layout Plain Layout
4079 Super NES
4080 \end_layout
4082 \end_inset
4083 </cell>
4084 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4085 \begin_inset Text
4087 \begin_layout Plain Layout
4088 NTSC
4089 \end_layout
4091 \end_inset
4092 </cell>
4093 </row>
4094 <row>
4095 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4096 \begin_inset Text
4098 \begin_layout Plain Layout
4099 sgb_ntsc
4100 \end_layout
4102 \end_inset
4103 </cell>
4104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4105 \begin_inset Text
4107 \begin_layout Plain Layout
4108 Super Game Boy
4109 \end_layout
4111 \end_inset
4112 </cell>
4113 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4114 \begin_inset Text
4116 \begin_layout Plain Layout
4117 NTSC
4118 \end_layout
4120 \end_inset
4121 </cell>
4122 </row>
4123 <row>
4124 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4125 \begin_inset Text
4127 \begin_layout Plain Layout
4129 \end_layout
4131 \end_inset
4132 </cell>
4133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4134 \begin_inset Text
4136 \begin_layout Plain Layout
4137 BS-X (non-slotted)
4138 \end_layout
4140 \end_inset
4141 </cell>
4142 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4143 \begin_inset Text
4145 \begin_layout Plain Layout
4146 NTSC
4147 \end_layout
4149 \end_inset
4150 </cell>
4151 </row>
4152 <row>
4153 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4154 \begin_inset Text
4156 \begin_layout Plain Layout
4157 bsxslotted
4158 \end_layout
4160 \end_inset
4161 </cell>
4162 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4163 \begin_inset Text
4165 \begin_layout Plain Layout
4166 BS-X (slotted)
4167 \end_layout
4169 \end_inset
4170 </cell>
4171 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4172 \begin_inset Text
4174 \begin_layout Plain Layout
4175 NTSC
4176 \end_layout
4178 \end_inset
4179 </cell>
4180 </row>
4181 <row>
4182 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4183 \begin_inset Text
4185 \begin_layout Plain Layout
4186 sufamiturbo
4187 \end_layout
4189 \end_inset
4190 </cell>
4191 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4192 \begin_inset Text
4194 \begin_layout Plain Layout
4195 Sufami Turbo
4196 \end_layout
4198 \end_inset
4199 </cell>
4200 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4201 \begin_inset Text
4203 \begin_layout Plain Layout
4204 NTSC
4205 \end_layout
4207 \end_inset
4208 </cell>
4209 </row>
4210 </lyxtabular>
4212 \end_inset
4215 \end_layout
4217 \begin_layout Standard
4218 Frame rates are:
4219 \end_layout
4221 \begin_layout Standard
4222 \begin_inset Tabular
4223 <lyxtabular version="3" rows="3" columns="2">
4224 <features tabularvalignment="middle">
4225 <column alignment="center" valignment="top" width="0">
4226 <column alignment="center" valignment="top" width="0">
4227 <row>
4228 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4229 \begin_inset Text
4231 \begin_layout Plain Layout
4232 Region
4233 \end_layout
4235 \end_inset
4236 </cell>
4237 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4238 \begin_inset Text
4240 \begin_layout Plain Layout
4241 Framerate (fps)
4242 \end_layout
4244 \end_inset
4245 </cell>
4246 </row>
4247 <row>
4248 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4249 \begin_inset Text
4251 \begin_layout Plain Layout
4253 \end_layout
4255 \end_inset
4256 </cell>
4257 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4258 \begin_inset Text
4260 \begin_layout Plain Layout
4261 322445/6448
4262 \end_layout
4264 \end_inset
4265 </cell>
4266 </row>
4267 <row>
4268 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4269 \begin_inset Text
4271 \begin_layout Plain Layout
4272 NTSC
4273 \end_layout
4275 \end_inset
4276 </cell>
4277 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4278 \begin_inset Text
4280 \begin_layout Plain Layout
4281 10738636/178683
4282 \end_layout
4284 \end_inset
4285 </cell>
4286 </row>
4287 </lyxtabular>
4289 \end_inset
4292 \end_layout
4294 \begin_layout Subsection
4295 Member: port1
4296 \end_layout
4298 \begin_layout Standard
4299 Contains type of port #1 (as one line).
4300  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
4301  If not present, defaults to 'gamepad'.
4302 \end_layout
4304 \begin_layout Subsection
4305 Member: port2
4306 \end_layout
4308 \begin_layout Standard
4309 Contains type of port #2 (as one line).
4310  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
4311  'justifier' and 'justifiers'.
4312  If not present, defaults to 'none'.
4313 \end_layout
4315 \begin_layout Subsection
4316 Member: gamename
4317 \end_layout
4319 \begin_layout Standard
4320 Contains name of the game (as one line).
4321 \end_layout
4323 \begin_layout Subsection
4324 Member: authors
4325 \end_layout
4327 \begin_layout Standard
4328 Contains authors, one per line.
4329  Part before '|' is the full name, part after is the nickname.
4330 \end_layout
4332 \begin_layout Subsection
4333 Member: systemid
4334 \end_layout
4336 \begin_layout Standard
4337 Always 
4338 \begin_inset Quotes eld
4339 \end_inset
4341 lsnes-rr1
4342 \begin_inset Quotes erd
4343 \end_inset
4345  (one line).
4346  Used to reject other saves.
4347 \end_layout
4349 \begin_layout Subsection
4350 Member: controlsversion
4351 \end_layout
4353 \begin_layout Standard
4354 Always 
4355 \begin_inset Quotes eld
4356 \end_inset
4359 \begin_inset Quotes erd
4360 \end_inset
4362  (one line).
4363  Used to identify what controls are there.
4364 \end_layout
4366 \begin_layout Subsection
4367 Member: 
4368 \begin_inset Quotes eld
4369 \end_inset
4371 coreversion
4372 \begin_inset Quotes erd
4373 \end_inset
4376 \end_layout
4378 \begin_layout Standard
4379 Contains bsnes core version number (as one line).
4380 \end_layout
4382 \begin_layout Subsection
4383 Member: projectid
4384 \end_layout
4386 \begin_layout Standard
4387 Contains project ID (as one line).
4388  Used to identify if two movies are part of the same project.
4389 \end_layout
4391 \begin_layout Subsection
4392 Member: {rom,slota,slotb}{,xml}.sha256
4393 \end_layout
4395 \begin_layout Standard
4396 Contains SHA-256 of said ROM or ROM mapping file (as one line).
4397  Absent if corresponding file is absent.
4398 \end_layout
4400 \begin_layout Subsection
4401 Member: moviesram.<name>
4402 \end_layout
4404 \begin_layout Standard
4405 Raw binary startup SRAM of kind <name>.
4406  Only present in savestates and movies starting from SRAM.
4407 \end_layout
4409 \begin_layout Subsection
4410 Member: saveframe
4411 \end_layout
4413 \begin_layout Standard
4414 Contains frame number (as one line) of frame movie was saved on.
4415  Only present in savestates.
4416 \end_layout
4418 \begin_layout Subsection
4419 Member: lagcounter
4420 \end_layout
4422 \begin_layout Standard
4423 Current value of lag counter (as one line).
4424  Only present in savestates.
4425 \end_layout
4427 \begin_layout Subsection
4428 Member: pollcounters
4429 \end_layout
4431 \begin_layout Standard
4432 Contains poll counters (currently 100 of them), one per line.
4433  Each line is raw poll count if DRDY is set for it.
4434  Otherwise it is negative poll count minus one.
4435  Only present in savestates.
4436 \end_layout
4438 \begin_layout Subsection
4439 Member: hostmemory
4440 \end_layout
4442 \begin_layout Standard
4443 Raw binary dump of host memory.
4444  Only present in savestates.
4445 \end_layout
4447 \begin_layout Subsection
4448 Member: savestate
4449 \end_layout
4451 \begin_layout Standard
4452 The raw binary savestate itself.
4453  Savestate detection uses this file, only present in savestates.
4454 \end_layout
4456 \begin_layout Subsection
4457 Member: screenshot
4458 \end_layout
4460 \begin_layout Standard
4461 Screenshot of current frame.
4462  Only present in savestates.
4463  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
4464  data.
4465  Height of image is inferred from the width and size of data.
4466 \end_layout
4468 \begin_layout Subsection
4469 Member: sram.<name>
4470 \end_layout
4472 \begin_layout Standard
4473 Raw binary SRAM of kind <name> at time of savestate.
4474  Only present in savestates.
4475 \end_layout
4477 \begin_layout Subsection
4478 Member: input
4479 \end_layout
4481 \begin_layout Standard
4482 The actual input track, one line per subframe (blank lines are skipped).
4483 \end_layout
4485 \begin_layout Itemize
4486 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
4487  part of same frame as previous, otherwise it starts a new frame.
4488 \end_layout
4490 \begin_layout Itemize
4491 First subframe must start a new frame.
4492 \end_layout
4494 \begin_layout Standard
4495 Length of movie in frames is number of lines in input file that start a
4496  new frame.
4497 \end_layout
4499 \begin_layout Subsection
4500 Member: rerecords
4501 \end_layout
4503 \begin_layout Standard
4504 Contains textual base-10 rerecord count (as one line; emulator just writes
4505  this, it doesn't read it) + 1.
4506 \end_layout
4508 \begin_layout Subsection
4509 Member: rrdata
4510 \end_layout
4512 \begin_layout Standard
4513 This member stores set of load IDs.
4514  There is one load ID per rerecord (plus one corresponding to start of project).
4515 \end_layout
4517 \begin_layout Itemize
4518 This member constists of concatenation of records
4519 \end_layout
4521 \begin_layout Itemize
4522 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
4523  IDs.
4524 \end_layout
4526 \begin_layout Itemize
4527 IDs are interpretted as 256-bit big-endian integers with warparound.
4528 \end_layout
4530 \begin_layout Itemize
4531 Initial predicted ID is all zeroes.
4532 \end_layout
4534 \begin_layout Standard
4535 Format of each record is:
4536 \end_layout
4538 \begin_layout Itemize
4539 1 byte: Opcode byte.
4540  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
4541  Bit 7 is unused.
4542 \end_layout
4544 \begin_layout Itemize
4545 32-prefixlen bytes of ID.
4546 \end_layout
4548 \begin_layout Itemize
4549 countlen bytes of big-endian count (count).
4550 \end_layout
4552 \begin_layout Standard
4553 Records are processed as follows:
4554 \end_layout
4556 \begin_layout Itemize
4557 To form the first ID encoded by record, take the first prefixlen bytes predicted
4558  ID and append the read ID value to it.
4559  The result is the first ID encoded.
4560 \end_layout
4562 \begin_layout Itemize
4563 If countlen is 0, record encodes 1 ID.
4564 \end_layout
4566 \begin_layout Itemize
4567 If countlen is 1, record encodes 2+count IDs.
4568 \end_layout
4570 \begin_layout Itemize
4571 If countlen is 2, record encodes 258+count IDs.
4572 \end_layout
4574 \begin_layout Itemize
4575 If countlen is 3, record encodes 65794+count IDs.
4576 \end_layout
4578 \begin_layout Itemize
4579 The new predicted ID is the next ID after last one encoded by the record.
4580 \end_layout
4582 \begin_layout Standard
4583 The number of rerecords + 1 is equal to the sum of number of IDs encoded
4584  by all records.
4585 \end_layout
4587 \begin_layout Subsection
4588 Member: starttime.second
4589 \end_layout
4591 \begin_layout Standard
4592 Movie starting time, second part.
4593  Epoch is Unix epoch.
4594  Default is 1,000,000,000.
4595 \end_layout
4597 \begin_layout Subsection
4598 Member: starttime.subsecond
4599 \end_layout
4601 \begin_layout Standard
4602 Movie starting time, subsecond part.
4603  Unit is CPU clocks.
4604  Default is 0.
4605 \end_layout
4607 \begin_layout Subsection
4608 Member: savetime.second
4609 \end_layout
4611 \begin_layout Standard
4612 Movie saving time, second part.
4613  Default is starttime.second.
4614  Only present in savestates.
4615 \end_layout
4617 \begin_layout Subsection
4618 Member: savetime.subsecond
4619 \end_layout
4621 \begin_layout Standard
4622 Movie saving time, subsecond part.
4623  Default is starttime.subsecond.
4624  Only present in savestates.
4625 \end_layout
4627 \begin_layout Section
4628 Quick'n'dirty encode guide
4629 \end_layout
4631 \begin_layout Enumerate
4632 Start the emulator and load the movie file.
4633 \end_layout
4635 \begin_layout Enumerate
4636 Set large AVI option 'set-setting avi-large on'
4637 \end_layout
4639 \begin_layout Enumerate
4640 Enable dumping 'dump-avi tmpdump' 
4641 \end_layout
4643 \begin_layout Enumerate
4644 Unpause and let it run until you want to end dumping.
4645 \end_layout
4647 \begin_layout Enumerate
4648 Close the emulator (closing the window is the easiest way).
4649  Or use 'end-avi'.
4650 \end_layout
4652 \begin_layout Enumerate
4653 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
4654  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
4655 \end_layout
4657 \begin_layout Enumerate
4658 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
4659 \end_layout
4661 \begin_layout Enumerate
4662 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
4663  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
4664 \end_layout
4666 \begin_layout Enumerate
4667 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
4668  Now final.mkv contains quick'n'dirty encode.
4669 \end_layout
4671 \begin_layout Section
4672 Axis configurations for some gamepad types:
4673 \end_layout
4675 \begin_layout Subsection
4676 XBox360 controller:
4677 \end_layout
4679 \begin_layout Standard
4680 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
4681 \end_layout
4683 \begin_layout LyX-Code
4684 set-axis joystick0axis2 pressure-+
4685 \end_layout
4687 \begin_layout LyX-Code
4688 set-axis joystick0axis5 pressure-+
4689 \end_layout
4691 \begin_layout Itemize
4692 This is needed for SDL only.
4693  EVDEV sets those types correctly.
4694 \end_layout
4696 \begin_layout Subsection
4697 PS3 
4698 \begin_inset Quotes eld
4699 \end_inset
4701 sixaxis
4702 \begin_inset Quotes erd
4703 \end_inset
4705  controller:
4706 \end_layout
4708 \begin_layout Standard
4709 Axes 8-19 should be disabled.
4710 \end_layout
4712 \begin_layout LyX-Code
4713 set-axis joystick0axis8 disabled
4714 \end_layout
4716 \begin_layout LyX-Code
4717 set-axis joystick0axis9 disabled
4718 \end_layout
4720 \begin_layout LyX-Code
4721 set-axis joystick0axis10 disabled
4722 \end_layout
4724 \begin_layout LyX-Code
4725 set-axis joystick0axis11 disabled
4726 \end_layout
4728 \begin_layout LyX-Code
4729 set-axis joystick0axis12 disabled
4730 \end_layout
4732 \begin_layout LyX-Code
4733 set-axis joystick0axis13 disabled
4734 \end_layout
4736 \begin_layout LyX-Code
4737 set-axis joystick0axis14 disabled
4738 \end_layout
4740 \begin_layout LyX-Code
4741 set-axis joystick0axis15 disabled
4742 \end_layout
4744 \begin_layout LyX-Code
4745 set-axis joystick0axis16 disabled
4746 \end_layout
4748 \begin_layout LyX-Code
4749 set-axis joystick0axis17 disabled
4750 \end_layout
4752 \begin_layout LyX-Code
4753 set-axis joystick0axis18 disabled
4754 \end_layout
4756 \begin_layout LyX-Code
4757 set-axis joystick0axis19 disabled
4758 \end_layout
4760 \begin_layout Section
4761 Errata:
4762 \end_layout
4764 \begin_layout Subsection
4765 Problems from BSNES core:
4766 \end_layout
4768 \begin_layout Itemize
4769 The whole pending save stuff.
4770 \end_layout
4772 \begin_layout Itemize
4773 Lack of layer hiding.
4774 \end_layout
4776 \begin_layout Itemize
4777 It is slow (especially accuracy).
4778 \end_layout
4780 \begin_layout Itemize
4781 Firmwares can't be loaded from ZIP archives.
4782 \end_layout
4784 \begin_layout Subsection
4785 Other problems:
4786 \end_layout
4788 \begin_layout Itemize
4789 Modifiers don't work with pseudo-keys (SDL, EVDEV).
4790 \end_layout
4792 \begin_layout Itemize
4793 Audio for last dumped frame is not itself dumped.
4794 \end_layout
4796 \begin_layout Itemize
4797 Audio in UI is pretty bad in quality if game doesn't run at full speed.
4798 \end_layout
4800 \begin_layout Itemize
4801 AVI compression levels 10-18 are not compatible with AVISynth AVISource.
4802 \end_layout
4804 \begin_layout Itemize
4805 No menus, command based interface (SDL).
4806 \end_layout
4808 \begin_layout Itemize
4809 Long commands don't scroll.
4810 \end_layout
4812 \begin_layout Itemize
4813 Wxwidgets UI is still buggy.
4814 \end_layout
4816 \begin_layout Section
4817 Changelog:
4818 \end_layout
4820 \begin_layout Subsection
4821 rr0-beta1
4822 \end_layout
4824 \begin_layout Itemize
4825 Fix -Wall warnings
4826 \end_layout
4828 \begin_layout Itemize
4829 Fix dumper video corruption with levels 10-18.
4830 \end_layout
4832 \begin_layout Subsection
4833 rr0-beta2
4834 \end_layout
4836 \begin_layout Itemize
4837 Autofire
4838 \end_layout
4840 \begin_layout Itemize
4841 Lots of code cleanups
4842 \end_layout
4844 \begin_layout Itemize
4845 Lua interface to settings
4846 \end_layout
4848 \begin_layout Itemize
4849 Allow specifying AVI borders without Lua
4850 \end_layout
4852 \begin_layout Itemize
4853 Fix scaling if vscale > 1 and originx > 0 (left border exists)
4854 \end_layout
4856 \begin_layout Itemize
4857 on_snoop lua callback
4858 \end_layout
4860 \begin_layout Itemize
4861 Faster movie loading and saving.
4862 \end_layout
4864 \begin_layout Subsection
4865 rr0-beta3
4866 \end_layout
4868 \begin_layout Itemize
4869 Joystick support
4870 \end_layout
4872 \begin_layout Subsection
4873 rr0-beta4
4874 \end_layout
4876 \begin_layout Itemize
4877 Fix multi-buttons
4878 \end_layout
4880 \begin_layout Itemize
4881 Save jukebox functionality.
4882 \end_layout
4884 \begin_layout Subsection
4885 rr0-beta5
4886 \end_layout
4888 \begin_layout Itemize
4889 Try to fix some nasty failing movie load edge cases
4890 \end_layout
4892 \begin_layout Itemize
4893 Allow specifying scripts to run on command line.
4894 \end_layout
4896 \begin_layout Subsection
4897 rr0-beta6
4898 \end_layout
4900 \begin_layout Itemize
4901 Major source code reorganization.
4902 \end_layout
4904 \begin_layout Itemize
4905 Backup savestates before overwriting.
4906 \end_layout
4908 \begin_layout Itemize
4909 Don't crash if loading initial state fails.
4910 \end_layout
4912 \begin_layout Subsection
4913 rr0-beta7
4914 \end_layout
4916 \begin_layout Itemize
4917 Fix firmware lookup
4918 \end_layout
4920 \begin_layout Itemize
4921 Fix author name parsing
4922 \end_layout
4924 \begin_layout Itemize
4925 Fix rerecord counting
4926 \end_layout
4928 \begin_layout Itemize
4929 (SDL) Print messages to console if SDL is uninitialized
4930 \end_layout
4932 \begin_layout Itemize
4933 Add movieinfo program
4934 \end_layout
4936 \begin_layout Itemize
4937 Fix loading movies starting from SRAM.
4938 \end_layout
4940 \begin_layout Subsection
4941 rr0-beta8
4942 \end_layout
4944 \begin_layout Itemize
4945 Add support for unattended dumping
4946 \end_layout
4948 \begin_layout Itemize
4949 Fix compiling for Win32
4950 \end_layout
4952 \begin_layout Itemize
4953 Don't lock up if sound can't be initialized
4954 \end_layout
4956 \begin_layout Itemize
4957 Strip trailing CR from commands
4958 \end_layout
4960 \begin_layout Itemize
4961 Don't try to do dubious things in global ctors (fix crash on startup)
4962 \end_layout
4964 \begin_layout Subsection
4965 rr0-beta9
4966 \end_layout
4968 \begin_layout Itemize
4969 Small documentation tweaking
4970 \end_layout
4972 \begin_layout Itemize
4973 Fix make clean
4974 \end_layout
4976 \begin_layout Itemize
4977 Fix major bug in modifier matching
4978 \end_layout
4980 \begin_layout Subsection
4981 rr0-beta10
4982 \end_layout
4984 \begin_layout Itemize
4985 Lots of documentation fixes
4986 \end_layout
4988 \begin_layout Itemize
4989 Use dedicated callbacks for event backcomm., not commands.
4990 \end_layout
4992 \begin_layout Itemize
4993 Ensure that the watchdog is not hit when executing delayed reset.
4994 \end_layout
4996 \begin_layout Itemize
4997 Remove errant tab from joystick message.
4998 \end_layout
5000 \begin_layout Subsection
5001 rr0-beta11
5002 \end_layout
5004 \begin_layout Itemize
5005 Make autofire operate in absolute time, not linear time
5006 \end_layout
5008 \begin_layout Itemize
5009 Reinitialize controls when resuming from loadstate
5010 \end_layout
5012 \begin_layout Itemize
5013 Some more code cleanups
5014 \end_layout
5016 \begin_layout Itemize
5017 If Lua allocator fails, call OOM_panic()
5018 \end_layout
5020 \begin_layout Itemize
5021 Byte/word/dword/qword sized host memory write/read functions.
5022 \end_layout
5024 \begin_layout Itemize
5025 Dump at correct framerate if dumping interlaced NTSC (height=448).
5026 \end_layout
5028 \begin_layout Subsection
5029 rr0-beta12
5030 \end_layout
5032 \begin_layout Itemize
5033 Actually include the complete source code
5034 \end_layout
5036 \begin_layout Itemize
5037 Keep track of RTC
5038 \end_layout
5040 \begin_layout Subsection
5041 rr0-beta13
5042 \end_layout
5044 \begin_layout Itemize
5045 Document {save,start}time.{,sub}second.
5046 \end_layout
5048 \begin_layout Itemize
5049 Intercept time() from bsnes core.
5050 \end_layout
5052 \begin_layout Subsection
5053 rr0-beta14
5054 \end_layout
5056 \begin_layout Itemize
5057 Allow disabling time() interception (allow build on Mac OS X)
5058 \end_layout
5060 \begin_layout Itemize
5061 Use SDLMain on Mac OS X (make SDL not crash)
5062 \end_layout
5064 \begin_layout Itemize
5065 Disable delayed resets (just plain too buggy for now).
5066 \end_layout
5068 \begin_layout Itemize
5069 Code cleanups
5070 \end_layout
5072 \begin_layout Itemize
5073 Use 16-bit for graphics/video instead of 32-bit.
5074 \end_layout
5076 \begin_layout Itemize
5077 gui.rectangle/gui.pixel
5078 \end_layout
5080 \begin_layout Itemize
5081 gui.crosshair
5082 \end_layout
5084 \begin_layout Itemize
5085 New CSCD writer implementation.
5086 \end_layout
5088 \begin_layout Subsection
5089 rr0-beta15
5090 \end_layout
5092 \begin_layout Itemize
5093 Fix interaction of * and +.
5094 \end_layout
5096 \begin_layout Itemize
5097 Manual improvements
5098 \end_layout
5100 \begin_layout Itemize
5101 Use gettimeofday()/usleep(), these seem portable enough.
5102 \end_layout
5104 \begin_layout Itemize
5105 Move joystick axis manipulation to keymapper code.
5106 \end_layout
5108 \begin_layout Itemize
5109 Changes to how read-only works.
5110 \end_layout
5112 \begin_layout Itemize
5113 Refactor controller input code.
5114 \end_layout
5116 \begin_layout Subsection
5117 rr0-beta16
5118 \end_layout
5120 \begin_layout Itemize
5121 Fix mouseclick scale compensation.
5122 \end_layout
5124 \begin_layout Itemize
5125 Draw area boundaries correctly in SDL code.
5126 \end_layout
5128 \begin_layout Itemize
5129 gui.screenshot.
5130 \end_layout
5132 \begin_layout Itemize
5133 Fix CSCD output (buffer overrun and race condition).
5134 \end_layout
5136 \begin_layout Subsection
5137 rr0-beta17
5138 \end_layout
5140 \begin_layout Itemize
5141 JMD dumping support.
5142 \end_layout
5144 \begin_layout Itemize
5145 Allow unattended dumping to JMD.
5146 \end_layout
5148 \begin_layout Itemize
5149 Move to BSNES v083.
5150 \end_layout
5152 \begin_layout Itemize
5153 Switch back to 32-bit colors.
5154 \end_layout
5156 \begin_layout Itemize
5157 Add Lua function gui.color.
5158 \end_layout
5160 \begin_layout Itemize
5161 Use some new C++11 features in GCC 4.6.
5162 \end_layout
5164 \begin_layout Itemize
5165 Be prepared for core frequency changes.
5166 \end_layout
5168 \begin_layout Itemize
5169 Pass colors in one chunk from Lua.
5170 \end_layout
5172 \begin_layout Subsection
5173 rr0-beta18
5174 \end_layout
5176 \begin_layout Itemize
5177 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
5178  memory.read_vma() and memory.find_vma().
5179 \end_layout
5181 \begin_layout Itemize
5182 Numerious documentation fixups
5183 \end_layout
5185 \begin_layout Itemize
5186 RTC time format changed
5187 \end_layout
5189 \begin_layout Itemize
5190 Reformat flags display
5191 \end_layout
5193 \begin_layout Itemize
5194 Allow lua package name to be overridden
5195 \end_layout
5197 \begin_layout Itemize
5198 SDUMP (high-quality dumping).
5199 \end_layout
5201 \begin_layout Itemize
5202 Split platform support to plugins.
5203 \end_layout
5205 \begin_layout Itemize
5206 Make all sound plugins support basic sound commands
5207 \end_layout
5209 \begin_layout Itemize
5210 Support portaudio for sound.
5211 \end_layout
5213 \begin_layout Itemize
5214 Allow disable Lua/SDL searching.
5215 \end_layout
5217 \begin_layout Itemize
5218 Upconvert colors when copying lcscreen to screen.
5219 \end_layout
5221 \begin_layout Itemize
5222 Reorganize source tree.
5223 \end_layout
5225 \begin_layout Itemize
5226 Evdev joystick support.
5227 \end_layout
5229 \begin_layout Itemize
5230 Refactor more code into generic window code.
5231 \end_layout
5233 \begin_layout Subsection
5234 rr0-beta19
5235 \end_layout
5237 \begin_layout Itemize
5238 Refactor message handling.
5239 \end_layout
5241 \begin_layout Itemize
5242 Rework makefile
5243 \end_layout
5245 \begin_layout Itemize
5246 Documentation fixes
5247 \end_layout
5249 \begin_layout Itemize
5250 Finish pending saves before load/quit.
5251 \end_layout
5253 \begin_layout Itemize
5254 Wxwidgets graphics plugin.
5255 \end_layout
5257 \begin_layout Subsection
5258 rr0-beta20
5259 \end_layout
5261 \begin_layout Itemize
5262 Get rid of win32-crap.[ch]pp.
5263 \end_layout
5265 \begin_layout Itemize
5266 Move files around a lot.
5267 \end_layout
5269 \begin_layout Itemize
5270 Get rid of need for host C++ compiler.
5271 \end_layout
5273 \begin_layout Itemize
5274 Bsnes v084 core.
5275 \end_layout
5277 \begin_layout Itemize
5278 Refactor inter-component communication.
5279 \end_layout
5281 \begin_layout Itemize
5282 Fix zero luma.
5283 \end_layout
5285 \begin_layout Itemize
5286 Fix crash on multiline aliases.
5287 \end_layout
5289 \begin_layout Itemize
5290 Load/Save settings in wxwidgets gui.
5291 \end_layout
5293 \begin_layout Subsection
5294 rr0-beta21
5295 \end_layout
5297 \begin_layout Itemize
5298 Patch problems in bsnes core
5299 \end_layout
5301 \begin_layout Itemize
5302 SNES is little-endian, not big-endian!
5303 \end_layout
5305 \begin_layout Itemize
5306 Fix memory corruption in lcscreen::load()
5307 \end_layout
5309 \begin_layout Subsection
5310 rr0-beta22
5311 \end_layout
5313 \begin_layout Itemize
5314 Fix interpretting repeat counts in rrdata loading.
5315 \end_layout
5317 \begin_layout Itemize
5318 New lua callback: on_frame()
5319 \end_layout
5321 \begin_layout Itemize
5322 Remove calls to runtosave() that aren't supposed to be there
5323 \end_layout
5325 \begin_layout Itemize
5326 Lua function: movie.read_rtc()
5327 \end_layout
5329 \begin_layout Itemize
5330 Ignore src/fonts/font.cpp
5331 \end_layout
5333 \begin_layout Itemize
5334 Fix more bsnes core problems
5335 \end_layout
5337 \begin_layout Itemize
5338 Control bsnes random seeding
5339 \end_layout
5341 \begin_layout Itemize
5342 Pause-on-end
5343 \end_layout
5345 \begin_layout Itemize
5346 Some bsnes core debugging features (state dump and state hash)
5347 \end_layout
5349 \begin_layout Itemize
5350 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
5351  it was 'lsnes rr0-beta21').
5352 \end_layout
5354 \begin_layout Subsection
5355 rr0-beta23
5356 \end_layout
5358 \begin_layout Itemize
5359 Fix memory corruption due to macro/field mixup
5360 \end_layout
5362 \begin_layout Itemize
5363 search-memory update
5364 \end_layout
5366 \begin_layout Itemize
5367 Allow direct-mapped framebuffer
5368 \end_layout
5370 \begin_layout Itemize
5371 SDL: Use SDL_ANYFORMAT if possible
5372 \end_layout
5374 \begin_layout Itemize
5375 SDMP2SOX: 2s delay modes.
5376 \end_layout
5378 \begin_layout Itemize
5379 Wxwidgets: Cleanups
5380 \end_layout
5382 \begin_layout Itemize
5383 Use sed -E, not sed -r.
5384  Fixes building on Mac OS X.
5385 \end_layout
5387 \begin_layout Itemize
5388 Wxwidgets: Save jukebox on exit
5389 \end_layout
5391 \begin_layout Itemize
5392 Fix RTC if using load-movie on savestate.
5393 \end_layout
5395 \begin_layout Itemize
5396 Fix crash related to full console mode.
5397 \end_layout
5399 \begin_layout Subsection
5400 rr0-beta24
5401 \end_layout
5403 \begin_layout Itemize
5404 Wxwidgets: Allow bringing application to foreground on Mac OS X.
5405 \end_layout
5407 \begin_layout Itemize
5408 Wxwidgets: Allow compiling on Mac OS X.
5409 \end_layout
5411 \begin_layout Itemize
5412 Use movie compare instead of movie hashing (faster save/load).
5413 \end_layout
5415 \begin_layout Itemize
5416 Lua: _SYSTEM table.
5417 \end_layout
5419 \begin_layout Subsection
5420 rr0-beta25
5421 \end_layout
5423 \begin_layout Itemize
5424 sdmp2sox: Pad soundtrack if using -l or -L.
5425 \end_layout
5427 \begin_layout Itemize
5428 sdmp2sox: Fix NTSC overscan.
5429 \end_layout
5431 \begin_layout Itemize
5432 sdmp2sox: Add AR correction mode.
5433 \end_layout
5435 \begin_layout Itemize
5436 call lua_close() when exiting.
5437 \end_layout
5439 \begin_layout Itemize
5440 Fix zip_writer bug causing warnings from info-zip and error from advzip.
5441 \end_layout
5443 \begin_layout Subsection
5444 rr0-beta26
5445 \end_layout
5447 \begin_layout Itemize
5448 Fix IPS patching code (use bsnes core IPS patcher).
5449 \end_layout
5451 \begin_layout Itemize
5452 Implement BPS patching (using bsnes core IPS patcher).
5453 \end_layout
5455 \begin_layout Itemize
5456 Add feature to load headered ROMs.
5457 \end_layout
5459 \begin_layout Subsection
5460 rr0-beta27
5461 \end_layout
5463 \begin_layout Itemize
5464 Show command names when showing keybindings
5465 \end_layout
5467 \begin_layout Subsection
5469 \end_layout
5471 \begin_layout Itemize
5472 Fix pause-on-end to be actually controllable
5473 \end_layout
5475 \begin_layout Itemize
5476 SDL: Poll all events in queue, not just first one (fixes slowness in command
5477  typing)
5478 \end_layout
5480 \begin_layout Itemize
5481 Wxwidgets: Fix ROM loading.
5482 \end_layout
5484 \begin_layout Subsection
5485 rr1-beta0
5486 \end_layout
5488 \begin_layout Itemize
5489 Lua: Add gui.textH, gui.textV, gui.textHV
5490 \end_layout
5492 \begin_layout Itemize
5493 Fix text colors on SDL on Mac OS X
5494 \end_layout
5496 \begin_layout Itemize
5497 Mode 'F' for finished in readonly mode.
5498 \end_layout
5500 \begin_layout Itemize
5501 Fix some WS errors.
5502 \end_layout
5504 \begin_layout Itemize
5505 Reliably pause after skip poll
5506 \end_layout
5508 \begin_layout Itemize
5509 Split UI and core into their own threads
5510 \end_layout
5512 \begin_layout Subsection
5513 rr1-beta1
5514 \end_layout
5516 \begin_layout Itemize
5517 Remove leftover dummy SRAM slot
5518 \end_layout
5520 \begin_layout Itemize
5521 Fix controller numbers.
5522 \end_layout
5524 \begin_layout Subsection
5525 rr1-beta2
5526 \end_layout
5528 \begin_layout Itemize
5529 Fix lsnes-dumpavi after interface change.
5530 \end_layout
5532 \begin_layout Itemize
5533 Also give BSNES patches for v085.
5534 \end_layout
5536 \begin_layout Itemize
5537 Pack movie data in memory.
5538 \end_layout
5540 \begin_layout Subsection
5541 rr1-beta3
5542 \end_layout
5544 \begin_layout Itemize
5545 Fix framecount/length given when loading movies.
5546 \end_layout
5548 \begin_layout Itemize
5549 Controller command memory leak fixes.
5550 \end_layout
5552 \begin_layout Itemize
5553 Don't leak palette if freeing screen object.
5554 \end_layout
5556 \begin_layout Subsection
5557 rr1-beta4
5558 \end_layout
5560 \begin_layout Itemize
5561 Detect revisions.
5562 \end_layout
5564 \begin_layout Itemize
5565 Wxwidgets: Allow controlling dumper from the menu.
5566 \end_layout
5568 \begin_layout Subsection
5569 rr1-beta5
5570 \end_layout
5572 \begin_layout Itemize
5573 Rewrite parts of manual
5574 \end_layout
5576 \begin_layout Itemize
5577 Lua: Make it work with Lua 5.2.
5578 \end_layout
5580 \begin_layout Subsection
5581 rr1-beta6
5582 \end_layout
5584 \begin_layout Itemize
5585 Win32: Fix compile errors.
5586 \end_layout
5588 \begin_layout Subsection
5589 rr1-beta7
5590 \end_layout
5592 \begin_layout Itemize
5593 Refactor controller input code.
5594 \end_layout
5596 \begin_layout Itemize
5597 Fix crash when using command line on SDL / Mac OS X.
5598 \end_layout
5600 \begin_layout Subsection
5601 rr1-beta8
5602 \end_layout
5604 \begin_layout Itemize
5605 Delete core/coroutine (obsolete)
5606 \end_layout
5608 \begin_layout Itemize
5609 Lag input display by one frame.
5610 \end_layout
5612 \begin_layout Itemize
5613 Rewind movie to beginning function.
5614 \end_layout
5616 \begin_layout Itemize
5617 Fix wrong frame number reported to Lua when repainting after loadstate
5618 \end_layout
5620 \begin_layout Itemize
5621 Support UI editing of jukebox
5622 \end_layout
5624 \begin_layout Itemize
5625 Wxwidgets: Save settings on exit.
5626 \end_layout
5628 \begin_layout Itemize
5629 Support ${project} for filenames
5630 \end_layout
5632 \begin_layout Itemize
5633 SDL: Fix command history
5634 \end_layout
5636 \begin_layout Subsection
5637 rr1-beta9
5638 \end_layout
5640 \begin_layout Itemize
5641 Fix some order-of-global-ctor bugs.
5642 \end_layout
5644 \begin_layout Subsection
5645 rr1-beta10
5646 \end_layout
5648 \begin_layout Itemize
5649 Fix crashes when quitting on Win32.
5650 \end_layout
5652 \begin_layout Subsection
5653 rr1-beta11
5654 \end_layout
5656 \begin_layout Itemize
5657 EVDEV: Queue keypresses from joystick, don't send directly
5658 \end_layout
5660 \begin_layout Itemize
5661 Wxwidgets: Load-Preserve that actually works.
5662 \end_layout
5664 \begin_layout Subsection
5665 rr1-beta12
5666 \end_layout
5668 \begin_layout Itemize
5669 Wxwidgets: GUI for memory search.
5670 \end_layout
5672 \begin_layout Itemize
5673 Warn about using synchronous queue in UI callback.
5674 \end_layout
5676 \begin_layout Subsection
5677 rr1-beta13
5678 \end_layout
5680 \begin_layout Itemize
5681 Remember last saved file for each ROM
5682 \end_layout
5684 \begin_layout Itemize
5685 Support MT dumping via boost.
5686 \end_layout
5688 \begin_layout Itemize
5689 Lua: input.raw
5690 \end_layout
5692 \begin_layout Itemize
5693 Lua: input.keyhook
5694 \end_layout
5696 \begin_layout Itemize
5697 Make mouse be ordinary input instead of special-casing
5698 \end_layout
5700 \begin_layout Itemize
5701 SDL: Don't screw up commands with NUL codepoints.
5702 \end_layout
5704 \begin_layout Subsection
5705 rr1-beta14
5706 \end_layout
5708 \begin_layout Itemize
5709 Merge status panel and main window
5710 \end_layout
5712 \begin_layout Itemize
5713 True movie slot support (the rest of it)
5714 \end_layout
5716 \begin_layout Itemize
5717 SDL: Fix compilation error
5718 \end_layout
5720 \begin_layout Itemize
5721 Elminate cross calls in dump menu code.
5722 \end_layout
5724 \begin_layout Subsection
5725 rr1-beta15
5726 \end_layout
5728 \begin_layout Itemize
5729 Cancel pending saves command
5730 \end_layout
5732 \begin_layout Itemize
5733 Wxwidgets: Code refactoring
5734 \end_layout
5736 \begin_layout Itemize
5737 Wxwidgets: Fix system -> reset
5738 \end_layout
5740 \begin_layout Itemize
5741 Wxwidgets: Read watch expressions in the right thread
5742 \end_layout
5744 \begin_layout Subsection
5745 rr1-beta16
5746 \end_layout
5748 \begin_layout Itemize
5749 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
5750  support that).
5751 \end_layout
5753 \begin_layout Itemize
5754 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
5755 \end_layout
5757 \begin_layout Itemize
5758 Don't append trailing '-' to prefix when saving movie.
5759 \end_layout
5761 \begin_layout Itemize
5762 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
5763 \end_layout
5765 \begin_layout Subsection
5767 \end_layout
5769 \begin_layout Itemize
5770 Document memory watch syntax.
5771 \end_layout
5773 \begin_layout Subsection
5774 rr1-delta1
5775 \end_layout
5777 \begin_layout Itemize
5778 Fix unattended dumping (lsnes-dumpavi)
5779 \end_layout
5781 \begin_layout Itemize
5782 Support RAW dumping
5783 \end_layout
5785 \begin_layout Itemize
5786 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
5787 \end_layout
5789 \begin_layout Itemize
5790 Add option to control sample rate preturbation in AVI dumper
5791 \end_layout
5793 \begin_layout Subsection
5794 rr1-delta2
5795 \end_layout
5797 \begin_layout Itemize
5798 Wxwidgets: Fix dumper submodes
5799 \end_layout
5801 \begin_layout Itemize
5802 Set core controller types before loadstate
5803 \end_layout
5805 \begin_layout Subsection
5806 rr1-delta2epsilon1
5807 \end_layout
5809 \begin_layout Itemize
5810 Fix compiling with bsnes v086.
5811 \end_layout
5813 \begin_layout Subsection
5814 rr1-delta3
5815 \end_layout
5817 \begin_layout Itemize
5818 Don't prompt before quitting
5819 \end_layout
5821 \begin_layout Itemize
5822 Start unpaused, preserve pause/unpause over load.
5823 \end_layout
5825 \begin_layout Itemize
5826 Try to autodetect if ROM is headered.
5827 \end_layout
5829 \begin_layout Itemize
5830 Wxwidgets: Only bring up ROM patching screen if specifically requested.
5831 \end_layout
5833 \begin_layout Itemize
5834 Allow configuring some hotkeys.
5835 \end_layout
5837 \begin_layout Subsection
5838 rr1-delta4
5839 \end_layout
5841 \begin_layout Itemize
5842 Lots of code cleanups
5843 \end_layout
5845 \begin_layout Itemize
5846 Fix JMD compression (JMD dumping was broken)
5847 \end_layout
5849 \begin_layout Itemize
5850 Don't crash if Lua C function throws an exception.
5851 \end_layout
5853 \begin_layout Itemize
5854 Support bitmap drawing in Lua.
5855 \end_layout
5857 \begin_layout Itemize
5858 Fix bsnes v085/v086 patches.
5859 \end_layout
5861 \begin_layout Itemize
5862 Improve stability on win32.
5863 \end_layout
5865 \begin_layout Subsection
5866 rr1-delta4epsilon1
5867 \end_layout
5869 \begin_layout Itemize
5870 Don't corrupt movie if movie length is integer multiple of frames per page.
5871 \end_layout
5873 \begin_layout Subsection
5874 rr1-delta5
5875 \end_layout
5877 \begin_layout Itemize
5878 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
5879 \end_layout
5881 \begin_layout Itemize
5882 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
5883 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
5885 \end_layout
5887 \begin_layout Itemize
5888 Wxwidgets: Fix internal focus lost (hotkeys stop working)
5889 \end_layout
5891 \begin_layout Itemize
5892 Wxwidgets: Fix broken modifiers
5893 \end_layout
5895 \begin_layout Itemize
5896 on_paint has parameter now.
5897 \end_layout
5899 \begin_layout Itemize
5900 Optional initital fill for bitmaps
5901 \end_layout
5903 \begin_layout Itemize
5904 Fix palette changing.
5905 \end_layout
5907 \begin_layout Itemize
5908 Optimize rendering a bit.
5909 \end_layout
5911 \begin_layout Itemize
5912 Bsnes v087 support.
5913 \end_layout
5915 \begin_layout Subsection
5916 rr1-delta5epsilon1
5917 \end_layout
5919 \begin_layout Itemize
5920 Movieinfo: Fix display of port #2 type.
5921 \end_layout
5923 \begin_layout Itemize
5924 Call on_input() after loadstate.
5925 \end_layout
5927 \begin_layout Subsection
5928 rr1-delta5epsilon2
5929 \end_layout
5931 \begin_layout Itemize
5932 Fix writing port2 data to movie.
5933 \end_layout
5935 \begin_layout Itemize
5936 Fix SRAM handling with Bsnes v087.
5937 \end_layout
5939 \begin_layout Subsection
5940 rr1-delta6
5941 \end_layout
5943 \begin_layout Itemize
5944 Library loading support
5945 \end_layout
5947 \begin_layout Itemize
5948 Built-in TSCC encoder
5949 \end_layout
5951 \begin_layout Itemize
5952 Hi-color (256T colors) dumping.
5953 \end_layout
5955 \begin_layout Itemize
5956 Dump over TCP/IP(v6)
5957 \end_layout
5959 \begin_layout Itemize
5960 Hidable status panel
5961 \end_layout
5963 \begin_layout Itemize
5964 Turbo toggle/hold
5965 \end_layout
5967 \begin_layout Itemize
5968 Adjustable sound volume
5969 \end_layout
5971 \begin_layout Itemize
5972 Screen scaling
5973 \end_layout
5975 \begin_layout Itemize
5976 Allow DnD into filename boxes
5977 \end_layout
5979 \begin_layout Itemize
5980 Configurable paths
5981 \end_layout
5983 \begin_layout Itemize
5984 Portaudio: Fix speaker popping at start
5985 \end_layout
5987 \begin_layout Itemize
5988 Lots of UI changes
5989 \end_layout
5991 \begin_layout Itemize
5992 Speed adjustment menu
5993 \end_layout
5995 \begin_layout Itemize
5996 Win32 joystick support
5997 \end_layout
5999 \begin_layout Itemize
6000 Lua: gui.rainbow and gui.box
6001 \end_layout
6003 \begin_layout Itemize
6004 Split key lists into classes (the key list was large!)
6005 \end_layout
6007 \begin_layout Itemize
6008 More save slots support
6009 \end_layout
6011 \begin_layout Itemize
6012 Wxwidgets (wxJoystick) joystick support
6013 \end_layout
6015 \begin_layout Subsection
6016 rr1-delta7
6017 \end_layout
6019 \begin_layout Itemize
6020 Lots of internal joystick refactoring
6021 \end_layout
6023 \begin_layout Itemize
6024 Evdev: Add mapping for BTN_TOOL_QUINTTAP
6025 \end_layout
6027 \begin_layout Itemize
6028 Wxwidgets: Settings mode (open settings without ROM)
6029 \end_layout
6031 \begin_layout Itemize
6032 Wxwidgets: Prompt key to use option
6033 \end_layout
6035 \begin_layout Itemize
6036 Wxwidgets: Fix crash if key goes away underneath
6037 \end_layout
6039 \begin_layout Itemize
6040 Wxwidgets: Fix mouse position in presence of scaling
6041 \end_layout
6043 \begin_layout Itemize
6044 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
6045 \end_layout
6047 \begin_layout Itemize
6048 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
6049  seem to work well on WinXP)
6050 \end_layout
6052 \begin_layout Itemize
6053 Start paused option.
6054 \end_layout
6056 \begin_layout Subsection
6057 rr1-delta7epsilon1
6058 \end_layout
6060 \begin_layout Itemize
6061 AVI: ZMBV support
6062 \end_layout
6064 \begin_layout Itemize
6065 lsnes-dumpavi: Start Lua before starting dumper
6066 \end_layout
6068 \begin_layout Itemize
6069 AVI: Fix secondary audio in mode 4.
6070 \end_layout
6072 \begin_layout Subsection
6073 rr1-delta7epsilon2
6074 \end_layout
6076 \begin_layout Itemize
6077 AVI: Refactor ZMBV a bit.
6078 \end_layout
6080 \begin_layout Itemize
6081 Fix error reading analog values from movie file
6082 \end_layout
6084 \begin_layout Subsection
6085 rr1-delta8
6086 \end_layout
6088 \begin_layout Itemize
6089 Delayed reset support
6090 \end_layout
6092 \begin_layout Itemize
6093 Lua: memory.hash_region
6094 \end_layout
6096 \begin_layout Subsection
6097 rr1-delta8epsilon1
6098 \end_layout
6100 \begin_layout Itemize
6101 Rework the build system
6102 \end_layout
6104 \begin_layout Itemize
6105 Typing input support
6106 \end_layout
6108 \begin_layout Itemize
6109 Fix building with bsnes v086 and v087.
6110 \end_layout
6112 \begin_layout Itemize
6113 SDL: Save settings on exit
6114 \end_layout
6116 \begin_layout Itemize
6117 SDL: Command to enter command line mode with given command.
6118 \end_layout
6120 \begin_layout Itemize
6121 SDL: More advanced command editing.
6122 \end_layout
6124 \begin_layout Subsection
6125 rr1-delta9
6126 \end_layout
6128 \begin_layout Itemize
6129 wxMSW: Fix the 
6130 \begin_inset Quotes eld
6131 \end_inset
6133 arrow keys and enter don't work
6134 \begin_inset Quotes erd
6135 \end_inset
6137  problem
6138 \end_layout
6140 \begin_layout Itemize
6141 MSU-1 support
6142 \end_layout
6144 \begin_layout Itemize
6145 Show mode changes due to rewinding.
6146 \end_layout
6148 \begin_layout Itemize
6149 Unsafe rewind support
6150 \end_layout
6152 \begin_layout Itemize
6153 Fix directory transversal.
6154 \end_layout
6156 \begin_layout Subsection
6157 rr1-delta10
6158 \end_layout
6160 \begin_layout Itemize
6161 AVI: Sound mode 5 (48kHz high-quality)
6162 \end_layout
6164 \begin_layout Itemize
6165 Lua: Reset Lua VM
6166 \end_layout
6168 \begin_layout Itemize
6169 Map the SNES bus into address space
6170 \end_layout
6172 \begin_layout Itemize
6173 Fix loading memory watch files with CRLF line endings
6174 \end_layout
6176 \begin_layout Subsection
6177 rr1-delta10epsilon1
6178 \end_layout
6180 \begin_layout Itemize
6181 Map bsnes internal state into memory space
6182 \end_layout
6184 \begin_layout Itemize
6185 Fix the 
6186 \begin_inset Quotes eld
6187 \end_inset
6189 click on panel wedges the emulator
6190 \begin_inset Quotes erd
6191 \end_inset
6193  for real.
6194 \end_layout
6196 \begin_layout Itemize
6197 DnD movies/saves on the main window.
6198 \end_layout
6200 \begin_layout Subsection
6201 rr1-delta11
6202 \end_layout
6204 \begin_layout Itemize
6205 Split core bindings into own module.
6206 \end_layout
6208 \begin_layout Itemize
6209 Remember invalid settings
6210 \end_layout
6212 \begin_layout Itemize
6213 Support for modified Gambatte core for GB/GBC emulation.
6214 \end_layout
6216 \begin_layout Itemize
6217 Reload/swap ROM function
6218 \end_layout
6220 \begin_layout Subsection
6221 rr1-delta11epsilon1
6222 \end_layout
6224 \begin_layout Itemize
6225 Fix step poll function
6226 \end_layout
6228 \end_body
6229 \end_document