Merge remote-tracking branch 'origin/rr1-maint' into rr1-maint
[lsnes.git] / manual.lyx
blobfd0f7cdf05258d48c8506279f9440af6d9a5136e
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, r358 or r364
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 libao (libao sound only)
144 \end_layout
146 \begin_layout Enumerate
147 Lua (if Lua support is needed) version 5.1.X or 5.2.X
148 \end_layout
150 \begin_layout Enumerate
151 G++ 4.6 or 4.7
152 \end_layout
154 \begin_layout Enumerate
155 libopus (optional, for commentary track tool)
156 \end_layout
158 \begin_layout Section
159 Building
160 \end_layout
162 \begin_layout Itemize
163 Copy bsnes sources (the bsnes subdirectory) to subdirectory 'bsnes' (for
164  bsnes core).
165 \end_layout
167 \begin_layout Itemize
168 Copy gambatte sources to subdirectory 'gambatte' (for gambatte core).
169 \end_layout
171 \begin_layout Itemize
172 Patch the bsnes sources with included patches (directory 'bsnes-patches/<version
173 >', bsnes core)
174 \end_layout
176 \begin_layout Itemize
177 Patch the gambatte sources with included patches (directory 'gambatte-patches/<v
178 ersion>', gambatte core)
179 \end_layout
181 \begin_layout Itemize
182 Edit options.build (or copy of that file)
183 \end_layout
185 \begin_layout Itemize
186 Run make (passing 'OPTIONS=<filename>' if using something else than options.build
188 \end_layout
190 \begin_layout Section
191 Command line options
192 \end_layout
194 \begin_layout Subsection
195 ROM options
196 \end_layout
198 \begin_layout Subsubsection
199 --rom=<file> (lsnes/SDL, lsnes/wxwidgets, lsnes-avidump)
200 \end_layout
202 \begin_layout Standard
203 Load <file> as ROM.
204 \end_layout
206 \begin_layout Subsubsection
207 <file> (lsnes/wxwidgets)
208 \end_layout
210 \begin_layout Standard
211 Load <file> as ROM.
212 \end_layout
214 \begin_layout Subsection
215 Session options
216 \end_layout
218 \begin_layout Subsubsection
219 --pause
220 \end_layout
222 \begin_layout Standard
223 Start paused
224 \end_layout
226 \begin_layout Subsubsection
227 <filename> (lsnes/SDL, lsnes-avidump, movieinfo)
228 \end_layout
230 \begin_layout Standard
231 Load <filename> as movie or savestate file.
232  All other session options are ignored.
233 \end_layout
235 \begin_layout Subsubsection
236 --port1=<device> (lsnes/SDL, bsnes core only)
237 \end_layout
239 \begin_layout Standard
240 Set type of port1.
241  Valid values are:
242 \end_layout
244 \begin_layout Itemize
245 none: No device connected
246 \end_layout
248 \begin_layout Itemize
249 gamepad: One gamepad (the default)
250 \end_layout
252 \begin_layout Itemize
253 multitap: Four gamepads (warning: makes most games refuse to start)
254 \end_layout
256 \begin_layout Itemize
257 mouse: Mouse.
258 \end_layout
260 \begin_layout Subsubsection
261 --port2=<type> (lsnes/SDL, bsnes core only)
262 \end_layout
264 \begin_layout Standard
265 Set type of port2.
266  Valid values are:
267 \end_layout
269 \begin_layout Itemize
270 none: No device connected (the default)
271 \end_layout
273 \begin_layout Itemize
274 gamepad: One gamepad
275 \end_layout
277 \begin_layout Itemize
278 multitap: Four gamepads.
279 \end_layout
281 \begin_layout Itemize
282 mouse: Mouse
283 \end_layout
285 \begin_layout Itemize
286 superscope: Super Scope
287 \end_layout
289 \begin_layout Itemize
290 justifier: One justifier
291 \end_layout
293 \begin_layout Itemize
294 justifiers: Two justifiers
295 \end_layout
297 \begin_layout Subsubsection
298 --gamename=<name> (lsnes/SDL)
299 \end_layout
301 \begin_layout Standard
302 Set the name of game to <name>.
303  Default is blank.
304 \end_layout
306 \begin_layout Subsubsection
307 --author=<name> (lsnes/SDL)
308 \end_layout
310 \begin_layout Standard
311 Add author with full name of <name> (no nickname).
312 \end_layout
314 \begin_layout Subsubsection
315 --author=|<name> (lsnes/SDL)
316 \end_layout
318 \begin_layout Standard
319 Add author with nickname of <name> (no full name).
320 \end_layout
322 \begin_layout Subsubsection
323 --author=<fullname>|<nickname> (lsnes/SDL)
324 \end_layout
326 \begin_layout Standard
327 Add author with full name of <fullname> and nickname of <nickname>.
328 \end_layout
330 \begin_layout Subsubsection
331 --rtc-second=<value> (lsnes/SDL)
332 \end_layout
334 \begin_layout Standard
335 Set RTC second (0 is 1st January 1970 00:00:00Z).
336  Default is 1,000,000,000.
337 \end_layout
339 \begin_layout Subsubsection
340 --rtc-subsecond=<value> (lsnes/SDL)
341 \end_layout
343 \begin_layout Standard
344 Set RTC subsecond.
345  Range is 0-.
346  Unit is CPU cycle.
347  Default is 0.
348 \end_layout
350 \begin_layout Subsubsection
351 --anchor-savestate=<file> (lsnes/SDL)
352 \end_layout
354 \begin_layout Standard
355 Set the anchor savestate file.
356 \end_layout
358 \begin_layout Subsubsection
359 --load=<file> (lsnes/wxwidgets)
360 \end_layout
362 \begin_layout Standard
363 After loading the ROM, load <file> as savestate/movie.
364 \end_layout
366 \begin_layout Subsection
367 Misc.
368  options:
369 \end_layout
371 \begin_layout Subsubsection
372 --run=<file> (lsnes/SDL)
373 \end_layout
375 \begin_layout Standard
376 After running main RC file, run this file.
377  If multiple are specified, these execute in order specified.
378 \end_layout
380 \begin_layout Subsubsection
381 --lua=<file> (lsnes/wxwidgets)
382 \end_layout
384 \begin_layout Standard
385 Run this Lua file on startup
386 \end_layout
388 \begin_layout Subsection
389 dump options (lsnes-dumpavi only)
390 \end_layout
392 \begin_layout Subsubsection
393 --dumper=<dumper>
394 \end_layout
396 \begin_layout Standard
397 Set the dumper to use (required).
398  Use 'list' for listing of known dumpers.
399 \end_layout
401 \begin_layout Subsubsection
402 --mode=<mode>
403 \end_layout
405 \begin_layout Standard
406 Set the mode to use (required for dumpers with multiple modes, forbidden
407  otherwise).
408  Use 'list' for known modes.
409 \end_layout
411 \begin_layout Subsubsection
412 --prefix=<prefix>
413 \end_layout
415 \begin_layout Standard
416 Set dump prefix.
417  Default is 
418 \begin_inset Quotes eld
419 \end_inset
421 avidump
422 \begin_inset Quotes erd
423 \end_inset
426 \end_layout
428 \begin_layout Subsubsection
429 --option=<name>=<value>
430 \end_layout
432 \begin_layout Standard
433 Set option <name> to value <value>.
434 \end_layout
436 \begin_layout Subsubsection
437 --length=<length>
438 \end_layout
440 \begin_layout Standard
441 Set number of frames to dump.
442  Mandatory.
443 \end_layout
445 \begin_layout Subsubsection
446 --lua=<script>
447 \end_layout
449 \begin_layout Standard
450 Run specified lua script (lsnes-dumpavi does not have initialization files).
451 \end_layout
453 \begin_layout Subsubsection
454 --load-library=<library>
455 \end_layout
457 \begin_layout Standard
458 Load the specified shared object / dynamic library / dynamic link library.
459 \end_layout
461 \begin_layout Section
462 Startup file lsnes.rc
463 \end_layout
465 \begin_layout Standard
466 Upon startup, lsnes (lsnes/SDL only) executes file lsnes.rc as commands.
467  This file is located in:
468 \end_layout
470 \begin_layout Itemize
471 Windows: %APPDATA%
472 \backslash
473 lsnes
474 \backslash
475 lsnes.rc (if %APPDATA% exists)
476 \end_layout
478 \begin_layout Itemize
479 Unix: $XDG_CONFIG_HOME/lsnes/lsnes.rc (if $XDG_CONFIG_HOME exists)
480 \end_layout
482 \begin_layout Itemize
483 Unix: $HOME/.config/lsnes/lsnes.rc (if $HOME exists)
484 \end_layout
486 \begin_layout Itemize
487 All: ./lsnes.rc (fallback default).
488 \end_layout
490 \begin_layout Standard
491 If leading directories do not exist, attempt to create them is made.
492 \end_layout
494 \begin_layout Section
495 Internal commands
496 \end_layout
498 \begin_layout Itemize
499 Commands beginning with '*' invoke the corresponding command without alias
500  expansion.
501 \end_layout
503 \begin_layout Itemize
504 If command starts with '+' (after possible '*'), the command is executed
505  as-is when button is pressed, and when button is released, it is executed
506  with '+' replaced by '-'.
507 \end_layout
509 \begin_layout Itemize
510 Commands without '+' execute only on negative edge (release).
511 \end_layout
513 \begin_layout Subsection
514 Settings:
515 \end_layout
517 \begin_layout Standard
518 Settings control various aspects of emulator behaviour.
519 \end_layout
521 \begin_layout Subsubsection
522 set-setting <setting> <value>
523 \end_layout
525 \begin_layout Standard
526 Sets setting <setting> to value <value> (may be empty).
527 \end_layout
529 \begin_layout Subsubsection
530 unset-setting <setting>
531 \end_layout
533 \begin_layout Standard
534 Try to unset setting <setting> (not all settings can be unset).
535 \end_layout
537 \begin_layout Subsubsection
538 get-setting <setting>
539 \end_layout
541 \begin_layout Standard
542 Read value of setting <setting>
543 \end_layout
545 \begin_layout Subsubsection
546 show-settings
547 \end_layout
549 \begin_layout Standard
550 Print names and values of all settings.
551 \end_layout
553 \begin_layout Subsection
554 Keybindings
555 \end_layout
557 \begin_layout Standard
558 Keybindings bind commands or aliases to keys (or pseudo-keys).
560 \end_layout
562 \begin_layout Standard
563 Notes:
564 \end_layout
566 \begin_layout Itemize
567 Do not bind edge active (+/-) commands to keys with modifiers, that won't
568  work right!
569 \end_layout
571 \begin_layout Itemize
572 Names of keys and modifiers are platform-dependent.
573 \end_layout
575 \begin_layout Itemize
576 Be careful before binding pseudo-keys (such as joystick axes, buttons or
577  hats) with modifiers.
578  That may or may not work right.
579 \end_layout
581 \begin_layout Subsubsection
582 bind-key [<mod>/<modmask>] <key> <command>
583 \end_layout
585 \begin_layout Standard
586 Bind <command> to key <key> (activating if modifiers in <modmask> (comma-seperat
587 ed list) are set as <mod> (comma-seperated list).
588 \end_layout
590 \begin_layout Standard
591 The names of keys and modifiers are platform-dependent.
592 \end_layout
594 \begin_layout Subsubsection
595 unbind-key [<mod>/<modmask>] <key>
596 \end_layout
598 \begin_layout Standard
599 Unbind command from <key> (with specified <mod> and <modmask>).
600 \end_layout
602 \begin_layout Subsubsection
603 set-axis <axis> [disabled | axis | axis-inverse | pressure0- | pressure0+
604  | pressure-0 | pressure-+ | pressure+0 | pressure+-] [minus=<val>] [zero=<val>]
605  [plus=<val>] [tolerance=<val>]
606 \end_layout
608 \begin_layout Standard
609 Set axis parameters for axis <axis>.
610 \end_layout
612 \begin_layout Itemize
613 disabled: Disable axis
614 \end_layout
616 \begin_layout Itemize
617 axis: Normal axis
618 \end_layout
620 \begin_layout Itemize
621 axis-inverse: Inverse axis
622 \end_layout
624 \begin_layout Itemize
625 pressure0-: Pressure sensitive.
626  Released at 0, pressed at -.
627 \end_layout
629 \begin_layout Itemize
630 pressure0+: Pressure sensitive.
631  Released at 0, pressed at +.
632 \end_layout
634 \begin_layout Itemize
635 pressure-0: Pressure sensitive.
636  Released at -, pressed at 0.
637 \end_layout
639 \begin_layout Itemize
640 pressure-+: Pressure sensitive.
641  Released at -, pressed at +.
642 \end_layout
644 \begin_layout Itemize
645 pressure+0: Pressure sensitive.
646  Released at +, pressed at 0.
647 \end_layout
649 \begin_layout Itemize
650 pressure+-: Pressure sensitive.
651  Released at +, pressed at -.
652 \end_layout
654 \begin_layout Itemize
655 minus=<val>: Calibration at extreme minus position (-32768-32767)
656 \end_layout
658 \begin_layout Itemize
659 zero=<val>: Calibration at neutral position (-32768-32767)
660 \end_layout
662 \begin_layout Itemize
663 plus=<val>: Calibration at extreme plus position (-32768-32767)
664 \end_layout
666 \begin_layout Itemize
667 tolerance=<value>: Center band tolerance (0<x<1).
668  The smaller the value, the more sensitive the control is.
669 \end_layout
671 \begin_layout Subsubsection
672 show-bindings
673 \end_layout
675 \begin_layout Standard
676 Print all key bindings in effect.
677 \end_layout
679 \begin_layout Subsection
680 Aliases
681 \end_layout
683 \begin_layout Standard
684 Aliases bind command to sequence of commands.
685  After alias has been defined, it replaces the command it shadows.
686 \end_layout
688 \begin_layout Standard
689 Notes:
690 \end_layout
692 \begin_layout Itemize
693 You can't alias command to itself.
694 \end_layout
696 \begin_layout Itemize
697 Aliases starting with +/- are edge active just like ordinary commands starting
698  with +/-.
699 \end_layout
701 \begin_layout Itemize
702 One command can be aliased to multiple commands.
703 \end_layout
705 \begin_layout Subsubsection
706 alias-command <command> <expansion>
707 \end_layout
709 \begin_layout Standard
710 Append <expansion> to alias <command>.
711  If alias does not already exist, it is created.
712 \end_layout
714 \begin_layout Subsubsection
715 unalias-command <command>
716 \end_layout
718 \begin_layout Standard
719 Clear alias expansion for <command>.
720 \end_layout
722 \begin_layout Subsubsection
723 show-aliases
724 \end_layout
726 \begin_layout Standard
727 Print all aliases and their expansions in effect.
728 \end_layout
730 \begin_layout Subsection
731 run-script <script>
732 \end_layout
734 \begin_layout Standard
735 Run <script> as if commands were entered on the command line.
736 \end_layout
738 \begin_layout Subsection
739 Video dumping
740 \end_layout
742 \begin_layout Standard
743 Following commands control video dumping:
744 \end_layout
746 \begin_layout Subsubsection
747 start-dump <dumper> [<mode>] <prefix/filename>
748 \end_layout
750 \begin_layout Standard
751 Start dumping using dumper <dumper>.
752  If mode is present or not and if prefix or filename is present depends
753  on the dumper and dumper mode.
754 \end_layout
756 \begin_layout Standard
757 The following dumpers are available:
758 \end_layout
760 \begin_layout Itemize
761 INTERNAL-AVI-CSCD: Internal CSCD in .avi dumper.
762 \end_layout
764 \begin_deeper
765 \begin_layout Itemize
766 Mode: uncompressed/pcm: Uncompressed video, PCM audio.
767  Takes prefix.
768 \end_layout
770 \begin_layout Itemize
771 Mode: cscd/pcm: CSCD video, PCM audio.
772  Takes prefix.
773 \end_layout
775 \end_deeper
776 \begin_layout Itemize
777 INTERNAL-JMD: Internal .jmd dumper.
778 \end_layout
780 \begin_deeper
781 \begin_layout Itemize
782 Does not take mode.
783 \end_layout
785 \begin_layout Itemize
786 Takes a filename.
787 \end_layout
789 \end_deeper
790 \begin_layout Itemize
791 INTERNAL-RAW: Internal RAW dumper.
792 \end_layout
794 \begin_deeper
795 \begin_layout Itemize
796 Does not take mode.
797 \end_layout
799 \begin_layout Itemize
800 Takes a prefix.
801 \end_layout
803 \begin_layout Itemize
804 Sound is big-endian signed 16-bit, usually at 32040.5Hz.
805 \end_layout
807 \begin_layout Itemize
808 Video is always upscaled to double resolution (512x448 / 512 x 478).
809 \end_layout
811 \begin_layout Itemize
812 Video framerate is usually 322445/6448 fps for PAL and 10738636/178683 fps
813  for NTSC.
814 \end_layout
816 \end_deeper
817 \begin_layout Itemize
818 INTERNAL-SDMP: Internal SDMP dumper.
819 \end_layout
821 \begin_deeper
822 \begin_layout Itemize
823 Mode 'ms': Multi-segment.
824  Takes prefix.
825 \end_layout
827 \begin_layout Itemize
828 Mode 'ss': Single-segment.
829  Takes filename.
830 \end_layout
832 \end_deeper
833 \begin_layout Subsubsection
834 end-dump <dumper>
835 \end_layout
837 \begin_layout Standard
838 End dumping using <dumper>
839 \end_layout
841 \begin_layout Subsubsection
842 show-dumpers [<dumper>]
843 \end_layout
845 \begin_layout Standard
846 Show the list of dumpers or list of modes for <dumper>
847 \end_layout
849 \begin_layout Subsection
850 Memory manipulation
851 \end_layout
853 \begin_layout Standard
854 <address> may be decimal or hexadecimal (prefixed with '0x').
855  <value> can be hexadecimal (prefixed with '0x'), unsigned or signed (prefixed
856  with '-') decimal.
857 \end_layout
859 \begin_layout Standard
860 The available element <sizes> are:
861 \end_layout
863 \begin_layout Itemize
864 byte: 1 byte
865 \end_layout
867 \begin_layout Itemize
868 word: 2 bytes
869 \end_layout
871 \begin_layout Itemize
872 dword: 4 bytes
873 \end_layout
875 \begin_layout Itemize
876 qword: 8 bytes
877 \end_layout
879 \begin_layout Standard
880 When reading RAM and ROM, multi-byte reads/writes are big-endian.
881  When dealing with DSP memory, multi-byte reads/writes are native-endian
882  (do not use operand sizes exceeding DSP bitness, except dword is OK for
883  24-bit memory).
884 \end_layout
886 \begin_layout Subsubsection
887 read-<size> <address>
888 \end_layout
890 \begin_layout Standard
891 Read the value of byte in <address>.
892 \end_layout
894 \begin_layout Subsubsection
895 read-s<size> <address>
896 \end_layout
898 \begin_layout Standard
899 Read the value of signed byte in <address>.
900 \end_layout
902 \begin_layout Subsubsection
903 write-<size> <address> <value>
904 \end_layout
906 \begin_layout Standard
907 Write <value> to byte in address <address>.
908 \end_layout
910 \begin_layout Subsubsection
911 search-memory reset
912 \end_layout
914 \begin_layout Standard
915 Reset the memory search
916 \end_layout
918 \begin_layout Subsubsection
919 search-memory count
920 \end_layout
922 \begin_layout Standard
923 Print number of candidates remaining
924 \end_layout
926 \begin_layout Subsubsection
927 search-memory print
928 \end_layout
930 \begin_layout Standard
931 Print all candidates remaining
932 \end_layout
934 \begin_layout Subsubsection
935 search-memory <usflag><sizeflag><op>
936 \end_layout
938 \begin_layout Standard
939 Searches memory for addresses satisfying criteria.
940 \end_layout
942 \begin_layout Standard
943 <usflag> can be:
944 \end_layout
946 \begin_layout Itemize
947 u: unsigned
948 \end_layout
950 \begin_layout Itemize
951 s: signed
952 \end_layout
954 \begin_layout Standard
955 <sizeflag> can be:
956 \end_layout
958 \begin_layout Itemize
959 b: byte
960 \end_layout
962 \begin_layout Itemize
963 w: word
964 \end_layout
966 \begin_layout Itemize
967 d: dword
968 \end_layout
970 \begin_layout Itemize
971 q: qword
972 \end_layout
974 \begin_layout Standard
975 <op> can be:
976 \end_layout
978 \begin_layout Itemize
979 lt: < previous value.
980 \end_layout
982 \begin_layout Itemize
983 le: <= previous value.
984 \end_layout
986 \begin_layout Itemize
987 eq: = previous value.
988 \end_layout
990 \begin_layout Itemize
991 ne: != previous value.
992 \end_layout
994 \begin_layout Itemize
995 ge: >= previous value.
996 \end_layout
998 \begin_layout Itemize
999 gt: > previous value.
1000 \end_layout
1002 \begin_layout Subsubsection
1003 search-memory <sizeflag> <value>
1004 \end_layout
1006 \begin_layout Standard
1007 Searches for addresses that currently have value <value>.
1008  <sizeflag> is as in previous command.
1009 \end_layout
1011 \begin_layout Subsection
1012 Main commands
1013 \end_layout
1015 \begin_layout Standard
1016 These commands are not available in lsnesrc, but are available after ROM
1017  has been loaded.
1018 \end_layout
1020 \begin_layout Subsubsection
1021 quit-emulator [/y]
1022 \end_layout
1024 \begin_layout Standard
1025 Quits the emulator (asking for confirmation).
1026  If /y is given, no confirmation is asked.
1027 \end_layout
1029 \begin_layout Subsubsection
1030 pause-emulator
1031 \end_layout
1033 \begin_layout Standard
1034 Toggle paused/unpaused
1035 \end_layout
1037 \begin_layout Subsubsection
1038 +advance-frame 
1039 \end_layout
1041 \begin_layout Standard
1042 Advance frame.
1043  If the button is still held after configurable timeout expires, game unpauses
1044  for the duration frame advance is held.
1045 \end_layout
1047 \begin_layout Subsubsection
1048 +advance-poll 
1049 \end_layout
1051 \begin_layout Standard
1052 Advance subframe.
1053  If the button is still held after configurable timeout expires, game unpauses
1054  for the duration frame advance is held.
1055 \end_layout
1057 \begin_layout Subsubsection
1058 advance-skiplag 
1059 \end_layout
1061 \begin_layout Standard
1062 Skip to first poll in frame after current.
1063 \end_layout
1065 \begin_layout Subsubsection
1066 reset 
1067 \end_layout
1069 \begin_layout Standard
1070 Reset the SNES after this frame.
1071 \end_layout
1073 \begin_layout Subsubsection
1074 load <filename> 
1075 \end_layout
1077 \begin_layout Standard
1078 Load savestate <filename> in current mode.
1079 \end_layout
1081 \begin_layout Subsubsection
1082 load-state <filename> 
1083 \end_layout
1085 \begin_layout Standard
1086 Load savestate <filename> in readwrite mode.
1087 \end_layout
1089 \begin_layout Subsubsection
1090 load-readonly <filename> 
1091 \end_layout
1093 \begin_layout Standard
1094 Load savestate <filename> in readonly mode.
1095 \end_layout
1097 \begin_layout Subsubsection
1098 load-preserve <filename> 
1099 \end_layout
1101 \begin_layout Standard
1102 Load savestate <filename> in readonly mode, preserving current events.
1103 \end_layout
1105 \begin_layout Subsubsection
1106 load-movie <filename> 
1107 \end_layout
1109 \begin_layout Standard
1110 Load savestate <filename>, ignoring save part in readonly mode.
1111 \end_layout
1113 \begin_layout Subsubsection
1114 save-state <filename> 
1115 \end_layout
1117 \begin_layout Standard
1118 Save system state to <filename> as soon as possible.
1119 \end_layout
1121 \begin_layout Subsubsection
1122 save-movie <filename> 
1123 \end_layout
1125 \begin_layout Standard
1126 Save movie to <filename>.
1127 \end_layout
1129 \begin_layout Subsubsection
1130 set-rwmode 
1131 \end_layout
1133 \begin_layout Standard
1134 Set read-write mode.
1135 \end_layout
1137 \begin_layout Subsubsection
1138 set-romode 
1139 \end_layout
1141 \begin_layout Standard
1142 Set read-only mode
1143 \end_layout
1145 \begin_layout Subsubsection
1146 toggle-rwmode 
1147 \end_layout
1149 \begin_layout Standard
1150 Toggle between read-only and read-write modes.
1151 \end_layout
1153 \begin_layout Subsubsection
1154 set-gamename <name> 
1155 \end_layout
1157 \begin_layout Standard
1158 Set name of the game to <name>
1159 \end_layout
1161 \begin_layout Subsubsection
1162 get-gamename 
1163 \end_layout
1165 \begin_layout Standard
1166 Print the name of the game.
1167 \end_layout
1169 \begin_layout Subsubsection
1170 add-author <author> 
1171 \end_layout
1173 \begin_layout Standard
1174 Adds new author <author>.
1175  If <author> does not contain '|' it is full name.
1176  If it contains '|', '|' splits the full name and nickname.
1177 \end_layout
1179 \begin_layout Subsubsection
1180 edit-author <num> <author> 
1181 \end_layout
1183 \begin_layout Standard
1184 Edit the author in slot <num> (0-based) to be <author> (see add-author for
1185  format)
1186 \end_layout
1188 \begin_layout Subsubsection
1189 remove-author <num> 
1190 \end_layout
1192 \begin_layout Standard
1193 Remove author in slot <num>
1194 \end_layout
1196 \begin_layout Subsubsection
1197 print-authors 
1198 \end_layout
1200 \begin_layout Standard
1201 Print authors.
1202 \end_layout
1204 \begin_layout Subsubsection
1205 test-1, test-2, test-3
1206 \end_layout
1208 \begin_layout Standard
1209 Internal test commands.
1210  Don't use.
1211 \end_layout
1213 \begin_layout Subsubsection
1214 take-screenshot <filename> 
1215 \end_layout
1217 \begin_layout Standard
1218 Save screenshot to <filename>.
1219 \end_layout
1221 \begin_layout Subsubsection
1222 +controller<num><button>
1223 \end_layout
1225 \begin_layout Standard
1226 Press button <button> on controller <num> (1-8).
1227  The following button names are known:
1228 \end_layout
1230 \begin_layout Itemize
1231 left
1232 \end_layout
1234 \begin_layout Itemize
1235 right
1236 \end_layout
1238 \begin_layout Itemize
1240 \end_layout
1242 \begin_layout Itemize
1243 down
1244 \end_layout
1246 \begin_layout Itemize
1248 \end_layout
1250 \begin_layout Itemize
1252 \end_layout
1254 \begin_layout Itemize
1256 \end_layout
1258 \begin_layout Itemize
1260 \end_layout
1262 \begin_layout Itemize
1264 \end_layout
1266 \begin_layout Itemize
1268 \end_layout
1270 \begin_layout Itemize
1271 select
1272 \end_layout
1274 \begin_layout Itemize
1275 start
1276 \end_layout
1278 \begin_layout Itemize
1279 trigger
1280 \end_layout
1282 \begin_layout Itemize
1283 cursor
1284 \end_layout
1286 \begin_layout Itemize
1287 pause
1288 \end_layout
1290 \begin_layout Itemize
1291 turbo
1292 \end_layout
1294 \begin_layout Subsubsection
1295 controllerh<num><button>
1296 \end_layout
1298 \begin_layout Standard
1299 Hold/unhold button <button> on controller <num> (1-8).
1300  See +controller for button names.
1301 \end_layout
1303 \begin_layout Subsubsection
1304 controllerf<num><button>
1305 \end_layout
1307 \begin_layout Standard
1308 Hold/unhold button <button> on controller <num> (1-8) for the next frame.
1309  See +controller for button names.
1310 \end_layout
1312 \begin_layout Standard
1313 Cauntion: Does not work properly if outside frame advance.
1314 \end_layout
1316 \begin_layout Subsubsection
1317 autofire (<pattern>|-)...
1318 \end_layout
1320 \begin_layout Standard
1321 Set autofire pattern.
1322  Each parameter is comma-separated list of button names (in form of 1start,
1323  1A, 2B, etc..) to hold on that frame.
1324  After reaching the end of pattern, the pattern restarts from the beginning.
1325 \end_layout
1327 \begin_layout Subsubsection
1328 repaint
1329 \end_layout
1331 \begin_layout Standard
1332 Force a repaint.
1333 \end_layout
1335 \begin_layout Subsection
1336 Save jukebox 
1337 \end_layout
1339 \begin_layout Subsubsection
1340 cycle-jukebox-backward
1341 \end_layout
1343 \begin_layout Standard
1344 Cycle save jukebox backwards.
1345 \end_layout
1347 \begin_layout Subsubsection
1348 cycle-jukebox-forward
1349 \end_layout
1351 \begin_layout Standard
1352 Cycle save jukebox forwards
1353 \end_layout
1355 \begin_layout Subsubsection
1356 load-jukebox
1357 \end_layout
1359 \begin_layout Standard
1360 Do load from jukebox (current mode).
1361 \end_layout
1363 \begin_layout Subsubsection
1364 save-jukebox
1365 \end_layout
1367 \begin_layout Standard
1368 Do state save to jukebox.
1369 \end_layout
1371 \begin_layout Subsection
1372 Lua 
1373 \end_layout
1375 \begin_layout Standard
1376 Only available if lua support is compiled in.
1377 \end_layout
1379 \begin_layout Subsubsection
1380 evaluate-lua <luacode>
1381 \end_layout
1383 \begin_layout Standard
1384 Run Lua code <luacode> using built-in Lua interpretter.
1385 \end_layout
1387 \begin_layout Subsubsection
1388 run-lua <script>
1389 \end_layout
1391 \begin_layout Standard
1392 Run specified lua file using built-in Lua interpretter.
1393 \end_layout
1395 \begin_layout Subsubsection
1396 reset-lua
1397 \end_layout
1399 \begin_layout Standard
1400 Clear the Lua VM state and restore to factory defaults.
1401 \end_layout
1403 \begin_layout Subsection
1404 Memory watch
1405 \end_layout
1407 \begin_layout Subsubsection
1408 add-watch <name> <expression>
1409 \end_layout
1411 \begin_layout Standard
1412 Adds new watch (or modifies old one).
1413 \end_layout
1415 \begin_layout Subsubsection
1416 remove-watch <name>
1417 \end_layout
1419 \begin_layout Standard
1420 Remove a watch.
1421 \end_layout
1423 \begin_layout Subsection
1424 Sound 
1425 \end_layout
1427 \begin_layout Subsubsection
1428 enable-sound <on/off> 
1429 \end_layout
1431 \begin_layout Standard
1432 Enable/Disable sound.
1433 \end_layout
1435 \begin_layout Subsubsection
1436 set-sound-device <device> 
1437 \end_layout
1439 \begin_layout Standard
1440 Set sound device to <device>
1441 \end_layout
1443 \begin_layout Subsubsection
1444 show-sound-status 
1445 \end_layout
1447 \begin_layout Standard
1448 Show status of sound system.
1449 \end_layout
1451 \begin_layout Subsubsection
1452 show-sound-devices
1453 \end_layout
1455 \begin_layout Standard
1456 Show all available devices.
1457 \end_layout
1459 \begin_layout Subsubsection
1460 set-volume <multiplier>
1461 \end_layout
1463 \begin_layout Standard
1464 Set the volume multiplier to <multiplier>.
1465  1 is normal volume, and higher numbers are louder.
1466 \end_layout
1468 \begin_layout Subsubsection
1469 set-volume <multiplier>%
1470 \end_layout
1472 \begin_layout Standard
1473 Set the volume multiplier to <multiplier> percent.
1474  100 is normal volume, and higher numbers are louder.
1475 \end_layout
1477 \begin_layout Subsubsection
1478 set-volume <multiplier>dB
1479 \end_layout
1481 \begin_layout Standard
1482 Set the volume multiplier to <multiplier> dB.
1483  0 is normal volume, and higher numbers are louder.
1484  The value may be negative.
1485 \end_layout
1487 \begin_layout Subsection
1488 Misc.
1489 \end_layout
1491 \begin_layout Subsubsection
1492 reload-rom [<file>]
1493 \end_layout
1495 \begin_layout Standard
1496 Reloads the main ROM image from <file>.
1497 \end_layout
1499 \begin_layout Subsubsection
1500 edit-subtitle <firstframe> <length> [<text>]
1501 \end_layout
1503 \begin_layout Standard
1504 Edit or delete a subtitle.
1505 \end_layout
1507 \begin_layout Subsubsection
1508 list-subtitle
1509 \end_layout
1511 \begin_layout Standard
1512 List subtitles.
1513 \end_layout
1515 \begin_layout Subsection
1516 Commentary track
1517 \end_layout
1519 \begin_layout Subsubsection
1520 list-streams
1521 \end_layout
1523 \begin_layout Standard
1524 List streams
1525 \end_layout
1527 \begin_layout Subsubsection
1528 play-stream <id>
1529 \end_layout
1531 \begin_layout Standard
1532 Play stream <id>.
1533 \end_layout
1535 \begin_layout Subsubsection
1536 delete-stream <id>
1537 \end_layout
1539 \begin_layout Standard
1540 Delete stream <id>
1541 \end_layout
1543 \begin_layout Subsubsection
1544 change-timebase <id> <newbase>
1545 \end_layout
1547 \begin_layout Standard
1548 Change time base of <id> to <newbase>.
1549  The time base can be given as samples (integer) or second (postfix with
1550  s).
1551 \end_layout
1553 \begin_layout Subsubsection
1554 import-stream-opus <timebase> <file>
1555 \end_layout
1557 \begin_layout Standard
1558 Import opus stream from <file>, placing it at <timebase>.
1559  This operation is lossless.
1560 \end_layout
1562 \begin_layout Subsubsection
1563 import-stream-pcm <timebase> <file>
1564 \end_layout
1566 \begin_layout Standard
1567 Import PCM (.sox, 1ch@48kHz) stream from <file>, placing it at <timebase>.
1568 \end_layout
1570 \begin_layout Subsubsection
1571 export-stream-opus <id> <file>
1572 \end_layout
1574 \begin_layout Standard
1575 Export stream <id> as opus stream to <file>.
1576  This operation is lossless.
1577 \end_layout
1579 \begin_layout Subsubsection
1580 export-stream-pcm <id> <file>
1581 \end_layout
1583 \begin_layout Standard
1584 Export stream <id> as PCM (.sox) stream to <file>.
1586 \end_layout
1588 \begin_layout Subsubsection
1589 export-superstream <file>
1590 \end_layout
1592 \begin_layout Standard
1593 Export the entiere superstream as PCM (.sox) stream to <file>.
1594 \end_layout
1596 \begin_layout Subsubsection
1597 load-collection <file>
1598 \end_layout
1600 \begin_layout Standard
1601 Load collection (if there is existing collection, unload it) from <file>
1602 \end_layout
1604 \begin_layout Subsubsection
1605 unload-collection
1606 \end_layout
1608 \begin_layout Standard
1609 Unload collection.
1610 \end_layout
1612 \begin_layout Subsubsection
1613 +tangent
1614 \end_layout
1616 \begin_layout Standard
1617 Tangent for recording voice for commentary track.
1618  While pressed, record a stream.
1619 \end_layout
1621 \begin_layout Subsection
1622 SDL Platform commands 
1623 \end_layout
1625 \begin_layout Standard
1626 The following are valid on SDL platform.
1627 \end_layout
1629 \begin_layout Subsubsection
1630 identify-key
1631 \end_layout
1633 \begin_layout Standard
1634 Asks to press a key and then identifies that (pseudo-)key.
1635 \end_layout
1637 \begin_layout Subsubsection
1638 toggle-console 
1639 \end_layout
1641 \begin_layout Standard
1642 Toggle between windowed/fullscreen console.
1643 \end_layout
1645 \begin_layout Subsubsection
1646 scroll-fullup 
1647 \end_layout
1649 \begin_layout Standard
1650 Scroll messages window as far back as it goes.
1651 \end_layout
1653 \begin_layout Subsubsection
1654 scroll-fulldown 
1655 \end_layout
1657 \begin_layout Standard
1658 Scroll messages window as far forward as it goes.
1659 \end_layout
1661 \begin_layout Subsubsection
1662 scroll-up 
1663 \end_layout
1665 \begin_layout Standard
1666 Scroll messages window back one screenful.
1667 \end_layout
1669 \begin_layout Subsubsection
1670 scroll-down 
1671 \end_layout
1673 \begin_layout Standard
1674 Scroll messages window forward one screenful.
1675 \end_layout
1677 \begin_layout Subsubsection
1678 prompt-command <command>
1679 \end_layout
1681 \begin_layout Standard
1682 Enter command prompt, with prompt prepopulated with specified command.
1683 \end_layout
1685 \begin_layout Section
1686 Settings
1687 \end_layout
1689 \begin_layout Subsection
1690 Core settings
1691 \end_layout
1693 \begin_layout Subsubsection
1694 firmwarepath
1695 \end_layout
1697 \begin_layout Standard
1698 Set where bsnes looks for firmware files.
1699  Default is 
1700 \begin_inset Quotes eld
1701 \end_inset
1704 \begin_inset Quotes erd
1705 \end_inset
1708 \end_layout
1710 \begin_layout Subsubsection
1711 target
1712 \end_layout
1714 \begin_layout Standard
1715 Set the target .
1716  Numeric, range is 0.001 to 
1717 \begin_inset Quotes eld
1718 \end_inset
1720 infinite
1721 \begin_inset Quotes erd
1722 \end_inset
1725  Default is native framerate.
1726 \end_layout
1728 \begin_layout Subsubsection
1729 savecompression
1730 \end_layout
1732 \begin_layout Standard
1733 Set save compression level (integer 0-9).
1734  Default is 7 (0 is no compression).
1735 \end_layout
1737 \begin_layout Subsubsection
1738 advance-timeout
1739 \end_layout
1741 \begin_layout Standard
1742 Set the frame advance timeout in milliseconds.
1743  Numeric integer, range is 0-999999999.
1744  Default is 500.
1745 \end_layout
1747 \begin_layout Subsubsection
1748 advance-subframe-timeout
1749 \end_layout
1751 \begin_layout Standard
1752 Subframe advance timeout in milliseconds.
1753  Default is 100.
1754 \end_layout
1756 \begin_layout Subsubsection
1757 save-every-frame (bsnes only)
1758 \end_layout
1760 \begin_layout Standard
1761 If true, simulate saving on each frame.
1762  Trades off emulation accuracy for sync stability.
1763  Also needed if the movie assumes saving on each frame for rewind.
1764 \end_layout
1766 \begin_layout Subsection
1767 AVI dumper settings
1768 \end_layout
1770 \begin_layout Subsubsection
1771 avi-large
1772 \end_layout
1774 \begin_layout Standard
1775 AVI dumper: Always dump at 512x448 or 512x478 regardless of what the console
1776  outputs.
1777 \end_layout
1779 \begin_layout Subsubsection
1780 avi-left-border
1781 \end_layout
1783 \begin_layout Standard
1784 AVI dumper: Set the default left border thickness (unless lua overrides)
1785  for dumps.
1786  Range 0-8191.
1787  Default is 0.
1788 \end_layout
1790 \begin_layout Subsubsection
1791 avi-right-border
1792 \end_layout
1794 \begin_layout Standard
1795 AVI dumper: Set the default right border thickness (unless lua overrides)
1796  for dumps.
1797  Range 0-8191.
1798  Default is 0.
1799 \end_layout
1801 \begin_layout Subsubsection
1802 avi-top-border
1803 \end_layout
1805 \begin_layout Standard
1806 AVI dumper: Set the default top border thickness (unless lua overrides)
1807  for dumps.
1808  Range 0-8191.
1809  Default is 0.
1810 \end_layout
1812 \begin_layout Subsubsection
1813 avi-bottom-border
1814 \end_layout
1816 \begin_layout Standard
1817 AVI dumper: Set the default bottom border thickness (unless lua overrides)
1818  for dumps.
1819  Range 0-8191.
1820  Default is 0.
1821 \end_layout
1823 \begin_layout Subsubsection
1824 avi-maxframes
1825 \end_layout
1827 \begin_layout Standard
1828 AVI dumper: Maximum number of frames per dump segment (0 => unlimited).
1829  Range 0-999999999.
1830  Default is 0.
1831 \end_layout
1833 \begin_layout Subsubsection
1834 avi-compresison
1835 \end_layout
1837 \begin_layout Standard
1838 AVI dumper: Compression level (0-18).
1839 \end_layout
1841 \begin_layout Itemize
1842 Compression levels 10 and above are not compatible with stock CSCD codec.
1843 \end_layout
1845 \begin_layout Itemize
1846 Recomended level is 7.
1847 \end_layout
1849 \begin_layout Subsubsection
1850 avi-soundrate
1851 \end_layout
1853 \begin_layout Standard
1854 AVI dumper: Set method of determining the sound rate.
1855 \end_layout
1857 \begin_layout Itemize
1858 0: Pick nearest of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 64, 88.2, 96,
1859  128, 176.4 and 192 kHz.
1860 \end_layout
1862 \begin_layout Itemize
1863 1: Round down to nearest integer.
1864 \end_layout
1866 \begin_layout Itemize
1867 2: Round up to nearest ingeter.
1868 \end_layout
1870 \begin_layout Subsection
1871 JMD options
1872 \end_layout
1874 \begin_layout Subsubsection
1875 jmd-copression
1876 \end_layout
1878 \begin_layout Standard
1879 JMD dumper: Compression level (0-9).
1880 \end_layout
1882 \begin_layout Subsection
1883 SDL platform settings
1884 \end_layout
1886 \begin_layout Subsubsection
1887 autorepeat-first-delay
1888 \end_layout
1890 \begin_layout Standard
1891 Sets the delay for first character in typematic autorepeat.
1892 \end_layout
1894 \begin_layout Subsubsection
1895 autorepeat-subsequent-delay
1896 \end_layout
1898 \begin_layout Standard
1899 Sets the delay for subsequent characters in typematic autorepeat.
1900 \end_layout
1902 \begin_layout Section
1903 Lua functions
1904 \end_layout
1906 \begin_layout Subsection
1907 Core (in main table)
1908 \end_layout
1910 \begin_layout Subsubsection
1911 print
1912 \end_layout
1914 \begin_layout Standard
1915 Print line to message console.
1916 \end_layout
1918 \begin_layout Subsubsection
1919 exec(string command)
1920 \end_layout
1922 \begin_layout Standard
1923 Run command as it was entered on the command line
1924 \end_layout
1926 \begin_layout Subsubsection
1927 utime()
1928 \end_layout
1930 \begin_layout Standard
1931 Returns two values.
1932  First is time since some epoch in seconds, the second is microseconds mod
1933  10^6 since that epoch.
1934 \end_layout
1936 \begin_layout Subsubsection
1937 emulator_ready()
1938 \end_layout
1940 \begin_layout Standard
1941 Returns true if emulator has finished booting, false if not (on_startup()
1942  will be issued later).
1943 \end_layout
1945 \begin_layout Subsubsection
1946 set_idle_timeout(number timeout)
1947 \end_layout
1949 \begin_layout Standard
1950 Set number of microseconds to block idle for.
1951  After this timeout has expired, on_idle() will be called once.
1952 \end_layout
1954 \begin_layout Subsubsection
1955 set_timer_timeout(number timeout)
1956 \end_layout
1958 \begin_layout Standard
1959 Set number of microseconds to block timer for.
1960  After this timeout has expired, on_timer() will be called once.
1961 \end_layout
1963 \begin_layout Subsubsection
1964 bus_address(number snesaddr)
1965 \end_layout
1967 \begin_layout Standard
1968 Returns virtual address corresponding to specified address on SNES bus.
1969 \end_layout
1971 \begin_layout Subsubsection
1972 loopwrapper(function fun, ...)
1973 \end_layout
1975 \begin_layout Standard
1976 Calls function fun with function and specified arguments.
1977  The function passed suspends execution until the function returned is called.
1978  Handy for linear flow control among multiple invocations of a hook.
1979  Example code:
1980 \end_layout
1982 \begin_layout LyX-Code
1983 on_paint = loopwrapper(function(wait)
1984 \end_layout
1986 \begin_deeper
1987 \begin_layout LyX-Code
1988 while true do
1989 \end_layout
1991 \begin_deeper
1992 \begin_layout LyX-Code
1993 gui.text(0, 0, 
1994 \begin_inset Quotes eld
1995 \end_inset
1997 Test!
1998 \begin_inset Quotes erd
1999 \end_inset
2002 \end_layout
2004 \begin_layout LyX-Code
2005 wait();
2006 \end_layout
2008 \end_deeper
2009 \begin_layout LyX-Code
2011 \end_layout
2013 \end_deeper
2014 \begin_layout LyX-Code
2015 end);
2016 \end_layout
2018 \begin_layout Subsubsection
2019 list_bindings([string cmd])
2020 \end_layout
2022 \begin_layout Standard
2023 Get table of all keybindings, indexed by keyspec (modifiers|mask/key).
2024  If command is specified, the table is limited to that command.
2025 \end_layout
2027 \begin_layout Subsubsection
2028 get_alias(string aname)
2029 \end_layout
2031 \begin_layout Standard
2032 Get expansion of given alias.
2033 \end_layout
2035 \begin_layout Subsubsection
2036 set_alias(string aname, string value)
2037 \end_layout
2039 \begin_layout Standard
2040 Set expansion of given alias.
2041 \end_layout
2043 \begin_layout Subsubsection
2044 create_ibind(string name, string cmd)
2045 \end_layout
2047 \begin_layout Standard
2048 Return object representing inverse binding with specified name and specified
2049  command.
2050 \end_layout
2052 \begin_layout Itemize
2053 To create press/release commands, use aliases +foo and -foo .
2054 \end_layout
2056 \begin_layout Itemize
2057 Keep the returned object around.
2058 \end_layout
2060 \begin_layout Subsection
2061 Table bit:
2062 \end_layout
2064 \begin_layout Standard
2065 Bitwise logical functions and related.
2066 \end_layout
2068 \begin_layout Subsubsection
2069 bit.none(number...) / bit.bnot(number...)
2070 \end_layout
2072 \begin_layout Standard
2073 48-bit bitwise NOT / NONE function (set bits that are set in none of the
2074  arguments).
2075 \end_layout
2077 \begin_layout Subsubsection
2078 bit.any(number...) / bit.bor(number...)
2079 \end_layout
2081 \begin_layout Standard
2082 48-bit bitwise OR / ANY function (set bits that are set in any of the arguments).
2083 \end_layout
2085 \begin_layout Subsubsection
2086 bit.all(number...) / bit.band(number...)
2087 \end_layout
2089 \begin_layout Standard
2090 48-bit bitwise AND / ALL function (set bits that are set in all of the arguments
2092 \end_layout
2094 \begin_layout Subsubsection
2095 bit.parity(number...) / bit.bxor(number...)
2096 \end_layout
2098 \begin_layout Standard
2099 48-bit bitwise XOR / PARITY function (set bits that are set in odd number
2100  of the arguments).
2101 \end_layout
2103 \begin_layout Subsubsection
2104 bit.lrotate(number base[, number amount[, number bits]])
2105 \end_layout
2107 \begin_layout Standard
2108 Rotate bits-bit (max 48, default 48) number left by amount (default 1) places.
2109 \end_layout
2111 \begin_layout Subsubsection
2112 bit.rrotate(number base[, number amount[, number bits]])
2113 \end_layout
2115 \begin_layout Standard
2116 Rotate bits-bit (max 48, default 48) number right by amount (default 1)
2117  places.
2118 \end_layout
2120 \begin_layout Subsubsection
2121 bit.lshift(number base[, number amount[, number bits]])
2122 \end_layout
2124 \begin_layout Standard
2125 Shift bits-bit (max 48, default 48) number left by amount (default 1) places.
2126  The new bits are filled with zeroes.
2127 \end_layout
2129 \begin_layout Subsubsection
2130 bit.lrshift(number base[, number amount[, number bits]])
2131 \end_layout
2133 \begin_layout Standard
2134 Shift bits-bit (max 48, default 48) number logically right by amount (default
2135  1) places.
2136  The new bits are filled with zeroes.
2137 \end_layout
2139 \begin_layout Subsubsection
2140 bit.arshift(number base[, number amount[, number bits]])
2141 \end_layout
2143 \begin_layout Standard
2144 Shift bits-bit (max 48, default 48) number arithmetically right by amount
2145  (default 1) places.
2146  The new bits are shifted in with copy of the high bit.
2147 \end_layout
2149 \begin_layout Subsubsection
2150 bit.extract(number base[, number bit0[, number bit1,...]])
2151 \end_layout
2153 \begin_layout Standard
2154 Returns number that has bit0-th bit as bit 0, bit1-th bit as 1 and so on.
2155 \end_layout
2157 \begin_layout Standard
2158 Notes: 
2159 \end_layout
2161 \begin_layout Itemize
2162 Bit numbers up to 51 should work reliably (then things start falling apart
2163  due to double precision issues).
2164 \end_layout
2166 \begin_layout Itemize
2167 There are two special bit positions, true and false, standing for always
2168  set bit and always clear bit.
2169 \end_layout
2171 \begin_layout Subsubsection
2172 bit.value([number bit1[, number bit2,...]])
2173 \end_layout
2175 \begin_layout Standard
2176 Returns bitwise OR of 1 left shifted by bit1 places, 1 left shifted by bit2
2177  places and so on.
2178  As special value, nil argument is no-op.
2179 \end_layout
2181 \begin_layout Subsubsection
2182 bit.test_any(number a, number b)
2183 \end_layout
2185 \begin_layout Standard
2186 Is there a common set bit in a and b?
2187 \end_layout
2189 \begin_layout Subsubsection
2190 bit.test_all(number a, number b)
2191 \end_layout
2193 \begin_layout Standard
2194 Are all set bits in b also set in a?
2195 \end_layout
2197 \begin_layout Subsubsection
2198 bit.popcount(number a)
2199 \end_layout
2201 \begin_layout Standard
2202 Population count of a.
2203 \end_layout
2205 \begin_layout Subsubsection
2206 bit.clshift(number a, number b, [number amount,[number bits]])
2207 \end_layout
2209 \begin_layout Standard
2210 Does chained left shift on a, b by amount positions, assuming numbers to
2211  be of specified number of bits.
2212 \end_layout
2214 \begin_layout Subsubsection
2215 bit.crshift(number a, number b, [number amount,[number bits]])
2216 \end_layout
2218 \begin_layout Standard
2219 Does chained right shift on a, b by amount positions, assuming numbers to
2220  be of specified number of bits.
2221 \end_layout
2223 \begin_layout Subsubsection
2224 bit.flagdecode(number a, number bits, [string on, [string off]])
2225 \end_layout
2227 \begin_layout Standard
2228 Return string of length bits where ith character is ith character of on
2229  if bit i is on, otherwise ith character of off.
2230  Out of range reads give last character, or '*'/'-' if empty.
2231 \end_layout
2233 \begin_layout Subsubsection
2234 bit.rflagdecode(number a, number bits, [string on, [string off]])
2235 \end_layout
2237 \begin_layout Standard
2238 Like bit.flagdecode, but outputs the string in the opposite order (most significa
2239 nt bit first).
2240 \end_layout
2242 \begin_layout Subsection
2243 Table gui:
2244 \end_layout
2246 \begin_layout Standard
2247 Most of these functions can only be called in on_paint and on_video callbacks.
2248  Exceptions are noted.
2249 \end_layout
2251 \begin_layout Standard
2252 Colors are 32-bit.
2253  Bits 0-7 are the blue component, bits 8-15 are the green component, bits
2254  16-23 are the red component, bits 24-31 are alpha component (0 is fully
2255  opaque, 255 is almost transparent).
2256  -1 is the fully transparent color.
2257  Alpha values greater than 127 do work.
2258 \end_layout
2260 \begin_layout Standard
2261 Origin of coordinates is at top left corner of game display area.
2262  Left and top gaps correspond to negative coordinates.
2263 \end_layout
2265 \begin_layout Subsubsection
2266 gui.resolution()
2267 \end_layout
2269 \begin_layout Standard
2270 Returns 2-tuple (hresolution, vresolution).
2271 \end_layout
2273 \begin_layout Subsubsection
2274 gui.<class>_gap(number gap)
2275 \end_layout
2277 \begin_layout Standard
2278 Set the <class> (left, right, top, bottom) gap to specified value (max gap
2279  is 8191).
2280 \end_layout
2282 \begin_layout Subsubsection
2283 gui.text(number x, number y, string text[, number fgc[, number bgc]])
2284 \end_layout
2286 \begin_layout Standard
2287 Draw specified text on the GUI (each character cell is 8 or 16 wide and
2288  16 high).
2289  Parameters:
2290 \end_layout
2292 \begin_layout Itemize
2293 x: X-coordinate to start the drawing from (and x-coordinate at begining
2294  of the lines).
2295 \end_layout
2297 \begin_layout Itemize
2298 y: Y-coordinate to start the drawing from.
2299 \end_layout
2301 \begin_layout Itemize
2302 text: The text to draw.
2303 \end_layout
2305 \begin_layout Itemize
2306 fgc: Text color (default is 0xFFFFFF (white))
2307 \end_layout
2309 \begin_layout Itemize
2310 bgc: Background color (default is -1 (transparent))
2311 \end_layout
2313 \begin_layout Subsubsection
2314 gui.textH(number x, number y, string text[, number fgc[, number bgc]])
2315 \end_layout
2317 \begin_layout Standard
2318 Like gui.text, but draw using double-width.
2319 \end_layout
2321 \begin_layout Subsubsection
2322 gui.textV(number x, number y, string text[, number fgc[, number bgc]])
2323 \end_layout
2325 \begin_layout Standard
2326 Like gui.text, but draw using double-height.
2327 \end_layout
2329 \begin_layout Subsubsection
2330 gui.textHV(number x, number y, string text[, number fgc[, number bgc]])
2331 \end_layout
2333 \begin_layout Standard
2334 Like gui.text, but draw using double-width/double-height.
2335 \end_layout
2337 \begin_layout Subsubsection
2338 gui.rectangle(number x, number y, number width, number height[, number thickness[
2339 , number outline[, number fill]]])
2340 \end_layout
2342 \begin_layout Standard
2343 Draw rectangle on the GUI.
2344  Parameters:
2345 \end_layout
2347 \begin_layout Itemize
2348 x: X-coordinate of left edge.
2349 \end_layout
2351 \begin_layout Itemize
2352 y: Y-coordinate of upper edge.
2353 \end_layout
2355 \begin_layout Itemize
2356 width: Width of rectangle.
2357 \end_layout
2359 \begin_layout Itemize
2360 height: Height of rectangle.
2361 \end_layout
2363 \begin_layout Itemize
2364 thickness: Thickness of outline (default is 1).
2365 \end_layout
2367 \begin_layout Itemize
2368 outline: Color of outline (default is 0xFFFFFF (white))
2369 \end_layout
2371 \begin_layout Itemize
2372 fill: Color of fill (default is -1 (transparent))
2373 \end_layout
2375 \begin_layout Subsubsection
2376 gui.box(number x, number y, number width, number height[, number thickness[,
2377  number outline1[,number outline2[, number fill]]]])
2378 \end_layout
2380 \begin_layout Standard
2381 Draw rectangle with 3D effect on the GUI.
2382  Parameters:
2383 \end_layout
2385 \begin_layout Itemize
2386 x: X-coordinate of left edge.
2387 \end_layout
2389 \begin_layout Itemize
2390 y: Y-coordinate of upper edge.
2391 \end_layout
2393 \begin_layout Itemize
2394 width: Width of rectangle.
2395 \end_layout
2397 \begin_layout Itemize
2398 height: Height of rectangle.
2399 \end_layout
2401 \begin_layout Itemize
2402 thickness: Thickness of outline (default is 1).
2403 \end_layout
2405 \begin_layout Itemize
2406 outline1: First color of outline (default is 0xFFFFFF (white))
2407 \end_layout
2409 \begin_layout Itemize
2410 outline2: First color of outline (default is 0x808080 (dark gray))
2411 \end_layout
2413 \begin_layout Itemize
2414 fill: Color of fill (default is 0xC0C0C0 (light grayy))
2415 \end_layout
2417 \begin_layout Subsubsection
2418 gui.pixel(number x, number y[, number color])
2419 \end_layout
2421 \begin_layout Standard
2422 Draw one pixel on the GUI.
2423  Parameters:
2424 \end_layout
2426 \begin_layout Itemize
2427 x: X-coordinate of the pixel
2428 \end_layout
2430 \begin_layout Itemize
2431 y: Y-coordinate of the pixel
2432 \end_layout
2434 \begin_layout Itemize
2435 color: Color of the pixel (default is 0xFFFFFF (white))
2436 \end_layout
2438 \begin_layout Subsubsection
2439 gui.crosshair(number x, number y[, number length[, number color]])
2440 \end_layout
2442 \begin_layout Standard
2443 Draw a crosshair.
2444  Parameters:
2445 \end_layout
2447 \begin_layout Itemize
2448 x: X-coordinate of the crosshair
2449 \end_layout
2451 \begin_layout Itemize
2452 y: Y-coordinate of the crosshair
2453 \end_layout
2455 \begin_layout Itemize
2456 length: Length of the crosshair lines (default 10).
2457 \end_layout
2459 \begin_layout Itemize
2460 color: Color of the crosshair (default is 0xFFFFFF (white))
2461 \end_layout
2463 \begin_layout Subsubsection
2464 gui.line(number x1, number y1, number x2, number y2[, number color])
2465 \end_layout
2467 \begin_layout Standard
2468 Draw a thin line.
2469  Parameters:
2470 \end_layout
2472 \begin_layout Itemize
2473 x1: X-coordinate of one end.
2474 \end_layout
2476 \begin_layout Itemize
2477 y1: Y-coordinate of one end.
2478 \end_layout
2480 \begin_layout Itemize
2481 x2: X-coordinate of the other end.
2482 \end_layout
2484 \begin_layout Itemize
2485 y2: Y-coordinate of the other end.
2486 \end_layout
2488 \begin_layout Itemize
2489 color: Color of the line (default is 0xFFFFFF (white)).
2490 \end_layout
2492 \begin_layout Subsubsection
2493 gui.circle(number x, number y, number r[, number thick[, number border[,
2494  number fil]]])
2495 \end_layout
2497 \begin_layout Standard
2498 Draw a circle.
2499  Parameters.
2500 \end_layout
2502 \begin_layout Itemize
2503 x: X-coordinate of the center
2504 \end_layout
2506 \begin_layout Itemize
2507 y: Y-coordinate of the center
2508 \end_layout
2510 \begin_layout Itemize
2511 r: The radius of the circle
2512 \end_layout
2514 \begin_layout Itemize
2515 thick: Border thickness
2516 \end_layout
2518 \begin_layout Itemize
2519 border: Border color (default is 0xFFFFFF (white))
2520 \end_layout
2522 \begin_layout Itemize
2523 fill: Fill color (default is -1 (transparent)).
2524 \end_layout
2526 \begin_layout Subsubsection
2527 gui.bitmap_draw(number x, number y, bitmap bitmap, palette palette)
2528 \end_layout
2530 \begin_layout Standard
2531 Draw a bitmap on screen with specified palette.
2532  Parameters:
2533 \end_layout
2535 \begin_layout Itemize
2536 x: X-coordinate of left edge.
2537 \end_layout
2539 \begin_layout Itemize
2540 y: Y-coordinate of top edge.
2541 \end_layout
2543 \begin_layout Itemize
2544 bitmap: The bitmap to draw
2545 \end_layout
2547 \begin_layout Itemize
2548 palette: The palette to draw the bitmap using.
2549 \end_layout
2551 \begin_layout Subsubsection
2552 gui.bitmap_draw(number x, number y, dbitmap bitmap)
2553 \end_layout
2555 \begin_layout Standard
2556 Draw a bitmap on screen.
2557  Parameters:
2558 \end_layout
2560 \begin_layout Itemize
2561 x: X-coordinate of left edge.
2562 \end_layout
2564 \begin_layout Itemize
2565 y: Y-coordinate of top edge.
2566 \end_layout
2568 \begin_layout Itemize
2569 bitmap: The bitmap to draw
2570 \end_layout
2572 \begin_layout Subsubsection
2573 gui.palette_new()
2574 \end_layout
2576 \begin_layout Standard
2577 Returns a new palette (initially all transparent).
2578  Can be used anywhere.
2579 \end_layout
2581 \begin_layout Subsubsection
2582 gui.bitmap_new(number w, number h, boolean direct[, bool icolor])
2583 \end_layout
2585 \begin_layout Standard
2586 Returns a new bitmap/dbitmap.
2587  Can be used anywhere.
2588  Parameters:
2589 \end_layout
2591 \begin_layout Itemize
2592 w: The width of new bitmap
2593 \end_layout
2595 \begin_layout Itemize
2596 h: The height of new bitmap
2597 \end_layout
2599 \begin_layout Itemize
2600 direct: If true, the returned bitmap is dbitmap, otherwise bitmap.
2601 \end_layout
2603 \begin_layout Itemize
2604 icolor: Initital fill color (defaults to 0 on BITMAP, -1 on DBITMAP)
2605 \end_layout
2607 \begin_layout Subsubsection
2608 gui.bitmap_load(string file)
2609 \end_layout
2611 \begin_layout Standard
2612 Returns loaded bitmap/dbitmap (if bitmap, the second return value is palette
2613  for bitmap).
2614  Can be used anywhere.
2615  Parameters:
2616 \end_layout
2618 \begin_layout Itemize
2619 file: The name of file to load.
2620 \end_layout
2622 \begin_layout Subsubsection
2623 gui.palette_set(palette palette, number index, number color)
2624 \end_layout
2626 \begin_layout Standard
2627 Sets color in palette.
2628  Can be used anywhere.
2629  Parameters:
2630 \end_layout
2632 \begin_layout Itemize
2633 palette: The palette to manipulate
2634 \end_layout
2636 \begin_layout Itemize
2637 index: Index of color (0-65535).
2638 \end_layout
2640 \begin_layout Itemize
2641 color: The color value.
2642 \end_layout
2644 \begin_layout Subsubsection
2645 gui.bitmap_pset(bitmap/dbitmap bitmap, number x, number y, number color)
2646 \end_layout
2648 \begin_layout Standard
2649 Sets specified pixel in bitmap.
2650  Can be used anywhere.
2651  Parameters:
2652 \end_layout
2654 \begin_layout Itemize
2655 bitmap: The bitmap to manipulate
2656 \end_layout
2658 \begin_layout Itemize
2659 x: The x-coordinate of the pixel.
2660 \end_layout
2662 \begin_layout Itemize
2663 y: The y-coordinate of the pixel.
2664 \end_layout
2666 \begin_layout Itemize
2667 color: If bitmap is a bitmap, color index (0-65535).
2668  Otherwise color value.
2669 \end_layout
2671 \begin_layout Subsubsection
2672 gui.bitmap_size(bitmap/dbitmap bitmap)
2673 \end_layout
2675 \begin_layout Standard
2676 Get size of bitmap.
2677  Can be used anywhere.
2678  Parameters:
2679 \end_layout
2681 \begin_layout Itemize
2682 bitmap: The bitmap to query.
2683 \end_layout
2685 \begin_layout Standard
2686 The first return is the width, the second is the height.
2687 \end_layout
2689 \begin_layout Subsubsection
2690 gui.bitmap_blit(bitmap/dbitmap dest, number dx, number dy, bitmap/dbitmap
2691  src, number sx, number sy, number w, number h[, number ck])
2692 \end_layout
2694 \begin_layout Standard
2695 Blit a part of bitmap to another.
2696  Can be used anywhere.
2697  Parameters:
2698 \end_layout
2700 \begin_layout Itemize
2701 dest: Destination to blit to.
2702 \end_layout
2704 \begin_layout Itemize
2705 dx: left edge of target
2706 \end_layout
2708 \begin_layout Itemize
2709 dy: Top edge of target
2710 \end_layout
2712 \begin_layout Itemize
2713 src: The source to blit from.
2714  Must be of the same type as destination.
2715 \end_layout
2717 \begin_layout Itemize
2718 sx: left edge of source
2719 \end_layout
2721 \begin_layout Itemize
2722 sy: Top edge of source
2723 \end_layout
2725 \begin_layout Itemize
2726 w: Width of region
2727 \end_layout
2729 \begin_layout Itemize
2730 h: Height of region.
2731 \end_layout
2733 \begin_layout Itemize
2734 ck: Color key.
2735  Pixels of this color are not blitted.
2736 \end_layout
2738 \begin_deeper
2739 \begin_layout Itemize
2740 If bitmaps are bitmaps, this is color index of colorkey.
2741  Values outside range 0-65535 cause no key to be used as colorkey.
2742 \end_layout
2744 \begin_layout Itemize
2745 If bitmaps are dbitmaps, this color value of colorkey.
2746 \end_layout
2748 \begin_layout Itemize
2749 May be absent or nil for no colorkey blit.
2750 \end_layout
2752 \end_deeper
2753 \begin_layout Subsubsection
2754 gui.repaint()
2755 \end_layout
2757 \begin_layout Standard
2758 Request on_repaint() to happen as soon as possible.
2759  Can be used anywhere.
2760 \end_layout
2762 \begin_layout Subsubsection
2763 gui.subframe_update(boolean on)
2764 \end_layout
2766 \begin_layout Standard
2767 Request subframe updates (calling on_paint() on subframes) to happen (on=true)
2768  or not happen (on=false).
2769  Can be used anywhere.
2770 \end_layout
2772 \begin_layout Subsubsection
2773 gui.screenshot(string filename)
2774 \end_layout
2776 \begin_layout Standard
2777 Write PNG screenshot of the current frame (no drawings) to specified file.
2778  Can be used anywhere.
2779 \end_layout
2781 \begin_layout Subsubsection
2782 gui.color(number r, number g, number b[, number a])
2783 \end_layout
2785 \begin_layout Standard
2786 Returns color (in notation Lua scripts use) corresponding to color (r,g,b),
2787  each component in scale 0-255.
2788  If a is specified, that is alpha (0 is fully transparent, 256(sic) is fully
2789  opaque).
2790  The default alpha is 256.
2791 \end_layout
2793 \begin_layout Subsubsection
2794 gui.status(string name, string value)
2795 \end_layout
2797 \begin_layout Standard
2798 Set status field 
2799 \begin_inset Quotes eld
2800 \end_inset
2802 L[<name>]
2803 \begin_inset Quotes erd
2804 \end_inset
2806  to <value> in status area.
2807  Can be used anywhere.
2808 \end_layout
2810 \begin_layout Subsubsection
2811 gui.rainbow(number step, number steps[, number color])
2812 \end_layout
2814 \begin_layout Standard
2815 Perform hue rotation of color <color> (default bright red), by <step> steps.
2816  The number of steps per full rotation is given by absolute value of <steps>.
2817 \end_layout
2819 \begin_layout Standard
2820 If <steps> is negative, the rotation will be counterclockwise.
2821 \end_layout
2823 \begin_layout Subsubsection
2824 gui.screenshot(string filename)
2825 \end_layout
2827 \begin_layout Standard
2828 Saves a screenshot into specified file.
2829 \end_layout
2831 \begin_layout Subsubsection
2832 gui.loadfont(string filename)
2833 \end_layout
2835 \begin_layout Standard
2836 Loads font from specified file (CUSTOMFONT object).
2837 \end_layout
2839 \begin_layout Subsubsection
2840 CUSTOMFONT(number x, number y, string text[, number fgc[, number bgc[, number
2841  hlc]]])
2842 \end_layout
2844 \begin_layout Standard
2845 Draw string with custom font to screen.
2846  The parameters are the same as in gui.text, except hlc is the halo color
2847  (default is no halo).
2849 \end_layout
2851 \begin_layout Subsection
2852 table input
2853 \end_layout
2855 \begin_layout Standard
2856 Input handling.
2857  Only available in on_input callback.
2858 \end_layout
2860 \begin_layout Subsubsection
2861 input.get(number controller, number index)
2862 \end_layout
2864 \begin_layout Standard
2865 Read the specified index (0-11) from specified controller (0-7).
2866  Notes:
2867 \end_layout
2869 \begin_layout Itemize
2870 Uses physical controller numbering.
2871  Gamepad in port 2 is controller 4, not 1!
2872 \end_layout
2874 \begin_layout Subsubsection
2875 input.set(number controller, number index, number value)
2876 \end_layout
2878 \begin_layout Standard
2879 Write the specified index (0-11) from specified controller (0-7), storing
2880  value.
2881  Notes:
2882 \end_layout
2884 \begin_layout Itemize
2885 Uses physical controller numbering.
2886  Gamepad in port 2 is controller 4, not 1!
2887 \end_layout
2889 \begin_layout Subsubsection
2890 input.get2(number port, number controller, number index)
2891 \end_layout
2893 \begin_layout Standard
2894 Read the specified input tuple.
2895 \end_layout
2897 \begin_layout Itemize
2898 Port 0 is system port.
2899 \end_layout
2901 \begin_layout Subsubsection
2902 input.set2(number port, number controller, number index, number value)
2903 \end_layout
2905 \begin_layout Standard
2906 Write the specified input tuple.
2907 \end_layout
2909 \begin_layout Itemize
2910 Port 0 is system port.
2911 \end_layout
2913 \begin_layout Subsubsection
2914 input.lcid_to_pcid2(number lcid)
2915 \end_layout
2917 \begin_layout Standard
2918 Look up physical pcid pair (port, controller) corresponding to specified
2919  logical controller (1-based).
2920  Returns nothing if controller does not exist.
2921 \end_layout
2923 \begin_layout Subsubsection
2924 input.port_type(number port)
2925 \end_layout
2927 \begin_layout Standard
2928 Return type of specified port.
2929 \end_layout
2931 \begin_layout Subsubsection
2932 input.controller_info(number port, number controller)
2933 \end_layout
2935 \begin_layout Standard
2936 Get controller info for specified controller.
2937  If controller does not exist, returns nil.
2938  Otherwise returns a table with following fields:
2939 \end_layout
2941 \begin_layout Itemize
2942 type (string): Type of the controller.
2943 \end_layout
2945 \begin_layout Itemize
2946 class (string): Class of the controller.
2947 \end_layout
2949 \begin_layout Itemize
2950 classnum (number): Number of the controller within its class (1-based)
2951 \end_layout
2953 \begin_layout Itemize
2954 lcid (number): Logical controller number of the controller.
2955 \end_layout
2957 \begin_layout Itemize
2958 button_count (number): Number of buttons on controller
2959 \end_layout
2961 \begin_layout Itemize
2962 buttons (array): Array of following info about each button:
2963 \end_layout
2965 \begin_deeper
2966 \begin_layout Itemize
2967 type (string): Type of button.
2968  Currently one of 
2969 \begin_inset Quotes eld
2970 \end_inset
2972 null
2973 \begin_inset Quotes erd
2974 \end_inset
2977 \begin_inset Quotes eld
2978 \end_inset
2980 button
2981 \begin_inset Quotes erd
2982 \end_inset
2985 \begin_inset Quotes eld
2986 \end_inset
2988 axis
2989 \begin_inset Quotes erd
2990 \end_inset
2993 \begin_inset Quotes eld
2994 \end_inset
2996 raxis
2997 \begin_inset Quotes erd
2998 \end_inset
3001 \end_layout
3003 \begin_layout Itemize
3004 name (string): Name of button.
3005 \end_layout
3007 \begin_layout Itemize
3008 symbol (string): Symbol of button.
3009  Only present for type 
3010 \begin_inset Quotes eld
3011 \end_inset
3013 button
3014 \begin_inset Quotes erd
3015 \end_inset
3018 \end_layout
3020 \begin_layout Itemize
3021 hidden (boolean): True if hidden button.
3023 \end_layout
3025 \end_deeper
3026 \begin_layout Subsubsection
3027 input.veto_button()
3028 \end_layout
3030 \begin_layout Standard
3031 Signals that the button event should be vetoed.
3032  Only valid in on_button callback.
3033 \end_layout
3035 \begin_layout Subsubsection
3036 input.geta(number controller)
3037 \end_layout
3039 \begin_layout Standard
3040 Get input state for entiere controller.
3041  Returns 13 return values.
3042 \end_layout
3044 \begin_layout Itemize
3045 1st return value: Bitmask: bit i is set if i:th index is nonzero
3046 \end_layout
3048 \begin_layout Itemize
3049 2nd-13th return value: value of i:th index.
3050 \end_layout
3052 \begin_layout Subsubsection
3053 input.seta(number controller, number bitmask, number args...)
3054 \end_layout
3056 \begin_layout Standard
3057 Set state for entiere controller.
3058  args is up to 12 values for indices (overriding values in bitmask if specified).
3059 \end_layout
3061 \begin_layout Subsubsection
3062 input.controllertype(number controller)
3063 \end_layout
3065 \begin_layout Standard
3066 Get the type of controller as string.
3067  Valid values are:
3068 \end_layout
3070 \begin_layout Itemize
3071 gamepad
3072 \end_layout
3074 \begin_layout Itemize
3075 mouse
3076 \end_layout
3078 \begin_layout Itemize
3079 justifier
3080 \end_layout
3082 \begin_layout Itemize
3083 superscope
3084 \end_layout
3086 \begin_layout Subsubsection
3087 input.reset([number cycles])
3088 \end_layout
3090 \begin_layout Standard
3091 Execute reset.
3092  If cycles is greater than zero, do delayed reset.
3093  0 (or no value) causes immediate reset.
3094 \end_layout
3096 \begin_layout Itemize
3097 Only available with subframe flag false.
3098 \end_layout
3100 \begin_layout Subsubsection
3101 input.raw()
3102 \end_layout
3104 \begin_layout Standard
3105 Returns table of tables of all available keys and axes.
3106  The first table is indexed by key name (platform-dependent!), and the inner
3107  table has the following fields:
3108 \end_layout
3110 \begin_layout Itemize
3111 last_rawval: Last reported raw value for control.
3112 \end_layout
3114 \begin_layout Itemize
3115 ktype: Type of key (disabled, key, mouse, axis, axis-inverse, hat, pressure-m0,
3116  pressure-mp, pressure-0m, pressure-0p, pressure-pm, pressure-p0).
3117 \end_layout
3119 \begin_layout Itemize
3120 cal_left: Minimum calibration value.
3121  Only meaningful with axis and pressure types.
3122 \end_layout
3124 \begin_layout Itemize
3125 cal_center: Center calibration value.
3126  Only meaningful with axis and pressure types.
3127 \end_layout
3129 \begin_layout Itemize
3130 cal_right: Maximum calibration value.
3131  Only meaningful with axis and pressure types.
3132 \end_layout
3134 \begin_layout Itemize
3135 cal_tolerance: Dead zone tolerance.
3136  Only meaningful with axis and pressure types.
3137 \end_layout
3139 \begin_layout Subsubsection
3140 input.keyhook(string key, boolean state)
3141 \end_layout
3143 \begin_layout Standard
3144 Requests that keyhook events to be sent for key (state=true) or not sent
3145  (state=false).
3146 \end_layout
3148 \begin_layout Subsubsection
3149 input.joyget(number controller)
3150 \end_layout
3152 \begin_layout Standard
3153 Returns table for current controls for specified controller.
3154  The names of fields vary by controller type.
3155 \end_layout
3157 \begin_layout Itemize
3158 The buttons have the same name as those are referred to in other contexts
3159  in the emulator
3160 \end_layout
3162 \begin_layout Itemize
3163 The analog axes are 
3164 \begin_inset Quotes eld
3165 \end_inset
3167 xaxis
3168 \begin_inset Quotes erd
3169 \end_inset
3171  and 
3172 \begin_inset Quotes eld
3173 \end_inset
3175 yaxis
3176 \begin_inset Quotes erd
3177 \end_inset
3180 \end_layout
3182 \begin_layout Subsubsection
3183 input.joyset(number controller, table controls)
3184 \end_layout
3186 \begin_layout Standard
3187 Set the the state of specified controller to values specified in specified
3188  table.
3189 \end_layout
3191 \begin_layout Itemize
3192 nil does not change value
3193 \end_layout
3195 \begin_layout Itemize
3196 true/false (buttons) and integers (axes) force value.
3197 \end_layout
3199 \begin_layout Itemize
3200 string (button) inverts the input.
3201 \end_layout
3203 \begin_layout Subsubsection
3204 input.lcid_to_pcid(number controller)
3205 \end_layout
3207 \begin_layout Standard
3208 Return the physical index, physical port and controller number in port for
3209  specified (1-based) logical controller.
3210 \end_layout
3212 \begin_layout Subsection
3213 Table subtitle
3214 \end_layout
3216 \begin_layout Standard
3217 Subtitle handling
3218 \end_layout
3220 \begin_layout Subsubsection
3221 subtitle.byindex(number i)
3222 \end_layout
3224 \begin_layout Standard
3225 Read the frame and length of ith subtitle.
3226  Returns nothing if not present.
3227 \end_layout
3229 \begin_layout Subsubsection
3230 subtitle.set(number f, number l, string txt)
3231 \end_layout
3233 \begin_layout Standard
3234 Set the text of subtitle.
3235 \end_layout
3237 \begin_layout Subsubsection
3238 subtitle.get(number f, number l)
3239 \end_layout
3241 \begin_layout Standard
3242 Get the text of subtitle.
3243 \end_layout
3245 \begin_layout Subsubsection
3246 subtitle.delete(number f, number l)
3247 \end_layout
3249 \begin_layout Standard
3250 Delete specified subtitle.
3251 \end_layout
3253 \begin_layout Subsection
3254 Table hostmemory
3255 \end_layout
3257 \begin_layout Standard
3258 Host memory handling (extra memory saved to savestates).
3259  Host memory starts empty.
3260 \end_layout
3262 \begin_layout Subsubsection
3263 hostmemory.read(number address)
3264 \end_layout
3266 \begin_layout Standard
3267 Reads hostmemory slot address.
3268  Slot numbers out of range return false instead of numeric.
3269 \end_layout
3271 \begin_layout Subsubsection
3272 hostmemory.write(number address, number value)
3273 \end_layout
3275 \begin_layout Standard
3276 Writes hostmemory slot with 0-255.
3277  Slot numbers out of range cause extension of host memory slot space.
3278 \end_layout
3280 \begin_layout Subsubsection
3281 hostmemory.readbyte(number address)
3282 \end_layout
3284 \begin_layout Standard
3285 Read unsigned byte (1 element) from given address.
3286  Slots out of range return false.
3287 \end_layout
3289 \begin_layout Subsubsection
3290 hostmemory.writebyte(number address, number value)
3291 \end_layout
3293 \begin_layout Standard
3294 Write unsigned byte (1 element) to given slot.
3295  Slot numbers out of range cause extension.
3296 \end_layout
3298 \begin_layout Subsubsection
3299 hostmemory.readsbyte(number address)
3300 \end_layout
3302 \begin_layout Standard
3303 Read signed byte (1 element) from given address.
3304  Slots out of range return false.
3305 \end_layout
3307 \begin_layout Subsubsection
3308 hostmemory.writesbyte(number address, number value)
3309 \end_layout
3311 \begin_layout Standard
3312 Write signed byte (1 element) to given slot.
3313  Slot numbers out of range cause extension.
3314 \end_layout
3316 \begin_layout Subsubsection
3317 hostmemory.readword(number address)
3318 \end_layout
3320 \begin_layout Standard
3321 Read unsigned word (2 elements) from given address.
3322  Slots out of range return false.
3323 \end_layout
3325 \begin_layout Subsubsection
3326 hostmemory.writeword(number address, number value)
3327 \end_layout
3329 \begin_layout Standard
3330 Write unsigned word (2 elements) to given slot.
3331  Slot numbers out of range cause extension.
3332 \end_layout
3334 \begin_layout Subsubsection
3335 hostmemory.readsword(number address)
3336 \end_layout
3338 \begin_layout Standard
3339 Read signed word (2 elements) from given address.
3340  Slots out of range return false.
3341 \end_layout
3343 \begin_layout Subsubsection
3344 hostmemory.writesword(number address, number value)
3345 \end_layout
3347 \begin_layout Standard
3348 Write signed word (2 elements) to given slot.
3349  Slot numbers out of range cause extension.
3350 \end_layout
3352 \begin_layout Subsubsection
3353 hostmemory.readdword(number address)
3354 \end_layout
3356 \begin_layout Standard
3357 Read unsigned doubleword (4 elements) from given address.
3358  Slots out of range return false.
3359 \end_layout
3361 \begin_layout Subsubsection
3362 hostmemory.writedword(number address, number value)
3363 \end_layout
3365 \begin_layout Standard
3366 Write unsigned doubleword (4 elements) to given slot.
3367  Slot numbers out of range cause extension.
3368 \end_layout
3370 \begin_layout Subsubsection
3371 hostmemory.readsdword(number address)
3372 \end_layout
3374 \begin_layout Standard
3375 Read signed doubleword (4 elements) from given address.
3376  Slots out of range return false.
3377 \end_layout
3379 \begin_layout Subsubsection
3380 hostmemory.writesdword(number address, number value)
3381 \end_layout
3383 \begin_layout Standard
3384 Write signed doubleword (4 elements) to given slot.
3385  Slot numbers out of range cause extension.
3386 \end_layout
3388 \begin_layout Subsubsection
3389 hostmemory.readqword(number address)
3390 \end_layout
3392 \begin_layout Standard
3393 Read unsigned quadword (8 elements) from given address.
3394  Slots out of range return false.
3395 \end_layout
3397 \begin_layout Subsubsection
3398 hostmemory.writeqword(number address, number value)
3399 \end_layout
3401 \begin_layout Standard
3402 Write unsigned quadword (4 elements) to given slot.
3403  Slot numbers out of range cause extension.
3404 \end_layout
3406 \begin_layout Subsubsection
3407 hostmemory.readsqword(number address)
3408 \end_layout
3410 \begin_layout Standard
3411 Read signed quadword (8 elements) from given address.
3412  Slots out of range return false.
3413 \end_layout
3415 \begin_layout Subsubsection
3416 hostmemory.writesqword(number address, number value)
3417 \end_layout
3419 \begin_layout Standard
3420 Write signed quadword (8 elements) to given slot.
3421  Slot numbers out of range cause extension.
3422 \end_layout
3424 \begin_layout Subsection
3425 Table movie
3426 \end_layout
3428 \begin_layout Standard
3429 Movie handling
3430 \end_layout
3432 \begin_layout Subsubsection
3433 movie.currentframe()
3434 \end_layout
3436 \begin_layout Standard
3437 Return number of current frame.
3438 \end_layout
3440 \begin_layout Subsubsection
3441 movie.framecount()
3442 \end_layout
3444 \begin_layout Standard
3445 Return number of frames in movie.
3446 \end_layout
3448 \begin_layout Subsubsection
3449 movie.readonly()
3450 \end_layout
3452 \begin_layout Standard
3453 Return true if in readonly mode, false if in readwrite.
3454 \end_layout
3456 \begin_layout Subsubsection
3457 movie.rerecords()
3458 \end_layout
3460 \begin_layout Standard
3461 Returns the current value of rerecord count.
3462 \end_layout
3464 \begin_layout Subsubsection
3465 movie.set_readwrite()
3466 \end_layout
3468 \begin_layout Standard
3469 Set readwrite mode (does not cause on_readwrite callback).
3470 \end_layout
3472 \begin_layout Subsubsection
3473 movie.frame_subframes(number frame)
3474 \end_layout
3476 \begin_layout Standard
3477 Count number of subframes in specified frame (frame numbers are 1-based)
3478  and return that.
3479 \end_layout
3481 \begin_layout Subsubsection
3482 movie.read_subframes(number frame, number subframe)
3483 \end_layout
3485 \begin_layout Standard
3486 Read specifed subframe in specified frame and return data as array (100
3487  elements, numbered 0-99 currently).
3488 \end_layout
3490 \begin_layout Subsubsection
3491 movie.read_rtc()
3492 \end_layout
3494 \begin_layout Standard
3495 Returns the current value of the RTC as a pair (second, subsecond).
3496 \end_layout
3498 \begin_layout Subsubsection
3499 movie.unsafe_rewind([UNSAFEREWIND state])
3500 \end_layout
3502 \begin_layout Standard
3503 Start setting point for unsafe rewind or jump to point of unsafe rewind.
3504 \end_layout
3506 \begin_layout Itemize
3507 If called without argument, causes emulator to start process of setting
3508  unsafe rewind point.
3509  When this has finished, callback on_set_rewind occurs, passing the rewind
3510  state to lua script.
3511 \end_layout
3513 \begin_layout Itemize
3514 If called with argument, causes emulator rewind to passed rewind point as
3515  soon as possible.
3516  Readwrite mode is implicitly activated.
3517 \end_layout
3519 \begin_layout Standard
3520 The following warnings apply to unsafe rewinding:
3521 \end_layout
3523 \begin_layout Itemize
3524 There are no safety checks against misuse (that's what 
3525 \begin_inset Quotes eld
3526 \end_inset
3528 unsafe
3529 \begin_inset Quotes erd
3530 \end_inset
3532  comes from)!
3533 \end_layout
3535 \begin_layout Itemize
3536 Only call rewind from timeline rewind point was set from.
3537 \end_layout
3539 \begin_layout Itemize
3540 Only call rewind from after the rewind point was set.
3541 \end_layout
3543 \begin_layout Subsection
3544 Table settings
3545 \end_layout
3547 \begin_layout Standard
3548 Routines for settings manipulation
3549 \end_layout
3551 \begin_layout Subsubsection
3552 settings.get(string name)
3553 \end_layout
3555 \begin_layout Standard
3556 Get value of setting.
3557  If setting is blank, returns false.
3558  If setting value can't be obtained, returns (nil, error message).
3559 \end_layout
3561 \begin_layout Subsubsection
3562 settings.set(string name, string value)
3563 \end_layout
3565 \begin_layout Standard
3566 Set value of setting.
3567  If setting can't be set, returns (nil, error message).
3568 \end_layout
3570 \begin_layout Subsubsection
3571 settings.is_set(string name)
3572 \end_layout
3574 \begin_layout Standard
3575 Returns if setting is set.
3576  If setting does not exist, returns (nil, error message).
3577 \end_layout
3579 \begin_layout Subsubsection
3580 settings.blank(string name)
3581 \end_layout
3583 \begin_layout Standard
3584 Blanks a setting and returns true.
3585  If setting can't be blanked, returns (nil, error message).
3586 \end_layout
3588 \begin_layout Subsection
3589 Table memory
3590 \end_layout
3592 \begin_layout Standard
3593 Contains various functions for managing memory
3594 \end_layout
3596 \begin_layout Subsubsection
3597 memory.vma_count()
3598 \end_layout
3600 \begin_layout Standard
3601 Returns the number of VMAs
3602 \end_layout
3604 \begin_layout Subsubsection
3605 memory.read_vma(number index)
3606 \end_layout
3608 \begin_layout Standard
3609 Reads the specified VMA (indices start from zero).
3610  Trying to read invalid VMA gives nil.
3611  The read VMA is table with the following fields:
3612 \end_layout
3614 \begin_layout Itemize
3615 region_name (string): The readable name of the VMA
3616 \end_layout
3618 \begin_layout Itemize
3619 baseaddr (number): Base address of the VMA
3620 \end_layout
3622 \begin_layout Itemize
3623 lastaddr (number): Last address in the VMA.
3624 \end_layout
3626 \begin_layout Itemize
3627 size (number): The size of VMA in bytes.
3628 \end_layout
3630 \begin_layout Itemize
3631 readonly (boolean): True of the VMA corresponds to ROM.
3632 \end_layout
3634 \begin_layout Itemize
3635 iospace (boolean): True if the VMA is I/O space.
3636 \end_layout
3638 \begin_layout Itemize
3639 native_endian (boolean): True if the VMA has native endian as opposed to
3640  little endian.
3641 \end_layout
3643 \begin_layout Subsubsection
3644 memory.find_vma(number address)
3645 \end_layout
3647 \begin_layout Standard
3648 Finds the VMA containing specified address.
3649  Returns table in the same format as read_vma or nil if not found.
3650 \end_layout
3652 \begin_layout Subsubsection
3653 memory.readbyte(number address)
3654 \end_layout
3656 \begin_layout Standard
3657 Reads the specified address as unsigned byte and returns the result.
3658 \end_layout
3660 \begin_layout Subsubsection
3661 memory.readsbyte(number address)
3662 \end_layout
3664 \begin_layout Standard
3665 Reads the specified address as signed byte and returns the result.
3666 \end_layout
3668 \begin_layout Subsubsection
3669 memory.writebyte(number address, number value)
3670 \end_layout
3672 \begin_layout Standard
3673 Writes the specified value (negative values undergo 2's complement) to specified
3674  address (as a byte).
3675 \end_layout
3677 \begin_layout Subsubsection
3678 memory.readword(number address)
3679 \end_layout
3681 \begin_layout Standard
3682 Reads the specified address as unsigned word and returns the result.
3683 \end_layout
3685 \begin_layout Subsubsection
3686 memory.readsword(number address)
3687 \end_layout
3689 \begin_layout Standard
3690 Reads the specified address as signed word and returns the result.
3691 \end_layout
3693 \begin_layout Subsubsection
3694 memory.writeword(number address, number value)
3695 \end_layout
3697 \begin_layout Standard
3698 Writes the specified value (negative values undergo 2's complement) to specified
3699  address (as a word).
3700 \end_layout
3702 \begin_layout Subsubsection
3703 memory.readdword(number address)
3704 \end_layout
3706 \begin_layout Standard
3707 Reads the specified address as unsigned doubleword and returns the result.
3708 \end_layout
3710 \begin_layout Subsubsection
3711 memory.readsdword(number address)
3712 \end_layout
3714 \begin_layout Standard
3715 Reads the specified address as signed doubleword and returns the result.
3716 \end_layout
3718 \begin_layout Subsubsection
3719 memory.writedword(number address, number value)
3720 \end_layout
3722 \begin_layout Standard
3723 Writes the specified value (negative values undergo 2's complement) to specified
3724  address (as a doubleword).
3725 \end_layout
3727 \begin_layout Subsubsection
3728 memory.readqword(number address)
3729 \end_layout
3731 \begin_layout Standard
3732 Reads the specified address as unsigned quadword and returns the result.
3733 \end_layout
3735 \begin_layout Subsubsection
3736 memory.readsqword(number address)
3737 \end_layout
3739 \begin_layout Standard
3740 Reads the specified address as signed quadword and returns the result.
3741 \end_layout
3743 \begin_layout Subsubsection
3744 memory.writeqword(number address, number value)
3745 \end_layout
3747 \begin_layout Standard
3748 Writes the specified value (negative values undergo 2's complement) to specified
3749  address (as a quadword).
3750 \end_layout
3752 \begin_layout Subsubsection
3753 memory.hash_region(number base, number size)
3754 \end_layout
3756 \begin_layout Standard
3757 Hash specified number of bytes starting from specified address and return
3758  the SHA-256.
3759 \end_layout
3761 \begin_layout Subsubsection
3762 memory.hash_state()
3763 \end_layout
3765 \begin_layout Standard
3766 Hash the current system state.
3767  Mainly useful for debugging savestates.
3768 \end_layout
3770 \begin_layout Subsubsection
3771 memory.readregion(number base, number size)
3772 \end_layout
3774 \begin_layout Standard
3775 Read a region of memory.
3776 \end_layout
3778 \begin_layout Itemize
3779 Warning: If the region crosses VMA boundary, the results are undefined.
3780 \end_layout
3782 \begin_layout Subsubsection
3783 memory.map<type>([number base, number size])
3784 \end_layout
3786 \begin_layout Standard
3787 Returns a table mapping specified memory aperture for read/write.
3788  If parameters are omitted, entiere map space is the aperture.
3789 \end_layout
3791 \begin_layout Itemize
3792 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3793 \end_layout
3795 \begin_layout Subsubsection
3796 memory.writeregion(number base, number size, table data)
3797 \end_layout
3799 \begin_layout Standard
3800 Write a region of memory.
3801 \end_layout
3803 \begin_layout Itemize
3804 Warning: If the region crosses VMA boundary, the results are undefined.
3805 \end_layout
3807 \begin_layout Subsubsection
3808 memory.map_structure()
3809 \end_layout
3811 \begin_layout Standard
3812 Returns a new mapping structure (MMAP_STRUCT)
3813 \end_layout
3815 \begin_layout Subsubsection
3816 MMAP_STRUCT(string key, number address, string type)
3817 \end_layout
3819 \begin_layout Standard
3820 Bind key in mmap structure to specified address with specified type.
3821 \end_layout
3823 \begin_layout Itemize
3824 Type may be one of: byte, sbyte, word, sword, dword, sdword, qword or sqword.
3825 \end_layout
3827 \begin_layout Subsubsection
3828 memory.read_expr(string expr)
3829 \end_layout
3831 \begin_layout Standard
3832 Evaluate specified watch expression and return result
3833 \end_layout
3835 \begin_layout Subsection
3836 Table subtitle
3837 \end_layout
3839 \begin_layout Standard
3840 Contains functions for manipulating subtitles.
3841 \end_layout
3843 \begin_layout Subsubsection
3844 subtitle.byindex(number index)
3845 \end_layout
3847 \begin_layout Standard
3848 Get (basetime, length) pair of specified subtitle index or nothing if index
3849  isn't valid.
3850 \end_layout
3852 \begin_layout Subsubsection
3853 subtitle.get(number basetime, number length)
3854 \end_layout
3856 \begin_layout Standard
3857 Read the specified subtitle.
3858  Returns 
3859 \begin_inset Quotes eld
3860 \end_inset
3863 \begin_inset Quotes erd
3864 \end_inset
3866  if the subtitle does not exist.
3867 \end_layout
3869 \begin_layout Subsubsection
3870 subtitle.set(number basetime, number length, string content)
3871 \end_layout
3873 \begin_layout Standard
3874 Set the specified subtitle.
3875 \end_layout
3877 \begin_layout Subsubsection
3878 subtitle.deltete(number basetime, number length)
3879 \end_layout
3881 \begin_layout Standard
3882 Delete the specified subtitle.
3883 \end_layout
3885 \begin_layout Subsection
3886 Table _SYSTEM
3887 \end_layout
3889 \begin_layout Standard
3890 Contains copy of global variables from time of Lua initialization.
3891  Non-writeable.
3892 \end_layout
3894 \begin_layout Subsection
3895 Callbacks
3896 \end_layout
3898 \begin_layout Standard
3899 Various callbacks to Lua that can occur.
3900 \end_layout
3902 \begin_layout Subsubsection
3903 Callback: on_paint(bool not_synth)
3904 \end_layout
3906 \begin_layout Standard
3907 Called when screen is being painted.
3908  Any gui.* calls requiring graphic context draw on the screen.
3909 \end_layout
3911 \begin_layout Standard
3912 not_synth is true if this hook is being called in response to received frame,
3913  false otherwise.
3914 \end_layout
3916 \begin_layout Subsubsection
3917 Callback: on_video()
3918 \end_layout
3920 \begin_layout Standard
3921 Called when video dump frame is being painted.
3922  Any gui.* calls requiring graphic context draw on the video.
3923 \end_layout
3925 \begin_layout Subsubsection
3926 Callback: on_frame_emulated()
3927 \end_layout
3929 \begin_layout Standard
3930 Called when emulating frame has completed and on_paint()/on_video() calls
3931  are about to be issued.
3932 \end_layout
3934 \begin_layout Subsubsection
3935 Callback: on_frame()
3936 \end_layout
3938 \begin_layout Standard
3939 Called on each starting whole frame.
3940 \end_layout
3942 \begin_layout Subsubsection
3943 Callback: on_startup()
3944 \end_layout
3946 \begin_layout Standard
3947 Called when the emulator is starting (lsnes.rc and --run files has been run).
3948 \end_layout
3950 \begin_layout Subsubsection
3951 Callback: on_rewind()
3952 \end_layout
3954 \begin_layout Standard
3955 Called when rewind movie to beginning has completed.
3956 \end_layout
3958 \begin_layout Subsubsection
3959 Callback: on_pre_load(string name)
3960 \end_layout
3962 \begin_layout Standard
3963 Called just before savestate/movie load occurs (note: loads are always delayed,
3964  so this occurs even when load was initiated by lua).
3965 \end_layout
3967 \begin_layout Subsubsection
3968 Callback: on_err_load(string name)
3969 \end_layout
3971 \begin_layout Standard
3972 Called if loadstate goes wrong.
3973 \end_layout
3975 \begin_layout Subsubsection
3976 Callback: on_post_load(string name, boolean was_savestate)
3977 \end_layout
3979 \begin_layout Standard
3980 Called on successful loadstate.
3981  was_savestate gives if this was a savestate or a movie.
3982 \end_layout
3984 \begin_layout Subsubsection
3985 Callback: on_pre_save(string name, boolean is_savestate)
3986 \end_layout
3988 \begin_layout Standard
3989 Called just before savestate save occurs (note: movie saves are synchronous
3990  and won't trigger these callbacks if called from Lua).
3991 \end_layout
3993 \begin_layout Subsubsection
3994 Callback: on_err_save(string name)
3995 \end_layout
3997 \begin_layout Standard
3998 Called if savestate goes wrong.
3999 \end_layout
4001 \begin_layout Subsubsection
4002 Callback: on_post_save(string name, boolean is_savestate)
4003 \end_layout
4005 \begin_layout Standard
4006 Called on successful savaestate.
4007  is_savestate gives if this was a savestate or a movie.
4008 \end_layout
4010 \begin_layout Subsubsection
4011 Callback: on_quit()
4012 \end_layout
4014 \begin_layout Standard
4015 Called when emulator is shutting down.
4016 \end_layout
4018 \begin_layout Subsubsection
4019 Callback: on_input(boolean subframe)
4020 \end_layout
4022 \begin_layout Standard
4023 Called when emulator is just sending input to bsnes core.
4024  Warning: This is called even in readonly mode, but the results are ignored.
4025 \end_layout
4027 \begin_layout Subsubsection
4028 Callback: on_reset()
4029 \end_layout
4031 \begin_layout Standard
4032 Called when SNES is reset.
4033 \end_layout
4035 \begin_layout Subsubsection
4036 Callback: on_readwrite()
4037 \end_layout
4039 \begin_layout Standard
4040 Called when moving into readwrite mode as result of 
4041 \begin_inset Quotes eld
4042 \end_inset
4044 set-rwmode
4045 \begin_inset Quotes erd
4046 \end_inset
4048  command (note: moving to rwmode by Lua won't trigger this, as per recursive
4049  entry protection).
4050 \end_layout
4052 \begin_layout Subsubsection
4053 Callback: on_snoop(number port, number controller, number index, number
4054  value)
4055 \end_layout
4057 \begin_layout Standard
4058 Called each time bsnes asks for input.
4059  The value is the final value to be sent to bsnes core (readonly mode, autohold
4060  and autofire have been taken into account).
4061  Might be useful when translating movies to format suitable for console
4062  verification.
4063  Note: There is no way to modify the value to be sent.
4064 \end_layout
4066 \begin_layout Itemize
4067 Not called if callback on_snoop2 is defined.
4068 \end_layout
4070 \begin_layout Subsubsection
4071 Callback: on_snoop2(number port, number controller, number index, number
4072  value)
4073 \end_layout
4075 \begin_layout Standard
4076 Like on_snoop, but reserves port 0 for system, having first user port be
4077  port 1.
4078 \end_layout
4080 \begin_layout Subsubsection
4081 Callback: on_keyhook(string keyname, table state)
4082 \end_layout
4084 \begin_layout Standard
4085 Sent when key that has keyhook events requested changes state.
4086  Keyname is name of the key (group) and state is the state (same kind as
4087  table values in input.raw).
4088 \end_layout
4090 \begin_layout Subsubsection
4091 Callback: on_idle()
4092 \end_layout
4094 \begin_layout Standard
4095 Called when requested by set_idle_timeout(), the timeout has expired and
4096  emulator is waiting.
4097 \end_layout
4099 \begin_layout Subsubsection
4100 Callback: on_timer()
4101 \end_layout
4103 \begin_layout Standard
4104 Called when requested by set_idle_timeout() and the timeout has expired
4105  (regardless if emulator is waiting).
4106 \end_layout
4108 \begin_layout Subsubsection
4109 Callback: on_set_rewind(UNSAFEREWIND r)
4110 \end_layout
4112 \begin_layout Standard
4113 Called when unsafe rewind object has been constructed.
4114 \end_layout
4116 \begin_layout Subsubsection
4117 Callback: on_pre_rewind() 
4118 \end_layout
4120 \begin_layout Standard
4121 Called just before unsafe rewind is about to occur.
4122 \end_layout
4124 \begin_layout Subsubsection
4125 Callback: on_post_rewind() 
4126 \end_layout
4128 \begin_layout Standard
4129 Called just after unsafe rewind has occured.
4130 \end_layout
4132 \begin_layout Subsubsection
4133 Callback: on_button(number port, number controller, number index, string
4134  type)
4135 \end_layout
4137 \begin_layout Standard
4138 Called on controller button press, with following parameters:
4139 \end_layout
4141 \begin_layout Itemize
4142 port: Port number (0 is system)
4143 \end_layout
4145 \begin_layout Itemize
4146 controller: Controller within port
4147 \end_layout
4149 \begin_layout Itemize
4150 index: Index of button.
4151 \end_layout
4153 \begin_layout Itemize
4154 type: Type of event, one of:
4155 \end_layout
4157 \begin_deeper
4158 \begin_layout Itemize
4159 \begin_inset Quotes eld
4160 \end_inset
4162 pressed
4163 \begin_inset Quotes erd
4164 \end_inset
4166 : Button was pressed.
4167 \end_layout
4169 \begin_layout Itemize
4170 \begin_inset Quotes eld
4171 \end_inset
4173 released
4174 \begin_inset Quotes erd
4175 \end_inset
4177 : Button was released.
4178 \end_layout
4180 \begin_layout Itemize
4181 \begin_inset Quotes eld
4182 \end_inset
4184 hold
4185 \begin_inset Quotes erd
4186 \end_inset
4188 : Held.
4189 \end_layout
4191 \begin_layout Itemize
4192 \begin_inset Quotes eld
4193 \end_inset
4195 unhold
4196 \begin_inset Quotes erd
4197 \end_inset
4199 : Released from hold.
4200 \end_layout
4202 \begin_layout Itemize
4203 \begin_inset Quotes eld
4204 \end_inset
4206 type
4207 \begin_inset Quotes erd
4208 \end_inset
4210 : Typing input on button.
4211 \end_layout
4213 \begin_layout Itemize
4214 \begin_inset Quotes eld
4215 \end_inset
4217 untype
4218 \begin_inset Quotes erd
4219 \end_inset
4221 : Typing input undone.
4222 \end_layout
4224 \begin_layout Itemize
4225 \begin_inset Quotes eld
4226 \end_inset
4228 analog
4229 \begin_inset Quotes erd
4230 \end_inset
4232 : Analog action on axis.
4233 \end_layout
4235 \end_deeper
4236 \begin_layout Section
4237 Movie editor
4238 \end_layout
4240 \begin_layout Itemize
4241 The editor edits in-memory movie.
4242 \end_layout
4244 \begin_layout Itemize
4245 Because past can't be edited and readwrite mode doesn't allow future, editing
4246  only works in 
4247 \emph on
4248 read only
4249 \emph default
4250  mode.
4251 \end_layout
4253 \begin_layout Itemize
4254 Keyboard triggers the normal hotkeys and bindings.
4255 \end_layout
4257 \begin_layout Subsection
4258 Left button actions
4259 \end_layout
4261 \begin_layout Itemize
4262 Clicking on cell in future (indicated by lack of redish background) toggles
4263  it (if it is a button) or prompts for a value (if it is an axis)
4264 \end_layout
4266 \begin_layout Itemize
4267 Dragging vertically toggles sequence of buttons or changes a sequence of
4268  axis values.
4269 \end_layout
4271 \begin_layout Subsection
4272 Right button actions
4273 \end_layout
4275 \begin_layout Standard
4276 The right mouse button pops up a context-sensitive menu:
4277 \end_layout
4279 \begin_layout Itemize
4280 Toggle <something>: Toggle this button
4281 \end_layout
4283 \begin_layout Itemize
4284 Change <something>: Change this axis value
4285 \end_layout
4287 \begin_layout Itemize
4288 Insert frame after: Insert a frame after this frame
4289 \end_layout
4291 \begin_layout Itemize
4292 Append frame: Append a frame to movie
4293 \end_layout
4295 \begin_layout Itemize
4296 Append frames: Append specified number of frames to movie
4297 \end_layout
4299 \begin_layout Itemize
4300 Delete frame: Delete this frame
4301 \end_layout
4303 \begin_layout Itemize
4304 Delete subframe: Delete this subframe
4305 \end_layout
4307 \begin_layout Itemize
4308 Truncate movie: Delete this subframe and everything after it.
4309 \end_layout
4311 \begin_layout Itemize
4312 Scroll to frame: Prompt for a frame and scroll the display to that frame.
4313 \end_layout
4315 \begin_layout Itemize
4316 Scroll to current frame: Scroll the display to current position
4317 \end_layout
4319 \begin_layout Itemize
4320 Run to frame: Prompts for frame and runs the emulation to that frame.
4321 \end_layout
4323 \begin_layout Itemize
4324 Change number of lines visible: Change the height of the movie display (1
4325  to 255).
4326 \end_layout
4328 \begin_layout Itemize
4329 Lock scroll to playback: While playing back or rewinding movies, the display
4330  will follow if enabled.
4331 \end_layout
4333 \begin_layout Section
4334 Memory watch expression syntax
4335 \end_layout
4337 \begin_layout Standard
4338 Memory watch expressions are in RPN (Reverse Polish Notation).
4339  At the end of expression, the top entry on stack is taken as the final
4340  result.
4341 \end_layout
4343 \begin_layout Standard
4344 Notations:
4345 \end_layout
4347 \begin_layout Itemize
4348 Evaluation order is strictly left to right.
4349 \end_layout
4351 \begin_layout Itemize
4352 a is the entry on top of stack
4353 \end_layout
4355 \begin_layout Itemize
4356 b is the entry immediately below top of stack
4357 \end_layout
4359 \begin_layout Itemize
4360 ; separates values to be pushed (no intermediate pop).
4361 \end_layout
4363 \begin_layout Itemize
4364 After end of element, all used stack slots are popped and all results are
4365  pushed.
4366 \end_layout
4368 \begin_layout Itemize
4369 When pushing multiple values, the pushes occur in order shown.
4370 \end_layout
4372 \begin_layout Standard
4373 The following operators are available:
4374 \end_layout
4376 \begin_layout Itemize
4377 + : a + b
4378 \end_layout
4380 \begin_layout Itemize
4381 - : a - b
4382 \end_layout
4384 \begin_layout Itemize
4385 * : a * b
4386 \end_layout
4388 \begin_layout Itemize
4389 / : a / b
4390 \end_layout
4392 \begin_layout Itemize
4393 % : a % b
4394 \end_layout
4396 \begin_layout Itemize
4397 a : atan(a)
4398 \end_layout
4400 \begin_layout Itemize
4401 b : read_signed_byte(a)
4402 \end_layout
4404 \begin_layout Itemize
4405 c : cos(a)
4406 \end_layout
4408 \begin_layout Itemize
4409 d : read_signed_dword(a)
4410 \end_layout
4412 \begin_layout Itemize
4413 i : quotent(a / b)
4414 \end_layout
4416 \begin_layout Itemize
4417 p :
4418 \begin_inset Formula $\pi$
4419 \end_inset
4422 \end_layout
4424 \begin_layout Itemize
4425 q : read_signed_qword(a)
4426 \end_layout
4428 \begin_layout Itemize
4429 r : sqrt(a)
4430 \end_layout
4432 \begin_layout Itemize
4433 s : sin(a)
4434 \end_layout
4436 \begin_layout Itemize
4437 t : tan(a)
4438 \end_layout
4440 \begin_layout Itemize
4441 u : a; a
4442 \end_layout
4444 \begin_layout Itemize
4445 w : read_signed_word(a)
4446 \end_layout
4448 \begin_layout Itemize
4449 A : atan2(a, b)
4450 \end_layout
4452 \begin_layout Itemize
4453 B : read_unsigned_byte(a)
4454 \end_layout
4456 \begin_layout Itemize
4457 C<number>z : Push number <number> to stack.
4458 \end_layout
4460 \begin_layout Itemize
4461 D : read_unsigned_dword(a)
4462 \end_layout
4464 \begin_layout Itemize
4465 C0x<number>z : Push number <number> (hexadecimal) to stack.
4466 \end_layout
4468 \begin_layout Itemize
4469 H<digit> : Set hexadecimal mode with specified number of digits (use A-G
4470  for 10-16 digits).
4471 \end_layout
4473 \begin_layout Itemize
4474 Q : read_unsigned_qword(a)
4475 \end_layout
4477 \begin_layout Itemize
4478 R<digit> : round a to <digit> digits.
4479 \end_layout
4481 \begin_layout Itemize
4482 W : read_unsigned_word(a)
4483 \end_layout
4485 \begin_layout Subsection
4486 Example:
4487 \end_layout
4489 \begin_layout Standard
4490 C0x007e0878zWC0x007e002czW-
4491 \end_layout
4493 \begin_layout Enumerate
4494 Push value 0x7e0878 on top of stack (C0x007e0878z).
4495 \end_layout
4497 \begin_layout Enumerate
4498 Pop the value on top of stack (0x7e0878), read word value at that address
4499  and push the result,call it x1 (W).
4500 \end_layout
4502 \begin_layout Enumerate
4503 Push value 0x7e002c on top of stack (C0x007e002cz).
4504 \end_layout
4506 \begin_layout Enumerate
4507 Pop the value on top of stack (0x7e002c), read word value at that address
4508  and push the result,call it x2 (W).
4509 \end_layout
4511 \begin_layout Enumerate
4512 Pop the two top numbers on stack, x1 and x2, substract x1 from x2 and push
4513  x2 - x1 (-).
4514 \end_layout
4516 \begin_layout Enumerate
4517 Since the expression ends, the final memory watch result is the top one
4518  on stack, which is x2 - x1.
4519 \end_layout
4521 \begin_layout Section
4522 Modifier and key names:
4523 \end_layout
4525 \begin_layout Subsection
4526 SDL Platform
4527 \end_layout
4529 \begin_layout Subsubsection
4530 Modifier names
4531 \end_layout
4533 \begin_layout Standard
4534 Following modifier names are known:
4535 \end_layout
4537 \begin_layout Itemize
4538 ctrl, lctrl, rctrl: Control keys
4539 \end_layout
4541 \begin_layout Itemize
4542 alt, lalt, ralt: ALT keys.
4543 \end_layout
4545 \begin_layout Itemize
4546 shift, lshift, rshift: Shift keys.
4547 \end_layout
4549 \begin_layout Itemize
4550 meta, lmeta, rmeta: Meta keys.
4551 \end_layout
4553 \begin_layout Itemize
4554 num, caps: Numlock/Capslock (these are sticky!)
4555 \end_layout
4557 \begin_layout Itemize
4558 mode: Mode select.
4559 \end_layout
4561 \begin_layout Subsubsection
4562 Key names
4563 \end_layout
4565 \begin_layout Standard
4566 Following key names are known:
4567 \end_layout
4569 \begin_layout Itemize
4570 backspace, tab, clear, return, pause, escape, space, exclaim, quotedbl,
4571  hash, dollar, ampersand, quote, leftparen, rightparen, asterisk, plus,
4572  comma, minus, period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon,
4573  less, equals, greater, question, at, leftbracket, backslash, rightbracket,
4574  caret, underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n,
4575  o, p, q, r, s, t, u, v, w, x, y, z, delete, world_0, world_1, world_2,
4576  world_3, world_4, world_5, world_6, world_7, world_8, world_9, world_10,
4577  world_11, world_12, world_13, world_14, world_15, world_16, world_17, world_18,
4578  world_19, world_20, world_21, world_22, world_23, world_24, world_25, world_26,
4579  world_27, world_28, world_29, world_30, world_31, world_32, world_33, world_34,
4580  world_35, world_36, world_37, world_38, world_39, world_40, world_41, world_42,
4581  world_43, world_44, world_45, world_46, world_47, world_48, world_49, world_50,
4582  world_51, world_52, world_53, world_54, world_55, world_56, world_57, world_58,
4583  world_59, world_60, world_61, world_62, world_63, world_64, world_65, world_66,
4584  world_67, world_68, world_69, world_70, world_71, world_72, world_73, world_74,
4585  world_75, world_76, world_77, world_78, world_79, world_80, world_81, world_82,
4586  world_83, world_84, world_85, world_86, world_87, world_88, world_89, world_90,
4587  world_91, world_92, world_93, world_94, world_95, kp0, kp1, kp2, kp3, kp4,
4588  kp5, kp6, kp7, kp8, kp9, kp_period, kp_divide, kp_multiply, kp_minus, kp_plus,
4589  kp_enter, kp_equals, up, down, right, left, insert, home, end, pageup,
4590  pagedown, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
4591  f15, numlock, capslock, scrollock, rshift, lshift, rctrl, lctrl, ralt,
4592  lalt, rmeta, lmeta, lsuper, rsuper, mode, compose, help, print, sysreq,
4593  break, menu, power, euro, undo
4594 \end_layout
4596 \begin_layout Itemize
4597 Names of form 'key<n>' where <n> is 0-255 are interpretted as key having
4598  hardware-dependent scan code of <n> (useful to bind those keys that don't
4599  have symbolic names).
4600 \end_layout
4602 \begin_layout Subsubsection
4603 Joystick pseudo-keys:
4604 \end_layout
4606 \begin_layout Itemize
4607 joystick<num>button<button>: Joystick <num> (0-based) button <button> (0-based).
4608 \end_layout
4610 \begin_layout Itemize
4611 joystick<num>hat<hat>n: Joystick <num> (0-based) hat <hat> (0-based) up.
4612 \end_layout
4614 \begin_layout Itemize
4615 joystick<num>hat<hat>w: Joystick <num> (0-based) hat <hat> (0-based) left.
4616 \end_layout
4618 \begin_layout Itemize
4619 joystick<num>hat<hat>s: Joystick <num> (0-based) hat <hat> (0-based) down.
4620 \end_layout
4622 \begin_layout Itemize
4623 joystick<num>hat<hat>e: Joystick <num> (0-based) hat <hat> (0-based) right.
4624 \end_layout
4626 \begin_layout Itemize
4627 joystick<num>axis<axis>-: Joystick <num> (0-based) axis <axis> negative
4628  position (axis modes axis and axis_inverse).
4629 \end_layout
4631 \begin_layout Itemize
4632 joystick<num>axis<axis>+: Joystick <num> (0-based) axis <axis> positive
4633  position (axis modes axis and axis_inverse).
4634 \end_layout
4636 \begin_layout Itemize
4637 joystick<num>axis<axis>: Joystick <num> (0-based) axis <axis> pressure (axis
4638  modes pressure_*).
4639 \end_layout
4641 \begin_layout Subsubsection
4642 Special buttons:
4643 \end_layout
4645 \begin_layout Itemize
4646 Escape: Enter/Exit Command mode, cancel modal dialogs.
4647 \end_layout
4649 \begin_layout Itemize
4650 Return (also KPEnter): Execute command, ok modal dialog.
4651 \end_layout
4653 \begin_layout Itemize
4654 Pgup/Up (also KP8/9 if no num lock, CTRL+P; command mode): Previous command
4655  in command history
4656 \end_layout
4658 \begin_layout Itemize
4659 Pgdn/Down(also KP2/3 if no num lock, CTRL+N; command mode): Next command
4660  in command history
4661 \end_layout
4663 \begin_layout Itemize
4664 Home (also KP7 if no num lock, CTRL+A; command mode): Beginning of command.
4665 \end_layout
4667 \begin_layout Itemize
4668 End (also KP1 if no num lock, CTRL+E; command mode): End of command.
4669 \end_layout
4671 \begin_layout Itemize
4672 Left (also KP4 if no num lock, CTRL+B; command mode): Move cursor left.
4673 \end_layout
4675 \begin_layout Itemize
4676 Right (also KP6 if no num lock, CTRL+F; command mode): Move cursor right.
4677 \end_layout
4679 \begin_layout Itemize
4680 Delete (also KP.
4681  if no num lock; command mode): Delete character to right of cursor.
4682 \end_layout
4684 \begin_layout Itemize
4685 Insert (also KP0 if no num lock; command mode): Toggle between insert /
4686  overwrite modes.
4687 \end_layout
4689 \begin_layout Itemize
4690 Backspace (command mode): Delete character to left of cursor.
4691 \end_layout
4693 \begin_layout Itemize
4694 CTRL+LEFT (also ALT+B; command mode): Previous word.
4695 \end_layout
4697 \begin_layout Itemize
4698 CTRL+RIGHT (also ALT+F; command mode): Next word.
4699 \end_layout
4701 \begin_layout Itemize
4702 ALT+D (also CTRL+W; command mode): Delete word.
4703 \end_layout
4705 \begin_layout Itemize
4706 LCTRL+LALT+ESCAPE: Ungraceful shutdown (leaves dump corrupted!).
4707 \end_layout
4709 \begin_layout Subsection
4710 wxWidgets platform
4711 \end_layout
4713 \begin_layout Subsubsection
4714 Modifier names:
4715 \end_layout
4717 \begin_layout Standard
4718 Following modifier names are known:
4719 \end_layout
4721 \begin_layout Itemize
4723 \end_layout
4725 \begin_layout Itemize
4726 ctrl
4727 \end_layout
4729 \begin_layout Itemize
4730 shift 
4731 \end_layout
4733 \begin_layout Itemize
4734 meta
4735 \end_layout
4737 \begin_layout Itemize
4738 cmd (Mac OS X only)
4739 \end_layout
4741 \begin_layout Subsubsection
4742 Key names:
4743 \end_layout
4745 \begin_layout Standard
4746 Following key names are known:
4747 \end_layout
4749 \begin_layout Itemize
4750 back, tab, return, escape, space, exclaim, quotedbl, hash, dollar, percent,
4751  ampersand, quote, leftparen, rightparen, asterisk, plus, comma, minus,
4752  period, slash, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, colon, semicolon, less, equals,
4753  greater, question, at, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4754  q, r, s, t, u, v, w, x, y, z, leftbracket, backslash, rightbracket, caret,
4755  underscore, backquote, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,
4756  q, r, s, t, u, v, w, x, y, z, leftcurly, pipe, rightcurly, tilde, delete,
4757  start, lbutton, rbutton, cancel, mbutton, clear, shift, alt, control, menu,
4758  pause, capital, end, home, lefT, up, right, down, select, print, execute,
4759  snapshot, insert, help, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5,
4760  numpad6, numpad7, numpad8, numpad9, multiply, add, separator, subtract,
4761  decimal, divide, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13,
4762  f14, f15, f16, f17, f18, f19, f20, f21, f22, f23, f24, numlock, scroll,
4763  pageup, pagedown, numpad_space, numpad_tab, numpad_enter, numpad_f1, numpad_f2,
4764  numpad_f3, numpad_f4, numpad_home, numpad_left, numpad_up, numpad_right,
4765  numpad_down, numpad_pageup, numpad_pagedown, numpad_end, numpad_begin,
4766  numpad_insert, numpad_delete, numpad_equal, numpad_multiply, numpad_add,
4767  numpad_separator, numpad_subtract, numpad_decimal, numpad_divide, windows_left,
4768  windows_right, windows_menu, command, special1, special2, special3, special4,
4769  special5, special6, special7, special8, special9, special10, special11,
4770  special12, special13, special14, special15, special16, special17, special18,
4771  special19, special20
4772 \end_layout
4774 \begin_layout Section
4775 Movie file format
4776 \end_layout
4778 \begin_layout Standard
4779 Movie file is .zip archive in itself, normal ZIP archive tools work on it
4780  (note: If you recompress it, do not use compression methods other than
4781  store and deflate and especially do not use encryption of any kind).
4782 \end_layout
4784 \begin_layout Subsection
4785 Detecting clean start/SRAM/Savestate
4786 \end_layout
4788 \begin_layout Itemize
4789 If file has member 
4790 \begin_inset Quotes eld
4791 \end_inset
4793 savestate
4794 \begin_inset Quotes erd
4795 \end_inset
4797  it is savestate, otherwise:
4798 \end_layout
4800 \begin_layout Itemize
4801 If file has members with names starting 
4802 \begin_inset Quotes eld
4803 \end_inset
4805 moviesram.
4806 \begin_inset Quotes erd
4807 \end_inset
4809  it is movie starting from SRAM, otherwise:
4810 \end_layout
4812 \begin_layout Itemize
4813 It is movie starting from clear state.
4814 \end_layout
4816 \begin_layout Subsection
4817 Member: gametype
4818 \end_layout
4820 \begin_layout Standard
4821 Type of game ROM and region (as one line).
4822  Valid values are:
4823 \end_layout
4825 \begin_layout Standard
4826 \begin_inset Tabular
4827 <lyxtabular version="3" rows="8" columns="3">
4828 <features tabularvalignment="middle">
4829 <column alignment="center" valignment="top" width="0">
4830 <column alignment="center" valignment="top" width="0">
4831 <column alignment="center" valignment="top" width="0">
4832 <row>
4833 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4834 \begin_inset Text
4836 \begin_layout Plain Layout
4837 Value
4838 \end_layout
4840 \end_inset
4841 </cell>
4842 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4843 \begin_inset Text
4845 \begin_layout Plain Layout
4846 System
4847 \end_layout
4849 \end_inset
4850 </cell>
4851 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4852 \begin_inset Text
4854 \begin_layout Plain Layout
4855 Region
4856 \end_layout
4858 \end_inset
4859 </cell>
4860 </row>
4861 <row>
4862 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4863 \begin_inset Text
4865 \begin_layout Plain Layout
4866 snes_pal
4867 \end_layout
4869 \end_inset
4870 </cell>
4871 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4872 \begin_inset Text
4874 \begin_layout Plain Layout
4875 Super NES
4876 \end_layout
4878 \end_inset
4879 </cell>
4880 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4881 \begin_inset Text
4883 \begin_layout Plain Layout
4885 \end_layout
4887 \end_inset
4888 </cell>
4889 </row>
4890 <row>
4891 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4892 \begin_inset Text
4894 \begin_layout Plain Layout
4895 sgb_pal
4896 \end_layout
4898 \end_inset
4899 </cell>
4900 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4901 \begin_inset Text
4903 \begin_layout Plain Layout
4904 Super Game Boy
4905 \end_layout
4907 \end_inset
4908 </cell>
4909 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4910 \begin_inset Text
4912 \begin_layout Plain Layout
4914 \end_layout
4916 \end_inset
4917 </cell>
4918 </row>
4919 <row>
4920 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4921 \begin_inset Text
4923 \begin_layout Plain Layout
4924 snes_ntsc
4925 \end_layout
4927 \end_inset
4928 </cell>
4929 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4930 \begin_inset Text
4932 \begin_layout Plain Layout
4933 Super NES
4934 \end_layout
4936 \end_inset
4937 </cell>
4938 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4939 \begin_inset Text
4941 \begin_layout Plain Layout
4942 NTSC
4943 \end_layout
4945 \end_inset
4946 </cell>
4947 </row>
4948 <row>
4949 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4950 \begin_inset Text
4952 \begin_layout Plain Layout
4953 sgb_ntsc
4954 \end_layout
4956 \end_inset
4957 </cell>
4958 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4959 \begin_inset Text
4961 \begin_layout Plain Layout
4962 Super Game Boy
4963 \end_layout
4965 \end_inset
4966 </cell>
4967 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4968 \begin_inset Text
4970 \begin_layout Plain Layout
4971 NTSC
4972 \end_layout
4974 \end_inset
4975 </cell>
4976 </row>
4977 <row>
4978 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4979 \begin_inset Text
4981 \begin_layout Plain Layout
4983 \end_layout
4985 \end_inset
4986 </cell>
4987 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4988 \begin_inset Text
4990 \begin_layout Plain Layout
4991 BS-X (non-slotted)
4992 \end_layout
4994 \end_inset
4995 </cell>
4996 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4997 \begin_inset Text
4999 \begin_layout Plain Layout
5000 NTSC
5001 \end_layout
5003 \end_inset
5004 </cell>
5005 </row>
5006 <row>
5007 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5008 \begin_inset Text
5010 \begin_layout Plain Layout
5011 bsxslotted
5012 \end_layout
5014 \end_inset
5015 </cell>
5016 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5017 \begin_inset Text
5019 \begin_layout Plain Layout
5020 BS-X (slotted)
5021 \end_layout
5023 \end_inset
5024 </cell>
5025 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5026 \begin_inset Text
5028 \begin_layout Plain Layout
5029 NTSC
5030 \end_layout
5032 \end_inset
5033 </cell>
5034 </row>
5035 <row>
5036 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5037 \begin_inset Text
5039 \begin_layout Plain Layout
5040 sufamiturbo
5041 \end_layout
5043 \end_inset
5044 </cell>
5045 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5046 \begin_inset Text
5048 \begin_layout Plain Layout
5049 Sufami Turbo
5050 \end_layout
5052 \end_inset
5053 </cell>
5054 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5055 \begin_inset Text
5057 \begin_layout Plain Layout
5058 NTSC
5059 \end_layout
5061 \end_inset
5062 </cell>
5063 </row>
5064 </lyxtabular>
5066 \end_inset
5069 \end_layout
5071 \begin_layout Standard
5072 Frame rates are:
5073 \end_layout
5075 \begin_layout Standard
5076 \begin_inset Tabular
5077 <lyxtabular version="3" rows="3" columns="2">
5078 <features tabularvalignment="middle">
5079 <column alignment="center" valignment="top" width="0">
5080 <column alignment="center" valignment="top" width="0">
5081 <row>
5082 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5083 \begin_inset Text
5085 \begin_layout Plain Layout
5086 Region
5087 \end_layout
5089 \end_inset
5090 </cell>
5091 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5092 \begin_inset Text
5094 \begin_layout Plain Layout
5095 Framerate (fps)
5096 \end_layout
5098 \end_inset
5099 </cell>
5100 </row>
5101 <row>
5102 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5103 \begin_inset Text
5105 \begin_layout Plain Layout
5107 \end_layout
5109 \end_inset
5110 </cell>
5111 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5112 \begin_inset Text
5114 \begin_layout Plain Layout
5115 322445/6448
5116 \end_layout
5118 \end_inset
5119 </cell>
5120 </row>
5121 <row>
5122 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5123 \begin_inset Text
5125 \begin_layout Plain Layout
5126 NTSC
5127 \end_layout
5129 \end_inset
5130 </cell>
5131 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5132 \begin_inset Text
5134 \begin_layout Plain Layout
5135 10738636/178683
5136 \end_layout
5138 \end_inset
5139 </cell>
5140 </row>
5141 </lyxtabular>
5143 \end_inset
5146 \end_layout
5148 \begin_layout Subsection
5149 Member: port1
5150 \end_layout
5152 \begin_layout Standard
5153 Contains type of port #1 (as one line).
5154  Valid values are 'none', 'gamepad', 'multitap' and 'mouse'.
5155  If not present, defaults to 'gamepad'.
5156 \end_layout
5158 \begin_layout Subsection
5159 Member: port2
5160 \end_layout
5162 \begin_layout Standard
5163 Contains type of port #2 (as one line).
5164  Valid values are 'none', 'gamepad', 'multitap', 'mouse', 'superscope',
5165  'justifier' and 'justifiers'.
5166  If not present, defaults to 'none'.
5167 \end_layout
5169 \begin_layout Subsection
5170 Member: gamename
5171 \end_layout
5173 \begin_layout Standard
5174 Contains name of the game (as one line).
5175 \end_layout
5177 \begin_layout Subsection
5178 Member: authors
5179 \end_layout
5181 \begin_layout Standard
5182 Contains authors, one per line.
5183  Part before '|' is the full name, part after is the nickname.
5184 \end_layout
5186 \begin_layout Subsection
5187 Member: systemid
5188 \end_layout
5190 \begin_layout Standard
5191 Always 
5192 \begin_inset Quotes eld
5193 \end_inset
5195 lsnes-rr1
5196 \begin_inset Quotes erd
5197 \end_inset
5199  (one line).
5200  Used to reject other saves.
5201 \end_layout
5203 \begin_layout Subsection
5204 Member: controlsversion
5205 \end_layout
5207 \begin_layout Standard
5208 Always 
5209 \begin_inset Quotes eld
5210 \end_inset
5213 \begin_inset Quotes erd
5214 \end_inset
5216  (one line).
5217  Used to identify what controls are there.
5218 \end_layout
5220 \begin_layout Subsection
5221 Member: 
5222 \begin_inset Quotes eld
5223 \end_inset
5225 coreversion
5226 \begin_inset Quotes erd
5227 \end_inset
5230 \end_layout
5232 \begin_layout Standard
5233 Contains bsnes core version number (as one line).
5234 \end_layout
5236 \begin_layout Subsection
5237 Member: projectid
5238 \end_layout
5240 \begin_layout Standard
5241 Contains project ID (as one line).
5242  Used to identify if two movies are part of the same project.
5243 \end_layout
5245 \begin_layout Subsection
5246 Member: {rom,slota,slotb}{,xml}.sha256
5247 \end_layout
5249 \begin_layout Standard
5250 Contains SHA-256 of said ROM or ROM mapping file (as one line).
5251  Absent if corresponding file is absent.
5252 \end_layout
5254 \begin_layout Subsection
5255 Member: moviesram.<name>
5256 \end_layout
5258 \begin_layout Standard
5259 Raw binary startup SRAM of kind <name>.
5260  Only present in savestates and movies starting from SRAM.
5261 \end_layout
5263 \begin_layout Subsection
5264 Member: saveframe
5265 \end_layout
5267 \begin_layout Standard
5268 Contains frame number (as one line) of frame movie was saved on.
5269  Only present in savestates.
5270 \end_layout
5272 \begin_layout Subsection
5273 Member: lagcounter
5274 \end_layout
5276 \begin_layout Standard
5277 Current value of lag counter (as one line).
5278  Only present in savestates.
5279 \end_layout
5281 \begin_layout Subsection
5282 Member: pollcounters
5283 \end_layout
5285 \begin_layout Standard
5286 Contains poll counters (currently 100 of them), one per line.
5287  Each line is raw poll count if DRDY is set for it.
5288  Otherwise it is negative poll count minus one.
5289  Only present in savestates.
5290 \end_layout
5292 \begin_layout Subsection
5293 Member: hostmemory
5294 \end_layout
5296 \begin_layout Standard
5297 Raw binary dump of host memory.
5298  Only present in savestates.
5299 \end_layout
5301 \begin_layout Subsection
5302 Member: savestate
5303 \end_layout
5305 \begin_layout Standard
5306 The raw binary savestate itself.
5307  Savestate detection uses this file, only present in savestates.
5308 \end_layout
5310 \begin_layout Subsection
5311 Member: screenshot
5312 \end_layout
5314 \begin_layout Standard
5315 Screenshot of current frame.
5316  Only present in savestates.
5317  First 2 bytes are big-endian width of image, rest are 24-bit RGB image
5318  data.
5319  Height of image is inferred from the width and size of data.
5320 \end_layout
5322 \begin_layout Subsection
5323 Member: sram.<name>
5324 \end_layout
5326 \begin_layout Standard
5327 Raw binary SRAM of kind <name> at time of savestate.
5328  Only present in savestates.
5329 \end_layout
5331 \begin_layout Subsection
5332 Member: input
5333 \end_layout
5335 \begin_layout Standard
5336 The actual input track, one line per subframe (blank lines are skipped).
5337 \end_layout
5339 \begin_layout Itemize
5340 If the first byte of each line is '.', ' ', <tab> or '|', then the line is
5341  part of same frame as previous, otherwise it starts a new frame.
5342 \end_layout
5344 \begin_layout Itemize
5345 First subframe must start a new frame.
5346 \end_layout
5348 \begin_layout Standard
5349 Length of movie in frames is number of lines in input file that start a
5350  new frame.
5351 \end_layout
5353 \begin_layout Subsection
5354 Member: subtitles
5355 \end_layout
5357 \begin_layout Standard
5358 Subtitle track.
5359  Optional.
5360 \end_layout
5362 \begin_layout Itemize
5363 Each line is in form <firstframe> <numframes> <text>.
5364 \end_layout
5366 \begin_layout Itemize
5367 Linefeed is encoded as 
5368 \backslash
5369 n, backslash is encoded as 
5370 \backslash
5372 \backslash
5374 \end_layout
5376 \begin_layout Subsection
5377 Member: rerecords
5378 \end_layout
5380 \begin_layout Standard
5381 Contains textual base-10 rerecord count (as one line; emulator just writes
5382  this, it doesn't read it) + 1.
5383 \end_layout
5385 \begin_layout Subsection
5386 Member: rrdata
5387 \end_layout
5389 \begin_layout Standard
5390 This member stores set of load IDs.
5391  There is one load ID per rerecord (plus one corresponding to start of project).
5392 \end_layout
5394 \begin_layout Itemize
5395 This member constists of concatenation of records
5396 \end_layout
5398 \begin_layout Itemize
5399 Each record is 2-36 bytes long and can represent 1-16,843,009 consequtive
5400  IDs.
5401 \end_layout
5403 \begin_layout Itemize
5404 IDs are interpretted as 256-bit big-endian integers with warparound.
5405 \end_layout
5407 \begin_layout Itemize
5408 Initial predicted ID is all zeroes.
5409 \end_layout
5411 \begin_layout Standard
5412 Format of each record is:
5413 \end_layout
5415 \begin_layout Itemize
5416 1 byte: Opcode byte.
5417  Bits 0-4 are prefix length (prefixlen), bits 5-6 are count length (countlen).
5418  Bit 7 is unused.
5419 \end_layout
5421 \begin_layout Itemize
5422 32-prefixlen bytes of ID.
5423 \end_layout
5425 \begin_layout Itemize
5426 countlen bytes of big-endian count (count).
5427 \end_layout
5429 \begin_layout Standard
5430 Records are processed as follows:
5431 \end_layout
5433 \begin_layout Itemize
5434 To form the first ID encoded by record, take the first prefixlen bytes predicted
5435  ID and append the read ID value to it.
5436  The result is the first ID encoded.
5437 \end_layout
5439 \begin_layout Itemize
5440 If countlen is 0, record encodes 1 ID.
5441 \end_layout
5443 \begin_layout Itemize
5444 If countlen is 1, record encodes 2+count IDs.
5445 \end_layout
5447 \begin_layout Itemize
5448 If countlen is 2, record encodes 258+count IDs.
5449 \end_layout
5451 \begin_layout Itemize
5452 If countlen is 3, record encodes 65794+count IDs.
5453 \end_layout
5455 \begin_layout Itemize
5456 The new predicted ID is the next ID after last one encoded by the record.
5457 \end_layout
5459 \begin_layout Standard
5460 The number of rerecords + 1 is equal to the sum of number of IDs encoded
5461  by all records.
5462 \end_layout
5464 \begin_layout Subsection
5465 Member: starttime.second
5466 \end_layout
5468 \begin_layout Standard
5469 Movie starting time, second part.
5470  Epoch is Unix epoch.
5471  Default is 1,000,000,000.
5472 \end_layout
5474 \begin_layout Subsection
5475 Member: starttime.subsecond
5476 \end_layout
5478 \begin_layout Standard
5479 Movie starting time, subsecond part.
5480  Unit is CPU clocks.
5481  Default is 0.
5482 \end_layout
5484 \begin_layout Subsection
5485 Member: savetime.second
5486 \end_layout
5488 \begin_layout Standard
5489 Movie saving time, second part.
5490  Default is starttime.second.
5491  Only present in savestates.
5492 \end_layout
5494 \begin_layout Subsection
5495 Member: savetime.subsecond
5496 \end_layout
5498 \begin_layout Standard
5499 Movie saving time, subsecond part.
5500  Default is starttime.subsecond.
5501  Only present in savestates.
5502 \end_layout
5504 \begin_layout Section
5505 lsvs file format (commentary tracks)
5506 \end_layout
5508 \begin_layout Subsection
5509 Clusters
5510 \end_layout
5512 \begin_layout Itemize
5513 Each cluster is 8kB (8192 bytes) in size.
5514 \end_layout
5516 \begin_layout Itemize
5517 Cluster n starts at offset 8192*n in file.
5518 \end_layout
5520 \begin_layout Itemize
5521 The following clusters are system special:
5522 \end_layout
5524 \begin_deeper
5525 \begin_layout Itemize
5526 Cluster 0 and all clusters with number multiple of 2048 (cluster tables)
5527 \end_layout
5529 \begin_layout Itemize
5530 Cluster 1 (superblock)
5531 \end_layout
5533 \end_deeper
5534 \begin_layout Subsection
5535 Cluster tables
5536 \end_layout
5538 \begin_layout Itemize
5539 The cluster table describing cluster n is stored in cluster n & ~0x7FF (zero
5540  last 11 bits of n).
5541 \end_layout
5543 \begin_layout Itemize
5544 This cluster table consists of 2048 4-byte big-endian integers.
5545 \end_layout
5547 \begin_layout Itemize
5548 Each entry describes a cluster in 16MB supercluster, in order.
5549 \end_layout
5551 \begin_layout Itemize
5552 The valid values for entries are:
5553 \end_layout
5555 \begin_deeper
5556 \begin_layout Itemize
5557 0x00000000: Free cluster
5558 \end_layout
5560 \begin_layout Itemize
5561 0x00000001: Last cluster in chain.
5562 \end_layout
5564 \begin_layout Itemize
5565 0xFFFFFFFF: System cluster (cluster tables and superblock)
5566 \end_layout
5568 \begin_layout Itemize
5569 (anything else): Number of next cluster in chain.
5570  Must not be multiple of 2048.
5571 \end_layout
5573 \end_deeper
5574 \begin_layout Itemize
5575 Due to limitations of the format, there can be at most 2097052 superclusters,
5576  giving maximum file size of 16TB.
5577 \end_layout
5579 \begin_layout Subsection
5580 Stream table
5581 \end_layout
5583 \begin_layout Itemize
5584 The stream table chain always starts in cluster 2.
5585 \end_layout
5587 \begin_layout Itemize
5588 Otherwise, it follows normal chaining.
5589 \end_layout
5591 \begin_layout Itemize
5592 The stream table consists of 16-byte entries:
5593 \end_layout
5595 \begin_deeper
5596 \begin_layout Itemize
5597 The first 8 bytes of entry give big-endian beginning position of stream
5598  in units of 1/48000 s.
5599 \end_layout
5601 \begin_layout Itemize
5602 The next 4 bytes of entry give big-endian beginning cluster for control
5603  data.
5604  0 here marks the entry as not present.
5605 \end_layout
5607 \begin_layout Itemize
5608 The last 4 bytes of entry give big-endian beginning cluster for codec data.
5609 \end_layout
5611 \end_deeper
5612 \begin_layout Itemize
5613 Stream table clusters are normal clusters, following normal chaining.
5614 \end_layout
5616 \begin_layout Itemize
5617 The stream begnning position is not guarenteed unique.
5618  There can be multiple streams with the same starting position in the file.
5619 \end_layout
5621 \begin_layout Subsection
5622 Stream control data
5623 \end_layout
5625 \begin_layout Itemize
5626 The stream control data consists of entries 4 bytes each:
5627 \end_layout
5629 \begin_deeper
5630 \begin_layout Itemize
5631 The first 2 bytes of entry gives big-endian length of packet
5632 \end_layout
5634 \begin_layout Itemize
5635 The next byte of entry gives audio length of packet in units of 1/400 s.
5636 \end_layout
5638 \begin_layout Itemize
5639 The last byte is control byte.
5640 \end_layout
5642 \begin_deeper
5643 \begin_layout Itemize
5644 0 means this entry is not present and the control data ends.
5645 \end_layout
5647 \begin_layout Itemize
5648 1 is valid control entry.
5649 \end_layout
5651 \end_deeper
5652 \end_deeper
5653 \begin_layout Itemize
5654 The stream control data can also end by running into end of the readable
5655  chain.
5656 \end_layout
5658 \begin_deeper
5659 \begin_layout Itemize
5660 This happens if there happens to be exact multiple of 2048 packets in stream
5661  and number of packets is nonzero.
5662 \end_layout
5664 \end_deeper
5665 \begin_layout Itemize
5666 These clusters follow normal chaining.
5667 \end_layout
5669 \begin_layout Subsection
5670 Stream codec data
5671 \end_layout
5673 \begin_layout Itemize
5674 Stream codec data consists of raw Opus data packets packed back to back
5675  with nothing in between.
5676 \end_layout
5678 \begin_layout Itemize
5679 Warning: Due to internal limitations, this data must reside in the first
5680  65536 superclusters (that is, the first 1TB of the file).
5681 \end_layout
5683 \begin_layout Subsection
5684 Superblock
5685 \end_layout
5687 \begin_layout Itemize
5688 The superblock is stored in cluster 1.
5690 \end_layout
5692 \begin_layout Itemize
5693 The first 11 bytes are 
5694 \begin_inset Quotes eld
5695 \end_inset
5697 sefs-magic
5698 \begin_inset Quotes erd
5699 \end_inset
5701 <NUL>.
5702 \end_layout
5704 \begin_layout Itemize
5705 The rest are unused.
5706 \end_layout
5708 \begin_layout Itemize
5709 This cluster 1 is marked as system special.
5710 \end_layout
5712 \begin_layout Section
5713 Known ROM extensions
5714 \end_layout
5716 \begin_layout Itemize
5717 SNES cartridge ROMs: sfc, smc, swc, fig, ufo, sf2, gd3, gd7, dx2, mgd, mgh.
5718 \end_layout
5720 \begin_layout Itemize
5721 DMG cartridge ROMs: dmg, gb.
5722 \end_layout
5724 \begin_layout Itemize
5725 GBC cartridge ROMs: cgb, gbc.
5726 \end_layout
5728 \begin_layout Section
5729 Gamepack files
5730 \end_layout
5732 \begin_layout Itemize
5733 The first line must be: 
5734 \begin_inset Quotes eld
5735 \end_inset
5737 [GAMEPACK FILE]
5738 \begin_inset Quotes erd
5739 \end_inset
5742 \end_layout
5744 \begin_layout Itemize
5745 There is one needed line: 
5746 \begin_inset Quotes eld
5747 \end_inset
5749 type <systype>
5750 \begin_inset Quotes erd
5751 \end_inset
5754  This sets system type to <systype>.
5755  The following system types are valid:
5756 \end_layout
5758 \begin_deeper
5759 \begin_layout Itemize
5760 snes (SNES)
5761 \end_layout
5763 \begin_layout Itemize
5764 bsx (BS-X non-slotted)
5765 \end_layout
5767 \begin_layout Itemize
5768 bsxslotted (BS-X slotted)
5769 \end_layout
5771 \begin_layout Itemize
5772 sufamiturbo (Sufami Turbo)
5773 \end_layout
5775 \begin_layout Itemize
5776 sgb (Super Game Boy)
5777 \end_layout
5779 \begin_layout Itemize
5780 dmg (Game Boy)
5781 \end_layout
5783 \begin_layout Itemize
5784 gbc (Game Boy Color)
5785 \end_layout
5787 \begin_layout Itemize
5788 gbc_gba (Game Boy Color with GBA initial register values)
5789 \end_layout
5791 \end_deeper
5792 \begin_layout Itemize
5793 Optionally a region can be specified: 
5794 \begin_inset Quotes eld
5795 \end_inset
5797 region <region>
5798 \begin_inset Quotes erd
5799 \end_inset
5802  The following values are valid:
5803 \end_layout
5805 \begin_deeper
5806 \begin_layout Itemize
5807 autodetect (Autodetect region: snes and sgb only)
5808 \end_layout
5810 \begin_layout Itemize
5811 ntsc (NTSC: snes, bsx, bsxslotted, sufamiturbo, sgb)
5812 \end_layout
5814 \begin_layout Itemize
5815 pal (PAL: snes, sgb)
5816 \end_layout
5818 \begin_layout Itemize
5819 world (World: dmg, gbc, gbc_gba)
5820 \end_layout
5822 \end_deeper
5823 \begin_layout Itemize
5824 ROM images are loaded as: 
5825 \begin_inset Quotes eld
5826 \end_inset
5828 rom <type> <file>
5829 \begin_inset Quotes erd
5830 \end_inset
5833  The following types are valid:
5834 \end_layout
5836 \begin_deeper
5837 \begin_layout Itemize
5838 rom (Cartridge ROM in snes, dmg, gbc, gbc_gba.
5839  BIOS in bsx, bsxslotted, sufamiturbo)
5840 \end_layout
5842 \begin_layout Itemize
5843 bsx (Cartridge ROM in bsx, bsxslotted)
5844 \end_layout
5846 \begin_layout Itemize
5847 slot-a (Cartridge ROM in sufamiturbo)
5848 \end_layout
5850 \begin_layout Itemize
5851 slot-b (Cartridge ROM in sufamiturbo)
5852 \end_layout
5854 \end_deeper
5855 \begin_layout Itemize
5856 ROM markup can be loaded as: 
5857 \begin_inset Quotes eld
5858 \end_inset
5860 xml <type> <file>
5861 \begin_inset Quotes erd
5862 \end_inset
5865  The types valid are the same as for ROMs.
5866 \end_layout
5868 \begin_layout Itemize
5869 Patches can be loaded as 
5870 \begin_inset Quotes eld
5871 \end_inset
5873 patch[<offset>] <type> <file>
5874 \begin_inset Quotes erd
5875 \end_inset
5878  The types are the same as for ROMs.
5879 \end_layout
5881 \begin_deeper
5882 \begin_layout Itemize
5883 Offset is given in form [+-]<number>.
5884  Usually offset is either +0 or -512.
5885 \end_layout
5887 \begin_layout Itemize
5888 Default offset is +0.
5889 \end_layout
5891 \end_deeper
5892 \begin_layout Subsection
5893 Example:
5894 \end_layout
5896 \begin_layout LyX-Code
5897 [GAMEPACK FILE]
5898 \end_layout
5900 \begin_layout LyX-Code
5901 type snes
5902 \end_layout
5904 \begin_layout LyX-Code
5905 rom rom speedygonzales.sfc
5906 \end_layout
5908 \begin_layout LyX-Code
5909 patch-512 rom sonicthehedgehog.ips
5910 \end_layout
5912 \begin_layout Subsection
5913 Example 2:
5914 \end_layout
5916 \begin_layout LyX-Code
5917 [GAMEPACK FILE]
5918 \end_layout
5920 \begin_layout LyX-Code
5921 type sgb
5922 \end_layout
5924 \begin_layout LyX-Code
5925 rom rom supergameboy.sfc
5926 \end_layout
5928 \begin_layout LyX-Code
5929 rom dmg megamanV.dmg
5930 \end_layout
5932 \begin_layout Section
5933 Quick'n'dirty encode guide
5934 \end_layout
5936 \begin_layout Enumerate
5937 Start the emulator and load the ROM and movie file.
5938 \end_layout
5940 \begin_layout Enumerate
5941 Set large AVI option 'set-setting avi-large on'
5942 \end_layout
5944 \begin_layout Enumerate
5945 Enable dumping 'dump-avi tmpdump' 
5946 \end_layout
5948 \begin_layout Enumerate
5949 Unpause and let it run until you want to end dumping.
5950 \end_layout
5952 \begin_layout Enumerate
5953 Close the emulator (closing the window is the easiest way).
5954  Or use 'end-avi'.
5955 \end_layout
5957 \begin_layout Enumerate
5958 For each tmpdump*.avi file created, on command prompt, do 'x264 --crf 10
5959  -o tmpdump_<numbers>.mkv tmpdump_<numbers>.avi'.
5960 \end_layout
5962 \begin_layout Enumerate
5963 Do 'sox tmpdump.sox tmpdump.ogg rate -v 32000'
5964 \end_layout
5966 \begin_layout Enumerate
5967 Do 'mkvmerge -o tmpdump_video.mkv tmpdump_0000000.mkv + tmpdump_0000001.mkv
5968  + tmpdump_0000002.mkv' (list every tmpdump_<numbers>.mkv, with + in between).
5969 \end_layout
5971 \begin_layout Enumerate
5972 Do 'mkvmerge -o final.mkv tmpdump_video.mkv tmpdump.ogg'.
5973  Now final.mkv contains quick'n'dirty encode.
5974 \end_layout
5976 \begin_layout Section
5977 Axis configurations for some gamepad types:
5978 \end_layout
5980 \begin_layout Subsection
5981 XBox360 controller:
5982 \end_layout
5984 \begin_layout Standard
5985 Axes 2 and 5 (joystick<n>axis2 and joystick<n>axis5) should be set to pressure-+.
5986 \end_layout
5988 \begin_layout LyX-Code
5989 set-axis joystick0axis2 pressure-+
5990 \end_layout
5992 \begin_layout LyX-Code
5993 set-axis joystick0axis5 pressure-+
5994 \end_layout
5996 \begin_layout Itemize
5997 This is needed for SDL only.
5998  EVDEV sets those types correctly.
5999 \end_layout
6001 \begin_layout Subsection
6002 PS3 
6003 \begin_inset Quotes eld
6004 \end_inset
6006 sixaxis
6007 \begin_inset Quotes erd
6008 \end_inset
6010  controller:
6011 \end_layout
6013 \begin_layout Standard
6014 Axes 8-19 should be disabled.
6015 \end_layout
6017 \begin_layout LyX-Code
6018 set-axis joystick0axis8 disabled
6019 \end_layout
6021 \begin_layout LyX-Code
6022 set-axis joystick0axis9 disabled
6023 \end_layout
6025 \begin_layout LyX-Code
6026 set-axis joystick0axis10 disabled
6027 \end_layout
6029 \begin_layout LyX-Code
6030 set-axis joystick0axis11 disabled
6031 \end_layout
6033 \begin_layout LyX-Code
6034 set-axis joystick0axis12 disabled
6035 \end_layout
6037 \begin_layout LyX-Code
6038 set-axis joystick0axis13 disabled
6039 \end_layout
6041 \begin_layout LyX-Code
6042 set-axis joystick0axis14 disabled
6043 \end_layout
6045 \begin_layout LyX-Code
6046 set-axis joystick0axis15 disabled
6047 \end_layout
6049 \begin_layout LyX-Code
6050 set-axis joystick0axis16 disabled
6051 \end_layout
6053 \begin_layout LyX-Code
6054 set-axis joystick0axis17 disabled
6055 \end_layout
6057 \begin_layout LyX-Code
6058 set-axis joystick0axis18 disabled
6059 \end_layout
6061 \begin_layout LyX-Code
6062 set-axis joystick0axis19 disabled
6063 \end_layout
6065 \begin_layout Section
6066 Errata:
6067 \end_layout
6069 \begin_layout Subsection
6070 Problems from BSNES core:
6071 \end_layout
6073 \begin_layout Itemize
6074 The whole pending save stuff.
6075 \end_layout
6077 \begin_layout Itemize
6078 Lack of layer hiding.
6079 \end_layout
6081 \begin_layout Itemize
6082 It is slow (especially accuracy).
6083 \end_layout
6085 \begin_layout Itemize
6086 Firmwares can't be loaded from ZIP archives.
6087 \end_layout
6089 \begin_layout Subsection
6090 Other problems:
6091 \end_layout
6093 \begin_layout Itemize
6094 Modifiers don't work with pseudo-keys (SDL, EVDEV).
6095 \end_layout
6097 \begin_layout Itemize
6098 Audio for last dumped frame is not itself dumped.
6099 \end_layout
6101 \begin_layout Itemize
6102 Audio in UI is pretty bad in quality if game doesn't run at full speed.
6103 \end_layout
6105 \begin_layout Itemize
6106 No menus, command based interface (SDL).
6107 \end_layout
6109 \begin_layout Itemize
6110 Long commands don't scroll.
6111 \end_layout
6113 \begin_layout Section
6114 Changelog:
6115 \end_layout
6117 \begin_layout Subsection
6118 rr0-beta1
6119 \end_layout
6121 \begin_layout Itemize
6122 Fix -Wall warnings
6123 \end_layout
6125 \begin_layout Itemize
6126 Fix dumper video corruption with levels 10-18.
6127 \end_layout
6129 \begin_layout Subsection
6130 rr0-beta2
6131 \end_layout
6133 \begin_layout Itemize
6134 Autofire
6135 \end_layout
6137 \begin_layout Itemize
6138 Lots of code cleanups
6139 \end_layout
6141 \begin_layout Itemize
6142 Lua interface to settings
6143 \end_layout
6145 \begin_layout Itemize
6146 Allow specifying AVI borders without Lua
6147 \end_layout
6149 \begin_layout Itemize
6150 Fix scaling if vscale > 1 and originx > 0 (left border exists)
6151 \end_layout
6153 \begin_layout Itemize
6154 on_snoop lua callback
6155 \end_layout
6157 \begin_layout Itemize
6158 Faster movie loading and saving.
6159 \end_layout
6161 \begin_layout Subsection
6162 rr0-beta3
6163 \end_layout
6165 \begin_layout Itemize
6166 Joystick support
6167 \end_layout
6169 \begin_layout Subsection
6170 rr0-beta4
6171 \end_layout
6173 \begin_layout Itemize
6174 Fix multi-buttons
6175 \end_layout
6177 \begin_layout Itemize
6178 Save jukebox functionality.
6179 \end_layout
6181 \begin_layout Subsection
6182 rr0-beta5
6183 \end_layout
6185 \begin_layout Itemize
6186 Try to fix some nasty failing movie load edge cases
6187 \end_layout
6189 \begin_layout Itemize
6190 Allow specifying scripts to run on command line.
6191 \end_layout
6193 \begin_layout Subsection
6194 rr0-beta6
6195 \end_layout
6197 \begin_layout Itemize
6198 Major source code reorganization.
6199 \end_layout
6201 \begin_layout Itemize
6202 Backup savestates before overwriting.
6203 \end_layout
6205 \begin_layout Itemize
6206 Don't crash if loading initial state fails.
6207 \end_layout
6209 \begin_layout Subsection
6210 rr0-beta7
6211 \end_layout
6213 \begin_layout Itemize
6214 Fix firmware lookup
6215 \end_layout
6217 \begin_layout Itemize
6218 Fix author name parsing
6219 \end_layout
6221 \begin_layout Itemize
6222 Fix rerecord counting
6223 \end_layout
6225 \begin_layout Itemize
6226 (SDL) Print messages to console if SDL is uninitialized
6227 \end_layout
6229 \begin_layout Itemize
6230 Add movieinfo program
6231 \end_layout
6233 \begin_layout Itemize
6234 Fix loading movies starting from SRAM.
6235 \end_layout
6237 \begin_layout Subsection
6238 rr0-beta8
6239 \end_layout
6241 \begin_layout Itemize
6242 Add support for unattended dumping
6243 \end_layout
6245 \begin_layout Itemize
6246 Fix compiling for Win32
6247 \end_layout
6249 \begin_layout Itemize
6250 Don't lock up if sound can't be initialized
6251 \end_layout
6253 \begin_layout Itemize
6254 Strip trailing CR from commands
6255 \end_layout
6257 \begin_layout Itemize
6258 Don't try to do dubious things in global ctors (fix crash on startup)
6259 \end_layout
6261 \begin_layout Subsection
6262 rr0-beta9
6263 \end_layout
6265 \begin_layout Itemize
6266 Small documentation tweaking
6267 \end_layout
6269 \begin_layout Itemize
6270 Fix make clean
6271 \end_layout
6273 \begin_layout Itemize
6274 Fix major bug in modifier matching
6275 \end_layout
6277 \begin_layout Subsection
6278 rr0-beta10
6279 \end_layout
6281 \begin_layout Itemize
6282 Lots of documentation fixes
6283 \end_layout
6285 \begin_layout Itemize
6286 Use dedicated callbacks for event backcomm., not commands.
6287 \end_layout
6289 \begin_layout Itemize
6290 Ensure that the watchdog is not hit when executing delayed reset.
6291 \end_layout
6293 \begin_layout Itemize
6294 Remove errant tab from joystick message.
6295 \end_layout
6297 \begin_layout Subsection
6298 rr0-beta11
6299 \end_layout
6301 \begin_layout Itemize
6302 Make autofire operate in absolute time, not linear time
6303 \end_layout
6305 \begin_layout Itemize
6306 Reinitialize controls when resuming from loadstate
6307 \end_layout
6309 \begin_layout Itemize
6310 Some more code cleanups
6311 \end_layout
6313 \begin_layout Itemize
6314 If Lua allocator fails, call OOM_panic()
6315 \end_layout
6317 \begin_layout Itemize
6318 Byte/word/dword/qword sized host memory write/read functions.
6319 \end_layout
6321 \begin_layout Itemize
6322 Dump at correct framerate if dumping interlaced NTSC (height=448).
6323 \end_layout
6325 \begin_layout Subsection
6326 rr0-beta12
6327 \end_layout
6329 \begin_layout Itemize
6330 Actually include the complete source code
6331 \end_layout
6333 \begin_layout Itemize
6334 Keep track of RTC
6335 \end_layout
6337 \begin_layout Subsection
6338 rr0-beta13
6339 \end_layout
6341 \begin_layout Itemize
6342 Document {save,start}time.{,sub}second.
6343 \end_layout
6345 \begin_layout Itemize
6346 Intercept time() from bsnes core.
6347 \end_layout
6349 \begin_layout Subsection
6350 rr0-beta14
6351 \end_layout
6353 \begin_layout Itemize
6354 Allow disabling time() interception (allow build on Mac OS X)
6355 \end_layout
6357 \begin_layout Itemize
6358 Use SDLMain on Mac OS X (make SDL not crash)
6359 \end_layout
6361 \begin_layout Itemize
6362 Disable delayed resets (just plain too buggy for now).
6363 \end_layout
6365 \begin_layout Itemize
6366 Code cleanups
6367 \end_layout
6369 \begin_layout Itemize
6370 Use 16-bit for graphics/video instead of 32-bit.
6371 \end_layout
6373 \begin_layout Itemize
6374 gui.rectangle/gui.pixel
6375 \end_layout
6377 \begin_layout Itemize
6378 gui.crosshair
6379 \end_layout
6381 \begin_layout Itemize
6382 New CSCD writer implementation.
6383 \end_layout
6385 \begin_layout Subsection
6386 rr0-beta15
6387 \end_layout
6389 \begin_layout Itemize
6390 Fix interaction of * and +.
6391 \end_layout
6393 \begin_layout Itemize
6394 Manual improvements
6395 \end_layout
6397 \begin_layout Itemize
6398 Use gettimeofday()/usleep(), these seem portable enough.
6399 \end_layout
6401 \begin_layout Itemize
6402 Move joystick axis manipulation to keymapper code.
6403 \end_layout
6405 \begin_layout Itemize
6406 Changes to how read-only works.
6407 \end_layout
6409 \begin_layout Itemize
6410 Refactor controller input code.
6411 \end_layout
6413 \begin_layout Subsection
6414 rr0-beta16
6415 \end_layout
6417 \begin_layout Itemize
6418 Fix mouseclick scale compensation.
6419 \end_layout
6421 \begin_layout Itemize
6422 Draw area boundaries correctly in SDL code.
6423 \end_layout
6425 \begin_layout Itemize
6426 gui.screenshot.
6427 \end_layout
6429 \begin_layout Itemize
6430 Fix CSCD output (buffer overrun and race condition).
6431 \end_layout
6433 \begin_layout Subsection
6434 rr0-beta17
6435 \end_layout
6437 \begin_layout Itemize
6438 JMD dumping support.
6439 \end_layout
6441 \begin_layout Itemize
6442 Allow unattended dumping to JMD.
6443 \end_layout
6445 \begin_layout Itemize
6446 Move to BSNES v083.
6447 \end_layout
6449 \begin_layout Itemize
6450 Switch back to 32-bit colors.
6451 \end_layout
6453 \begin_layout Itemize
6454 Add Lua function gui.color.
6455 \end_layout
6457 \begin_layout Itemize
6458 Use some new C++11 features in GCC 4.6.
6459 \end_layout
6461 \begin_layout Itemize
6462 Be prepared for core frequency changes.
6463 \end_layout
6465 \begin_layout Itemize
6466 Pass colors in one chunk from Lua.
6467 \end_layout
6469 \begin_layout Subsection
6470 rr0-beta18
6471 \end_layout
6473 \begin_layout Itemize
6474 New lua functions gui.line(), gui.status() and gui.circle(), memory.vma_count(),
6475  memory.read_vma() and memory.find_vma().
6476 \end_layout
6478 \begin_layout Itemize
6479 Numerious documentation fixups
6480 \end_layout
6482 \begin_layout Itemize
6483 RTC time format changed
6484 \end_layout
6486 \begin_layout Itemize
6487 Reformat flags display
6488 \end_layout
6490 \begin_layout Itemize
6491 Allow lua package name to be overridden
6492 \end_layout
6494 \begin_layout Itemize
6495 SDUMP (high-quality dumping).
6496 \end_layout
6498 \begin_layout Itemize
6499 Split platform support to plugins.
6500 \end_layout
6502 \begin_layout Itemize
6503 Make all sound plugins support basic sound commands
6504 \end_layout
6506 \begin_layout Itemize
6507 Support portaudio for sound.
6508 \end_layout
6510 \begin_layout Itemize
6511 Allow disable Lua/SDL searching.
6512 \end_layout
6514 \begin_layout Itemize
6515 Upconvert colors when copying lcscreen to screen.
6516 \end_layout
6518 \begin_layout Itemize
6519 Reorganize source tree.
6520 \end_layout
6522 \begin_layout Itemize
6523 Evdev joystick support.
6524 \end_layout
6526 \begin_layout Itemize
6527 Refactor more code into generic window code.
6528 \end_layout
6530 \begin_layout Subsection
6531 rr0-beta19
6532 \end_layout
6534 \begin_layout Itemize
6535 Refactor message handling.
6536 \end_layout
6538 \begin_layout Itemize
6539 Rework makefile
6540 \end_layout
6542 \begin_layout Itemize
6543 Documentation fixes
6544 \end_layout
6546 \begin_layout Itemize
6547 Finish pending saves before load/quit.
6548 \end_layout
6550 \begin_layout Itemize
6551 Wxwidgets graphics plugin.
6552 \end_layout
6554 \begin_layout Subsection
6555 rr0-beta20
6556 \end_layout
6558 \begin_layout Itemize
6559 Get rid of win32-crap.[ch]pp.
6560 \end_layout
6562 \begin_layout Itemize
6563 Move files around a lot.
6564 \end_layout
6566 \begin_layout Itemize
6567 Get rid of need for host C++ compiler.
6568 \end_layout
6570 \begin_layout Itemize
6571 Bsnes v084 core.
6572 \end_layout
6574 \begin_layout Itemize
6575 Refactor inter-component communication.
6576 \end_layout
6578 \begin_layout Itemize
6579 Fix zero luma.
6580 \end_layout
6582 \begin_layout Itemize
6583 Fix crash on multiline aliases.
6584 \end_layout
6586 \begin_layout Itemize
6587 Load/Save settings in wxwidgets gui.
6588 \end_layout
6590 \begin_layout Subsection
6591 rr0-beta21
6592 \end_layout
6594 \begin_layout Itemize
6595 Patch problems in bsnes core
6596 \end_layout
6598 \begin_layout Itemize
6599 SNES is little-endian, not big-endian!
6600 \end_layout
6602 \begin_layout Itemize
6603 Fix memory corruption in lcscreen::load()
6604 \end_layout
6606 \begin_layout Subsection
6607 rr0-beta22
6608 \end_layout
6610 \begin_layout Itemize
6611 Fix interpretting repeat counts in rrdata loading.
6612 \end_layout
6614 \begin_layout Itemize
6615 New lua callback: on_frame()
6616 \end_layout
6618 \begin_layout Itemize
6619 Remove calls to runtosave() that aren't supposed to be there
6620 \end_layout
6622 \begin_layout Itemize
6623 Lua function: movie.read_rtc()
6624 \end_layout
6626 \begin_layout Itemize
6627 Ignore src/fonts/font.cpp
6628 \end_layout
6630 \begin_layout Itemize
6631 Fix more bsnes core problems
6632 \end_layout
6634 \begin_layout Itemize
6635 Control bsnes random seeding
6636 \end_layout
6638 \begin_layout Itemize
6639 Pause-on-end
6640 \end_layout
6642 \begin_layout Itemize
6643 Some bsnes core debugging features (state dump and state hash)
6644 \end_layout
6646 \begin_layout Itemize
6647 Fix titlebar version number (no, the last version wasn't 'lsnes-0-beta21',
6648  it was 'lsnes rr0-beta21').
6649 \end_layout
6651 \begin_layout Subsection
6652 rr0-beta23
6653 \end_layout
6655 \begin_layout Itemize
6656 Fix memory corruption due to macro/field mixup
6657 \end_layout
6659 \begin_layout Itemize
6660 search-memory update
6661 \end_layout
6663 \begin_layout Itemize
6664 Allow direct-mapped framebuffer
6665 \end_layout
6667 \begin_layout Itemize
6668 SDL: Use SDL_ANYFORMAT if possible
6669 \end_layout
6671 \begin_layout Itemize
6672 SDMP2SOX: 2s delay modes.
6673 \end_layout
6675 \begin_layout Itemize
6676 Wxwidgets: Cleanups
6677 \end_layout
6679 \begin_layout Itemize
6680 Use sed -E, not sed -r.
6681  Fixes building on Mac OS X.
6682 \end_layout
6684 \begin_layout Itemize
6685 Wxwidgets: Save jukebox on exit
6686 \end_layout
6688 \begin_layout Itemize
6689 Fix RTC if using load-movie on savestate.
6690 \end_layout
6692 \begin_layout Itemize
6693 Fix crash related to full console mode.
6694 \end_layout
6696 \begin_layout Subsection
6697 rr0-beta24
6698 \end_layout
6700 \begin_layout Itemize
6701 Wxwidgets: Allow bringing application to foreground on Mac OS X.
6702 \end_layout
6704 \begin_layout Itemize
6705 Wxwidgets: Allow compiling on Mac OS X.
6706 \end_layout
6708 \begin_layout Itemize
6709 Use movie compare instead of movie hashing (faster save/load).
6710 \end_layout
6712 \begin_layout Itemize
6713 Lua: _SYSTEM table.
6714 \end_layout
6716 \begin_layout Subsection
6717 rr0-beta25
6718 \end_layout
6720 \begin_layout Itemize
6721 sdmp2sox: Pad soundtrack if using -l or -L.
6722 \end_layout
6724 \begin_layout Itemize
6725 sdmp2sox: Fix NTSC overscan.
6726 \end_layout
6728 \begin_layout Itemize
6729 sdmp2sox: Add AR correction mode.
6730 \end_layout
6732 \begin_layout Itemize
6733 call lua_close() when exiting.
6734 \end_layout
6736 \begin_layout Itemize
6737 Fix zip_writer bug causing warnings from info-zip and error from advzip.
6738 \end_layout
6740 \begin_layout Subsection
6741 rr0-beta26
6742 \end_layout
6744 \begin_layout Itemize
6745 Fix IPS patching code (use bsnes core IPS patcher).
6746 \end_layout
6748 \begin_layout Itemize
6749 Implement BPS patching (using bsnes core IPS patcher).
6750 \end_layout
6752 \begin_layout Itemize
6753 Add feature to load headered ROMs.
6754 \end_layout
6756 \begin_layout Subsection
6757 rr0-beta27
6758 \end_layout
6760 \begin_layout Itemize
6761 Show command names when showing keybindings
6762 \end_layout
6764 \begin_layout Subsection
6766 \end_layout
6768 \begin_layout Itemize
6769 Fix pause-on-end to be actually controllable
6770 \end_layout
6772 \begin_layout Itemize
6773 SDL: Poll all events in queue, not just first one (fixes slowness in command
6774  typing)
6775 \end_layout
6777 \begin_layout Itemize
6778 Wxwidgets: Fix ROM loading.
6779 \end_layout
6781 \begin_layout Subsection
6782 rr1-beta0
6783 \end_layout
6785 \begin_layout Itemize
6786 Lua: Add gui.textH, gui.textV, gui.textHV
6787 \end_layout
6789 \begin_layout Itemize
6790 Fix text colors on SDL on Mac OS X
6791 \end_layout
6793 \begin_layout Itemize
6794 Mode 'F' for finished in readonly mode.
6795 \end_layout
6797 \begin_layout Itemize
6798 Fix some WS errors.
6799 \end_layout
6801 \begin_layout Itemize
6802 Reliably pause after skip poll
6803 \end_layout
6805 \begin_layout Itemize
6806 Split UI and core into their own threads
6807 \end_layout
6809 \begin_layout Subsection
6810 rr1-beta1
6811 \end_layout
6813 \begin_layout Itemize
6814 Remove leftover dummy SRAM slot
6815 \end_layout
6817 \begin_layout Itemize
6818 Fix controller numbers.
6819 \end_layout
6821 \begin_layout Subsection
6822 rr1-beta2
6823 \end_layout
6825 \begin_layout Itemize
6826 Fix lsnes-dumpavi after interface change.
6827 \end_layout
6829 \begin_layout Itemize
6830 Also give BSNES patches for v085.
6831 \end_layout
6833 \begin_layout Itemize
6834 Pack movie data in memory.
6835 \end_layout
6837 \begin_layout Subsection
6838 rr1-beta3
6839 \end_layout
6841 \begin_layout Itemize
6842 Fix framecount/length given when loading movies.
6843 \end_layout
6845 \begin_layout Itemize
6846 Controller command memory leak fixes.
6847 \end_layout
6849 \begin_layout Itemize
6850 Don't leak palette if freeing screen object.
6851 \end_layout
6853 \begin_layout Subsection
6854 rr1-beta4
6855 \end_layout
6857 \begin_layout Itemize
6858 Detect revisions.
6859 \end_layout
6861 \begin_layout Itemize
6862 Wxwidgets: Allow controlling dumper from the menu.
6863 \end_layout
6865 \begin_layout Subsection
6866 rr1-beta5
6867 \end_layout
6869 \begin_layout Itemize
6870 Rewrite parts of manual
6871 \end_layout
6873 \begin_layout Itemize
6874 Lua: Make it work with Lua 5.2.
6875 \end_layout
6877 \begin_layout Subsection
6878 rr1-beta6
6879 \end_layout
6881 \begin_layout Itemize
6882 Win32: Fix compile errors.
6883 \end_layout
6885 \begin_layout Subsection
6886 rr1-beta7
6887 \end_layout
6889 \begin_layout Itemize
6890 Refactor controller input code.
6891 \end_layout
6893 \begin_layout Itemize
6894 Fix crash when using command line on SDL / Mac OS X.
6895 \end_layout
6897 \begin_layout Subsection
6898 rr1-beta8
6899 \end_layout
6901 \begin_layout Itemize
6902 Delete core/coroutine (obsolete)
6903 \end_layout
6905 \begin_layout Itemize
6906 Lag input display by one frame.
6907 \end_layout
6909 \begin_layout Itemize
6910 Rewind movie to beginning function.
6911 \end_layout
6913 \begin_layout Itemize
6914 Fix wrong frame number reported to Lua when repainting after loadstate
6915 \end_layout
6917 \begin_layout Itemize
6918 Support UI editing of jukebox
6919 \end_layout
6921 \begin_layout Itemize
6922 Wxwidgets: Save settings on exit.
6923 \end_layout
6925 \begin_layout Itemize
6926 Support ${project} for filenames
6927 \end_layout
6929 \begin_layout Itemize
6930 SDL: Fix command history
6931 \end_layout
6933 \begin_layout Subsection
6934 rr1-beta9
6935 \end_layout
6937 \begin_layout Itemize
6938 Fix some order-of-global-ctor bugs.
6939 \end_layout
6941 \begin_layout Subsection
6942 rr1-beta10
6943 \end_layout
6945 \begin_layout Itemize
6946 Fix crashes when quitting on Win32.
6947 \end_layout
6949 \begin_layout Subsection
6950 rr1-beta11
6951 \end_layout
6953 \begin_layout Itemize
6954 EVDEV: Queue keypresses from joystick, don't send directly
6955 \end_layout
6957 \begin_layout Itemize
6958 Wxwidgets: Load-Preserve that actually works.
6959 \end_layout
6961 \begin_layout Subsection
6962 rr1-beta12
6963 \end_layout
6965 \begin_layout Itemize
6966 Wxwidgets: GUI for memory search.
6967 \end_layout
6969 \begin_layout Itemize
6970 Warn about using synchronous queue in UI callback.
6971 \end_layout
6973 \begin_layout Subsection
6974 rr1-beta13
6975 \end_layout
6977 \begin_layout Itemize
6978 Remember last saved file for each ROM
6979 \end_layout
6981 \begin_layout Itemize
6982 Support MT dumping via boost.
6983 \end_layout
6985 \begin_layout Itemize
6986 Lua: input.raw
6987 \end_layout
6989 \begin_layout Itemize
6990 Lua: input.keyhook
6991 \end_layout
6993 \begin_layout Itemize
6994 Make mouse be ordinary input instead of special-casing
6995 \end_layout
6997 \begin_layout Itemize
6998 SDL: Don't screw up commands with NUL codepoints.
6999 \end_layout
7001 \begin_layout Subsection
7002 rr1-beta14
7003 \end_layout
7005 \begin_layout Itemize
7006 Merge status panel and main window
7007 \end_layout
7009 \begin_layout Itemize
7010 True movie slot support (the rest of it)
7011 \end_layout
7013 \begin_layout Itemize
7014 SDL: Fix compilation error
7015 \end_layout
7017 \begin_layout Itemize
7018 Elminate cross calls in dump menu code.
7019 \end_layout
7021 \begin_layout Subsection
7022 rr1-beta15
7023 \end_layout
7025 \begin_layout Itemize
7026 Cancel pending saves command
7027 \end_layout
7029 \begin_layout Itemize
7030 Wxwidgets: Code refactoring
7031 \end_layout
7033 \begin_layout Itemize
7034 Wxwidgets: Fix system -> reset
7035 \end_layout
7037 \begin_layout Itemize
7038 Wxwidgets: Read watch expressions in the right thread
7039 \end_layout
7041 \begin_layout Subsection
7042 rr1-beta16
7043 \end_layout
7045 \begin_layout Itemize
7046 Wxwidgets: Don't prompt for member when running Lua script (Lua doesn't
7047  support that).
7048 \end_layout
7050 \begin_layout Itemize
7051 Wxwidgets: 128 -> 1024 Autohold slots (in case more are needed).
7052 \end_layout
7054 \begin_layout Itemize
7055 Don't append trailing '-' to prefix when saving movie.
7056 \end_layout
7058 \begin_layout Itemize
7059 Fix ROM/savestate handling (don't let user mismatch ROM and savestates).
7060 \end_layout
7062 \begin_layout Subsection
7064 \end_layout
7066 \begin_layout Itemize
7067 Document memory watch syntax.
7068 \end_layout
7070 \begin_layout Subsection
7071 rr1-delta1
7072 \end_layout
7074 \begin_layout Itemize
7075 Fix unattended dumping (lsnes-dumpavi)
7076 \end_layout
7078 \begin_layout Itemize
7079 Support RAW dumping
7080 \end_layout
7082 \begin_layout Itemize
7083 Use adv_dumper instead of the old interface in lsnes-dumpavi (changes syntax)
7084 \end_layout
7086 \begin_layout Itemize
7087 Add option to control sample rate preturbation in AVI dumper
7088 \end_layout
7090 \begin_layout Subsection
7091 rr1-delta2
7092 \end_layout
7094 \begin_layout Itemize
7095 Wxwidgets: Fix dumper submodes
7096 \end_layout
7098 \begin_layout Itemize
7099 Set core controller types before loadstate
7100 \end_layout
7102 \begin_layout Subsection
7103 rr1-delta2epsilon1
7104 \end_layout
7106 \begin_layout Itemize
7107 Fix compiling with bsnes v086.
7108 \end_layout
7110 \begin_layout Subsection
7111 rr1-delta3
7112 \end_layout
7114 \begin_layout Itemize
7115 Don't prompt before quitting
7116 \end_layout
7118 \begin_layout Itemize
7119 Start unpaused, preserve pause/unpause over load.
7120 \end_layout
7122 \begin_layout Itemize
7123 Try to autodetect if ROM is headered.
7124 \end_layout
7126 \begin_layout Itemize
7127 Wxwidgets: Only bring up ROM patching screen if specifically requested.
7128 \end_layout
7130 \begin_layout Itemize
7131 Allow configuring some hotkeys.
7132 \end_layout
7134 \begin_layout Subsection
7135 rr1-delta4
7136 \end_layout
7138 \begin_layout Itemize
7139 Lots of code cleanups
7140 \end_layout
7142 \begin_layout Itemize
7143 Fix JMD compression (JMD dumping was broken)
7144 \end_layout
7146 \begin_layout Itemize
7147 Don't crash if Lua C function throws an exception.
7148 \end_layout
7150 \begin_layout Itemize
7151 Support bitmap drawing in Lua.
7152 \end_layout
7154 \begin_layout Itemize
7155 Fix bsnes v085/v086 patches.
7156 \end_layout
7158 \begin_layout Itemize
7159 Improve stability on win32.
7160 \end_layout
7162 \begin_layout Subsection
7163 rr1-delta4epsilon1
7164 \end_layout
7166 \begin_layout Itemize
7167 Don't corrupt movie if movie length is integer multiple of frames per page.
7168 \end_layout
7170 \begin_layout Subsection
7171 rr1-delta5
7172 \end_layout
7174 \begin_layout Itemize
7175 New Lua hooks: on_rewind, on_frame_emulated, on_idle, on_timer
7176 \end_layout
7178 \begin_layout Itemize
7179 New Lua functions: emulator_ready(), utime(), set_idle_timeout(), set_timer_time
7180 out(), bit.extract(), bit.value(), input.geta(), input.seta() and input.controllertyp
7182 \end_layout
7184 \begin_layout Itemize
7185 Wxwidgets: Fix internal focus lost (hotkeys stop working)
7186 \end_layout
7188 \begin_layout Itemize
7189 Wxwidgets: Fix broken modifiers
7190 \end_layout
7192 \begin_layout Itemize
7193 on_paint has parameter now.
7194 \end_layout
7196 \begin_layout Itemize
7197 Optional initital fill for bitmaps
7198 \end_layout
7200 \begin_layout Itemize
7201 Fix palette changing.
7202 \end_layout
7204 \begin_layout Itemize
7205 Optimize rendering a bit.
7206 \end_layout
7208 \begin_layout Itemize
7209 Bsnes v087 support.
7210 \end_layout
7212 \begin_layout Subsection
7213 rr1-delta5epsilon1
7214 \end_layout
7216 \begin_layout Itemize
7217 Movieinfo: Fix display of port #2 type.
7218 \end_layout
7220 \begin_layout Itemize
7221 Call on_input() after loadstate.
7222 \end_layout
7224 \begin_layout Subsection
7225 rr1-delta5epsilon2
7226 \end_layout
7228 \begin_layout Itemize
7229 Fix writing port2 data to movie.
7230 \end_layout
7232 \begin_layout Itemize
7233 Fix SRAM handling with Bsnes v087.
7234 \end_layout
7236 \begin_layout Subsection
7237 rr1-delta6
7238 \end_layout
7240 \begin_layout Itemize
7241 Library loading support
7242 \end_layout
7244 \begin_layout Itemize
7245 Built-in TSCC encoder
7246 \end_layout
7248 \begin_layout Itemize
7249 Hi-color (256T colors) dumping.
7250 \end_layout
7252 \begin_layout Itemize
7253 Dump over TCP/IP(v6)
7254 \end_layout
7256 \begin_layout Itemize
7257 Hidable status panel
7258 \end_layout
7260 \begin_layout Itemize
7261 Turbo toggle/hold
7262 \end_layout
7264 \begin_layout Itemize
7265 Adjustable sound volume
7266 \end_layout
7268 \begin_layout Itemize
7269 Screen scaling
7270 \end_layout
7272 \begin_layout Itemize
7273 Allow DnD into filename boxes
7274 \end_layout
7276 \begin_layout Itemize
7277 Configurable paths
7278 \end_layout
7280 \begin_layout Itemize
7281 Portaudio: Fix speaker popping at start
7282 \end_layout
7284 \begin_layout Itemize
7285 Lots of UI changes
7286 \end_layout
7288 \begin_layout Itemize
7289 Speed adjustment menu
7290 \end_layout
7292 \begin_layout Itemize
7293 Win32 joystick support
7294 \end_layout
7296 \begin_layout Itemize
7297 Lua: gui.rainbow and gui.box
7298 \end_layout
7300 \begin_layout Itemize
7301 Split key lists into classes (the key list was large!)
7302 \end_layout
7304 \begin_layout Itemize
7305 More save slots support
7306 \end_layout
7308 \begin_layout Itemize
7309 Wxwidgets (wxJoystick) joystick support
7310 \end_layout
7312 \begin_layout Subsection
7313 rr1-delta7
7314 \end_layout
7316 \begin_layout Itemize
7317 Lots of internal joystick refactoring
7318 \end_layout
7320 \begin_layout Itemize
7321 Evdev: Add mapping for BTN_TOOL_QUINTTAP
7322 \end_layout
7324 \begin_layout Itemize
7325 Wxwidgets: Settings mode (open settings without ROM)
7326 \end_layout
7328 \begin_layout Itemize
7329 Wxwidgets: Prompt key to use option
7330 \end_layout
7332 \begin_layout Itemize
7333 Wxwidgets: Fix crash if key goes away underneath
7334 \end_layout
7336 \begin_layout Itemize
7337 Wxwidgets: Fix mouse position in presence of scaling
7338 \end_layout
7340 \begin_layout Itemize
7341 AVI dumper: Mode 4 (high-quality resampling to common rate using SRC)
7342 \end_layout
7344 \begin_layout Itemize
7345 Wxwidgets: Redesign hotkeys dialog to avoid tree control (tree control doesn't
7346  seem to work well on WinXP)
7347 \end_layout
7349 \begin_layout Itemize
7350 Start paused option.
7351 \end_layout
7353 \begin_layout Subsection
7354 rr1-delta7epsilon1
7355 \end_layout
7357 \begin_layout Itemize
7358 AVI: ZMBV support
7359 \end_layout
7361 \begin_layout Itemize
7362 lsnes-dumpavi: Start Lua before starting dumper
7363 \end_layout
7365 \begin_layout Itemize
7366 AVI: Fix secondary audio in mode 4.
7367 \end_layout
7369 \begin_layout Subsection
7370 rr1-delta7epsilon2
7371 \end_layout
7373 \begin_layout Itemize
7374 AVI: Refactor ZMBV a bit.
7375 \end_layout
7377 \begin_layout Itemize
7378 Fix error reading analog values from movie file
7379 \end_layout
7381 \begin_layout Subsection
7382 rr1-delta8
7383 \end_layout
7385 \begin_layout Itemize
7386 Delayed reset support
7387 \end_layout
7389 \begin_layout Itemize
7390 Lua: memory.hash_region
7391 \end_layout
7393 \begin_layout Subsection
7394 rr1-delta8epsilon1
7395 \end_layout
7397 \begin_layout Itemize
7398 Rework the build system
7399 \end_layout
7401 \begin_layout Itemize
7402 Typing input support
7403 \end_layout
7405 \begin_layout Itemize
7406 Fix building with bsnes v086 and v087.
7407 \end_layout
7409 \begin_layout Itemize
7410 SDL: Save settings on exit
7411 \end_layout
7413 \begin_layout Itemize
7414 SDL: Command to enter command line mode with given command.
7415 \end_layout
7417 \begin_layout Itemize
7418 SDL: More advanced command editing.
7419 \end_layout
7421 \begin_layout Subsection
7422 rr1-delta9
7423 \end_layout
7425 \begin_layout Itemize
7426 wxMSW: Fix the 
7427 \begin_inset Quotes eld
7428 \end_inset
7430 arrow keys and enter don't work
7431 \begin_inset Quotes erd
7432 \end_inset
7434  problem
7435 \end_layout
7437 \begin_layout Itemize
7438 MSU-1 support
7439 \end_layout
7441 \begin_layout Itemize
7442 Show mode changes due to rewinding.
7443 \end_layout
7445 \begin_layout Itemize
7446 Unsafe rewind support
7447 \end_layout
7449 \begin_layout Itemize
7450 Fix directory transversal.
7451 \end_layout
7453 \begin_layout Subsection
7454 rr1-delta10
7455 \end_layout
7457 \begin_layout Itemize
7458 AVI: Sound mode 5 (48kHz high-quality)
7459 \end_layout
7461 \begin_layout Itemize
7462 Lua: Reset Lua VM
7463 \end_layout
7465 \begin_layout Itemize
7466 Map the SNES bus into address space
7467 \end_layout
7469 \begin_layout Itemize
7470 Fix loading memory watch files with CRLF line endings
7471 \end_layout
7473 \begin_layout Subsection
7474 rr1-delta10epsilon1
7475 \end_layout
7477 \begin_layout Itemize
7478 Map bsnes internal state into memory space
7479 \end_layout
7481 \begin_layout Itemize
7482 Fix the 
7483 \begin_inset Quotes eld
7484 \end_inset
7486 click on panel wedges the emulator
7487 \begin_inset Quotes erd
7488 \end_inset
7490  for real.
7491 \end_layout
7493 \begin_layout Itemize
7494 DnD movies/saves on the main window.
7495 \end_layout
7497 \begin_layout Subsection
7498 rr1-delta11
7499 \end_layout
7501 \begin_layout Itemize
7502 Split core bindings into own module.
7503 \end_layout
7505 \begin_layout Itemize
7506 Remember invalid settings
7507 \end_layout
7509 \begin_layout Itemize
7510 Support for modified Gambatte core for GB/GBC emulation.
7511 \end_layout
7513 \begin_layout Itemize
7514 Reload/swap ROM function
7515 \end_layout
7517 \begin_layout Subsection
7518 rr1-delta11epsilon1
7519 \end_layout
7521 \begin_layout Itemize
7522 Fix step poll function
7523 \end_layout
7525 \begin_layout Subsection
7526 rr1-delta12
7527 \end_layout
7529 \begin_layout Itemize
7530 Non-insane savestate anchoring
7531 \end_layout
7533 \begin_layout Subsection
7534 rr1-delta13
7535 \end_layout
7537 \begin_layout Itemize
7538 More Memory search methods
7539 \end_layout
7541 \begin_layout Itemize
7542 Preserve movie if loading in RO mode.
7543 \end_layout
7545 \begin_layout Itemize
7546 Fix a obscure case in timeline check
7547 \end_layout
7549 \begin_layout Itemize
7550 Revamp the entiere ROM loading code
7551 \end_layout
7553 \begin_layout Itemize
7554 Support DnD on ROMs
7555 \end_layout
7557 \begin_layout Itemize
7558 Revamp menu layout
7559 \end_layout
7561 \begin_layout Itemize
7562 Standalone hotkey config dialog
7563 \end_layout
7565 \begin_layout Itemize
7566 Show bindings in more user-friendly format
7567 \end_layout
7569 \begin_layout Subsection
7570 rr1-delta13epsilon1
7571 \end_layout
7573 \begin_layout Itemize
7574 Pipedec support
7575 \end_layout
7577 \begin_layout Itemize
7578 Fix uninitialized variables in bsnes v085
7579 \end_layout
7581 \begin_layout Subsection
7582 rr1-delta14
7583 \end_layout
7585 \begin_layout Itemize
7586 Merge gambatte core into mainline (from its own branch)
7587 \end_layout
7589 \begin_layout Itemize
7590 Wxwidgets: Show expected dump file formats
7591 \end_layout
7593 \begin_layout Itemize
7594 Memory watch: Data typing
7595 \end_layout
7597 \begin_layout Itemize
7598 lsnes internal MMIO area.
7599 \end_layout
7601 \begin_layout Itemize
7602 Wxwidgets: New memory watch editor
7603 \end_layout
7605 \begin_layout Itemize
7606 Hexadecimal memory watches
7607 \end_layout
7609 \begin_layout Itemize
7610 Wxwidgets: Monospaced panel
7611 \end_layout
7613 \begin_layout Itemize
7614 Wxwidgets: Split memory watches in panel
7615 \end_layout
7617 \begin_layout Itemize
7618 Wxwidgets: Disable VMAs in memory search
7619 \end_layout
7621 \begin_layout Itemize
7622 lsnes-dumpavi: Fix speed bug
7623 \end_layout
7625 \begin_layout Itemize
7626 Movie subtitle support
7627 \end_layout
7629 \begin_layout Itemize
7630 Fix rerecord count reporting
7631 \end_layout
7633 \begin_layout Itemize
7634 Don't trash movie when loading in readonly mode.
7635 \end_layout
7637 \begin_layout Subsection
7638 rr1-delta14epsilon1
7639 \end_layout
7641 \begin_layout Itemize
7642 Wxwidgets: Fix crashes on closing settings dialogs on Mac OS X.
7643 \end_layout
7645 \begin_layout Itemize
7646 Fix build on Mac OS X.
7647 \end_layout
7649 \begin_layout Itemize
7650 Lua: loopwrapper
7651 \end_layout
7653 \begin_layout Itemize
7654 Wxwidgets: Hidable messages window
7655 \end_layout
7657 \begin_layout Itemize
7658 Lua: input.joyset
7659 \end_layout
7661 \begin_layout Itemize
7662 Bsnes: Support inconsistent saves
7663 \end_layout
7665 \begin_layout Itemize
7666 Bsnes: Allow simulating saving every frame
7667 \end_layout
7669 \begin_layout Itemize
7670 Fix desync if savestate is loaded in readonly mode in certain conditions.
7671 \end_layout
7673 \begin_layout Itemize
7674 Wxwidgets: Fix save dialogs on Mac OS X.
7675 \end_layout
7677 \begin_layout Itemize
7678 Wxwidgets: Fix insane status width on Win32.
7679 \end_layout
7681 \begin_layout Itemize
7682 Wxwidgets: Fix autohold processing to be faster.
7683 \end_layout
7685 \begin_layout Itemize
7686 Wxwidgets: Allow loading ROMs and movies from commandline.
7687 \end_layout
7689 \begin_layout Subsection
7690 rr1-delta15
7691 \end_layout
7693 \begin_layout Itemize
7694 Be a bit smarter with --load
7695 \end_layout
7697 \begin_layout Itemize
7698 Rewrote higher-level parts of audio system
7699 \end_layout
7701 \begin_layout Itemize
7702 Tool to build commentary tracks
7703 \end_layout
7705 \begin_layout Itemize
7706 Lua: input.joyget
7707 \end_layout
7709 \begin_layout Itemize
7710 Gambatte: Add support for SVN358
7711 \end_layout
7713 \begin_layout Itemize
7714 Use builtin font when rendering status panel.
7715 \end_layout
7717 \begin_layout Itemize
7718 Option to detach memory watch to its own window.
7719 \end_layout
7721 \begin_layout Itemize
7722 Recent ROMs/Movies menu
7723 \end_layout
7725 \begin_layout Itemize
7726 Libao support
7727 \end_layout
7729 \begin_layout Itemize
7730 Useful lag counter for SNES games that autopoll
7731 \end_layout
7733 \begin_layout Itemize
7734 Fix buffer overflow in gambatte sound output
7735 \end_layout
7737 \begin_layout Subsection
7738 rr1-delta15epsilon1
7739 \end_layout
7741 \begin_layout Itemize
7742 Don't blow up on wxGTK if the window is hidden somehow
7743 \end_layout
7745 \begin_layout Itemize
7746 Support simultaneous drop of ROM and movie.
7747 \end_layout
7749 \begin_layout Itemize
7750 Gambatte: Don't save spurious SRAMs.
7751 \end_layout
7753 \begin_layout Itemize
7754 Make SGB ROMs actually usable.
7755 \end_layout
7757 \begin_layout Itemize
7758 Fix so that saved movies appear in recent movies.
7759 \end_layout
7761 \begin_layout Itemize
7762 Don't open multiple commentary editors at once.
7763 \end_layout
7765 \begin_layout Subsection
7766 rr1-delta15epsilon2
7767 \end_layout
7769 \begin_layout Itemize
7770 Lua: memory.readregion/memory.writeregion
7771 \end_layout
7773 \begin_layout Itemize
7774 Lua: memory.map{,s}{byte,word,dword,qword}
7775 \end_layout
7777 \begin_layout Itemize
7778 Lua: memory.map_structure
7779 \end_layout
7781 \begin_layout Itemize
7782 Lua: Fix bus_address for gambatte
7783 \end_layout
7785 \begin_layout Itemize
7786 Fix features dependent of bsnes debugger
7787 \end_layout
7789 \begin_layout Itemize
7790 Cleanup bsnes debugger logic
7791 \end_layout
7793 \begin_layout Itemize
7794 Fix resets in presence of save every frame
7795 \end_layout
7797 \begin_layout Subsection
7798 rr1-delta15epsilon3
7799 \end_layout
7801 \begin_layout Itemize
7802 Lua: input.lcid_to_pcid
7803 \end_layout
7805 \begin_layout Itemize
7806 Fix off-by-one bug with slot hashes
7807 \end_layout
7809 \begin_layout Itemize
7810 Fix crashes on certain memory watch expressions
7811 \end_layout
7813 \begin_layout Itemize
7814 Lua: memory.read_expr
7815 \end_layout
7817 \begin_layout Itemize
7818 Lua: Fix memory.read_expr on nil argument
7819 \end_layout
7821 \begin_layout Itemize
7822 Fix the code to compile on G++ 4.7
7823 \end_layout
7825 \begin_layout Itemize
7826 Change button_id to be a function pointer field, not a virtual method
7827 \end_layout
7829 \begin_layout Itemize
7830 Add bsnes patches to fix libsnes to compile on GCC 4.7
7831 \end_layout
7833 \begin_layout Itemize
7834 Gambatte: Always use legacy lag counting
7835 \end_layout
7837 \begin_layout Itemize
7838 Memory commands: Memory addresses are up to 16 hex digits, not up to 8
7839 \end_layout
7841 \begin_layout Itemize
7842 Fix analog controllers
7843 \end_layout
7845 \begin_layout Itemize
7846 Fix autohold menus
7847 \end_layout
7849 \begin_layout Itemize
7850 Fix button symbols in input display
7851 \end_layout
7853 \begin_layout Itemize
7854 Compensate for nuts bsnes superscope/justifier handling
7855 \end_layout
7857 \begin_layout Itemize
7858 Lua: Fix bit.extract boolean handling
7859 \end_layout
7861 \begin_layout Subsection
7862 rr1-delta16
7863 \end_layout
7865 \begin_layout Itemize
7866 Stop at movie end: Don't off-by-one
7867 \end_layout
7869 \begin_layout Itemize
7870 Fix crash closing lsnes with voice playback active.
7871 \end_layout
7873 \begin_layout Itemize
7874 Import/Export OggOpus for commentary tracks
7875 \end_layout
7877 \begin_layout Itemize
7878 16-button controllers.
7879 \end_layout
7881 \begin_layout Itemize
7882 Don't show nonexistent controllers in input display
7883 \end_layout
7885 \begin_layout Itemize
7886 Set voice record/playback volume from UI
7887 \end_layout
7889 \begin_layout Itemize
7890 Patches for gambatte SVN364.
7891 \end_layout
7893 \begin_layout Itemize
7894 Load markup (if exists) even without gamepack file.
7895 \end_layout
7897 \begin_layout Itemize
7898 Screen rotation & flipping
7899 \end_layout
7901 \begin_layout Itemize
7902 Lua: Some new bit functions
7903 \end_layout
7905 \begin_layout Itemize
7906 Auto-refresh voice streams on change.
7907 \end_layout
7909 \begin_layout Itemize
7910 Auto-refresh subtitles on change & new subtitle editor.
7911 \end_layout
7913 \begin_layout Itemize
7914 Fix music volume adjustment.
7915 \end_layout
7917 \begin_layout Subsection
7918 rr1-delta16epsilon1
7919 \end_layout
7921 \begin_layout Itemize
7922 Wxwidgets: Fix memory watch rendering.
7923 \end_layout
7925 \begin_layout Itemize
7926 Wxwidgets: Allow setting voice stream gain.
7927 \end_layout
7929 \begin_layout Itemize
7930 Wxwidgets: VU meters and volume adjustment.
7931 \end_layout
7933 \begin_layout Itemize
7934 Lua: Custom fonts support.
7935 \end_layout
7937 \begin_layout Itemize
7938 Lua: Fix methods stopping working when resetting Lua.
7939 \end_layout
7941 \begin_layout Itemize
7942 Fix loading standard-format movies in preserve (readonly) mode.
7943 \end_layout
7945 \begin_layout Subsection
7946 rr1-delta17
7947 \end_layout
7949 \begin_layout Itemize
7950 Primitive movie editor
7951 \end_layout
7953 \begin_layout Itemize
7954 Fix VU meter with no sound device.
7955 \end_layout
7957 \begin_layout Itemize
7958 Fix various undefined return values.
7959 \end_layout
7961 \begin_layout Itemize
7962 Show rates in VU meter window.
7963 \end_layout
7965 \begin_layout Subsection
7966 rr1-delta17epsilon1
7967 \end_layout
7969 \begin_layout Itemize
7970 Commentary tool: Set nominal bit rate and limit max bit rate.
7971 \end_layout
7973 \begin_layout Itemize
7974 Lua: Unconditionally reload host memory on loadstate
7975 \end_layout
7977 \begin_layout Itemize
7978 Lua: Query bindings, manipulate aliases, create inverse bindings
7979 \end_layout
7981 \begin_layout Itemize
7982 Lua: Fix crashes with resetting VM while some types of paint requests are
7983  in flight.
7984 \end_layout
7986 \begin_layout Itemize
7987 Lua: gui.text: Clip the text properly instead of corrupting memory in some
7988  cases.
7989 \end_layout
7991 \begin_layout Itemize
7992 Save screenshot header reliably
7993 \end_layout
7995 \begin_layout Itemize
7996 Lua: Backport input.get2 and input.set2
7997 \end_layout
7999 \begin_layout Itemize
8000 Lua: New controller info functions.
8001 \end_layout
8003 \begin_layout Itemize
8004 Movie editor: Fix reset delay counters to be the right way around.
8005 \end_layout
8007 \begin_layout Itemize
8008 Lua: on_snoop2
8009 \end_layout
8011 \begin_layout Itemize
8012 Lua: on_button and input.veto_button.
8013 \end_layout
8015 \begin_layout Subsection
8016 rr1-delta17epsilon2
8017 \end_layout
8019 \begin_layout Itemize
8020 Fix saving PNG screenshots on Win32.
8021 \end_layout
8023 \begin_layout Itemize
8024 Movie editor: Sweep axis.
8025 \end_layout
8027 \begin_layout Itemize
8028 Load selected slot in ro/rw/preserve/movie mode.
8029 \end_layout
8031 \begin_layout Itemize
8032 input.joyset: Preserve and invert user input.
8033 \end_layout
8035 \begin_layout Itemize
8036 Allow immediate saving at point of save (transfer saves).
8037 \end_layout
8039 \begin_layout Itemize
8040 Wxwidgets: Filter filenames in dialogs, autoappend extensions.
8041 \end_layout
8043 \begin_layout Itemize
8044 data/verysmall.font: Add missing glyph 70 (
8045 \begin_inset Quotes eld
8046 \end_inset
8049 \begin_inset Quotes erd
8050 \end_inset
8053 \end_layout
8055 \begin_layout Itemize
8056 Lua: Allow painting custom fonts with halo.
8057 \end_layout
8059 \begin_layout Itemize
8060 Fix memory value search to work on byte types.
8061 \end_layout
8063 \begin_layout Subsection
8064 rr1-delta17epsilon3
8065 \end_layout
8067 \begin_layout Itemize
8068 Fix status panel (and movie editor) flicker
8069 \end_layout
8071 \begin_layout Itemize
8072 Show effects of Lua in input display
8073 \end_layout
8075 \begin_layout Itemize
8076 Offer lsmv.backup as file filter too for load lsmv
8077 \end_layout
8079 \begin_layout Itemize
8080 Allow slowing down subframe advance 
8081 \end_layout
8083 \begin_layout Itemize
8084 Display current save slot information
8085 \end_layout
8087 \begin_layout Itemize
8088 Add snes9x fonts
8089 \end_layout
8091 \begin_layout Itemize
8092 Fix hotkeys stopping working after X-ing settings dialog
8093 \end_layout
8095 \begin_layout Itemize
8096 Movie editor: Fix bug if extending finished movie
8097 \end_layout
8099 \begin_layout Itemize
8100 Cap current_frame_first_subframe to movie size when recounting movie
8101 \end_layout
8103 \begin_layout Itemize
8104 Movie editor: Interpret ctrl+click as right click 
8105 \end_layout
8107 \end_body
8108 \end_document